Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/xcb
File: xcbext.h
/*
[0] Fix | Delete
* Copyright (C) 2001-2004 Bart Massey and Jamey Sharp.
[1] Fix | Delete
* All Rights Reserved.
[2] Fix | Delete
*
[3] Fix | Delete
* Permission is hereby granted, free of charge, to any person obtaining a
[4] Fix | Delete
* copy of this software and associated documentation files (the "Software"),
[5] Fix | Delete
* to deal in the Software without restriction, including without limitation
[6] Fix | Delete
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
[7] Fix | Delete
* and/or sell copies of the Software, and to permit persons to whom the
[8] Fix | Delete
* Software is furnished to do so, subject to the following conditions:
[9] Fix | Delete
*
[10] Fix | Delete
* The above copyright notice and this permission notice shall be included in
[11] Fix | Delete
* all copies or substantial portions of the Software.
[12] Fix | Delete
*
[13] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
[14] Fix | Delete
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
[15] Fix | Delete
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
[16] Fix | Delete
* AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
[17] Fix | Delete
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
[18] Fix | Delete
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[19] Fix | Delete
*
[20] Fix | Delete
* Except as contained in this notice, the names of the authors or their
[21] Fix | Delete
* institutions shall not be used in advertising or otherwise to promote the
[22] Fix | Delete
* sale, use or other dealings in this Software without prior written
[23] Fix | Delete
* authorization from the authors.
[24] Fix | Delete
*/
[25] Fix | Delete
[26] Fix | Delete
#ifndef __XCBEXT_H
[27] Fix | Delete
#define __XCBEXT_H
[28] Fix | Delete
[29] Fix | Delete
#include "xcb.h"
[30] Fix | Delete
[31] Fix | Delete
#ifdef __cplusplus
[32] Fix | Delete
extern "C" {
[33] Fix | Delete
#endif
[34] Fix | Delete
[35] Fix | Delete
/* xcb_ext.c */
[36] Fix | Delete
[37] Fix | Delete
struct xcb_extension_t {
[38] Fix | Delete
const char *name;
[39] Fix | Delete
int global_id;
[40] Fix | Delete
};
[41] Fix | Delete
[42] Fix | Delete
[43] Fix | Delete
/* xcb_out.c */
[44] Fix | Delete
[45] Fix | Delete
typedef struct {
[46] Fix | Delete
size_t count;
[47] Fix | Delete
xcb_extension_t *ext;
[48] Fix | Delete
uint8_t opcode;
[49] Fix | Delete
uint8_t isvoid;
[50] Fix | Delete
} xcb_protocol_request_t;
[51] Fix | Delete
[52] Fix | Delete
enum xcb_send_request_flags_t {
[53] Fix | Delete
XCB_REQUEST_CHECKED = 1 << 0,
[54] Fix | Delete
XCB_REQUEST_RAW = 1 << 1,
[55] Fix | Delete
XCB_REQUEST_DISCARD_REPLY = 1 << 2,
[56] Fix | Delete
XCB_REQUEST_REPLY_FDS = 1 << 3
[57] Fix | Delete
};
[58] Fix | Delete
[59] Fix | Delete
/**
[60] Fix | Delete
* @brief Send a request to the server.
[61] Fix | Delete
* @param c The connection to the X server.
[62] Fix | Delete
* @param flags A combination of flags from the xcb_send_request_flags_t enumeration.
[63] Fix | Delete
* @param vector Data to send; must have two iovecs before start for internal use.
[64] Fix | Delete
* @param request Information about the request to be sent.
[65] Fix | Delete
* @return The request's sequence number on success, 0 otherwise.
[66] Fix | Delete
*
[67] Fix | Delete
* This function sends a new request to the X server. The data of the request is
[68] Fix | Delete
* given as an array of @c iovecs in the @p vector argument. The length of that
[69] Fix | Delete
* array and the necessary management information are given in the @p request
[70] Fix | Delete
* argument.
[71] Fix | Delete
*
[72] Fix | Delete
* When this function returns, the request might or might not be sent already.
[73] Fix | Delete
* Use xcb_flush() to make sure that it really was sent.
[74] Fix | Delete
*
[75] Fix | Delete
* Please note that this function is not the preferred way for sending requests.
[76] Fix | Delete
* It's better to use the generated wrapper functions.
[77] Fix | Delete
*
[78] Fix | Delete
* Please note that xcb might use index -1 and -2 of the @p vector array internally,
[79] Fix | Delete
* so they must be valid!
[80] Fix | Delete
*/
[81] Fix | Delete
unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request);
[82] Fix | Delete
[83] Fix | Delete
/**
[84] Fix | Delete
* @brief Send a request to the server.
[85] Fix | Delete
* @param c The connection to the X server.
[86] Fix | Delete
* @param flags A combination of flags from the xcb_send_request_flags_t enumeration.
[87] Fix | Delete
* @param vector Data to send; must have two iovecs before start for internal use.
[88] Fix | Delete
* @param request Information about the request to be sent.
[89] Fix | Delete
* @param num_fds Number of additional file descriptors to send to the server
[90] Fix | Delete
* @param fds Additional file descriptors that should be send to the server.
[91] Fix | Delete
* @return The request's sequence number on success, 0 otherwise.
[92] Fix | Delete
*
[93] Fix | Delete
* This function sends a new request to the X server. The data of the request is
[94] Fix | Delete
* given as an array of @c iovecs in the @p vector argument. The length of that
[95] Fix | Delete
* array and the necessary management information are given in the @p request
[96] Fix | Delete
* argument.
[97] Fix | Delete
*
[98] Fix | Delete
* If @p num_fds is non-zero, @p fds points to an array of file descriptors that
[99] Fix | Delete
* will be sent to the X server along with this request. After this function
[100] Fix | Delete
* returns, all file descriptors sent are owned by xcb and will be closed
[101] Fix | Delete
* eventually.
[102] Fix | Delete
*
[103] Fix | Delete
* When this function returns, the request might or might not be sent already.
[104] Fix | Delete
* Use xcb_flush() to make sure that it really was sent.
[105] Fix | Delete
*
[106] Fix | Delete
* Please note that this function is not the preferred way for sending requests.
[107] Fix | Delete
*
[108] Fix | Delete
* Please note that xcb might use index -1 and -2 of the @p vector array internally,
[109] Fix | Delete
* so they must be valid!
[110] Fix | Delete
*/
[111] Fix | Delete
unsigned int xcb_send_request_with_fds(xcb_connection_t *c, int flags, struct iovec *vector,
[112] Fix | Delete
const xcb_protocol_request_t *request, unsigned int num_fds, int *fds);
[113] Fix | Delete
[114] Fix | Delete
/**
[115] Fix | Delete
* @brief Send a request to the server, with 64-bit sequence number returned.
[116] Fix | Delete
* @param c The connection to the X server.
[117] Fix | Delete
* @param flags A combination of flags from the xcb_send_request_flags_t enumeration.
[118] Fix | Delete
* @param vector Data to send; must have two iovecs before start for internal use.
[119] Fix | Delete
* @param request Information about the request to be sent.
[120] Fix | Delete
* @return The request's sequence number on success, 0 otherwise.
[121] Fix | Delete
*
[122] Fix | Delete
* This function sends a new request to the X server. The data of the request is
[123] Fix | Delete
* given as an array of @c iovecs in the @p vector argument. The length of that
[124] Fix | Delete
* array and the necessary management information are given in the @p request
[125] Fix | Delete
* argument.
[126] Fix | Delete
*
[127] Fix | Delete
* When this function returns, the request might or might not be sent already.
[128] Fix | Delete
* Use xcb_flush() to make sure that it really was sent.
[129] Fix | Delete
*
[130] Fix | Delete
* Please note that this function is not the preferred way for sending requests.
[131] Fix | Delete
* It's better to use the generated wrapper functions.
[132] Fix | Delete
*
[133] Fix | Delete
* Please note that xcb might use index -1 and -2 of the @p vector array internally,
[134] Fix | Delete
* so they must be valid!
[135] Fix | Delete
*/
[136] Fix | Delete
uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request);
[137] Fix | Delete
[138] Fix | Delete
/**
[139] Fix | Delete
* @brief Send a request to the server, with 64-bit sequence number returned.
[140] Fix | Delete
* @param c The connection to the X server.
[141] Fix | Delete
* @param flags A combination of flags from the xcb_send_request_flags_t enumeration.
[142] Fix | Delete
* @param vector Data to send; must have two iovecs before start for internal use.
[143] Fix | Delete
* @param request Information about the request to be sent.
[144] Fix | Delete
* @param num_fds Number of additional file descriptors to send to the server
[145] Fix | Delete
* @param fds Additional file descriptors that should be send to the server.
[146] Fix | Delete
* @return The request's sequence number on success, 0 otherwise.
[147] Fix | Delete
*
[148] Fix | Delete
* This function sends a new request to the X server. The data of the request is
[149] Fix | Delete
* given as an array of @c iovecs in the @p vector argument. The length of that
[150] Fix | Delete
* array and the necessary management information are given in the @p request
[151] Fix | Delete
* argument.
[152] Fix | Delete
*
[153] Fix | Delete
* If @p num_fds is non-zero, @p fds points to an array of file descriptors that
[154] Fix | Delete
* will be sent to the X server along with this request. After this function
[155] Fix | Delete
* returns, all file descriptors sent are owned by xcb and will be closed
[156] Fix | Delete
* eventually.
[157] Fix | Delete
*
[158] Fix | Delete
* When this function returns, the request might or might not be sent already.
[159] Fix | Delete
* Use xcb_flush() to make sure that it really was sent.
[160] Fix | Delete
*
[161] Fix | Delete
* Please note that this function is not the preferred way for sending requests.
[162] Fix | Delete
* It's better to use the generated wrapper functions.
[163] Fix | Delete
*
[164] Fix | Delete
* Please note that xcb might use index -1 and -2 of the @p vector array internally,
[165] Fix | Delete
* so they must be valid!
[166] Fix | Delete
*/
[167] Fix | Delete
uint64_t xcb_send_request_with_fds64(xcb_connection_t *c, int flags, struct iovec *vector,
[168] Fix | Delete
const xcb_protocol_request_t *request, unsigned int num_fds, int *fds);
[169] Fix | Delete
[170] Fix | Delete
/**
[171] Fix | Delete
* @brief Send a file descriptor to the server in the next call to xcb_send_request.
[172] Fix | Delete
* @param c The connection to the X server.
[173] Fix | Delete
* @param fd The file descriptor to send.
[174] Fix | Delete
*
[175] Fix | Delete
* After this function returns, the file descriptor given is owned by xcb and
[176] Fix | Delete
* will be closed eventually.
[177] Fix | Delete
*
[178] Fix | Delete
* @deprecated This function cannot be used in a thread-safe way. Two threads
[179] Fix | Delete
* that run xcb_send_fd(); xcb_send_request(); could mix up their file
[180] Fix | Delete
* descriptors. Instead, xcb_send_request_with_fds() should be used.
[181] Fix | Delete
*/
[182] Fix | Delete
void xcb_send_fd(xcb_connection_t *c, int fd);
[183] Fix | Delete
[184] Fix | Delete
/**
[185] Fix | Delete
* @brief Take over the write side of the socket
[186] Fix | Delete
* @param c The connection to the X server.
[187] Fix | Delete
* @param return_socket Callback function that will be called when xcb wants
[188] Fix | Delete
* to use the socket again.
[189] Fix | Delete
* @param closure Argument to the callback function.
[190] Fix | Delete
* @param flags A combination of flags from the xcb_send_request_flags_t enumeration.
[191] Fix | Delete
* @param sent Location to the sequence number of the last sequence request.
[192] Fix | Delete
* Must not be NULL.
[193] Fix | Delete
* @return 1 on success, else 0.
[194] Fix | Delete
*
[195] Fix | Delete
* xcb_take_socket allows external code to ask XCB for permission to
[196] Fix | Delete
* take over the write side of the socket and send raw data with
[197] Fix | Delete
* xcb_writev. xcb_take_socket provides the sequence number of the last
[198] Fix | Delete
* request XCB sent. The caller of xcb_take_socket must supply a
[199] Fix | Delete
* callback which XCB can call when it wants the write side of the
[200] Fix | Delete
* socket back to make a request. This callback synchronizes with the
[201] Fix | Delete
* external socket owner and flushes any output queues if appropriate.
[202] Fix | Delete
* If you are sending requests which won't cause a reply, please note the
[203] Fix | Delete
* comment for xcb_writev which explains some sequence number wrap issues.
[204] Fix | Delete
*
[205] Fix | Delete
* All replies that are generated while the socket is owned externally have
[206] Fix | Delete
* @p flags applied to them. For example, use XCB_REQUEST_CHECK if you don't
[207] Fix | Delete
* want errors to go to xcb's normal error handling, but instead having to be
[208] Fix | Delete
* picked up via xcb_wait_for_reply(), xcb_poll_for_reply() or
[209] Fix | Delete
* xcb_request_check().
[210] Fix | Delete
*/
[211] Fix | Delete
int xcb_take_socket(xcb_connection_t *c, void (*return_socket)(void *closure), void *closure, int flags, uint64_t *sent);
[212] Fix | Delete
[213] Fix | Delete
/**
[214] Fix | Delete
* @brief Send raw data to the X server.
[215] Fix | Delete
* @param c The connection to the X server.
[216] Fix | Delete
* @param vector Array of data to be sent.
[217] Fix | Delete
* @param count Number of entries in @p vector.
[218] Fix | Delete
* @param requests Number of requests that are being sent.
[219] Fix | Delete
* @return 1 on success, else 0.
[220] Fix | Delete
*
[221] Fix | Delete
* You must own the write-side of the socket (you've called
[222] Fix | Delete
* xcb_take_socket, and haven't returned from return_socket yet) to call
[223] Fix | Delete
* xcb_writev. Also, the iovec must have at least 1 byte of data in it.
[224] Fix | Delete
* You have to make sure that xcb can detect sequence number wraps correctly.
[225] Fix | Delete
* This means that the first request you send after xcb_take_socket must cause a
[226] Fix | Delete
* reply (e.g. just insert a GetInputFocus request). After every (1 << 16) - 1
[227] Fix | Delete
* requests without a reply, you have to insert a request which will cause a
[228] Fix | Delete
* reply. You can again use GetInputFocus for this. You do not have to wait for
[229] Fix | Delete
* any of the GetInputFocus replies, but can instead handle them via
[230] Fix | Delete
* xcb_discard_reply().
[231] Fix | Delete
*/
[232] Fix | Delete
int xcb_writev(xcb_connection_t *c, struct iovec *vector, int count, uint64_t requests);
[233] Fix | Delete
[234] Fix | Delete
[235] Fix | Delete
/* xcb_in.c */
[236] Fix | Delete
[237] Fix | Delete
/**
[238] Fix | Delete
* @brief Wait for the reply of a given request.
[239] Fix | Delete
* @param c The connection to the X server.
[240] Fix | Delete
* @param request Sequence number of the request as returned by xcb_send_request().
[241] Fix | Delete
* @param e Location to store errors in, or NULL. Ignored for unchecked requests.
[242] Fix | Delete
*
[243] Fix | Delete
* Returns the reply to the given request or returns null in the event of
[244] Fix | Delete
* errors. Blocks until the reply or error for the request arrives, or an I/O
[245] Fix | Delete
* error occurs.
[246] Fix | Delete
*/
[247] Fix | Delete
void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_error_t **e);
[248] Fix | Delete
[249] Fix | Delete
/**
[250] Fix | Delete
* @brief Wait for the reply of a given request, with 64-bit sequence number
[251] Fix | Delete
* @param c The connection to the X server.
[252] Fix | Delete
* @param request 64-bit sequence number of the request as returned by xcb_send_request64().
[253] Fix | Delete
* @param e Location to store errors in, or NULL. Ignored for unchecked requests.
[254] Fix | Delete
*
[255] Fix | Delete
* Returns the reply to the given request or returns null in the event of
[256] Fix | Delete
* errors. Blocks until the reply or error for the request arrives, or an I/O
[257] Fix | Delete
* error occurs.
[258] Fix | Delete
*
[259] Fix | Delete
* Unlike its xcb_wait_for_reply() counterpart, the given sequence number is not
[260] Fix | Delete
* automatically "widened" to 64-bit.
[261] Fix | Delete
*/
[262] Fix | Delete
void *xcb_wait_for_reply64(xcb_connection_t *c, uint64_t request, xcb_generic_error_t **e);
[263] Fix | Delete
[264] Fix | Delete
/**
[265] Fix | Delete
* @brief Poll for the reply of a given request.
[266] Fix | Delete
* @param c The connection to the X server.
[267] Fix | Delete
* @param request Sequence number of the request as returned by xcb_send_request().
[268] Fix | Delete
* @param reply Location to store the reply in, must not be NULL.
[269] Fix | Delete
* @param error Location to store errors in, or NULL. Ignored for unchecked requests.
[270] Fix | Delete
* @return 1 when the reply to the request was returned, else 0.
[271] Fix | Delete
*
[272] Fix | Delete
* Checks if the reply to the given request already received. Does not block.
[273] Fix | Delete
*/
[274] Fix | Delete
int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, xcb_generic_error_t **error);
[275] Fix | Delete
[276] Fix | Delete
/**
[277] Fix | Delete
* @brief Poll for the reply of a given request, with 64-bit sequence number.
[278] Fix | Delete
* @param c The connection to the X server.
[279] Fix | Delete
* @param request 64-bit sequence number of the request as returned by xcb_send_request().
[280] Fix | Delete
* @param reply Location to store the reply in, must not be NULL.
[281] Fix | Delete
* @param error Location to store errors in, or NULL. Ignored for unchecked requests.
[282] Fix | Delete
* @return 1 when the reply to the request was returned, else 0.
[283] Fix | Delete
*
[284] Fix | Delete
* Checks if the reply to the given request already received. Does not block.
[285] Fix | Delete
*
[286] Fix | Delete
* Unlike its xcb_poll_for_reply() counterpart, the given sequence number is not
[287] Fix | Delete
* automatically "widened" to 64-bit.
[288] Fix | Delete
*/
[289] Fix | Delete
int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xcb_generic_error_t **error);
[290] Fix | Delete
[291] Fix | Delete
/**
[292] Fix | Delete
* @brief Don't use this, only needed by the generated code.
[293] Fix | Delete
* @param c The connection to the X server.
[294] Fix | Delete
* @param reply A reply that was received from the server
[295] Fix | Delete
* @param replylen The size of the reply.
[296] Fix | Delete
* @return Pointer to the location where received file descriptors are stored.
[297] Fix | Delete
*/
[298] Fix | Delete
int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t replylen);
[299] Fix | Delete
[300] Fix | Delete
[301] Fix | Delete
/* xcb_util.c */
[302] Fix | Delete
[303] Fix | Delete
/**
[304] Fix | Delete
* @param mask The mask to check
[305] Fix | Delete
* @return The number of set bits in the mask
[306] Fix | Delete
*/
[307] Fix | Delete
int xcb_popcount(uint32_t mask);
[308] Fix | Delete
[309] Fix | Delete
/**
[310] Fix | Delete
* @param list The base of an array
[311] Fix | Delete
* @param len The length of the array
[312] Fix | Delete
* @return The sum of all entries in the array.
[313] Fix | Delete
*/
[314] Fix | Delete
int xcb_sumof(uint8_t *list, int len);
[315] Fix | Delete
[316] Fix | Delete
#ifdef __cplusplus
[317] Fix | Delete
}
[318] Fix | Delete
#endif
[319] Fix | Delete
[320] Fix | Delete
#endif
[321] Fix | Delete
[322] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function