At 3:41 PM -0700 2001/08/14, Johnathan Smith wrote:
>Can someone please tell me how to turn the light
>on/off on the palm in code?

Toggling the backlight is best done by posting a vchrBacklight key event, like this:

  EvtEnqueueKey(vchrBacklight, 0, commandKeyMask);

But of course that doesn't help you if you want to explicitly turn it on or off. In 
that case... you need to use one of the undocumented/private HAL APIs.


On Palm OS 3.5 and earlier, you can use:

  Boolean HwrBacklight(Boolean set, Boolean newState);

On Palm OS 3.5 and later, you should use:

  Err HwrDisplayAttributes(Boolean set, HwrDisplayAttrType attr, void* dataP);

  passing hwrDispBacklight enum (I think the value is 18) for attr,
  and a pointer to a Boolean containing the backlight state for dataP (false=off, 
true=on).


Regards,

Jim Schram
Palm Incorporated
Partner Engineering


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to