home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / Toolbox / h / window < prev    next >
Encoding:
Text File  |  1995-09-06  |  27.9 KB  |  913 lines

  1. #ifndef window_H
  2. #define window_H
  3.  
  4. /* C header file for Window
  5.  * written by DefMod (Aug 30 1995) on Wed Sep  6 09:31:29 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd; Simon Middleton, Uniqueway Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef toolbox_H
  14. #include "toolbox.h"
  15. #endif
  16.  
  17. #ifndef keyboardshortcut_H
  18. #include "keyboardshortcut.h"
  19. #endif
  20.  
  21. #ifndef gadget_H
  22. #include "gadget.h"
  23. #endif
  24.  
  25. /**********************************
  26.  * SWI names and SWI reason codes *
  27.  **********************************/
  28. #undef  Window_ClassSWI
  29. #define Window_ClassSWI                         0x82880
  30. #undef  XWindow_ClassSWI
  31. #define XWindow_ClassSWI                        0xA2880
  32. #undef  Window_PostFilter
  33. #define Window_PostFilter                       0x82881
  34. #undef  XWindow_PostFilter
  35. #define XWindow_PostFilter                      0xA2881
  36. #undef  Window_PreFilter
  37. #define Window_PreFilter                        0x82882
  38. #undef  XWindow_PreFilter
  39. #define XWindow_PreFilter                       0xA2882
  40. #undef  Window_GetPointerInfo
  41. #define Window_GetPointerInfo                   0x82883
  42. #undef  XWindow_GetPointerInfo
  43. #define XWindow_GetPointerInfo                  0xA2883
  44. #undef  Window_WimpToToolbox
  45. #define Window_WimpToToolbox                    0x82884
  46. #undef  XWindow_WimpToToolbox
  47. #define XWindow_WimpToToolbox                   0xA2884
  48. #undef  Window_RegisterExternal
  49. #define Window_RegisterExternal                 0x82885
  50. #undef  XWindow_RegisterExternal
  51. #define XWindow_RegisterExternal                0xA2885
  52. #undef  Window_DeregisterExternal
  53. #define Window_DeregisterExternal               0x82886
  54. #undef  XWindow_DeregisterExternal
  55. #define XWindow_DeregisterExternal              0xA2886
  56. #undef  Window_ExtractGadgetInfo
  57. #define Window_ExtractGadgetInfo                0x828BE
  58. #undef  XWindow_ExtractGadgetInfo
  59. #define XWindow_ExtractGadgetInfo               0xA28BE
  60. #undef  Window_PlotGadget
  61. #define Window_PlotGadget                       0x828BF
  62. #undef  XWindow_PlotGadget
  63. #define XWindow_PlotGadget                      0xA28BF
  64. #undef  Window_GetWimpHandle
  65. #define Window_GetWimpHandle                    0x0
  66. #undef  Window_AddGadget
  67. #define Window_AddGadget                        0x1
  68. #undef  Window_RemoveGadget
  69. #define Window_RemoveGadget                     0x2
  70. #undef  Window_SetMenu
  71. #define Window_SetMenu                          0x3
  72. #undef  Window_GetMenu
  73. #define Window_GetMenu                          0x4
  74. #undef  Window_SetPointer
  75. #define Window_SetPointer                       0x5
  76. #undef  Window_GetPointer
  77. #define Window_GetPointer                       0x6
  78. #undef  Window_SetHelpMessage
  79. #define Window_SetHelpMessage                   0x7
  80. #undef  Window_GetHelpMessage
  81. #define Window_GetHelpMessage                   0x8
  82. #undef  Window_AddKeyboardShortcuts
  83. #define Window_AddKeyboardShortcuts             0x9
  84. #undef  Window_RemoveKeyboardShortcuts
  85. #define Window_RemoveKeyboardShortcuts          0xA
  86. #undef  Window_SetTitle
  87. #define Window_SetTitle                         0xB
  88. #undef  Window_GetTitle
  89. #define Window_GetTitle                         0xC
  90. #undef  Window_SetDefaultFocus
  91. #define Window_SetDefaultFocus                  0xD
  92. #undef  Window_GetDefaultFocus
  93. #define Window_GetDefaultFocus                  0xE
  94. #undef  Window_SetExtent
  95. #define Window_SetExtent                        0xF
  96. #undef  Window_GetExtent
  97. #define Window_GetExtent                        0x10
  98. #undef  Window_ForceRedraw
  99. #define Window_ForceRedraw                      0x11
  100. #undef  Window_SetToolBars
  101. #define Window_SetToolBars                      0x12
  102. #undef  Window_GetToolBars
  103. #define Window_GetToolBars                      0x13
  104. #undef  Service_WindowModuleStarting
  105. #define Service_WindowModuleStarting            0x82881
  106. #undef  Service_WindowModuleDying
  107. #define Service_WindowModuleDying               0x82882
  108. #undef  Service_GadgetRegistered
  109. #define Service_GadgetRegistered                0x82883
  110. #undef  Service_GadgetDeregistered
  111. #define Service_GadgetDeregistered              0x82884
  112.  
  113. /************************************
  114.  * Structure and union declarations *
  115.  ************************************/
  116. typedef union  window_icon_data                 window_icon_data;
  117. typedef struct window_window                    window_window;
  118. typedef struct window_object                    window_object;
  119. typedef struct window_action_show_object        window_action_show_object;
  120. typedef struct window_action_about_to_be_shown  window_action_about_to_be_shown;
  121.  
  122. /********************
  123.  * Type definitions *
  124.  ********************/
  125. typedef bits window_flags;
  126.  
  127. typedef bits window_gadget_flags;
  128.  
  129. union window_icon_data
  130.    {  struct
  131.       {  toolbox_msg_reference text;
  132.          toolbox_string_reference validation;
  133.          int size;
  134.       }
  135.       indirected_text;
  136.    };
  137.  
  138. /* ------------------------------------------------------------------------
  139.  * Type:          window_window
  140.  *
  141.  * Description:   A Wimp window structure with no icons and specialised title data
  142.  *
  143.  * Fields:        icon_count - Must be 0
  144.  */
  145.  
  146. struct window_window
  147.    {  os_box visible;
  148.       int xscroll;
  149.       int yscroll;
  150.       wimp_w next;
  151.       wimp_window_flags flags;
  152.       wimp_colour title_fg;
  153.       wimp_colour title_bg;
  154.       wimp_colour work_fg;
  155.       wimp_colour work_bg;
  156.       wimp_colour scroll_outer;
  157.       wimp_colour scroll_inner;
  158.       wimp_colour highlight_bg;
  159.       wimp_colour reserved;
  160.       os_box extent;
  161.       wimp_icon_flags title_flags;
  162.       wimp_icon_flags work_flags;
  163.       toolbox_sprite_area_reference sprite_area;
  164.       short xmin;
  165.       short ymin;
  166.       window_icon_data title_data;
  167.       int icon_count;
  168.    };
  169.  
  170. struct window_object
  171.    {  window_flags flags;
  172.       toolbox_msg_reference help_message;
  173.       int help_limit;
  174.       toolbox_string_reference sprite_name;
  175.       int pointer_limit;
  176.       os_coord hotspot;
  177.       toolbox_string_reference menu_name;
  178.       int shortcut_count;
  179.       toolbox_object_offset shortcuts;
  180.       int gadget_count;
  181.       toolbox_object_offset gadgets;
  182.       toolbox_c default_focus;
  183.       bits show_action;
  184.       bits hide_action;
  185.       toolbox_string_reference toolbar_ibl;
  186.       toolbox_string_reference toolbar_itl;
  187.       toolbox_string_reference toolbar_ebl;
  188.       toolbox_string_reference toolbar_etl;
  189.       window_window window;
  190.       int data [UNKNOWN];
  191.    };
  192.  
  193. #define window_OBJECT(N) \
  194.    struct \
  195.       {  window_flags flags; \
  196.          toolbox_msg_reference help_message; \
  197.          int help_limit; \
  198.          toolbox_string_reference sprite_name; \
  199.          int pointer_limit; \
  200.          os_coord hotspot; \
  201.          toolbox_string_reference menu_name; \
  202.          int shortcut_count; \
  203.          toolbox_object_offset shortcuts; \
  204.          int gadget_count; \
  205.          toolbox_object_offset gadgets; \
  206.          toolbox_c default_focus; \
  207.          bits show_action; \
  208.          bits hide_action; \
  209.          toolbox_string_reference toolbar_ibl; \
  210.          toolbox_string_reference toolbar_itl; \
  211.          toolbox_string_reference toolbar_ebl; \
  212.          toolbox_string_reference toolbar_etl; \
  213.          window_window window; \
  214.          int data [N]; \
  215.       }
  216.  
  217. #define window_SIZEOF_OBJECT(N) \
  218.    (offsetof (window_object, data) + \
  219.          (N)*sizeof ((window_object *) NULL)->data)
  220.  
  221. typedef toolbox_full window_full;
  222.  
  223. struct window_action_show_object
  224.    {  os_box visible;
  225.       int xscroll;
  226.       int yscroll;
  227.       wimp_w next;
  228.    };
  229.  
  230. struct window_action_about_to_be_shown
  231.    {  toolbox_position_tag tag;
  232.       union
  233.       {  os_coord top_left;
  234.          window_full full;
  235.       }
  236.       position;
  237.    };
  238.  
  239. typedef bits window_tool_bar_flags;
  240.  
  241. typedef bits window_mouse_state;
  242.  
  243. /************************
  244.  * Constant definitions *
  245.  ************************/
  246. #define class_WINDOW                            ((toolbox_class) 0x82880u)
  247. #define error_WINDOW_ALLOC_FAILED               0x80A901u
  248. #define error_WINDOW_SHORT_BUFFER               0x80A902u
  249. #define error_WINDOW_BAD_VERSION                0x80A903u
  250. #define error_WINDOW_INVALID_FLAGS              0x80A904u
  251. #define error_WINDOW_TASKS_ACTIVE               0x80A905u
  252. #define error_WINDOW_NO_SUCH_TASK               0x80A911u
  253. #define error_WINDOW_NO_SUCH_METHOD             0x80A912u
  254. #define error_WINDOW_NO_SUCH_MISC_OP_METHOD     0x80A913u
  255. #define error_WINDOW_INVALID_COMPONENT_ID       0x80A914u
  256. #define error_WINDOW_DUPLICATE_COMPONENT_ID     0x80A915u
  257. #define error_WINDOW_INVALID_GADGET_TYPE        0x80A920u
  258. #define window_GENERATE_ABOUT_TO_BE_SHOWN       ((window_flags) 0x1u)
  259. #define window_AUTO_OPEN                        ((window_flags) 0x2u)
  260. #define window_AUTO_CLOSE                       ((window_flags) 0x4u)
  261. #define window_GENERATE_DIALOGUE_COMPLETED      ((window_flags) 0x8u)
  262. #define window_IS_TOOL_BAR                      ((window_flags) 0x10u)
  263. #define window_NO_FOCUS                         (-1)
  264. #define window_SET_FOCUS_TO_WINDOW              (-2)
  265. #define action_WINDOW_ABOUT_TO_BE_SHOWN         0x82880u
  266. #define action_WINDOW_DIALOGUE_COMPLETED        0x82890u
  267. #define window_TOOL_BAR_IBL                     ((window_tool_bar_flags) 0x1u)
  268. #define window_TOOL_BAR_ITL                     ((window_tool_bar_flags) 0x2u)
  269. #define window_TOOL_BAR_EBL                     ((window_tool_bar_flags) 0x4u)
  270. #define window_TOOL_BAR_ETL                     ((window_tool_bar_flags) 0x8u)
  271. #define window_CLICK_ADJUST                     ((window_mouse_state) 0x1u)
  272. #define window_CLICK_MENU                       ((window_mouse_state) 0x2u)
  273. #define window_CLICK_SELECT                     ((window_mouse_state) 0x4u)
  274. #define window_CLICK_NOT_TOOLBOX                ((window_mouse_state) 0x100u)
  275.  
  276. /*************************
  277.  * Function declarations *
  278.  *************************/
  279.  
  280. #ifdef __cplusplus
  281.    extern "C" {
  282. #endif
  283.  
  284. /* ------------------------------------------------------------------------
  285.  * Function:      window_get_pointer_info()
  286.  *
  287.  * Description:   Calls SWI 0x82883
  288.  *
  289.  * Input:         flags - value of R0 on entry
  290.  *
  291.  * Output:        x - value of R0 on exit
  292.  *                y - value of R1 on exit
  293.  *                state - value of R2 on exit
  294.  *                obj - value of R3 on exit
  295.  *                cmp - value of R4 on exit
  296.  */
  297.  
  298. extern os_error *xwindow_get_pointer_info (bits flags,
  299.       int *x,
  300.       int *y,
  301.       window_mouse_state *state,
  302.       toolbox_o *obj,
  303.       toolbox_c *cmp);
  304. extern void window_get_pointer_info (bits flags,
  305.       int *x,
  306.       int *y,
  307.       window_mouse_state *state,
  308.       toolbox_o *obj,
  309.       toolbox_c *cmp);
  310.  
  311. /* ------------------------------------------------------------------------
  312.  * Function:      window_wimp_to_toolbox()
  313.  *
  314.  * Description:   Calls SWI 0x82884
  315.  *
  316.  * Input:         flags - value of R0 on entry
  317.  *                w - value of R1 on entry
  318.  *                i - value of R2 on entry
  319.  *
  320.  * Output:        obj - value of R0 on exit
  321.  *                cmp - value of R1 on exit
  322.  */
  323.  
  324. extern os_error *xwindow_wimp_to_toolbox (bits flags,
  325.       wimp_w w,
  326.       wimp_i i,
  327.       toolbox_o *obj,
  328.       toolbox_c *cmp);
  329. extern void window_wimp_to_toolbox (bits flags,
  330.       wimp_w w,
  331.       wimp_i i,
  332.       toolbox_o *obj,
  333.       toolbox_c *cmp);
  334.  
  335. /* ------------------------------------------------------------------------
  336.  * Function:      window_register_external()
  337.  *
  338.  * Description:   Registers one or more gadgets with the window module
  339.  *
  340.  * Input:         flags - value of R0 on entry
  341.  *                types - value of R1 on entry
  342.  *                handler_swi_number - value of R2 on entry
  343.  *
  344.  * Other notes:   Calls SWI 0x82885.
  345.  */
  346.  
  347. extern os_error *xwindow_register_external (bits flags,
  348.       gadget_extension_list const *types,
  349.       int handler_swi_number);
  350. __swi (0x82885) void window_register_external (bits flags,
  351.       gadget_extension_list const *types,
  352.       int handler_swi_number);
  353.  
  354. /* ------------------------------------------------------------------------
  355.  * Function:      window_deregister_external()
  356.  *
  357.  * Description:   Deregisters a gadget from the window module
  358.  *
  359.  * Input:         flags - value of R0 on entry
  360.  *                type - value of R1 on entry
  361.  *                handler_swi_number - value of R2 on entry
  362.  *
  363.  * Other notes:   Calls SWI 0x82886.
  364.  */
  365.  
  366. extern os_error *xwindow_deregister_external (bits flags,
  367.       int type,
  368.       int handler_swi_number);
  369. __swi (0x82886) void window_deregister_external (bits flags,
  370.       int type,
  371.       int handler_swi_number);
  372.  
  373. /* ------------------------------------------------------------------------
  374.  * Function:      window_extract_gadget_info()
  375.  *
  376.  * Description:   Calls SWI 0x828BE
  377.  *
  378.  * Input:         flags - value of R0 on entry
  379.  *                object - value of R1 on entry
  380.  *                cmp - value of R2 on entry
  381.  *
  382.  * Output:        gadget - value of R0 on exit (X version only)
  383.  *                size - value of R1 on exit
  384.  *
  385.  * Returns:       R0 (non-X version only)
  386.  */
  387.  
  388. extern os_error *xwindow_extract_gadget_info (bits flags,
  389.       window_object const *object,
  390.       toolbox_c cmp,
  391.       gadget_object **gadget,
  392.       int *size);
  393. extern gadget_object *window_extract_gadget_info (bits flags,
  394.       window_object const *object,
  395.       toolbox_c cmp,
  396.       int *size);
  397.  
  398. /* ------------------------------------------------------------------------
  399.  * Function:      window_get_wimp_handle()
  400.  *
  401.  * Description:   Calls reason code 0 of SWI 0x44EC6
  402.  *
  403.  * Input:         flags - value of R0 on entry
  404.  *                window - value of R1 on entry
  405.  *
  406.  * Output:        w - value of R0 on exit (X version only)
  407.  *
  408.  * Returns:       R0 (non-X version only)
  409.  *
  410.  * Other notes:   Before entry, R2 = 0x0.
  411.  */
  412.  
  413. extern os_error *xwindow_get_wimp_handle (bits flags,
  414.       toolbox_o window,
  415.       wimp_w *w);
  416. extern wimp_w window_get_wimp_handle (bits flags,
  417.       toolbox_o window);
  418.  
  419. /* ------------------------------------------------------------------------
  420.  * Function:      window_add_gadget()
  421.  *
  422.  * Description:   Calls reason code 1 of SWI 0x44EC6
  423.  *
  424.  * Input:         flags - value of R0 on entry
  425.  *                window - value of R1 on entry
  426.  *                object - value of R3 on entry
  427.  *
  428.  * Output:        gadget - value of R0 on exit (X version only)
  429.  *
  430.  * Returns:       R0 (non-X version only)
  431.  *
  432.  * Other notes:   Before entry, R2 = 0x1.
  433.  */
  434.  
  435. extern os_error *xwindow_add_gadget (bits flags,
  436.       toolbox_o window,
  437.       gadget_object const *object,
  438.       toolbox_c *gadget);
  439. extern toolbox_c window_add_gadget (bits flags,
  440.       toolbox_o window,
  441.       gadget_object const *object);
  442.  
  443. /* ------------------------------------------------------------------------
  444.  * Function:      window_remove_gadget()
  445.  *
  446.  * Description:   Calls reason code 2 of SWI 0x44EC6
  447.  *
  448.  * Input:         flags - value of R0 on entry
  449.  *                window - value of R1 on entry
  450.  *                gadget - value of R3 on entry
  451.  *
  452.  * Other notes:   Before entry, R2 = 0x2.
  453.  */
  454.  
  455. extern os_error *xwindow_remove_gadget (bits flags,
  456.       toolbox_o window,
  457.       toolbox_c gadget);
  458. extern void window_remove_gadget (bits flags,
  459.       toolbox_o window,
  460.       toolbox_c gadget);
  461.  
  462. /* ------------------------------------------------------------------------
  463.  * Function:      window_set_menu()
  464.  *
  465.  * Description:   Calls reason code 3 of SWI 0x44EC6
  466.  *
  467.  * Input:         flags - value of R0 on entry
  468.  *                window - value of R1 on entry
  469.  *                menu - value of R3 on entry
  470.  *
  471.  * Other notes:   Before entry, R2 = 0x3.
  472.  */
  473.  
  474. extern os_error *xwindow_set_menu (bits flags,
  475.       toolbox_o window,
  476.       toolbox_o menu);
  477. extern void window_set_menu (bits flags,
  478.       toolbox_o window,
  479.       toolbox_o menu);
  480.  
  481. /* ------------------------------------------------------------------------
  482.  * Function:      window_get_menu()
  483.  *
  484.  * Description:   Calls reason code 4 of SWI 0x44EC6
  485.  *
  486.  * Input:         flags - value of R0 on entry
  487.  *                window - value of R1 on entry
  488.  *
  489.  * Output:        menu - value of R0 on exit (X version only)
  490.  *
  491.  * Returns:       R0 (non-X version only)
  492.  *
  493.  * Other notes:   Before entry, R2 = 0x4.
  494.  */
  495.  
  496. extern os_error *xwindow_get_menu (bits flags,
  497.       toolbox_o window,
  498.       toolbox_o *menu);
  499. extern toolbox_o window_get_menu (bits flags,
  500.       toolbox_o window);
  501.  
  502. /* ------------------------------------------------------------------------
  503.  * Function:      window_set_pointer()
  504.  *
  505.  * Description:   Calls reason code 5 of SWI 0x44EC6
  506.  *
  507.  * Input:         flags - value of R0 on entry
  508.  *                window - value of R1 on entry
  509.  *                sprite_name - value of R3 on entry
  510.  *                xhotspot - value of R4 on entry
  511.  *                yhotspot - value of R5 on entry
  512.  *
  513.  * Other notes:   Before entry, R2 = 0x5.
  514.  */
  515.  
  516. extern os_error *xwindow_set_pointer (bits flags,
  517.       toolbox_o window,
  518.       char const *sprite_name,
  519.       int xhotspot,
  520.       int yhotspot);
  521. extern void window_set_pointer (bits flags,
  522.       toolbox_o window,
  523.       char const *sprite_name,
  524.       int xhotspot,
  525.       int yhotspot);
  526.  
  527. /* ------------------------------------------------------------------------
  528.  * Function:      window_get_pointer()
  529.  *
  530.  * Description:   Calls reason code 6 of SWI 0x44EC6
  531.  *
  532.  * Input:         flags - value of R0 on entry
  533.  *                window - value of R1 on entry
  534.  *                buffer - value of R3 on entry
  535.  *                size - value of R4 on entry
  536.  *
  537.  * Output:        used - value of R4 on exit (X version only)
  538.  *                xhotspot - value of R5 on exit
  539.  *                yhotspot - value of R6 on exit
  540.  *
  541.  * Returns:       R4 (non-X version only)
  542.  *
  543.  * Other notes:   Before entry, R2 = 0x6.
  544.  */
  545.  
  546. extern os_error *xwindow_get_pointer (bits flags,
  547.       toolbox_o window,
  548.       char *buffer,
  549.       int size,
  550.       int *used,
  551.       int *xhotspot,
  552.       int *yhotspot);
  553. extern int window_get_pointer (bits flags,
  554.       toolbox_o window,
  555.       char *buffer,
  556.       int size,
  557.       int *xhotspot,
  558.       int *yhotspot);
  559.  
  560. /* ------------------------------------------------------------------------
  561.  * Function:      window_set_help_message()
  562.  *
  563.  * Description:   Calls reason code 7 of SWI 0x44EC6
  564.  *
  565.  * Input:         flags - value of R0 on entry
  566.  *                window - value of R1 on entry
  567.  *                help - value of R3 on entry
  568.  *
  569.  * Other notes:   Before entry, R2 = 0x7.
  570.  */
  571.  
  572. extern os_error *xwindow_set_help_message (bits flags,
  573.       toolbox_o window,
  574.       char const *help);
  575. extern void window_set_help_message (bits flags,
  576.       toolbox_o window,
  577.       char const *help);
  578.  
  579. /* ------------------------------------------------------------------------
  580.  * Function:      window_get_help_message()
  581.  *
  582.  * Description:   Calls reason code 8 of SWI 0x44EC6
  583.  *
  584.  * Input:         flags - value of R0 on entry
  585.  *                window - value of R1 on entry
  586.  *                buffer - value of R3 on entry
  587.  *                size - value of R4 on entry
  588.  *
  589.  * Output:        used - value of R4 on exit (X version only)
  590.  *
  591.  * Returns:       R4 (non-X version only)
  592.  *
  593.  * Other notes:   Before entry, R2 = 0x8.
  594.  */
  595.  
  596. extern os_error *xwindow_get_help_message (bits flags,
  597.       toolbox_o window,
  598.       char *buffer,
  599.       int size,
  600.       int *used);
  601. extern int window_get_help_message (bits flags,
  602.       toolbox_o window,
  603.       char *buffer,
  604.       int size);
  605.  
  606. /* ------------------------------------------------------------------------
  607.  * Function:      window_add_keyboard_shortcuts()
  608.  *
  609.  * Description:   Calls reason code 9 of SWI 0x44EC6
  610.  *
  611.  * Input:         flags - value of R0 on entry
  612.  *                window - value of R1 on entry
  613.  *                add_count - value of R3 on entry
  614.  *                shortcuts - value of R4 on entry
  615.  *
  616.  * Other notes:   Before entry, R2 = 0x9.
  617.  */
  618.  
  619. extern os_error *xwindow_add_keyboard_shortcuts (bits flags,
  620.       toolbox_o window,
  621.       int add_count,
  622.       keyboardshortcut_object const *shortcuts);
  623. extern void window_add_keyboard_shortcuts (bits flags,
  624.       toolbox_o window,
  625.       int add_count,
  626.       keyboardshortcut_object const *shortcuts);
  627.  
  628. /* ------------------------------------------------------------------------
  629.  * Function:      window_remove_keyboard_shortcuts()
  630.  *
  631.  * Description:   Calls reason code 10 of SWI 0x44EC6
  632.  *
  633.  * Input:         flags - value of R0 on entry
  634.  *                window - value of R1 on entry
  635.  *                remove_count - value of R3 on entry
  636.  *                shortcuts - value of R4 on entry
  637.  *
  638.  * Other notes:   Before entry, R2 = 0xA.
  639.  */
  640.  
  641. extern os_error *xwindow_remove_keyboard_shortcuts (bits flags,
  642.       toolbox_o window,
  643.       int remove_count,
  644.       keyboardshortcut_object const *shortcuts);
  645. extern void window_remove_keyboard_shortcuts (bits flags,
  646.       toolbox_o window,
  647.       int remove_count,
  648.       keyboardshortcut_object const *shortcuts);
  649.  
  650. /* ------------------------------------------------------------------------
  651.  * Function:      window_set_title()
  652.  *
  653.  * Description:   Calls reason code 11 of SWI 0x44EC6
  654.  *
  655.  * Input:         flags - value of R0 on entry
  656.  *                window - value of R1 on entry
  657.  *                title - value of R3 on entry
  658.  *
  659.  * Other notes:   Before entry, R2 = 0xB.
  660.  */
  661.  
  662. extern os_error *xwindow_set_title (bits flags,
  663.       toolbox_o window,
  664.       char const *title);
  665. extern void window_set_title (bits flags,
  666.       toolbox_o window,
  667.       char const *title);
  668.  
  669. /* ------------------------------------------------------------------------
  670.  * Function:      window_get_title()
  671.  *
  672.  * Description:   Calls reason code 12 of SWI 0x44EC6
  673.  *
  674.  * Input:         flags - value of R0 on entry
  675.  *                window - value of R1 on entry
  676.  *                buffer - value of R3 on entry
  677.  *                size - value of R4 on entry
  678.  *
  679.  * Output:        used - value of R4 on exit (X version only)
  680.  *
  681.  * Returns:       R4 (non-X version only)
  682.  *
  683.  * Other notes:   Before entry, R2 = 0xC.
  684.  */
  685.  
  686. extern os_error *xwindow_get_title (bits flags,
  687.       toolbox_o window,
  688.       char *buffer,
  689.       int size,
  690.       int *used);
  691. extern int window_get_title (bits flags,
  692.       toolbox_o window,
  693.       char *buffer,
  694.       int size);
  695.  
  696. /* ------------------------------------------------------------------------
  697.  * Function:      window_set_default_focus()
  698.  *
  699.  * Description:   Calls reason code 13 of SWI 0x44EC6
  700.  *
  701.  * Input:         flags - value of R0 on entry
  702.  *                window - value of R1 on entry
  703.  *                focus - value of R3 on entry
  704.  *
  705.  * Other notes:   Before entry, R2 = 0xD.
  706.  */
  707.  
  708. extern os_error *xwindow_set_default_focus (bits flags,
  709.       toolbox_o window,
  710.       toolbox_c focus);
  711. extern void window_set_default_focus (bits flags,
  712.       toolbox_o window,
  713.       toolbox_c focus);
  714.  
  715. /* ------------------------------------------------------------------------
  716.  * Function:      window_get_default_focus()
  717.  *
  718.  * Description:   Calls reason code 14 of SWI 0x44EC6
  719.  *
  720.  * Input:         flags - value of R0 on entry
  721.  *                window - value of R1 on entry
  722.  *
  723.  * Output:        focus - value of R0 on exit (X version only)
  724.  *
  725.  * Returns:       R0 (non-X version only)
  726.  *
  727.  * Other notes:   Before entry, R2 = 0xE.
  728.  */
  729.  
  730. extern os_error *xwindow_get_default_focus (bits flags,
  731.       toolbox_o window,
  732.       toolbox_c *focus);
  733. extern toolbox_c window_get_default_focus (bits flags,
  734.       toolbox_o window);
  735.  
  736. /* ------------------------------------------------------------------------
  737.  * Function:      window_set_extent()
  738.  *
  739.  * Description:   Calls reason code 15 of SWI 0x44EC6
  740.  *
  741.  * Input:         flags - value of R0 on entry
  742.  *                window - value of R1 on entry
  743.  *                extent - value of R3 on entry
  744.  *
  745.  * Other notes:   Before entry, R2 = 0xF.
  746.  */
  747.  
  748. extern os_error *xwindow_set_extent (bits flags,
  749.       toolbox_o window,
  750.       os_box const *extent);
  751. extern void window_set_extent (bits flags,
  752.       toolbox_o window,
  753.       os_box const *extent);
  754.  
  755. /* ------------------------------------------------------------------------
  756.  * Function:      window_get_extent()
  757.  *
  758.  * Description:   Calls reason code 16 of SWI 0x44EC6
  759.  *
  760.  * Input:         flags - value of R0 on entry
  761.  *                window - value of R1 on entry
  762.  *                extent - value of R3 on entry
  763.  *
  764.  * Other notes:   Before entry, R2 = 0x10.
  765.  */
  766.  
  767. extern os_error *xwindow_get_extent (bits flags,
  768.       toolbox_o window,
  769.       os_box *extent);
  770. extern void window_get_extent (bits flags,
  771.       toolbox_o window,
  772.       os_box *extent);
  773.  
  774. /* ------------------------------------------------------------------------
  775.  * Function:      window_force_redraw()
  776.  *
  777.  * Description:   Calls reason code 17 of SWI 0x44EC6
  778.  *
  779.  * Input:         flags - value of R0 on entry
  780.  *                window - value of R1 on entry
  781.  *                redraw - value of R3 on entry
  782.  *
  783.  * Other notes:   Before entry, R2 = 0x11.
  784.  */
  785.  
  786. extern os_error *xwindow_force_redraw (bits flags,
  787.       toolbox_o window,
  788.       os_box const *redraw);
  789. extern void window_force_redraw (bits flags,
  790.       toolbox_o window,
  791.       os_box const *redraw);
  792.  
  793. /* ------------------------------------------------------------------------
  794.  * Function:      window_set_tool_bars()
  795.  *
  796.  * Description:   Calls reason code 18 of SWI 0x44EC6
  797.  *
  798.  * Input:         flags - value of R0 on entry
  799.  *                window - value of R1 on entry
  800.  *                ibl - value of R3 on entry
  801.  *                itl - value of R4 on entry
  802.  *                ebl - value of R5 on entry
  803.  *                etl - value of R6 on entry
  804.  *
  805.  * Other notes:   Before entry, R2 = 0x12.
  806.  */
  807.  
  808. extern os_error *xwindow_set_tool_bars (window_tool_bar_flags flags,
  809.       toolbox_o window,
  810.       toolbox_o ibl,
  811.       toolbox_o itl,
  812.       toolbox_o ebl,
  813.       toolbox_o etl);
  814. extern void window_set_tool_bars (window_tool_bar_flags flags,
  815.       toolbox_o window,
  816.       toolbox_o ibl,
  817.       toolbox_o itl,
  818.       toolbox_o ebl,
  819.       toolbox_o etl);
  820.  
  821. /* ------------------------------------------------------------------------
  822.  * Function:      window_get_tool_bars()
  823.  *
  824.  * Description:   Calls reason code 19 of SWI 0x44EC6
  825.  *
  826.  * Input:         flags - value of R0 on entry
  827.  *                window - value of R1 on entry
  828.  *
  829.  * Output:        ibl - value of R0 on exit
  830.  *                itl - value of R1 on exit
  831.  *                ebl - value of R2 on exit
  832.  *                etl - value of R3 on exit
  833.  *
  834.  * Other notes:   Before entry, R2 = 0x13.
  835.  */
  836.  
  837. extern os_error *xwindow_get_tool_bars (window_tool_bar_flags flags,
  838.       toolbox_o window,
  839.       toolbox_o *ibl,
  840.       toolbox_o *itl,
  841.       toolbox_o *ebl,
  842.       toolbox_o *etl);
  843. extern void window_get_tool_bars (window_tool_bar_flags flags,
  844.       toolbox_o window,
  845.       toolbox_o *ibl,
  846.       toolbox_o *itl,
  847.       toolbox_o *ebl,
  848.       toolbox_o *etl);
  849.  
  850. /* ------------------------------------------------------------------------
  851.  * Function:      service_window_module_starting()
  852.  *
  853.  * Description:   Window module has started and is ready to receive SWI
  854.  *                calls
  855.  *
  856.  * Other notes:   Calls SWI 0x30 with R1 = 0x82881.
  857.  */
  858.  
  859. extern os_error *xservice_window_module_starting (void);
  860. extern void service_window_module_starting (void);
  861.  
  862. /* ------------------------------------------------------------------------
  863.  * Function:      service_window_module_dying()
  864.  *
  865.  * Description:   Window module is closing down
  866.  *
  867.  * Other notes:   Calls SWI 0x30 with R1 = 0x82882.
  868.  */
  869.  
  870. extern os_error *xservice_window_module_dying (void);
  871. extern void service_window_module_dying (void);
  872.  
  873. /* ------------------------------------------------------------------------
  874.  * Function:      service_gadget_registered()
  875.  *
  876.  * Description:   Gadget type has been registered
  877.  *
  878.  * Input:         type - value of R0 on entry
  879.  *                handler_swi_number - value of R2 on entry
  880.  *                feature_mask - value of R3 on entry
  881.  *
  882.  * Other notes:   Calls SWI 0x30 with R1 = 0x82883.
  883.  */
  884.  
  885. extern os_error *xservice_gadget_registered (int type,
  886.       int handler_swi_number,
  887.       bits feature_mask);
  888. extern void service_gadget_registered (int type,
  889.       int handler_swi_number,
  890.       bits feature_mask);
  891.  
  892. /* ------------------------------------------------------------------------
  893.  * Function:      service_gadget_deregistered()
  894.  *
  895.  * Description:   Gadget type has been deregistered
  896.  *
  897.  * Input:         type - value of R0 on entry
  898.  *                handler_swi_number - value of R2 on entry
  899.  *
  900.  * Other notes:   Calls SWI 0x30 with R1 = 0x82884.
  901.  */
  902.  
  903. extern os_error *xservice_gadget_deregistered (int type,
  904.       int handler_swi_number);
  905. extern void service_gadget_deregistered (int type,
  906.       int handler_swi_number);
  907.  
  908. #ifdef __cplusplus
  909.    }
  910. #endif
  911.  
  912. #endif
  913.