SophiaFramework UNIVERSE 5.3 |
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
O | O | O | O |
Public Functions | |
---|---|
AEECLSID |
ActiveApplet( Void ) Return the AEECLSID associated with the currently top visible applet.
|
Bool |
AlarmsActive( Void ) Return true if an alarm is set for the calling applet.
|
SFCError |
AppIsInGroup(
AEECLSID idApp
, AEECLSID idGroup
) Check the specified application class id for membership with the specified group.
|
Bool |
Beep(
BeepType beep
, Bool loud = false
) Provide a simple interface to play system beeps or vibrate the device.
|
Void |
BrowseFile(
ACharConstPtr file
) This method instructs the AEE to start the applet associated with the file type specified (by extension).
|
Void |
BrowseFile(
SFXAnsiStringConstRef file
) This method instructs the AEE to start the applet associated with the file type specified (by extension).
|
Void |
BrowseURL(
ACharConstPtr url
) This method instructs the AEE to start the applet associated with the URL scheme specified.
|
Void |
BrowseURL(
SFXAnsiStringConstRef url
) This method instructs the AEE to start the applet associated with the URL scheme specified.
|
Bool |
Busy( Void ) Return true if the applet must exit.
|
Bool |
CanStartApplet(
AEECLSID clsid
) Query the AEE Shell to determine whether it is safe to start an applet.
|
SFCError |
CancelAlarm(
AEECLSID clsid
, UInt16 userCode
) Cancel an alarm set through SFBShell::SetAlarm().
|
SFCError |
CancelTimer(
PFNNOTIFY notify = null
, VoidPtr data = null
) Cancel a timer that has been set by SFBShell::SetTimer().
|
Bool |
CheckPrivLevel(
AEECLSID privilege
, Bool queryOnly = true
) Check the privilege level of the currently running application against the specified value.
|
SFCError |
ClearProperty(
AEECLSID clsid
, UInt16 wId
) CLear the property data of the basic module that related to input class.
|
SFCError |
ClearShutdownErrors( Void )
Clear the error status of all the applications.
|
SFCError |
CloseApplet(
Bool returnToIdle = false
) Instruct the AEE Shell to close the active applet.
|
SFCError |
CreateDialog(
ACharConstPtr resFile
, UInt16 id
)
Instruct the AEE Shell to start a dialog associate with the input DialogInfo data structure or the dialog information in the associated resource file.
|
SFCError |
CreateDialog(
DialogInfo* info
)
Instruct the AEE Shell to start a dialog associate with the input DialogInfo data structure or the dialog information in the associated resource file.
|
SFCError |
CreateDialog(
SFXAnsiStringConstRef resFile
, UInt16 id
)
Instruct the AEE Shell to start a dialog associate with the input DialogInfo data structure or the dialog information in the associated resource file.
|
SFCError |
CreateInstance(
AEECLSID clsid
, SFBBaseSmpPtr handle
)
Create an object associated with the specified 32-bit ClassID.
|
SFBBaseSmp |
CreateInstance(
AEECLSID clsid
)
Create an object associated with the specified 32-bit ClassID.
|
SFCError |
DetectType(
VoidConstPtr data
, UInt32Ptr size
, ACharConstPtr name
, ACharConstHandle mime
)
Given data in a buffer or the name of an object, this function detects the MIME type.
|
SFCError |
DetectType(
SFXBufferConstRef data
, UInt32Ptr additional
, ACharConstPtr name
, ACharConstHandle mime
)
Given data in a buffer or the name of an object, this function detects the MIME type.
|
SFCError |
DetectType(
VoidConstPtr data
, UInt32Ptr size
, SFXAnsiStringConstRef name
, SFXAnsiStringPtr mime
)
Given data in a buffer or the name of an object, this function detects the MIME type.
|
SFCError |
DetectType(
SFXBufferConstRef data
, UInt32Ptr additional
, SFXAnsiStringConstRef name
, SFXAnsiStringPtr mime
)
Given data in a buffer or the name of an object, this function detects the MIME type.
|
SFCError |
DetectType(
VoidConstPtr data
, UInt32Ptr size
, SFXAnsiStringPtr mime
)
Given data in a buffer or the name of an object, this function detects the MIME type.
|
SFCError |
DetectType(
SFXBufferConstRef data
, UInt32Ptr additional
, SFXAnsiStringPtr mime
)
Given data in a buffer or the name of an object, this function detects the MIME type.
|
SFCError |
EndDialog( Void ) This function closes the currently active dialog.
|
Void |
EnumAppletInit( Void ) Reset the AEE Shell’s internal applet enumeration index.
|
AEECLSID |
EnumNextApplet(
AEEAppInfo* info
) Return information about the next applet.
|
Bool |
ForceExit( Void ) Return true if the applet must exit.
|
Void |
FreeResData(
VoidPtr data
) Free the data previously returned by SFBShell::LoadResData().
|
SFBDialogSmp |
GetActiveDialog( Void ) Return the current active dialog.
|
SInt32 |
GetAppAuthor(
WCharPtr buf
, SInt32 size
)
Get the name of the author of the active applet.
|
SInt32 |
GetAppAuthor(
SFXWideStringPtr string
)
Get the name of the author of the active applet.
|
SInt32 |
GetAppCopyright(
WCharPtr buf
, SInt32 size
)
Get the copyright string of the active applet.
|
SInt32 |
GetAppCopyright(
SFXWideStringPtr string
)
Get the copyright string of the active applet.
|
SInt32 |
GetAppPrefs(
UInt16 version
, VoidPtr buf
, UInt16 size
) Get the structure containing applet preferences.
|
SInt32 |
GetAppPrefs(
UInt16 version
, SFXBufferPtr buf
) Get the structure containing applet preferences.
|
SInt32 |
GetAppVersion(
WCharPtr buf
, SInt32 size
)
Get the version string of the active applet.
|
SInt32 |
GetAppVersion(
SFXWideStringPtr string
)
Get the version string of the active applet.
|
UInt32 |
GetClassItemID(
AEECLSID clsid
)
Get a 32-bit unique identifier associated with the owning module for the specified class ID.
|
Void |
GetDeviceInfo(
AEEDeviceInfo* info
) Get the AEE Shell for information about the capabilities of the device,
such as the amount of supported RAM, the screen display, and other items.
|
SFCError |
GetDeviceInfoEx(
AEEDeviceItem item
, VoidPtr info
, SInt32Ptr size
) Get specific information about the device.
This function takes an ID that specifies what information is needed.
The buffer contains the corresponding information on return.
|
SFCError |
GetDeviceInfoEx(
AEEDeviceItem item
, SFXBufferPtr info
) Get specific information about the device.
This function takes an ID that specifies what information is needed.
The buffer contains the corresponding information on return.
|
AEECLSID |
GetHandler(
AEECLSID type
, ACharConstPtr in
)
Provide query access to the AEE Shell’s database of registered content viewers and protocol scheme handlers.
|
AEECLSID |
GetHandler(
AEECLSID type
, SFXAnsiStringConstRef in
)
Provide query access to the AEE Shell’s database of registered content viewers and protocol scheme handlers.
|
static SFBShellSmp |
GetInstance( Void ) Get the SFBShell instance.
|
Void |
GetItemStyle(
AEEItemType type
, AEEItemStyle* normal
, AEEItemStyle* selected
) Get the AEE Shell for information about the default style for menu, icon, or list items.
|
Void |
GetJulianDate(
UInt32 seconds
, JulianType* date
) Get a JulianType data structure based on the input second value.
|
SInt32 |
GetPrefs(
AEECLSID clsid
, UInt16 version
, VoidPtr config
, UInt16 size
) Get the structure containing applet or class level preferences.
|
SInt32 |
GetPrefs(
AEECLSID clsid
, UInt16 version
, SFXBufferPtr config
) Get the structure containing applet or class level preferences.
|
SFCError |
GetProperty(
AEECLSID clsid
, UInt16 wId
, VoidPtr dest
, UInt16Ptr size
) Retrieve the property data for the underlying module associated with the input class.
|
SFCError |
GetProperty(
AEECLSID clsid
, UInt16 wId
, SFXBufferPtr dest
) Retrieve the property data for the underlying module associated with the input class.
|
UInt32 |
GetResSize(
ACharConstPtr file
, UInt16 id
, ResType type
, UInt32Ptr size
)
Get the size of the found resource, or 0 if the resource is not found.
A wrapper for SFBShell::LoadResDataEx().
|
UInt32 |
GetResSize(
SFXAnsiStringConstRef file
, UInt16 id
, ResType type
, UInt32Ptr size
)
Get the size of the found resource, or 0 if the resource is not found.
A wrapper for SFBShell::LoadResDataEx().
|
UInt32 |
GetTimeMS( Void ) Get the current time of day in milliseconds.
|
UInt32 |
GetTimerExpiration(
PFNNOTIFY notify
, VoidPtr data = null
) Get the remaining time in milliseconds before the timer associated with the device user callback/data expires.
|
UInt32 |
GetUpTimeMS( Void ) Get the millisecond elapsed since the time the device was powered on.
|
Bool |
HandleEvent(
AEEEvent event
, UInt16 wParam
, UInt32 dwParam
) Send one of the specified standard AEEEvent items to the currently active applet.
|
Bool |
HandleEvent(
SFXEventConstRef event
) Send one of the specified standard AEEEvent items to the currently active applet.
|
Bool |
IsValidResource(
ACharConstPtr file
, UInt16 id
, ResType resType
, AEEHandlerType handlerType
)
Check to see if the specified resource file entry is valid for the type specified.
|
Bool |
IsValidResource(
SFXAnsiStringConstRef file
, UInt16 id
, ResType resType
, AEEHandlerType handlerType
)
Check to see if the specified resource file entry is valid for the type specified.
|
SFBBitmapSmp |
LoadBitmap(
ACharConstPtr file
)
Load an bitmap file directly and returns the SFBBitmap interface for the bitmap.
|
SFBBitmapSmp |
LoadBitmap(
SFXAnsiStringConstRef file
)
Load an bitmap file directly and returns the SFBBitmap interface for the bitmap.
|
SFBImageSmp |
LoadBusyImage( Void ) This method loads the image used for indicating that BREW is busy.
|
SFBImageSmp |
LoadImage(
ACharConstPtr file
)
Load an image directly from a file and returns a pointer to an
SFBImage interface that can be used to display the image.
|
SFBImageSmp |
LoadImage(
SFXAnsiStringConstRef file
)
Load an image directly from a file and returns a pointer to an
SFBImage interface that can be used to display the image.
|
SFBBitmapSmp |
LoadResBitmap(
ACharConstPtr resFile
, UInt16 id
)
Load a bitmap resource from the given resource file and returns a valid SFBBitmap interface pointer.
|
SFBBitmapSmp |
LoadResBitmap(
SFXAnsiStringConstRef resFile
, UInt16 id
)
Load a bitmap resource from the given resource file and returns a valid SFBBitmap interface pointer.
|
VoidPtr |
LoadResData(
ACharConstPtr resFile
, UInt16 id
, ResType type
)
Return a void * data block associated with the specified resource file, ID, and type.
|
VoidPtr |
LoadResData(
SFXAnsiStringConstRef resFile
, UInt16 id
, ResType type
)
Return a void * data block associated with the specified resource file, ID, and type.
|
VoidPtr |
LoadResDataEx(
ACharConstPtr resFile
, UInt16 id
, ResType type
, VoidPtr buf
, UInt32Ptr size
)
Attempt to load the resource specified by type and ID from the specified resource context.
The function either allocates memory or loads into a pre-allocated buffer.
|
VoidPtr |
LoadResDataEx(
SFXAnsiStringConstRef resFile
, UInt16 id
, ResType type
, VoidPtr buf
, UInt32Ptr size
)
Attempt to load the resource specified by type and ID from the specified resource context.
The function either allocates memory or loads into a pre-allocated buffer.
|
VoidPtr |
LoadResDataEx(
SFXAnsiStringConstRef resFile
, UInt16 id
, ResType type
, SFXBufferPtr buf
)
Attempt to load the resource specified by type and ID from the specified resource context.
The function either allocates memory or loads into a pre-allocated buffer.
|
SFBImageSmp |
LoadResImage(
ACharConstPtr resFile
, UInt16 id
)
Load a bitmap resource from the given resource file and returns a valid SFBImage Interface pointer.
This pointer can then be used for viewing the image.
|
SFBImageSmp |
LoadResImage(
SFXAnsiStringConstRef resFile
, UInt16 id
)
Load a bitmap resource from the given resource file and returns a valid SFBImage Interface pointer.
This pointer can then be used for viewing the image.
|
SFBBaseSmp |
LoadResObject(
ACharConstPtr resFile
, UInt16 id
, AEECLSID clsidBase
)
Load the specified resource and creates a handler that can be used on the resource data.
|
SFBBaseSmp |
LoadResObject(
SFXAnsiStringConstRef resFile
, UInt16 id
, AEECLSID clsidBase
)
Load the specified resource and creates a handler that can be used on the resource data.
|
SFBSoundPlayerSmp |
LoadResSound(
ACharConstPtr resFile
, UInt16 id
)
Load a sound file from the file system and returns the SFBSoundPlayer Interface object for the file
when the sound data is included in a resource file as a raw stream of bytes.
|
SFBSoundPlayerSmp |
LoadResSound(
SFXAnsiStringConstRef resFile
, UInt16 id
)
Load a sound file from the file system and returns the SFBSoundPlayer Interface object for the file
when the sound data is included in a resource file as a raw stream of bytes.
|
SInt32 |
LoadResString(
ACharConstPtr resFile
, UInt16 id
, WCharPtr buf
, SInt32 size
)
Load UNICODE or ISOLATIN strings stored in the specified resource file.
|
SFXWideString |
LoadResString(
SFXAnsiStringConstRef resFile
, UInt16 id
)
Load UNICODE or ISOLATIN strings stored in the specified resource file.
|
SInt32 |
LoadResString(
ACharConstPtr resFile
, UInt16 id
, SFXWideStringPtr string
)
Load UNICODE or ISOLATIN strings stored in the specified resource file.
|
SInt32 |
LoadResString(
SFXAnsiStringConstRef resFile
, UInt16 id
, SFXWideStringPtr string
)
Load UNICODE or ISOLATIN strings stored in the specified resource file.
|
SFBSoundPlayerSmp |
LoadSound(
ACharConstPtr resFile
)
Load a sound file from the file system and returns the SFBSoundPlayer Interface object for the file.
|
SFBSoundPlayerSmp |
LoadSound(
SFXAnsiStringConstRef resFile
)
Load a sound file from the file system and returns the SFBSoundPlayer Interface object for the file.
|
Bool |
MessageBox(
ACharConstPtr resFile
, UInt16 titleId
, UInt16 textId
)
Instruct the AEE Shell to display a message box to the device user.
A message box is a simple window with a title and text.
|
Bool |
MessageBox(
SFXAnsiStringConstRef resFile
, UInt16 titleId
, UInt16 textId
)
Instruct the AEE Shell to display a message box to the device user.
A message box is a simple window with a title and text.
|
Bool |
MessageBoxText(
WCharConstPtr title
, WCharConstPtr text
)
Instruct the AEE Shell to display a message box to the device user.
A message box is a simple window with a title and text.
|
Bool |
MessageBoxText(
SFXWideStringConstRef title
, SFXWideStringConstRef text
)
Instruct the AEE Shell to display a message box to the device user.
A message box is a simple window with a title and text.
|
SFCError |
Notify(
AEECLSID clsid
, UInt32 mask
, VoidPtr data
)
This function is called by an object when it detects an event that may be
associated with a notification requested by another class of object.
|
Void |
OnAppClose(
SFXCallbackPtr callback
)
Enable an applet to register a system callback that gets called when applet closes.
|
Void |
OnAppExit(
SFXCallbackPtr callback
) Enable an applet to register a callback that gets called after applet destructor is executed.
|
Void |
OnExit(
SFXCallbackPtr callback
)
Enable an applet to register a system callback that gets called when BREW exits.
|
Void |
OnInit(
SFXCallbackPtr callback
)
Enable an applet to register a system callback that gets called when BREW initializes.
|
Void |
OnLowRAM(
SFXCallbackPtr callback
)
Register for the callback to be invoked when the system reaches low memory condition.
|
Void |
OnLowRAMCritical(
SFXCallbackPtr callback
)
Register for the callback to be invoked when the system reaches low memory condition.
|
Void |
OnLowStorage(
SFXCallbackPtr callback
)
Register for the callback to be invoked when the system reaches low file-system space condition.
|
Void |
OnModUnload(
SFXCallbackPtr callback
)
Register a callback to be called when the module is about to be unloaded.
|
Bool |
PostEvent(
AEECLSID clsid
, AEEEvent event
, UInt16 wValue
, UInt32 dwValue
) Post an asynchronous event to the specified applet.
|
Bool |
PostEvent(
AEECLSID clsid
, SFXEventConstRef event
) Post an asynchronous event to the specified applet.
|
Bool |
PostEventEx(
UInt16 flags
, AEECLSID clsid
, AEEEvent event
, UInt16 wValue
, UInt32 dwValue
)
Post an asynchronous event to the specified app.
|
Bool |
PostEventEx(
UInt16 flags
, AEECLSID clsid
, SFXEventConstRef event
)
Post an asynchronous event to the specified app.
|
Bool |
PostURL(
ACharConstPtr url
) Post an asynchronous event, EVT_APP_POST_URL, to the applet associated with the URL's scheme.
|
Bool |
Prompt(
AEEPromptInfo* info
) Provide a mechanism for an application to display a multi selection prompt.
|
Bool |
QueryClass(
AEECLSID clsid
, AEEAppInfo* info
)
Query the AEE Shell to determine if the specified class or applet is supported.
|
AEEEvent |
RegisterEvent(
ACharConstPtr name
, SInt32Ptr count
)
Register a custom AEEEvent based upon the input string.
|
AEEEvent |
RegisterEvent(
SFXAnsiStringConstRef name
, SInt32Ptr count
)
Register a custom AEEEvent based upon the input string.
|
SFCError |
RegisterHandler(
AEECLSID clsidBase
, ACharConstPtr in
, AEECLSID clsid
)
Provide a mechanism for a content viewer or protocol engine to register itself with the AEE Shell.
|
SFCError |
RegisterHandler(
AEECLSID clsidBase
, SFXAnsiStringConstRef in
, AEECLSID clsid
)
Provide a mechanism for a content viewer or protocol engine to register itself with the AEE Shell.
|
SFCError |
RegisterNotify(
AEECLSID clsidNotify
, AEECLSID clsidType
, UInt32 mask
)
Register for notifications that are issued from other classes.
|
Void |
RegisterSystemCallback(
SFXCallbackPtr callback
, SInt32 type
)
Register callbacks for important system events like:
when BREW starts-up, when application exits, when mod is unloaded, etc.
|
SFCError |
Reset(
AEEResetType type
)
Reset the device.
|
Void |
Resume(
SFXCallbackPtr callback
)
Register a callback with the AEE Shell.
|
SFCError |
ResumeAlarms( Void ) Resume operation the BREW alarms subsystem.
|
Bool |
SendEvent(
AEECLSID clsid
, AEEEvent event
, UInt16 wParam
, UInt32 dwParam
) Send the event directly to the destination applet.
|
Bool |
SendEvent(
AEECLSID clsid
, SFXEventConstRef event
) Send the event directly to the destination applet.
|
Bool |
SendURL(
ACharConstPtr url
) Post a synchronous event, EVT_APP_POST_URL, to the applet associated with the URL's scheme.
|
Bool |
SendURL(
SFXAnsiStringConstRef url
) Post a synchronous event, EVT_APP_POST_URL, to the applet associated with the URL's scheme.
|
SFCError |
SetAlarm(
AEECLSID clsid
, UInt16 code
, UInt32 minutes
) Set a long-term alarm for an applet.
|
SFCError |
SetAppPrefs(
UInt16 version
, VoidPtr config
, UInt16 size
) Set the structure containing applet specific preferences.
|
SFCError |
SetAppPrefs(
UInt16 version
, SFXBufferPtr config
) Set the structure containing applet specific preferences.
|
SFCError |
SetPrefs(
AEECLSID clsid
, UInt16 version
, VoidPtr config
, UInt16 size
) Provide a method for storing a structure containing applet or class level preferences.
|
SFCError |
SetPrefs(
AEECLSID clsid
, UInt16 version
, SFXBufferPtr config
) Provide a method for storing a structure containing applet or class level preferences.
|
SFCError |
SetProperty(
AEECLSID clsid
, UInt16 wId
, VoidPtr src
, UInt16 size
) Set the property data for the underlying module associated with the input class.
|
SFCError |
SetProperty(
AEECLSID clsid
, UInt16 wId
, SFXBufferPtr src
) Set the property data for the underlying module associated with the input class.
|
SFCError |
SetTimer(
SInt32 mSecs
, PFNNOTIFY notify
, VoidPtr data = null
) Set a short-term timer.
|
SFCError |
SetTimerEx(
SInt32 mSecs
, SFXCallbackPtr callback
) Set a short-term timer.
|
Bool |
ShowCopyright( Void ) Display the copyright information about the applet.
|
SFCError |
StartApplet(
AEECLSID clsid
)
Instruct the AEE Shell to start the applet associated with the specified 32-bit ClassID.
|
SFCError |
StartAppletArgs(
AEECLSID clsid
, ACharConstPtr args
)
Instruct the AEE to start the applet associated with the specified 32-bit class ID, passing it the arguments.
|
SFCError |
StartAppletArgs(
AEECLSID clsid
, SFXAnsiStringConstRef args
)
Instruct the AEE to start the applet associated with the specified 32-bit class ID, passing it the arguments.
|
SFCError |
StartAppletEx(
AEECLSID clsid
, UInt16 flags
)
Instruct the AEE to start the applet associated with the specified 32-bit class ID using the flags specified.
|
SFCError |
StartBackgroundApplet(
AEECLSID clsid
, ACharConstPtr args
)
Start the applet with specified ClassID.
Send the command line argument.
|
SFCError |
StartBackgroundApplet(
AEECLSID clsid
, SFXAnsiStringConstRef args
)
Start the applet with specified ClassID.
Send the command line argument.
|
SFCError |
UnregisterHandler(
SFXAnsiStringConstRef in
) Unregister the hander.
|
Protected Functions | |
---|---|
static SFBBaseSmp |
FactoryByCreate(
AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface.
|
static SFBBaseSmp |
FactoryByQuery(
SFBQuerySmpConstRef query
, AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.
|
[ public ] AEECLSID ActiveApplet(Void);
BREW API ISHELL_ActiveApplet | SFBShell::StartApplet | SFBShell::CloseApplet | SFBShell::CanStartApplet
[ public ] Bool AlarmsActive(Void);
[ public ] SFCError AppIsInGroup( AEECLSID idApp // app class id to verify access for AEECLSID idGroup // group ID );
This function is available in BREW 3.1.
[ public ] Bool Beep( BeepType beep // type of beep to play Bool loud = false // true if the beep can be played at a higher volume );
[ public ] Void BrowseFile( ACharConstPtr file // file name );
[ public ] Void BrowseFile( SFXAnsiStringConstRef file // file name );
BREW API ISHELL_BrowseFile | SFBShell::RegisterHandler | SFBShell::GetHandler | SFBShell::BrowseURL
[ public ] Void BrowseURL( ACharConstPtr url // URL );
[ public ] Void BrowseURL( SFXAnsiStringConstRef url // URL );
BREW API ISHELL_BrowseURL | SFBShell::RegisterHandler | SFBShell::GetHandler | SFBShell::BrowseFile
[ public ] Bool Busy(Void);
BREW API ISHELL_CanStartApplet | SFBShell::StartApplet | SFBShell::CloseApplet | SFBShell::ActiveApplet
[ public ] SFCError CancelAlarm( AEECLSID clsid // applet ClassID of alarm to cancel UInt16 userCode // 16-bit use code of alarm to cancel );
[ public ] SFCError CancelTimer( PFNNOTIFY notify = null // user callback VoidPtr data = null // user data );
Cancle a timer
SFBShellSmp shell = SFBShell::GetInstance(); // cancle a timer. shell->CancelTimer(OnTimerEntry, this);
BREW API ISHELL_CancelTimer | PFNNOTIFY | SFBShell::SetTimer | SFBShell::GetTimerExpiration
[ public ] Bool CheckPrivLevel( AEECLSID privilege // privilege bit Bool queryOnly = true // if true, this is a query only. // if false, the application terminates if it does not have the privileges );
Check whether can access a file.
Bool ok = false; SFBShellSmp shell = SFBShell::GetInstance(); // check the privilege level of applet // check whether can access the file ok = shell->CheckPrivLevel(PL_FILE, true);
[ public ] SFCError ClearProperty( AEECLSID clsid // class of the application to query UInt16 wId // property ID );
This function is available in BREW 3.1.
Calling this function is as same as calling the SFBShell::SetProperty(clsid, wId, null, 0); .
[ public ] SFCError ClearShutdow(Void);
This function is onlu available in BREW 3.0.
[ public ] SFCError CloseApplet( Bool returnToIdle = false // if true, close the applet, return to title );
Close current applet.
SFBShellSmp shell = SFBShell::GetInstance(); // close current applet. shell->CloseApplet(false);
BREW API ISHELL_CloseApplet | SFBShell::StartApplet | SFBShell::CanStartApplet | SFBShell::ActiveApplet
[ public ] SFCError CreateDialog( ACharConstPtr resFile // resource file UInt16 id // resource ID );
[ public ] SFCError CreateDialog( DialogInfo* info // structure that substituted dialog information );
[ public ] SFCError CreateDialog( SFXAnsiStringConstRef resFile // resource file UInt16 id // resource ID );
BREW API ISHELL_CreateDialog | DialogInfo | SFBShell::GetActiveDialog | SFBShell::EndDialog | SFBDialog::SetFocus | SFBDialog::GetControl
[ public ] SFCError CreateInstance( AEECLSID clsid // ClassID SFBBaseSmpPtr handle // pointer to Smart-Pointer );
[ public ] SFBBaseSmp CreateInstance( AEECLSID clsid // ClassID );
[ public ] SFCError DetectType( VoidConstPtr data // data buffer UInt32Ptr size // data size ACharConstPtr name // name of the object ACharConstHandle mime // handle of MIME string returned to caller );
[ public ] SFCError DetectType( SFXBufferConstRef data // data buffer UInt32Ptr additional // additional number of bytes for detecting the type when output(Buffer size is auto initialized) ACharConstPtr name // name of the object ACharConstHandle mime // handle of MIME string returned to caller );
[ public ] SFCError DetectType( VoidConstPtr data // data buffer UInt32Ptr size // data size SFXAnsiStringConstRef name // name of the object SFXAnsiStringPtr mime // handle of MIME string returned to caller );
[ public ] SFCError DetectType( SFXBufferConstRef data // data buffer UInt32Ptr additional // additional number of bytes for detecting the type when output(Buffer size is auto initialized) SFXAnsiStringConstRef name // name of the object SFXAnsiStringPtr mime // handle of MIME string returned to caller );
[ public ] SFCError DetectType( VoidConstPtr data // data buffer UInt32Ptr size // data size SFXAnsiStringPtr mime // handle of MIME string returned to caller );
[ public ] SFCError DetectType( SFXBufferConstRef data // data buffer UInt32Ptr additional // additional number of bytes for detecting the type when output(Buffer size is auto initialized) SFXAnsiStringPtr mime // handle of MIME string returned to caller );
[ public ] SFCError EndDialog(Void);
BREW API ISHELL_EndDialog | SFBShell::CreateDialog | SFBShell::GetActiveDialog | SFBDialog::SetFocus | SFBDialog::GetControl
[ public ] Void EnumAppletInit(Void);
[ public ] AEECLSID EnumNextApplet( AEEAppInfo* info // pointer to the AEEAppInfo structure to fill );
Enumerate the applet, Get the information of the next applet.
SFBShellSmp shell = SFBShell::GetInstance(); AEEAppInfo appInfo = {0}; // initialize the enumeration of applet. shell->EnumAppletInit(); // get the information of the next applet. shell->EnumNextApplet(&appInfo);
BREW API ISHELL_EnumNextApplet | AEEAppInfo | SFBShell::EnumAppletInit
[ public ] Bool ForceExit(Void);
[ public ] SFBDialogSmp GetActiveDialog(Void);
BREW API ISHELL_GetActiveDialog | SFBShell::CreateDialog | SFBShell::EndDialog | SFBDialog::SetFocus | SFBDialog::GetControl
[ public ] SInt32 GetAppAuthor( WCharPtr buf // buffer to fill with the author name string SInt32 size // size in bytes of the input buffer );
[ public ] SInt32 GetAppAuthor( SFXWideStringPtr string // buffer to fill with the author name string );
Retrieve the name of the author of the active applet.
SFBShellSmp shell = SFBShell::GetInstance(); SFXWideString author; // allocate the buffer to receive data author.SetLength(20); // retrieve the name of the author of the active applet. shell->GetAppAuthor(&author); // or shell->GetAppAuthor(author.GetBuffer(), sizeof(WChar) * author.GetLength());
[ public ] SInt32 GetAppCopyright( WCharPtr buf // buffer to fill with the string SInt32 size // size in bytes of the input buffer );
[ public ] SInt32 GetAppCopyright( SFXWideStringPtr string // buffer to fill with the string );
Retrieve the copyright string of the active applet.
SFBShellSmp shell = SFBShell::GetInstance(); SFXWideString copyright; // sllocate the buffer to receive data copyright.SetLength(30); // retrieve the copyright string of the active applet. shell->GetAppCopyright(©right); // or shell->GetAppCopyright(copyright.GetBuffer(), sizeof(WChar) * copyright.GetLength());
[ public ] SInt32 GetAppPrefs( UInt16 version // version of the preference VoidPtr buf // pointer to memory to fill with preference data UInt16 size // size of memory block to fill );
[ public ] SInt32 GetAppPrefs( UInt16 version // version of the preference SFXBufferPtr buf // if null, it returns null Buffer pointer and 0 Buffer size to the API );
[ public ] SInt32 GetAppVersion( WCharPtr buf // buffer to fill with the string SInt32 size // size in bytes of the input buffer );
[ public ] SInt32 GetAppVersion( SFXWideStringPtr string // buffer to fill with the string );
Retrieve the version string of the active applet.
SFBShellSmp shell = SFBShell::GetInstance(); SFXWideString version; // allocate the buffer to receive data version.SetLength(20); // retrieve the version string of the active applet. shell->GetAppVersion(&version); // or shell->GetAppVersion(version..GetBuffer(), sizeof(WChar) * version.GetLength());
Supported in BREW 2.1 or later.
[ public ] Void GetDeviceInfo( AEEDeviceInfo* info // pointer to the AEEDeviceInfo structure to fill );
Get the device information. In SophiaFramework, we can use SFXDevice to get the device information.
Get the device information.
SFBShellSmp shell = SFBShell::GetInstance(); AEEDeviceInfo deviceInfo = {0}; // get the device information shell->GetDeviceInfo(&deviceInfo);
BREW API ISHELL_GetDeviceInfo | BREW API AEEDeviceInfo | SFXDevice
[ public ] SFCError GetDeviceInfoEx( AEEDeviceItem item // specifies the Item whose info is needed VoidPtr info // contains the corresponding information on return SInt32Ptr size // buffer size );
[ public ] SFCError GetDeviceInfoEx( AEEDeviceItem item // specifies the Item whose info is needed SFXBufferPtr info // contains the corresponding information on return, size can be modified automatically );
Get the ChipID.
SFBShellSmp shell = SFBShell::GetInstance(); WChar data[32] = {0}; SInt32 size; // get the ChipID. shell->GetDeviceInfoEx(AEE_DEVICEITEM_CHIP_ID, data, &size);
[ public ] AEECLSID GetHandler( AEECLSID type // handler type or an AEECLSID base class ACharConstPtr in // input srting );
[ public ] AEECLSID GetHandler( AEECLSID type // handler type or an AEECLSID base class SFXAnsiStringConstRef in // input string );
[ public, static ] SFBShellSmp GetInstance(Void);
Get the SFBShell instance.
SFBShellSmp shell = SFBShell::GetInstance();
[ public ] Void GetItemStyle( AEEItemType type // item type AEEItemStyle* normal // pointer to the AEEItemStyle to fill for items that are not selected AEEItemStyle* selected // pointer to the AEEItemStyle to fill for selected items );
[ public ] Void GetJulianDate( UInt32 seconds // seconds since January 6 1980, the device reference time JulianType* date // pointer to the structure that needs to be filled on return );
BREW API ISHELL_GetJulianDate | JulianType | GET_JULIANDATE | SFBShell::GetTimeMS | SFBShell::GetUpTimeMS | GET_SECONDS | GET_TIMEMS | GETTIMESECONDS | GETTIMEMS
[ public ] SInt32 GetPrefs( AEECLSID clsid // ClassID UInt16 version // version of the preference VoidPtr config // pointer to the memory to fill with preference data UInt16 size // size of memory block to fill );
[ public ] SInt32 GetPrefs( AEECLSID clsid // ClassID UInt16 version // version of the preference SFXBufferPtr config // if null, it returns null Buffer pointer and 0 Buffer size to the API );
[ public ] SFCError GetProperty( AEECLSID clsid // class of the application to query UInt16 wId // property ID VoidPtr dest // destination to fill UInt16Ptr size // pointer to size of input buffer );
[ public ] SFCError GetProperty( AEECLSID clsid // class of the application to query UInt16 wId // property ID SFXBufferPtr dest // if null, return SFERR_INVALID_PARAM );
This function is available in BREW 3.1.
[ public ] UInt32 GetResSize( ACharConstPtr file // resource file containing the data UInt16 id // id of the data in the resource file ResType type // the type of resource UInt32Ptr size // buffer size );
[ public ] UInt32 GetResSize( SFXAnsiStringConstRef file UInt16 id ResType type UInt32Ptr size );
[ public ] UInt32 GetTimeMS(Void);
[ public ] UInt32 GetTimerExpiration( PFNNOTIFY notify // user callback VoidPtr data = null // user data );
Get left time till timer expired.
// callback function for the timer. static Void OnTimerEntry(VoidPtr arg); SFBShellSmp shell = SFBShell::GetInstance(); UInt32 duration = 0; // get left time till timer expired. duration = shell->GetTimerExpiration(OnTimerEntry, this);
BREW API ISHELL_GetTimerExpiration | PFNNOTIFY | SFBShell::SetTimer | SFBShell::CancelTimer
[ public ] UInt32 GetUpTimeMS(Void);
[ public ] Bool HandleEvent( AEEEvent event // AEEEvent items UInt16 wParam // event-specific 16-bit value UInt32 dwParam // event-specific 32-bit value );
[ public ] Bool HandleEvent( SFXEventConstRef event );
[ public ] Bool IsValidResource( ACharConstPtr file // resource file name UInt16 id // id of the resource ResType resType // resource type AEEHandlerType handlerType // handler type );
[ public ] Bool IsValidResource( SFXAnsiStringConstRef file // resource file name UInt16 id // id of the resource ResType resType // resource type AEEHandlerType handlerType // handler type );
[ public ] SFBBitmapSmp LoadBitmap( ACharConstPtr file // image file name );
[ public ] SFBBitmapSmp LoadBitmap( SFXAnsiStringConstRef file // image file name );
[ public ] SFBImageSmp LoadBusyImage(Void);
[ public ] SFBImageSmp LoadImage( ACharConstPtr file // image file name );
[ public ] SFBImageSmp LoadImage( SFXAnsiStringConstRef file // image file name );
BREW API ISHELL_LoadImage | SFBShell::LoadResData | SFBShell::LoadResImage | SFBShell::LoadResObject | SFBShell::LoadResSound | SFBShell::LoadResString | SFBShell::LoadSound | SFBShell::FreeResData
[ public ] SFBBitmapSmp LoadResBitmap( ACharConstPtr resFile // resource file UInt16 id // resource ID );
[ public ] SFBBitmapSmp LoadResBitmap( SFXAnsiStringConstRef resFile // resource file UInt16 id // resource ID );
Get bitmap from the resource file, draw it on the device screen.
// resourse ID of bitmap which read from resourse file. #define IDB_MY_PICTURE 0x0001 SFBShellSmp shell = SFBShell::GetInstance(); SFBDisplaySmp display = SFBDisplay::NewInstance(); SFBBitmapSmp bmp; // get bitmap from the resource file. bmp = shell->LoadResBitmap(MYRESOURCE_RES_FILE, IDB_MY_PICTURE); if (bmp != null) { // draw the bitmap. display->BitBlt(SFXRectangle(0, 0, 100, 100), bmp, SFXGrid(0, 0)); // refresh the screen. display->Update(); }
[ public ] VoidPtr LoadResData( ACharConstPtr resFile // resource file containing the data UInt16 id // id of the data in the resource file ResType type // the type of resource );
[ public ] VoidPtr LoadResData( SFXAnsiStringConstRef resFile // resource file containing the data UInt16 id // id of the data in the resource file ResType type // the type of resource );
BREW API ISHELL_LoadResData | ResType | SFBShell::LoadImage | SFBShell::LoadResImage | SFBShell::LoadResObject | SFBShell::LoadResSound | SFBShell::LoadResString | SFBShell::LoadSound | SFBShell::FreeResData
[ public ] VoidPtr LoadResDataEx( ACharConstPtr resFile // resource file containing the data UInt16 id // id of the data in the resource file ResType type // the type of resource VoidPtr buf // buffer into which to load the resource data UInt32Ptr size // buffer size );
[ public ] VoidPtr LoadResDataEx( SFXAnsiStringConstRef resFile // resource file containing the data UInt16 id // id of the data in the resource file ResType type // the type of resource VoidPtr buf // buffer into which to load the resource data UInt32Ptr size // buffer size );
[ public ] VoidPtr LoadResDataEx( SFXAnsiStringConstRef resFile // resource file containing the data UInt16 id // id of the data in the resource file ResType type // the type of resource SFXBufferPtr buf // buffer into which to load the resource data );
BREW API ISHELL_LoadResDataEx | SFBShell::FreeResData | AEEResBlob
[ public ] SFBImageSmp LoadResImage( ACharConstPtr resFile // resource file containing the bitmap image UInt16 id // id of the bitmap in the resource file );
[ public ] SFBImageSmp LoadResImage( SFXAnsiStringConstRef resFile // resource file containing the bitmap image UInt16 id // id of the bitmap in the resource file );
Get bitmap image from the resource file, draw it on device screen.
// resourceID of bitmap which read from the resource file. #define IDB_MY_PICTURE 0x0001 SFBShellSmp shell = SFBShell::GetInstance(); SFBImageSmp image; AEEImageInfo imageInfo = {0}; // retrieve image(bitmap image) from the resource file. image = shell->LoadResImage(MYRESOURCE_RES_FILE, IDB_MY_PICTURE); if (image != null) { // get the imformation of the image. image->GetInfo(&imageInfo); // check whether the SFBImage object contains a image. if (imageInfo.cx == 0) { DBGPRINTF("Failed to load image…!"); image.Release(); } else { // draw the inage on screen. image->Draw(0, 0); } }
BREW API ISHELL_LoadResImage | SFBShell::LoadImage | SFBShell::LoadResData | SFBShell::LoadResObject | SFBShell::LoadResSound | SFBShell::LoadResString | SFBShell::LoadSound | SFBShell::FreeResData
[ public ] SFBBaseSmp LoadResObject( ACharConstPtr resFile // resource file containing the specified resource UInt16 id // id of the resource in the resource file AEECLSID clsidBase // resource type );
[ public ] SFBBaseSmp LoadResObject( SFXAnsiStringConstRef resFile // resource file containing the specified resource UInt16 id // id of the resource in the resource file AEECLSID clsidBase // resource type );
BREW API ISHELL_LoadResObject | SFBShell::LoadImage | SFBShell::LoadResData | SFBShell::LoadResImage | SFBShell::LoadResSound | SFBShell::LoadResString | SFBShell::LoadSound | SFBShell::FreeResData
[ public ] SFBSoundPlayerSmp LoadResSound( ACharConstPtr resFile // resource file containing the raw sound data UInt16 id // id of the raw sound data );
[ public ] SFBSoundPlayerSmp LoadResSound( SFXAnsiStringConstRef resFile // resource file containing the raw sound data UInt16 id // id of the raw sound data );
BREW API ISHELL_LoadResSound | SFBShell::LoadImage | SFBShell::LoadResData | SFBShell::LoadResImage | SFBShell::LoadResObject | SFBShell::LoadResString | SFBShell::LoadSound
[ public ] SInt32 LoadResString( ACharConstPtr resFile // resource file containing the string UInt16 id // id of the string in the resource file WCharPtr buf // buffer to fill with the string SInt32 size // size in bytes of the input buffer );
[ public ] SFXWideString LoadResString( SFXAnsiStringConstRef resFile // resource file containing the string UInt16 id // id of the string in the resource file );
[ public ] SInt32 LoadResString( ACharConstPtr resFile // resource file containing the string UInt16 id // id of the string in the resource file SFXWideStringPtr string // buffer to fill with the string );
[ public ] SInt32 LoadResString( SFXAnsiStringConstRef resFile // resource file containing the string UInt16 id // id of the string in the resource file SFXWideStringPtr string // size in bytes of the input buffer );
Get string from the resource file, Draw it on device screen.
// resourceID of the string which read from the resource file. #define IDS_MY_LETTERS 0x0011 SFBShellSmp shell = SFBShell::GetInstance(); SFBDisplaySmp display = SFBDisplay::NewInstance; SFXWideString string; // get the string from the resource file. string = shell->LoadResString(MYRESOURCE_RES_FILE, IDS_MY_LETTERS); // draw the string on the screen. display->DrawText(AEE_FONT_BOLD, string, -1, 0, 0, null, IDF_ALIGN_CENTER | IDF_ALIGN_MIDDLE); // refresh the screen. display->Update();
BREW API ISHELL_LoadResString | SFBShell::LoadImage | SFBShell::LoadResData | SFBShell::LoadResImage | SFBShell::LoadResObject | SFBShell::LoadResSound | SFBShell::LoadSound
[ public ] SFBSoundPlayerSmp LoadSound( ACharConstPtr resFile // sound file );
[ public ] SFBSoundPlayerSmp LoadSound( SFXAnsiStringConstRef resFile // sound file );
BREW API ISHELL_LoadSound | SFBShell::LoadImage | SFBShell::LoadResData | SFBShell::LoadResImage | SFBShell::LoadResObject | SFBShell::LoadResSound | SFBShell::LoadResString | SFBShell::FreeResData
[ public ] Bool MessageBox( ACharConstPtr resFile // resource file containing the title and text UInt16 titleId // id of the title UInt16 textId // id of the text );
[ public ] Bool MessageBox( SFXAnsiStringConstRef resFile // resource file containing the title and text UInt16 titleId // id of the title UInt16 textId // id of the text );
[ public ] Bool MessageBoxText( WCharConstPtr title // the title string WCharConstPtr text // the text );
[ public ] Bool MessageBoxText( SFXWideStringConstRef title // the title string SFXWideStringConstRef text // the text );
[ public ] SFCError Notify( AEECLSID clsid // ClassID that issued the notification UInt32 mask // mask of event VoidPtr data // context sensitive data );
[ public ] Void OnAppClose( SFXCallbackPtr callback // the callback );
[ public ] Void OnAppExit( SFXCallbackPtr callback // pointer to the callback );
[ public ] Void OnExit( SFXCallbackPtr callback // the callback );
[ public ] Void OnInit( SFXCallbackPtr callback // the callback );
[ public ] Void OnLowRAM( SFXCallbackPtr callback // callback to be invoked );
[ public ] Void OnLowRAMCritical( SFXCallbackPtr callback // callback to be invoked );
This function is available in BREW 3.1.
[ public ] Void OnLowStorage( SFXCallbackPtr callback // callback to be invoked );
[ public ] Void OnModUnload( SFXCallbackPtr callback // pointer to the Callback class structure );
[ public ] Bool PostEvent( AEECLSID clsid // ClassID of the applet for the event AEEEvent event // AEEEvent items UInt16 wValue // event-specific 16-bit value UInt32 dwValue // event-specific 32-bit value );
[ public ] Bool PostEvent( AEECLSID clsid // ClassID of the applet for the event SFXEventConstRef event // event );
true: if the event was posted. false: if the event was not posted.
The function is similar to ISHELL_SendEvent(). The main difference is that this function posts the event to the applet, and ISHELL_SendEvent() immediately sends the event to the applet. Event posting is provided for special cases where the caller either posts an event from another task or defers the processing of the event until the next iteration of the event loop.
Post a force-redraw event to the applet.
SFBShellSmp shell = SFBShell::GetInstance(); // post a force-redraw event to the applet. shell->PostEvent(SFCApplet::GetClassID(), SFXEvent(SREVT_RESPONDER_RENDER, SRP16_RENDER_INVOKE, true));
[ public ] Bool PostEventEx( UInt16 flags // flags to specify how the event must be posted. // if no flags are used, this parameter is set to 0. The typical usage is to set this value to 0. // if it is set to EVTFLG_UNIQUE, Processing is as same as SFBShell::PostEvent() AEECLSID clsid // ClassID of the applet for the event AEEEvent event // AEE Event UInt16 wValue // event-specific 16-bit value UInt32 dwValue // event-specific 32-bit value );
[ public ] Bool PostEventEx( UInt16 flags // flags to specify how the event must be posted. // if no flags are used, this parameter is set to 0. The typical usage is to set this value to 0. // if it is set to EVTFLG_UNIQUE, Processing is as same as SFBShell::PostEvent() AEECLSID clsid // ClassID of the applet for the event SFXEventConstRef event // event );
true: if the event was posted. false: if the event was not posted
This function is very similar to ISHELL_PostEvent(). The main difference is that this function allows multiple events of the same type (same event code) to be posted and pending to be dispatched for the same app.
Supported in BREW 2.1 or later.
Post a force-redraw event to the applet.
SFBShellSmp shell = SFBShell::GetInstance(); // post a force-redraw event to the applet. shell->PostEvent(0, SFCApplet::GetClassID(), SFXEvent(SREVT_RESPONDER_RENDER, SRP16_RENDER_INVOKE, true));
[ public ] Bool PostURL( ACharConstPtr url // pointer to the URL );
This function is available in BREW 3.1.
[ public ] Bool Prompt( AEEPromptInfo* info // pointer to the AEEPromptInfo data structure );
[ public ] Bool QueryClass( AEECLSID clsid // ClassID AEEAppInfo* info // pointer to the AEEAppInfo structure );
BREW API ISHELL_QueryClass | AEEAppInfo | SFBShell::CreateInstance
[ public ] AEEEvent RegisterEvent( ACharConstPtr name // pointer to name of the event SInt32Ptr count // count of attempts to register this event );
[ public ] AEEEvent RegisterEvent( SFXAnsiStringConstRef name // pointer to name of the event SInt32Ptr count // count of attempts to register this event );
This function is available in BREW 3.1.
[ public ] SFCError RegisterHandler( AEECLSID clsidBase // handler type (HTYPE_VIEWER, HTYPE_SOUND) base class ACharConstPtr in // input string AEECLSID clsid // AEECLSID of the handler );
[ public ] SFCError RegisterHandler( AEECLSID clsidBase // handler type (HTYPE_VIEWER, HTYPE_SOUND) base class SFXAnsiStringConstRef in // input string AEECLSID clsid // AEECLSID of the handler );
[ public ] SFCError RegisterNotify( AEECLSID clsidNotify // applet to create and notify when the event occurs AEECLSID clsidType // class that issues the event UInt32 mask // mask of events to trigger );
[ public ] Void RegisterSystemCallback( SFXCallbackPtr callback // the callback SInt32 type // registered system callback type );
BREW API ISHELL_RegisterSystemCallback | SFBShell::OnInit | SFBShell::OnLowRAM | SFBShell::OnLowStorage | SFBShell::OnModUnload
[ public ] SFCError Reset( AEEResetType type // AEEResetType. This indicates the type of reset );
This function is available in BREW 3.1.
[ public ] Void Resume( SFXCallbackPtr callback // the callback );
[ public ] SFCError ResumeAlarms(Void);
This function is available in BREW 3.1.
[ public ] Bool SendEvent( AEECLSID clsid // ClassID of the applet for the event AEEEvent event // AEEEvent items UInt16 wParam // event-specific 16-bit value UInt32 dwParam // event-specific 32-bit value );
[ public ] Bool SendEvent( AEECLSID clsid // ClassID of the applet for the event SFXEventConstRef event // event );
true: if the event was processed. false: if the event was not processed.
Post a force-redraw event to the applet.
SFBShellSmp shell = SFBShell::GetInstance(); // post a force-redraw event to the applet. shell->SendEvent(SFCApplet::GetClassID(), SFXEvent(SREVT_RESPONDER_RENDER, SRP16_RENDER_INVOKE, true));
[ public ] Bool SendURL( ACharConstPtr url // pointer to the URL );
[ public ] Bool SendURL( SFXAnsiStringConstRef url // pointer to the URL );
This function is available in BREW 3.1.
[ public ] SFCError SetAlarm( AEECLSID clsid // ClassID UInt16 code // 16-bit code passed to the applet UInt32 minutes // number of minutes to set the alarm from the current time );
[ public ] SFCError SetAppPrefs( UInt16 version // version of the preference VoidPtr config // pointer to the preference data to be stored UInt16 size // size of memory block to store );
[ public ] SFCError SetAppPrefs( UInt16 version // version of the preference SFXBufferPtr config // pointer to the preference data to be stored );
[ public ] SFCError SetPrefs( AEECLSID clsid // ClassID UInt16 version // version of the preference VoidPtr config // pointer to the preference data to be stored UInt16 size // size of memory block to store );
[ public ] SFCError SetPrefs( AEECLSID clsid // ClassID UInt16 version // version of the preference SFXBufferPtr config // pointer to the preference data to be stored );
[ public ] SFCError SetProperty( AEECLSID clsid // class of the application to query UInt16 wId // property ID VoidPtr src // destination to fill UInt16 size // size of the buffer );
[ public ] SFCError SetProperty( AEECLSID clsid // class of the application to query UInt16 wId // property ID SFXBufferPtr src // pointer to the buffer );
This function is available in BREW 3.1.
[ public ] SFCError SetTimer( SInt32 mSecs // timer expiration in milliseconds PFNNOTIFY notify // the user callback that is called when the timer expires VoidPtr data = null // the user data pointer that is passed as the only parameter to the callback );
Move a rectangle to the right with a timer.
#define TIMER_VAL 100 // class definition of Shape class. SFMTYPEDEFCLASS(Shape) class Shape :public SFRApplication { private: SFXRectangle _rect; public: static SFCInvokerPtr ructorConst() { return new Shape; } private: Shape::Shape() { SFBShellSmp shell = SFBShell::GetInstance(); // register the drawing handler. RegisterHandler(SREVT_RESPONDER_RENDER, SRP16_RENDER_CONTENT, HANDLER_BEFORE, OnDrawEntry, this); // set the timer. shell->SetTimer(TIMER_VAL, OnTimerEntry, this); // initialize the rectangle. _rect.Set(0, 0, 32, 32); } // drawing handler. Void OnDraw(SFXGraphicsPtr); static Bool OnDrawEntry(SFXEventConstRef event, VoidPtr data) { ShapePtr(data)->OnDraw(SFXGraphicsPtr(event.P32())); return true; } // timer handler. Void OnTimer(Void); static Void OnTimerEntry(VoidPtr data) { ShapePtr(data)->OnTimer(); } }; // // the function to be called by the timer // void Shape::OnTimer(Void) { SFBShellSmp shell = SFBShell::GetInstance(); // move the rectangle 3 pixels to the right. _rect.Offset(3, 0); // post the re-draw event to the applet. shell->PostEvent(SFCApplet::GetClassID(), SFXEvent(SREVT_RESPONDER_RENDER, SRP16_RENDER_INVOKE, true)); // set the timer again. shell->SetTimer(TIMER_VAL, OnTimerEntry, this); } // // draring handler. // void Shape::OnDraw(SFXGraphicsPtr g) { SFBShellSmp shell = SFBShell::GetInstance(); // fill the background with white. g->SetBackground(SFXRGBColor(255, 255, 255)); g->ClearRect(GetContentWorld()); // draw a red rectangle. g->SetFillMode(true); g->SetFillColor(SFXRGBColor(255, 0, 0)); g->DrawRect(_rect); }
BREW API ISHELL_SetTimer | PFNNOTIFY | SFBShell::GetTimerExpiration | SFBShell::CancelTimer
[ public ] SFCError SetTimerEx( SInt32 mSecs // timer expiration in milliseconds SFXCallbackPtr callback // pointer to AEECallback structure );
Move a rectangle to the right with a timer.
#define TIMER_VAL 100 // class definition of Shape class. SFMTYPEDEFCLASS(Shape) class Shape : public SFRApplication { private: SFXRectangle _rect; SFXCallback _callback; public: static SFCInvokerPtr ructorConst() { return new Shape; } private: Shape::Shape() { SFBShellSmp shell = SFBShell::GetInstance(); // register the drawing handler. RegisterHandler(SREVT_RESPONDER_RENDER, SRP16_RENDER_CONTENT, HANDLER_BEFORE, OnDrawEntry, this); // set the timer. shell->SetTimerEx(TIMER_VAL, &_callback); // initialize the rectangle. _rect.Set(0, 0, 32, 32); } // drawing handler. Void OnDraw(SFXGraphicsPtr); static Bool OnDrawEntry(SFXEventConstRef event, VoidPtr data) { ShapePtr(data)->OnDraw(SFXGraphicsPtr(event.P32())); return true; } // timer handler. Void OnTimer(Void); static Void OnTimerEntry(VoidPtr data) { ShapePtr(data)->OnTimer(); } }; // // the function to be called by the timer // void Shape::OnTimer(Void) { SFBShellSmp shell = SFBShell::GetInstance(); // move the rectangle 3 pixels to the right. _rect.Offset(3, 0); // post the re-draw event to the applet. shell->PostEvent(SFCApplet::GetClassID(), SFXEvent(SREVT_RESPONDER_RENDER, SRP16_RENDER_INVOKE, true)); // set the timer again. shell->SetTimerEx(TIMER_VAL, &_callback); } // // draring handler. // void Shape::OnDraw(SFXGraphicsPtr g) { SFBShellSmp shell = SFBShell::GetInstance(); // fill the background with white. g->SetBackground(SFXRGBColor(255, 255, 255)); g->ClearRect(GetContentWorld()); // draw a red rectangle. g->SetFillMode(true); g->SetFillColor(SFXRGBColor(255, 0, 0)); g->DrawRect(_rect); }
[ public ] Bool ShowCopyright(Void);
Start the applet associated with the specified ClassID.
SFBShellSmp shell = SFBShell::GetInstance(); // start the applet. shell->StartApplet(AEECLSID_SAMPLEAPPLET);
BREW API ISHELL_StartApplet | SFBShell::CreateInstance | SFBShell::CanStartApplet | SFBShell::CloseApplet | SFBShell::ActiveApplet
[ public ] SFCError StartAppletArgs( AEECLSID clsid // ClassID ACharConstPtr args // string of arguments to the application );
[ public ] SFCError StartAppletArgs( AEECLSID clsid // ClassID SFXAnsiStringConstRef args // string of arguments to the application );
BREW API ISHELL_StartAppletArgs | SFBShell::CreateInstance | SFBShell::StartAppletEx | SFBShell::BrowseFile | SFBShell::BrowseURL
Start the applet associated with the specified ClassID. The applet receive the EVT_APP_CONFIG instead of EVT_APP_START when start.
SFBShellSmp shell = SFBShell::GetInstance(); // start the applet. // if the SSA_CONFIG flag is set, // start the applet with the EVT_APP_CONFIG event. shell->StartAppletEx(AEECLSID_SAMPLEAPPLET, SSA_CONFIG);
BREW API ISHELL_StartAppletEx | SFBShell::StartApplet | SFBShell::BrowseFile | SFBShell::BrowseURL
[ public ] SFCError StartBackgroundApplet( AEECLSID clsid // ClassID ACharConstPtr args // ASCIIZ string of arguments to the application );
[ public ] SFCError StartBackgroundApplet( AEECLSID clsid // ClassID SFXAnsiStringConstRef args // ASCIIZ string of arguments to the application );
This function is available in BREW 3.1.
BREW API ISHELL_StartBackgroundApplet | SFBShell::CreateInstance | SFBShell::StartAppletEx | SFBShell::BrowseFile | SFBShell::BrowseURL
[ public ] SFCError UnregisterHandler( SFXAnsiStringConstRef in // input string );
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |