![]() |
![]()
| ![]() |
![]()
NAMEX11::Protocol::Ext::MIT_SCREEN_SAVER - external screen saver supportSYNOPSISuse X11::Protocol; my $X = X11::Protocol->new; $X->init_extension('MIT-SCREEN-SAVER') or print "MIT-SCREEN-SAVER extension not available"; DESCRIPTIONThe MIT-SCREEN-SAVER extension allows a client screen saver program to draw a screen saver. Any client can listen for screen saver activation too.A screen saver program registers itself and desired window attributes with "MitScreenSaverSetAttributes()" and selects saver notify events with "MitScreenSaverSelectInput()". There can only be one external saver program at any one time. See examples/mit-screen-saver-external.pl for a complete screen saver program. See the core "SetScreenSaver()" for the usual screen idle timeout, saver cycle period, and the "Blank" or "Internal" builtin saver styles. See the core "ForceScreenSaver()" to forcibly turn on the screen saver. REQUESTSThe following requests are made available with an "init_extension()" per "EXTENSIONS" in X11::Protocol.my $bool = $X->init_extension('MIT-SCREEN-SAVER');
EVENTS"MitScreenSaverNotify" events are sent to the client when selected by "MitScreenSaverSelectInput()" above. These events report when the screen saver state changes. The event has the usual fieldsname "MitScreenSaverNotify" synthetic true if from a SendEvent code integer opcode sequence_number integer and event-specific fields state "Off", "On", "Cycle" time server timestamp (integer) root root window of affected screen (XID) window the screen saver window (XID) kind "Blanked", "Internal", "External" forced integer 0 or 1 "state" is "Off" if the saver has turned off or "On" if it turned on. "forced" is 1 if the change was due to a "ForceScreenSaver()" request rather than user activity/inactivity. On/Off events are selected by NotifyMask to "MitScreenSaverSelectInput()" above. "state" is "Cycle" if the saver cycling period has expired, which means it's time to show something different. This is selected by CycleMask to "MitScreenSaverSelectInput()" above. "kind" is the current saver kind per "MitScreenSaverKind" below. ENUM TYPESThe following types are available for "$X->interp()" and "$X->num()" after "init_extension()".
For example, my $num = $X->num("MitScreenSaverKind", "External"); # sets $num to 2 BUGSIn XFree86 and X.org servers through to circa X.org 1.10, if the screen saver is activated with a "ForceScreenSaver()" request then the $til_or_since from "MitScreenSaverQueryInfo()" is a big number, apparently being a negative for the future time when it would have activated due to idle. There's no attempt to do anything about that here.Also in these servers when the saver is "On" the idle timeout apparently continues to fire too, so the "since" of $til_or_since is only since the last firing, as if screen saver was re-activated, not the time since first activated, or something like that. SEE ALSOX11::Protocol, X11::Protocol::Ext::DPMS/usr/share/doc/x11proto-scrnsaver-dev/saver.txt.gz xset(1), for setting the core screen saver parameters from the command line. xscreensaver(1), xssstate(1), xprintidle(1), X11::IdleTime HOME PAGE<http://user42.tuxfamily.org/x11-protocol-other/index.html>LICENSECopyright 2011, 2012, 2013, 2014, 2016, 2017 Kevin RydeX11-Protocol-Other is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. X11-Protocol-Other is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with X11-Protocol-Other. If not, see <http://www.gnu.org/licenses/>.
|