SophiaFramework UNIVERSE 5.3 |
Device information can be obtained with ease using the SFXDevice instance without the need to inquire the IShell Interface.
SFXDevice device; UInt16 n1 = device.GetScreenWidth(); // get screen width in pixels UInt16 n2 = device.GetScreenHeight(); // get screen height in pixels SFXSize size1 = device.GetScreenSize(); // get screen width and height in pixels UInt16 n3 = device.GetAlternateScreenWidth(); // get width of second screen in pixels UInt16 n4 = device.GetAlternateScreenHeight(); // get height of second screen in pixels SFXSize size2 = device.GetAlternateScreenSize();// get width and height of second screen in pixels UInt16 n5 = device.GetScrollBarWidth(); // get width of standard scroll bar in pixels UInt16 n6 = device.GetEncoding(); // get encoding method of character set UInt16 n7 = device.GetMenuTextScrollingTime(); // get value of wMenuTextScroll member of AEEDeviceInfo structure UInt16 n8 = device.GetColorDepth(); // get depth of screen color UInt16 n9 = device.GetMenuImageDelay(); // get value of wMenuImageDelay member of AEEDeviceInfo structure UInt16 n10 = device.GetRAMSize(); // get capacity of RAM Bool b1 = device.HasAlternateDisplay(); // check whether device has an alternative display(pager) or not Bool b2 = device.HasFlip(); // check whether mobile phone is flip type or not Bool b3 = device.HasVibrator(); // check whether vibrator is available or not Bool b4 = device.HasExternalSpeaker(); // check whether an external speaker is available or not Bool b5 = device.SupportsVoiceRecognition(); // check whether voice recognition is supported or not Bool b6 = device.SupportsPositionLocation(); // check whether position location is supported or not Bool b7 = device.SupportsMIDI(); // check whether MIDI file format is supported or not Bool b8 = device.SupportsCMX(); // check whether CMX audio is supported or not Bool b9 = device.SupportsPen(); // check whether pen device is supported or not UInt16 n11 = device.GetPromptProperties(); // get properties of default prompt UInt16 n12 = device.GetCloseAppKey(); // get key that closes the current application UInt16 n13 = device.GetCloseAllAppsKey(); // get key that closes all applications UInt16 n14 = device.GetLanguage(); // get language ID defined by ISO UInt16 n15 = device.GetNetLingerTime(); // get PPP standby time in milliseconds UInt16 n16 = device.GetSleepDeferTime(); // get time in milliseconds when device enters sleep mode UInt16 n17 = device.GetMaximumPathLength(); // get maximum length of file name(including path name) supported by device UInt16 n18 = device.GetPlatformID(); // get ID that uniquely identifies device platform
Constructor/Destructor |
---|
SFXDevice( Void ) Constructor of the SFXDevice class.
|
Public Functions | |
---|---|
UInt16 |
GetAlternateScreenHeight( Void ) Get the height of the second screen in pixels.
|
SFXSize |
GetAlternateScreenSize( Void ) Get the width and height of the second screen in pixels.
|
UInt16 |
GetAlternateScreenWidth( Void ) Get the width of the second screen in pixels.
|
UInt16 |
GetCloseAllAppsKey( Void ) Get the key that closes all applications.
|
UInt16 |
GetCloseAppKey( Void ) Get the key that closes the current application.
|
UInt16 |
GetColorDepth( Void ) Get the depth of screen color.
|
UInt16 |
GetEncoding( Void ) Get the encoding method of character set.
|
UInt32 |
GetLanguage( Void ) Get the language ID defined by ISO.
|
UInt16 |
GetMaximumPathLength( Void ) Get the maximum length of file name including path name supported by the device.
|
UInt32 |
GetMenuImageDelay( Void ) Get the value of wMenuImageDelay member variable of the AEEDeviceInfo structure.
|
UInt16 |
GetMenuTextScrollingTime( Void ) Get the value of wMenuTextScroll member variable of the AEEDeviceInfo structure.
|
UInt32 |
GetNetLingerTime( Void ) Get the PPP standby time in milliseconds.
|
UInt32 |
GetPlatformID( Void ) Get the ID that uniquely identifies the device platform.
|
UInt32 |
GetPromptProperties( Void ) Get the properties of default prompt.
|
UInt32 |
GetRAMSize( Void ) Get the capacity of RAM.
|
UInt16 |
GetScreenHeight( Void ) Get the screen height in pixels.
|
SFXSize |
GetScreenSize( Void ) Get the screen width and height in pixels.
|
UInt16 |
GetScreenWidth( Void ) Get the screen width in pixels.
|
UInt16 |
GetScrollBarWidth( Void ) Get the width of standard scroll bar in pixels.
|
UInt32 |
GetSleepDeferTime( Void ) Get the time the device enters sleep mode in milliseconds.
|
Bool |
HasAlternateDisplay( Void ) Check whether the device has an alternative display(pager) or not.
|
Bool |
HasExternalSpeaker( Void ) Check whether an external speaker is available or not.
|
Bool |
HasFlip( Void ) Check whether the mobile phone is of the flip type or not.
|
Bool |
HasVibrator( Void ) Check whether the vibrator is is available or not.
|
Bool |
SupportsCMX( Void ) Check whether the CMX audio is supported or not.
|
Bool |
SupportsMIDI( Void ) Check whether the MIDI file format is supported or not.
|
Bool |
SupportsPen( Void ) Check whether the pen device is supported or not.
|
Bool |
SupportsPositionLocation( Void ) Check whether the position location is supported or not.
|
Bool |
SupportsVoiceRecognition( Void ) Check whether the voice recognition is supported or not.
|
static SFXDeviceConstRef |
ZeroInstance( Void ) Get the instance that represents 0.
|
[ public, explicit ] SFXDevice(Void);
Create the SFXDevice instance for obtaining the device information from the BREW shell. Inside this constructor, get the device information after creating the instance of the BREW shell.
Get the screen size of the device.
SFXDevice devinfo; SFXSize devSize = devinfo.GetScreenSize();
[ public, const ] UInt16 GetAlternateScreenHeight(Void);
[ public, const ] SFXSize GetAlternateScreenSize(Void);
[ public, const ] UInt16 GetAlternateScreenWidth(Void);
[ public, const ] UInt16 GetCloseAllAppsKey(Void);
Default key is AVK_END.
[ public, const ] UInt16 GetCloseAppKey(Void);
[ public, const ] UInt16 GetColorDepth(Void);
For example, return 1 if it is monochrome, 2 if it is grayscale, 8 if is 256 colors.
[ public, const ] UInt16 GetEncoding(Void);
Return value can be one of the follows.
AEE_ENC_UNICODE AEE_ENC_UNICODE2 AEE_ENC_KSC5601 AEE_ENC_EUC_KR AEE_ENC_KSC5601 AEE_ENC_S_JIS AEE_ENC_EUC_CN OEM_RAW_TEXT AEE_ENC_UTF8 AEE_ENC_ISOLATIN1
The above values are defined in the AEEShell.h file of the BREW SDK.
[ public, const ] UInt32 GetLanguage(Void);
[ public, const ] UInt16 GetMaximumPathLength(Void);
[ public, const ] UInt32 GetMenuImageDelay(Void);
[ public, const ] UInt16 GetMenuTextScrollingTime(Void);
[ public, const ] UInt32 GetNetLingerTime(Void);
[ public, const ] UInt32 GetPlatformID(Void);
[ public, const ] UInt32 GetPromptProperties(Void);
[ public, const ] UInt32 GetRAMSize(Void);
[ public, const ] UInt16 GetScreenHeight(Void);
[ public, const ] SFXSize GetScreenSize(Void);
[ public, const ] UInt16 GetScreenWidth(Void);
[ public, const ] UInt16 GetScrollBarWidth(Void);
[ public, const ] UInt32 GetSleepDeferTime(Void);
[ public, const ] Bool HasAlternateDisplay(Void);
[ public, const ] Bool HasExternalSpeaker(Void);
[ public, const ] Bool HasFlip(Void);
[ public, const ] Bool HasVibrator(Void);
[ public, const ] Bool SupportsCMX(Void);
[ public, const ] Bool SupportsMIDI(Void);
[ public, const ] Bool upportsPen(Void);
[ public, const ] Bool SupportsPositionLocation(Void);
[ public, const ] Bool SupportsVoiceRecognition(Void);
[ public, static ] SFXDeviceConstRef ZeroInstance(Void);
Return the instance where 0 is set to the AEEDeviceInfo managed inside this class.
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |