home *** CD-ROM | disk | FTP | other *** search
- #ifndef fontdbox_H
- #define fontdbox_H
-
- /* C header file for FontDbox
- * written by DefMod (Aug 30 1995) on Tue Sep 5 15:14:26 1995
- * Jonathan Coxhead, Acorn Computers Ltd
- */
-
- #ifndef types_H
- #include "types.h"
- #endif
-
- #ifndef toolbox_H
- #include "toolbox.h"
- #endif
-
- #ifndef window_H
- #include "window.h"
- #endif
-
- /**********************************
- * SWI names and SWI reason codes *
- **********************************/
- #undef ProgInfo_ClassSWI
- #define ProgInfo_ClassSWI 0x82A00
- #undef XProgInfo_ClassSWI
- #define XProgInfo_ClassSWI 0xA2A00
- #undef ProgInfo_PostFilter
- #define ProgInfo_PostFilter 0x82A01
- #undef XProgInfo_PostFilter
- #define XProgInfo_PostFilter 0xA2A01
- #undef ProgInfo_PreFilter
- #define ProgInfo_PreFilter 0x82A02
- #undef XProgInfo_PreFilter
- #define XProgInfo_PreFilter 0xA2A02
- #undef FontDbox_GetWindowId
- #define FontDbox_GetWindowId 0x0
- #undef FontDbox_SetFont
- #define FontDbox_SetFont 0x1
- #undef FontDbox_GetFont
- #define FontDbox_GetFont 0x2
- #undef FontDbox_SetSize
- #define FontDbox_SetSize 0x3
- #undef FontDbox_GetSize
- #define FontDbox_GetSize 0x4
- #undef FontDbox_SetTryString
- #define FontDbox_SetTryString 0x5
- #undef FontDbox_GetTryString
- #define FontDbox_GetTryString 0x6
- #undef FontDbox_SetTitle
- #define FontDbox_SetTitle 0x7
- #undef FontDbox_GetTitle
- #define FontDbox_GetTitle 0x8
-
- /************************************
- * Structure and union declarations *
- ************************************/
- typedef struct fontdbox_font fontdbox_font;
- typedef struct fontdbox_object fontdbox_object;
- typedef struct fontdbox_action_about_to_be_shown fontdbox_action_about_to_be_shown;
- typedef struct fontdbox_action_apply_font fontdbox_action_apply_font;
-
- /********************
- * Type definitions *
- ********************/
- typedef bits fontdbox_flags;
-
- struct fontdbox_font
- { toolbox_string_reference font;
- int height;
- int aspect;
- };
-
- struct fontdbox_object
- { fontdbox_flags flags;
- toolbox_msg_reference title;
- int title_limit;
- fontdbox_font initial;
- toolbox_msg_reference try;
- toolbox_string_reference alternative_window_name;
- };
-
- typedef toolbox_full fontdbox_full;
-
- struct fontdbox_action_about_to_be_shown
- { toolbox_position_tag tag;
- union
- { os_coord top_left;
- fontdbox_full full;
- }
- position;
- };
-
- struct fontdbox_action_apply_font
- { int height;
- int aspect;
- char font [208];
- };
-
- /************************
- * Constant definitions *
- ************************/
- #define class_FONT_DBOX ((toolbox_class) 0x82A00u)
- #define fontdbox_SET_HEIGHT 0x1u
- #define fontdbox_SET_ASPECT 0x2u
- #define fontdbox_GENERATE_ABOUT_TO_BE_SHOWN ((fontdbox_flags) 0x1u)
- #define fontdbox_GENERATE_DIALOGUE_COMPLETED ((fontdbox_flags) 0x2u)
- #define fontdbox_INCLUDE_SYSTEM_FONT ((fontdbox_flags) 0x4u)
- #define fontdbox_APPLY ((toolbox_c) 0x82A0000u)
- #define fontdbox_CANCEL ((toolbox_c) 0x82A0001u)
- #define fontdbox_TRY ((toolbox_c) 0x82A0002u)
- #define fontdbox_TRY_STRING ((toolbox_c) 0x82A0003u)
- #define fontdbox_ASPECT_RATIO ((toolbox_c) 0x82A0004u)
- #define fontdbox_HEIGHT ((toolbox_c) 0x82A0005u)
- #define fontdbox_STANDARD_SIZE0 ((toolbox_c) 0x82A0006u)
- #define fontdbox_STANDARD_SIZE1 ((toolbox_c) 0x82A0007u)
- #define fontdbox_STANDARD_SIZE2 ((toolbox_c) 0x82A0008u)
- #define fontdbox_STANDARD_SIZE3 ((toolbox_c) 0x82A0009u)
- #define fontdbox_STANDARD_SIZE4 ((toolbox_c) 0x82A000Au)
- #define fontdbox_STANDARD_SIZE5 ((toolbox_c) 0x82A000Bu)
- #define fontdbox_STANDARD_SIZE6 ((toolbox_c) 0x82A000Cu)
- #define fontdbox_STANDARD_SIZE7 ((toolbox_c) 0x82A000Du)
- #define fontdbox_STANDARD_SIZE8 ((toolbox_c) 0x82A000Eu)
- #define fontdbox_STANDARD_SIZE9 ((toolbox_c) 0x82A000Fu)
- #define fontdbox_STYLE ((toolbox_c) 0x82A0010u)
- #define fontdbox_WEIGHT ((toolbox_c) 0x82A0011u)
- #define fontdbox_FONT ((toolbox_c) 0x82A0012u)
- #define action_FONT_DBOX_ABOUT_TO_BE_SHOWN 0x82A00u
- #define action_FONT_DBOX_DIALOGUE_COMPLETED 0x82A01u
- #define action_FONT_DBOX_APPLY_FONT 0x82A02u
- #define error_FONT_DBOX_TASKS_ACTIVE 0x80AF00u
- #define error_FONT_DBOX_ALLOC_FAILED 0x80AF01u
- #define error_FONT_DBOX_SHORT_BUFFER 0x80AF02u
- #define error_FONT_DBOX_NO_SUCH_TASK 0x80AF11u
- #define error_FONT_DBOX_NO_SUCH_METHOD 0x80AF12u
- #define error_FONT_DBOX_NO_SUCH_MISC_OP_METHOD 0x80AF13u
- #define error_FONT_DBOX_NO_SUCH_FONT 0x80AF14u
- #define error_FONT_DBOX_NO_FONTS 0x80AF21u
- #define error_FONT_DBOX_OUT_OF_MESSAGE_SPACE 0x80AF31u
-
- /*************************
- * Function declarations *
- *************************/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* ------------------------------------------------------------------------
- * Function: fontdbox_get_window_id()
- *
- * Description: Calls reason code 0 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_dbox - value of R1 on entry
- *
- * Output: window - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Before entry, R2 = 0x0.
- */
-
- extern os_error *xfontdbox_get_window_id (bits flags,
- toolbox_o font_dbox,
- toolbox_o *window);
- extern toolbox_o fontdbox_get_window_id (bits flags,
- toolbox_o font_dbox);
-
- /* ------------------------------------------------------------------------
- * Function: fontdbox_set_font()
- *
- * Description: Calls reason code 1 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_dbox - value of R1 on entry
- * font_identifier - value of R3 on entry
- *
- * Other notes: Before entry, R2 = 0x1.
- */
-
- extern os_error *xfontdbox_set_font (bits flags,
- toolbox_o font_dbox,
- char const *font_identifier);
- extern void fontdbox_set_font (bits flags,
- toolbox_o font_dbox,
- char const *font_identifier);
-
- /* ------------------------------------------------------------------------
- * Function: fontdbox_get_font()
- *
- * Description: Calls reason code 2 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_dbox - 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 = 0x2.
- */
-
- extern os_error *xfontdbox_get_font (bits flags,
- toolbox_o font_dbox,
- char *buffer,
- int size,
- int *used);
- extern int fontdbox_get_font (bits flags,
- toolbox_o font_dbox,
- char *buffer,
- int size);
-
- /* ------------------------------------------------------------------------
- * Function: fontdbox_set_size()
- *
- * Description: Calls reason code 3 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_dbox - value of R1 on entry
- * height - value of R3 on entry
- * aspect - value of R4 on entry
- *
- * Other notes: Before entry, R2 = 0x3.
- */
-
- extern os_error *xfontdbox_set_size (bits flags,
- toolbox_o font_dbox,
- int height,
- int aspect);
- extern void fontdbox_set_size (bits flags,
- toolbox_o font_dbox,
- int height,
- int aspect);
-
- /* ------------------------------------------------------------------------
- * Function: fontdbox_get_size()
- *
- * Description: Calls reason code 4 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_dbox - value of R1 on entry
- *
- * Output: height - value of R0 on exit
- * aspect - value of R1 on exit
- *
- * Other notes: Before entry, R2 = 0x4.
- */
-
- extern os_error *xfontdbox_get_size (bits flags,
- toolbox_o font_dbox,
- int *height,
- int *aspect);
- extern void fontdbox_get_size (bits flags,
- toolbox_o font_dbox,
- int *height,
- int *aspect);
-
- /* ------------------------------------------------------------------------
- * Function: fontdbox_set_try_string()
- *
- * Description: Calls reason code 5 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_dbox - value of R1 on entry
- * try_string - value of R3 on entry
- *
- * Other notes: Before entry, R2 = 0x5.
- */
-
- extern os_error *xfontdbox_set_try_string (bits flags,
- toolbox_o font_dbox,
- char const *try_string);
- extern void fontdbox_set_try_string (bits flags,
- toolbox_o font_dbox,
- char const *try_string);
-
- /* ------------------------------------------------------------------------
- * Function: fontdbox_get_try_string()
- *
- * Description: Calls reason code 6 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_dbox - 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 = 0x6.
- */
-
- extern os_error *xfontdbox_get_try_string (bits flags,
- toolbox_o font_dbox,
- char *buffer,
- int size,
- int *used);
- extern int fontdbox_get_try_string (bits flags,
- toolbox_o font_dbox,
- char *buffer,
- int size);
-
- /* ------------------------------------------------------------------------
- * Function: fontdbox_set_title()
- *
- * Description: Calls reason code 7 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_dbox - value of R1 on entry
- * title - value of R3 on entry
- *
- * Other notes: Before entry, R2 = 0x7.
- */
-
- extern os_error *xfontdbox_set_title (bits flags,
- toolbox_o font_dbox,
- char const *title);
- extern void fontdbox_set_title (bits flags,
- toolbox_o font_dbox,
- char const *title);
-
- /* ------------------------------------------------------------------------
- * Function: fontdbox_get_title()
- *
- * Description: Calls reason code 8 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * font_dbox - 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 = 0x8.
- */
-
- extern os_error *xfontdbox_get_title (bits flags,
- toolbox_o font_dbox,
- char *buffer,
- int size,
- int *used);
- extern int fontdbox_get_title (bits flags,
- toolbox_o font_dbox,
- char *buffer,
- int size);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-