jdk/src/java.desktop/unix/native/libawt_xawt/awt/Xrandr.h
author ssadetsky
Mon, 17 Oct 2016 10:14:38 +0300
changeset 41793 7b9c71553d63
parent 39556 50963eeaefca
permissions -rw-r--r--
8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen Reviewed-by: serb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * reserved comment block
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT REMOVE OR ALTER!
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 *
39556
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
     8
 * Copyright © 2000 Compaq Computer Corporation, Inc.
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
     9
 * Copyright © 2002 Hewlett-Packard Company, Inc.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * Permission to use, copy, modify, distribute, and sell this software and its
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * documentation for any purpose is hereby granted without fee, provided that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * the above copyright notice appear in all copies and that both that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * copyright notice and this permission notice appear in supporting
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * documentation, and that the name of Compaq not be used in advertising or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * publicity pertaining to distribution of the software without specific,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * written prior permission.  HP makes no representations about the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * suitability of this software for any purpose.  It is provided "as is"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * without express or implied warranty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * Author:  Jim Gettys, HP Labs, HP.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#ifndef _XRANDR_H_
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#define _XRANDR_H_
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
/*#include <X11/extensions/randr.h>*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#include "randr.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#include <X11/Xfuncproto.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
_XFUNCPROTOBEGIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    int width, height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    int mwidth, mheight;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
} XRRScreenSize;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 *  Events.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    int type;                   /* event base */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    unsigned long serial;       /* # of last request processed by server */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    Bool send_event;            /* true if this came from a SendEvent request */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    Display *display;           /* Display the event was read from */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    Window window;              /* window which selected for this event */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    Window root;                /* Root window for changed screen */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    Time timestamp;             /* when the screen change occurred */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    Time config_timestamp;      /* when the last configuration change */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    SizeID size_index;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    SubpixelOrder subpixel_order;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    Rotation rotation;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    int width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    int height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    int mwidth;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    int mheight;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
} XRRScreenChangeNotifyEvent;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
39556
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    69
typedef XID RROutput;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    70
typedef XID RRCrtc;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    71
typedef XID RRMode;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    72
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    73
typedef unsigned long XRRModeFlags;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    74
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    75
typedef struct {
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    76
    RRMode              id;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    77
    unsigned int        width;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    78
    unsigned int        height;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    79
    unsigned long       dotClock;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    80
    unsigned int        hSyncStart;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    81
    unsigned int        hSyncEnd;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    82
    unsigned int        hTotal;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    83
    unsigned int        hSkew;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    84
    unsigned int        vSyncStart;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    85
    unsigned int        vSyncEnd;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    86
    unsigned int        vTotal;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    87
    char                *name;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    88
    unsigned int        nameLength;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    89
    XRRModeFlags        modeFlags;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    90
} XRRModeInfo;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    91
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    92
typedef struct {
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    93
    Time        timestamp;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    94
    Time        configTimestamp;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    95
    int         ncrtc;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    96
    RRCrtc      *crtcs;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    97
    int         noutput;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    98
    RROutput    *outputs;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
    99
    int         nmode;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   100
    XRRModeInfo *modes;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   101
} XRRScreenResources;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   102
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   103
typedef struct {
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   104
    Time            timestamp;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   105
    RRCrtc          crtc;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   106
    char            *name;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   107
    int             nameLen;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   108
    unsigned long   mm_width;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   109
    unsigned long   mm_height;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   110
    Connection      connection;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   111
    SubpixelOrder   subpixel_order;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   112
    int             ncrtc;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   113
    RRCrtc          *crtcs;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   114
    int             nclone;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   115
    RROutput        *clones;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   116
    int             nmode;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   117
    int             npreferred;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   118
    RRMode          *modes;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   119
} XRROutputInfo;
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   120
41793
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   121
typedef struct {
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   122
    Time            timestamp;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   123
    int             x, y;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   124
    unsigned int    width, height;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   125
    RRMode          mode;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   126
    Rotation        rotation;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   127
    int             noutput;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   128
    RROutput        *outputs;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   129
    Rotation        rotations;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   130
    int             npossible;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   131
    RROutput        *possible;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   132
} XRRCrtcInfo;
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   133
39556
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   134
XRRScreenResources *XRRGetScreenResources (Display *dpy, Window window);
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   135
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   136
void XRRFreeScreenResources (XRRScreenResources *resources);
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   137
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   138
XRROutputInfo * XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources,
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   139
                                                               RROutput output);
50963eeaefca 8022810: Cannot list all the available display modes on Ubuntu linux in case of two screen devices
ssadetsky
parents: 26751
diff changeset
   140
void XRRFreeOutputInfo (XRROutputInfo *outputInfo);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
41793
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   142
XRRCrtcInfo *XRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources,
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   143
                                                                   RRCrtc crtc);
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   144
void XRRFreeCrtcInfo (XRRCrtcInfo *crtcInfo);
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   145
7b9c71553d63 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen
ssadetsky
parents: 39556
diff changeset
   146
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
/* internal representation is private to the library */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
typedef struct _XRRScreenConfiguration XRRScreenConfiguration;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
Bool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
Status XRRQueryVersion (Display *dpy,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
                            int     *major_versionp,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
                            int     *minor_versionp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
                                          Drawable draw);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
 * Note that screen configuration changes are only permitted if the client can
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
 * prove it has up to date configuration information.  We are trying to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
 * insist that it become possible for screens to change dynamically, so
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
 * we want to ensure the client knows what it is talking about when requesting
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
 * changes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
Status XRRSetScreenConfig (Display *dpy,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
                           XRRScreenConfiguration *config,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
                           Drawable draw,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
                           int size_index,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
                           Rotation rotation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
                           Time timestamp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
/* added in v1.1, sorry for the lame name */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
Status XRRSetScreenConfigAndRate (Display *dpy,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
                                  XRRScreenConfiguration *config,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                                  Drawable draw,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
                                  int size_index,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
                                  Rotation rotation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
                                  short rate,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
                                  Time timestamp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
Rotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
Time XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
XRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
                              Rotation *rotation);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
short XRRConfigCurrentRate (XRRScreenConfiguration *config);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
int XRRRootToScreen(Display *dpy, Window root);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
 * returns the screen configuration for the specified screen; does a lazy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
 * evalution to delay getting the information, and caches the result.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
 * These routines should be used in preference to XRRGetScreenInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
 * to avoid unneeded round trips to the X server.  These are new
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
 * in protocol version 0.1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
XRRScreenConfiguration *XRRScreenConfig(Display *dpy, int screen);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
XRRScreenConfiguration *XRRConfig(Screen *screen);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
void XRRSelectInput(Display *dpy, Window window, int mask);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
 * the following are always safe to call, even if RandR is not implemented
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
 * on a screen
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
Rotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
short *XRRRates (Display *dpy, int screen, int sizeID, int *nrates);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
Time XRRTimes (Display *dpy, int screen, Time *config_timestamp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
 * intended to take RRScreenChangeNotify,  or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
 * ConfigureNotify (on the root window)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
 * returns 1 if it is an event type it understands, 0 if not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
int XRRUpdateConfiguration(XEvent *event);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
_XFUNCPROTOEND
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
#endif /* _XRANDR_H_ */