home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 400 / STARTS5.SIS / devkit.SIS / PlugIn (.txt) < prev    next >
Encoding:
EPOC OPL Source  |  1999-02-28  |  2.5 KB  |  87 lines

  1.  
  2.  
  3. rem PlugIn template for Start5 v2.0
  4. rem Rev. 0.5
  5. rem ┬⌐1998 A. Pemsel
  6.  
  7. rem -------------------------------
  8.  
  9. rem Some comments about creating PlugIns:
  10. rem 1) Replace "PlugIn" with your PlugIn's
  11. rem    name in the procedure names
  12. rem 2) Copy the translated OPO file to
  13. rem    \System\Apps\Start5\PlugIns\*.plg
  14. rem 3) Restart Start5
  15. rem 4) At the moment Start5 is not protected
  16. rem       against corrupt PlugIns
  17. rem 5) It is possible to return 0 as the PlugIns
  18. rem    width. These PlugIns are used as a patch
  19. rem    for Start5
  20. rem 6) There is a maximum of 6 PlugIns that can
  21. rem    be loaded by Start5
  22. rem 7) There is no support for global vars (yet)
  23. rem 8) PlugIns may use Start5's API (a docu
  24. rem    of the API will be available)
  25.  
  26. const KPlugInUpdateRateNever%=0
  27.             rem PlugIn_Update:(wid%) is never called
  28.  
  29. const KPlugInUpdateRateNormal%=1 rem at least
  30.             rem every 10s when in foreground, not in
  31.             rem background
  32.             
  33. const KPlugInUpdateRateHigh%=2 rem at least
  34.             rem every 2s when in foreground, not in
  35.             rem background
  36.             
  37. const KPlugInUpdateRateMax%=3 rem at least
  38.             rem every second when in foreground and
  39.             rem in background
  40.             rem IMPORTANT NOTE: This will reconfigure
  41.             rem Start5's internal timer and therefore
  42.             rem increase CPU and battery load.
  43.             
  44. const KPlugInHeight%=22 rem all PlugIns have the same height in v2.0PA
  45.  
  46. rem This proc is called when the PlugIn is loaded
  47. proc PlugIn_Load:
  48. endp
  49.  
  50. rem This proc must return the PlugIn's width
  51. proc PlugIn_Width%:
  52.     return 24
  53. endp
  54.  
  55. rem This proc must return one of the constants
  56. rem defined above
  57. proc PlugIn_UpdateRate%:
  58.     return
  59. endp
  60.  
  61. rem This is called only once after the PlugIn
  62. rem got its own window. wid% is the WindowID of
  63. rem the PlugIns window.
  64. proc PlugIn_Draw:(wid%)
  65. endp
  66.  
  67. rem This is called from time to time (depending
  68. rem on the update rate setting). As Start5 and all
  69. rem PlugIns are executed in cooperative multitasking
  70. rem this proc should return as fast as possible.
  71. rem (Normally after max. 1/4 sec.)
  72. proc PlugIn_Update:(wid%)
  73. endp
  74.  
  75. rem This will be called when the PlugIn is unloaded.
  76. proc PlugIn_Unload:
  77. endp
  78.  
  79. rem Perhaps the most important proc. Called whenever
  80. rem the PlugIns window is tapped. Note that if you
  81. rem stop the program in this proc, Start5 will not
  82. rem react to events.
  83. proc PlugIn_Tapped:
  84. endp
  85.  
  86.  
  87.