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 | /* $XFree86$ */
|
---|
30 |
|
---|
31 | #ifndef _SCRNSAVER_H_
|
---|
32 | #define _SCRNSAVER_H_
|
---|
33 |
|
---|
34 | #include <X11/Xfuncproto.h>
|
---|
35 | #include <X11/Xlib.h>
|
---|
36 | #include <X11/extensions/saver.h>
|
---|
37 |
|
---|
38 | typedef struct {
|
---|
39 | int type; /* of event */
|
---|
40 | unsigned long serial; /* # of last request processed by server */
|
---|
41 | Bool send_event; /* true if this came frome a SendEvent request */
|
---|
42 | Display *display; /* Display the event was read from */
|
---|
43 | Window window; /* screen saver window */
|
---|
44 | Window root; /* root window of event screen */
|
---|
45 | int state; /* ScreenSaverOff, ScreenSaverOn, ScreenSaverCycle*/
|
---|
46 | int kind; /* ScreenSaverBlanked, ...Internal, ...External */
|
---|
47 | Bool forced; /* extents of new region */
|
---|
48 | Time time; /* event timestamp */
|
---|
49 | } XScreenSaverNotifyEvent;
|
---|
50 |
|
---|
51 | typedef struct {
|
---|
52 | Window window; /* screen saver window - may not exist */
|
---|
53 | int state; /* ScreenSaverOff, ScreenSaverOn, ScreenSaverDisabled*/
|
---|
54 | int kind; /* ScreenSaverBlanked, ...Internal, ...External */
|
---|
55 | unsigned long til_or_since; /* time til or since screen saver */
|
---|
56 | unsigned long idle; /* total time since last user input */
|
---|
57 | unsigned long eventMask; /* currently selected events for this client */
|
---|
58 | } XScreenSaverInfo;
|
---|
59 |
|
---|
60 | _XFUNCPROTOBEGIN
|
---|
61 |
|
---|
62 | extern Bool XScreenSaverQueryExtension (
|
---|
63 | Display* /* display */,
|
---|
64 | int* /* event_base */,
|
---|
65 | int* /* error_base */
|
---|
66 | );
|
---|
67 |
|
---|
68 | extern Status XScreenSaverQueryVersion (
|
---|
69 | Display* /* display */,
|
---|
70 | int* /* major_version */,
|
---|
71 | int* /* minor_version */
|
---|
72 | );
|
---|
73 |
|
---|
74 | extern XScreenSaverInfo *XScreenSaverAllocInfo (
|
---|
75 | void
|
---|
76 | );
|
---|
77 |
|
---|
78 | extern Status XScreenSaverQueryInfo (
|
---|
79 | Display* /* display */,
|
---|
80 | Drawable /* drawable */,
|
---|
81 | XScreenSaverInfo* /* info */
|
---|
82 | );
|
---|
83 |
|
---|
84 | extern void XScreenSaverSelectInput (
|
---|
85 | Display* /* display */,
|
---|
86 | Drawable /* drawable */,
|
---|
87 | unsigned long /* eventMask */
|
---|
88 | );
|
---|
89 |
|
---|
90 | extern void XScreenSaverSetAttributes (
|
---|
91 | Display* /* display */,
|
---|
92 | Drawable /* drawable */,
|
---|
93 | int /* x */,
|
---|
94 | int /* y */,
|
---|
95 | unsigned int /* width */,
|
---|
96 | unsigned int /* height */,
|
---|
97 | unsigned int /* border_width */,
|
---|
98 | int /* depth */,
|
---|
99 | unsigned int /* class */,
|
---|
100 | Visual * /* visual */,
|
---|
101 | unsigned long /* valuemask */,
|
---|
102 | XSetWindowAttributes * /* attributes */
|
---|
103 | );
|
---|
104 |
|
---|
105 | extern void XScreenSaverUnsetAttributes (
|
---|
106 | Display* /* display */,
|
---|
107 | Drawable /* drawable */
|
---|
108 | );
|
---|
109 |
|
---|
110 | extern Status XScreenSaverRegister (
|
---|
111 | Display* /* display */,
|
---|
112 | int /* screen */,
|
---|
113 | XID /* xid */,
|
---|
114 | Atom /* type */
|
---|
115 | );
|
---|
116 |
|
---|
117 | extern Status XScreenSaverUnregister (
|
---|
118 | Display* /* display */,
|
---|
119 | int /* screen */
|
---|
120 | );
|
---|
121 |
|
---|
122 | extern Status XScreenSaverGetRegistered (
|
---|
123 | Display* /* display */,
|
---|
124 | int /* screen */,
|
---|
125 | XID* /* xid */,
|
---|
126 | Atom* /* type */
|
---|
127 | );
|
---|
128 |
|
---|
129 | _XFUNCPROTOEND
|
---|
130 |
|
---|
131 | #endif /* _SCRNSAVER_H_ */
|
---|