1XSetScreenSaver(3X11) XLIB FUNCTIONS XSetScreenSaver(3X11)
2
3
4
6 XSetScreenSaver, XForceScreenSaver, XActivateScreenSaver, XResetScreen‐
7 Saver, XGetScreenSaver - manipulate the screen saver
8
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
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
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. If no input from devices (keyboard, mouse, and so on) is gen‐
65 erated for the specified number of timeout seconds once the screen
66 saver is enabled, the screen saver is activated.
67
68 For each screen, if blanking is preferred and the hardware supports
69 video blanking, the screen simply goes blank. Otherwise, if either
70 exposures are allowed or the screen can be regenerated without sending
71 Expose events to clients, the screen is tiled with the root window
72 background tile randomly re-origined each interval seconds. Otherwise,
73 the screens' state do not change, and the screen saver is not acti‐
74 vated. The screen saver is deactivated, and all screen states are
75 restored at the next keyboard or pointer input or at the next call to
76 XForceScreenSaver with mode ScreenSaverReset.
77
78 If the server-dependent screen saver method supports periodic change,
79 the interval argument serves as a hint about how long the change period
80 should be, and zero hints that no periodic change should be made.
81 Examples of ways to change the screen include scrambling the colormap
82 periodically, moving an icon image around the screen periodically, or
83 tiling the screen with the root window background tile, randomly re-
84 origined periodically.
85
86 XSetScreenSaver can generate a BadValue error.
87
88 If the specified mode is ScreenSaverActive and the screen saver cur‐
89 rently is deactivated, XForceScreenSaver activates the screen saver
90 even if the screen saver had been disabled with a timeout of zero. If
91 the specified mode is ScreenSaverReset and the screen saver currently
92 is enabled, XForceScreenSaver deactivates the screen saver if it was
93 activated, and the activation timer is reset to its initial state (as
94 if device input had been received).
95
96 XForceScreenSaver can generate a BadValue error.
97
98 The XActivateScreenSaver function activates the screen saver.
99
100 The XResetScreenSaver function resets the screen saver.
101
102 The XGetScreenSaver function gets the current screen saver values.
103
105 BadValue Some numeric value falls outside the range of values accepted
106 by the request. Unless a specific range is specified for an
107 argument, the full range defined by the argument's type is
108 accepted. Any argument defined as a set of alternatives can
109 generate this error.
110
112 Xlib - C Language X Interface
113
114
115
116X Version 11 libX11 1.0.3 XSetScreenSaver(3X11)