Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/solaris/native/sun/awt/Xrandr.h
32287 views
/*1* reserved comment block2* DO NOT REMOVE OR ALTER!3*/4/*5* $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $6*7* Copyright � 2000 Compaq Computer Corporation, Inc.8* Copyright � 2002 Hewlett-Packard Company, Inc.9*10* Permission to use, copy, modify, distribute, and sell this software and its11* documentation for any purpose is hereby granted without fee, provided that12* the above copyright notice appear in all copies and that both that13* copyright notice and this permission notice appear in supporting14* documentation, and that the name of Compaq not be used in advertising or15* publicity pertaining to distribution of the software without specific,16* written prior permission. HP makes no representations about the17* suitability of this software for any purpose. It is provided "as is"18* without express or implied warranty.19*20* HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL21* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ22* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES23* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION24* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN25* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.26*27* Author: Jim Gettys, HP Labs, HP.28*/2930#ifndef _XRANDR_H_31#define _XRANDR_H_3233/*#include <X11/extensions/randr.h>*/34#include "randr.h"3536#include <X11/Xfuncproto.h>3738_XFUNCPROTOBEGIN394041typedef struct {42int width, height;43int mwidth, mheight;44} XRRScreenSize;4546/*47* Events.48*/4950typedef struct {51int type; /* event base */52unsigned long serial; /* # of last request processed by server */53Bool send_event; /* true if this came from a SendEvent request */54Display *display; /* Display the event was read from */55Window window; /* window which selected for this event */56Window root; /* Root window for changed screen */57Time timestamp; /* when the screen change occurred */58Time config_timestamp; /* when the last configuration change */59SizeID size_index;60SubpixelOrder subpixel_order;61Rotation rotation;62int width;63int height;64int mwidth;65int mheight;66} XRRScreenChangeNotifyEvent;676869/* internal representation is private to the library */70typedef struct _XRRScreenConfiguration XRRScreenConfiguration;7172Bool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep);73Status XRRQueryVersion (Display *dpy,74int *major_versionp,75int *minor_versionp);7677XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy,78Drawable draw);7980void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config);8182/*83* Note that screen configuration changes are only permitted if the client can84* prove it has up to date configuration information. We are trying to85* insist that it become possible for screens to change dynamically, so86* we want to ensure the client knows what it is talking about when requesting87* changes.88*/89Status XRRSetScreenConfig (Display *dpy,90XRRScreenConfiguration *config,91Drawable draw,92int size_index,93Rotation rotation,94Time timestamp);9596/* added in v1.1, sorry for the lame name */97Status XRRSetScreenConfigAndRate (Display *dpy,98XRRScreenConfiguration *config,99Drawable draw,100int size_index,101Rotation rotation,102short rate,103Time timestamp);104105106Rotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation);107108Time XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp);109110XRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes);111112short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates);113114SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config,115Rotation *rotation);116117short XRRConfigCurrentRate (XRRScreenConfiguration *config);118119int XRRRootToScreen(Display *dpy, Window root);120121/*122* returns the screen configuration for the specified screen; does a lazy123* evalution to delay getting the information, and caches the result.124* These routines should be used in preference to XRRGetScreenInfo125* to avoid unneeded round trips to the X server. These are new126* in protocol version 0.1.127*/128129130XRRScreenConfiguration *XRRScreenConfig(Display *dpy, int screen);131XRRScreenConfiguration *XRRConfig(Screen *screen);132void XRRSelectInput(Display *dpy, Window window, int mask);133134/*135* the following are always safe to call, even if RandR is not implemented136* on a screen137*/138139140Rotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation);141XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes);142short *XRRRates (Display *dpy, int screen, int sizeID, int *nrates);143Time XRRTimes (Display *dpy, int screen, Time *config_timestamp);144145146/*147* intended to take RRScreenChangeNotify, or148* ConfigureNotify (on the root window)149* returns 1 if it is an event type it understands, 0 if not150*/151int XRRUpdateConfiguration(XEvent *event);152153_XFUNCPROTOEND154155#endif /* _XRANDR_H_ */156157158