home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / !DeskLib / h / WimpSWIs < prev    next >
Encoding:
Text File  |  1993-07-13  |  5.9 KB  |  151 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    WimpSWIs.h
  12.     Author:  Copyright © 1992, 1993 John Winters and Jason Williams
  13.     Version: 1.04 (14 Jul 1993)
  14.     Purpose: Prototypes for Wimp SWI calls defined in the Wimp library
  15.              (Basic SWI-level interface to the Wimp)
  16. */
  17.  
  18.  
  19. #ifndef __dl_wimpswis_h
  20. #define __dl_wimpswis_h
  21.  
  22. #ifndef __dl_core_h
  23. #include "Core.h"
  24. #endif
  25.  
  26. #ifndef __kernel_h
  27. #include "kernel.h"
  28. #endif
  29.  
  30. #ifndef __dl_wimp_h
  31. #include "Wimp.h"
  32. #endif
  33.  
  34.  
  35. /* Task handling: init, closedown, messages, transfers, etc. */
  36. extern os_error *Wimp_Initialise(unsigned int *version,
  37.                                  char         *name,
  38.                                  task_handle  *task,
  39.                                  int          *messages);
  40. extern os_error *Wimp_CloseDown(task_handle task);
  41.  
  42. extern os_error *Wimp_StartTask(char *command);
  43. extern os_error *Wimp_SlotSize(int *currentslot, int *nextslot, int *freepool);
  44. extern os_error *Wimp_TransferBlock(task_handle  sourcetask,
  45.                                     void         *sourcebuffer,
  46.                                     task_handle  desttask,
  47.                                     void         *destbuffer,
  48.                                     unsigned int length);
  49. extern os_error *Wimp_ReportError(os_error    *error,
  50.                                   int         flags,
  51.                                   char        *name);
  52. extern os_error *Wimp_SendMessage (event_type       eventtype,
  53.                                    message_block    *message,
  54.                                    message_destinee destinee,
  55.                                    icon_handle      icon);
  56.  
  57.  
  58. /* window handling */
  59. extern os_error *Wimp_OpenTemplate(char *name);
  60. extern os_error *Wimp_CloseTemplate(void);
  61. extern os_error *Wimp_LoadTemplate(template_block *template);
  62.  
  63. extern os_error *Wimp_CreateWindow(window_block *block, window_handle *window);
  64. extern os_error *Wimp_OpenWindow(window_openblock *block);
  65. extern os_error *Wimp_CloseWindow(window_handle window);
  66. extern os_error *Wimp_DeleteWindow(window_handle window);
  67.  
  68. extern os_error *Wimp_RedrawWindow(window_redrawblock *block, BOOL *more);
  69. extern os_error *Wimp_UpdateWindow(window_redrawblock *block, BOOL *more);
  70. extern os_error *Wimp_GetRectangle(window_redrawblock *block, BOOL *more);
  71.  
  72. extern os_error *Wimp_GetWindowState(window_handle window,window_state *state);
  73. extern os_error *Wimp_GetWindowInfo(window_info *info);
  74. extern os_error *Wimp_GetWindowOutline(window_outline *outline);
  75. extern os_error *Wimp_SetExtent(window_handle window, wimp_box *newextent);
  76. extern os_error *Wimp_ForceRedraw(window_redrawblock *block);
  77.  
  78.  
  79. /* Icon handling */
  80. extern os_error *Wimp_CreateIcon(icon_createblock *block, icon_handle *icon);
  81. extern os_error *Wimp_DeleteIcon(window_handle window, icon_handle icon);
  82. extern os_error *Wimp_SetIconState(window_handle window,
  83.                                    icon_handle   icon,
  84.                                    int           value,
  85.                                    int           mask);
  86. extern os_error *Wimp_GetIconState(window_handle window,
  87.                                    icon_handle   icon,
  88.                                    icon_block    *iconinfo);
  89. extern os_error *Wimp_WhichIcon(window_handle    window,
  90.                                    icon_handle   *icons,
  91.                                    int           mask,
  92.                                    int           settings);
  93. extern os_error *Wimp_PlotIcon(icon_block *fakeicon);
  94.  
  95.  
  96.  
  97. /* Poll handling */
  98. extern os_error *Wimp_Poll(event_pollmask mask, event_pollblock *event);
  99. extern os_error *Wimp_PollIdle(event_pollmask mask,
  100.                                event_pollblock *block, int earliest);
  101.  
  102. extern os_error *Wimp_SaveFPStateOnPoll(void);
  103. extern os_error *Wimp_CorruptFPStateOnPoll(void);
  104.  
  105.  
  106. /* Pointer/Mouse handling */
  107. extern os_error *Wimp_GetPointerInfo(mouse_block *ptrinfo);
  108. extern os_error *Wimp_SetPointerShape(pointer_shapeblock *shape);
  109.  
  110. extern os_error *Wimp_DragBox(drag_block *draginfo);
  111.  
  112.  
  113. /* Caret handling */
  114. extern os_error *Wimp_SetCaretPosition(caret_block *caret);
  115. extern os_error *Wimp_GetCaretPosition(caret_block *caret);
  116.  
  117.  
  118. /* Menu handling */
  119. extern os_error *Wimp_CreateMenu(menu_block *menu, int xpos, int ypos);
  120. extern os_error *Wimp_CreateSubMenu(menu_block *menu, int xpos, int ypos);
  121. extern os_error *Wimp_DecodeMenu(menu_block *menu,
  122.                                  int        *selections,
  123.                                  char       *result);
  124.  
  125.  
  126. /* Keyboard handling */
  127. extern os_error *Wimp_ProcessKey(int character);
  128.  
  129.  
  130. /* Graphics/Screen handling */
  131. extern os_error *Wimp_SetMode(int mode);
  132. extern os_error *Wimp_SetColour(int colour);
  133. extern os_error *Wimp_ReadPalette(palette_block *palette);
  134. extern os_error *Wimp_SetPalette(palette_block *palette);
  135. extern os_error *Wimp_ReadPixTrans(int         areaindex,
  136.                                    void        *area,
  137.                                    void        *sprite,
  138.                                    scale_block *scaleblock,
  139.                                    char        *transblock);
  140. extern os_error *Wimp_SetFontColours(int foreground, int background);
  141.  
  142. extern os_error *Wimp_SpriteOp(_kernel_swi_regs *registers);
  143. extern os_error *Wimp_BaseOfSprites(void **rom_base, void **ram_base);
  144.  
  145. extern os_error *Wimp_BlockCopy(window_handle window, wimp_box *source,
  146.                                                       int x, int y);
  147.  
  148. extern os_error *Wimp_CommandWindow(int);
  149.  
  150. #endif
  151.