1
# Xlib.ext.randr -- RandR extension module
3
# Copyright (C) 2006 Mike Meyer <mwm@mired.org>
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
"""RandR - provide access to the RandR extension information.
23
This implementation is based off version 1.3 of the XRandR protocol, and may
24
not be compatible with other versions.
26
Version 1.2 of the protocol is documented at:
27
http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt
33
from Xlib.protocol import rq, structs
39
RRScreenChangeNotify = 0
45
RRNotify_CrtcChange = 0
46
RRNotify_OutputChange = 1
47
RRNotify_OutputProperty = 2
50
# Event selection bits #
51
RRScreenChangeNotifyMask = (1 << 0)
54
RRCrtcChangeNotifyMask = (1 << 1)
55
RROutputChangeNotifyMask = (1 << 2)
56
RROutputPropertyNotifyMask = (1 << 3)
61
SetConfigInvalidConfigTime = 1
62
SetConfigInvalidTime = 2
65
# used in the rotation field; rotation and reflection in 0.1 proto.
71
# new in 1.0 protocol, to allow reflection of screen
76
HSyncPositive = 0x00000001
77
HSyncNegative = 0x00000002
78
VSyncPositive = 0x00000004
79
VSyncNegative = 0x00000008
80
Interlace = 0x00000010
81
DoubleScan = 0x00000020
83
CSyncPositive = 0x00000080
84
CSyncNegative = 0x00000100
85
HSkewPresent = 0x00000200
87
PixelMultiplex = 0x00000800
88
DoubleClock = 0x00001000
89
ClockDivideBy2 = 0x00002000
96
# Conventional RandR output properties
97
PROPERTY_RANDR_EDID = "EDID"
98
PROPERTY_SIGNAL_FORMAT = "SignalFormat"
99
PROPERTY_SIGNAL_PROPERTIES = "SignalProperties"
100
PROPERTY_CONNECTOR_TYPE = "ConnectorType"
101
PROPERTY_CONNECTOR_NUMBER = "ConnectorNumber"
102
PROPERTY_COMPATIBILITY_LIST = "CompatibilityList"
103
PROPERTY_CLONE_LIST = "CloneList"
105
# subpixel order - TODO: These constants are part of the RENDER extension and
106
# should be moved there if/when that extension is added to python-xlib.
108
SubPixelHorizontalRGB = 1
109
SubPixelHorizontalBGR = 2
110
SubPixelVerticalRGB = 3
111
SubPixelVerticalBGR = 4
123
RandR_ScreenSizes = rq.Struct(
124
rq.Card16('width_in_pixels'),
125
rq.Card16('height_in_pixels'),
126
rq.Card16('width_in_millimeters'),
127
rq.Card16('height_in_millimeters'),
131
RandR_ModeInfo = rq.Struct(
135
rq.Card32('dot_clock'),
136
rq.Card16('h_sync_start'),
137
rq.Card16('h_sync_end'),
138
rq.Card16('h_total'),
140
rq.Card16('v_sync_start'),
141
rq.Card16('v_sync_end'),
142
rq.Card16('v_total'),
143
rq.Card16('name_length'),
147
RandR_Rates = rq.Struct(
148
rq.LengthOf('rates', 2),
149
rq.List('rates', rq.Card16Obj)
152
# TODO: This struct is part of the RENDER extension and should be moved there
153
# if/when that extension is added to python-xlib.
154
Render_Transform = rq.Struct(
155
rq.Card32('matrix11'), #FIXME: All of these are listed as FIXED in the protocol header.
156
rq.Card32('matrix12'),
157
rq.Card32('matrix13'),
158
rq.Card32('matrix21'),
159
rq.Card32('matrix22'),
160
rq.Card32('matrix23'),
161
rq.Card32('matrix31'),
162
rq.Card32('matrix32'),
163
rq.Card32('matrix33'),
169
class QueryVersion(rq.ReplyRequest):
170
_request = rq.Struct(
174
rq.Card32('major_version'),
175
rq.Card32('minor_version'),
180
rq.Card16('sequence_number'),
182
rq.Card32('major_version'),
183
rq.Card32('minor_version'),
187
def query_version(self):
188
"""Get the current version of the RandR extension.
192
display=self.display,
193
opcode=self.display.get_extension_major(extname),
199
class _1_0SetScreenConfig(rq.ReplyRequest):
200
_request = rq.Struct(
204
rq.Drawable('drawable'),
205
rq.Card32('timestamp'),
206
rq.Card32('config_timestamp'),
207
rq.Card16('size_id'),
208
rq.Card16('rotation'),
213
rq.Card16('sequence_number'),
215
rq.Card32('new_timestamp'),
216
rq.Card32('new_config_timestamp'),
218
rq.Card16('subpixel_order'),
222
def _1_0set_screen_config(self, size_id, rotation, config_timestamp, timestamp=X.CurrentTime):
223
"""Sets the screen to the specified size and rotation.
226
return _1_0SetScreenConfig(
227
display=self.display,
228
opcode=self.display.get_extension_major(extname),
231
config_timestamp=config_timestamp,
237
class SetScreenConfig(rq.ReplyRequest):
238
_request = rq.Struct(
242
rq.Drawable('drawable'),
243
rq.Card32('timestamp'),
244
rq.Card32('config_timestamp'),
245
rq.Card16('size_id'),
246
rq.Card16('rotation'),
247
rq.Card16('rate'), # added in version 1.1
253
rq.Card16('sequence_number'),
255
rq.Card32('new_timestamp'),
256
rq.Card32('new_config_timestamp'),
258
rq.Card16('subpixel_order'),
262
def set_screen_config(self, size_id, rotation, config_timestamp, rate=0, timestamp=X.CurrentTime):
263
"""Sets the screen to the specified size, rate, rotation and reflection.
265
rate can be 0 to have the server select an appropriate rate.
268
return SetScreenConfig(
269
display=self.display,
270
opcode=self.display.get_extension_major(extname),
273
config_timestamp=config_timestamp,
280
class SelectInput(rq.Request):
281
_request = rq.Struct(
290
def select_input(self, mask):
292
display=self.display,
293
opcode=self.display.get_extension_major(extname),
299
class GetScreenInfo(rq.ReplyRequest):
300
_request = rq.Struct(
308
rq.Card8('set_of_rotations'),
309
rq.Card16('sequence_number'),
312
rq.Card32('timestamp'),
313
rq.Card32('config_timestamp'),
314
rq.LengthOf('sizes', 2),
315
rq.Card16('size_id'),
316
rq.Card16('rotation'),
317
rq.Card16('rate'), # added in version 1.1
318
rq.Card16('n_rate_ents'), # XCB's protocol description disagrees with the X headers on this; ignoring.
320
rq.List('sizes', RandR_ScreenSizes),
321
#rq.List('rates', RandR_Rates) #FIXME: Why does uncommenting this cause an error?
324
def get_screen_info(self):
325
"""Retrieve information about the current and available configurations for
326
the screen associated with this window.
329
return GetScreenInfo(
330
display=self.display,
331
opcode=self.display.get_extension_major(extname),
338
class GetScreenSizeRange(rq.ReplyRequest):
339
_request = rq.Struct(
348
rq.Card16('sequence_number'),
350
rq.Card16('min_width'),
351
rq.Card16('min_height'),
352
rq.Card16('max_width'),
353
rq.Card16('max_height'),
357
def get_screen_size_range(self):
358
"""Retrieve the range of possible screen sizes. The screen may be set to
359
any size within this range.
362
return GetScreenSizeRange(
363
display=self.display,
364
opcode=self.display.get_extension_major(extname),
369
class SetScreenSize(rq.Request):
370
_request = rq.Struct(
377
rq.Card32('width_in_millimeters'),
378
rq.Card32('height_in_millimeters'),
381
def set_screen_size(self, width, height, width_in_millimeters=None, height_in_millimeters=None):
382
return SetScreenSize(
383
display=self.display,
384
opcode=self.display.get_extension_major(extname),
388
width_in_millimeters=width_in_millimeters,
389
height_in_millimeters=height_in_millimeters,
393
class GetScreenResources(rq.ReplyRequest):
394
_request = rq.Struct(
403
rq.Card16('sequence_number'),
405
rq.Card32('timestamp'),
406
rq.Card32('config_timestamp'),
407
rq.LengthOf('crtcs', 2),
408
rq.LengthOf('outputs', 2),
409
rq.LengthOf('modes', 2),
410
rq.LengthOf('mode_names', 2),
412
rq.List('crtcs', rq.Card32Obj),
413
rq.List('outputs', rq.Card32Obj),
414
rq.List('modes', RandR_ModeInfo),
415
rq.String8('mode_names'),
418
def get_screen_resources(self):
419
return GetScreenResources(
420
display=self.display,
421
opcode=self.display.get_extension_major(extname),
426
class GetOutputInfo(rq.ReplyRequest):
427
_request = rq.Struct(
432
rq.Card32('config_timestamp'),
437
rq.Card16('sequence_number'),
439
rq.Card32('timestamp'),
441
rq.Card32('mm_width'),
442
rq.Card32('mm_height'),
443
rq.Card8('connection'),
444
rq.Card8('subpixel_order'),
445
rq.LengthOf('crtcs', 2),
446
rq.LengthOf('modes', 2),
447
rq.LengthOf('preferred', 2),
448
rq.LengthOf('clones', 2),
449
rq.LengthOf('name', 2),
450
rq.List('crtcs', rq.Card32Obj),
451
rq.List('modes', rq.Card32Obj),
452
rq.List('preferred', rq.Card32Obj),
453
rq.List('clones', rq.Card32Obj),
457
def get_output_info(self, output, config_timestamp):
458
return GetOutputInfo(
459
display=self.display,
460
opcode=self.display.get_extension_major(extname),
462
config_timestamp=config_timestamp,
466
class ListOutputProperties(rq.ReplyRequest):
467
_request = rq.Struct(
476
rq.Card16('sequence_number'),
478
rq.LengthOf('atoms', 2),
480
rq.List('atoms', rq.Card32Obj),
483
def list_output_properties(self, output):
484
return ListOutputProperties (
485
display=self.display,
486
opcode=self.display.get_extension_major(extname),
491
class QueryOutputProperty(rq.ReplyRequest):
492
_request = rq.Struct(
497
rq.Card32('property'),
502
rq.Card16('sequence_number'),
506
rq.Bool('immutable'),
508
rq.List('valid_values', rq.Card32Obj),
511
def query_output_property(self, output, property):
512
return QueryOutputProperty (
513
display=self.display,
514
opcode=self.display.get_extension_major(extname),
520
class ConfigureOutputProperty (rq.Request):
521
_request = rq.Struct(
526
rq.Card32('property'),
530
rq.List('valid_values', rq.Card32Obj),
533
def configure_output_property (self, output, property):
534
return ConfigureOutputProperty (
535
display=self.display,
536
opcode=self.display.get_extension_major(extname),
542
class ChangeOutputProperty(rq.Request):
543
_request = rq.Struct(
548
rq.Card32('property'),
550
rq.Format('value', 1),
553
rq.LengthOf('value', 4),
554
rq.List('value', rq.Card8Obj),
557
def change_output_property(self, output, property, type, format, mode, nUnits):
558
return ChangeOutputProperty(
559
display=self.display,
560
opcode=self.display.get_extension_major(extname),
570
class DeleteOutputProperty(rq.Request):
571
_request = rq.Struct(
576
rq.Card32('property'),
579
def delete_output_property(self, output, property):
580
return DeleteOutputProperty(
581
display=self.display,
582
opcode=self.display.get_extension_major(extname),
588
class GetOutputProperty(rq.ReplyRequest):
589
_request = rq.Struct(
594
rq.Card32('property'),
596
rq.Card32('long_offset'),
597
rq.Card32('long_length'),
604
rq.Format('value', 1),
605
rq.Card16('sequence_number'),
607
rq.Card32('property_type'),
608
rq.Card32('bytes_after'),
609
rq.LengthOf('value', 4),
611
rq.List('value', rq.Card8Obj),
614
def get_output_property(self, output, property, type, longOffset, longLength):
615
return GetOutputProperty(
616
display=self.display,
617
opcode=self.display.get_extension_major(extname),
621
longOffset=longOffset,
622
longLength=longLength,
626
class CreateMode(rq.ReplyRequest):
627
_request = rq.Struct(
632
rq.Object('mode', RandR_ModeInfo),
638
rq.Card16('sequence_number'),
644
def create_mode(self):
646
display=self.display,
647
opcode=self.display.get_extension_major(extname),
652
class DestroyMode(rq.Request):
653
_request = rq.Struct(
660
def destroy_mode(self, mode):
662
display=self.display,
663
opcode=self.display.get_extension_major(extname),
668
class AddOutputMode(rq.Request):
669
_request = rq.Struct(
677
def add_output_mode(self):
678
return AddOutputMode(
679
display=self.display,
680
opcode=self.display.get_extension_major(extname),
686
class DeleteOutputMode(rq.Request):
687
_request = rq.Struct(
695
def delete_output_mode(self):
696
return DeleteOutputMode(
697
display=self.display,
698
opcode=self.display.get_extension_major(extname),
704
class GetCrtcInfo(rq.ReplyRequest):
705
_request = rq.Struct(
710
rq.Card32('config_timestamp'),
715
rq.Card16('sequence_number'),
717
rq.Card32('timestamp'),
721
rq.Card16('rotation'),
722
rq.Card16('possible_rotations'),
723
rq.LengthOf('outputs', 2),
724
rq.LengthOf('possible_outputs', 2),
725
rq.List('outputs', rq.Card32Obj),
726
rq.List('possible_outputs', rq.Card32Obj),
729
def get_crtc_info(self, crtc, config_timestamp):
731
display=self.display,
732
opcode=self.display.get_extension_major(extname),
734
config_timestamp=config_timestamp,
738
class SetCrtcConfig(rq.ReplyRequest):
739
_request = rq.Struct(
744
rq.Card32('timestamp'),
745
rq.Card32('config_timestamp'),
749
rq.Card16('rotation'),
751
rq.List('outputs', rq.Card32Obj),
756
rq.Card16('sequence_number'),
758
rq.Card32('new_timestamp'),
762
def set_crtc_config(self, crtc, config_timestamp, mode, rotation, timestamp=X.CurrentTime):
763
return SetCrtcConfig (
764
display=self.display,
765
opcode=self.display.get_extension_major(extname),
767
config_timestamp=config_timestamp,
774
class GetCrtcGammaSize(rq.ReplyRequest):
775
_request = rq.Struct(
784
rq.Card16('sequence_number'),
790
def get_crtc_gamma_size(self, crtc):
791
return GetCrtcGammaSize (
792
display=self.display,
793
opcode=self.display.get_extension_major(extname),
798
class GetCrtcGamma(rq.ReplyRequest):
799
_request = rq.Struct(
808
rq.Card16('sequence_number'),
812
rq.List('red', rq.Card16Obj),
813
rq.List('green', rq.Card16Obj),
814
rq.List('blue', rq.Card16Obj),
817
def get_crtc_gamma(self, crtc):
818
return GetCrtcGamma (
819
display=self.display,
820
opcode=self.display.get_extension_major(extname),
825
class SetCrtcGamma(rq.Request):
826
_request = rq.Struct(
833
rq.List('red', rq.Card16Obj),
834
rq.List('green', rq.Card16Obj),
835
rq.List('blue', rq.Card16Obj),
838
def set_crtc_gamma(self, crtc, size):
840
display=self.display,
841
opcode=self.display.get_extension_major(extname),
849
class GetScreenResourcesCurrent(rq.ReplyRequest):
850
_request = rq.Struct(
859
rq.Card16('sequence_number'),
861
rq.Card32('timestamp'),
862
rq.Card32('config_timestamp'),
863
rq.LengthOf('crtcs', 2),
864
rq.LengthOf('outputs', 2),
865
rq.LengthOf('modes', 2),
866
rq.LengthOf('names', 2),
868
rq.List('crtcs', rq.Card32Obj),
869
rq.List('outputs', rq.Card32Obj),
870
rq.List('modes', RandR_ModeInfo),
874
def get_screen_resources_current(self):
875
return GetScreenResourcesCurrent(
876
display=self.display,
877
opcode=self.display.get_extension_major(extname),
882
class SetCrtcTransform(rq.Request):
883
_request = rq.Struct(
888
rq.Object('transform', Render_Transform),
889
rq.LengthOf('filter_name', 2),
891
rq.String8('filter_name'),
892
rq.List('filter_params', rq.Card32Obj), #FIXME: The protocol says FIXED? http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n2161
895
def set_crtc_transform(self, crtc, n_bytes_filter):
896
return SetCrtcTransform(
897
display=self.display,
898
opcode=self.display.get_extension_major(extname),
900
n_bytes_filter=n_bytes_filter,
904
class GetCrtcTransform(rq.ReplyRequest):
905
_request = rq.Struct(
914
rq.Card16('sequence_number'),
916
rq.Object('pending_transform', Render_Transform),
917
rq.Bool('has_transforms'),
919
rq.Object('current_transform', Render_Transform),
921
rq.LengthOf('pending_filter_name', 2),
922
rq.LengthOf('pending_filter_params', 2),
923
rq.LengthOf('current_filter_name', 2),
924
rq.LengthOf('current_filter_params', 2),
925
rq.String8('pending_filter_name'),
926
rq.List('pending_filter_params', rq.Card32Obj), #FIXME: The protocol says FIXED? http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n2161
927
rq.String8('current_filter_name'),
928
rq.List('current_filter_params', rq.Card32Obj), #FIXME: The protocol says FIXED? http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n2161
931
def get_crtc_transform(self, crtc):
932
return GetCrtcTransform(
933
display=self.display,
934
opcode=self.display.get_extension_major(extname),
939
class GetPanning(rq.ReplyRequest):
940
_request = rq.Struct(
949
rq.Card16('sequence_number'),
951
rq.Card32('timestamp'),
956
rq.Card16('track_left'),
957
rq.Card16('track_top'),
958
rq.Card16('track_width'),
959
rq.Card16('track_height'),
960
rq.Int16('border_left'),
961
rq.Int16('border_top'),
962
rq.Int16('border_right'),
963
rq.Int16('border_bottom'),
966
def get_panning(self, crtc):
968
display=self.display,
969
opcode=self.display.get_extension_major(extname),
974
class SetPanning(rq.ReplyRequest):
975
_request = rq.Struct(
980
rq.Card32('timestamp'),
985
rq.Card16('track_left'),
986
rq.Card16('track_top'),
987
rq.Card16('track_width'),
988
rq.Card16('track_height'),
989
rq.Int16('border_left'),
990
rq.Int16('border_top'),
991
rq.Int16('border_right'),
992
rq.Int16('border_bottom'),
997
rq.Card16('sequence_number'),
999
rq.Card32('new_timestamp'),
1003
def set_panning(self, crtc, left, top, width, height, track_left, track_top, track_width, track_height, border_left, border_top, border_width, border_height, timestamp=X.CurrentTime):
1005
display=self.display,
1006
opcode=self.display.get_extension_major(extname),
1012
track_left=track_left,
1013
track_top=track_top,
1014
track_width=track_width,
1015
track_height=track_height,
1016
border_left=border_left,
1017
border_top=border_top,
1018
border_width=border_width,
1019
border_height=border_height,
1020
timestamp=timestamp,
1024
class SetOutputPrimary(rq.Request):
1025
_request = rq.Struct(
1029
rq.Window('window'),
1030
rq.Card32('output'),
1033
def set_output_primary(self, output):
1034
return SetOutputPrimary(
1035
display=self.display,
1036
opcode=self.display.get_extension_major(extname),
1042
class GetOutputPrimary(rq.ReplyRequest):
1043
_request = rq.Struct(
1047
rq.Window('window'),
1052
rq.Card16('sequence_number'),
1054
rq.Card32('output'),
1058
def get_output_primary(self):
1059
return GetOutputPrimary(
1060
display=self.display,
1061
opcode=self.display.get_extension_major(extname),
1068
class ScreenChangeNotify(rq.Event):
1070
_fields = rq.Struct(
1072
rq.Card8('rotation'),
1073
rq.Card16('sequence_number'),
1074
rq.Card32('timestamp'),
1075
rq.Card32('config_timestamp'),
1077
rq.Window('window'),
1078
rq.Card16('size_id'),
1079
rq.Card16('subpixel_order'),
1080
rq.Card16('width_in_pixels'),
1081
rq.Card16('height_in_pixels'),
1082
rq.Card16('width_in_millimeters'),
1083
rq.Card16('height_in_millimeters'),
1087
class CrtcChangeNotify(rq.Event):
1089
_fields = rq.Struct(
1091
rq.Card8('sub_code'),
1092
rq.Card16('sequence_number'),
1093
rq.Card32('timestamp'),
1094
rq.Window('window'),
1097
rq.Card16('rotation'),
1102
rq.Card16('height'),
1106
class OutputChangeNotify(rq.Event):
1108
_fields = rq.Struct(
1110
rq.Card8('sub_code'),
1111
rq.Card16('sequence_number'),
1112
rq.Card32('timestamp'),
1113
rq.Card32('config_timestamp'),
1114
rq.Window('window'),
1115
rq.Card32('output'),
1118
rq.Card16('rotation'),
1119
rq.Card8('connection'),
1120
rq.Card8('subpixel_order'),
1124
class OutputPropertyNotify(rq.Event):
1126
_fields = rq.Struct(
1128
rq.Card8('sub_code'),
1129
rq.Card16('sequence_number'),
1130
rq.Window('window'),
1131
rq.Card32('output'),
1133
rq.Card32('timestamp'),
1141
def init(disp, info):
1142
print(info.__class__)
1144
disp.extension_add_method('display', 'xrandr_query_version', query_version)
1145
disp.extension_add_method('window', 'xrandr_select_input', select_input)
1146
disp.extension_add_method('window', 'xrandr_get_screen_info', get_screen_info)
1147
disp.extension_add_method('drawable', 'xrandr_1_0set_screen_config', _1_0set_screen_config)
1148
disp.extension_add_method('drawable', 'xrandr_set_screen_config', set_screen_config)
1149
disp.extension_add_method('window', 'xrandr_get_screen_size_range', get_screen_size_range)
1150
disp.extension_add_method('window', 'xrandr_set_screen_size', set_screen_size)
1151
disp.extension_add_method('window', 'xrandr_get_screen_resources', get_screen_resources)
1152
disp.extension_add_method('display', 'xrandr_get_output_info', get_output_info)
1153
disp.extension_add_method('display', 'xrandr_list_output_properties', list_output_properties)
1154
disp.extension_add_method('display', 'xrandr_query_output_property', query_output_property)
1155
disp.extension_add_method('display', 'xrandr_configure_output_property ', configure_output_property )
1156
disp.extension_add_method('display', 'xrandr_change_output_property', change_output_property)
1157
disp.extension_add_method('display', 'xrandr_delete_output_property', delete_output_property)
1158
disp.extension_add_method('display', 'xrandr_get_output_property', get_output_property)
1159
disp.extension_add_method('window', 'xrandr_create_mode', create_mode)
1160
disp.extension_add_method('display', 'xrandr_destroy_mode', destroy_mode)
1161
disp.extension_add_method('display', 'xrandr_add_output_mode', add_output_mode)
1162
disp.extension_add_method('display', 'xrandr_delete_output_mode', delete_output_mode)
1163
disp.extension_add_method('display', 'xrandr_get_crtc_info', get_crtc_info)
1164
disp.extension_add_method('display', 'xrandr_set_crtc_config', set_crtc_config)
1165
disp.extension_add_method('display', 'xrandr_get_crtc_gamma_size', get_crtc_gamma_size)
1166
disp.extension_add_method('display', 'xrandr_get_crtc_gamma', get_crtc_gamma)
1167
disp.extension_add_method('display', 'xrandr_set_crtc_gamma', set_crtc_gamma)
1168
disp.extension_add_method('window', 'xrandr_get_screen_resources_current', get_screen_resources_current)
1169
disp.extension_add_method('display', 'xrandr_set_crtc_transform', set_crtc_transform)
1170
disp.extension_add_method('display', 'xrandr_get_crtc_transform', get_crtc_transform)
1171
disp.extension_add_method('window', 'xrandr_set_output_primary', set_output_primary)
1172
disp.extension_add_method('window', 'xrandr_get_output_primary', get_output_primary)
1173
disp.extension_add_method('display', 'xrandr_get_panning', get_panning)
1174
disp.extension_add_method('display', 'xrandr_set_panning', set_panning)
1176
disp.extension_add_event(info.first_event, ScreenChangeNotify)
1177
disp.extension_add_event(info.first_event + 1, CrtcChangeNotify)
1178
disp.extension_add_event(info.first_event + 2, OutputChangeNotify)
1179
disp.extension_add_event(info.first_event + 3, OutputPropertyNotify)
1181
#disp.extension_add_error(BadRROutput, BadRROutputError)
1182
#disp.extension_add_error(BadRRCrtc, BadRRCrtcError)
1183
#disp.extension_add_error(BadRRMode, BadRRModeError)