summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:43 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:43 +0000
commit0c0b82a2143adfb443157badfe84093d8b74cc13 (patch)
tree57ff34136fc9894123ca3615d11ef0b79e1e0890
downloadxorg-proto-scrnsaverproto-XORG-STABLE.tar.gz
Initial revisionXORG-STABLE
-rw-r--r--saver.h54
-rw-r--r--saverproto.h168
-rw-r--r--scrnsaver.h149
3 files changed, 371 insertions, 0 deletions
diff --git a/saver.h b/saver.h
new file mode 100644
index 0000000..ea35454
--- /dev/null
+++ b/saver.h
@@ -0,0 +1,54 @@
+/*
+ * $XConsortium: saver.h,v 1.5 94/04/17 20:59:33 rws Exp $
+ *
+Copyright (c) 1992 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+ *
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+#ifndef _SAVER_H_
+#define _SAVER_H_
+
+#define ScreenSaverName "MIT-SCREEN-SAVER"
+#define ScreenSaverPropertyName "_MIT_SCREEN_SAVER_ID"
+
+#define ScreenSaverNotifyMask 0x00000001
+#define ScreenSaverCycleMask 0x00000002
+
+#define ScreenSaverMajorVersion 1
+#define ScreenSaverMinorVersion 0
+
+#define ScreenSaverOff 0
+#define ScreenSaverOn 1
+#define ScreenSaverCycle 2
+#define ScreenSaverDisabled 3
+
+#define ScreenSaverBlanked 0
+#define ScreenSaverInternal 1
+#define ScreenSaverExternal 2
+
+#define ScreenSaverNotify 0
+#define ScreenSaverNumberEvents 1
+
+#endif /* _SAVER_H_ */
diff --git a/saverproto.h b/saverproto.h
new file mode 100644
index 0000000..dd06ed5
--- /dev/null
+++ b/saverproto.h
@@ -0,0 +1,168 @@
+/*
+ * $XConsortium: saverproto.h,v 1.5 94/04/17 20:59:33 keith Exp $
+ *
+Copyright (c) 1992 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+ *
+ * Author: Keith Packard, MIT X Consortium
+ */
+/* $XFree86: xc/include/extensions/saverproto.h,v 3.2 2002/09/16 18:05:19 eich Exp $ */
+
+#ifndef _SAVERPROTO_H_
+#define _SAVERPROTO_H_
+
+#include <X11/extensions/saver.h>
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+
+#define X_ScreenSaverQueryVersion 0
+
+typedef struct _ScreenSaverQueryVersion {
+ CARD8 reqType; /* always ScreenSaverReqCode */
+ CARD8 saverReqType; /* always X_ScreenSaverQueryVersion */
+ CARD16 length B16;
+ CARD8 clientMajor;
+ CARD8 clientMinor;
+ CARD16 unused B16;
+} xScreenSaverQueryVersionReq;
+#define sz_xScreenSaverQueryVersionReq 8
+
+typedef struct {
+ CARD8 type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of protocol */
+ CARD16 minorVersion B16; /* minor version of protocol */
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xScreenSaverQueryVersionReply;
+#define sz_xScreenSaverQueryVersionReply 32
+
+#define X_ScreenSaverQueryInfo 1
+
+typedef struct _ScreenSaverQueryInfo {
+ CARD8 reqType; /* always ScreenSaverReqCode */
+ CARD8 saverReqType; /* always X_ScreenSaverQueryInfo */
+ CARD16 length B16;
+ Drawable drawable B32;
+} xScreenSaverQueryInfoReq;
+#define sz_xScreenSaverQueryInfoReq 8
+
+typedef struct {
+ CARD8 type; /* X_Reply */
+ BYTE state; /* Off, On */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Window window B32;
+ CARD32 tilOrSince B32;
+ CARD32 idle B32;
+ CARD32 eventMask B32;
+ BYTE kind; /* Blanked, Internal, External */
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+} xScreenSaverQueryInfoReply;
+#define sz_xScreenSaverQueryInfoReply 32
+
+#define X_ScreenSaverSelectInput 2
+
+typedef struct _ScreenSaverSelectInput {
+ CARD8 reqType; /* always ScreenSaverReqCode */
+ CARD8 saverReqType; /* always X_ScreenSaverSelectInput */
+ CARD16 length B16;
+ Drawable drawable B32;
+ CARD32 eventMask B32;
+} xScreenSaverSelectInputReq;
+#define sz_xScreenSaverSelectInputReq 12
+
+#define X_ScreenSaverSetAttributes 3
+
+typedef struct _ScreenSaverSetAttributes {
+ CARD8 reqType; /* always ScreenSaverReqCode */
+ CARD8 saverReqType; /* always X_ScreenSaverSetAttributes */
+ CARD16 length B16;
+ Drawable drawable B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ BYTE c_class;
+ CARD8 depth;
+ VisualID visualID B32;
+ CARD32 mask B32;
+} xScreenSaverSetAttributesReq;
+#define sz_xScreenSaverSetAttributesReq 28
+
+#define X_ScreenSaverUnsetAttributes 4
+
+typedef struct _ScreenSaverUnsetAttributes {
+ CARD8 reqType; /* always ScreenSaverReqCode */
+ CARD8 saverReqType; /* always X_ScreenSaverUnsetAttributes */
+ CARD16 length B16;
+ Drawable drawable B32;
+} xScreenSaverUnsetAttributesReq;
+#define sz_xScreenSaverUnsetAttributesReq 8
+
+typedef struct _ScreenSaverNotify {
+ CARD8 type; /* always eventBase + ScreenSaverNotify */
+ BYTE state; /* off, on, cycle */
+ CARD16 sequenceNumber B16;
+ Time timestamp B32;
+ Window root B32;
+ Window window B32; /* screen saver window */
+ BYTE kind; /* blanked, internal, external */
+ BYTE forced;
+ CARD16 pad0 B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xScreenSaverNotifyEvent;
+#define sz_xScreenSaverNotifyEvent 32
+
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* _SAVERPROTO_H_ */
diff --git a/scrnsaver.h b/scrnsaver.h
new file mode 100644
index 0000000..b20a648
--- /dev/null
+++ b/scrnsaver.h
@@ -0,0 +1,149 @@
+/*
+ * $XConsortium: scrnsaver.h,v 1.6 94/04/17 20:59:34 keith Exp $
+ *
+Copyright (c) 1992 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+ *
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+#ifndef _SCRNSAVER_H_
+#define _SCRNSAVER_H_
+
+#include <X11/Xfuncproto.h>
+#include <X11/extensions/saver.h>
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came frome a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* screen saver window */
+ Window root; /* root window of event screen */
+ int state; /* ScreenSaverOff, ScreenSaverOn, ScreenSaverCycle*/
+ int kind; /* ScreenSaverBlanked, ...Internal, ...External */
+ Bool forced; /* extents of new region */
+ Time time; /* event timestamp */
+} XScreenSaverNotifyEvent;
+
+typedef struct {
+ Window window; /* screen saver window - may not exist */
+ int state; /* ScreenSaverOff, ScreenSaverOn, ScreenSaverDisabled*/
+ int kind; /* ScreenSaverBlanked, ...Internal, ...External */
+ unsigned long til_or_since; /* time til or since screen saver */
+ unsigned long idle; /* total time since last user input */
+ unsigned long eventMask; /* currently selected events for this client */
+} XScreenSaverInfo;
+
+_XFUNCPROTOBEGIN
+
+extern Bool XScreenSaverQueryExtension (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* event_base */,
+ int* /* error_base */
+#endif
+);
+
+extern Status XScreenSaverQueryVersion (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* major_version */,
+ int* /* minor_version */
+#endif
+);
+
+extern XScreenSaverInfo *XScreenSaverAllocInfo (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern Status XScreenSaverQueryInfo (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* drawable */,
+ XScreenSaverInfo* /* info */
+#endif
+);
+
+extern void XScreenSaverSelectInput (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* drawable */,
+ unsigned long /* eventMask */
+#endif
+);
+
+extern void XScreenSaverSetAttributes (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* drawable */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* border_width */,
+ int /* depth */,
+ unsigned int /* class */,
+ Visual * /* visual */,
+ unsigned long /* valuemask */,
+ XSetWindowAttributes * /* attributes */
+#endif
+);
+
+extern void XScreenSaverUnsetAttributes (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* drawable */
+#endif
+);
+
+extern Status XScreenSaverRegister (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen */,
+ XID /* xid */,
+ Atom /* type */
+#endif
+);
+
+extern Status XScreenSaverUnregister (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen */
+#endif
+);
+
+extern Status XScreenSaverGetRegistered (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen */,
+ XID* /* xid */,
+ Atom* /* type */
+#endif
+);
+
+_XFUNCPROTOEND
+
+#endif /* _SCRNSAVER_H_ */