00001
00002
00003
00004
00005
00012 #ifndef __SHAPE_H
00013 #define __SHAPE_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017
00018 #define XCB_SHAPE_MAJOR_VERSION 1
00019 #define XCB_SHAPE_MINOR_VERSION 1
00020
00021 extern xcb_extension_t xcb_shape_id;
00022
00023 typedef uint8_t xcb_shape_op_t;
00024
00028 typedef struct xcb_shape_op_iterator_t {
00029 xcb_shape_op_t *data;
00030 int rem;
00031 int index;
00032 } xcb_shape_op_iterator_t;
00033
00034 typedef uint8_t xcb_shape_kind_t;
00035
00039 typedef struct xcb_shape_kind_iterator_t {
00040 xcb_shape_kind_t *data;
00041 int rem;
00042 int index;
00043 } xcb_shape_kind_iterator_t;
00044
00045 typedef enum xcb_shape_so_t {
00046 XCB_SHAPE_SO_SET,
00047 XCB_SHAPE_SO_UNION,
00048 XCB_SHAPE_SO_INTERSECT,
00049 XCB_SHAPE_SO_SUBTRACT,
00050 XCB_SHAPE_SO_INVERT
00051 } xcb_shape_so_t;
00052
00053 typedef enum xcb_shape_sk_t {
00054 XCB_SHAPE_SK_BOUNDING,
00055 XCB_SHAPE_SK_CLIP,
00056 XCB_SHAPE_SK_INPUT
00057 } xcb_shape_sk_t;
00058
00060 #define XCB_SHAPE_NOTIFY 0
00061
00065 typedef struct xcb_shape_notify_event_t {
00066 uint8_t response_type;
00067 xcb_shape_kind_t shape_kind;
00068 uint16_t sequence;
00069 xcb_window_t affected_window;
00070 int16_t extents_x;
00071 int16_t extents_y;
00072 uint16_t extents_width;
00073 uint16_t extents_height;
00074 xcb_timestamp_t server_time;
00075 uint8_t shaped;
00076 } xcb_shape_notify_event_t;
00077
00081 typedef struct xcb_shape_query_version_cookie_t {
00082 unsigned int sequence;
00083 } xcb_shape_query_version_cookie_t;
00084
00086 #define XCB_SHAPE_QUERY_VERSION 0
00087
00091 typedef struct xcb_shape_query_version_request_t {
00092 uint8_t major_opcode;
00093 uint8_t minor_opcode;
00094 uint16_t length;
00095 } xcb_shape_query_version_request_t;
00096
00100 typedef struct xcb_shape_query_version_reply_t {
00101 uint8_t response_type;
00102 uint8_t pad0;
00103 uint16_t sequence;
00104 uint32_t length;
00105 uint16_t major_version;
00106 uint16_t minor_version;
00107 } xcb_shape_query_version_reply_t;
00108
00110 #define XCB_SHAPE_RECTANGLES 1
00111
00115 typedef struct xcb_shape_rectangles_request_t {
00116 uint8_t major_opcode;
00117 uint8_t minor_opcode;
00118 uint16_t length;
00119 xcb_shape_op_t operation;
00120 xcb_shape_kind_t destination_kind;
00121 uint8_t ordering;
00122 uint8_t pad0;
00123 xcb_window_t destination_window;
00124 int16_t x_offset;
00125 int16_t y_offset;
00126 } xcb_shape_rectangles_request_t;
00127
00129 #define XCB_SHAPE_MASK 2
00130
00134 typedef struct xcb_shape_mask_request_t {
00135 uint8_t major_opcode;
00136 uint8_t minor_opcode;
00137 uint16_t length;
00138 xcb_shape_op_t operation;
00139 xcb_shape_kind_t destination_kind;
00140 uint8_t pad0[2];
00141 xcb_window_t destination_window;
00142 int16_t x_offset;
00143 int16_t y_offset;
00144 xcb_pixmap_t source_bitmap;
00145 } xcb_shape_mask_request_t;
00146
00148 #define XCB_SHAPE_COMBINE 3
00149
00153 typedef struct xcb_shape_combine_request_t {
00154 uint8_t major_opcode;
00155 uint8_t minor_opcode;
00156 uint16_t length;
00157 xcb_shape_op_t operation;
00158 xcb_shape_kind_t destination_kind;
00159 xcb_shape_kind_t source_kind;
00160 uint8_t pad0;
00161 xcb_window_t destination_window;
00162 int16_t x_offset;
00163 int16_t y_offset;
00164 xcb_window_t source_window;
00165 } xcb_shape_combine_request_t;
00166
00168 #define XCB_SHAPE_OFFSET 4
00169
00173 typedef struct xcb_shape_offset_request_t {
00174 uint8_t major_opcode;
00175 uint8_t minor_opcode;
00176 uint16_t length;
00177 xcb_shape_kind_t destination_kind;
00178 uint8_t pad0[3];
00179 xcb_window_t destination_window;
00180 int16_t x_offset;
00181 int16_t y_offset;
00182 } xcb_shape_offset_request_t;
00183
00187 typedef struct xcb_shape_query_extents_cookie_t {
00188 unsigned int sequence;
00189 } xcb_shape_query_extents_cookie_t;
00190
00192 #define XCB_SHAPE_QUERY_EXTENTS 5
00193
00197 typedef struct xcb_shape_query_extents_request_t {
00198 uint8_t major_opcode;
00199 uint8_t minor_opcode;
00200 uint16_t length;
00201 xcb_window_t destination_window;
00202 } xcb_shape_query_extents_request_t;
00203
00207 typedef struct xcb_shape_query_extents_reply_t {
00208 uint8_t response_type;
00209 uint8_t pad0;
00210 uint16_t sequence;
00211 uint32_t length;
00212 uint8_t bounding_shaped;
00213 uint8_t clip_shaped;
00214 uint8_t pad1[2];
00215 int16_t bounding_shape_extents_x;
00216 int16_t bounding_shape_extents_y;
00217 uint16_t bounding_shape_extents_width;
00218 uint16_t bounding_shape_extents_height;
00219 int16_t clip_shape_extents_x;
00220 int16_t clip_shape_extents_y;
00221 uint16_t clip_shape_extents_width;
00222 uint16_t clip_shape_extents_height;
00223 } xcb_shape_query_extents_reply_t;
00224
00226 #define XCB_SHAPE_SELECT_INPUT 6
00227
00231 typedef struct xcb_shape_select_input_request_t {
00232 uint8_t major_opcode;
00233 uint8_t minor_opcode;
00234 uint16_t length;
00235 xcb_window_t destination_window;
00236 uint8_t enable;
00237 } xcb_shape_select_input_request_t;
00238
00242 typedef struct xcb_shape_input_selected_cookie_t {
00243 unsigned int sequence;
00244 } xcb_shape_input_selected_cookie_t;
00245
00247 #define XCB_SHAPE_INPUT_SELECTED 7
00248
00252 typedef struct xcb_shape_input_selected_request_t {
00253 uint8_t major_opcode;
00254 uint8_t minor_opcode;
00255 uint16_t length;
00256 xcb_window_t destination_window;
00257 } xcb_shape_input_selected_request_t;
00258
00262 typedef struct xcb_shape_input_selected_reply_t {
00263 uint8_t response_type;
00264 uint8_t enabled;
00265 uint16_t sequence;
00266 uint32_t length;
00267 } xcb_shape_input_selected_reply_t;
00268
00272 typedef struct xcb_shape_get_rectangles_cookie_t {
00273 unsigned int sequence;
00274 } xcb_shape_get_rectangles_cookie_t;
00275
00277 #define XCB_SHAPE_GET_RECTANGLES 8
00278
00282 typedef struct xcb_shape_get_rectangles_request_t {
00283 uint8_t major_opcode;
00284 uint8_t minor_opcode;
00285 uint16_t length;
00286 xcb_window_t window;
00287 xcb_shape_kind_t source_kind;
00288 } xcb_shape_get_rectangles_request_t;
00289
00293 typedef struct xcb_shape_get_rectangles_reply_t {
00294 uint8_t response_type;
00295 uint8_t ordering;
00296 uint16_t sequence;
00297 uint32_t length;
00298 uint32_t rectangles_len;
00299 } xcb_shape_get_rectangles_reply_t;
00300
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319 void
00320 xcb_shape_op_next (xcb_shape_op_iterator_t *i );
00321
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341 xcb_generic_iterator_t
00342 xcb_shape_op_end (xcb_shape_op_iterator_t i );
00343
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362 void
00363 xcb_shape_kind_next (xcb_shape_kind_iterator_t *i );
00364
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384 xcb_generic_iterator_t
00385 xcb_shape_kind_end (xcb_shape_kind_iterator_t i );
00386
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405 xcb_shape_query_version_cookie_t
00406 xcb_shape_query_version (xcb_connection_t *c );
00407
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429 xcb_shape_query_version_cookie_t
00430 xcb_shape_query_version_unchecked (xcb_connection_t *c );
00431
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458 xcb_shape_query_version_reply_t *
00459 xcb_shape_query_version_reply (xcb_connection_t *c ,
00460 xcb_shape_query_version_cookie_t cookie ,
00461 xcb_generic_error_t **e );
00462
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492 xcb_void_cookie_t
00493 xcb_shape_rectangles_checked (xcb_connection_t *c ,
00494 xcb_shape_op_t operation ,
00495 xcb_shape_kind_t destination_kind ,
00496 uint8_t ordering ,
00497 xcb_window_t destination_window ,
00498 int16_t x_offset ,
00499 int16_t y_offset ,
00500 uint32_t rectangles_len ,
00501 const xcb_rectangle_t *rectangles );
00502
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529 xcb_void_cookie_t
00530 xcb_shape_rectangles (xcb_connection_t *c ,
00531 xcb_shape_op_t operation ,
00532 xcb_shape_kind_t destination_kind ,
00533 uint8_t ordering ,
00534 xcb_window_t destination_window ,
00535 int16_t x_offset ,
00536 int16_t y_offset ,
00537 uint32_t rectangles_len ,
00538 const xcb_rectangle_t *rectangles );
00539
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567 xcb_void_cookie_t
00568 xcb_shape_mask_checked (xcb_connection_t *c ,
00569 xcb_shape_op_t operation ,
00570 xcb_shape_kind_t destination_kind ,
00571 xcb_window_t destination_window ,
00572 int16_t x_offset ,
00573 int16_t y_offset ,
00574 xcb_pixmap_t source_bitmap );
00575
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600 xcb_void_cookie_t
00601 xcb_shape_mask (xcb_connection_t *c ,
00602 xcb_shape_op_t operation ,
00603 xcb_shape_kind_t destination_kind ,
00604 xcb_window_t destination_window ,
00605 int16_t x_offset ,
00606 int16_t y_offset ,
00607 xcb_pixmap_t source_bitmap );
00608
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637 xcb_void_cookie_t
00638 xcb_shape_combine_checked (xcb_connection_t *c ,
00639 xcb_shape_op_t operation ,
00640 xcb_shape_kind_t destination_kind ,
00641 xcb_shape_kind_t source_kind ,
00642 xcb_window_t destination_window ,
00643 int16_t x_offset ,
00644 int16_t y_offset ,
00645 xcb_window_t source_window );
00646
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672 xcb_void_cookie_t
00673 xcb_shape_combine (xcb_connection_t *c ,
00674 xcb_shape_op_t operation ,
00675 xcb_shape_kind_t destination_kind ,
00676 xcb_shape_kind_t source_kind ,
00677 xcb_window_t destination_window ,
00678 int16_t x_offset ,
00679 int16_t y_offset ,
00680 xcb_window_t source_window );
00681
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707 xcb_void_cookie_t
00708 xcb_shape_offset_checked (xcb_connection_t *c ,
00709 xcb_shape_kind_t destination_kind ,
00710 xcb_window_t destination_window ,
00711 int16_t x_offset ,
00712 int16_t y_offset );
00713
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736 xcb_void_cookie_t
00737 xcb_shape_offset (xcb_connection_t *c ,
00738 xcb_shape_kind_t destination_kind ,
00739 xcb_window_t destination_window ,
00740 int16_t x_offset ,
00741 int16_t y_offset );
00742
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762 xcb_shape_query_extents_cookie_t
00763 xcb_shape_query_extents (xcb_connection_t *c ,
00764 xcb_window_t destination_window );
00765
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788 xcb_shape_query_extents_cookie_t
00789 xcb_shape_query_extents_unchecked (xcb_connection_t *c ,
00790 xcb_window_t destination_window );
00791
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818 xcb_shape_query_extents_reply_t *
00819 xcb_shape_query_extents_reply (xcb_connection_t *c ,
00820 xcb_shape_query_extents_cookie_t cookie ,
00821 xcb_generic_error_t **e );
00822
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846 xcb_void_cookie_t
00847 xcb_shape_select_input_checked (xcb_connection_t *c ,
00848 xcb_window_t destination_window ,
00849 uint8_t enable );
00850
00860
00861
00862
00863
00864
00865
00866
00867
00868
00869
00870
00871 xcb_void_cookie_t
00872 xcb_shape_select_input (xcb_connection_t *c ,
00873 xcb_window_t destination_window ,
00874 uint8_t enable );
00875
00885
00886
00887
00888
00889
00890
00891
00892
00893
00894
00895 xcb_shape_input_selected_cookie_t
00896 xcb_shape_input_selected (xcb_connection_t *c ,
00897 xcb_window_t destination_window );
00898
00911
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921 xcb_shape_input_selected_cookie_t
00922 xcb_shape_input_selected_unchecked (xcb_connection_t *c ,
00923 xcb_window_t destination_window );
00924
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949
00950
00951 xcb_shape_input_selected_reply_t *
00952 xcb_shape_input_selected_reply (xcb_connection_t *c ,
00953 xcb_shape_input_selected_cookie_t cookie ,
00954 xcb_generic_error_t **e );
00955
00965
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975
00976 xcb_shape_get_rectangles_cookie_t
00977 xcb_shape_get_rectangles (xcb_connection_t *c ,
00978 xcb_window_t window ,
00979 xcb_shape_kind_t source_kind );
00980
00993
00994
00995
00996
00997
00998
00999
01000
01001
01002
01003
01004 xcb_shape_get_rectangles_cookie_t
01005 xcb_shape_get_rectangles_unchecked (xcb_connection_t *c ,
01006 xcb_window_t window ,
01007 xcb_shape_kind_t source_kind );
01008
01009
01010
01011
01012
01013
01014
01015
01016
01017
01018
01019 xcb_rectangle_t *
01020 xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R );
01021
01022
01023
01024
01025
01026
01027
01028
01029
01030
01031
01032 int
01033 xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R );
01034
01035
01036
01037
01038
01039
01040
01041
01042
01043
01044
01045 xcb_rectangle_iterator_t
01046 xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R );
01047
01063
01064
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074 xcb_shape_get_rectangles_reply_t *
01075 xcb_shape_get_rectangles_reply (xcb_connection_t *c ,
01076 xcb_shape_get_rectangles_cookie_t cookie ,
01077 xcb_generic_error_t **e );
01078
01079
01080 #endif
01081