home *** CD-ROM | disk | FTP | other *** search
- #ifndef fontmenu_H
- #define fontmenu_H
-
- /* C header file for FontMenu
- * written by DefMod (Aug 30 1995) on Tue Sep 5 15:14:23 1995
- * Jonathan Coxhead, Acorn Computers Ltd
- */
-
- #ifndef types_H
- #include "types.h"
- #endif
-
- #ifndef toolbox_H
- #include "toolbox.h"
- #endif
-
- #ifndef menu_H
- #include "menu.h"
- #endif
-
- /**********************************
- * SWI names and SWI reason codes *
- **********************************/
- #undef FontMenu_ClassSWI
- #define FontMenu_ClassSWI 0x82A40
- #undef XFontMenu_ClassSWI
- #define XFontMenu_ClassSWI 0xA2A40
- #undef FontMenu_PostFilter
- #define FontMenu_PostFilter 0x82A41
- #undef XFontMenu_PostFilter
- #define XFontMenu_PostFilter 0xA2A41
- #undef FontMenu_PreFilter
- #define FontMenu_PreFilter 0x82A42
- #undef XFontMenu_PreFilter
- #define XFontMenu_PreFilter 0xA2A42
- #undef FontMenu_SetFont
- #define FontMenu_SetFont 0x0
- #undef FontMenu_GetFont
- #define FontMenu_GetFont 0x1
-
- /************************************
- * Structure and union declarations *
- ************************************/
- typedef struct fontmenu_object fontmenu_object;
- typedef struct fontmenu_action_about_to_be_shown fontmenu_action_about_to_be_shown;
- typedef struct fontmenu_action_selection fontmenu_action_selection;
-
- /********************
- * Type definitions *
- ********************/
- typedef bits fontmenu_flags;
-
- struct fontmenu_object
- { fontmenu_flags flags;
- toolbox_string_reference ticked_font;
- };
-
- typedef os_coord fontmenu_full;
-
- struct fontmenu_action_about_to_be_shown
- { toolbox_position_tag tag;
- union
- { os_coord top_left;
- fontmenu_full full;
- }
- position;
- };
-
- struct fontmenu_action_selection
- { char font_identifier [216];
- };
-
- /************************
- * Constant definitions *
- ************************/
- #define class_FONT_MENU ((toolbox_class) 0x82A40u)
- #define fontmenu_GENERATE_ABOUT_TO_BE_SHOWN ((fontmenu_flags) 0x1u)
- #define fontmenu_GENERATE_DIALOGUE_COMPLETED ((fontmenu_flags) 0x2u)
- #define fontmenu_INCLUDE_SYSTEM_FONT ((fontmenu_flags) 0x4u)
- #define action_FONT_MENU_ABOUT_TO_BE_SHOWN 0x82A40u
- #define action_FONT_MENU_DIALOGUE_COMPLETED 0x82A41u
- #define action_FONT_MENU_SELECTION 0x82A42u
- #define error_FONT_MENU_TASKS_ACTIVE 0x80B000u
- #define error_FONT_MENU_ALLOC_FAILED 0x80B001u
- #define error_FONT_MENU_SHORT_BUFFER 0x80B002u
- #define error_FONT_MENU_NO_SUCH_TASK 0x80B011u
- #define error_FONT_MENU_NO_SUCH_METHOD 0x80B012u
- #define error_FONT_MENU_NO_SUCH_MISC_OP_METHOD 0x80B013u
-
- /*************************
- * Function declarations *
- *************************/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* ------------------------------------------------------------------------
- * Function: fontmenu_set_font()
- *
- * Description: Calls reason code 0 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_menu - value of R1 on entry
- * font_identifier - value of R3 on entry
- *
- * Other notes: Before entry, R2 = 0x0.
- */
-
- extern os_error *xfontmenu_set_font (bits flags,
- toolbox_o font_menu,
- char const *font_identifier);
- extern void fontmenu_set_font (bits flags,
- toolbox_o font_menu,
- char const *font_identifier);
-
- /* ------------------------------------------------------------------------
- * Function: fontmenu_get_font()
- *
- * Description: Calls reason code 1 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_menu - value of R1 on entry
- * buffer - value of R3 on entry
- * size - value of R4 on entry
- *
- * Output: used - value of R4 on exit (X version only)
- *
- * Returns: R4 (non-X version only)
- *
- * Other notes: Before entry, R2 = 0x1.
- */
-
- extern os_error *xfontmenu_get_font (bits flags,
- toolbox_o font_menu,
- char *buffer,
- int size,
- int *used);
- extern int fontmenu_get_font (bits flags,
- toolbox_o font_menu,
- char *buffer,
- int size);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-