00001
00002
00003
00004
00005
00012 #ifndef __SHAPE_H
00013 #define __SHAPE_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021
00022 #define XCB_SHAPE_MAJOR_VERSION 1
00023 #define XCB_SHAPE_MINOR_VERSION 1
00024
00025 extern xcb_extension_t xcb_shape_id;
00026
00027 typedef uint8_t xcb_shape_op_t;
00028
00032 typedef struct xcb_shape_op_iterator_t {
00033 xcb_shape_op_t *data;
00034 int rem;
00035 int index;
00036 } xcb_shape_op_iterator_t;
00037
00038 typedef uint8_t xcb_shape_kind_t;
00039
00043 typedef struct xcb_shape_kind_iterator_t {
00044 xcb_shape_kind_t *data;
00045 int rem;
00046 int index;
00047 } xcb_shape_kind_iterator_t;
00048
00049 typedef enum xcb_shape_so_t {
00050 XCB_SHAPE_SO_SET,
00051 XCB_SHAPE_SO_UNION,
00052 XCB_SHAPE_SO_INTERSECT,
00053 XCB_SHAPE_SO_SUBTRACT,
00054 XCB_SHAPE_SO_INVERT
00055 } xcb_shape_so_t;
00056
00057 typedef enum xcb_shape_sk_t {
00058 XCB_SHAPE_SK_BOUNDING,
00059 XCB_SHAPE_SK_CLIP,
00060 XCB_SHAPE_SK_INPUT
00061 } xcb_shape_sk_t;
00062
00064 #define XCB_SHAPE_NOTIFY 0
00065
00069 typedef struct xcb_shape_notify_event_t {
00070 uint8_t response_type;
00071 xcb_shape_kind_t shape_kind;
00072 uint16_t sequence;
00073 xcb_window_t affected_window;
00074 int16_t extents_x;
00075 int16_t extents_y;
00076 uint16_t extents_width;
00077 uint16_t extents_height;
00078 xcb_timestamp_t server_time;
00079 uint8_t shaped;
00080 } xcb_shape_notify_event_t;
00081
00085 typedef struct xcb_shape_query_version_cookie_t {
00086 unsigned int sequence;
00087 } xcb_shape_query_version_cookie_t;
00088
00090 #define XCB_SHAPE_QUERY_VERSION 0
00091
00095 typedef struct xcb_shape_query_version_request_t {
00096 uint8_t major_opcode;
00097 uint8_t minor_opcode;
00098 uint16_t length;
00099 } xcb_shape_query_version_request_t;
00100
00104 typedef struct xcb_shape_query_version_reply_t {
00105 uint8_t response_type;
00106 uint8_t pad0;
00107 uint16_t sequence;
00108 uint32_t length;
00109 uint16_t major_version;
00110 uint16_t minor_version;
00111 } xcb_shape_query_version_reply_t;
00112
00114 #define XCB_SHAPE_RECTANGLES 1
00115
00119 typedef struct xcb_shape_rectangles_request_t {
00120 uint8_t major_opcode;
00121 uint8_t minor_opcode;
00122 uint16_t length;
00123 xcb_shape_op_t operation;
00124 xcb_shape_kind_t destination_kind;
00125 uint8_t ordering;
00126 uint8_t pad0;
00127 xcb_window_t destination_window;
00128 int16_t x_offset;
00129 int16_t y_offset;
00130 } xcb_shape_rectangles_request_t;
00131
00133 #define XCB_SHAPE_MASK 2
00134
00138 typedef struct xcb_shape_mask_request_t {
00139 uint8_t major_opcode;
00140 uint8_t minor_opcode;
00141 uint16_t length;
00142 xcb_shape_op_t operation;
00143 xcb_shape_kind_t destination_kind;
00144 uint8_t pad0[2];
00145 xcb_window_t destination_window;
00146 int16_t x_offset;
00147 int16_t y_offset;
00148 xcb_pixmap_t source_bitmap;
00149 } xcb_shape_mask_request_t;
00150
00152 #define XCB_SHAPE_COMBINE 3
00153
00157 typedef struct xcb_shape_combine_request_t {
00158 uint8_t major_opcode;
00159 uint8_t minor_opcode;
00160 uint16_t length;
00161 xcb_shape_op_t operation;
00162 xcb_shape_kind_t destination_kind;
00163 xcb_shape_kind_t source_kind;
00164 uint8_t pad0;
00165 xcb_window_t destination_window;
00166 int16_t x_offset;
00167 int16_t y_offset;
00168 xcb_window_t source_window;
00169 } xcb_shape_combine_request_t;
00170
00172 #define XCB_SHAPE_OFFSET 4
00173
00177 typedef struct xcb_shape_offset_request_t {
00178 uint8_t major_opcode;
00179 uint8_t minor_opcode;
00180 uint16_t length;
00181 xcb_shape_kind_t destination_kind;
00182 uint8_t pad0[3];
00183 xcb_window_t destination_window;
00184 int16_t x_offset;
00185 int16_t y_offset;
00186 } xcb_shape_offset_request_t;
00187
00191 typedef struct xcb_shape_query_extents_cookie_t {
00192 unsigned int sequence;
00193 } xcb_shape_query_extents_cookie_t;
00194
00196 #define XCB_SHAPE_QUERY_EXTENTS 5
00197
00201 typedef struct xcb_shape_query_extents_request_t {
00202 uint8_t major_opcode;
00203 uint8_t minor_opcode;
00204 uint16_t length;
00205 xcb_window_t destination_window;
00206 } xcb_shape_query_extents_request_t;
00207
00211 typedef struct xcb_shape_query_extents_reply_t {
00212 uint8_t response_type;
00213 uint8_t pad0;
00214 uint16_t sequence;
00215 uint32_t length;
00216 uint8_t bounding_shaped;
00217 uint8_t clip_shaped;
00218 uint8_t pad1[2];
00219 int16_t bounding_shape_extents_x;
00220 int16_t bounding_shape_extents_y;
00221 uint16_t bounding_shape_extents_width;
00222 uint16_t bounding_shape_extents_height;
00223 int16_t clip_shape_extents_x;
00224 int16_t clip_shape_extents_y;
00225 uint16_t clip_shape_extents_width;
00226 uint16_t clip_shape_extents_height;
00227 } xcb_shape_query_extents_reply_t;
00228
00230 #define XCB_SHAPE_SELECT_INPUT 6
00231
00235 typedef struct xcb_shape_select_input_request_t {
00236 uint8_t major_opcode;
00237 uint8_t minor_opcode;
00238 uint16_t length;
00239 xcb_window_t destination_window;
00240 uint8_t enable;
00241 } xcb_shape_select_input_request_t;
00242
00246 typedef struct xcb_shape_input_selected_cookie_t {
00247 unsigned int sequence;
00248 } xcb_shape_input_selected_cookie_t;
00249
00251 #define XCB_SHAPE_INPUT_SELECTED 7
00252
00256 typedef struct xcb_shape_input_selected_request_t {
00257 uint8_t major_opcode;
00258 uint8_t minor_opcode;
00259 uint16_t length;
00260 xcb_window_t destination_window;
00261 } xcb_shape_input_selected_request_t;
00262
00266 typedef struct xcb_shape_input_selected_reply_t {
00267 uint8_t response_type;
00268 uint8_t enabled;
00269 uint16_t sequence;
00270 uint32_t length;
00271 } xcb_shape_input_selected_reply_t;
00272
00276 typedef struct xcb_shape_get_rectangles_cookie_t {
00277 unsigned int sequence;
00278 } xcb_shape_get_rectangles_cookie_t;
00279
00281 #define XCB_SHAPE_GET_RECTANGLES 8
00282
00286 typedef struct xcb_shape_get_rectangles_request_t {
00287 uint8_t major_opcode;
00288 uint8_t minor_opcode;
00289 uint16_t length;
00290 xcb_window_t window;
00291 xcb_shape_kind_t source_kind;
00292 } xcb_shape_get_rectangles_request_t;
00293
00297 typedef struct xcb_shape_get_rectangles_reply_t {
00298 uint8_t response_type;
00299 uint8_t ordering;
00300 uint16_t sequence;
00301 uint32_t length;
00302 uint32_t rectangles_len;
00303 } xcb_shape_get_rectangles_reply_t;
00304
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323 void
00324 xcb_shape_op_next (xcb_shape_op_iterator_t *i );
00325
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345 xcb_generic_iterator_t
00346 xcb_shape_op_end (xcb_shape_op_iterator_t i );
00347
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366 void
00367 xcb_shape_kind_next (xcb_shape_kind_iterator_t *i );
00368
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388 xcb_generic_iterator_t
00389 xcb_shape_kind_end (xcb_shape_kind_iterator_t i );
00390
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409 xcb_shape_query_version_cookie_t
00410 xcb_shape_query_version (xcb_connection_t *c );
00411
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433 xcb_shape_query_version_cookie_t
00434 xcb_shape_query_version_unchecked (xcb_connection_t *c );
00435
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462 xcb_shape_query_version_reply_t *
00463 xcb_shape_query_version_reply (xcb_connection_t *c ,
00464 xcb_shape_query_version_cookie_t cookie ,
00465 xcb_generic_error_t **e );
00466
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496 xcb_void_cookie_t
00497 xcb_shape_rectangles_checked (xcb_connection_t *c ,
00498 xcb_shape_op_t operation ,
00499 xcb_shape_kind_t destination_kind ,
00500 uint8_t ordering ,
00501 xcb_window_t destination_window ,
00502 int16_t x_offset ,
00503 int16_t y_offset ,
00504 uint32_t rectangles_len ,
00505 const xcb_rectangle_t *rectangles );
00506
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533 xcb_void_cookie_t
00534 xcb_shape_rectangles (xcb_connection_t *c ,
00535 xcb_shape_op_t operation ,
00536 xcb_shape_kind_t destination_kind ,
00537 uint8_t ordering ,
00538 xcb_window_t destination_window ,
00539 int16_t x_offset ,
00540 int16_t y_offset ,
00541 uint32_t rectangles_len ,
00542 const xcb_rectangle_t *rectangles );
00543
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571 xcb_void_cookie_t
00572 xcb_shape_mask_checked (xcb_connection_t *c ,
00573 xcb_shape_op_t operation ,
00574 xcb_shape_kind_t destination_kind ,
00575 xcb_window_t destination_window ,
00576 int16_t x_offset ,
00577 int16_t y_offset ,
00578 xcb_pixmap_t source_bitmap );
00579
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604 xcb_void_cookie_t
00605 xcb_shape_mask (xcb_connection_t *c ,
00606 xcb_shape_op_t operation ,
00607 xcb_shape_kind_t destination_kind ,
00608 xcb_window_t destination_window ,
00609 int16_t x_offset ,
00610 int16_t y_offset ,
00611 xcb_pixmap_t source_bitmap );
00612
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641 xcb_void_cookie_t
00642 xcb_shape_combine_checked (xcb_connection_t *c ,
00643 xcb_shape_op_t operation ,
00644 xcb_shape_kind_t destination_kind ,
00645 xcb_shape_kind_t source_kind ,
00646 xcb_window_t destination_window ,
00647 int16_t x_offset ,
00648 int16_t y_offset ,
00649 xcb_window_t source_window );
00650
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676 xcb_void_cookie_t
00677 xcb_shape_combine (xcb_connection_t *c ,
00678 xcb_shape_op_t operation ,
00679 xcb_shape_kind_t destination_kind ,
00680 xcb_shape_kind_t source_kind ,
00681 xcb_window_t destination_window ,
00682 int16_t x_offset ,
00683 int16_t y_offset ,
00684 xcb_window_t source_window );
00685
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711 xcb_void_cookie_t
00712 xcb_shape_offset_checked (xcb_connection_t *c ,
00713 xcb_shape_kind_t destination_kind ,
00714 xcb_window_t destination_window ,
00715 int16_t x_offset ,
00716 int16_t y_offset );
00717
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740 xcb_void_cookie_t
00741 xcb_shape_offset (xcb_connection_t *c ,
00742 xcb_shape_kind_t destination_kind ,
00743 xcb_window_t destination_window ,
00744 int16_t x_offset ,
00745 int16_t y_offset );
00746
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766 xcb_shape_query_extents_cookie_t
00767 xcb_shape_query_extents (xcb_connection_t *c ,
00768 xcb_window_t destination_window );
00769
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792 xcb_shape_query_extents_cookie_t
00793 xcb_shape_query_extents_unchecked (xcb_connection_t *c ,
00794 xcb_window_t destination_window );
00795
00811
00812
00813
00814
00815
00816
00817
00818
00819
00820
00821
00822 xcb_shape_query_extents_reply_t *
00823 xcb_shape_query_extents_reply (xcb_connection_t *c ,
00824 xcb_shape_query_extents_cookie_t cookie ,
00825 xcb_generic_error_t **e );
00826
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850 xcb_void_cookie_t
00851 xcb_shape_select_input_checked (xcb_connection_t *c ,
00852 xcb_window_t destination_window ,
00853 uint8_t enable );
00854
00864
00865
00866
00867
00868
00869
00870
00871
00872
00873
00874
00875 xcb_void_cookie_t
00876 xcb_shape_select_input (xcb_connection_t *c ,
00877 xcb_window_t destination_window ,
00878 uint8_t enable );
00879
00889
00890
00891
00892
00893
00894
00895
00896
00897
00898
00899 xcb_shape_input_selected_cookie_t
00900 xcb_shape_input_selected (xcb_connection_t *c ,
00901 xcb_window_t destination_window );
00902
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925 xcb_shape_input_selected_cookie_t
00926 xcb_shape_input_selected_unchecked (xcb_connection_t *c ,
00927 xcb_window_t destination_window );
00928
00944
00945
00946
00947
00948
00949
00950
00951
00952
00953
00954
00955 xcb_shape_input_selected_reply_t *
00956 xcb_shape_input_selected_reply (xcb_connection_t *c ,
00957 xcb_shape_input_selected_cookie_t cookie ,
00958 xcb_generic_error_t **e );
00959
00969
00970
00971
00972
00973
00974
00975
00976
00977
00978
00979
00980 xcb_shape_get_rectangles_cookie_t
00981 xcb_shape_get_rectangles (xcb_connection_t *c ,
00982 xcb_window_t window ,
00983 xcb_shape_kind_t source_kind );
00984
00997
00998
00999
01000
01001
01002
01003
01004
01005
01006
01007
01008 xcb_shape_get_rectangles_cookie_t
01009 xcb_shape_get_rectangles_unchecked (xcb_connection_t *c ,
01010 xcb_window_t window ,
01011 xcb_shape_kind_t source_kind );
01012
01013
01014
01015
01016
01017
01018
01019
01020
01021
01022
01023 xcb_rectangle_t *
01024 xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R );
01025
01026
01027
01028
01029
01030
01031
01032
01033
01034
01035
01036 int
01037 xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R );
01038
01039
01040
01041
01042
01043
01044
01045
01046
01047
01048
01049 xcb_rectangle_iterator_t
01050 xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R );
01051
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078 xcb_shape_get_rectangles_reply_t *
01079 xcb_shape_get_rectangles_reply (xcb_connection_t *c ,
01080 xcb_shape_get_rectangles_cookie_t cookie ,
01081 xcb_generic_error_t **e );
01082
01083
01084 #ifdef __cplusplus
01085 }
01086 #endif
01087
01088 #endif
01089