> > 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
}
Rudolf Polzer
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/