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
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456 xcb_shape_query_version_reply_t *
00457 xcb_shape_query_version_reply (xcb_connection_t *c ,
00458 xcb_shape_query_version_cookie_t cookie ,
00459 xcb_generic_error_t **e );
00460
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490 xcb_void_cookie_t
00491 xcb_shape_rectangles_checked (xcb_connection_t *c ,
00492 xcb_shape_op_t operation ,
00493 xcb_shape_kind_t destination_kind ,
00494 uint8_t ordering ,
00495 xcb_window_t destination_window ,
00496 int16_t x_offset ,
00497 int16_t y_offset ,
00498 uint32_t rectangles_len ,
00499 const xcb_rectangle_t *rectangles );
00500
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527 xcb_void_cookie_t
00528 xcb_shape_rectangles (xcb_connection_t *c ,
00529 xcb_shape_op_t operation ,
00530 xcb_shape_kind_t destination_kind ,
00531 uint8_t ordering ,
00532 xcb_window_t destination_window ,
00533 int16_t x_offset ,
00534 int16_t y_offset ,
00535 uint32_t rectangles_len ,
00536 const xcb_rectangle_t *rectangles );
00537
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565 xcb_void_cookie_t
00566 xcb_shape_mask_checked (xcb_connection_t *c ,
00567 xcb_shape_op_t operation ,
00568 xcb_shape_kind_t destination_kind ,
00569 xcb_window_t destination_window ,
00570 int16_t x_offset ,
00571 int16_t y_offset ,
00572 xcb_pixmap_t source_bitmap );
00573
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598 xcb_void_cookie_t
00599 xcb_shape_mask (xcb_connection_t *c ,
00600 xcb_shape_op_t operation ,
00601 xcb_shape_kind_t destination_kind ,
00602 xcb_window_t destination_window ,
00603 int16_t x_offset ,
00604 int16_t y_offset ,
00605 xcb_pixmap_t source_bitmap );
00606
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635 xcb_void_cookie_t
00636 xcb_shape_combine_checked (xcb_connection_t *c ,
00637 xcb_shape_op_t operation ,
00638 xcb_shape_kind_t destination_kind ,
00639 xcb_shape_kind_t source_kind ,
00640 xcb_window_t destination_window ,
00641 int16_t x_offset ,
00642 int16_t y_offset ,
00643 xcb_window_t source_window );
00644
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670 xcb_void_cookie_t
00671 xcb_shape_combine (xcb_connection_t *c ,
00672 xcb_shape_op_t operation ,
00673 xcb_shape_kind_t destination_kind ,
00674 xcb_shape_kind_t source_kind ,
00675 xcb_window_t destination_window ,
00676 int16_t x_offset ,
00677 int16_t y_offset ,
00678 xcb_window_t source_window );
00679
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705 xcb_void_cookie_t
00706 xcb_shape_offset_checked (xcb_connection_t *c ,
00707 xcb_shape_kind_t destination_kind ,
00708 xcb_window_t destination_window ,
00709 int16_t x_offset ,
00710 int16_t y_offset );
00711
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734 xcb_void_cookie_t
00735 xcb_shape_offset (xcb_connection_t *c ,
00736 xcb_shape_kind_t destination_kind ,
00737 xcb_window_t destination_window ,
00738 int16_t x_offset ,
00739 int16_t y_offset );
00740
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759
00760 xcb_shape_query_extents_cookie_t
00761 xcb_shape_query_extents (xcb_connection_t *c ,
00762 xcb_window_t destination_window );
00763
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786 xcb_shape_query_extents_cookie_t
00787 xcb_shape_query_extents_unchecked (xcb_connection_t *c ,
00788 xcb_window_t destination_window );
00789
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814 xcb_shape_query_extents_reply_t *
00815 xcb_shape_query_extents_reply (xcb_connection_t *c ,
00816 xcb_shape_query_extents_cookie_t cookie ,
00817 xcb_generic_error_t **e );
00818
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842 xcb_void_cookie_t
00843 xcb_shape_select_input_checked (xcb_connection_t *c ,
00844 xcb_window_t destination_window ,
00845 uint8_t enable );
00846
00856
00857
00858
00859
00860
00861
00862
00863
00864
00865
00866
00867 xcb_void_cookie_t
00868 xcb_shape_select_input (xcb_connection_t *c ,
00869 xcb_window_t destination_window ,
00870 uint8_t enable );
00871
00881
00882
00883
00884
00885
00886
00887
00888
00889
00890
00891 xcb_shape_input_selected_cookie_t
00892 xcb_shape_input_selected (xcb_connection_t *c ,
00893 xcb_window_t destination_window );
00894
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917 xcb_shape_input_selected_cookie_t
00918 xcb_shape_input_selected_unchecked (xcb_connection_t *c ,
00919 xcb_window_t destination_window );
00920
00934
00935
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945 xcb_shape_input_selected_reply_t *
00946 xcb_shape_input_selected_reply (xcb_connection_t *c ,
00947 xcb_shape_input_selected_cookie_t cookie ,
00948 xcb_generic_error_t **e );
00949
00959
00960
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970 xcb_shape_get_rectangles_cookie_t
00971 xcb_shape_get_rectangles (xcb_connection_t *c ,
00972 xcb_window_t window ,
00973 xcb_shape_kind_t source_kind );
00974
00987
00988
00989
00990
00991
00992
00993
00994
00995
00996
00997
00998 xcb_shape_get_rectangles_cookie_t
00999 xcb_shape_get_rectangles_unchecked (xcb_connection_t *c ,
01000 xcb_window_t window ,
01001 xcb_shape_kind_t source_kind );
01002
01003
01004
01005
01006
01007
01008
01009
01010
01011
01012
01013 xcb_rectangle_t *
01014 xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R );
01015
01016
01017
01018
01019
01020
01021
01022
01023
01024
01025
01026 int
01027 xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R );
01028
01029
01030
01031
01032
01033
01034
01035
01036
01037
01038
01039 xcb_rectangle_iterator_t
01040 xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R );
01041
01055
01056
01057
01058
01059
01060
01061
01062
01063
01064
01065
01066 xcb_shape_get_rectangles_reply_t *
01067 xcb_shape_get_rectangles_reply (xcb_connection_t *c ,
01068 xcb_shape_get_rectangles_cookie_t cookie ,
01069 xcb_generic_error_t **e );
01070
01071
01072 #endif
01073