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
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311 void
00312 xcb_shape_op_next (xcb_shape_op_iterator_t *i );
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324 xcb_generic_iterator_t
00325 xcb_shape_op_end (xcb_shape_op_iterator_t i );
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337 void
00338 xcb_shape_kind_next (xcb_shape_kind_iterator_t *i );
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350 xcb_generic_iterator_t
00351 xcb_shape_kind_end (xcb_shape_kind_iterator_t i );
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363 xcb_shape_query_version_cookie_t
00364 xcb_shape_query_version (xcb_connection_t *c );
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376 xcb_shape_query_version_cookie_t
00377 xcb_shape_query_version_unchecked (xcb_connection_t *c );
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391 xcb_shape_query_version_reply_t *
00392 xcb_shape_query_version_reply (xcb_connection_t *c ,
00393 xcb_shape_query_version_cookie_t cookie ,
00394 xcb_generic_error_t **e );
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414 xcb_void_cookie_t
00415 xcb_shape_rectangles_checked (xcb_connection_t *c ,
00416 xcb_shape_op_t operation ,
00417 xcb_shape_kind_t destination_kind ,
00418 uint8_t ordering ,
00419 xcb_window_t destination_window ,
00420 int16_t x_offset ,
00421 int16_t y_offset ,
00422 uint32_t rectangles_len ,
00423 const xcb_rectangle_t *rectangles );
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443 xcb_void_cookie_t
00444 xcb_shape_rectangles (xcb_connection_t *c ,
00445 xcb_shape_op_t operation ,
00446 xcb_shape_kind_t destination_kind ,
00447 uint8_t ordering ,
00448 xcb_window_t destination_window ,
00449 int16_t x_offset ,
00450 int16_t y_offset ,
00451 uint32_t rectangles_len ,
00452 const xcb_rectangle_t *rectangles );
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470 xcb_void_cookie_t
00471 xcb_shape_mask_checked (xcb_connection_t *c ,
00472 xcb_shape_op_t operation ,
00473 xcb_shape_kind_t destination_kind ,
00474 xcb_window_t destination_window ,
00475 int16_t x_offset ,
00476 int16_t y_offset ,
00477 xcb_pixmap_t source_bitmap );
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495 xcb_void_cookie_t
00496 xcb_shape_mask (xcb_connection_t *c ,
00497 xcb_shape_op_t operation ,
00498 xcb_shape_kind_t destination_kind ,
00499 xcb_window_t destination_window ,
00500 int16_t x_offset ,
00501 int16_t y_offset ,
00502 xcb_pixmap_t source_bitmap );
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521 xcb_void_cookie_t
00522 xcb_shape_combine_checked (xcb_connection_t *c ,
00523 xcb_shape_op_t operation ,
00524 xcb_shape_kind_t destination_kind ,
00525 xcb_shape_kind_t source_kind ,
00526 xcb_window_t destination_window ,
00527 int16_t x_offset ,
00528 int16_t y_offset ,
00529 xcb_window_t source_window );
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548 xcb_void_cookie_t
00549 xcb_shape_combine (xcb_connection_t *c ,
00550 xcb_shape_op_t operation ,
00551 xcb_shape_kind_t destination_kind ,
00552 xcb_shape_kind_t source_kind ,
00553 xcb_window_t destination_window ,
00554 int16_t x_offset ,
00555 int16_t y_offset ,
00556 xcb_window_t source_window );
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572 xcb_void_cookie_t
00573 xcb_shape_offset_checked (xcb_connection_t *c ,
00574 xcb_shape_kind_t destination_kind ,
00575 xcb_window_t destination_window ,
00576 int16_t x_offset ,
00577 int16_t y_offset );
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593 xcb_void_cookie_t
00594 xcb_shape_offset (xcb_connection_t *c ,
00595 xcb_shape_kind_t destination_kind ,
00596 xcb_window_t destination_window ,
00597 int16_t x_offset ,
00598 int16_t y_offset );
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611 xcb_shape_query_extents_cookie_t
00612 xcb_shape_query_extents (xcb_connection_t *c ,
00613 xcb_window_t destination_window );
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626 xcb_shape_query_extents_cookie_t
00627 xcb_shape_query_extents_unchecked (xcb_connection_t *c ,
00628 xcb_window_t destination_window );
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642 xcb_shape_query_extents_reply_t *
00643 xcb_shape_query_extents_reply (xcb_connection_t *c ,
00644 xcb_shape_query_extents_cookie_t cookie ,
00645 xcb_generic_error_t **e );
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659 xcb_void_cookie_t
00660 xcb_shape_select_input_checked (xcb_connection_t *c ,
00661 xcb_window_t destination_window ,
00662 uint8_t enable );
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676 xcb_void_cookie_t
00677 xcb_shape_select_input (xcb_connection_t *c ,
00678 xcb_window_t destination_window ,
00679 uint8_t enable );
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692 xcb_shape_input_selected_cookie_t
00693 xcb_shape_input_selected (xcb_connection_t *c ,
00694 xcb_window_t destination_window );
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707 xcb_shape_input_selected_cookie_t
00708 xcb_shape_input_selected_unchecked (xcb_connection_t *c ,
00709 xcb_window_t destination_window );
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723 xcb_shape_input_selected_reply_t *
00724 xcb_shape_input_selected_reply (xcb_connection_t *c ,
00725 xcb_shape_input_selected_cookie_t cookie ,
00726 xcb_generic_error_t **e );
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740 xcb_shape_get_rectangles_cookie_t
00741 xcb_shape_get_rectangles (xcb_connection_t *c ,
00742 xcb_window_t window ,
00743 xcb_shape_kind_t source_kind );
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757 xcb_shape_get_rectangles_cookie_t
00758 xcb_shape_get_rectangles_unchecked (xcb_connection_t *c ,
00759 xcb_window_t window ,
00760 xcb_shape_kind_t source_kind );
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772 xcb_rectangle_t *
00773 xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R );
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785 int
00786 xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R );
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798 xcb_rectangle_iterator_t
00799 xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R );
00800
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813 xcb_shape_get_rectangles_reply_t *
00814 xcb_shape_get_rectangles_reply (xcb_connection_t *c ,
00815 xcb_shape_get_rectangles_cookie_t cookie ,
00816 xcb_generic_error_t **e );
00817
00818
00819 #endif
00820