Re: xscreensaver entry functions

Dr Andrew C Aitchison <[email protected]>
Newsgroups gmane.comp.xfree86.expert
Message-ID <[email protected]>
On Mon, 9 Dec 2002, Olivier ERIBON wrote:

> I am using Xfree86 4.2.0 and 2.4.17 linux kernel on a specific embedded
> board with
> Ibm Ppc405 processor.
> I am using the simple X xscreensaver to protect LCD panel. But I want to cut
> the backlight if there is not external power in order to save battery.
> I will wish to know where is the Xserver function called to display an X and
> the function called when an Xevent is detected to stop the screensaver. I
> know how configurate the screensaver (Xset) but I don't know where this 2
> functions are  (to stop and start again backlight).

In your driver, call xf86DPMSInit to register your function with 
the X server. Then your function will be called whenever the X server
wishes to change the screens power state.
See xc/programs/Xserver/hw/xfree86/common/xf86.h and 
xc/programs/Xserver/hw/xfree86/common/xf86DPMS.c for xf86DPMSInit, and
and xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c
or must other drivers for examples of its use.

-- 
Dr. Andrew C. Aitchison		Computer Officer, DPMMS, Cambridge
[email protected]	http://www.dpmms.cam.ac.uk/~werdna
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.