1/*
2 *
3Copyright (c) 1992 X Consortium
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of the X Consortium shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from the X Consortium.
25 *
26 * Author: Keith Packard, MIT X Consortium
27 */
28
29#ifndef _SCRNSAVER_H_
30#define _SCRNSAVER_H_
31
32#include <X11/Xfuncproto.h>
33#include <X11/Xlib.h>
34#include <X11/extensions/saver.h>
35
36typedef struct {
37 int type; /* of event */
38 unsigned long serial; /* # of last request processed by server */
39 Bool send_event; /* true if this came frome a SendEvent request */
40 Display *display; /* Display the event was read from */
41 Window window; /* screen saver window */
42 Window root; /* root window of event screen */
43 int state; /* ScreenSaverOff, ScreenSaverOn, ScreenSaverCycle*/
44 int kind; /* ScreenSaverBlanked, ...Internal, ...External */
45 Bool forced; /* extents of new region */
46 Time time; /* event timestamp */
47} XScreenSaverNotifyEvent;
48
49typedef struct {
50 Window window; /* screen saver window - may not exist */
51 int state; /* ScreenSaverOff, ScreenSaverOn, ScreenSaverDisabled*/
52 int kind; /* ScreenSaverBlanked, ...Internal, ...External */
53 unsigned long til_or_since; /* time til or since screen saver */
54 unsigned long idle; /* total time since last user input */
55 unsigned long eventMask; /* currently selected events for this client */
56} XScreenSaverInfo;
57
58_XFUNCPROTOBEGIN
59
60extern Bool XScreenSaverQueryExtension (
61 Display* /* display */,
62 int* /* event_base */,
63 int* /* error_base */
64);
65
66extern Status XScreenSaverQueryVersion (
67 Display* /* display */,
68 int* /* major_version */,
69 int* /* minor_version */
70);
71
72extern XScreenSaverInfo *XScreenSaverAllocInfo (
73 void
74);
75
76extern Status XScreenSaverQueryInfo (
77 Display* /* display */,
78 Drawable /* drawable */,
79 XScreenSaverInfo* /* info */
80);
81
82extern void XScreenSaverSelectInput (
83 Display* /* display */,
84 Drawable /* drawable */,
85 unsigned long /* eventMask */
86);
87
88extern void XScreenSaverSetAttributes (
89 Display* /* display */,
90 Drawable /* drawable */,
91 int /* x */,
92 int /* y */,
93 unsigned int /* width */,
94 unsigned int /* height */,
95 unsigned int /* border_width */,
96 int /* depth */,
97 unsigned int /* class */,
98 Visual * /* visual */,
99 unsigned long /* valuemask */,
100 XSetWindowAttributes * /* attributes */
101);
102
103extern void XScreenSaverUnsetAttributes (
104 Display* /* display */,
105 Drawable /* drawable */
106);
107
108extern Status XScreenSaverRegister (
109 Display* /* display */,
110 int /* screen */,
111 XID /* xid */,
112 Atom /* type */
113);
114
115extern Status XScreenSaverUnregister (
116 Display* /* display */,
117 int /* screen */
118);
119
120extern Status XScreenSaverGetRegistered (
121 Display* /* display */,
122 int /* screen */,
123 XID* /* xid */,
124 Atom* /* type */
125);
126
127extern void XScreenSaverSuspend (
128 Display* /* display */,
129 Bool /* suspend */
130);
131
132_XFUNCPROTOEND
133
134#endif /* _SCRNSAVER_H_ */
135

source code of include/X11/extensions/scrnsaver.h