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

  1. #ifndef windowsupportexternal_H
  2. #define windowsupportexternal_H
  3.  
  4. /* C header file for WindowSupportExternal
  5.  * written by DefMod (Jun 20 1995) on Thu Jun 29 15:36:50 1995
  6.  * Simon Middleton, Uniqueway Ltd; Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. #ifndef toolbox_H
  18. #include "toolbox.h"
  19. #endif
  20.  
  21. #ifndef window_H
  22. #include "window.h"
  23. #endif
  24.  
  25. #ifndef gadget_H
  26. #include "gadget.h"
  27. #endif
  28.  
  29. /**********************************
  30.  * SWI names and SWI reason codes *
  31.  **********************************/
  32. #undef  Window_SupportExternal
  33. #define Window_SupportExternal                  0x82887
  34. #undef  XWindow_SupportExternal
  35. #define XWindow_SupportExternal                 0xA2887
  36. #undef  WindowSupportExternal_CreateIcon
  37. #define WindowSupportExternal_CreateIcon        0x0
  38. #undef  WindowSupportExternal_CreateObject
  39. #define WindowSupportExternal_CreateObject      0x2
  40. #undef  WindowSupportExternal_CreateGadget
  41. #define WindowSupportExternal_CreateGadget      0x3
  42. #undef  WindowSupportExternal_Alloc
  43. #define WindowSupportExternal_Alloc             0x4
  44. #undef  WindowSupportExternal_Free
  45. #define WindowSupportExternal_Free              0x5
  46. #undef  WindowSupportExternal_Realloc
  47. #define WindowSupportExternal_Realloc           0x6
  48.  
  49. /************************
  50.  * Constant definitions *
  51.  ************************/
  52. #define windowsupportexternal_HANDLER_ADD       1
  53. #define windowsupportexternal_HANDLER_REMOVE    2
  54. #define windowsupportexternal_HANDLER_FADE      3
  55. #define windowsupportexternal_HANDLER_METHOD    4
  56. #define windowsupportexternal_HANDLER_CLICK     6
  57. #define windowsupportexternal_HANDLER_PLOT      9
  58. #define windowsupportexternal_HANDLER_SET_FOCUS 10
  59. #define windowsupportexternal_HANDLER_MOVE      11
  60. #define windowsupportexternal_HANDLER_POST_ADD  12
  61.  
  62. /*************************
  63.  * Function declarations *
  64.  *************************/
  65.  
  66. #ifdef __cplusplus
  67.    extern "C" {
  68. #endif
  69.  
  70. /* ------------------------------------------------------------------------
  71.  * Function:      windowsupportexternal_create_icon()
  72.  *
  73.  * Description:   Creates an icon, handling window module plotting mode
  74.  *
  75.  * Input:         flags - value of R0 on entry
  76.  *                icon - value of R2 on entry
  77.  *
  78.  * Output:        i - value of R0 on exit (X version only)
  79.  *
  80.  * Returns:       R0 (non-X version only)
  81.  *
  82.  * Other notes:   Calls SWI 0x82887 with R1 = 0x0.
  83.  */
  84.  
  85. extern os_error *xwindowsupportexternal_create_icon (bits flags,
  86.       wimp_icon_create const *icon,
  87.       wimp_i *i);
  88. extern wimp_i windowsupportexternal_create_icon (bits flags,
  89.       wimp_icon_create const *icon);
  90.  
  91. /* ------------------------------------------------------------------------
  92.  * Function:      windowsupportexternal_create_object()
  93.  *
  94.  * Description:   Creates an object, handling window module plotting mode
  95.  *
  96.  * Input:         flags - value of R0 on entry
  97.  *                id - value of R2 on entry
  98.  *
  99.  * Output:        obj - value of R0 on exit (X version only)
  100.  *
  101.  * Returns:       R0 (non-X version only)
  102.  *
  103.  * Other notes:   Calls SWI 0x82887 with R1 = 0x2.
  104.  */
  105.  
  106. extern os_error *xwindowsupportexternal_create_object (toolbox_create_flags flags,
  107.       toolbox_id id,
  108.       toolbox_o *obj);
  109. extern toolbox_o windowsupportexternal_create_object (toolbox_create_flags flags,
  110.       toolbox_id id);
  111.  
  112. /* ------------------------------------------------------------------------
  113.  * Function:      windowsupportexternal_create_gadget()
  114.  *
  115.  * Description:   Creates a gadget
  116.  *
  117.  * Input:         flags - value of R0 on entry
  118.  *                obj - value of R2 on entry
  119.  *                gadget - value of R3 on entry
  120.  *                tag - value of R4 on entry
  121.  *
  122.  * Output:        cmp - value of R0 on exit (X version only)
  123.  *
  124.  * Returns:       R0 (non-X version only)
  125.  *
  126.  * Other notes:   Calls SWI 0x82887 with R1 = 0x3.
  127.  */
  128.  
  129. extern os_error *xwindowsupportexternal_create_gadget (bits flags,
  130.       toolbox_o obj,
  131.       gadget_object const *gadget,
  132.       int tag,
  133.       toolbox_c *cmp);
  134. extern toolbox_c windowsupportexternal_create_gadget (bits flags,
  135.       toolbox_o obj,
  136.       gadget_object const *gadget,
  137.       int tag);
  138.  
  139. /* ------------------------------------------------------------------------
  140.  * Function:      windowsupportexternal_alloc()
  141.  *
  142.  * Description:   Allocates memory via window module
  143.  *
  144.  * Input:         flags - value of R0 on entry
  145.  *                size - value of R2 on entry
  146.  *
  147.  * Output:        data - value of R0 on exit (X version only)
  148.  *
  149.  * Returns:       R0 (non-X version only)
  150.  *
  151.  * Other notes:   Calls SWI 0x82887 with R1 = 0x4.
  152.  */
  153.  
  154. extern os_error *xwindowsupportexternal_alloc (bits flags,
  155.       int size,
  156.       void **data);
  157. extern void *windowsupportexternal_alloc (bits flags,
  158.       int size);
  159.  
  160. /* ------------------------------------------------------------------------
  161.  * Function:      windowsupportexternal_free()
  162.  *
  163.  * Description:   Frees memory via window module
  164.  *
  165.  * Input:         flags - value of R0 on entry
  166.  *                data - value of R2 on entry
  167.  *
  168.  * Other notes:   Calls SWI 0x82887 with R1 = 0x5.
  169.  */
  170.  
  171. extern os_error *xwindowsupportexternal_free (bits flags,
  172.       void *data);
  173. extern void windowsupportexternal_free (bits flags,
  174.       void *data);
  175.  
  176. /* ------------------------------------------------------------------------
  177.  * Function:      windowsupportexternal_realloc()
  178.  *
  179.  * Description:   Extends memory allocated via window module
  180.  *
  181.  * Input:         flags - value of R0 on entry
  182.  *                data - value of R2 on entry
  183.  *                size_increase - value of R3 on entry
  184.  *
  185.  * Output:        data - value of R0 on exit (X version only)
  186.  *
  187.  * Returns:       R0 (non-X version only)
  188.  *
  189.  * Other notes:   Calls SWI 0x82887 with R1 = 0x6.
  190.  */
  191.  
  192. extern os_error *xwindowsupportexternal_realloc (bits flags,
  193.       void *data,
  194.       int size_increase,
  195.       void **data);
  196. extern void *windowsupportexternal_realloc (bits flags,
  197.       void *data,
  198.       int size_increase);
  199.  
  200. #ifdef __cplusplus
  201.    }
  202. #endif
  203.  
  204. #endif
  205.