Jim Schram <[EMAIL PROTECTED]> wrote:

> 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:

I found that, and have been using it. I just didn't want to be using 
something that is going to disappear in some future version of the OS.

>   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.

All right, now I have methods that work for OS <= 3.3, and for OS >= 
3.5 (at least for the time being :-)  Thank you.

--
Roger Chaplin
<[EMAIL PROTECTED]>

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to