Back to index

x11proto-randr  1.4.0
randr.h
Go to the documentation of this file.
00001 /*
00002  * Copyright © 2000 Compaq Computer Corporation
00003  * Copyright © 2002 Hewlett Packard Company
00004  * Copyright © 2006 Intel Corporation
00005  * Copyright © 2008 Red Hat, Inc.
00006  *
00007  * Permission to use, copy, modify, distribute, and sell this software and its
00008  * documentation for any purpose is hereby granted without fee, provided that
00009  * the above copyright notice appear in all copies and that both that copyright
00010  * notice and this permission notice appear in supporting documentation, and
00011  * that the name of the copyright holders not be used in advertising or
00012  * publicity pertaining to distribution of the software without specific,
00013  * written prior permission.  The copyright holders make no representations
00014  * about the suitability of this software for any purpose.  It is provided "as
00015  * is" without express or implied warranty.
00016  *
00017  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
00018  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
00019  * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
00020  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
00021  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
00022  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
00023  * OF THIS SOFTWARE.
00024  *
00025  * Author:  Jim Gettys, HP Labs, Hewlett-Packard, Inc.
00026  *         Keith Packard, Intel Corporation
00027  */
00028 
00029 #ifndef _RANDR_H_
00030 #define _RANDR_H_
00031 
00032 typedef unsigned short      Rotation;
00033 typedef unsigned short      SizeID;
00034 typedef unsigned short      SubpixelOrder;
00035 typedef unsigned short      Connection;
00036 typedef unsigned short      XRandrRotation;
00037 typedef unsigned short      XRandrSizeID;
00038 typedef unsigned short      XRandrSubpixelOrder;
00039 typedef unsigned long       XRandrModeFlags;
00040 
00041 #define RANDR_NAME          "RANDR"
00042 #define RANDR_MAJOR         1
00043 #define RANDR_MINOR         4
00044 
00045 #define RRNumberErrors             4
00046 #define RRNumberEvents             2
00047 #define RRNumberRequests    42
00048 
00049 #define X_RRQueryVersion    0
00050 /* we skip 1 to make old clients fail pretty immediately */
00051 #define X_RROldGetScreenInfo       1
00052 #define X_RR1_0SetScreenConfig     2
00053 /* V1.0 apps share the same set screen config request id */
00054 #define X_RRSetScreenConfig 2
00055 #define X_RROldScreenChangeSelectInput    3
00056 /* 3 used to be ScreenChangeSelectInput; deprecated */
00057 #define X_RRSelectInput            4
00058 #define X_RRGetScreenInfo   5
00059 
00060 /* V1.2 additions */
00061 #define X_RRGetScreenSizeRange         6
00062 #define X_RRSetScreenSize       7
00063 #define X_RRGetScreenResources         8
00064 #define X_RRGetOutputInfo       9
00065 #define X_RRListOutputProperties    10
00066 #define X_RRQueryOutputProperty        11
00067 #define X_RRConfigureOutputProperty 12
00068 #define X_RRChangeOutputProperty    13
00069 #define X_RRDeleteOutputProperty    14
00070 #define X_RRGetOutputProperty          15
00071 #define X_RRCreateMode                 16
00072 #define X_RRDestroyMode                17
00073 #define X_RRAddOutputMode       18
00074 #define X_RRDeleteOutputMode           19
00075 #define X_RRGetCrtcInfo                20
00076 #define X_RRSetCrtcConfig       21
00077 #define X_RRGetCrtcGammaSize           22
00078 #define X_RRGetCrtcGamma        23
00079 #define X_RRSetCrtcGamma        24
00080 
00081 /* V1.3 additions */
00082 #define X_RRGetScreenResourcesCurrent     25
00083 #define X_RRSetCrtcTransform           26
00084 #define X_RRGetCrtcTransform           27
00085 #define X_RRGetPanning                 28
00086 #define X_RRSetPanning                 29
00087 #define X_RRSetOutputPrimary           30
00088 #define X_RRGetOutputPrimary           31
00089 
00090 #define RRTransformUnit                (1L << 0)
00091 #define RRTransformScaleUp      (1L << 1)
00092 #define RRTransformScaleDown           (1L << 2)
00093 #define RRTransformProjective          (1L << 3)
00094 
00095 /* v1.4 */
00096 #define X_RRGetProviders          32
00097 #define X_RRGetProviderInfo       33
00098 #define X_RRSetProviderOffloadSink    34
00099 #define X_RRSetProviderOutputSource   35
00100 #define X_RRListProviderProperties    36
00101 #define X_RRQueryProviderProperty     37
00102 #define X_RRConfigureProviderProperty 38
00103 #define X_RRChangeProviderProperty    39
00104 #define X_RRDeleteProviderProperty    40
00105 #define X_RRGetProviderProperty          41
00106 
00107 /* Event selection bits */
00108 #define RRScreenChangeNotifyMask  (1L << 0)
00109 /* V1.2 additions */
00110 #define RRCrtcChangeNotifyMask         (1L << 1)
00111 #define RROutputChangeNotifyMask    (1L << 2)
00112 #define RROutputPropertyNotifyMask  (1L << 3)
00113 /* V1.4 additions */
00114 #define RRProviderChangeNotifyMask   (1L << 4)
00115 #define RRProviderPropertyNotifyMask (1L << 5)
00116 #define RRResourceChangeNotifyMask   (1L << 6)
00117 
00118 /* Event codes */
00119 #define RRScreenChangeNotify       0
00120 /* V1.2 additions */
00121 #define RRNotify                1
00122 /* RRNotify Subcodes */
00123 #define  RRNotify_CrtcChange           0
00124 #define  RRNotify_OutputChange         1
00125 #define  RRNotify_OutputProperty    2
00126 #define  RRNotify_ProviderChange    3
00127 #define  RRNotify_ProviderProperty  4
00128 #define  RRNotify_ResourceChange    5
00129 /* used in the rotation field; rotation and reflection in 0.1 proto. */
00130 #define RR_Rotate_0         1
00131 #define RR_Rotate_90        2
00132 #define RR_Rotate_180              4
00133 #define RR_Rotate_270              8
00134 
00135 /* new in 1.0 protocol, to allow reflection of screen */
00136 
00137 #define RR_Reflect_X        16
00138 #define RR_Reflect_Y        32
00139 
00140 #define RRSetConfigSuccess         0
00141 #define RRSetConfigInvalidConfigTime      1
00142 #define RRSetConfigInvalidTime            2
00143 #define RRSetConfigFailed          3
00144 
00145 /* new in 1.2 protocol */
00146 
00147 #define RR_HSyncPositive    0x00000001
00148 #define RR_HSyncNegative    0x00000002
00149 #define RR_VSyncPositive    0x00000004
00150 #define RR_VSyncNegative    0x00000008
00151 #define RR_Interlace        0x00000010
00152 #define RR_DoubleScan              0x00000020
00153 #define RR_CSync            0x00000040
00154 #define RR_CSyncPositive    0x00000080
00155 #define RR_CSyncNegative    0x00000100
00156 #define RR_HSkewPresent            0x00000200
00157 #define RR_BCast            0x00000400
00158 #define RR_PixelMultiplex   0x00000800
00159 #define RR_DoubleClock             0x00001000
00160 #define RR_ClockDivideBy2   0x00002000
00161 
00162 #define RR_Connected        0
00163 #define RR_Disconnected            1
00164 #define RR_UnknownConnection       2
00165 
00166 #define BadRROutput         0
00167 #define BadRRCrtc           1
00168 #define BadRRMode           2
00169 #define BadRRProvider              3
00170 
00171 /* Conventional RandR output properties */
00172 
00173 #define RR_PROPERTY_BACKLIGHT             "Backlight"
00174 #define RR_PROPERTY_RANDR_EDID            "EDID"
00175 #define RR_PROPERTY_SIGNAL_FORMAT  "SignalFormat"
00176 #define RR_PROPERTY_SIGNAL_PROPERTIES     "SignalProperties"
00177 #define RR_PROPERTY_CONNECTOR_TYPE "ConnectorType"
00178 #define RR_PROPERTY_CONNECTOR_NUMBER      "ConnectorNumber"
00179 #define RR_PROPERTY_COMPATIBILITY_LIST    "CompatibilityList"
00180 #define RR_PROPERTY_CLONE_LIST            "CloneList"
00181 #define RR_PROPERTY_BORDER         "Border"
00182 #define RR_PROPERTY_BORDER_DIMENSIONS     "BorderDimensions"
00183 
00184 /* roles this device can carry out */
00185 #define RR_Capability_None 0
00186 #define RR_Capability_SourceOutput 1
00187 #define RR_Capability_SinkOutput 2
00188 #define RR_Capability_SourceOffload 4
00189 #define RR_Capability_SinkOffload 8
00190 
00191 #endif /* _RANDR_H_ */