home *** CD-ROM | disk | FTP | other *** search
EPOC OPL Source | 1999-02-28 | 2.1 KB | 87 lines |
-
-
- rem Link PlugIn for Start5 v2.0
- rem V1.00
- rem ©1998 Oliver Tölker
-
- rem -------------------------------
-
- include "systinfo.oxh"
-
- const KPluginUpdateRateNever%=0
- const KPluginUpdateRateNormal%=1
- const KPluginUpdateRateHigh%=2
- const KPluginUpdateRateMax%=3 rem not implemented yet
- const KPluginHeight%=22 rem all PlugIns have the same height in v2.0PA
-
- rem This proc is called when the PlugIn is loaded
- proc Link_Load:
- endp
-
- rem This proc must return the PlugIn's width
- proc Link_Width%:
- return 20
- endp
-
- rem This proc must return one of the constants
- rem defined above
- proc Link_UpdateRate%:
- return KPluginUpdateRateHigh%
- 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 Link_Draw:(wid%)
- Link_Update:(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 Link_Update:(wid%)
- LOCAL widb%, linkStatus&
-
- linkStatus&=SIRemoteLinkStatus&:
- widb%=gloadbit(MyDir$+"Plugins\Link.mbm",0, linkStatus&)
- guse wid%
- gat 1,1
- gcopy widb%,0,0,20,20,3
- gclose widb%
- endp
-
- rem This will be called when the PlugIn is unloaded.
- proc Link_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 Link_Tapped:
- LOCAL linkStatus&, action$(7)
-
- linkStatus&=SIRemoteLinkStatus&:
- if linkStatus&=0
- action$="ENABLE"
- elseif linkStatus&=1
- action$="DISABLE"
- else
- action$="DISABLE"
- endif
- dinit "Link Plugin V1.0"
- dtext "", "Do you want to "+action$+" the link ?"
- dbuttons "Yes",%y or $100 or $200,"No",-(%n or $100 or $200)
- if dialog=%y
- if action$="ENABLE"
- SIRemoteLinkEnable:
- else
- SIRemoteLinkDisable:
- endif
- endif
- endp
-
-
-