> > I need to check whether backlight is on or off.
Sorry, I forgot a piece of code:
void HwrDisplayAttributes(Boolean set, UInt8 kind, void *val) SYS_TRAP(sysTrapHwrDisplayAttributes);
static Boolean Light(Boolean switch, Boolean new) { Boolean old; HwrDisplayAttributes(false, 0x12, &old); // get state of light if (switch && (old != new)) // need to switch? EvtEnqueueKey(vchrBacklight, 0, commandKeyMask); // switch light return old; // return old state of the light }
Nice! This method doesn't use "public" APIs, but soemtimes you've gotta break the rules.
-Jeff Ishaq
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
