1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
8 <title>X11 Screen Saver Extension</title>
9 <subtitle>MIT X Consortium Proposed Standard</subtitle>
10 <releaseinfo>Version 1.0</releaseinfo>
13 <firstname>Jim</firstname><surname>Fulton</surname>
14 <affiliation><orgname>Network Computing Devices, Inc</orgname></affiliation>
17 <firstname>Keith</firstname><surname>Packard</surname>
18 <affiliation><orgname>
19 X Consortium, Laboratory for Computer Science, Massachusetts Institute of Technology
20 </orgname></affiliation>
24 <copyright><year>1992</year><holder>Massachusetts Institute of Technology and Network Computing Devices, Inc</holder></copyright>
26 <productnumber>X Version 11, Release 5</productnumber>
30 Permission to use, copy, modify, and distribute this documentation for any
31 purpose and without fee is hereby granted, provided that the above copyright
32 notice and this permission notice appear in all copies. MIT and
33 Network Computing Devices, Inc. make no
34 representations about the suitability for any purpose of the information in
35 this document. This documentation is provided "as is" without express or
44 <sect1 id="Introduction_">
45 <title>Introduction</title>
47 The X Window System provides support for changing the image on a display screen
48 after a user-settable period of inactivity to avoid burning the cathode ray
49 tube phosphors. However, no interfaces are provided for the user to control
50 the image that is drawn. This extension allows an external "screen saver"
51 client to detect when the alternate image is to be displayed and to provide the
55 Current X server implementations typically provide at least one form of
56 "screen saver" image. Historically, this has been a copy of the X logo
57 drawn against the root background pattern. However, many users have asked
58 for the mechanism to allow them to write screen saver programs that provide
59 capabilities similar to those provided by other window systems. In
60 particular, such users often wish to be able to display corporate logos,
61 instructions on how to reactivate the screen, and automatic screen-locking
62 utilities. This extension provides a means for writing such clients.
66 <sect1 id="Assumptions">
67 <title>Assumptions</title>
69 This extension exports the notion of a special screen saver window that is
70 mapped above all other windows on a display. This window has the
71 <emphasis remap='I'>override-redirect</emphasis> attribute set so that it is not subject to manipulation by
72 the window manager. Furthermore, the X identifier for the window is never
73 returned by <function>QueryTree</function> requests on the root window, so it is typically
74 not visible to other clients.
79 <title>Overview</title>
82 <function>SetScreenSaver</function>
83 request can be used to set the length of time without
84 activity on any input devices after which the screen saver should "activate"
85 and alter the image on the screen. This image periodically "cycles" to
87 the length of time that any particular pixel is illuminated. Finally, the
88 screen saver is "deactivated" in response to activity on any of the input
90 or particular X requests.
94 Screen saving is typically done by disabling video output to the display tube
95 or by drawing a changing pattern onto the display. If the server chooses the
96 latter approach, a window with a special identifier is created and mapped at
97 the top of the stacking order where it remains until the screen saver
98 deactivates. At this time, the window is unmapped and is not accessible to any
102 The server's default mechanism is refered to as the <emphasis remap='I'>internal</emphasis> screen
103 saver. An <emphasis remap='I'>external</emphasis>
104 screen saver client requires a means of determining the window
105 id for the screen saver window and setting the attributes (e.g. size,
106 location, visual, colormap) to be used when the window is mapped. These
107 requirements form the basis of this extension.
112 <title>Issues</title>
114 This extension raises several interesting issues. First is the question of
115 what should be done if some other client has the server grabbed when the screen
116 saver is supposed to activate? This commonly occurs with window managers that
117 automatically ask the user to position a window when it is first mapped by
118 grabbing the server and drawing XORed lines on the root window.
121 Second, a screen saver program must control the actual RGB values sent to the
122 display tube to ensure that the values change periodically to avoid phosphor
123 burn in. Thus, the client must have a known colormap installed whenever the
124 screen saver window is displayed. To prevent screen flashing, the visual type
125 of the screen saver window should also be controlable.
128 Third, some implementations may wish to destroy the screen saver window when
129 it is not mapped so that it need not be avoided during event delivery. Thus,
130 screen saver clients may find that the requests that reference the screen
131 saver window may fail when the window is not displayed.
135 <sect1 id="Protocol">
136 <title>Protocol</title>
138 The Screen Saver extension is as follows:
144 In adition to the comon types described in the core protocol, the following
145 type is used in the request and event definitions in subsequent sections.
148 <informaltable frame="none">
149 <tgroup cols='2' align='left'>
150 <colspec colname='c1' colsep="0"/>
151 <colspec colname='c2' colsep="0"/>
160 <entry>SCREENSAVEREVENT</entry>
161 <entry><emphasis role="bold">ScreenSaverNotify</emphasis>,
162 <emphasis role="bold">ScreenSaverCycle</emphasis></entry>
170 <title>Errors</title>
172 The Screen Saver extension adds no errors beyond the core protocol.
176 <sect2 id="Requests">
177 <title>Requests</title>
179 The Screen Saver extension adds the following requests:
183 <emphasis role="bold">ScreenSaverQueryVersion</emphasis>
184 client-major-version: CARD8
185 client-minor-version: CARD8
187 server-major-version: CARD8
188 server-minor-version: CARD8
192 This request allows the client and server to determine which version of
193 the protocol should be used. The client sends the version that it
194 prefers; if the server understands that
195 version, it returns the same values and interprets subsequent requests
196 for this extension according to the specified version. Otherwise,
197 the server returns the closest version of the protocol that it can
198 support and interprets subsequent requests according to that version.
199 This document describes major version 1, minor version 0; the major
200 and minor revision numbers should only be incremented in response to
201 incompatible and compatible changes, respectively.
205 <emphasis role="bold">ScreenSaverQueryInfo</emphasis>
206 <emphasis>drawable</emphasis> DRAWABLE
209 state: {<emphasis role="bold">Disabled</emphasis>, <emphasis role="bold">Off</emphasis>, <emphasis role="bold">On</emphasis>}
210 kind: {<emphasis role="bold">Blanked</emphasis>, <emphasis role="bold">Internal</emphasis>, <emphasis role="bold">External</emphasis>}
213 event-mask: SETofSCREENSAVEREVENT
215 Errors: <emphasis role="bold">Drawable</emphasis>
219 This request returns information about the state of the screen
220 saver on the screen associated with <emphasis remap='I'>drawable</emphasis>. The <emphasis remap='I'>saver-window</emphasis>
221 is the XID that is associated with the screen saver window. This
222 window is not guaranteed to exist
223 except when external screen saver is active. Although it is a
224 child of the root, this window is not returned by
225 <function>QueryTree</function>
226 requests on the root. Whenever this window is mapped, it is always above
227 any of its siblings in the stacking order. XXX - TranslateCoords?
230 The <emphasis remap='I'>state</emphasis> field specifies whether or not the screen saver is currently
231 active and how the <emphasis remap='I'>til-or-since</emphasis> value should be interpretted:
234 <informaltable frame="none">
235 <tgroup cols='2' align='left'>
236 <colspec colname='c1' colsep="0"/>
237 <colspec colname='c2' colsep="0"/>
240 <entry><emphasis role="bold">Off</emphasis></entry>
242 The screen is not currently being saved;
243 <emphasis remap='I'>til-or-since</emphasis>
244 specifies the number of milliseconds until the screen saver is expected to
249 <entry><emphasis role="bold">On</emphasis></entry>
251 The screen is currently being saved;
252 <emphasis remap='I'>til-or-since</emphasis> specifies
253 the number of milliseconds since the screen saver activated.
257 <entry><emphasis role="bold">Disabled</emphasis></entry>
259 The screen saver is currently disabled;
260 <emphasis remap='I'>til-or-since</emphasis> is zero.
268 The <emphasis remap='I'>kind</emphasis> field specifies the mechanism that either is currently being
269 used or would have been were the screen being saved:
272 <informaltable frame="none">
273 <tgroup cols='2' align='left'>
274 <colspec colname='c1' colsep="0"/>
275 <colspec colname='c2' colsep="0"/>
278 <entry><emphasis role="bold">Blanked</emphasis></entry>
279 <entry>The video signal to the display monitor was disabled.</entry>
282 <entry><emphasis role="bold">Internal</emphasis></entry>
283 <entry>A server-dependent, built-in screen saver image was displayed; either no
284 client had set the screen saver window attributes or a different client
285 had the server grabbed when the screen saver activated.</entry>
288 <entry><emphasis role="bold">External</emphasis></entry>
289 <entry>The screen saver window was mapped with attributes set by a
290 client using the <function>ScreenSaverSetAttributes</function> request.</entry>
297 The <emphasis remap='I'>idle</emphasis> field specifies the number of milliseconds since the last
298 input was received from the user on any of the input devices.
302 The <emphasis remap='I'>event-mask</emphasis> field specifies which, if any, screen saver
303 events this client has requested using <function>ScreenSaverSelectInput</function>.
307 If <emphasis remap='I'>drawable</emphasis> is not a valid drawable identifier, a Drawable
308 error is returned and the request is ignored.
312 <emphasis role="bold">ScreenSaverSelectInput</emphasis>
314 event-mask: SETofSCREENSAVEREVENT
319 <emphasis role="bold">Drawable</emphasis>,
320 <emphasis role="bold">Match</emphasis>
324 This request specifies which Screen Saver extension events on the screen
325 associated with <emphasis remap='I'>drawable</emphasis> should be generated for this client. If
326 no bits are set in <emphasis remap='I'>event-mask</emphasis>, then no events will be generated.
327 Otherwise, any combination of the following bits may be set:
330 <informaltable frame="none">
331 <tgroup cols='2' align='center'>
332 <colspec colname='c1' colsep="0"/>
333 <colspec colname='c2' colsep="0"/>
336 <entry><emphasis role="bold">ScreenSaverNotify</emphasis></entry>
338 If this bit is set, <emphasis role="bold">ScreenSaverNotify</emphasis> events are generated whenever
339 the screen saver is activated or deactivated.
343 <entry><emphasis role="bold">ScreenSaverCycle</emphasis></entry>
345 If this bit is set, <emphasis role="bold">ScreenSaverNotify</emphasis> events are generated whenever
346 the screen saver cycle interval passes.
354 If <emphasis remap='I'>drawable</emphasis> is not a valid drawable identifier, a Drawable
355 error is returned. If any undefined bits are set in <emphasis remap='I'>event-mask</emphasis>,
356 a Value error is returned. If an error is returned,
357 the request is ignored.
361 <emphasis role="bold">ScreenSaverSetAttributes</emphasis>
366 {<emphasis role="bold">InputOutput</emphasis>, <emphasis role="bold">InputOnly</emphasis>, <emphasis role="bold">CopyFromParent</emphasis>}
368 visual: VISUALID or <emphasis role="bold">CopyFromParent</emphasis>
370 width, height, border-width: CARD16
372 value-list: LISTofVALUE
374 <emphasis role="bold">Access</emphasis>, <emphasis role="bold">Window</emphasis>, <emphasis role="bold">Pixmap</emphasis>, <emphasis role="bold">Colormap</emphasis>, <emphasis role="bold">Cursor</emphasis>, <emphasis role="bold">Match</emphasis>, <emphasis role="bold">Value</emphasis>, <emphasis role="bold">Alloc</emphasis>
378 This request sets the attributes that this client would like to see
379 used in creating the screen saver window on the screen associated
380 with <emphasis remap='I'>drawable</emphasis>. If another client currently has the attributes set,
381 an Access error is generated and the request is ignored.
385 Otherwise, the specified window attributes are checked as if
386 they were used in a core <function>CreateWindow</function> request whose
387 parent is the root. The <emphasis remap='I'>override-redirect</emphasis> field is ignored as
388 it is implicitly set to True. If the window attributes result in an
389 error according to the rules for <function>CreateWindow</function>, the request is ignored.
392 Otherwise, the attributes are stored and will take effect on the next
393 activation that occurs when the server is not grabbed by another client.
394 Any resources specified for the
395 <emphasis remap='I'>background-pixmap</emphasis> or <emphasis remap='I'>cursor</emphasis> attributes may be
396 freed immediately. The server is free to copy the <emphasis remap='I'>background-pixmap</emphasis>
397 or <emphasis remap='I'>cursor</emphasis> resources or to use them in place; therefore, the effect of
398 changing the contents of those resources is undefined. If the
399 specified <emphasis remap='I'>colormap</emphasis> no longer exists when the screen saver activates,
400 the parent's colormap is used instead. If no errors are generated by this
401 request, any previous
402 screen saver window attributes set by this client are released.
405 When the screen saver next activates and the server is not grabbed by
406 another client, the screen saver window is
407 created, if necessary, and set to the specified attributes and events
408 are generated as usual. The colormap
409 associated with the screen saver window is
410 installed. Finally, the screen saver window is mapped.
413 The window remains mapped and at the top of the stacking order
414 until the screen saver is deactivated in response to activity on
415 any of the user input devices, a <function>ForceScreenSaver</function> request with
416 a value of Reset, or any request that would cause the window to be
420 If the screen saver activates while the server is grabbed by another
421 client, the internal saver mechanism is used. The <function>ForceScreenSaver</function>
422 request may be used with a value of Active to
423 deactivate the internal saver and activate the external saver.
426 If the screen saver client's connection to the server is broken
427 while the screen saver is activated and the client's close down mode has not
428 been RetainPermanent or RetainTemporary, the current screen saver
429 is deactivated and the internal screen saver is immediately activated.
432 When the screen saver deactivates, the screen saver window's colormap
433 is uninstalled and the window is unmapped (except as described below).
434 The screen saver XID is disassociated
435 with the window and the server may, but is not required to,
436 destroy the window along with any children.
439 When the screen saver is being deactivated and then immediately
440 reactivated (such as when switching screen savers), the server
441 may leave the screen saver window mapped (typically to avoid
442 generating exposures).
446 <emphasis role="bold">ScreenSaverUnsetAttributes</emphasis>
450 <emphasis>drawble</emphasis>: <emphasis role="bold">DRAWABLE</emphasis>
452 Errors: <emphasis role="bold">Drawable</emphasis>
456 This request notifies the server that this client no longer
457 wishes to control the screen saver window. Any screen saver
458 attributes set by this client and any descendents of the screen
459 saver window created by this client should be released
460 immediately if the screen saver is not active, else upon
464 This request is ignored if the client has not previously set the screen saver
470 <title>Events</title>
472 The Screen Saver extension adds one event:
475 <emphasis role="bold">ScreenSaverNotify</emphasis>
479 <emphasis role="bold">root</emphasis>: WINDOW
480 <emphasis role="bold">window</emphasis>: WINDOW
481 <emphasis role="bold">state</emphasis>: {<emphasis role="bold">Off</emphasis>, <emphasis role="bold">On</emphasis>, <emphasis role="bold">Cycle</emphasis>}
482 <emphasis role="bold">kind</emphasis>: { <emphasis role="bold">Blanked</emphasis>, <emphasis role="bold">Internal</emphasis> , <emphasis role="bold">External</emphasis> }
483 <emphasis role="bold">forced</emphasis>: BOOL
484 <emphasis role="bold">time</emphasis>: TIMESTAMP
487 This event is delivered to clients that have requested
488 ScreenSaverNotify events using the <function>ScreenSaverSelectInput</function> request
489 whenever the screen saver activates or deactivates.
492 The <emphasis remap='I'>root</emphasis> field specifies root window of the screen for
493 which the event was generated. The <emphasis remap='I'>window</emphasis> field specifies
494 the value that is returned by <function>ScreenSaverQueryInfo</function> as
495 the identifier for the screen saver window. This window is not
496 required to exist if the external screen saver is not active.
499 The <emphasis remap='I'>state</emphasis> field specifies the cause of the event:
502 <informaltable frame="none">
503 <tgroup cols='2' align='left'>
504 <colspec colname='c1' colsep="0"/>
505 <colspec colname='c2' colsep="0"/>
508 <entry><emphasis role="bold">Off</emphasis></entry>
510 The screen saver deactivated; this event is sent if the client has set the
511 ScreenSaverNotify bit in its event mask.
515 <entry><emphasis role="bold">On</emphasis></entry>
517 The screen saver activated. This event is sent if the client has set the
518 ScreenSaverNotify bit in its event mask.
522 <entry><emphasis role="bold">Cycle</emphasis></entry>
524 The cycle interval passed and the client is expected to change the image on
525 the screen. This event is sent if the client has set the
526 ScreenSaverCycle bit in its event mask.
534 If <emphasis remap='I'>state</emphasis> is set to
535 <emphasis role="bold">On </emphasis> or
536 <emphasis role="bold">Off</emphasis>
537 then <emphasis remap='I'>forced</emphasis> indicates whether or not
538 activation or deactivation was caused by a core
539 <function>ForceScreenSaver</function>
540 request; otherwise, <emphasis remap='I'>forced</emphasis> is set to False.
544 The <emphasis remap='I'>kind</emphasis> field specifies mechanism that was used to save the screen
545 when the screen saver was activated, as described in
546 <function>ScreenSaverQueryInfo</function>.
550 The <emphasis remap='I'>time</emphasis> field indicates the server time
551 when the event was generated.
556 <sect1 id="Encoding">
557 <title>Encoding</title>
559 Please refer to the X11 Protocol Encoding document as this document uses
560 conventions established there.
563 The name of this extension is "SCREEN-SAVER".
566 <sect2 id="Common_Types">
567 <title>Common Types</title>
568 <literallayout class="monospaced">
569 SETofSCREENSAVEREVENT
570 #x00000001 ScreenSaverNotifyMask
571 #x00000002 ScreenSaverCycleMask
575 <sect2 id="Requests_2">
576 <title>Requests</title>
577 <literallayout class="monospaced">
578 <emphasis role="bold">ScreenSaverQueryVersion</emphasis>
579 1 CARD8 screen saver opcode
582 1 CARD8 client major version
583 1 CARD8 client minor version
588 2 CARD16 sequence number
590 1 CARD8 server major version
591 1 CARD8 server minor version
594 <emphasis role="bold">ScreenSaverQueryInfo</emphasis>
595 1 CARD8 screen saver opcode
598 4 DRAWABLE drawable associated with screen
605 2 CARD16 sequence number
607 4 WINDOW saver window
608 4 CARD32 milliseconds until saver or since saver
609 4 CARD32 milliseconds since last user device input
610 4 SETofSCREENSAVEREVENT event mask
617 <emphasis role="bold">ScreenSaverSelectInput</emphasis>
618 1 CARD8 screen saver opcode
621 4 DRAWABLE drawable associated with screen
622 4 SETofSCREENSAVEREVENT event mask
624 <emphasis role="bold">ScreenSaverSetAttributes</emphasis>
625 1 CARD8 screen saver opcode
628 4 DRAWABLE drawable associated with screen
633 2 CARD16 border-width
641 4 BITMASK value-mask (has n bits set to 1)
642 encodings are the same as for core CreateWindow
643 4n LISTofVALUE value-list
644 encodings are the same as for core CreateWindow
646 <emphasis role="bold">ScreenSaverUnsetAttributes</emphasis>
647 1 CARD8 screen saver opcode
650 4 DRAWABLE drawable associated with screen
655 <title>Events</title>
657 <literallayout class="monospaced">
658 <emphasis role="bold">ScreenSaverNotify</emphasis>
659 1 CARD8 code assigned by core
664 2 CARD16 sequence number
667 4 WINDOW screen saver window
678 <sect1 id="Inter_Client_Communications_Conventions_">
679 <title>Inter-Client Communications Conventions</title>
681 Screen saver clients should create at least one resource value whose
682 identifier can be stored in a property named
683 <emphasis role="bold">_SCREEN_SAVER_ID</emphasis>
684 on the root of each screen it is managing.
685 This property should have one 32-bit value corresponding to the resource
686 identifier; the type of the property should indicate the type of the
687 resource and should be one of the following:
688 <emphasis role="bold">WINDOW</emphasis>,
689 <emphasis role="bold">PIXMAP</emphasis>,
690 <emphasis role="bold">CURSOR</emphasis>,
691 <emphasis role="bold">FONT</emphasis>, or
692 <emphasis role="bold">COLORMAP</emphasis>.
696 <sect1 id="C_language_binding">
697 <title>C language binding</title>
700 The C binding for this extension simply provide access to the protocol; they
701 add no semantics beyond what is described above.
705 The include file for this extension is
706 <emphasis role="bold"><X11/extensions/scrnsaver.h></emphasis>.
712 <funcdef>Bool <function>XScreenSaverQueryExtension</function></funcdef>
713 <paramdef>Display <parameter>*display</parameter></paramdef>
714 <paramdef>int <parameter>*event_base</parameter></paramdef>
715 <paramdef>int <parameter>*error_base</parameter></paramdef>
721 <emphasis role="bold">True</emphasis>
722 if the specified <emphasis remap='I'>display</emphasis> supports the
723 SCREEN-SAVER extension; otherwise it returns
724 <emphasis role="bold">False</emphasis>.
725 If the extension is supported, the event number for
726 <function>ScreenSaverNotify</function>
727 events is returned in the value pointed to by
728 <emphasis remap='I'>event_base</emphasis>. Since
729 no additional errors are defined by this extension, the results
730 of <emphasis remap='I'>error_base</emphasis> are not defined.
735 <funcdef>Status <function>XScreenSaverQueryVersion</function></funcdef>
736 <paramdef>Display <parameter>*display</parameter></paramdef>
737 <paramdef>int <parameter>*major</parameter></paramdef>
738 <paramdef>int <parameter>*minor</parameter></paramdef>
743 If the specified <emphasis remap='I'>display</emphasis> supports the
744 extension, the version numbers of the protocol
745 expected by the server are returned in
746 <emphasis remap='I'>major</emphasis> and
747 <emphasis remap='I'>minor</emphasis> and
748 a non-zero value is returned. Otherwise, the arguments are not
749 set and 0 is returned.
752 <para>XScreenSaverInfo *</para>
753 <para>XScreenSaverAllocInfo()</para>
756 This routine allocates and returns an
757 <emphasis role="bold">XScreenSaverInfo</emphasis> structure
758 for use in calls to <function>XScreenSaverQueryInfo</function>.
760 structure are initialized to zero. If insufficient memory is available,
761 NULL is returned. The results of this routine can be released
762 using <emphasis remap='I'>XFree</emphasis>.
767 <funcdef>Status <function>XScreenSaverQueryInfo</function></funcdef>
768 <paramdef>Display <parameter>*display</parameter></paramdef>
769 <paramdef>Drawable <parameter>drawable</parameter></paramdef>
770 <paramdef>XScreenSaverInfo <parameter>*saver_info</parameter></paramdef>
775 If the specified <emphasis remap='I'>display</emphasis> supports the extension,
776 information about the current state of the
777 screen server is returned in <emphasis remap='I'>saver_info</emphasis> and a non-zero value is
778 returned. The <function>XScreenSaverInfo</function> structure is
782 <literallayout class="monospaced">
784 Window window; /* screen saver window */
785 int state; /* ScreenSaver{Off,On,Disabled} */
786 int kind; /* ScreenSaver{Blanked,Internal,External} */
787 unsigned long til_or_since; /* milliseconds */
788 unsigned long idle; /* milliseconds */
789 unsigned long event_mask; /* events */
794 See the <function>ScreenSaverQueryInfo</function> request for a
795 description of the fields. If the extension is not supported,
796 <emphasis remap='I'>saver_info</emphasis> is not changed and 0
802 <funcdef>void <function>XScreenSaverSelectInput</function></funcdef>
803 <paramdef>Display <parameter>*display</parameter></paramdef>
804 <paramdef>Drawable <parameter>drawable</parameter></paramdef>
805 <paramdef>unsigned long <parameter>event_mask</parameter></paramdef>
810 If the specified <emphasis remap='I'>display</emphasis> supports the extension,
811 this routine asks that events related to
812 the screen saver be generated for this client.
813 The format of the events generated is:
816 <literallayout class="monospaced">
818 int type; /* of event */
819 unsigned long serial; /* # of last request processed by server */
820 Bool send_event; /* true if this came frome a SendEvent request */
821 Display *display; /* Display the event was read from */
822 Window window; /* screen saver window */
823 Window root; /* root window of event screen */
824 int state; /* ScreenSaver{Off,On,Cycle} */
825 int kind; /* ScreenSaver{Blanked,Internal,External} */
826 Bool forced; /* extents of new region */
827 Time time; /* event timestamp */
828 } XScreenSaverNotifyEvent;
832 See the definition of the
833 <function>ScreenSaverSelectInput</function> request for descriptions
834 of the allowed event masks. <!-- xref ? -->
839 <funcdef>void <function>XScreenSaverSetAttributes</function></funcdef>
840 <paramdef>Display <parameter>*dpy</parameter></paramdef>
841 <paramdef>Drawable <parameter>drawable</parameter></paramdef>
842 <paramdef>int <parameter>x</parameter></paramdef>
843 <paramdef>int <parameter>y</parameter></paramdef>
844 <paramdef>unsigned int <parameter>width</parameter></paramdef>
845 <paramdef>unsigned int <parameter>height</parameter></paramdef>
846 <paramdef>unsigned int <parameter>border_width</parameter></paramdef>
847 <paramdef>int <parameter>depth</parameter></paramdef>
848 <paramdef>unsigned int <parameter>class</parameter></paramdef>
849 <paramdef>Visual <parameter>*visual</parameter></paramdef>
850 <paramdef>unsigned long <parameter>valuemask</parameter></paramdef>
851 <paramdef>XSetWindowAttributes <parameter>*attributes</parameter></paramdef>
856 If the specified <emphasis remap='I'>display</emphasis> supports the
857 extension, this routine sets the attributes to be used
858 the next time the external screen saver is activated. See the definition
859 of the <function>ScreenSaverSetAttributes</function> request for a
860 description of each of the arguments.
865 <funcdef>void <function>XScreenSaverUnsetAttributes</function></funcdef>
866 <paramdef>Display <parameter>*display</parameter></paramdef>
867 <paramdef>Drawable <parameter>drawable</parameter></paramdef>
872 If the specified <emphasis remap='I'>display</emphasis> supports the
873 extension, this routine instructs the server to discard
874 any previous screen saver window attributes set by this client.
879 <funcdef>Status <function>XScreenSaverRegister</function></funcdef>
880 <paramdef>Display <parameter>*display</parameter></paramdef>
881 <paramdef>int <parameter>screen</parameter></paramdef>
882 <paramdef>XID <parameter>xid</parameter></paramdef>
883 <paramdef>Atom <parameter>type</parameter></paramdef>
888 This routine stores the given <emphasis remap='I'>XID</emphasis> in the
889 <emphasis role="bold">_SCREEN_SAVER_ID</emphasis> property (of the given
890 <emphasis remap='I'>type</emphasis>) on the root window of the specified
891 <emphasis remap='I'>screen</emphasis>. It returns zero if an error
892 is encountered and the property is not changed, otherwise it returns
898 <funcdef>Status <function>XScreenSaverUnregister</function></funcdef>
899 <paramdef>Display <parameter>*display</parameter></paramdef>
900 <paramdef>int <parameter>screen</parameter></paramdef>
905 This routine removes any <function>_SCREEN_SAVER_ID</function> from the
906 root window of the specified <emphasis remap='I'>screen</emphasis>.
907 It returns zero if an error is encountered and the property is changed,
908 otherwise it returns non-zero.
913 <funcdef>Status <function>XScreenSaverGetRegistered</function></funcdef>
914 <paramdef>Display <parameter>*display</parameter></paramdef>
915 <paramdef>int <parameter>screen</parameter></paramdef>
916 <paramdef>XID <parameter>*xid</parameter></paramdef>
917 <paramdef>ATOM <parameter>*type</parameter></paramdef>
923 This routine returns the
924 <emphasis remap='I'>XID</emphasis> and
925 <emphasis remap='I'>type</emphasis> stored in the
926 <emphasis role="bold">_SCREEN_SAVER_ID</emphasis> property on the
927 root window of the specified <emphasis remap='I'>screen</emphasis>.
928 It returns zero if an error
929 is encountered or if the property does not exist or is not of the correct
930 format; otherwise it returns non-zero.