home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / d / eventshell / Docs / Events < prev    next >
Encoding:
Text File  |  1993-10-11  |  13.9 KB  |  518 lines

  1.  
  2. PROCshell_AttachPaletteChangeHandler()
  3. Params =>
  4.          str function name
  5.  
  6. Registers a function name to be called when a PaletteChange
  7. message is received. This occurs when the user has finished
  8. dragging the sliders on the Palette application, or when a
  9. new palette is loaded. It is also called when the handler is
  10. set up so that the user application can note the current
  11. parameters.
  12.  
  13. Note that this message is not issued when the screen mode
  14. changes, so tasks interested in colour mapping changes should
  15. call PROCshell_AttachModeChangeHandler as well.
  16.  
  17. User FN (PROCshell_AttachPaletteChangeHandler)
  18. Params =>
  19.          None
  20.  
  21. This function is called when a PaletteChange message is
  22. received and also when PROCshell_AttachPaletteChangeHandler
  23. is called.
  24.  
  25. --------------------------------------------------------
  26.  
  27. PROCshell_AttachModeChangeHandler()
  28. Params =>
  29.          str function name
  30.  
  31. Registers a function name to be called when a ModeChange
  32. message is received. This allows the application to check
  33. any mode-specific parameters such as screen width etc. It
  34. is also called when the handler is set up so that the user
  35. application can note the current parameters.
  36.  
  37. User FN (PROCshell_AttachModeChangeHandler) 
  38. Params => 
  39.          None 
  40.  
  41. This function is called when a ModeChange message is
  42. received and also when PROCshell_AttachModeChangeHandler
  43. is called
  44.  
  45. --------------------------------------------------------
  46.  
  47. PROCshell_AttachTaskInitialiseHandler()
  48. Params =>
  49.          str function name
  50.  
  51. Registers a function name to be called when a TaskInitialise
  52. message is received. This allows the application to keep
  53. track of any new tasks started after it.
  54.  
  55. User FN (PROCshell_AttachTaskInitialiseHandler) 
  56. Params => 
  57.          None 
  58.  
  59. This function is called when a TaskInitialise  message is
  60. received.
  61.  
  62. --------------------------------------------------------
  63.  
  64. PROCshell_AttachTaskCloseDownHandler()
  65. Params =>
  66.          str function name
  67.  
  68. Registers a function name to be called when a TaskCloseDown
  69. message is received.This message is sent when a task (other
  70. than the current one) is killed.
  71.  
  72. User FN (PROCshell_AttachTaskCloseDownHandler)
  73. Params => 
  74.          None 
  75.  
  76. This function is called when a TaskCloseDown message is
  77. received.
  78.  
  79. --------------------------------------------------------
  80.  
  81. PROCshell_AttachPane()
  82. Params =>
  83.          int window handle
  84.          int pane handle
  85.          int pane flags
  86.          int x offset of pane relative to parent window
  87.          int y offset of pane relative to parent window
  88.  
  89. Pane Flags (PROCshell_AttachPane)
  90. 0 = attached to parent window work area
  91. 1 = not used
  92. 2 = attached to left edge
  93. 3 = attached to bottom edge
  94. 4 = attached to right edge
  95. 5 = attached to top edge
  96.  
  97. If necessary the window flags of the pane window are
  98. changed so that the 'pane' bit is on and the 'moveable'
  99. bit is off, so that editing the template file is not
  100. required.
  101.  
  102. --------------------------------------------------------
  103.  
  104. PROCshell_AttachDataLoad()
  105. Attaches a dataload handler to a window/icon pair.
  106.  
  107. Params =>
  108.          int  window handle
  109.          int  icon handle
  110.          int  filetype to recognise and optionally
  111.               load (see no load flag)
  112.          str  function name
  113.          bool no load flag
  114.  
  115. Note that it is possible to call this function for
  116. the same window/icon pair more than once giving
  117. different filetypes (and function names if required)
  118. to allow the handling of multiple filetypes.
  119.  
  120. User FN (PROCshell_AttachDataLoad)
  121. Params =>
  122.          int address file has been loaded at
  123.          int filetype of file
  124.          str full pathname of file
  125.          int file size (from dataload message)
  126.  
  127. Note that if the event was attached with the
  128. no load flag set to TRUE the address will
  129. be -1 and the user application is expected to
  130. actually load the file.
  131.  
  132. DataLoad 'No Load' flag
  133. FALSE = data file is loaded in a heap block and
  134.         the name and address is returned to the
  135.         user application.
  136.  
  137. TRUE  = only the data file name and type is
  138.         returned to the user application.
  139.  
  140. This flag is provided for maximum flexibility
  141. when dealing with drag loads. When you are
  142. converting an existing program to run under the
  143. EvntShell system you may already have a working
  144. load routine. In this case set the flag to TRUE
  145. and when a drag load occurs your application will
  146. be told the filename, which may then be loaded
  147. and processed as required.
  148.  
  149. When this flag is FALSE the library routines will
  150. reserve a memory block for the file and load it
  151. automatically.
  152.  
  153. For the technical of you out there the library
  154. stores the status of the no load flag in the top
  155. bit of the filetype number. This will end in tears
  156. when RISC-OS 4 comes out...
  157.  
  158. --------------------------------------------------------
  159.  
  160. PROCshell_AttachDataSave()
  161. Attaches a datasave handler to a window/icon pair. A
  162. typical use would be in a 'Save As' dialog box, the
  163. icon handle being that of the 'File Type' icon.
  164.  
  165. Params =>
  166.          int window handle
  167.          int icon handle
  168.          int address of heapblock holding data or
  169.              the estimated file size
  170.          int file type for saved file
  171.          int icon nr of filename icon
  172.          str function name (optional if data
  173.              is held in a heapblock)
  174.  
  175. If icon 0 in the window is clicked on then a check
  176. is made that the filename icon contains a valid
  177. path name, generating an error if it does not.
  178.  
  179. Note that the third parameter can point to a heap
  180. block containing the data to save which means that
  181. the data must exist in the block (or at least the
  182. block must exist and be the correct size) before
  183. this routine is called. If this parameter is >&8000
  184. it is taken to be a pointer to the heap block , and
  185. the name of the function to perform the save is
  186. optional.
  187.  
  188. Alternatively this parameter can be an estimated
  189. file size (i.e. <&8000) in which case the user
  190. function may write directly into the file whose
  191. name is given as a parameter to the function. RAM
  192. transfer is not possible if this is the case.
  193.  
  194. The button type of the filetype icon is automatically
  195. changed to click/drag.
  196.  
  197. User FN (PROCshell_AttachDataSave)
  198. Params =>
  199.          str full filename of file
  200.  
  201. This function is not called if the file is stored
  202. in a heap block. In this case the whole contents of
  203. the heap block are transferred.
  204.  
  205. Estimated File Sizes
  206. It should (if other applications are written to
  207. the Acorn guidelines!) not matter if this estimate
  208. is inaccurate. However, file transfer will be a
  209. little faster if it is accurate and problems may
  210. occur with badly written applications if it is not.
  211.  
  212. --------------------------------------------------------
  213.  
  214. PROCshell_AttachClickSelect()
  215. Params =>    
  216.          int window handle       
  217.          int icon handle 
  218.          str function name
  219.  
  220. User FN (PROCshell_AttachClickSelect)
  221. Params => 
  222.          int window handle
  223.          int icon handle
  224.  
  225. --------------------------------------------------------
  226.  
  227. PROCshell_AttachClickAdjust()
  228. Params =>     
  229.          int window handle           
  230.          int icon handle  
  231.          str function name
  232.  
  233. User FN (PROCshell_AttachClickAdjust)
  234. Params => 
  235.          int window handle
  236.          int icon handle
  237.  
  238. --------------------------------------------------------
  239.  
  240. PROCshell_AttachUserRedraw()
  241. Params =>      
  242.          int window handle      
  243.          str function name
  244.  
  245. A check is made to ensure that the 'Auto redraw' flag of
  246. the window is off, and the flag is cleared automatically
  247. if necessary (i.e. you don't have to use !FormEd or
  248. similar to set the flag correctly)
  249.  
  250. User FN (PROCshell_AttachUserRedraw)
  251. Params => 
  252.          int address of block returned by redraw
  253.              request
  254.          int x origin of window (screen coords)
  255.          int y origin of window (screen coords)
  256.  
  257. The function to call when a redraw request
  258. is made.
  259.  
  260. --------------------------------------------------------
  261.  
  262. PROCshell_AttachDrag()
  263. Params =>        
  264.          int window handle        
  265.          int icon handle     
  266.          str function name
  267.  
  268.  
  269. User FN (FNshell_AttachDrag)
  270. Params =>
  271.          int window handle over which drag
  272.              started
  273.          int icon handle over which drag was
  274.              started (-1 for no icon)
  275.  
  276. --------------------------------------------------------
  277.  
  278. PROCshell_AttachHelpTag()
  279. Params =>         
  280.          int window handle         
  281.          int icon handle      
  282.          str <message tag=>MessageTag>
  283.  
  284. Note that any message tags found in icon
  285. validation strings override tags set up by
  286. this routine.
  287.  
  288. --------------------------------------------------------
  289.  
  290. PROCWimpCloseDown
  291. Params =>
  292.          None
  293.  
  294. Not used in EvntShell library - use <PROCshell_WimpCloseDown_I> instead.
  295.  
  296. --------------------------------------------------------
  297.  
  298. PROCshell_WimpCloseDown_I
  299. Params => 
  300.          None
  301.  
  302. Called when the application shuts down (the library calls
  303. this automatically)
  304.  
  305. --------------------------------------------------------
  306.  
  307. PROCshell_AttachBumpHandler()
  308. Params =>     
  309.          int  window handle
  310.          int  icon handle (display value)
  311.          int  icon handle (increment value)
  312.          int  icon handle (decrement value)
  313.          int  lower limit
  314.          int  upper limit
  315.          int  step
  316.          bool wrap flag
  317.          str  function name 1 (can be "")
  318.          str  function name 2 (can be "")
  319.  
  320. Bump icons are the arrows that allow you to alter the
  321. value displayed in an icon (usually but not necessarily
  322. a writable one). Note that a click on a bump icon with
  323. ADJUST has the opposite effect to a click with SELECT.
  324.  
  325. User FN1 (PROCshell_AttachBumpHandler)
  326. Params => 
  327.          int value
  328.  
  329.        <=
  330.          str converted value
  331.  
  332. This function is called before the new value
  333. is placed in the display icon. 
  334.  
  335. An example would be converting an integer
  336. value to the format 0h00 (i.e hours and mins).
  337.  
  338. DEF FN_dis_fn(val%)
  339. =STR$(val%DIV60)+"h"+RIGHT$("00"+STR$(val%MOD60),2)
  340.  
  341. See the !VBase2 demo app.
  342.  
  343. User FN2 (PROCshell_AttachBumpHandler)
  344. Params => 
  345.          str value to decode
  346.  
  347.        <=
  348.          int converted value
  349.  
  350. This function is called before the new value
  351. is placed in the display icon.
  352.  
  353. An example would be converting a string "0h00"
  354. back to an integer value.
  355.  
  356. DEF FN_decode_dis(val$)
  357. =VAL(val$)*60+VAL(RIGHT$(val$,2))
  358.  
  359. See the !VBase2 demo app.
  360.  
  361. --------------------------------------------------------
  362.  
  363. PROCshell_AttachHotKey()
  364. Params =>
  365.          str  key
  366.          bool shift flag
  367.          bool ctrl  flag
  368.          bool alt   flag
  369.          str  window identifier
  370.          int  window handle
  371.          str  function name
  372.          str  function name
  373.  
  374. Sets up a 'hotkey' event. Function keys F0-F11
  375. (note NOT F12 as the task manager uses it under
  376. RISC-OS 3) are supported.
  377.  
  378. User FN (PROCshell_AttachHotKey)
  379. Params => 
  380.          int window handle
  381.  
  382. The function to call before opening the window.
  383. A function name of "" may be used if you don't
  384. need to call a function. This would normally be
  385. used to fill in icon fields and set the state
  386. of radio buttons
  387.  
  388. User FN (PROCshell_AttachHotKey)
  389. Params => 
  390.          int window handle
  391.  
  392. The function to call after opening the window.
  393. A function name of "" may be used if you don't
  394. need to call a function.
  395.  
  396. Key (PROCshell_AttachHotKey)
  397. The key string normally consists of one ASCII
  398. character i.e. "R". When the ctrl flag is set
  399. this would cause the actions to be carried out
  400. when CTRL-R is pressed.
  401.  
  402. The string may also contain "F1" to "F11" to
  403. allow function keys to be used. No checking is
  404. performed on the string.
  405.  
  406. Window (PROCshell_AttachHotKey)
  407. The window identifier specifies the name
  408. of the window you want to appear when the
  409. keypress is received. This parameter is
  410. optional as you might not always want to
  411. open a window.
  412.  
  413. The window is a 'dynamic' dialog box which
  414. will disappear when <ESC> is pressed and
  415. is opened in such a position that the mouse
  416. pointer is in the middle of the window
  417. (where possible).
  418.  
  419. Window Handle (shell_AttachHotKey)
  420. When this is >0 then the window
  421. created will be static i.e. it will not
  422. be removed when the mouse is clicked
  423. outside it, or when <ESC> is pressed.
  424.  
  425. --------------------------------------------------------
  426.  
  427. PROCshell_DoBackgroundTask
  428. Params =>
  429.          None
  430.  
  431. Called everytime a null reason code is received
  432.  
  433. --------------------------------------------------------
  434.  
  435. PROCshell_HandleUnknownMessage()
  436. Params =>
  437.          int address of message block
  438.  
  439. Called every time an unknown message is received.
  440.  
  441. --------------------------------------------------------
  442.  
  443. PROCshell_AttachCloseWindowHandler()
  444. Params =>
  445.          int window handle
  446.          str function name
  447.  
  448. Registers a function name to be called when an 
  449. CloseWindow message is received. This is useful
  450. to prevent the window closing if so doing
  451. would involve loss of data.
  452.  
  453. This message is issued when the window close
  454. icon is clicked on.
  455.  
  456. User FN (PROCshell_AttachCloseWindowHandler)
  457. Params => 
  458.          None 
  459.  
  460.        <=
  461.          bool 0 to disallow close, non 0 to
  462.               close
  463.  
  464. --------------------------------------------------------
  465.  
  466. PROCshell_AttachOpenWindowHandler()
  467. Params =>
  468.          int window handle
  469.          str function name
  470.  
  471. Registers a function name to be called when an 
  472. OpenWindow message is received. This is useful
  473. so that the application can set a flag to
  474. avoid doing window redraws while the window is
  475. closed for example.
  476.  
  477. This message is issued when the window is
  478. dragged around the screen as well as when
  479. the program opens the window. You should avoid
  480. doing time consuming stuff in the function that
  481. is called therefore.
  482.  
  483. User FN (PROCshell_AttachOpenWindowHandler)
  484. Params => 
  485.          None 
  486.  
  487.        <=
  488.          bool 0 to disallow open, non 0 to
  489.               open
  490.               
  491. --------------------------------------------------------
  492.  
  493. PROCshell_AttachPreQuitHandler()
  494. Params =>
  495.          str function name
  496.  
  497. Registers a function name to be called when a 
  498. PreQuit message is received. This gives the
  499. application a chance to save data or abort
  500. the shutdown.
  501.  
  502. This message is issued when the task is quit
  503. from the Task Manager, or when CTRL-SHIFT-F12
  504. is pressed (under RISC OS 3).
  505.  
  506. User FN (PROCshell_AttachPreQuitHandler)
  507. Params => 
  508.          None 
  509.  
  510.        <=
  511.          bool non 0 to allow quit, 0 to
  512.               cancel quit
  513.  
  514. This function is called when a PreQuit
  515. message is received.
  516.  
  517. --------------------------------------------------------
  518.