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

  1. #ifndef menu_H
  2. #define menu_H
  3.  
  4. /* C header file for Menu
  5.  * written by DefMod (Aug 30 1995) on Tue Sep  5 15:14:16 1995
  6.  * Jonathan Coxhead, Acorn Computers 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. /**********************************
  18.  * SWI names and SWI reason codes *
  19.  **********************************/
  20. #undef  Menu_ClassSWI
  21. #define Menu_ClassSWI                           0x828C0
  22. #undef  XMenu_ClassSWI
  23. #define XMenu_ClassSWI                          0xA28C0
  24. #undef  Menu_PostFilter
  25. #define Menu_PostFilter                         0x828C1
  26. #undef  XMenu_PostFilter
  27. #define XMenu_PostFilter                        0xA28C1
  28. #undef  Menu_PreFilter
  29. #define Menu_PreFilter                          0x828C2
  30. #undef  XMenu_PreFilter
  31. #define XMenu_PreFilter                         0xA28C2
  32. #undef  Menu_UpdateTree
  33. #define Menu_UpdateTree                         0x828C3
  34. #undef  XMenu_UpdateTree
  35. #define XMenu_UpdateTree                        0xA28C3
  36. #undef  Menu_SetTick
  37. #define Menu_SetTick                            0x0
  38. #undef  Menu_GetTick
  39. #define Menu_GetTick                            0x1
  40. #undef  Menu_SetFade
  41. #define Menu_SetFade                            0x2
  42. #undef  Menu_GetFade
  43. #define Menu_GetFade                            0x3
  44. #undef  Menu_SetEntryText
  45. #define Menu_SetEntryText                       0x4
  46. #undef  Menu_GetEntryText
  47. #define Menu_GetEntryText                       0x5
  48. #undef  Menu_SetEntrySprite
  49. #define Menu_SetEntrySprite                     0x6
  50. #undef  Menu_GetEntrySprite
  51. #define Menu_GetEntrySprite                     0x7
  52. #undef  Menu_SetSubMenuShow
  53. #define Menu_SetSubMenuShow                     0x8
  54. #undef  Menu_GetSubMenuShow
  55. #define Menu_GetSubMenuShow                     0x9
  56. #undef  Menu_SetSubMenuAction
  57. #define Menu_SetSubMenuAction                   0xA
  58. #undef  Menu_GetSubMenuAction
  59. #define Menu_GetSubMenuAction                   0xB
  60. #undef  Menu_SetClickShow
  61. #define Menu_SetClickShow                       0xC
  62. #undef  Menu_GetClickShow
  63. #define Menu_GetClickShow                       0xD
  64. #undef  Menu_SetClickAction
  65. #define Menu_SetClickAction                     0xE
  66. #undef  Menu_GetClickAction
  67. #define Menu_GetClickAction                     0xF
  68. #undef  Menu_SetHelpMessage
  69. #define Menu_SetHelpMessage                     0x10
  70. #undef  Menu_GetHelpMessage
  71. #define Menu_GetHelpMessage                     0x11
  72. #undef  Menu_SetEntryHelpMessage
  73. #define Menu_SetEntryHelpMessage                0x12
  74. #undef  Menu_GetEntryHelpMessage
  75. #define Menu_GetEntryHelpMessage                0x13
  76. #undef  Menu_AddEntry
  77. #define Menu_AddEntry                           0x14
  78. #undef  Menu_RemoveEntry
  79. #define Menu_RemoveEntry                        0x15
  80. #undef  Menu_GetHeight
  81. #define Menu_GetHeight                          0x16
  82. #undef  Menu_GetWidth
  83. #define Menu_GetWidth                           0x17
  84. #undef  Menu_SetTitle
  85. #define Menu_SetTitle                           0x18
  86. #undef  Menu_GetTitle
  87. #define Menu_GetTitle                           0x19
  88.  
  89. /************************************
  90.  * Structure and union declarations *
  91.  ************************************/
  92. typedef struct menu_entry_object                menu_entry_object;
  93. typedef struct menu_object                      menu_object;
  94. typedef struct menu_action_about_to_be_shown    menu_action_about_to_be_shown;
  95. typedef struct menu_action_sub_menu             menu_action_sub_menu;
  96.  
  97. /********************
  98.  * Type definitions *
  99.  ********************/
  100. typedef bits menu_flags;
  101.  
  102. typedef bits menu_entry_flags;
  103.  
  104. struct menu_entry_object
  105.    {  menu_entry_flags flags;
  106.       toolbox_c cmp;
  107.       toolbox_msg_reference text;
  108.       int text_limit;
  109.       toolbox_string_reference click_object_name;
  110.       toolbox_string_reference sub_menu_object_name;
  111.       bits sub_menu_action;
  112.       bits click_action;
  113.       toolbox_msg_reference help;
  114.       int help_limit;
  115.    };
  116.  
  117. struct menu_object
  118.    {  menu_flags flags;
  119.       toolbox_msg_reference title;
  120.       int title_limit;
  121.       toolbox_msg_reference help;
  122.       int help_limit;
  123.       bits show_action;
  124.       bits hide_action;
  125.       int entry_count;
  126.       menu_entry_object entries [UNKNOWN];
  127.    };
  128.  
  129. #define menu_OBJECT(N) \
  130.    struct \
  131.       {  menu_flags flags; \
  132.          toolbox_msg_reference title; \
  133.          int title_limit; \
  134.          toolbox_msg_reference help; \
  135.          int help_limit; \
  136.          bits show_action; \
  137.          bits hide_action; \
  138.          int entry_count; \
  139.          menu_entry_object entries [N]; \
  140.       }
  141.  
  142. #define menu_SIZEOF_OBJECT(N) \
  143.    (offsetof (menu_object, entries) + \
  144.          (N)*sizeof ((menu_object *) NULL)->entries)
  145.  
  146. typedef os_coord menu_full;
  147.  
  148. struct menu_action_about_to_be_shown
  149.    {  toolbox_position_tag tag;
  150.       union
  151.       {  os_coord top_left;
  152.          menu_full full;
  153.       }
  154.       position;
  155.    };
  156.  
  157. struct menu_action_sub_menu
  158.    {  int show_type;
  159.       os_coord pos;
  160.    };
  161.  
  162. typedef bits menu_show_flags;
  163.  
  164. typedef bits menu_add_flags;
  165.  
  166. typedef toolbox_c menu_add_at;
  167.  
  168. /************************
  169.  * Constant definitions *
  170.  ************************/
  171. #define class_MENU                              ((toolbox_class) 0x828C0u)
  172. #define menu_GENERATE_ABOUT_TO_BE_SHOWN         ((menu_flags) 0x1u)
  173. #define menu_GENERATE_DIALOGUE_COMPLETED        ((menu_flags) 0x2u)
  174. #define menu_ENTRY_TICKED                       ((menu_entry_flags) 0x1u)
  175. #define menu_ENTRY_SEPARATE                     ((menu_entry_flags) 0x2u)
  176. #define menu_ENTRY_FADED                        ((menu_entry_flags) 0x100u)
  177. #define menu_ENTRY_IS_SPRITE                    ((menu_entry_flags) 0x200u)
  178. #define menu_ENTRY_SUB_MENU                     ((menu_entry_flags) 0x400u)
  179. #define menu_ENTRY_GENERATE_SUB_MENU_ACTION     ((menu_entry_flags) 0x800u)
  180. #define menu_ENTRY_IS_MENU                      ((menu_entry_flags) 0x1000u)
  181. #define action_MENU_ABOUT_TO_BE_SHOWN           0x828C0u
  182. #define action_MENU_DIALOGUE_COMPLETED          0x828C1u
  183. #define action_MENU_SUB_MENU                    0x828C2u
  184. #define action_MENU_SELECTION                   0x828C3u
  185. #define error_MENU_TASKS_ACTIVE                 0x80AA00u
  186. #define error_MENU_ALLOC_FAILED                 0x80AA01u
  187. #define error_MENU_SHORT_BUFFER                 0x80AA02u
  188. #define error_MENU_NO_SUCH_TASK                 0x80AA11u
  189. #define error_MENU_NO_SUCH_METHOD               0x80AA12u
  190. #define error_MENU_NO_SUCH_MISC_OP_METHOD       0x80AA13u
  191. #define error_MENU_NO_SUCH_COMPONENT            0x80AA14u
  192. #define error_MENU_SPRITE_NOT_TEXT              0x80AA21u
  193. #define error_MENU_TEXT_NOT_SPRITE              0x80AA22u
  194. #define error_MENU_NO_TOP_MENU                  0x80AA31u
  195. #define error_MENU_UNKNOWN_SUB_MENU             0x80AA32u
  196. #define error_MENU_NO_SPRITE_NAME               0x80AA33u
  197. #define menu_SHOW_PERSISTENT                    ((menu_show_flags) 0x0u)
  198. #define menu_SHOW_TRANSIENT                     ((menu_show_flags) 0x1u)
  199. #define menu_ADD_BEFORE                         ((menu_add_flags) 0x1u)
  200. #define menu_ADD_AT_START                       ((menu_add_at) 0xFFFFFFFFu)
  201. #define menu_ADD_AT_END                         ((menu_add_at) 0xFFFFFFFEu)
  202.  
  203. /*************************
  204.  * Function declarations *
  205.  *************************/
  206.  
  207. #ifdef __cplusplus
  208.    extern "C" {
  209. #endif
  210.  
  211. /* ------------------------------------------------------------------------
  212.  * Function:      menu_update_tree()
  213.  *
  214.  * Description:   Calls SWI 0x828C3
  215.  *
  216.  * Input:         flags - value of R0 on entry
  217.  */
  218.  
  219. extern os_error *xmenu_update_tree (bits flags);
  220. __swi (0x828C3) void menu_update_tree (bits flags);
  221.  
  222. /* ------------------------------------------------------------------------
  223.  * Function:      menu_set_tick()
  224.  *
  225.  * Description:   Calls reason code 0 of SWI 0x44EC6
  226.  *
  227.  * Input:         flags - value of R0 on entry
  228.  *                menu - value of R1 on entry
  229.  *                entry - value of R3 on entry
  230.  *                tick - value of R4 on entry
  231.  *
  232.  * Other notes:   Before entry, R2 = 0x0.
  233.  */
  234.  
  235. extern os_error *xmenu_set_tick (bits flags,
  236.       toolbox_o menu,
  237.       toolbox_c entry,
  238.       bool tick);
  239. extern void menu_set_tick (bits flags,
  240.       toolbox_o menu,
  241.       toolbox_c entry,
  242.       bool tick);
  243.  
  244. /* ------------------------------------------------------------------------
  245.  * Function:      menu_get_tick()
  246.  *
  247.  * Description:   Calls reason code 1 of SWI 0x44EC6
  248.  *
  249.  * Input:         flags - value of R0 on entry
  250.  *                menu - value of R1 on entry
  251.  *                entry - value of R3 on entry
  252.  *
  253.  * Output:        tick - value of R0 on exit (X version only)
  254.  *
  255.  * Returns:       R0 (non-X version only)
  256.  *
  257.  * Other notes:   Before entry, R2 = 0x1.
  258.  */
  259.  
  260. extern os_error *xmenu_get_tick (bits flags,
  261.       toolbox_o menu,
  262.       toolbox_c entry,
  263.       bool *tick);
  264. extern bool menu_get_tick (bits flags,
  265.       toolbox_o menu,
  266.       toolbox_c entry);
  267.  
  268. /* ------------------------------------------------------------------------
  269.  * Function:      menu_set_fade()
  270.  *
  271.  * Description:   Calls reason code 2 of SWI 0x44EC6
  272.  *
  273.  * Input:         flags - value of R0 on entry
  274.  *                menu - value of R1 on entry
  275.  *                entry - value of R3 on entry
  276.  *                fade - value of R4 on entry
  277.  *
  278.  * Other notes:   Before entry, R2 = 0x2.
  279.  */
  280.  
  281. extern os_error *xmenu_set_fade (bits flags,
  282.       toolbox_o menu,
  283.       toolbox_c entry,
  284.       bool fade);
  285. extern void menu_set_fade (bits flags,
  286.       toolbox_o menu,
  287.       toolbox_c entry,
  288.       bool fade);
  289.  
  290. /* ------------------------------------------------------------------------
  291.  * Function:      menu_get_fade()
  292.  *
  293.  * Description:   Calls reason code 3 of SWI 0x44EC6
  294.  *
  295.  * Input:         flags - value of R0 on entry
  296.  *                menu - value of R1 on entry
  297.  *                entry - value of R3 on entry
  298.  *
  299.  * Output:        fade - value of R0 on exit (X version only)
  300.  *
  301.  * Returns:       R0 (non-X version only)
  302.  *
  303.  * Other notes:   Before entry, R2 = 0x3.
  304.  */
  305.  
  306. extern os_error *xmenu_get_fade (bits flags,
  307.       toolbox_o menu,
  308.       toolbox_c entry,
  309.       bool *fade);
  310. extern bool menu_get_fade (bits flags,
  311.       toolbox_o menu,
  312.       toolbox_c entry);
  313.  
  314. /* ------------------------------------------------------------------------
  315.  * Function:      menu_set_entry_text()
  316.  *
  317.  * Description:   Calls reason code 4 of SWI 0x44EC6
  318.  *
  319.  * Input:         flags - value of R0 on entry
  320.  *                menu - value of R1 on entry
  321.  *                entry - value of R3 on entry
  322.  *                text - value of R4 on entry
  323.  *
  324.  * Other notes:   Before entry, R2 = 0x4.
  325.  */
  326.  
  327. extern os_error *xmenu_set_entry_text (bits flags,
  328.       toolbox_o menu,
  329.       toolbox_c entry,
  330.       char const *text);
  331. extern void menu_set_entry_text (bits flags,
  332.       toolbox_o menu,
  333.       toolbox_c entry,
  334.       char const *text);
  335.  
  336. /* ------------------------------------------------------------------------
  337.  * Function:      menu_get_entry_text()
  338.  *
  339.  * Description:   Calls reason code 5 of SWI 0x44EC6
  340.  *
  341.  * Input:         flags - value of R0 on entry
  342.  *                menu - value of R1 on entry
  343.  *                entry - value of R3 on entry
  344.  *                buffer - value of R4 on entry
  345.  *                size - value of R5 on entry
  346.  *
  347.  * Output:        used - value of R5 on exit (X version only)
  348.  *
  349.  * Returns:       R5 (non-X version only)
  350.  *
  351.  * Other notes:   Before entry, R2 = 0x5.
  352.  */
  353.  
  354. extern os_error *xmenu_get_entry_text (bits flags,
  355.       toolbox_o menu,
  356.       toolbox_c entry,
  357.       char *buffer,
  358.       int size,
  359.       int *used);
  360. extern int menu_get_entry_text (bits flags,
  361.       toolbox_o menu,
  362.       toolbox_c entry,
  363.       char *buffer,
  364.       int size);
  365.  
  366. /* ------------------------------------------------------------------------
  367.  * Function:      menu_set_entry_sprite()
  368.  *
  369.  * Description:   Calls reason code 6 of SWI 0x44EC6
  370.  *
  371.  * Input:         flags - value of R0 on entry
  372.  *                menu - value of R1 on entry
  373.  *                entry - value of R3 on entry
  374.  *                sprite_name - value of R4 on entry
  375.  *
  376.  * Other notes:   Before entry, R2 = 0x6.
  377.  */
  378.  
  379. extern os_error *xmenu_set_entry_sprite (bits flags,
  380.       toolbox_o menu,
  381.       toolbox_c entry,
  382.       char const *sprite_name);
  383. extern void menu_set_entry_sprite (bits flags,
  384.       toolbox_o menu,
  385.       toolbox_c entry,
  386.       char const *sprite_name);
  387.  
  388. /* ------------------------------------------------------------------------
  389.  * Function:      menu_get_entry_sprite()
  390.  *
  391.  * Description:   Calls reason code 7 of SWI 0x44EC6
  392.  *
  393.  * Input:         flags - value of R0 on entry
  394.  *                menu - value of R1 on entry
  395.  *                entry - value of R3 on entry
  396.  *                buffer - value of R4 on entry
  397.  *                size - value of R5 on entry
  398.  *
  399.  * Output:        used - value of R5 on exit (X version only)
  400.  *
  401.  * Returns:       R5 (non-X version only)
  402.  *
  403.  * Other notes:   Before entry, R2 = 0x7.
  404.  */
  405.  
  406. extern os_error *xmenu_get_entry_sprite (bits flags,
  407.       toolbox_o menu,
  408.       toolbox_c entry,
  409.       char *buffer,
  410.       int size,
  411.       int *used);
  412. extern int menu_get_entry_sprite (bits flags,
  413.       toolbox_o menu,
  414.       toolbox_c entry,
  415.       char *buffer,
  416.       int size);
  417.  
  418. /* ------------------------------------------------------------------------
  419.  * Function:      menu_set_sub_menu_show()
  420.  *
  421.  * Description:   Calls reason code 8 of SWI 0x44EC6
  422.  *
  423.  * Input:         flags - value of R0 on entry
  424.  *                menu - value of R1 on entry
  425.  *                entry - value of R3 on entry
  426.  *                sub_menu - value of R4 on entry
  427.  *
  428.  * Other notes:   Before entry, R2 = 0x8.
  429.  */
  430.  
  431. extern os_error *xmenu_set_sub_menu_show (bits flags,
  432.       toolbox_o menu,
  433.       toolbox_c entry,
  434.       toolbox_o sub_menu);
  435. extern void menu_set_sub_menu_show (bits flags,
  436.       toolbox_o menu,
  437.       toolbox_c entry,
  438.       toolbox_o sub_menu);
  439.  
  440. /* ------------------------------------------------------------------------
  441.  * Function:      menu_get_sub_menu_show()
  442.  *
  443.  * Description:   Calls reason code 9 of SWI 0x44EC6
  444.  *
  445.  * Input:         flags - value of R0 on entry
  446.  *                menu - value of R1 on entry
  447.  *                entry - value of R3 on entry
  448.  *
  449.  * Output:        sub_menu - value of R0 on exit (X version only)
  450.  *
  451.  * Returns:       R0 (non-X version only)
  452.  *
  453.  * Other notes:   Before entry, R2 = 0x9.
  454.  */
  455.  
  456. extern os_error *xmenu_get_sub_menu_show (bits flags,
  457.       toolbox_o menu,
  458.       toolbox_c entry,
  459.       toolbox_o *sub_menu);
  460. extern toolbox_o menu_get_sub_menu_show (bits flags,
  461.       toolbox_o menu,
  462.       toolbox_c entry);
  463.  
  464. /* ------------------------------------------------------------------------
  465.  * Function:      menu_set_sub_menu_action()
  466.  *
  467.  * Description:   Calls reason code 10 of SWI 0x44EC6
  468.  *
  469.  * Input:         flags - value of R0 on entry
  470.  *                menu - value of R1 on entry
  471.  *                entry - value of R3 on entry
  472.  *                action - value of R4 on entry
  473.  *
  474.  * Other notes:   Before entry, R2 = 0xA.
  475.  */
  476.  
  477. extern os_error *xmenu_set_sub_menu_action (bits flags,
  478.       toolbox_o menu,
  479.       toolbox_c entry,
  480.       bits action);
  481. extern void menu_set_sub_menu_action (bits flags,
  482.       toolbox_o menu,
  483.       toolbox_c entry,
  484.       bits action);
  485.  
  486. /* ------------------------------------------------------------------------
  487.  * Function:      menu_get_sub_menu_action()
  488.  *
  489.  * Description:   Calls reason code 11 of SWI 0x44EC6
  490.  *
  491.  * Input:         flags - value of R0 on entry
  492.  *                menu - value of R1 on entry
  493.  *                entry - value of R3 on entry
  494.  *
  495.  * Output:        action - value of R0 on exit (X version only)
  496.  *
  497.  * Returns:       R0 (non-X version only)
  498.  *
  499.  * Other notes:   Before entry, R2 = 0xB.
  500.  */
  501.  
  502. extern os_error *xmenu_get_sub_menu_action (bits flags,
  503.       toolbox_o menu,
  504.       toolbox_c entry,
  505.       bits *action);
  506. extern bits menu_get_sub_menu_action (bits flags,
  507.       toolbox_o menu,
  508.       toolbox_c entry);
  509.  
  510. /* ------------------------------------------------------------------------
  511.  * Function:      menu_set_click_show()
  512.  *
  513.  * Description:   Calls reason code 12 of SWI 0x44EC6
  514.  *
  515.  * Input:         flags - value of R0 on entry
  516.  *                menu - value of R1 on entry
  517.  *                entry - value of R3 on entry
  518.  *                show - value of R4 on entry
  519.  *                show_flags - value of R5 on entry
  520.  *
  521.  * Other notes:   Before entry, R2 = 0xC.
  522.  */
  523.  
  524. extern os_error *xmenu_set_click_show (bits flags,
  525.       toolbox_o menu,
  526.       toolbox_c entry,
  527.       toolbox_o show,
  528.       menu_show_flags show_flags);
  529. extern void menu_set_click_show (bits flags,
  530.       toolbox_o menu,
  531.       toolbox_c entry,
  532.       toolbox_o show,
  533.       menu_show_flags show_flags);
  534.  
  535. /* ------------------------------------------------------------------------
  536.  * Function:      menu_get_click_show()
  537.  *
  538.  * Description:   Calls reason code 13 of SWI 0x44EC6
  539.  *
  540.  * Input:         flags - value of R0 on entry
  541.  *                menu - value of R1 on entry
  542.  *                entry - value of R3 on entry
  543.  *
  544.  * Output:        show - value of R0 on exit (X version only)
  545.  *                show_flags - value of R1 on exit
  546.  *
  547.  * Returns:       R0 (non-X version only)
  548.  *
  549.  * Other notes:   Before entry, R2 = 0xD.
  550.  */
  551.  
  552. extern os_error *xmenu_get_click_show (bits flags,
  553.       toolbox_o menu,
  554.       toolbox_c entry,
  555.       toolbox_o *show,
  556.       menu_show_flags *show_flags);
  557. extern toolbox_o menu_get_click_show (bits flags,
  558.       toolbox_o menu,
  559.       toolbox_c entry,
  560.       menu_show_flags *show_flags);
  561.  
  562. /* ------------------------------------------------------------------------
  563.  * Function:      menu_set_click_action()
  564.  *
  565.  * Description:   Calls reason code 14 of SWI 0x44EC6
  566.  *
  567.  * Input:         flags - value of R0 on entry
  568.  *                menu - value of R1 on entry
  569.  *                entry - value of R3 on entry
  570.  *                action - value of R4 on entry
  571.  *
  572.  * Other notes:   Before entry, R2 = 0xE.
  573.  */
  574.  
  575. extern os_error *xmenu_set_click_action (bits flags,
  576.       toolbox_o menu,
  577.       toolbox_c entry,
  578.       bits action);
  579. extern void menu_set_click_action (bits flags,
  580.       toolbox_o menu,
  581.       toolbox_c entry,
  582.       bits action);
  583.  
  584. /* ------------------------------------------------------------------------
  585.  * Function:      menu_get_click_action()
  586.  *
  587.  * Description:   Calls reason code 15 of SWI 0x44EC6
  588.  *
  589.  * Input:         flags - value of R0 on entry
  590.  *                menu - value of R1 on entry
  591.  *                entry - value of R3 on entry
  592.  *
  593.  * Output:        action - value of R0 on exit (X version only)
  594.  *
  595.  * Returns:       R0 (non-X version only)
  596.  *
  597.  * Other notes:   Before entry, R2 = 0xF.
  598.  */
  599.  
  600. extern os_error *xmenu_get_click_action (bits flags,
  601.       toolbox_o menu,
  602.       toolbox_c entry,
  603.       bits *action);
  604. extern bits menu_get_click_action (bits flags,
  605.       toolbox_o menu,
  606.       toolbox_c entry);
  607.  
  608. /* ------------------------------------------------------------------------
  609.  * Function:      menu_set_help_message()
  610.  *
  611.  * Description:   Calls reason code 16 of SWI 0x44EC6
  612.  *
  613.  * Input:         flags - value of R0 on entry
  614.  *                menu - value of R1 on entry
  615.  *                help - value of R3 on entry
  616.  *
  617.  * Other notes:   Before entry, R2 = 0x10.
  618.  */
  619.  
  620. extern os_error *xmenu_set_help_message (bits flags,
  621.       toolbox_o menu,
  622.       char const *help);
  623. extern void menu_set_help_message (bits flags,
  624.       toolbox_o menu,
  625.       char const *help);
  626.  
  627. /* ------------------------------------------------------------------------
  628.  * Function:      menu_get_help_message()
  629.  *
  630.  * Description:   Calls reason code 17 of SWI 0x44EC6
  631.  *
  632.  * Input:         flags - value of R0 on entry
  633.  *                menu - value of R1 on entry
  634.  *                buffer - value of R3 on entry
  635.  *                size - value of R4 on entry
  636.  *
  637.  * Output:        used - value of R4 on exit (X version only)
  638.  *
  639.  * Returns:       R4 (non-X version only)
  640.  *
  641.  * Other notes:   Before entry, R2 = 0x11.
  642.  */
  643.  
  644. extern os_error *xmenu_get_help_message (bits flags,
  645.       toolbox_o menu,
  646.       char *buffer,
  647.       int size,
  648.       int *used);
  649. extern int menu_get_help_message (bits flags,
  650.       toolbox_o menu,
  651.       char *buffer,
  652.       int size);
  653.  
  654. /* ------------------------------------------------------------------------
  655.  * Function:      menu_set_entry_help_message()
  656.  *
  657.  * Description:   Calls reason code 18 of SWI 0x44EC6
  658.  *
  659.  * Input:         flags - value of R0 on entry
  660.  *                menu - value of R1 on entry
  661.  *                entry - value of R3 on entry
  662.  *                help - value of R4 on entry
  663.  *
  664.  * Other notes:   Before entry, R2 = 0x12.
  665.  */
  666.  
  667. extern os_error *xmenu_set_entry_help_message (bits flags,
  668.       toolbox_o menu,
  669.       toolbox_c entry,
  670.       char const *help);
  671. extern void menu_set_entry_help_message (bits flags,
  672.       toolbox_o menu,
  673.       toolbox_c entry,
  674.       char const *help);
  675.  
  676. /* ------------------------------------------------------------------------
  677.  * Function:      menu_get_entry_help_message()
  678.  *
  679.  * Description:   Calls reason code 19 of SWI 0x44EC6
  680.  *
  681.  * Input:         flags - value of R0 on entry
  682.  *                menu - value of R1 on entry
  683.  *                entry - value of R3 on entry
  684.  *                buffer - value of R4 on entry
  685.  *                size - value of R5 on entry
  686.  *
  687.  * Output:        used - value of R5 on exit (X version only)
  688.  *
  689.  * Returns:       R5 (non-X version only)
  690.  *
  691.  * Other notes:   Before entry, R2 = 0x13.
  692.  */
  693.  
  694. extern os_error *xmenu_get_entry_help_message (bits flags,
  695.       toolbox_o menu,
  696.       toolbox_c entry,
  697.       char *buffer,
  698.       int size,
  699.       int *used);
  700. extern int menu_get_entry_help_message (bits flags,
  701.       toolbox_o menu,
  702.       toolbox_c entry,
  703.       char *buffer,
  704.       int size);
  705.  
  706. /* ------------------------------------------------------------------------
  707.  * Function:      menu_add_entry()
  708.  *
  709.  * Description:   Calls reason code 20 of SWI 0x44EC6
  710.  *
  711.  * Input:         flags - value of R0 on entry
  712.  *                menu - value of R1 on entry
  713.  *                at - value of R3 on entry
  714.  *                entry - value of R4 on entry
  715.  *
  716.  * Output:        entry - value of R0 on exit (X version only)
  717.  *
  718.  * Returns:       R0 (non-X version only)
  719.  *
  720.  * Other notes:   Before entry, R2 = 0x14.
  721.  */
  722.  
  723. extern os_error *xmenu_add_entry (menu_add_flags flags,
  724.       toolbox_o menu,
  725.       menu_add_at at,
  726.       menu_entry_object const *entry,
  727.       toolbox_c *entry);
  728. extern toolbox_c menu_add_entry (menu_add_flags flags,
  729.       toolbox_o menu,
  730.       menu_add_at at,
  731.       menu_entry_object const *entry);
  732.  
  733. /* ------------------------------------------------------------------------
  734.  * Function:      menu_remove_entry()
  735.  *
  736.  * Description:   Calls reason code 21 of SWI 0x44EC6
  737.  *
  738.  * Input:         flags - value of R0 on entry
  739.  *                menu - value of R1 on entry
  740.  *                entry - value of R3 on entry
  741.  *
  742.  * Other notes:   Before entry, R2 = 0x15.
  743.  */
  744.  
  745. extern os_error *xmenu_remove_entry (bits flags,
  746.       toolbox_o menu,
  747.       toolbox_c entry);
  748. extern void menu_remove_entry (bits flags,
  749.       toolbox_o menu,
  750.       toolbox_c entry);
  751.  
  752. /* ------------------------------------------------------------------------
  753.  * Function:      menu_get_height()
  754.  *
  755.  * Description:   Calls reason code 22 of SWI 0x44EC6
  756.  *
  757.  * Input:         flags - value of R0 on entry
  758.  *                menu - value of R1 on entry
  759.  *
  760.  * Output:        height - value of R0 on exit (X version only)
  761.  *
  762.  * Returns:       R0 (non-X version only)
  763.  *
  764.  * Other notes:   Before entry, R2 = 0x16.
  765.  */
  766.  
  767. extern os_error *xmenu_get_height (bits flags,
  768.       toolbox_o menu,
  769.       int *height);
  770. extern int menu_get_height (bits flags,
  771.       toolbox_o menu);
  772.  
  773. /* ------------------------------------------------------------------------
  774.  * Function:      menu_get_width()
  775.  *
  776.  * Description:   Calls reason code 23 of SWI 0x44EC6
  777.  *
  778.  * Input:         flags - value of R0 on entry
  779.  *                menu - value of R1 on entry
  780.  *
  781.  * Output:        width - value of R0 on exit (X version only)
  782.  *
  783.  * Returns:       R0 (non-X version only)
  784.  *
  785.  * Other notes:   Before entry, R2 = 0x17.
  786.  */
  787.  
  788. extern os_error *xmenu_get_width (bits flags,
  789.       toolbox_o menu,
  790.       int *width);
  791. extern int menu_get_width (bits flags,
  792.       toolbox_o menu);
  793.  
  794. /* ------------------------------------------------------------------------
  795.  * Function:      menu_set_title()
  796.  *
  797.  * Description:   Calls reason code 24 of SWI 0x44EC6
  798.  *
  799.  * Input:         flags - value of R0 on entry
  800.  *                menu - value of R1 on entry
  801.  *                title - value of R3 on entry
  802.  *
  803.  * Other notes:   Before entry, R2 = 0x18.
  804.  */
  805.  
  806. extern os_error *xmenu_set_title (bits flags,
  807.       toolbox_o menu,
  808.       char const *title);
  809. extern void menu_set_title (bits flags,
  810.       toolbox_o menu,
  811.       char const *title);
  812.  
  813. /* ------------------------------------------------------------------------
  814.  * Function:      menu_get_title()
  815.  *
  816.  * Description:   Calls reason code 25 of SWI 0x44EC6
  817.  *
  818.  * Input:         flags - value of R0 on entry
  819.  *                menu - value of R1 on entry
  820.  *                buffer - value of R3 on entry
  821.  *                size - value of R4 on entry
  822.  *
  823.  * Output:        used - value of R4 on exit (X version only)
  824.  *
  825.  * Returns:       R4 (non-X version only)
  826.  *
  827.  * Other notes:   Before entry, R2 = 0x19.
  828.  */
  829.  
  830. extern os_error *xmenu_get_title (bits flags,
  831.       toolbox_o menu,
  832.       char *buffer,
  833.       int size,
  834.       int *used);
  835. extern int menu_get_title (bits flags,
  836.       toolbox_o menu,
  837.       char *buffer,
  838.       int size);
  839.  
  840. #ifdef __cplusplus
  841.    }
  842. #endif
  843.  
  844. #endif
  845.