SophiaFramework UNIVERSE 5.3 |
SFXDevice is the class for obtaining information on the device or BREW environment.
Example 20.33. How to use the SFXDevice class
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 standard scroll bar width in pixels UInt16 n6 = device.GetEncoding(); // get character set encode method UInt16 n7 = device.GetMenuTextScrollingTime(); // get wMenuTextScroll value of AEEDeviceInfo structure UInt16 n8 = device.GetColorDepth(); // get screen color depth UInt16 n9 = device.GetMenuImageDelay(); // get wMenuImageDelay value of AEEDeviceInfo structure UInt16 n10 = device.GetRAMSize(); // get installed RAM capacity Bool b1 = device.HasAlternateDisplay(); // check whether or not device has an alternative display (pager) Bool b2 = device.HasFlip(); // check whether or not mobile phone has flip type Bool b3 = device.HasVibrator(); // check whether or not vibrator is installed Bool b4 = device.HasExternalSpeaker(); // check whether or not external speaker is installed Bool b5 = device.SupportsVoiceRecognition(); // check whether or not voice recognition is supported Bool b6 = device.SupportsPositionLocation(); // check whether or not position location is supported Bool b7 = device.SupportsMIDI(); // check whether or not MIDI file format is supported Bool b8 = device.SupportsCMX(); // check whether or not CMX audio is supported Bool b9 = device.SupportsPen(); // check whether or not pen device is supported UInt16 n11 = device.GetPromptProperties(); // get default prompt properties UInt16 n12 = device.GetCloseAppKey(); // get key that closes current application UInt16 n13 = device.GetCloseAllAppsKey(); // get key that closes all applications UInt16 n14 = device.GetLanguage(); // get ISO defined language UInt16 n15 = device.GetNetLingerTime(); // get PPP standby time in milliseconds UInt16 n16 = device.GetSleepDeferTime(); // get time in milliseconds until device enters into sleep mode UInt16 n17 = device.GetMaximumPathLength(); // get maximum file name length (including path name) supported by device UInt16 n18 = device.GetPlatformID(); // get ID that uniquely identifies device platform
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |