At 9:19 PM -0500 2000/03/13, Roger Chaplin wrote:
>I'm still waiting to hear the officially legal, sanctioned, and
>endorsed method of determining the current state of the backlight.
As far as an officially documented and supported API is concerned, there currently
isn't one. (Bummer, huh!)
However...
Boolean HwrBacklight(Boolean set, Boolean newState)
HAL_CALL(sysTrapHwrBacklightV33);
works in OS versions prior to 3.5 and remains implemented in 3.5 for backwards
compatibility even though it has been deprecated. For OS 3.5 and later, this
specialized trap has been generalized into the following selector-based API:
Err HwrDisplayAttributes(Boolean set, HwrDisplayAttrType attr, void* dataP)
HAL_CALL(sysTrapHwrDisplayAttributes);
Just pass it the hwrDispBacklight attribute (the 19th enum in a private list of
attributes) and a pointer to a UInt8 (a Boolean) in OS 3.5 and later. Currently both
APIs call the same private implementation, though this will likely change in the near
future as the HwrBacklight trap is about to be re-purposed.
In any case, calling either of these functions may impact your application's
certification, as all HwrXXX APIs are for system use only. It's probably best to
request a special exception just-in-case. I for one (and I speak for many) would
rather see you use one of the above APIs than poke about at the hardware directly. Our
licensees would appreciate it even more! ;o)
Regards,
Jim Schram
Palm Incorporated
Partner Engineering
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html