XSetScreenSaver(3X) XSetScreenSaver(3X)NAME XSetScreenSaver, XForceScreenSaver, XActivateScreenSaver, XResetScreenSaver, XGetScreenSaver - manipulate the screen saver SYNOPSIS XSetScreenSaver (display, timeout, interval, prefer-blanking, allow-exposures) Display *display; int timeout,interval; int prefer-blanking; int allow-exposures; XForceScreenSaver (display, mode) Display *display; int mode; XActivateScreenSaver (display) Display *display; XResetScreenSaver (display) Display *display; XGetScreenSaver (display, timeout-return, interval-return, prefer-blanking-return, allow-exposures-return) Display *display; int *timeout-return,*interval-return; int *prefer-blanking-return; int *allow-exposures-return; DESCRIPTION The XSetScreenSaver function sets the screen saver. The timeout and interval arguments are specified in seconds. A timeout of 0 disables the screen saver (but an activated screen saver is not deactivated), and a timeout of -1 re- stores the default. Other negative values generate a Bad- Value error. If timeout is nonzero, XSetScreenSaver enables the screen saver. An interval of 0 disables the random- pattern motion. If no input from devices (keyboard, mouse, and so on) is generated for timeout seconds once the screen saver is enabled, the screen saver is activated. For each screen, if blanking is preferred and the hardware supports video blanking, the screen simply goes blank. Oth- erwise, if either exposures are allowed or the screen can be regenerated without sending Expose events to clients, the screen is tiled with the root window background tile random- ly re-origined each interval seconds. Otherwise, the state of the screen does not change, and the screen saver is not activated. The screen saver is deactivated, and all screen states are restored at the next keyboard or pointer input or November, 1990 1
XSetScreenSaver(3X) XSetScreenSaver(3X)at the next call to XForceScreenSaver with mode ScreenSaver- Reset. If the server-dependent screen saver method supports period- ic change, the interval argument serves as a hint about how long the change period should be. A interval of 0 hints that no periodic change should be made. Examples of ways to change the screen include scrambling the colormap periodi- cally, moving an icon image around the screen periodically, or tiling the screen with the root window background tile, randomly re-origined periodically. The XForceScreenSaver function forces the screen saver. If mode is ScreenSaverActive and the screen saver currently is deactivated, XForceScreenSaver activates the screen saver even if the screen saver had been disabled with a timeout of 0. If mode is ScreenSaverReset and the screen saver currently is enabled, XForceScreenSaver deactivates the screen saver if it was activated, and the activation timer is reset to its initial state (as if device input had been received). The XActivateScreenSaver function activates the screen saver. The XResetScreenSaver function resets the screen saver. The XGetScreenSaver function gets current screen-saver values. Arguments These functions accept the following arguments: allow-exposures Specifies the current screen-saver control values. Possible values are DontAllowExposures, AllowExposures, or DefaultExposures. allow-exposures-return Returns the current screen-saver control value. Possible values are DontAllowExposures, AllowExposures, or DefaultExposures. display Specifies the connection to the X server. interval Specifies the interval in seconds between screen- saver invocations. interval-return Returns the interval between screen-saver invoca- tions. 2 November, 1990
XSetScreenSaver(3X) XSetScreenSaver(3X)mode Specifies the mode to be applied. prefer-blanking Specifies whether to enable screen blanking. Possi- ble values are DontPreferBlanking, PreferBlanking, or DefaultBlanking. prefer-blanking-return Returns the current screen blanking preference. Possible values are DontPreferBlanking, PreferBlanking, or DefaultBlanking. timeout Specifies the number of seconds of idle time before the screen saver takes effect. timeout-return Returns the number of seconds of idle time before the screen saver takes effect. ERRORS BadValue A numeric value falls outside the range of values accepted by the request. Unless a range is speci- fied for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error. The XSetScreenSaver and XForceScreenSaver functions can gen- erate a BadValue error. SEE ALSO Xlib - C Language Interface November, 1990 3