I. aldweb
II. PC Freeware
III. Palm Freeware
IV. Palm Shareware
V. iziBasic Palm
VI. Palm Knowledge
VII. Pocket Computer
VIII. miniPortail
All contents Articles Articles Reactions Downloads Forum Guestbook Links News [fr] and [en] [fr] only [en] only Search
Lyon Weather
aldweb against spam
visitors
visitors online
Thanks for taking the time to write this message.
Your user name :
Your e-mail :
Subscribe to this thread :
You are answering to aldweb who wrote:
{ SoundPref.pas 'PP applet' for iziBasic Version 1.0ß1 - November 20, 2006 by Laurent Duveau Web Site = http://www.aldweb.com----------------------What is SoundPref.pas?----------------------SoundPref.pas is a fully featured 'PP applet' for iziBasic whichis made to retrieve sound preferences from PalmOS system preferences. This applet can easily be extended to retrieve other system preferences, as all system preferences up to Palm OS version 5.3are defined.This 'PP applet' can be used as is in your iziBasic projects.Please give a look to the SoundPref.ibas sample program sourcecode to see an example of how to access it.-------------------------How to use SoundPref.pas?-------------------------SYNTAXoutput$ = CALLPP$(100,input$) input$ : "System" or "Game" or "Alarm" output$: "0" if sound is Off "8" if sound is Low "32" if sound is Medium "64" if sound is High "-1" if error-------------------------------Parametrization and integrationin an iziBasic project-------------------------------Step #1: Replace the 'LDSP' CreatorID in the first line of the source code below to the CreatorID defined in your iziBasic source code (see CREATORID compiling directive) Also replace the 'SoundPref' label in the second line to the name of your application (the part of the iziBasic source code file name prior to the '.ibas' extension)Step #2: Compile your iziBasic projectStep #3: Compile this 'PP applet'}{$code appl,LDSP,code,100}program SoundPref;type iBasFunType=function(S:string):string;var iBasCallPP:iBasFunType;type SystemPreferencesChoice=( prefVersion, prefCountry, prefDateFormat, prefLongDateFormat, prefWeekStartDay, prefTimeFormat, prefNumberFormat, prefAutoOffDuration, prefSysSoundLevelV20, prefGameSoundLevelV20, prefAlarmSoundLevelV20, prefHidePrivateRecordsV33, prefDeviceLocked, prefLocalSyncRequiresPassword, prefRemoteSyncRequiresPassword, prefSysBatteryKind, prefAllowEasterEggs, prefMinutesWestOfGMT, prefDaylightSavings, prefRonamaticChar, prefHard1CharAppCreator, prefHard2CharAppCreator, prefHard3CharAppCreator, prefHard4CharAppCreator, prefCalcCharAppCreator, prefHardCradleCharAppCreator, prefLauncherAppCreator, prefSysPrefFlags, prefHardCradle2CharAppCreator, prefAnimationLevel, prefSysSoundVolume, prefGameSoundVolume, prefAlarmSoundVolume, prefBeamReceive, prefCalibrateDigitizerAtReset, prefSystemKeyboardID, prefDefSerialPlugIn, // Additions for PalmOS 3.1: prefStayOnWhenPluggedIn, prefStayLitWhenPluggedIn, // Additions for PalmOS 3.2: prefAntennaCharAppCreator, // Additions for PalmOS 3.3: prefMeasurementSystem, // Additions for PalmOS 3.5: prefShowPrivateRecords, prefAutoOffDurationSecs, // Additions for PalmOS 4.0: prefTimeZone, prefDaylightSavingAdjustment, prefAutoLockType, prefAutoLockTime, prefAutoLockTimeFlag, prefLanguage, prefLocale, prefTimeZoneCountry, prefAttentionFlags, prefDefaultAppCreator, // Additions for PalmOS 5.0: prefDefFepPlugInCreator, // Additions for PalmOS 5.1: prefColorThemeID, // Additions for PalmOS 5.3 prefHandednessChoice, prefHWRCreator);function PrefGetPreference(whichPref:SystemPreferencesChoice):integer; inline($4E4F,$A2D1);procedure StrIToA(var S:string;N:integer); inline($4E4F,$A0C9);function IntToString(i:integer):string;var sResult:string;begin StrIToA(sResult,i); IntToString:=sResult;end;function CallPP(S:string):string;var MySound:integer;begin if S='System' then MySound:=PrefGetPreference(prefSysSoundVolume) else if S='Game' then MySound:=PrefGetPreference(prefGameSoundVolume) else if S='Alarm' then MySound:=PrefGetPreference(prefAlarmSoundVolume) else MySound:=-1; // error CallPP:=IntToString(MySound);end;begin iBasCallPP:=CallPP;end.
Document generated in 0.06 second