OPL development pages - S80Utils.opx

S80 Utility function OPX (freeware)

What is S80Utils.opx?
S80Utils.opx is an OPL extension library with lots of utility functions of Nokia Communicators (9300, 9300i and 9500). It contains almost 200 utility functions (including all the functions of Array.opx, Image.opx and AppInfo.opx).

Download S80Utils.opx
You can download S80Utils.opx from the Downloads page. The developer package contains full documentation of (almost) all functions in the OPX.

Bugs or improvements
If you find any bugs or have further ideas for improvement, please let me know by sending an email to Arjen Broeze or by posting a message in the OPX and OPM support forum.

S80Utils.opx function list
The list below only contains the function names and a brief description of the functions in S80Utils.opx. A complete overview of all the functions and more extensive documentation can be found in the S80Utils.opx developer package.

Bitmap and image functions
imgBitmapGet& Get OPL bitmap handle
imgBitmapFree Free OPL bitmap handle
imgBitmapGetPixel& Get pixel from OPL bitmap
BitBlt Standard Symbian BitBlt
BitBltMasked Standard Symbian BitBltMasked
imgOpen& Open an image file
imgClose Close an image file
imgFrameCount% Number of frames in an image
imgFrameWidth% Frame width of specified frame
imgFrameHeight% Frame height of specified frame
imgFrameDisplayMode% Display mode of specified frame
imgFrameTransparencyPossible% Transparency of specified frame
imgFrameLoad Load frame in OPL bitmap
imgFrameLoadTransparent Load frame in OPL bitmap and mask
imgResetImageData: Reset image save parameter
imgSetMbmData Set parameters for saving MBM
imgSetBmpData Set parameters for saving BMP
imgSetJpgData Set parameters for saving JPG
imgSetPngData Set parameters for saving PNG
imgSave% Save OPL bitmap as MBM/BMP/JPG/PNG etc
imgDrawBitmap Draw OPL bitmap with optional resizing
imgRotateBitmap Rotate or flip OPL bitmap
Array functions
ArrayNew&: New array
ArrayFree Free array
ArrayClear Clear array
ArraySetDuplicates Set how array handles duplicates
ArrayGetDuplicates% Get how array handles duplicates
ArraySetCompareType Set compare type for sort and find
ArrayGetCompareType% Get compare type
ArraySetSortMode Set sort mode
ArrayGetSortMode% Get sort mode
ArraySetSorted Set array sorted
ArrayGetSorted Get array is sorted
ArrayAddItem% Add item (integer version)
ArrayInsertItem Insert item at specified position (integer version)
ArrayReplaceItem Replace item at specified position (integer version)
ArrayDeleteItem Delete item at specified position (integer version)
ArrayItemCount% Item count (integer version)
ArrayItemAt$ Item at specified position (integer version)
ArrayFind% Find item (integer version)
ArraySort Sort array
ArraySearch% Search for next match (integer version)
ArrayAddItemL& Add item (longint version)
ArrayInsertItemL Insert item at specified position (longint version)
ArrayReplaceItemL Replace item at specified position (longint version)
ArrayDeleteItemL Delete item at specified position (longint version)
ArrayItemCountL& Item count (longint version)
ArrayItemAtL$ Item at specified position (longint version)
ArrayFindL& Find item (longint version)
ArraySearchL& Search for next match (longint version)
Application information functions
aiConnect: Connect to application information server
aiDisconnect: Disconnect from application information server
aiGetAppList: Build list of installed applications
aiAppCount%: Number of installed applications
aiNextApp%: Go to next entry
aiAppCaption$: Caption of current entry
aiAppUid&: UID of current entry
aiAppFullName$: File name of current entry
aiAppEmbeddability% Current entry is embeddable application
aiAppIsHidden% Current entry is a hidden application
aiAppSupportsNewFile% Current entry is file base application
aiGetAppIconInformation% Retrieve application icon information
aiGetAppIconCount%: Number of application icons
aiGetAppIconWidth% Icon width of specified icon
aiGetAppIconHeight% Icon height of specified icon
aiGetAppIconBySize Retrieve or create icon of specified size
aiGetAppIconByIndex Retrieve icon at specified position
aiGetMimeTypeName$ Name of mime-type
aiGetMimeTypeUid& UID of mime-type
aiAppUidForDocument& Return application UID for specified file
aiAppUidForMimeType& Return application UID for specified mime-type
aiFileIsProgram% Check is specified file is an application
aiGetThreadRamSizes Return memory used by thread
aiGetFreeRam&: Get amount of free RAM
aiCompressHeaps&: Compress heaps (free unused RAM)
aiRebootMachine: Reboot device
aiThreadExists% Check if thread exists
aiThreadIsSystem% Check if thread is system thread
aiThreadIsBusy% Check if thread is busy
aiThreadRespondsToShutdown% Check if thread can be closed down
Crystal dialogs/title bars/CBA functions
ouConfirmationDialog% Crystal confirmation dialog
ouInformationDialog% Crystal information dialog
ouFlashingDialog% Flashing dialog
ouGetPasswordDialog$ Get password dialog
ouSetPasswordDialog$: Set password dialog
ouNewFileDialog$ New file dialog
ouOpenFileDialogSetFilter Set filter for open file dialog (extension, UID or mime-type)
ouOpenFileDialog$ Open file dialog
ouSaveFileDialog$ Save file dialog
ouTargetFolderDialog$ Select folder dialog
ouProgressDialogNew& New progress dialog
ouProgressDialogOfferEvent% Offer event to progress dialog (for cancellable dialog)
ouProgressDialogSetValue Set progress value
ouProgressDialogCancel Cancel progress dialog
ouProgressDialogFree Free (and optionally close) progress dialog
System information functions (colors/skins)
ouGetAppColor& Get specified application color
ouSetAppColor Set specified application color
SkinGetColor& Get specified skin color
SkinGetConstant& Get specified skin constant
SkinBitmapOpen& Open skin bitmap
SkinBitmapClose Close skin bitmap
SkinBitmapWidth% Width of skin bitmap
SkinBitmapHeight% Height of skin bitmap
SkinBitmapDraw Draw skin bitmap on OPL bitmap
SkinIconOpen& Open skin icon
SkinIconClose Close skin icon
SkinIconWidth% Width of skin icon
SkinIconHeight% Height of skin icon
SkinIconDraw Draw skin icon on OPL bitmap
Functions for creating your own dialogs
ouTitleNew& Create title bar for OPL window
ouTitleSetText Set title bar title
ouTitleSetAreaWidth Set width of title bar area
ouTitleFree Free title bar
ouSetOrdinalPosition Set window position
ouSetOrdinalPositionAndPriority Set window position and priority
ouPushCBAButtons: Create new set of CBA buttons
ouPopCBAButtons: Restore previous set of CBA buttons
ouSetCBAButton Set CBA button text
ouSetCBAButtonDefault Set default CBA button
ouSetCBAButtonDimmed Set CBA button dimmed status
ouGetCBAButtonDimmed% CBA button dimmed status
ouSetCBAButtonVisible Set CBA button visibility
ouGetCBAButtonVisible% Get CBA button visibility
ouMakeTopmostWindow& Make OPL window top most
ouCleanupTopmostWindow Remove topmost from OPL window
Capturing keys
ouCaptureKey& Capture key
ouCaptureKeyPriority& Capture key with priority
ouCancelCaptureKey Cancel key capture
ouCaptureKeyUpAndDowns& Capture key up and down
ouCancelCaptureKeyUpAndDowns Cancel key up and down capture
Starting applications and documents
ouRunApplication% Run an application
ouRunDocument& Open or switch to a document
Process and thread priority
ouSetThreadPriority Set own thread priority
ouSetProcessPriority Set own process priority
Working with Unicode text files
ouTextFileOpen& Open or create a Unicode text file
ouTextFileClose Close text file
ouTextFileRead$ Read a line from a text file
ouTextFileWrite Write a line to a text file
ouTextFileSeek Seek to start or end of text file
Working with OPL files
OplFileNew&: Create a new OPL file object
OplFileFree Free OPL file object
OplFileClear Clear contents of OPL file object
OplFileAddString Add string to OPL file object
OplFileAddBuffer Add buffer to OPL file object
OplFileSave Save content of OPL file object to an OPL file
OplFileRead Read content of an OPL file into an OPL file object
OplFileSize& Size of content of OPL file object
OplFileAsBuf Copy content of OPL file object into buffer
Playing audio files
AudioPlayerNew& Create a new audio player object
AudioPlayerFree Free audio player object
AudioPlayerPlay Play audio file
AudioPlayerStop Stop playing audio file
AudioPlayerWait Wait for file to finish playing
AudioPlayerMaxVolume& Audio player max volume
AudioPlayerSetVolume Set audio player volume
AudioPlayerDuration& Audio player duration
AudioPlayerIsPlaying% Audio file playing status
AudioPlayerResult% Result of opening or playing audio file
Sending files via bluetooth
BTIsBlueToothOn%: Check if Bluetooth is switched on
BTSendFileConnect&: Connect to bluetooth device that can receive files
BTSendFileSend Send file over bluetooth connection
BTSendFileDisconnect Disconnect from bluetooth device
Virtual cursor functions
ouSetVirtualCursorRect Set screen rectangle for virtual cursor
ouToggleVirtualCursor: Toggle virtual cursor
ouIsVirtualCursorOn%: Virtual cursor status
Asynchronous timer
ouTimerEventNew& Create new timer
ouTimerEventStart Start sending timer events
ouTimerEventStop Stop sending timer events
ouTimerEventFree Free timer
Miscellaneous functions
ouGetMicroSecond&: Microsecond of time
ouGetSystem%: Check if OPL application is system app
ouSetSystem Set OPL application as system app
ouGetBusy%: Check if OPL application is busy
ouSetBusy Set OPL application as busy
ouSkinReload: Reload skin (after writing new skin to disk)
ouIsCaseOpen%: Check if case is open
ouCommunicatorType%: Communicator type (92xx or 93/9500)