home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilsd / evntshell / Docs / Events < prev    next >
Encoding:
Text File  |  1995-11-11  |  17.3 KB  |  644 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. The specified function will be called in
  187. this case.
  188.  
  189. Alternatively this parameter can be an estimated
  190. file size (i.e. <&8000) in which case the user
  191. function may write directly into the file whose
  192. name is given as a parameter to the function. RAM
  193. transfer is not possible if this is the case.
  194.  
  195. The button type of the filetype icon is automatically
  196. changed to click/drag.
  197.  
  198. User FN (PROCshell_AttachDataSave)
  199. Params =>
  200.          str full filename of file
  201.  
  202. This function is not called if the file is stored
  203. in a heap block. In this case the whole contents of
  204. the heap block are transferred.
  205.  
  206. Estimated File Sizes
  207. It should (if other applications are written to
  208. the Acorn guidelines!) not matter if this estimate
  209. is inaccurate. However, file transfer will be a
  210. little faster if it is accurate and problems may
  211. occur with badly written applications if it is not.
  212.  
  213. --------------------------------------------------------
  214.  
  215. PROCshell_AttachClickSelect()
  216. Params =>    
  217.          int window handle       
  218.          int icon handle 
  219.          str function name
  220.  
  221. User FN (PROCshell_AttachClickSelect)
  222. Params => 
  223.          int window handle
  224.          int icon handle
  225.  
  226. --------------------------------------------------------
  227.  
  228. PROCshell_AttachClickAdjust()
  229. Params =>     
  230.          int window handle           
  231.          int icon handle  
  232.          str function name
  233.  
  234. User FN (PROCshell_AttachClickAdjust)
  235. Params => 
  236.          int window handle
  237.          int icon handle
  238.  
  239. --------------------------------------------------------
  240.  
  241. PROCshell_AttachUserRedraw()
  242. Params =>      
  243.          int window handle      
  244.          str function name
  245.  
  246. A check is made to ensure that the 'Auto redraw' flag of
  247. the window is off, and the flag is cleared automatically
  248. if necessary (i.e. you don't have to use !FormEd or
  249. similar to set the flag correctly)
  250.  
  251. User FN (PROCshell_AttachUserRedraw)
  252. Params => 
  253.          int address of block returned by redraw
  254.              request
  255.          int x origin of window (screen coords)
  256.          int y origin of window (screen coords)
  257.  
  258. The function to call when a redraw request
  259. is made.
  260.  
  261. --------------------------------------------------------
  262.  
  263. PROCshell_AttachDrag()
  264. Params =>        
  265.          int window handle        
  266.          int icon handle     
  267.          str function name
  268.  
  269.  
  270. User FN (FNshell_AttachDrag)
  271. Params =>
  272.          int window handle over which drag
  273.              started
  274.          int icon handle over which drag was
  275.              started (-1 for no icon)
  276.  
  277. --------------------------------------------------------
  278.  
  279. PROCshell_AttachHelpTag()
  280. Params =>         
  281.          int window handle         
  282.          int icon handle      
  283.          str <message tag=>MessageTag>
  284.  
  285. Note that any message tags found in icon
  286. validation strings override tags set up by
  287. this routine.
  288.  
  289. --------------------------------------------------------
  290.  
  291. PROCWimpCloseDown
  292. Params =>
  293.          None
  294.  
  295. Not used in EvntShell library - use <PROCshell_WimpCloseDown_I> instead.
  296.  
  297. --------------------------------------------------------
  298.  
  299. PROCshell_WimpCloseDown_I
  300. Params => 
  301.          None
  302.  
  303. Called when the application shuts down (the library calls
  304. this automatically)
  305.  
  306. --------------------------------------------------------
  307.  
  308. PROCshell_AttachBumpHandler()
  309. Params =>     
  310.          int  window handle
  311.          int  icon handle (display value)
  312.          int  icon handle (increment value)
  313.          int  icon handle (decrement value)
  314.          int  lower limit
  315.          int  upper limit
  316.          int  step
  317.          bool wrap flag
  318.          str  function name 1 (can be "")
  319.          str  function name 2 (can be "")
  320.  
  321. Bump icons are the arrows that allow you to alter the
  322. value displayed in an icon (usually but not necessarily
  323. a writable one). Note that a click on a bump icon with
  324. ADJUST has the opposite effect to a click with SELECT.
  325.  
  326. Pressing SHIFT while clicking on a bump icon will double 
  327. the step value, CTRL will make the step 4 times larger,
  328. SHIFT and CTRL makes the step 8 times larger.
  329.  
  330. User FN1 (PROCshell_AttachBumpHandler)
  331. Params => 
  332.          int value
  333.          int mouse button pressed (SELECT = 4,
  334.              ADJUST = 1
  335.        <=
  336.          str converted value
  337.  
  338. This function is called before the new value
  339. is placed in the display icon. 
  340.  
  341. An example would be converting an integer
  342. value to the format 0h00 (i.e hours and mins).
  343.  
  344. DEF FN_dis_fn(val%)
  345. =STR$(val%DIV60)+"h"+RIGHT$("00"+STR$(val%MOD60),2)
  346.  
  347. See the !VBase2 demo app.
  348.  
  349. User FN2 (PROCshell_AttachBumpHandler)
  350. Params => 
  351.          str value to decode
  352.  
  353.        <=
  354.          int converted value
  355.  
  356. This function is called before the new value
  357. is placed in the display icon.
  358.  
  359. An example would be converting a string "0h00"
  360. back to an integer value.
  361.  
  362. DEF FN_decode_dis(val$)
  363. =VAL(val$)*60+VAL(RIGHT$(val$,2))
  364.  
  365. See the !VBase2 demo app.
  366.  
  367. --------------------------------------------------------
  368.  
  369. PROCshell_AttachHotKey()
  370. Params =>
  371.          str  key
  372.          bool shift flag
  373.          bool ctrl  flag
  374.          bool alt   flag
  375.          str  window identifier
  376.          int  window handle
  377.          str  function name
  378.          str  function name
  379.  
  380. Sets up a 'hotkey' event. Function keys F0-F11
  381. (note NOT F12 as the task manager uses it under
  382. RISC-OS 3) are supported.
  383.  
  384. User FN (PROCshell_AttachHotKey)
  385. Params => 
  386.          int window handle
  387.  
  388. The function to call before opening the window.
  389. A function name of "" may be used if you don't
  390. need to call a function. This would normally be
  391. used to fill in icon fields and set the state
  392. of radio buttons
  393.  
  394. User FN (PROCshell_AttachHotKey)
  395. Params => 
  396.          int window handle
  397.  
  398. The function to call after opening the window.
  399. A function name of "" may be used if you don't
  400. need to call a function.
  401.  
  402. Key (PROCshell_AttachHotKey)
  403. The key string normally consists of one ASCII
  404. character i.e. "R". When the ctrl flag is set
  405. this would cause the actions to be carried out
  406. when CTRL-R is pressed.
  407.  
  408. The string may also contain "F1" to "F11" to
  409. allow function keys to be used. No checking is
  410. performed on the string.
  411.  
  412. Window (PROCshell_AttachHotKey)
  413. The window identifier specifies the name
  414. of the window you want to appear when the
  415. keypress is received. This parameter is
  416. optional as you might not always want to
  417. open a window.
  418.  
  419. The window is a 'dynamic' dialog box which
  420. will disappear when <ESC> is pressed and
  421. is opened in such a position that the mouse
  422. pointer is in the middle of the window
  423. (where possible).
  424.  
  425. Window Handle (shell_AttachHotKey)
  426. When this is >0 then the window
  427. created will be static i.e. it will not
  428. be removed when the mouse is clicked
  429. outside it, or when <ESC> is pressed.
  430.  
  431. --------------------------------------------------------
  432.  
  433. PROCshell_DoBackgroundTask
  434. Params =>
  435.          None
  436.  
  437. Called everytime a null reason code is received
  438.  
  439. --------------------------------------------------------
  440.  
  441. PROCshell_HandleUnknownMessage()
  442. Params =>
  443.          int address of message block
  444.  
  445. Called every time an unknown message is received.
  446.  
  447. --------------------------------------------------------
  448.  
  449. PROCshell_AttachCloseWindowHandler()
  450. Params =>
  451.          int window handle
  452.          str function name
  453.  
  454. Registers a function name to be called when an 
  455. CloseWindow message is received. This is useful
  456. to prevent the window closing if so doing
  457. would involve loss of data.
  458.  
  459. This message is issued when the window close
  460. icon is clicked on.
  461.  
  462. User FN (PROCshell_AttachCloseWindowHandler)
  463. Params => 
  464.          None 
  465.  
  466.        <=
  467.          bool 0 to disallow close, non 0 to
  468.               close
  469.  
  470. --------------------------------------------------------
  471.  
  472. PROCshell_AttachOpenWindowHandler()
  473. Params =>
  474.          int window handle
  475.          str function name
  476.  
  477. Registers a function name to be called when an 
  478. OpenWindow message is received. This is useful
  479. so that the application can set a flag to
  480. avoid doing window redraws while the window is
  481. closed for example.
  482.  
  483. This message is issued when the window is
  484. dragged around the screen as well as when
  485. the program opens the window. You should avoid
  486. doing time consuming stuff in the function that
  487. is called therefore.
  488.  
  489. User FN (PROCshell_AttachOpenWindowHandler)
  490. Params => 
  491.          None 
  492.  
  493.        <=
  494.          bool 0 to disallow open, non 0 to
  495.               open
  496.               
  497. --------------------------------------------------------
  498.  
  499. PROCshell_AttachPreQuitHandler()
  500. Params =>
  501.          str function name
  502.  
  503. Registers a function name to be called when a 
  504. PreQuit message is received. This gives the
  505. application a chance to save data or abort
  506. the shutdown.
  507.  
  508. This message is issued when the task is quit
  509. from the Task Manager, or when CTRL-SHIFT-F12
  510. is pressed (under RISC OS 3).
  511.  
  512. User FN (PROCshell_AttachPreQuitHandler)
  513. Params => 
  514.          None 
  515.  
  516.        <=
  517.          bool non 0 to allow quit, 0 to
  518.               cancel quit
  519.  
  520. This function is called when a PreQuit
  521. message is received.
  522.  
  523. --------------------------------------------------------
  524.  
  525. PROCshell_AttachColourPopupMenu()
  526. Params =>  
  527.          int  window handle
  528.          int  menu    icon handle
  529.          int  display icon handle
  530.          int  menu handle
  531.          str  user function (optional)
  532.  
  533. Provides for automatic updating of a display
  534. icon when a selection is made from the
  535. attached colour menu. If a user function name
  536. is not supplied then the display icon shows
  537. the selected menu item background colour.
  538.  
  539. The button type of the menu icon is changed
  540. to 3 to ensure the menu opens when <SELECT>
  541. is used.
  542.  
  543. --------------------------------------------------------
  544.  
  545. PROCshell_AttachPopupMenu()
  546. Params =>  
  547.          int  window handle
  548.          int  menu    icon handle
  549.          int  display icon handle
  550.          int  menu handle
  551.          str  user function (optional)
  552.  
  553. Provides for automatic updating of a display
  554. icon when a selection is made from the
  555. attached menu. If a user function name is
  556. not supplied then the display icon shows
  557. the selected menu item text.
  558.  
  559. The button type of the menu icon is changed
  560. to 3 to ensure the menu opens when <SELECT>
  561. is used.
  562.  
  563. --------------------------------------------------------
  564.  
  565. PROCshell_AttachPopupDatePicker()
  566. Params =>  
  567.          int  window handle
  568.          int  menu    icon handle
  569.          int  display icon handle (may be -1)
  570.          str  notify FN (may be "")
  571.  
  572. This popup displays a Calendar for the current
  573. month (although the month may be incremented
  574. and decremented) enabling the selection of a
  575. date.
  576.  
  577. To use this popup two extension libraries must
  578. be loaded, CalLib and DatePick. This can be done
  579. as follows:
  580.  
  581. void% = FNshell_InstallLib( "<EvntShell$Path>
  582.         Extensions.CalLib" )
  583. void% = FNshell_InstallLib( "<EvntShell$Path>
  584.         Extensions.DatePick" )
  585.  
  586. In addition a template called 'datepicker' must
  587. exist in the loaded template file. This can be
  588. found in the !EvntShell application in the
  589. directory Resources.UK.Templates.2D and 3D. The
  590. appearance may be edited but the icons may not
  591. be renumbered.
  592.  
  593. The message file must also include the following
  594. tokens:
  595.  
  596. #message strings for CalLib
  597. monthstr:JanFebMarAprMayJunJulAugSepOctNovDec
  598. daystr:SunMonTueWedThuFriSat
  599. today:Today
  600.  
  601. User FN (PROCshell_AttachPopupDatePicker)
  602. Params => 
  603.          str date in dd.mm.yy format
  604.  
  605. This function is called when a valid
  606. selection has been made in the DatePicker
  607. popup. If this function is supplied then
  608. it is up to your application to act on
  609. the returned date. Otherwise the specified
  610. display icon is updated with the string.
  611.  
  612. --------------------------------------------------------
  613.  
  614. FNEvnts_GetLastMouseButtonClicked()
  615. Params =>
  616.          None
  617.  
  618. Returns the value of the last mouse button
  619. pressed. 4 = SELECT, 2 = MENU, 1 = ADJUST
  620.  
  621. --------------------------------------------------------
  622.  
  623. PROCshell_AttachIconWatch()
  624. =>    int    window handle
  625.     int    icon handle
  626.     str    function to call when value
  627.          changes
  628.  
  629. User FN (PROCshell_AttachIconWatch)
  630. =>    str    new icon contents
  631.  
  632. <=    int    no meaning
  633.  
  634. --------------------------------------------------------
  635.  
  636. PROCshell_AttachMenuHelpTag()
  637. =>    str    menu name
  638.     int    item handle
  639.     str    message tag
  640.  
  641. This facility is only available under Risc OS 3 or
  642. later.
  643.  
  644. --------------------------------------------------------