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