1XSetScreenSaver(3)              XLIB FUNCTIONS              XSetScreenSaver(3)
2
3
4

NAME

6       XSetScreenSaver, XForceScreenSaver, XActivateScreenSaver, XResetScreen‐
7       Saver, XGetScreenSaver - manipulate the screen saver
8

SYNTAX

10       int XSetScreenSaver(Display *display, int timeout, int interval, int
11              prefer_blanking, int allow_exposures);
12
13       int XForceScreenSaver(Display *display, int mode);
14
15       int XActivateScreenSaver(Display *display);
16
17       int XResetScreenSaver(Display *display);
18
19       int XGetScreenSaver(Display *display, int *timeout_return, int *inter‐
20              val_return, int *prefer_blanking_return, int *allow_expo‐
21              sures_return);
22

ARGUMENTS

24       allow_exposures
25                 Specifies the screen save control values.  You can pass Don‐
26                 tAllowExposures, AllowExposures, or DefaultExposures.
27
28       allow_exposures_return
29                 Returns the current screen save control value (DontAllowExpo‐
30                 sures, AllowExposures, or DefaultExposures).
31
32       display   Specifies the connection to the X server.
33
34       interval  Specifies the interval, in seconds, between screen saver
35                 alterations.
36
37       interval_return
38                 Returns the interval between screen saver invocations.
39
40       mode      Specifies the mode that is to be applied.  You can pass
41                 ScreenSaverActive or ScreenSaverReset.
42
43       prefer_blanking
44                 Specifies how to enable screen blanking.  You can pass Dont‐
45                 PreferBlanking, PreferBlanking, or DefaultBlanking.
46
47       prefer_blanking_return
48                 Returns the current screen blanking preference (Dont‐
49                 PreferBlanking, PreferBlanking, or DefaultBlanking).
50
51       timeout   Specifies the timeout, in seconds, until the screen saver
52                 turns on.
53
54       timeout_return
55                 Returns the timeout, in seconds, until the screen saver turns
56                 on.
57

DESCRIPTION

59       Timeout and interval are specified in seconds.  A timeout of 0 disables
60       the screen saver (but an activated screen saver is not deactivated),
61       and a timeout of -1 restores the default.  Other negative values gener‐
62       ate a BadValue error.  If the timeout value is nonzero, XSetScreenSaver
63       enables the screen saver.  An interval of 0 disables the random-pattern
64       motion.  Both values are limited to a 16-bit signed integer range by
65       the wire protocol, despite the C prototype.  If no input from devices
66       (keyboard, mouse, and so on) is generated for the specified number of
67       timeout seconds once the screen saver is enabled, the screen saver is
68       activated.
69
70       For each screen, if blanking is preferred and the hardware supports
71       video blanking, the screen simply goes blank.  Otherwise, if either
72       exposures are allowed or the screen can be regenerated without sending
73       Expose events to clients, the screen is tiled with the root window
74       background tile randomly re-origined each interval seconds.  Otherwise,
75       the screens' state do not change, and the screen saver is not acti‐
76       vated.  The screen saver is deactivated, and all screen states are
77       restored at the next keyboard or pointer input or at the next call to
78       XForceScreenSaver with mode ScreenSaverReset.
79
80       If the server-dependent screen saver method supports periodic change,
81       the interval argument serves as a hint about how long the change period
82       should be, and zero hints that no periodic change should be made.
83       Examples of ways to change the screen include scrambling the colormap
84       periodically, moving an icon image around the screen periodically, or
85       tiling the screen with the root window background tile, randomly re-
86       origined periodically.
87
88       XSetScreenSaver can generate a BadValue error.
89
90       If the specified mode is ScreenSaverActive and the screen saver cur‐
91       rently is deactivated, XForceScreenSaver activates the screen saver
92       even if the screen saver had been disabled with a timeout of zero.  If
93       the specified mode is ScreenSaverReset and the screen saver currently
94       is enabled, XForceScreenSaver deactivates the screen saver if it was
95       activated, and the activation timer is reset to its initial state (as
96       if device input had been received).
97
98       XForceScreenSaver can generate a BadValue error.
99
100       The XActivateScreenSaver function activates the screen saver.
101
102       The XResetScreenSaver function resets the screen saver.
103
104       The XGetScreenSaver function gets the current screen saver values.
105

DIAGNOSTICS

107       BadValue  Some numeric value falls outside the range of values accepted
108                 by the request.  Unless a specific range is specified for an
109                 argument, the full range defined by the argument's type is
110                 accepted.  Any argument defined as a set of alternatives can
111                 generate this error.
112

SEE ALSO

114       Xlib - C Language X Interface
115
116
117
118X Version 11                     libX11 1.6.5               XSetScreenSaver(3)
Impressum