home *** CD-ROM | disk | FTP | other *** search
EPOC OPL Source | 1999-02-28 | 1.9 KB | 77 lines |
-
-
- rem CF PlugIn for Start5 v2.0
- rem V1.00
- rem ©1998 Oliver Tölker
-
- rem -------------------------------
-
- include "systinfo.oxh"
- include "system.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 CF_Load:
- endp
-
- rem This proc must return the PlugIn's width
- proc CF_Width%:
- return 20
- endp
-
- rem This proc must return one of the constants
- rem defined above
- proc CF_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 CF_Draw:(wid%)
- CF_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 CF_Update:(wid%)
- LOCAL widb%, present%
-
- if MEDIATYPE&:(3)
- <KMediaRemote&
- present%=1
- else
- present%=0
- endIf
- widb%=gloadbit(MyDir$+"Plugins\CF.mbm",0, present%)
- 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 CF_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 CF_Tapped:
- if MEDIATYPE&:(3)
- <KMediaRemote&
- giPrint "'"+SIVolumeName$:(3)+"' free:"+fix$(volumespacefree&:(3)/1024.0,1,12)+" of "+fix$(volumesize&:(3)/1024.0,1,12)+" MB"
- else
- giPrint "Slot is empty!"
- endIf
- endp
-
-
-