home *** CD-ROM | disk | FTP | other *** search
- #ifndef popup_H
- #define popup_H
-
- /* C header file for PopUp
- * written by DefMod (Aug 30 1995) on Tue Sep 5 16:29:10 1995
- * Jonathan Coxhead, Acorn Computers Ltd
- */
-
- #ifndef types_H
- #include "types.h"
- #endif
-
- #ifndef toolbox_H
- #include "toolbox.h"
- #endif
-
- #ifndef gadget_H
- #include "gadget.h"
- #endif
-
- /**********************************
- * SWI names and SWI reason codes *
- **********************************/
- #undef PopUp_SetMenu
- #define PopUp_SetMenu 0x2C0
- #undef PopUp_GetMenu
- #define PopUp_GetMenu 0x2C1
-
- /************************************
- * Structure and union declarations *
- ************************************/
- typedef struct popup_gadget popup_gadget;
- typedef struct popup_action_about_to_be_shown popup_action_about_to_be_shown;
-
- /********************
- * Type definitions *
- ********************/
- struct popup_gadget
- { toolbox_string_reference menu_name;
- };
-
- typedef os_coord popup_full;
-
- struct popup_action_about_to_be_shown
- { toolbox_o menu;
- };
-
- /************************
- * Constant definitions *
- ************************/
- #define class_POP_UP ((toolbox_class) 0x2C0u)
- #define popup_GENERATE_ABOUT_TO_BE_SHOWN ((gadget_flags) 0x1u)
- #define action_POP_UP_ABOUT_TO_BE_SHOWN 0x8288Bu
-
- /*************************
- * Function declarations *
- *************************/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* ------------------------------------------------------------------------
- * Function: popup_set_menu()
- *
- * Description: Calls reason code 704 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * window - value of R1 on entry
- * popup - value of R2 on entry
- * menu - value of R4 on entry
- *
- * Other notes: Before entry, R3 = 0x2C0.
- */
-
- extern os_error *xpopup_set_menu (bits flags,
- toolbox_o window,
- toolbox_c popup,
- toolbox_o menu);
- extern void popup_set_menu (bits flags,
- toolbox_o window,
- toolbox_c popup,
- toolbox_o menu);
-
- /* ------------------------------------------------------------------------
- * Function: popup_get_menu()
- *
- * Description: Calls reason code 705 of SWI 0x44EC6
- *
- * Input: flags - value of R0 on entry
- * window - value of R1 on entry
- * popup - value of R2 on entry
- *
- * Output: menu - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Before entry, R3 = 0x2C1.
- */
-
- extern os_error *xpopup_get_menu (bits flags,
- toolbox_o window,
- toolbox_c popup,
- toolbox_o *menu);
- extern toolbox_o popup_get_menu (bits flags,
- toolbox_o window,
- toolbox_c popup);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-