home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / utilities / utilst / wimpext / SWIs < prev    next >
Text File  |  1993-05-11  |  61KB  |  1,669 lines

  1. WimpExtension SWIs - 2.17
  2. ==================
  3.  
  4. Note: All strings are control-terminated (ie. <32)
  5.       All SWIs preserve all registers that are not used to return information
  6.       except for R0, which is always corrupted (or used to return
  7.       information). The processor status flags are always preserved unless
  8.       there is an error.
  9.       I have tried to make the icon-handling SWIs 'intelligent' - ie. if you
  10.       tell WimpExtension to set an icon (for example) it won't do anything if
  11.       it's already set, so it won't flicker.
  12.  
  13.       WimpExtension has two SWI chunks - &45780 and &46380.
  14.  
  15.       SWI &457BF is unused; this is due to a really really stupid bug in
  16.       RISC OS.
  17.  
  18. Brief list:
  19. -------------------------------
  20. WimpExt_Initialise       &45780
  21. WimpExt_CloseDown        &45781
  22. WimpExt_SlabIcon         &45782
  23. WimpExt_Redraw           &45783
  24. WimpExt_Action           &45784
  25. WimpExt_IconBarSprite    &45785
  26. WimpExt_IconBarText      &45786
  27. WimpExt_LinkWindows      &45787
  28. WimpExt_OpenLinked       &45788
  29. WimpExt_CloseLinked      &45789
  30. WimpExt_UnLinkWindows    &4578A
  31. WimpExt_CurrentTask      &4578B
  32. WimpExt_LoadTemplates    &4578C
  33. WimpExt_SetIconString    &4578D
  34. WimpExt_OpenWindowTop    &4578E
  35. WimpExt_SetIcon          &4578F
  36. WimpExt_GetIcon          &45790
  37. WimpExt_SetNumberIcon    &45791
  38. WimpExt_GetNumberIcon    &45792
  39. WimpExt_IncNumberIcon    &45793
  40. WimpExt_DecNumberIcon    &45794
  41. WimpExt_SetPointer       &45795
  42. WimpExt_Divide           &45796
  43. WimpExt_ColoursMenu      &45797
  44. WimpExt_AutoRedraw       &45798
  45. WimpExt_CentreWindow     &45799
  46. WimpExt_DragIcon         &4579A
  47. WimpExt_PutCaretIcon     &4579B
  48. WimpExt_OpenDialogue     &4579C
  49. WimpExt_CheckWindowOpen  &4579D
  50. WimpExt_CopyString       &4579E
  51. WimpExt_SetWindowTitle   &4579F
  52. WimpExt_SetIconStringN   &457A0
  53. WimpExt_FindLeaf         &457A1
  54. WimpExt_LimitPointer     &457A2
  55. WimpExt_ReleasePointer   &457A3
  56. WimpExt_OpenFullSize     &457A4
  57. WimpExt_LoadRAMTemplate  &457A5
  58. WimpExt_OpenRequester    &457A6
  59. WimpExt_CloseRequester   &457A7
  60. WimpExt_HideLink         &457A8
  61. WimpExt_UnHideLink       &457A9
  62. WimpExt_SendHelp         &457AA
  63. WimpExt_SendWimpHelp     &457AB
  64. WimpExt_CreateMenu       &457AC
  65. WimpExt_ReCreateMenu     &457AD
  66. WimpExt_ShadeEntry       &457AE
  67. WimpExt_TickEntry        &457AF
  68. WimpExt_SetIconColour    &457B0
  69. WimpExt_ShadeIcon        &457B1
  70. WimpExt_PlotSprite       &457B2
  71. WimpExt_RedrawDraw       &457B3
  72. WimpExt_PrePoll          &457B4
  73. WimpExt_SetExtent        &457B5
  74. WimpExt_MoveCaret        &457B6
  75. WimpExt_GetFontMenu      &457B7
  76. WimpExt_DecodeFontMenu   &457B8
  77. WimpExt_ControlImmediate &457B9
  78. WimpExt_Heap             &457BA
  79. WimpExt_MemCopy          &457BB
  80. WimpExt_DataSave         &457BC
  81. WimpExt_PlotBorder       &457BD
  82. WimpExt_CentreWindowV    &457BE
  83. WimpExt_Sort             &46380
  84. WimpExt_MemMove          &46381
  85. WimpExt_MenuWidth        &46382
  86. WimpExt_DataLoad         &46383
  87. WimpExt_MoveCaretIcon    &46384
  88. WimpExt_DrawOp           &46385
  89. WimpExt_SpriteOp         &46386
  90. WimpExt_Intersect        &46387
  91. WimpExt_BorderOp         &46388
  92. WimpExt_ManualLink       &46389
  93. WimpExt_MiscOp           &4638A
  94. WimpExt_ViewIcon         &4638B
  95. WimpExt_SubsituteArgs    &4638C
  96. WimpExt_RedirectSprites  &4638D
  97. -------------------------------
  98.  
  99.  
  100. WimpExt_Initialise       &45780
  101. -------------------------------
  102. R0 = 16
  103. R1 = task handle
  104. R2 = features flags
  105.        bit     meaning
  106.        0       Semi-automatic slabbing if set, automatic otherwise
  107.        1       Automatically recreate menus if set
  108.        2       Task wants to use font menus if set
  109.        3       Automatically compact heap once a second if set
  110.        4       'Correct' radio icons if set
  111.        5       Semi-automatic help if set, automatic otherwise
  112.        6       Use alternative parameters for flag-setting SWIs if set
  113.        7       Use R0 of WimpExt_SetIconString[N]
  114.        8       Automatically call WimpExt_MoveCaret
  115.        9       Unset other icons in ESG when setting icons
  116.        10      Automatically call WimpExt_ViewIcon after moving caret
  117.        11      Don't allow TAB for moving between writeable icons
  118.        12-31   reserved; MUST BE 0
  119. Exit:
  120. R0 = WimpExt version number * 100
  121. R2 = pointer to WimpExt's sprite pool
  122.  
  123. Must be called prior to using any other WimpExt calls. R0 must be 11 on
  124. entry. This is so that WimpExtension can work out what version the program
  125. thinks it is calling (so I can change the functionality of calls later whilst
  126. still retaining backwards-compatibility). R2 holds features flags, for
  127. specifying certain things at start-up. If bit 1 of R2 is set then if the user
  128. selects a menu option with the ADJUST button then the menu will automatically
  129. be recreated when you next call WimpExt_PrePoll (assuming you used
  130. 'WimpExt_CreateMenu' to create the menu, that is). If bit 2 of R2 is set then
  131. you are allowed to call WimpExt_GetFontMenu and WimpExt_DecodeFontMenu - you
  132. are NOT allowed to call them if you do not set bit 2. If bit 4 of R2 is set
  133. then the user won't be able to deselect all of a group of radio icons by
  134. clicking adjust on the selected icon.
  135.  
  136.  
  137. WimpExt_CloseDown        &45781
  138. -------------------------------
  139. R0 = task handle
  140.  
  141. MUST be called prior to the task exiting.
  142.  
  143.  
  144. WimpExt_SlabIcon         &45782
  145. -------------------------------
  146. R2 = window handle or 0 for slabbed icon
  147. R3 = icon handle
  148. If semi-automatic slabbing is enabled, then:
  149. R4 = 0 to pop out, any other to pop in
  150.  
  151. To be called to force an icon to be slabbed (for example to slab the default
  152. action icon if RETURN is pressed). If semi-automatic slabbing is enabled then
  153. the icon will be popped in or out depending on R4, otherwise it will be
  154. popped in and then out again. If R2 is zero then the last icon to be slabbed
  155. in (either implicity or explicity) is used. Note that in this case the SWI
  156. might return an error (eg. if the window has been deleted), so use the X form
  157. of the SWI.
  158.  
  159.  
  160. WimpExt_Redraw           &45783
  161. -------------------------------
  162. R1 = Wimp_RedrawWindow block
  163.  
  164. To be called in the window redraw loop, to draw the 3D borders round icons.
  165.  
  166.  
  167. WimpExt_Action           &45784
  168. -------------------------------
  169. R0 = task handle
  170. R1 = Wimp_Poll block
  171. R2 = Wimp_Poll reason code
  172. Exit:
  173. R0 = Wimp_Poll reason code (possibly altered)
  174.  
  175. To be called immediately after Wimp_Poll, to perform actions such as slabbing
  176. icons and changing pointers. WimpExtension may alter the code returned - eg.
  177. if the user clicks in a requester window then the code will be translated
  178. before your program gets to see it.
  179.  
  180.  
  181. WimpExt_IconBarSprite    &45785
  182. -------------------------------
  183. R2 = -2 for left of iconbar, -1 for right
  184. R3 = pointer to sprite name
  185. R5 = icon button type (eg. 3)
  186. Exit:
  187. R0 = icon handle
  188.  
  189. Will place a sprite on the iconbar, returning the icon handle. Note that the
  190. sprite name is copied out of the memory block, which can be reused. Also note
  191. that the number in R5 is just the button type, not the flags.
  192.  
  193.  
  194. WimpExt_IconBarText      &45786
  195. -------------------------------
  196. R2 = -2 for left of iconbar, -1 for right
  197. R3 = pointer to sprite name
  198. R4 = pointer to text (max. 128 chars inc. terminator)
  199. R5 = icon button type (eg. 3)
  200. Exit:
  201. R0 = icon handle
  202.  
  203. Will place a sprite on the iconbar, with a text message underneath, returning
  204. the icon handle. Note that the sprite name is copied out of the memory block,
  205. which can be reused, but the text remains where it is; this is so you can
  206. change the text after creating the icon. Also note that the number in R5 is
  207. just the button type, not the flags.
  208.  
  209.  
  210. WimpExt_LinkWindows      &45787
  211. -------------------------------
  212. R2 = main window handle
  213. R3 = sub-window handle
  214. R4 = flags
  215.      bit    meaning
  216.      0      clip linked window to the left of the main window
  217.      1      clip linked window to the right of the main window
  218.      2      clip linked window above the main window
  219.      3      clip linked window below the main window
  220.      4-30   reserved; MUST BE 0
  221.      31     link is hidden
  222.  
  223. Will link two windows so the sub-window moves with the main window. Currently
  224. there is a limit of 16 linked windows - this may be removed in a later
  225. version.
  226.  
  227.  
  228. WimpExt_OpenLinked       &45788
  229. -------------------------------
  230. R1 = Wimp_OpenWindow block
  231.  
  232. To be used instead of Wimp_OpenWindow.