home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / l / libstore / !LibStore / Index / WimpLib / Poll < prev    next >
Encoding:
Text File  |  1993-02-15  |  2.9 KB  |  90 lines

  1. Index file for the "Poll" library:
  2.  
  3. Procedures/functions provided:
  4.  
  5. DEFPROCstartup(taskname$,version%) - This starts up the WIMP. The version
  6. number (2 or 3) should be stored in version%.
  7.  
  8. DEFPROCdecode_poll(poll_no%) - This puts the information returned from
  9. Wimp_Poll in useful variables. poll_no% is the reason code returned from
  10. Wimp_Poll. The variables are:
  11. whandle% - the window handle
  12. x% - the x coordinate
  13. y% - the y coordinate
  14. button% - the mouse button pressed
  15. ihandle% - the icon handle
  16. windx% - the x coordinate in the window
  17. windy% - the y coordinate in the windows
  18. index% - the index into the screen
  19. key% - the key pressed
  20. main% - the main menu selection
  21. subn% - submenu n selection
  22. size% - the message size
  23. sender_handle% - the task handle of the sender
  24. my_ref% - my ref
  25. your_ref% - your ref
  26. action_code% - the action code
  27.  
  28. DEFFNpoll(mask%) - calls Wimp_Poll. It returns with the reason code.
  29.  
  30. DEFFNpollidle(mask%,time%) - calls Wimp_PollIdle. It returns a null code
  31. after time% centiseconds.
  32.  
  33. DEFPROCpoll(mask%) - a complete poll loop. It will exit and close down the
  34. WIMP when quit%=TRUE.
  35.  
  36. DEFPROCpollidle(mask%,time%) - a complete idle poll loop. The parameters
  37. are the same as for FNpollidle. When quit%=TRUE, it will exit and close
  38. down the WIMP.
  39.  
  40. DEFPROCclosedown - closes down the WIMP.
  41.  
  42. DEFPROCrespond - will call your task if the poll loop can't do something.
  43.  
  44. DEFPROCstandard - is called if you have told the poll loop to do so, so
  45. opening and closing windows (for example) can be automatic.
  46.  
  47.  
  48. Procedures needed:
  49.  
  50. DEFPROCrespond_null - called when a null reason code is sent
  51. DEFPROCrespond_redraw - called when a redraw code is sent
  52. DEFPROCrespond_open - called when an open window code is sent
  53. DEFPROCrespond_close - called when a close window code is sent
  54. DEFPROCrespond_leave - called when the pointer leaves a window
  55. DEFPROCrespond_enter - called when the pointer enters a window
  56. DEFPROCrespond_click - called when a mouse button is clicked
  57. DEFPROCrespond_drag - called when a drag has ended
  58. DEFPROCrespond_key - called when a 'special' key is pressed
  59. DEFPROCrespond_menu - called when a menu item has been selected
  60. DEFPROCrespond_scroll - called when a scroll request is recieved
  61. DEFPROCrespond_LoseCaret - called when you lose the caret
  62. DEFPROCrespond_GainCaret - called when you gain the caret
  63. DEFPROCrespond_PollWordNonZero - RISC OS 3 only
  64. DEFPROCrespond_unknown - called if an unknown message is recieved
  65. DEFPROCrespond_message - called if a message is recieved
  66.  
  67. All the above are only called if the appropriate part of respond%() is set
  68. to 1. The values are below:
  69.  
  70. 0 - null
  71. 1 - redraw
  72. 2 - open
  73. 3 - close
  74. 4 - leave
  75. 5 - enter
  76. 6 - click
  77. 7 - drag
  78. 8 - key
  79. 9 - menu
  80. 10 - scroll
  81. 11 - LoseCaret
  82. 12 - GainCaret
  83. 13 - PollWordNonZero
  84. 14-16 - unknown
  85. 17-19 - message
  86.  
  87. Please note that the variable 'ver%' needs to contain the version number
  88. of RISCOS in the computer running in order for the library to take
  89. advantage of RISC OS 3 extensions.
  90.