Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:36

0001 /*
0002  * This file generated automatically from damage.xml by c_client.py.
0003  * Edit at your peril.
0004  */
0005 
0006 /**
0007  * @defgroup XCB_Damage_API XCB Damage API
0008  * @brief Damage XCB Protocol Implementation.
0009  * @{
0010  **/
0011 
0012 #ifndef __DAMAGE_H
0013 #define __DAMAGE_H
0014 
0015 #include "xcb.h"
0016 #include "xproto.h"
0017 #include "xfixes.h"
0018 
0019 #ifdef __cplusplus
0020 extern "C" {
0021 #endif
0022 
0023 #define XCB_DAMAGE_MAJOR_VERSION 1
0024 #define XCB_DAMAGE_MINOR_VERSION 1
0025 
0026 extern xcb_extension_t xcb_damage_id;
0027 
0028 typedef uint32_t xcb_damage_damage_t;
0029 
0030 /**
0031  * @brief xcb_damage_damage_iterator_t
0032  **/
0033 typedef struct xcb_damage_damage_iterator_t {
0034     xcb_damage_damage_t *data;
0035     int                  rem;
0036     int                  index;
0037 } xcb_damage_damage_iterator_t;
0038 
0039 typedef enum xcb_damage_report_level_t {
0040     XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES = 0,
0041     XCB_DAMAGE_REPORT_LEVEL_DELTA_RECTANGLES = 1,
0042     XCB_DAMAGE_REPORT_LEVEL_BOUNDING_BOX = 2,
0043     XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY = 3
0044 } xcb_damage_report_level_t;
0045 
0046 /** Opcode for xcb_damage_bad_damage. */
0047 #define XCB_DAMAGE_BAD_DAMAGE 0
0048 
0049 /**
0050  * @brief xcb_damage_bad_damage_error_t
0051  **/
0052 typedef struct xcb_damage_bad_damage_error_t {
0053     uint8_t  response_type;
0054     uint8_t  error_code;
0055     uint16_t sequence;
0056     uint32_t bad_value;
0057     uint16_t minor_opcode;
0058     uint8_t  major_opcode;
0059 } xcb_damage_bad_damage_error_t;
0060 
0061 /**
0062  * @brief xcb_damage_query_version_cookie_t
0063  **/
0064 typedef struct xcb_damage_query_version_cookie_t {
0065     unsigned int sequence;
0066 } xcb_damage_query_version_cookie_t;
0067 
0068 /** Opcode for xcb_damage_query_version. */
0069 #define XCB_DAMAGE_QUERY_VERSION 0
0070 
0071 /**
0072  * @brief xcb_damage_query_version_request_t
0073  **/
0074 typedef struct xcb_damage_query_version_request_t {
0075     uint8_t  major_opcode;
0076     uint8_t  minor_opcode;
0077     uint16_t length;
0078     uint32_t client_major_version;
0079     uint32_t client_minor_version;
0080 } xcb_damage_query_version_request_t;
0081 
0082 /**
0083  * @brief xcb_damage_query_version_reply_t
0084  **/
0085 typedef struct xcb_damage_query_version_reply_t {
0086     uint8_t  response_type;
0087     uint8_t  pad0;
0088     uint16_t sequence;
0089     uint32_t length;
0090     uint32_t major_version;
0091     uint32_t minor_version;
0092     uint8_t  pad1[16];
0093 } xcb_damage_query_version_reply_t;
0094 
0095 /** Opcode for xcb_damage_create. */
0096 #define XCB_DAMAGE_CREATE 1
0097 
0098 /**
0099  * @brief xcb_damage_create_request_t
0100  **/
0101 typedef struct xcb_damage_create_request_t {
0102     uint8_t             major_opcode;
0103     uint8_t             minor_opcode;
0104     uint16_t            length;
0105     xcb_damage_damage_t damage;
0106     xcb_drawable_t      drawable;
0107     uint8_t             level;
0108     uint8_t             pad0[3];
0109 } xcb_damage_create_request_t;
0110 
0111 /** Opcode for xcb_damage_destroy. */
0112 #define XCB_DAMAGE_DESTROY 2
0113 
0114 /**
0115  * @brief xcb_damage_destroy_request_t
0116  **/
0117 typedef struct xcb_damage_destroy_request_t {
0118     uint8_t             major_opcode;
0119     uint8_t             minor_opcode;
0120     uint16_t            length;
0121     xcb_damage_damage_t damage;
0122 } xcb_damage_destroy_request_t;
0123 
0124 /** Opcode for xcb_damage_subtract. */
0125 #define XCB_DAMAGE_SUBTRACT 3
0126 
0127 /**
0128  * @brief xcb_damage_subtract_request_t
0129  **/
0130 typedef struct xcb_damage_subtract_request_t {
0131     uint8_t             major_opcode;
0132     uint8_t             minor_opcode;
0133     uint16_t            length;
0134     xcb_damage_damage_t damage;
0135     xcb_xfixes_region_t repair;
0136     xcb_xfixes_region_t parts;
0137 } xcb_damage_subtract_request_t;
0138 
0139 /** Opcode for xcb_damage_add. */
0140 #define XCB_DAMAGE_ADD 4
0141 
0142 /**
0143  * @brief xcb_damage_add_request_t
0144  **/
0145 typedef struct xcb_damage_add_request_t {
0146     uint8_t             major_opcode;
0147     uint8_t             minor_opcode;
0148     uint16_t            length;
0149     xcb_drawable_t      drawable;
0150     xcb_xfixes_region_t region;
0151 } xcb_damage_add_request_t;
0152 
0153 /** Opcode for xcb_damage_notify. */
0154 #define XCB_DAMAGE_NOTIFY 0
0155 
0156 /**
0157  * @brief xcb_damage_notify_event_t
0158  **/
0159 typedef struct xcb_damage_notify_event_t {
0160     uint8_t             response_type;
0161     uint8_t             level;
0162     uint16_t            sequence;
0163     xcb_drawable_t      drawable;
0164     xcb_damage_damage_t damage;
0165     xcb_timestamp_t     timestamp;
0166     xcb_rectangle_t     area;
0167     xcb_rectangle_t     geometry;
0168 } xcb_damage_notify_event_t;
0169 
0170 /**
0171  * Get the next element of the iterator
0172  * @param i Pointer to a xcb_damage_damage_iterator_t
0173  *
0174  * Get the next element in the iterator. The member rem is
0175  * decreased by one. The member data points to the next
0176  * element. The member index is increased by sizeof(xcb_damage_damage_t)
0177  */
0178 void
0179 xcb_damage_damage_next (xcb_damage_damage_iterator_t *i);
0180 
0181 /**
0182  * Return the iterator pointing to the last element
0183  * @param i An xcb_damage_damage_iterator_t
0184  * @return  The iterator pointing to the last element
0185  *
0186  * Set the current element in the iterator to the last element.
0187  * The member rem is set to 0. The member data points to the
0188  * last element.
0189  */
0190 xcb_generic_iterator_t
0191 xcb_damage_damage_end (xcb_damage_damage_iterator_t i);
0192 
0193 /**
0194  * @brief Negotiate the version of the DAMAGE extension
0195  *
0196  * @param c The connection
0197  * @param client_major_version The major version supported by the client.
0198  * @param client_minor_version The minor version supported by the client.
0199  * @return A cookie
0200  *
0201  * This negotiates the version of the DAMAGE extension.  It must precede any other
0202  * request using the DAMAGE extension.  Failure to do so will cause a BadRequest
0203  * error for those requests.
0204  *
0205  */
0206 xcb_damage_query_version_cookie_t
0207 xcb_damage_query_version (xcb_connection_t *c,
0208                           uint32_t          client_major_version,
0209                           uint32_t          client_minor_version);
0210 
0211 /**
0212  * @brief Negotiate the version of the DAMAGE extension
0213  *
0214  * @param c The connection
0215  * @param client_major_version The major version supported by the client.
0216  * @param client_minor_version The minor version supported by the client.
0217  * @return A cookie
0218  *
0219  * This negotiates the version of the DAMAGE extension.  It must precede any other
0220  * request using the DAMAGE extension.  Failure to do so will cause a BadRequest
0221  * error for those requests.
0222  *
0223  * This form can be used only if the request will cause
0224  * a reply to be generated. Any returned error will be
0225  * placed in the event queue.
0226  */
0227 xcb_damage_query_version_cookie_t
0228 xcb_damage_query_version_unchecked (xcb_connection_t *c,
0229                                     uint32_t          client_major_version,
0230                                     uint32_t          client_minor_version);
0231 
0232 /**
0233  * Return the reply
0234  * @param c      The connection
0235  * @param cookie The cookie
0236  * @param e      The xcb_generic_error_t supplied
0237  *
0238  * Returns the reply of the request asked by
0239  *
0240  * The parameter @p e supplied to this function must be NULL if
0241  * xcb_damage_query_version_unchecked(). is used.
0242  * Otherwise, it stores the error if any.
0243  *
0244  * The returned value must be freed by the caller using free().
0245  */
0246 xcb_damage_query_version_reply_t *
0247 xcb_damage_query_version_reply (xcb_connection_t                   *c,
0248                                 xcb_damage_query_version_cookie_t   cookie  /**< */,
0249                                 xcb_generic_error_t               **e);
0250 
0251 /**
0252  * @brief Creates a Damage object to monitor changes to a drawable.
0253  *
0254  * @param c The connection
0255  * @param damage The ID with which you will refer to the new Damage object, created by
0256  * `xcb_generate_id`.
0257  * @param drawable The ID of the drawable to be monitored.
0258  * @param level A bitmask of #xcb_damage_report_level_t values.
0259  * @param level The level of detail to be provided in Damage events.
0260  * @return A cookie
0261  *
0262  * This creates a Damage object to monitor changes to a drawable, and specifies
0263  * the level of detail to be reported for changes.
0264  * 
0265  * We call changes made to pixel contents of windows and pixmaps 'damage'
0266  * throughout this extension.
0267  * 
0268  * Damage accumulates as drawing occurs in the drawable.  Each drawing operation
0269  * 'damages' one or more rectangular areas within the drawable.  The rectangles
0270  * are guaranteed to include the set of pixels modified by each operation, but
0271  * may include significantly more than just those pixels.  The desire is for
0272  * the damage to strike a balance between the number of rectangles reported and
0273  * the extraneous area included.  A reasonable goal is for each primitive
0274  * object drawn (line, string, rectangle) to be represented as a single
0275  * rectangle and for the damage area of the operation to be the union of these
0276  * rectangles.
0277  * 
0278  * The DAMAGE extension allows applications to either receive the raw
0279  * rectangles as a stream of events, or to have them partially processed within
0280  * the X server to reduce the amount of data transmitted as well as reduce the
0281  * processing latency once the repaint operation has started.
0282  * 
0283  * The Damage object holds any accumulated damage region and reflects the
0284  * relationship between the drawable selected for damage notification and the
0285  * drawable for which damage is tracked.
0286  *
0287  * This form can be used only if the request will not cause
0288  * a reply to be generated. Any returned error will be
0289  * saved for handling by xcb_request_check().
0290  */
0291 xcb_void_cookie_t
0292 xcb_damage_create_checked (xcb_connection_t    *c,
0293                            xcb_damage_damage_t  damage,
0294                            xcb_drawable_t       drawable,
0295                            uint8_t              level);
0296 
0297 /**
0298  * @brief Creates a Damage object to monitor changes to a drawable.
0299  *
0300  * @param c The connection
0301  * @param damage The ID with which you will refer to the new Damage object, created by
0302  * `xcb_generate_id`.
0303  * @param drawable The ID of the drawable to be monitored.
0304  * @param level A bitmask of #xcb_damage_report_level_t values.
0305  * @param level The level of detail to be provided in Damage events.
0306  * @return A cookie
0307  *
0308  * This creates a Damage object to monitor changes to a drawable, and specifies
0309  * the level of detail to be reported for changes.
0310  * 
0311  * We call changes made to pixel contents of windows and pixmaps 'damage'
0312  * throughout this extension.
0313  * 
0314  * Damage accumulates as drawing occurs in the drawable.  Each drawing operation
0315  * 'damages' one or more rectangular areas within the drawable.  The rectangles
0316  * are guaranteed to include the set of pixels modified by each operation, but
0317  * may include significantly more than just those pixels.  The desire is for
0318  * the damage to strike a balance between the number of rectangles reported and
0319  * the extraneous area included.  A reasonable goal is for each primitive
0320  * object drawn (line, string, rectangle) to be represented as a single
0321  * rectangle and for the damage area of the operation to be the union of these
0322  * rectangles.
0323  * 
0324  * The DAMAGE extension allows applications to either receive the raw
0325  * rectangles as a stream of events, or to have them partially processed within
0326  * the X server to reduce the amount of data transmitted as well as reduce the
0327  * processing latency once the repaint operation has started.
0328  * 
0329  * The Damage object holds any accumulated damage region and reflects the
0330  * relationship between the drawable selected for damage notification and the
0331  * drawable for which damage is tracked.
0332  *
0333  */
0334 xcb_void_cookie_t
0335 xcb_damage_create (xcb_connection_t    *c,
0336                    xcb_damage_damage_t  damage,
0337                    xcb_drawable_t       drawable,
0338                    uint8_t              level);
0339 
0340 /**
0341  * @brief Destroys a previously created Damage object.
0342  *
0343  * @param c The connection
0344  * @param damage The ID you provided to `xcb_create_damage`.
0345  * @return A cookie
0346  *
0347  * This destroys a Damage object and requests the X server stop reporting
0348  * the changes it was tracking.
0349  *
0350  * This form can be used only if the request will not cause
0351  * a reply to be generated. Any returned error will be
0352  * saved for handling by xcb_request_check().
0353  */
0354 xcb_void_cookie_t
0355 xcb_damage_destroy_checked (xcb_connection_t    *c,
0356                             xcb_damage_damage_t  damage);
0357 
0358 /**
0359  * @brief Destroys a previously created Damage object.
0360  *
0361  * @param c The connection
0362  * @param damage The ID you provided to `xcb_create_damage`.
0363  * @return A cookie
0364  *
0365  * This destroys a Damage object and requests the X server stop reporting
0366  * the changes it was tracking.
0367  *
0368  */
0369 xcb_void_cookie_t
0370 xcb_damage_destroy (xcb_connection_t    *c,
0371                     xcb_damage_damage_t  damage);
0372 
0373 /**
0374  * @brief Remove regions from a previously created Damage object.
0375  *
0376  * @param c The connection
0377  * @param damage The ID you provided to `xcb_create_damage`.
0378  * @return A cookie
0379  *
0380  * This updates the regions of damage recorded in a a Damage object.
0381  * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
0382  * for details.
0383  *
0384  * This form can be used only if the request will not cause
0385  * a reply to be generated. Any returned error will be
0386  * saved for handling by xcb_request_check().
0387  */
0388 xcb_void_cookie_t
0389 xcb_damage_subtract_checked (xcb_connection_t    *c,
0390                              xcb_damage_damage_t  damage,
0391                              xcb_xfixes_region_t  repair,
0392                              xcb_xfixes_region_t  parts);
0393 
0394 /**
0395  * @brief Remove regions from a previously created Damage object.
0396  *
0397  * @param c The connection
0398  * @param damage The ID you provided to `xcb_create_damage`.
0399  * @return A cookie
0400  *
0401  * This updates the regions of damage recorded in a a Damage object.
0402  * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
0403  * for details.
0404  *
0405  */
0406 xcb_void_cookie_t
0407 xcb_damage_subtract (xcb_connection_t    *c,
0408                      xcb_damage_damage_t  damage,
0409                      xcb_xfixes_region_t  repair,
0410                      xcb_xfixes_region_t  parts);
0411 
0412 /**
0413  * @brief Add a region to a previously created Damage object.
0414  *
0415  * @param c The connection
0416  * @return A cookie
0417  *
0418  * This updates the regions of damage recorded in a a Damage object.
0419  * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
0420  * for details.
0421  *
0422  * This form can be used only if the request will not cause
0423  * a reply to be generated. Any returned error will be
0424  * saved for handling by xcb_request_check().
0425  */
0426 xcb_void_cookie_t
0427 xcb_damage_add_checked (xcb_connection_t    *c,
0428                         xcb_drawable_t       drawable,
0429                         xcb_xfixes_region_t  region);
0430 
0431 /**
0432  * @brief Add a region to a previously created Damage object.
0433  *
0434  * @param c The connection
0435  * @return A cookie
0436  *
0437  * This updates the regions of damage recorded in a a Damage object.
0438  * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
0439  * for details.
0440  *
0441  */
0442 xcb_void_cookie_t
0443 xcb_damage_add (xcb_connection_t    *c,
0444                 xcb_drawable_t       drawable,
0445                 xcb_xfixes_region_t  region);
0446 
0447 
0448 #ifdef __cplusplus
0449 }
0450 #endif
0451 
0452 #endif
0453 
0454 /**
0455  * @}
0456  */