1 module x11.extensions.randr;
2 /*
3  * Copyright © 2000 Compaq Computer Corporation
4  * Copyright © 2002 Hewlett Packard Company
5  * Copyright © 2006 Intel Corporation
6  * Copyright © 2008 Red Hat, Inc.
7  *
8  * Permission to use, copy, modify, distribute, and sell this software and its
9  * documentation for any purpose is hereby granted without fee, provided that
10  * the above copyright notice appear in all copies and that both that copyright
11  * notice and this permission notice appear in supporting documentation, and
12  * that the name of the copyright holders not be used in advertising or
13  * publicity pertaining to distribution of the software without specific,
14  * written prior permission.  The copyright holders make no representations
15  * about the suitability of this software for any purpose.  It is provided "as
16  * is" without express or implied warranty.
17  *
18  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
19  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
20  * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
21  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
22  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
23  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
24  * OF THIS SOFTWARE.
25  *
26  * Author:  Jim Gettys, HP Labs, Hewlett-Packard, Inc.
27  *	    Keith Packard, Intel Corporation
28  */
29 
30 alias ushort Rotation;
31 alias ushort SizeID;
32 alias ushort SubpixelOrder;
33 alias ushort Connection;
34 alias ushort XRandrRotation;
35 alias ushort XRandrSizeID;
36 alias ushort XRandrSubpixelOrder;
37 alias ulong XRandrModeFlags;
38 
39 enum RANDR_NAME			= "RANDR";
40 enum RANDR_MAJOR		= 1;
41 enum RANDR_MINOR		= 4;
42 
43 enum RRNumberErrors		= 4;
44 enum RRNumberEvents		= 2;
45 enum RRNumberRequests	= 42;
46 
47 enum X_RRQueryVersion	= 0;
48 
49 enum X_RROldGetScreenInfo	= 1;
50 enum X_RR1_0SetScreenConfig	= 2;
51 enum X_RRSetScreenConfig	= 2;
52 enum X_RROldScreenChangeSelectInput	= 3;
53 enum X_RRSelectInput		= 4;
54 enum X_RRGetScreenInfo		= 5;
55 enum X_RRGetScreenSizeRange	= 6;
56 enum X_RRSetScreenSize		= 7;
57 enum X_RRGetScreenResources	= 8;
58 enum X_RRGetOutputInfo		= 9;
59 enum X_RRListOutputProperties = 10;
60 enum X_RRQueryOutputProperty = 11;
61 enum X_RRConfigureOutputProperty = 12;
62 enum X_RRChangeOutputProperty = 13;
63 enum X_RRDeleteOutputProperty = 14;
64 enum X_RRGetOutputProperty 	= 15;
65 enum X_RRCreateMode			= 16;
66 enum X_RRDestroyMode		= 17;
67 enum X_RRAddOutputMode		= 18;
68 enum X_RRDeleteOutputMode	= 19;
69 enum X_RRGetCrtcInfo		= 20;
70 enum X_RRSetCrtcConfig	    = 21;
71 enum X_RRGetCrtcGammaSize	= 22;
72 enum X_RRGetCrtcGamma		= 23;
73 enum X_RRSetCrtcGamma		= 24;
74 enum X_RRGetScreenResourcesCurrent = 25;
75 enum X_RRSetCrtcTransform	= 26;
76 enum X_RRGetCrtcTransform	= 27;
77 enum X_RRGetPanning			= 28;
78 enum X_RRSetPanning			= 29;
79 enum X_RRSetOutputPrimary	= 30;
80 enum X_RRGetOutputPrimary	= 31;
81 enum X_RRGetProviders		= 32;
82 enum X_RRGetProviderInfo	= 33;
83 enum X_RRSetProviderOffloadSink = 34;
84 enum X_RRSetProviderOutputSource = 35;
85 enum X_RRListProviderProperties = 36;
86 enum X_RRQueryProviderProperty = 37;
87 enum X_RRConfigureProviderProperty = 38;
88 enum X_RRChangeProviderProperty = 39;
89 enum X_RRDeleteProviderProperty = 40;
90 enum X_RRGetProviderProperty = 41;
91 
92 enum RRTransformUnit		= (1L << 0);
93 enum RRTransformScaleUp	    = (1L << 1);
94 enum RRTransformScaleDown	= (1L << 2);
95 enum RRTransformProjective	= (1L << 3);
96 
97 enum RRScreenChangeNotifyMask = (1L << 0);
98 enum RRCrtcChangeNotifyMask	= (1L << 1);
99 enum RROutputChangeNotifyMask = (1L << 2);
100 enum RROutputPropertyNotifyMask = (1L << 3);
101 enum RRProviderChangeNotifyMask = (1L << 4);
102 enum RRProviderPropertyNotifyMask = (1L << 5);
103 enum RRResourceChangeNotifyMask = (1L << 6);
104 
105 enum RRScreenChangeNotify	= 0;
106 enum RRNotify				= 1;
107 
108 enum  RRNotify_CrtcChange	= 0;
109 enum  RRNotify_OutputChange	= 1;
110 enum  RRNotify_OutputProperty = 2;
111 enum  RRNotify_ProviderChange = 3;
112 enum  RRNotify_ProviderProperty = 4;
113 enum  RRNotify_ResourceChange = 5;
114 
115 enum RR_Rotate_0			= 1;
116 enum RR_Rotate_90			= 2;
117 enum RR_Rotate_180			= 4;
118 enum RR_Rotate_270			= 8;
119 
120 enum RR_Reflect_X			= 16;
121 enum RR_Reflect_Y			= 32;
122 
123 enum RRSetConfigSuccess		= 0;
124 enum RRSetConfigInvalidConfigTime = 1;
125 enum RRSetConfigInvalidTime	= 2;
126 enum RRSetConfigFailed		= 3;
127 
128 enum RR_HSyncPositive		= 0x00000001;
129 enum RR_HSyncNegative		= 0x00000002;
130 enum RR_VSyncPositive		= 0x00000004;
131 enum RR_VSyncNegative		= 0x00000008;
132 enum RR_Interlace			= 0x00000010;
133 enum RR_DoubleScan			= 0x00000020;
134 enum RR_CSync				= 0x00000040;
135 enum RR_CSyncPositive		= 0x00000080;
136 enum RR_CSyncNegative		= 0x00000100;
137 enum RR_HSkewPresent		= 0x00000200;
138 enum RR_BCast				= 0x00000400;
139 enum RR_PixelMultiplex		= 0x00000800;
140 enum RR_DoubleClock			= 0x00001000;
141 enum RR_ClockDivideBy2		= 0x00002000;
142 
143 enum RR_Connected			= 0;
144 enum RR_Disconnected		= 1;
145 enum RR_UnknownConnection	= 2;
146 
147 enum BadRROutput			= 0;
148 enum BadRRCrtc				= 1;
149 enum BadRRMode				= 2;
150 enum BadRRProvider			= 3;
151 
152 enum RR_PROPERTY_BACKLIGHT	= "Backlight";
153 enum RR_PROPERTY_RANDR_EDID	= "EDID";
154 enum RR_PROPERTY_SIGNAL_FORMAT = "SignalFormat";
155 enum RR_PROPERTY_SIGNAL_PROPERTIES = "SignalProperties";
156 enum RR_PROPERTY_CONNECTOR_TYPE	= "ConnectorType";
157 enum RR_PROPERTY_CONNECTOR_NUMBER = "ConnectorNumber";
158 enum RR_PROPERTY_COMPATIBILITY_LIST	= "CompatibilityList";
159 enum RR_PROPERTY_CLONE_LIST	= "CloneList";
160 enum RR_PROPERTY_BORDER		= "Border";
161 enum RR_PROPERTY_BORDER_DIMENSIONS = "BorderDimensions";
162 
163 enum RR_Capability_None = 0;
164 enum RR_Capability_SourceOutput = 1;
165 enum RR_Capability_SinkOutput = 2;
166 enum RR_Capability_SourceOffload = 4;
167 enum RR_Capability_SinkOffload = 8;