1 | /* |
2 | * |
3 | Copyright (c) 1992 X Consortium |
4 | |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy |
6 | of this software and associated documentation files (the "Software"), to deal |
7 | in the Software without restriction, including without limitation the rights |
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
9 | copies of the Software, and to permit persons to whom the Software is |
10 | furnished to do so, subject to the following conditions: |
11 | |
12 | The above copyright notice and this permission notice shall be included in |
13 | all copies or substantial portions of the Software. |
14 | |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
18 | X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
21 | |
22 | Except as contained in this notice, the name of the X Consortium shall not be |
23 | used in advertising or otherwise to promote the sale, use or other dealings |
24 | in 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 | |
36 | typedef 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 | |
49 | typedef 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 | |
60 | extern Bool XScreenSaverQueryExtension ( |
61 | Display* /* display */, |
62 | int* /* event_base */, |
63 | int* /* error_base */ |
64 | ); |
65 | |
66 | extern Status XScreenSaverQueryVersion ( |
67 | Display* /* display */, |
68 | int* /* major_version */, |
69 | int* /* minor_version */ |
70 | ); |
71 | |
72 | extern XScreenSaverInfo *XScreenSaverAllocInfo ( |
73 | void |
74 | ); |
75 | |
76 | extern Status XScreenSaverQueryInfo ( |
77 | Display* /* display */, |
78 | Drawable /* drawable */, |
79 | XScreenSaverInfo* /* info */ |
80 | ); |
81 | |
82 | extern void XScreenSaverSelectInput ( |
83 | Display* /* display */, |
84 | Drawable /* drawable */, |
85 | unsigned long /* eventMask */ |
86 | ); |
87 | |
88 | extern 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 | |
103 | extern void XScreenSaverUnsetAttributes ( |
104 | Display* /* display */, |
105 | Drawable /* drawable */ |
106 | ); |
107 | |
108 | extern Status XScreenSaverRegister ( |
109 | Display* /* display */, |
110 | int /* screen */, |
111 | XID /* xid */, |
112 | Atom /* type */ |
113 | ); |
114 | |
115 | extern Status XScreenSaverUnregister ( |
116 | Display* /* display */, |
117 | int /* screen */ |
118 | ); |
119 | |
120 | extern Status XScreenSaverGetRegistered ( |
121 | Display* /* display */, |
122 | int /* screen */, |
123 | XID* /* xid */, |
124 | Atom* /* type */ |
125 | ); |
126 | |
127 | extern void XScreenSaverSuspend ( |
128 | Display* /* display */, |
129 | Bool /* suspend */ |
130 | ); |
131 | |
132 | _XFUNCPROTOEND |
133 | |
134 | #endif /* _SCRNSAVER_H_ */ |
135 | |