Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/X11
File: Xlibint.h
[0] Fix | Delete
/*
[1] Fix | Delete
[2] Fix | Delete
Copyright 1984, 1985, 1987, 1989, 1998 The Open Group
[3] Fix | Delete
[4] Fix | Delete
Permission to use, copy, modify, distribute, and sell this software and its
[5] Fix | Delete
documentation for any purpose is hereby granted without fee, provided that
[6] Fix | Delete
the above copyright notice appear in all copies and that both that
[7] Fix | Delete
copyright notice and this permission notice appear in supporting
[8] Fix | Delete
documentation.
[9] Fix | Delete
[10] Fix | Delete
The above copyright notice and this permission notice shall be included
[11] Fix | Delete
in 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
[14] Fix | Delete
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
[15] Fix | Delete
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
[16] Fix | Delete
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
[17] Fix | Delete
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
[18] Fix | Delete
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
[19] Fix | Delete
OTHER DEALINGS IN THE SOFTWARE.
[20] Fix | Delete
[21] Fix | Delete
Except as contained in this notice, the name of The Open Group shall
[22] Fix | Delete
not be used in advertising or otherwise to promote the sale, use or
[23] Fix | Delete
other dealings in this Software without prior written authorization
[24] Fix | Delete
from The Open Group.
[25] Fix | Delete
[26] Fix | Delete
*/
[27] Fix | Delete
[28] Fix | Delete
#ifndef _X11_XLIBINT_H_
[29] Fix | Delete
#define _X11_XLIBINT_H_ 1
[30] Fix | Delete
[31] Fix | Delete
/*
[32] Fix | Delete
* Xlibint.h - Header definition and support file for the internal
[33] Fix | Delete
* support routines used by the C subroutine interface
[34] Fix | Delete
* library (Xlib) to the X Window System.
[35] Fix | Delete
*
[36] Fix | Delete
* Warning, there be dragons here....
[37] Fix | Delete
*/
[38] Fix | Delete
[39] Fix | Delete
#include <stdint.h>
[40] Fix | Delete
#include <X11/Xlib.h>
[41] Fix | Delete
#include <X11/Xproto.h> /* to declare xEvent */
[42] Fix | Delete
#include <X11/XlibConf.h> /* for configured options like XTHREADS */
[43] Fix | Delete
[44] Fix | Delete
/* The Xlib structs are full of implicit padding to properly align members.
[45] Fix | Delete
We can't clean that up without breaking ABI, so tell clang not to bother
[46] Fix | Delete
complaining about it. */
[47] Fix | Delete
#ifdef __clang__
[48] Fix | Delete
#pragma clang diagnostic push
[49] Fix | Delete
#pragma clang diagnostic ignored "-Wpadded"
[50] Fix | Delete
#endif
[51] Fix | Delete
[52] Fix | Delete
#ifdef WIN32
[53] Fix | Delete
#define _XFlush _XFlushIt
[54] Fix | Delete
#endif
[55] Fix | Delete
[56] Fix | Delete
struct _XGC
[57] Fix | Delete
{
[58] Fix | Delete
XExtData *ext_data; /* hook for extension to hang data */
[59] Fix | Delete
GContext gid; /* protocol ID for graphics context */
[60] Fix | Delete
Bool rects; /* boolean: TRUE if clipmask is list of rectangles */
[61] Fix | Delete
Bool dashes; /* boolean: TRUE if dash-list is really a list */
[62] Fix | Delete
unsigned long dirty;/* cache dirty bits */
[63] Fix | Delete
XGCValues values; /* shadow structure of values */
[64] Fix | Delete
};
[65] Fix | Delete
[66] Fix | Delete
struct _XDisplay
[67] Fix | Delete
{
[68] Fix | Delete
XExtData *ext_data; /* hook for extension to hang data */
[69] Fix | Delete
struct _XFreeFuncs *free_funcs; /* internal free functions */
[70] Fix | Delete
int fd; /* Network socket. */
[71] Fix | Delete
int conn_checker; /* ugly thing used by _XEventsQueued */
[72] Fix | Delete
int proto_major_version;/* maj. version of server's X protocol */
[73] Fix | Delete
int proto_minor_version;/* minor version of server's X protocol */
[74] Fix | Delete
char *vendor; /* vendor of the server hardware */
[75] Fix | Delete
XID resource_base; /* resource ID base */
[76] Fix | Delete
XID resource_mask; /* resource ID mask bits */
[77] Fix | Delete
XID resource_id; /* allocator current ID */
[78] Fix | Delete
int resource_shift; /* allocator shift to correct bits */
[79] Fix | Delete
XID (*resource_alloc)( /* allocator function */
[80] Fix | Delete
struct _XDisplay*
[81] Fix | Delete
);
[82] Fix | Delete
int byte_order; /* screen byte order, LSBFirst, MSBFirst */
[83] Fix | Delete
int bitmap_unit; /* padding and data requirements */
[84] Fix | Delete
int bitmap_pad; /* padding requirements on bitmaps */
[85] Fix | Delete
int bitmap_bit_order; /* LeastSignificant or MostSignificant */
[86] Fix | Delete
int nformats; /* number of pixmap formats in list */
[87] Fix | Delete
ScreenFormat *pixmap_format; /* pixmap format list */
[88] Fix | Delete
int vnumber; /* Xlib's X protocol version number. */
[89] Fix | Delete
int release; /* release of the server */
[90] Fix | Delete
struct _XSQEvent *head, *tail; /* Input event queue. */
[91] Fix | Delete
int qlen; /* Length of input event queue */
[92] Fix | Delete
unsigned long last_request_read; /* seq number of last event read */
[93] Fix | Delete
unsigned long request; /* sequence number of last request. */
[94] Fix | Delete
char *last_req; /* beginning of last request, or dummy */
[95] Fix | Delete
char *buffer; /* Output buffer starting address. */
[96] Fix | Delete
char *bufptr; /* Output buffer index pointer. */
[97] Fix | Delete
char *bufmax; /* Output buffer maximum+1 address. */
[98] Fix | Delete
unsigned max_request_size; /* maximum number 32 bit words in request*/
[99] Fix | Delete
struct _XrmHashBucketRec *db;
[100] Fix | Delete
int (*synchandler)( /* Synchronization handler */
[101] Fix | Delete
struct _XDisplay*
[102] Fix | Delete
);
[103] Fix | Delete
char *display_name; /* "host:display" string used on this connect*/
[104] Fix | Delete
int default_screen; /* default screen for operations */
[105] Fix | Delete
int nscreens; /* number of screens on this server*/
[106] Fix | Delete
Screen *screens; /* pointer to list of screens */
[107] Fix | Delete
unsigned long motion_buffer; /* size of motion buffer */
[108] Fix | Delete
volatile unsigned long flags; /* internal connection flags */
[109] Fix | Delete
int min_keycode; /* minimum defined keycode */
[110] Fix | Delete
int max_keycode; /* maximum defined keycode */
[111] Fix | Delete
KeySym *keysyms; /* This server's keysyms */
[112] Fix | Delete
XModifierKeymap *modifiermap; /* This server's modifier keymap */
[113] Fix | Delete
int keysyms_per_keycode;/* number of rows */
[114] Fix | Delete
char *xdefaults; /* contents of defaults from server */
[115] Fix | Delete
char *scratch_buffer; /* place to hang scratch buffer */
[116] Fix | Delete
unsigned long scratch_length; /* length of scratch buffer */
[117] Fix | Delete
int ext_number; /* extension number on this display */
[118] Fix | Delete
struct _XExten *ext_procs; /* extensions initialized on this display */
[119] Fix | Delete
/*
[120] Fix | Delete
* the following can be fixed size, as the protocol defines how
[121] Fix | Delete
* much address space is available.
[122] Fix | Delete
* While this could be done using the extension vector, there
[123] Fix | Delete
* may be MANY events processed, so a search through the extension
[124] Fix | Delete
* list to find the right procedure for each event might be
[125] Fix | Delete
* expensive if many extensions are being used.
[126] Fix | Delete
*/
[127] Fix | Delete
Bool (*event_vec[128])( /* vector for wire to event */
[128] Fix | Delete
Display * /* dpy */,
[129] Fix | Delete
XEvent * /* re */,
[130] Fix | Delete
xEvent * /* event */
[131] Fix | Delete
);
[132] Fix | Delete
Status (*wire_vec[128])( /* vector for event to wire */
[133] Fix | Delete
Display * /* dpy */,
[134] Fix | Delete
XEvent * /* re */,
[135] Fix | Delete
xEvent * /* event */
[136] Fix | Delete
);
[137] Fix | Delete
KeySym lock_meaning; /* for XLookupString */
[138] Fix | Delete
struct _XLockInfo *lock; /* multi-thread state, display lock */
[139] Fix | Delete
struct _XInternalAsync *async_handlers; /* for internal async */
[140] Fix | Delete
unsigned long bigreq_size; /* max size of big requests */
[141] Fix | Delete
struct _XLockPtrs *lock_fns; /* pointers to threads functions */
[142] Fix | Delete
void (*idlist_alloc)( /* XID list allocator function */
[143] Fix | Delete
Display * /* dpy */,
[144] Fix | Delete
XID * /* ids */,
[145] Fix | Delete
int /* count */
[146] Fix | Delete
);
[147] Fix | Delete
/* things above this line should not move, for binary compatibility */
[148] Fix | Delete
struct _XKeytrans *key_bindings; /* for XLookupString */
[149] Fix | Delete
Font cursor_font; /* for XCreateFontCursor */
[150] Fix | Delete
struct _XDisplayAtoms *atoms; /* for XInternAtom */
[151] Fix | Delete
unsigned int mode_switch; /* keyboard group modifiers */
[152] Fix | Delete
unsigned int num_lock; /* keyboard numlock modifiers */
[153] Fix | Delete
struct _XContextDB *context_db; /* context database */
[154] Fix | Delete
Bool (**error_vec)( /* vector for wire to error */
[155] Fix | Delete
Display * /* display */,
[156] Fix | Delete
XErrorEvent * /* he */,
[157] Fix | Delete
xError * /* we */
[158] Fix | Delete
);
[159] Fix | Delete
/*
[160] Fix | Delete
* Xcms information
[161] Fix | Delete
*/
[162] Fix | Delete
struct {
[163] Fix | Delete
XPointer defaultCCCs; /* pointer to an array of default XcmsCCC */
[164] Fix | Delete
XPointer clientCmaps; /* pointer to linked list of XcmsCmapRec */
[165] Fix | Delete
XPointer perVisualIntensityMaps;
[166] Fix | Delete
/* linked list of XcmsIntensityMap */
[167] Fix | Delete
} cms;
[168] Fix | Delete
struct _XIMFilter *im_filters;
[169] Fix | Delete
struct _XSQEvent *qfree; /* unallocated event queue elements */
[170] Fix | Delete
unsigned long next_event_serial_num; /* inserted into next queue elt */
[171] Fix | Delete
struct _XExten *flushes; /* Flush hooks */
[172] Fix | Delete
struct _XConnectionInfo *im_fd_info; /* _XRegisterInternalConnection */
[173] Fix | Delete
int im_fd_length; /* number of im_fd_info */
[174] Fix | Delete
struct _XConnWatchInfo *conn_watchers; /* XAddConnectionWatch */
[175] Fix | Delete
int watcher_count; /* number of conn_watchers */
[176] Fix | Delete
XPointer filedes; /* struct pollfd cache for _XWaitForReadable */
[177] Fix | Delete
int (*savedsynchandler)( /* user synchandler when Xlib usurps */
[178] Fix | Delete
Display * /* dpy */
[179] Fix | Delete
);
[180] Fix | Delete
XID resource_max; /* allocator max ID */
[181] Fix | Delete
int xcmisc_opcode; /* major opcode for XC-MISC */
[182] Fix | Delete
struct _XkbInfoRec *xkb_info; /* XKB info */
[183] Fix | Delete
struct _XtransConnInfo *trans_conn; /* transport connection object */
[184] Fix | Delete
struct _X11XCBPrivate *xcb; /* XCB glue private data */
[185] Fix | Delete
[186] Fix | Delete
/* Generic event cookie handling */
[187] Fix | Delete
unsigned int next_cookie; /* next event cookie */
[188] Fix | Delete
/* vector for wire to generic event, index is (extension - 128) */
[189] Fix | Delete
Bool (*generic_event_vec[128])(
[190] Fix | Delete
Display * /* dpy */,
[191] Fix | Delete
XGenericEventCookie * /* Xlib event */,
[192] Fix | Delete
xEvent * /* wire event */);
[193] Fix | Delete
/* vector for event copy, index is (extension - 128) */
[194] Fix | Delete
Bool (*generic_event_copy_vec[128])(
[195] Fix | Delete
Display * /* dpy */,
[196] Fix | Delete
XGenericEventCookie * /* in */,
[197] Fix | Delete
XGenericEventCookie * /* out*/);
[198] Fix | Delete
void *cookiejar; /* cookie events returned but not claimed */
[199] Fix | Delete
#ifndef LONG64
[200] Fix | Delete
unsigned long last_request_read_upper32bit;
[201] Fix | Delete
unsigned long request_upper32bit;
[202] Fix | Delete
#endif
[203] Fix | Delete
[204] Fix | Delete
struct _XErrorThreadInfo *error_threads;
[205] Fix | Delete
};
[206] Fix | Delete
[207] Fix | Delete
#define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)
[208] Fix | Delete
[209] Fix | Delete
/*
[210] Fix | Delete
* access "last_request_read" and "request" with 64bit
[211] Fix | Delete
* warning: the value argument of the SET-macros must not
[212] Fix | Delete
* have any side-effects because it may get called twice.
[213] Fix | Delete
*/
[214] Fix | Delete
#ifndef LONG64
[215] Fix | Delete
/* accessors for 32-bit unsigned long */
[216] Fix | Delete
[217] Fix | Delete
#define X_DPY_GET_REQUEST(dpy) \
[218] Fix | Delete
( \
[219] Fix | Delete
((uint64_t)(((struct _XDisplay*)dpy)->request)) \
[220] Fix | Delete
+ (((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) << 32) \
[221] Fix | Delete
)
[222] Fix | Delete
[223] Fix | Delete
#define X_DPY_SET_REQUEST(dpy, value) \
[224] Fix | Delete
( \
[225] Fix | Delete
(((struct _XDisplay*)dpy)->request = \
[226] Fix | Delete
(value) & 0xFFFFFFFFUL), \
[227] Fix | Delete
(((struct _XDisplay*)dpy)->request_upper32bit = \
[228] Fix | Delete
((uint64_t)(value)) >> 32), \
[229] Fix | Delete
(void)0 /* don't use the result */ \
[230] Fix | Delete
)
[231] Fix | Delete
[232] Fix | Delete
#define X_DPY_GET_LAST_REQUEST_READ(dpy) \
[233] Fix | Delete
( \
[234] Fix | Delete
((uint64_t)(((struct _XDisplay*)dpy)->last_request_read)) \
[235] Fix | Delete
+ ( \
[236] Fix | Delete
((uint64_t)( \
[237] Fix | Delete
((struct _XDisplay*)dpy)->last_request_read_upper32bit \
[238] Fix | Delete
)) << 32 \
[239] Fix | Delete
) \
[240] Fix | Delete
)
[241] Fix | Delete
[242] Fix | Delete
#define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \
[243] Fix | Delete
( \
[244] Fix | Delete
(((struct _XDisplay*)dpy)->last_request_read = \
[245] Fix | Delete
(value) & 0xFFFFFFFFUL), \
[246] Fix | Delete
(((struct _XDisplay*)dpy)->last_request_read_upper32bit = \
[247] Fix | Delete
((uint64_t)(value)) >> 32), \
[248] Fix | Delete
(void)0 /* don't use the result */ \
[249] Fix | Delete
)
[250] Fix | Delete
[251] Fix | Delete
/*
[252] Fix | Delete
* widen a 32-bit sequence number to a 64 sequence number.
[253] Fix | Delete
* This macro makes the following assumptions:
[254] Fix | Delete
* - ulseq refers to a sequence that has already been sent
[255] Fix | Delete
* - ulseq means the most recent possible sequence number
[256] Fix | Delete
* with these lower 32 bits.
[257] Fix | Delete
*
[258] Fix | Delete
* The following optimization is used:
[259] Fix | Delete
* The comparison result is taken a 0 or 1 to avoid a branch.
[260] Fix | Delete
*/
[261] Fix | Delete
#define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) \
[262] Fix | Delete
( \
[263] Fix | Delete
((uint64_t)ulseq) \
[264] Fix | Delete
+ \
[265] Fix | Delete
(( \
[266] Fix | Delete
((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) \
[267] Fix | Delete
- (uint64_t)( \
[268] Fix | Delete
(ulseq) > (((struct _XDisplay*)dpy)->request) \
[269] Fix | Delete
) \
[270] Fix | Delete
) << 32) \
[271] Fix | Delete
)
[272] Fix | Delete
[273] Fix | Delete
#define X_DPY_REQUEST_INCREMENT(dpy) \
[274] Fix | Delete
( \
[275] Fix | Delete
((struct _XDisplay*)dpy)->request++, \
[276] Fix | Delete
( \
[277] Fix | Delete
(((struct _XDisplay*)dpy)->request == 0) ? ( \
[278] Fix | Delete
((struct _XDisplay*)dpy)->request_upper32bit++ \
[279] Fix | Delete
) : 0 \
[280] Fix | Delete
), \
[281] Fix | Delete
(void)0 /* don't use the result */ \
[282] Fix | Delete
)
[283] Fix | Delete
[284] Fix | Delete
[285] Fix | Delete
#define X_DPY_REQUEST_DECREMENT(dpy) \
[286] Fix | Delete
( \
[287] Fix | Delete
( \
[288] Fix | Delete
(((struct _XDisplay*)dpy)->request == 0) ? (\
[289] Fix | Delete
((struct _XDisplay*)dpy)->request--, /* wrap */ \
[290] Fix | Delete
((struct _XDisplay*)dpy)->request_upper32bit-- \
[291] Fix | Delete
) : ( \
[292] Fix | Delete
((struct _XDisplay*)dpy)->request-- \
[293] Fix | Delete
) \
[294] Fix | Delete
), \
[295] Fix | Delete
(void)0 /* don't use the result */ \
[296] Fix | Delete
)
[297] Fix | Delete
[298] Fix | Delete
#else
[299] Fix | Delete
/* accessors for 64-bit unsigned long */
[300] Fix | Delete
#define X_DPY_GET_REQUEST(dpy) \
[301] Fix | Delete
(((struct _XDisplay*)dpy)->request)
[302] Fix | Delete
#define X_DPY_SET_REQUEST(dpy, value) \
[303] Fix | Delete
((struct _XDisplay*)dpy)->request = (value)
[304] Fix | Delete
[305] Fix | Delete
#define X_DPY_GET_LAST_REQUEST_READ(dpy) \
[306] Fix | Delete
(((struct _XDisplay*)dpy)->last_request_read)
[307] Fix | Delete
#define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \
[308] Fix | Delete
((struct _XDisplay*)dpy)->last_request_read = (value)
[309] Fix | Delete
[310] Fix | Delete
#define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) ulseq
[311] Fix | Delete
[312] Fix | Delete
#define X_DPY_REQUEST_INCREMENT(dpy) ((struct _XDisplay*)dpy)->request++
[313] Fix | Delete
#define X_DPY_REQUEST_DECREMENT(dpy) ((struct _XDisplay*)dpy)->request--
[314] Fix | Delete
#endif
[315] Fix | Delete
[316] Fix | Delete
[317] Fix | Delete
#ifndef _XEVENT_
[318] Fix | Delete
/*
[319] Fix | Delete
* _QEvent datatype for use in input queueing.
[320] Fix | Delete
*/
[321] Fix | Delete
typedef struct _XSQEvent
[322] Fix | Delete
{
[323] Fix | Delete
struct _XSQEvent *next;
[324] Fix | Delete
XEvent event;
[325] Fix | Delete
unsigned long qserial_num; /* so multi-threaded code can find new ones */
[326] Fix | Delete
} _XQEvent;
[327] Fix | Delete
#endif
[328] Fix | Delete
[329] Fix | Delete
#include <X11/Xproto.h>
[330] Fix | Delete
#ifdef __sgi
[331] Fix | Delete
#define _SGI_MP_SOURCE /* turn this on to get MP safe errno */
[332] Fix | Delete
#endif
[333] Fix | Delete
#include <errno.h>
[334] Fix | Delete
#define _XBCOPYFUNC _Xbcopy
[335] Fix | Delete
#include <X11/Xfuncs.h>
[336] Fix | Delete
#include <X11/Xosdefs.h>
[337] Fix | Delete
[338] Fix | Delete
/* Utek leaves kernel macros around in include files (bleah) */
[339] Fix | Delete
#ifdef dirty
[340] Fix | Delete
#undef dirty
[341] Fix | Delete
#endif
[342] Fix | Delete
[343] Fix | Delete
#include <stdlib.h>
[344] Fix | Delete
#include <string.h>
[345] Fix | Delete
[346] Fix | Delete
#include <X11/Xfuncproto.h>
[347] Fix | Delete
[348] Fix | Delete
_XFUNCPROTOBEGIN
[349] Fix | Delete
[350] Fix | Delete
/*
[351] Fix | Delete
* The following definitions can be used for locking requests in multi-threaded
[352] Fix | Delete
* address spaces.
[353] Fix | Delete
*/
[354] Fix | Delete
#ifdef XTHREADS
[355] Fix | Delete
/* Author: Stephen Gildea, MIT X Consortium
[356] Fix | Delete
*
[357] Fix | Delete
* declarations for C Threads locking
[358] Fix | Delete
*/
[359] Fix | Delete
[360] Fix | Delete
typedef struct _LockInfoRec *LockInfoPtr;
[361] Fix | Delete
[362] Fix | Delete
/* interfaces for locking.c */
[363] Fix | Delete
struct _XLockPtrs {
[364] Fix | Delete
/* used by all, including extensions; do not move */
[365] Fix | Delete
void (*lock_display)(
[366] Fix | Delete
Display *dpy
[367] Fix | Delete
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
[368] Fix | Delete
, char *file
[369] Fix | Delete
, int line
[370] Fix | Delete
#endif
[371] Fix | Delete
);
[372] Fix | Delete
void (*unlock_display)(
[373] Fix | Delete
Display *dpy
[374] Fix | Delete
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
[375] Fix | Delete
, char *file
[376] Fix | Delete
, int line
[377] Fix | Delete
#endif
[378] Fix | Delete
);
[379] Fix | Delete
};
[380] Fix | Delete
[381] Fix | Delete
#if defined(WIN32) && !defined(_XLIBINT_)
[382] Fix | Delete
#define _XCreateMutex_fn (*_XCreateMutex_fn_p)
[383] Fix | Delete
#define _XFreeMutex_fn (*_XFreeMutex_fn_p)
[384] Fix | Delete
#define _XLockMutex_fn (*_XLockMutex_fn_p)
[385] Fix | Delete
#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p)
[386] Fix | Delete
#define _Xglobal_lock (*_Xglobal_lock_p)
[387] Fix | Delete
#endif
[388] Fix | Delete
[389] Fix | Delete
/* in XlibInt.c */
[390] Fix | Delete
extern void (*_XCreateMutex_fn)(
[391] Fix | Delete
LockInfoPtr /* lock */
[392] Fix | Delete
);
[393] Fix | Delete
extern void (*_XFreeMutex_fn)(
[394] Fix | Delete
LockInfoPtr /* lock */
[395] Fix | Delete
);
[396] Fix | Delete
extern void (*_XLockMutex_fn)(
[397] Fix | Delete
LockInfoPtr /* lock */
[398] Fix | Delete
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
[399] Fix | Delete
, char * /* file */
[400] Fix | Delete
, int /* line */
[401] Fix | Delete
#endif
[402] Fix | Delete
);
[403] Fix | Delete
extern void (*_XUnlockMutex_fn)(
[404] Fix | Delete
LockInfoPtr /* lock */
[405] Fix | Delete
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
[406] Fix | Delete
, char * /* file */
[407] Fix | Delete
, int /* line */
[408] Fix | Delete
#endif
[409] Fix | Delete
);
[410] Fix | Delete
[411] Fix | Delete
extern LockInfoPtr _Xglobal_lock;
[412] Fix | Delete
[413] Fix | Delete
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
[414] Fix | Delete
#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)((d),__FILE__,__LINE__)
[415] Fix | Delete
#define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)((d),__FILE__,__LINE__)
[416] Fix | Delete
#define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock,__FILE__,__LINE__)
[417] Fix | Delete
#define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock,__FILE__,__LINE__)
[418] Fix | Delete
#else
[419] Fix | Delete
/* used everywhere, so must be fast if not using threads */
[420] Fix | Delete
#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)(d)
[421] Fix | Delete
#define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)(d)
[422] Fix | Delete
#define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock)
[423] Fix | Delete
#define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock)
[424] Fix | Delete
#endif
[425] Fix | Delete
#define _XCreateMutex(lock) if (_XCreateMutex_fn) (*_XCreateMutex_fn)(lock);
[426] Fix | Delete
#define _XFreeMutex(lock) if (_XFreeMutex_fn) (*_XFreeMutex_fn)(lock);
[427] Fix | Delete
[428] Fix | Delete
#else /* XTHREADS */
[429] Fix | Delete
#define LockDisplay(dis)
[430] Fix | Delete
#define _XLockMutex(lock)
[431] Fix | Delete
#define _XUnlockMutex(lock)
[432] Fix | Delete
#define UnlockDisplay(dis)
[433] Fix | Delete
#define _XCreateMutex(lock)
[434] Fix | Delete
#define _XFreeMutex(lock)
[435] Fix | Delete
#endif
[436] Fix | Delete
[437] Fix | Delete
#define Xfree(ptr) free((ptr))
[438] Fix | Delete
[439] Fix | Delete
/*
[440] Fix | Delete
* Note that some machines do not return a valid pointer for malloc(0), in
[441] Fix | Delete
* which case we provide an alternate under the control of the
[442] Fix | Delete
* define MALLOC_0_RETURNS_NULL. This is necessary because some
[443] Fix | Delete
* Xlib code expects malloc(0) to return a valid pointer to storage.
[444] Fix | Delete
*/
[445] Fix | Delete
#if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__)
[446] Fix | Delete
[447] Fix | Delete
# define Xmalloc(size) malloc(((size) == 0 ? 1 : (size)))
[448] Fix | Delete
# define Xrealloc(ptr, size) realloc((ptr), ((size) == 0 ? 1 : (size)))
[449] Fix | Delete
# define Xcalloc(nelem, elsize) calloc(((nelem) == 0 ? 1 : (nelem)), (elsize))
[450] Fix | Delete
[451] Fix | Delete
#else
[452] Fix | Delete
[453] Fix | Delete
# define Xmalloc(size) malloc((size))
[454] Fix | Delete
# define Xrealloc(ptr, size) realloc((ptr), (size))
[455] Fix | Delete
# define Xcalloc(nelem, elsize) calloc((nelem), (elsize))
[456] Fix | Delete
[457] Fix | Delete
#endif
[458] Fix | Delete
[459] Fix | Delete
#include <stddef.h>
[460] Fix | Delete
[461] Fix | Delete
#define LOCKED 1
[462] Fix | Delete
#define UNLOCKED 0
[463] Fix | Delete
[464] Fix | Delete
#ifndef BUFSIZE
[465] Fix | Delete
#define BUFSIZE 2048 /* X output buffer size. */
[466] Fix | Delete
#endif
[467] Fix | Delete
#ifndef PTSPERBATCH
[468] Fix | Delete
#define PTSPERBATCH 1024 /* point batching */
[469] Fix | Delete
#endif
[470] Fix | Delete
#ifndef WLNSPERBATCH
[471] Fix | Delete
#define WLNSPERBATCH 50 /* wide line batching */
[472] Fix | Delete
#endif
[473] Fix | Delete
#ifndef ZLNSPERBATCH
[474] Fix | Delete
#define ZLNSPERBATCH 1024 /* thin line batching */
[475] Fix | Delete
#endif
[476] Fix | Delete
#ifndef WRCTSPERBATCH
[477] Fix | Delete
#define WRCTSPERBATCH 10 /* wide line rectangle batching */
[478] Fix | Delete
#endif
[479] Fix | Delete
#ifndef ZRCTSPERBATCH
[480] Fix | Delete
#define ZRCTSPERBATCH 256 /* thin line rectangle batching */
[481] Fix | Delete
#endif
[482] Fix | Delete
#ifndef FRCTSPERBATCH
[483] Fix | Delete
#define FRCTSPERBATCH 256 /* filled rectangle batching */
[484] Fix | Delete
#endif
[485] Fix | Delete
#ifndef FARCSPERBATCH
[486] Fix | Delete
#define FARCSPERBATCH 256 /* filled arc batching */
[487] Fix | Delete
#endif
[488] Fix | Delete
#ifndef CURSORFONT
[489] Fix | Delete
#define CURSORFONT "cursor" /* standard cursor fonts */
[490] Fix | Delete
#endif
[491] Fix | Delete
[492] Fix | Delete
/*
[493] Fix | Delete
* Display flags
[494] Fix | Delete
*/
[495] Fix | Delete
#define XlibDisplayIOError (1L << 0)
[496] Fix | Delete
#define XlibDisplayClosing (1L << 1)
[497] Fix | Delete
#define XlibDisplayNoXkb (1L << 2)
[498] Fix | Delete
#define XlibDisplayPrivSync (1L << 3)
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function