GetSSaver.c revision 3233502e
11.1Sitojun/*
21.1Sitojun
31.14SmartinCopyright 1986, 1998  The Open Group
41.1Sitojun
51.1SitojunPermission to use, copy, modify, distribute, and sell this software and its
61.1Sitojundocumentation for any purpose is hereby granted without fee, provided that
71.14Smartinthe above copyright notice appear in all copies and that both that
81.6Spetercopyright notice and this permission notice appear in supporting
91.1Sitojundocumentation.
101.2Smycroft
111.1SitojunThe above copyright notice and this permission notice shall be included in
121.1Sitojunall copies or substantial portions of the Software.
131.1Sitojun
141.5SpeterTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
151.1SitojunIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
161.1SitojunFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
171.1SitojunOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
181.1SitojunAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
191.1SitojunCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
201.1Sitojun
211.5SpeterExcept as contained in this notice, the name of The Open Group shall not be
221.5Speterused in advertising or otherwise to promote the sale, use or other dealings
231.5Speterin this Software without prior written authorization from The Open Group.
241.5Speter
251.5Speter*/
261.7Sapb
271.5Speter#ifdef HAVE_CONFIG_H
281.5Speter#include <config.h>
291.5Speter#endif
301.5Speter#include "Xlibint.h"
311.5Speter
321.1Sitojunint
331.1SitojunXGetScreenSaver(
341.1Sitojun     register Display *dpy,
351.6Speter     /* the following are return only vars */
361.6Speter     int *timeout,
371.6Speter     int *interval,
381.12Sskrll     int *prefer_blanking,
391.6Speter     int *allow_exp)  /*boolean */
401.6Speter
411.4Speter{
421.10Sdarcy    xGetScreenSaverReply rep;
431.1Sitojun    _X_UNUSED register xReq *req;
441.4Speter    LockDisplay(dpy);
451.1Sitojun    GetEmptyReq(GetScreenSaver, req);
461.1Sitojun
471.1Sitojun    (void) _XReply (dpy, (xReply *)&rep, 0, xTrue);
481.1Sitojun    *timeout = rep.timeout;
491.1Sitojun    *interval = rep.interval;
501.1Sitojun    *prefer_blanking = rep.preferBlanking;
511.10Sdarcy    *allow_exp = rep.allowExposures;
521.1Sitojun    UnlockDisplay(dpy);
531.1Sitojun    SyncHandle();
541.1Sitojun    return 1;
551.1Sitojun}
561.1Sitojun
571.4Speter