0N/A/*
0N/A * reserved comment block
0N/A * DO NOT REMOVE OR ALTER!
0N/A */
0N/A/*
0N/A * $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $
0N/A *
0N/A * Copyright � 2000 Compaq Computer Corporation, Inc.
0N/A * Copyright � 2002 Hewlett-Packard Company, Inc.
0N/A *
0N/A * Permission to use, copy, modify, distribute, and sell this software and its
0N/A * documentation for any purpose is hereby granted without fee, provided that
0N/A * the above copyright notice appear in all copies and that both that
0N/A * copyright notice and this permission notice appear in supporting
0N/A * documentation, and that the name of Compaq not be used in advertising or
0N/A * publicity pertaining to distribution of the software without specific,
0N/A * written prior permission. HP makes no representations about the
0N/A * suitability of this software for any purpose. It is provided "as is"
0N/A * without express or implied warranty.
0N/A *
0N/A * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
0N/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ
0N/A * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
0N/A * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
0N/A * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
0N/A * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0N/A *
0N/A * Author: Jim Gettys, HP Labs, HP.
0N/A */
0N/A
0N/A#ifndef _XRANDR_H_
0N/A#define _XRANDR_H_
0N/A
0N/A/*#include <X11/extensions/randr.h>*/
0N/A#include "randr.h"
0N/A
0N/A#include <X11/Xfuncproto.h>
0N/A
0N/A_XFUNCPROTOBEGIN
0N/A
0N/A
0N/Atypedef struct {
0N/A int width, height;
0N/A int mwidth, mheight;
0N/A} XRRScreenSize;
0N/A
0N/A/*
0N/A * Events.
0N/A */
0N/A
0N/Atypedef struct {
0N/A int type; /* event base */
0N/A unsigned long serial; /* # of last request processed by server */
0N/A Bool send_event; /* true if this came from a SendEvent request */
0N/A Display *display; /* Display the event was read from */
0N/A Window window; /* window which selected for this event */
0N/A Window root; /* Root window for changed screen */
0N/A Time timestamp; /* when the screen change occurred */
0N/A Time config_timestamp; /* when the last configuration change */
0N/A SizeID size_index;
0N/A SubpixelOrder subpixel_order;
0N/A Rotation rotation;
0N/A int width;
0N/A int height;
0N/A int mwidth;
0N/A int mheight;
0N/A} XRRScreenChangeNotifyEvent;
0N/A
0N/A
0N/A/* internal representation is private to the library */
0N/Atypedef struct _XRRScreenConfiguration XRRScreenConfiguration;
0N/A
0N/ABool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep);
0N/AStatus XRRQueryVersion (Display *dpy,
0N/A int *major_versionp,
0N/A int *minor_versionp);
0N/A
0N/AXRRScreenConfiguration *XRRGetScreenInfo (Display *dpy,
0N/A Drawable draw);
0N/A
0N/Avoid XRRFreeScreenConfigInfo (XRRScreenConfiguration *config);
0N/A
0N/A/*
0N/A * Note that screen configuration changes are only permitted if the client can
0N/A * prove it has up to date configuration information. We are trying to
0N/A * insist that it become possible for screens to change dynamically, so
0N/A * we want to ensure the client knows what it is talking about when requesting
0N/A * changes.
0N/A */
0N/AStatus XRRSetScreenConfig (Display *dpy,
0N/A XRRScreenConfiguration *config,
0N/A Drawable draw,
0N/A int size_index,
0N/A Rotation rotation,
0N/A Time timestamp);
0N/A
0N/A/* added in v1.1, sorry for the lame name */
0N/AStatus XRRSetScreenConfigAndRate (Display *dpy,
0N/A XRRScreenConfiguration *config,
0N/A Drawable draw,
0N/A int size_index,
0N/A Rotation rotation,
0N/A short rate,
0N/A Time timestamp);
0N/A
0N/A
0N/ARotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation);
0N/A
0N/ATime XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp);
0N/A
0N/AXRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes);
0N/A
0N/Ashort *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates);
0N/A
0N/ASizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config,
0N/A Rotation *rotation);
0N/A
0N/Ashort XRRConfigCurrentRate (XRRScreenConfiguration *config);
0N/A
0N/Aint XRRRootToScreen(Display *dpy, Window root);
0N/A
0N/A/*
0N/A * returns the screen configuration for the specified screen; does a lazy
0N/A * evalution to delay getting the information, and caches the result.
0N/A * These routines should be used in preference to XRRGetScreenInfo
0N/A * to avoid unneeded round trips to the X server. These are new
0N/A * in protocol version 0.1.
0N/A */
0N/A
0N/A
0N/AXRRScreenConfiguration *XRRScreenConfig(Display *dpy, int screen);
0N/AXRRScreenConfiguration *XRRConfig(Screen *screen);
0N/Avoid XRRSelectInput(Display *dpy, Window window, int mask);
0N/A
0N/A/*
0N/A * the following are always safe to call, even if RandR is not implemented
0N/A * on a screen
0N/A */
0N/A
0N/A
0N/ARotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation);
0N/AXRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes);
0N/Ashort *XRRRates (Display *dpy, int screen, int sizeID, int *nrates);
0N/ATime XRRTimes (Display *dpy, int screen, Time *config_timestamp);
0N/A
0N/A
0N/A/*
0N/A * intended to take RRScreenChangeNotify, or
0N/A * ConfigureNotify (on the root window)
0N/A * returns 1 if it is an event type it understands, 0 if not
0N/A */
0N/Aint XRRUpdateConfiguration(XEvent *event);
0N/A
0N/A_XFUNCPROTOEND
0N/A
0N/A#endif /* _XRANDR_H_ */