home *** CD-ROM | disk | FTP | other *** search
EPOC OPL Source | 1999-02-28 | 2.5 KB | 87 lines |
-
-
- rem PlugIn template for Start5 v2.0
- rem Rev. 0.5
- rem ©1998 A. Pemsel
-
- rem -------------------------------
-
- rem Some comments about creating PlugIns:
- rem 1) Replace "PlugIn" with your PlugIn's
- rem name in the procedure names
- rem 2) Copy the translated OPO file to
- rem \System\Apps\Start5\PlugIns\*.plg
- rem 3) Restart Start5
- rem 4) At the moment Start5 is not protected
- rem against corrupt PlugIns
- rem 5) It is possible to return 0 as the PlugIns
- rem width. These PlugIns are used as a patch
- rem for Start5
- rem 6) There is a maximum of 6 PlugIns that can
- rem be loaded by Start5
- rem 7) There is no support for global vars (yet)
- rem 8) PlugIns may use Start5's API (a docu
- rem of the API will be available)
-
- const KPlugInUpdateRateNever%=0
- rem PlugIn_Update:(wid%) is never called
-
- const KPlugInUpdateRateNormal%=1 rem at least
- rem every 10s when in foreground, not in
- rem background
-
- const KPlugInUpdateRateHigh%=2 rem at least
- rem every 2s when in foreground, not in
- rem background
-
- const KPlugInUpdateRateMax%=3 rem at least
- rem every second when in foreground and
- rem in background
- rem IMPORTANT NOTE: This will reconfigure
- rem Start5's internal timer and therefore
- rem increase CPU and battery load.
-
- const KPlugInHeight%=22 rem all PlugIns have the same height in v2.0PA
-
- rem This proc is called when the PlugIn is loaded
- proc PlugIn_Load:
- endp
-
- rem This proc must return the PlugIn's width
- proc PlugIn_Width%:
- return 24
- endp
-
- rem This proc must return one of the constants
- rem defined above
- proc PlugIn_UpdateRate%:
- return
- endp
-
- rem This is called only once after the PlugIn
- rem got its own window. wid% is the WindowID of
- rem the PlugIns window.
- proc PlugIn_Draw:(wid%)
- endp
-
- rem This is called from time to time (depending
- rem on the update rate setting). As Start5 and all
- rem PlugIns are executed in cooperative multitasking
- rem this proc should return as fast as possible.
- rem (Normally after max. 1/4 sec.)
- proc PlugIn_Update:(wid%)
- endp
-
- rem This will be called when the PlugIn is unloaded.
- proc PlugIn_Unload:
- endp
-
- rem Perhaps the most important proc. Called whenever
- rem the PlugIns window is tapped. Note that if you
- rem stop the program in this proc, Start5 will not
- rem react to events.
- proc PlugIn_Tapped:
- endp
-
-
-