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

  1. #ifndef popup_H
  2. #define popup_H
  3.  
  4. /* C header file for PopUp
  5.  * written by DefMod (Aug 30 1995) on Tue Sep  5 16:29:10 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. #ifndef gadget_H
  18. #include "gadget.h"
  19. #endif
  20.  
  21. /**********************************
  22.  * SWI names and SWI reason codes *
  23.  **********************************/
  24. #undef  PopUp_SetMenu
  25. #define PopUp_SetMenu                           0x2C0
  26. #undef  PopUp_GetMenu
  27. #define PopUp_GetMenu                           0x2C1
  28.  
  29. /************************************
  30.  * Structure and union declarations *
  31.  ************************************/
  32. typedef struct popup_gadget                     popup_gadget;
  33. typedef struct popup_action_about_to_be_shown   popup_action_about_to_be_shown;
  34.  
  35. /********************
  36.  * Type definitions *
  37.  ********************/
  38. struct popup_gadget
  39.    {  toolbox_string_reference menu_name;
  40.    };
  41.  
  42. typedef os_coord popup_full;
  43.  
  44. struct popup_action_about_to_be_shown
  45.    {  toolbox_o menu;
  46.    };
  47.  
  48. /************************
  49.  * Constant definitions *
  50.  ************************/
  51. #define class_POP_UP                            ((toolbox_class) 0x2C0u)
  52. #define popup_GENERATE_ABOUT_TO_BE_SHOWN        ((gadget_flags) 0x1u)
  53. #define action_POP_UP_ABOUT_TO_BE_SHOWN         0x8288Bu
  54.  
  55. /*************************
  56.  * Function declarations *
  57.  *************************/
  58.  
  59. #ifdef __cplusplus
  60.    extern "C" {
  61. #endif
  62.  
  63. /* ------------------------------------------------------------------------
  64.  * Function:      popup_set_menu()
  65.  *
  66.  * Description:   Calls reason code 704 of SWI 0x44EC6
  67.  *
  68.  * Input:         flags - value of R0 on entry
  69.  *                window - value of R1 on entry
  70.  *                popup - value of R2 on entry
  71.  *                menu - value of R4 on entry
  72.  *
  73.  * Other notes:   Before entry, R3 = 0x2C0.
  74.  */
  75.  
  76. extern os_error *xpopup_set_menu (bits flags,
  77.       toolbox_o window,
  78.       toolbox_c popup,
  79.       toolbox_o menu);
  80. extern void popup_set_menu (bits flags,
  81.       toolbox_o window,
  82.       toolbox_c popup,
  83.       toolbox_o menu);
  84.  
  85. /* ------------------------------------------------------------------------
  86.  * Function:      popup_get_menu()
  87.  *
  88.  * Description:   Calls reason code 705 of SWI 0x44EC6
  89.  *
  90.  * Input:         flags - value of R0 on entry
  91.  *                window - value of R1 on entry
  92.  *                popup - value of R2 on entry
  93.  *
  94.  * Output:        menu - value of R0 on exit (X version only)
  95.  *
  96.  * Returns:       R0 (non-X version only)
  97.  *
  98.  * Other notes:   Before entry, R3 = 0x2C1.
  99.  */
  100.  
  101. extern os_error *xpopup_get_menu (bits flags,
  102.       toolbox_o window,
  103.       toolbox_c popup,
  104.       toolbox_o *menu);
  105. extern toolbox_o popup_get_menu (bits flags,
  106.       toolbox_o window,
  107.       toolbox_c popup);
  108.  
  109. #ifdef __cplusplus
  110.    }
  111. #endif
  112.  
  113. #endif
  114.