1 | /*
|
---|
2 | * $XConsortium: scrnsaver.h,v 1.6 94/04/17 20:59:34 keith Exp $
|
---|
3 | *
|
---|
4 | Copyright (c) 1992 X Consortium
|
---|
5 |
|
---|
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
|
---|
7 | of this software and associated documentation files (the "Software"), to deal
|
---|
8 | in the Software without restriction, including without limitation the rights
|
---|
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
---|
10 | copies of the Software, and to permit persons to whom the Software is
|
---|
11 | furnished to do so, subject to the following conditions:
|
---|
12 |
|
---|
13 | The above copyright notice and this permission notice shall be included in
|
---|
14 | all copies or substantial portions of the Software.
|
---|
15 |
|
---|
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
19 | X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
22 |
|
---|
23 | Except as contained in this notice, the name of the X Consortium shall not be
|
---|
24 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
25 | in this Software without prior written authorization from the X Consortium.
|
---|
26 | *
|
---|
27 | * Author: Keith Packard, MIT X Consortium
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef _SCRNSAVER_H_
|
---|
31 | #define _SCRNSAVER_H_
|
---|
32 |
|
---|
33 | #include <X11/Xfuncproto.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 | #if NeedFunctionPrototypes
|
---|
62 | Display* /* display */,
|
---|
63 | int* /* event_base */,
|
---|
64 | int* /* error_base */
|
---|
65 | #endif
|
---|
66 | );
|
---|
67 |
|
---|
68 | extern Status XScreenSaverQueryVersion (
|
---|
69 | #if NeedFunctionPrototypes
|
---|
70 | Display* /* display */,
|
---|
71 | int* /* major_version */,
|
---|
72 | int* /* minor_version */
|
---|
73 | #endif
|
---|
74 | );
|
---|
75 |
|
---|
76 | extern XScreenSaverInfo *XScreenSaverAllocInfo (
|
---|
77 | #if NeedFunctionPrototypes
|
---|
78 | void
|
---|
79 | #endif
|
---|
80 | );
|
---|
81 |
|
---|
82 | extern Status XScreenSaverQueryInfo (
|
---|
83 | #if NeedFunctionPrototypes
|
---|
84 | Display* /* display */,
|
---|
85 | Drawable /* drawable */,
|
---|
86 | XScreenSaverInfo* /* info */
|
---|
87 | #endif
|
---|
88 | );
|
---|
89 |
|
---|
90 | extern void XScreenSaverSelectInput (
|
---|
91 | #if NeedFunctionPrototypes
|
---|
92 | Display* /* display */,
|
---|
93 | Drawable /* drawable */,
|
---|
94 | unsigned long /* eventMask */
|
---|
95 | #endif
|
---|
96 | );
|
---|
97 |
|
---|
98 | extern void XScreenSaverSetAttributes (
|
---|
99 | #if NeedFunctionPrototypes
|
---|
100 | Display* /* display */,
|
---|
101 | Drawable /* drawable */,
|
---|
102 | int /* x */,
|
---|
103 | int /* y */,
|
---|
104 | unsigned int /* width */,
|
---|
105 | unsigned int /* height */,
|
---|
106 | unsigned int /* border_width */,
|
---|
107 | int /* depth */,
|
---|
108 | unsigned int /* class */,
|
---|
109 | Visual * /* visual */,
|
---|
110 | unsigned long /* valuemask */,
|
---|
111 | XSetWindowAttributes * /* attributes */
|
---|
112 | #endif
|
---|
113 | );
|
---|
114 |
|
---|
115 | extern void XScreenSaverUnsetAttributes (
|
---|
116 | #if NeedFunctionPrototypes
|
---|
117 | Display* /* display */,
|
---|
118 | Drawable /* drawable */
|
---|
119 | #endif
|
---|
120 | );
|
---|
121 |
|
---|
122 | extern Status XScreenSaverRegister (
|
---|
123 | #if NeedFunctionPrototypes
|
---|
124 | Display* /* display */,
|
---|
125 | int /* screen */,
|
---|
126 | XID /* xid */,
|
---|
127 | Atom /* type */
|
---|
128 | #endif
|
---|
129 | );
|
---|
130 |
|
---|
131 | extern Status XScreenSaverUnregister (
|
---|
132 | #if NeedFunctionPrototypes
|
---|
133 | Display* /* display */,
|
---|
134 | int /* screen */
|
---|
135 | #endif
|
---|
136 | );
|
---|
137 |
|
---|
138 | extern Status XScreenSaverGetRegistered (
|
---|
139 | #if NeedFunctionPrototypes
|
---|
140 | Display* /* display */,
|
---|
141 | int /* screen */,
|
---|
142 | XID* /* xid */,
|
---|
143 | Atom* /* type */
|
---|
144 | #endif
|
---|
145 | );
|
---|
146 |
|
---|
147 | _XFUNCPROTOEND
|
---|
148 |
|
---|
149 | #endif /* _SCRNSAVER_H_ */
|
---|