PK NzFZ�q�o� � CallbackI.hnu �[��� /***********************************************************
Copyright 1987, 1988, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/****************************************************************
*
* Callbacks
*
****************************************************************/
typedef XrmResource **CallbackTable;
#define _XtCBCalling 1
#define _XtCBFreeAfterCalling 2
_XFUNCPROTOBEGIN
typedef struct internalCallbackRec {
unsigned short count;
char is_padded; /* contains NULL padding for external form */
char call_state; /* combination of _XtCB{FreeAfter}Calling */
#ifdef LONG64
unsigned int align_pad; /* padding to align callback list */
#endif
/* XtCallbackList */
} InternalCallbackRec, *InternalCallbackList;
typedef Boolean (*_XtConditionProc)(
XtPointer /* data */
);
extern void _XtAddCallback(
InternalCallbackList* /* callbacks */,
XtCallbackProc /* callback */,
XtPointer /* closure */
);
extern void _XtAddCallbackOnce(
InternalCallbackList* /* callbacks */,
XtCallbackProc /* callback */,
XtPointer /* closure */
);
extern InternalCallbackList _XtCompileCallbackList(
XtCallbackList /* xtcallbacks */
);
extern XtCallbackList _XtGetCallbackList(
InternalCallbackList* /* callbacks */
);
extern void _XtRemoveAllCallbacks(
InternalCallbackList* /* callbacks */
);
extern void _XtRemoveCallback(
InternalCallbackList* /* callbacks */,
XtCallbackProc /* callback */,
XtPointer /* closure */
);
extern void _XtPeekCallback(
Widget /* widget */,
XtCallbackList /* callbacks */,
XtCallbackProc * /* callback */,
XtPointer * /* closure */
);
extern void _XtCallConditionalCallbackList(
Widget /* widget */,
XtCallbackList /* callbacks */,
XtPointer /* call_data */,
_XtConditionProc /* cond_proc */
);
_XFUNCPROTOEND
PK NzFZYΊ)k k Xtos.hnu �[��� /***********************************************************
Copyright 1987, 1988, 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
#ifndef _Xtos_h
#define _Xtos_h
#define ALLOCATE_LOCAL_FALLBACK(_size) XtMalloc((unsigned long)(_size))
#define DEALLOCATE_LOCAL_FALLBACK(_ptr) XtFree((XtPointer)(_ptr))
#include <X11/Xalloca.h>
#if defined (_LP64) || \
defined(__alpha) || defined(__alpha__) || \
defined(__ia64__) || defined(ia64) || \
defined(__sparc64__) || \
defined(__s390x__) || \
(defined(__hppa__) && defined(__LP64__)) || \
defined(__amd64__) || defined(amd64) || \
defined(__powerpc64__) || \
(defined(sgi) && (_MIPS_SZLONG == 64))
#define LONG64
#endif
#endif /* _Xtos_h */
/* DON'T ADD STUFF AFTER THIS #endif */
PK NzFZ�m�̦ � IntrinsicI.hnu �[��� /***********************************************************
Copyright 1987, 1988, 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
#ifndef _XtintrinsicI_h
#define _XtintrinsicI_h
#include "Xtos.h"
#include "IntrinsicP.h"
#ifdef WIN32
#define _WILLWINSOCK_
#endif
#include <X11/Xos.h>
#include "Object.h"
#include "RectObj.h"
#include "ObjectP.h"
#include "RectObjP.h"
#include "ConvertI.h"
#include "TranslateI.h"
#define RectObjClassFlag 0x02
#define WidgetClassFlag 0x04
#define CompositeClassFlag 0x08
#define ConstraintClassFlag 0x10
#define ShellClassFlag 0x20
#define WMShellClassFlag 0x40
#define TopLevelClassFlag 0x80
/*
* The following macros, though very handy, are not suitable for
* IntrinsicP.h as they violate the rule that arguments are to
* be evaluated exactly once.
*/
#define XtDisplayOfObject(object) \
(XtIsWidget(object) ? (object)->core.screen->display : \
_XtIsHookObject(object) ? ((HookObject)(object))->hooks.screen->display : \
_XtWindowedAncestor(object)->core.screen->display)
#define XtScreenOfObject(object) \
(XtIsWidget(object) ? (object)->core.screen : \
_XtIsHookObject(object) ? ((HookObject)(object))->hooks.screen : \
_XtWindowedAncestor(object)->core.screen)
#define XtWindowOfObject(object) \
((XtIsWidget(object) ? (object) : _XtWindowedAncestor(object)) \
->core.window)
#define XtIsManaged(object) \
(XtIsRectObj(object) ? (object)->core.managed : False)
#define XtIsSensitive(object) \
(XtIsRectObj(object) ? ((object)->core.sensitive && \
(object)->core.ancestor_sensitive) : False)
/****************************************************************
*
* Byte utilities
*
****************************************************************/
#define _XBCOPYFUNC _XtBcopy
#include <X11/Xfuncs.h>
#define XtMemmove(dst, src, size) \
if ((char *)(dst) != (char *)(src)) { \
(void) memcpy((char *) (dst), (char *) (src), (size_t) (size)); \
}
#define XtBZero(dst, size) \
bzero((char *) (dst), (size_t) (size))
#define XtMemcmp(b1, b2, size) \
memcmp((char *) (b1), (char *) (b2), (size_t) (size))
/****************************************************************
*
* Stack cache allocation/free
*
****************************************************************/
#define XtStackAlloc(size, stack_cache_array) \
((size) <= sizeof(stack_cache_array) \
? (XtPointer)(stack_cache_array) \
: XtMalloc((unsigned)(size)))
#define XtStackFree(pointer, stack_cache_array) \
{ if ((pointer) != ((XtPointer)(stack_cache_array))) XtFree(pointer); }
/***************************************************************
*
* Filename defines
*
**************************************************************/
/* used by XtResolvePathname */
#ifndef XFILESEARCHPATHDEFAULT
#define XFILESEARCHPATHDEFAULT "/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S"
#endif
/* the following two were both "X Toolkit " prior to R4 */
#ifndef XTERROR_PREFIX
#define XTERROR_PREFIX ""
#endif
#ifndef XTWARNING_PREFIX
#define XTWARNING_PREFIX ""
#endif
#ifndef ERRORDB
#define ERRORDB "/usr/lib/X11/XtErrorDB"
#endif
_XFUNCPROTOBEGIN
extern String XtCXtToolkitError;
extern void _XtAllocError(
String /* alloc_type */
);
extern void _XtCompileResourceList(
XtResourceList /* resources */,
Cardinal /* num_resources */
);
extern XtGeometryResult _XtMakeGeometryRequest(
Widget /* widget */,
XtWidgetGeometry* /* request */,
XtWidgetGeometry* /* reply_return */,
Boolean* /* clear_rect_obj */
);
extern Boolean _XtIsHookObject(
Widget /* widget */
);
extern void _XtAddShellToHookObj(
Widget /* widget */
);
/* GCManager.c */
extern void _XtGClistFree(Display *dpy, XtPerDisplay pd);
/** GeoTattler stuff */
#ifdef XT_GEO_TATTLER
extern void _XtGeoTab (int);
extern void _XtGeoTrace (
Widget widget,
const char *,
...
) _X_ATTRIBUTE_PRINTF(2,3);
#define CALLGEOTAT(f) f
#else /* XT_GEO_TATTLER */
#define CALLGEOTAT(f)
#endif /* XT_GEO_TATTLER */
#ifndef XTTRACEMEMORY
extern char* __XtMalloc (
unsigned /* size */
);
extern char* __XtCalloc (
unsigned /* num */,
unsigned /* size */
);
#else
#define __XtMalloc XtMalloc
#define __XtCalloc XtCalloc
#endif
_XFUNCPROTOEND
#endif /* _XtintrinsicI_h */
/* DON'T ADD STUFF AFTER THIS #endif */
PK NzFZx>ޢ� �
Xlib-xcb.hnu �[��� /* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett
* This file is licensed under the MIT license. See the file COPYING. */
#ifndef _X11_XLIB_XCB_H_
#define _X11_XLIB_XCB_H_
#include <xcb/xcb.h>
#include <X11/Xlib.h>
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
xcb_connection_t *XGetXCBConnection(Display *dpy);
enum XEventQueueOwner { XlibOwnsEventQueue = 0, XCBOwnsEventQueue };
void XSetEventQueueOwner(Display *dpy, enum XEventQueueOwner owner);
_XFUNCPROTOEND
#endif /* _X11_XLIB_XCB_H_ */
PK NzFZ��N N SelectionI.hnu �[��� /***********************************************************
Copyright 1987, 1988, 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
#ifndef _XtselectionI_h
#define _XtselectionI_h
#include "Intrinsic.h"
typedef struct _RequestRec *Request;
typedef struct _SelectRec *Select;
typedef struct _RequestRec {
Select ctx; /* logical owner */
Widget widget; /* widget actually receiving Selection events */
Window requestor;
Atom property;
Atom target;
Atom type;
int format;
XtPointer value;
unsigned long bytelength;
unsigned long offset;
XtIntervalId timeout;
XSelectionRequestEvent event; /* for XtGetSelectionRequest */
Boolean allSent;
} RequestRec;
typedef struct {
Atom prop;
Boolean avail;
} SelectionPropRec, *SelectionProp;
typedef struct {
Display *dpy;
Atom incr_atom, indirect_atom, timestamp_atom;
int propCount;
SelectionProp list;
} PropListRec, *PropList;
typedef struct _SelectRec {
Atom selection; /* constant */
Display *dpy; /* constant */
Widget widget;
Time time;
unsigned long serial;
XtConvertSelectionProc convert;
XtLoseSelectionProc loses;
XtSelectionDoneProc notify;
XtCancelConvertSelectionProc owner_cancel;
XtPointer owner_closure;
PropList prop_list;
Request req; /* state for local non-incr xfer */
int ref_count; /* of active transfers */
unsigned int incremental:1;
unsigned int free_when_done:1;
unsigned int was_disowned:1;
} SelectRec;
typedef struct _ParamRec {
Atom selection;
Atom param;
} ParamRec, *Param;
typedef struct _ParamInfoRec {
unsigned int count;
Param paramlist;
} ParamInfoRec, *ParamInfo;
typedef struct _QueuedRequestRec {
Atom selection;
Atom target;
Atom param;
XtSelectionCallbackProc callback;
XtPointer closure;
Time time;
Boolean incremental;
} QueuedRequestRec, *QueuedRequest;
typedef struct _QueuedRequestInfoRec {
int count;
Atom *selections;
QueuedRequest *requests;
} QueuedRequestInfoRec, *QueuedRequestInfo;
typedef struct {
XtSelectionCallbackProc *callbacks;
XtPointer *req_closure;
Atom property;
Atom *target;
Atom type;
int format;
char *value;
int bytelength;
int offset;
XtIntervalId timeout;
XtEventHandler proc;
Widget widget;
Time time;
Select ctx;
Boolean *incremental;
int current;
} CallBackInfoRec, *CallBackInfo;
typedef struct {
Atom target;
Atom property;
} IndirectPair;
#define IndirectPairWordSize 2
typedef struct {
int active_transfer_count;
} RequestWindowRec;
#define MAX_SELECTION_INCR(dpy) (((65536 < XMaxRequestSize(dpy)) ? \
(65536 << 2) : (XMaxRequestSize(dpy) << 2))-100)
#define MATCH_SELECT(event, info) ((event->time == info->time) && \
(event->requestor == XtWindow(info->widget)) && \
(event->selection == info->ctx->selection) && \
(event->target == *info->target))
#endif /* _XtselectionI_h */
/* DON'T ADD STUFF AFTER THIS #endif */
PK NzFZ�2ɰ?� ?� Xlibint.hnu �[���
/*
Copyright 1984, 1985, 1987, 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
#ifndef _X11_XLIBINT_H_
#define _X11_XLIBINT_H_ 1
/*
* Xlibint.h - Header definition and support file for the internal
* support routines used by the C subroutine interface
* library (Xlib) to the X Window System.
*
* Warning, there be dragons here....
*/
#include <stdint.h>
#include <X11/Xlib.h>
#include <X11/Xproto.h> /* to declare xEvent */
#include <X11/XlibConf.h> /* for configured options like XTHREADS */
/* The Xlib structs are full of implicit padding to properly align members.
We can't clean that up without breaking ABI, so tell clang not to bother
complaining about it. */
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
#endif
#ifdef WIN32
#define _XFlush _XFlushIt
#endif
struct _XGC
{
XExtData *ext_data; /* hook for extension to hang data */
GContext gid; /* protocol ID for graphics context */
Bool rects; /* boolean: TRUE if clipmask is list of rectangles */
Bool dashes; /* boolean: TRUE if dash-list is really a list */
unsigned long dirty;/* cache dirty bits */
XGCValues values; /* shadow structure of values */
};
struct _XDisplay
{
XExtData *ext_data; /* hook for extension to hang data */
struct _XFreeFuncs *free_funcs; /* internal free functions */
int fd; /* Network socket. */
int conn_checker; /* ugly thing used by _XEventsQueued */
int proto_major_version;/* maj. version of server's X protocol */
int proto_minor_version;/* minor version of server's X protocol */
char *vendor; /* vendor of the server hardware */
XID resource_base; /* resource ID base */
XID resource_mask; /* resource ID mask bits */
XID resource_id; /* allocator current ID */
int resource_shift; /* allocator shift to correct bits */
XID (*resource_alloc)( /* allocator function */
struct _XDisplay*
);
int byte_order; /* screen byte order, LSBFirst, MSBFirst */
int bitmap_unit; /* padding and data requirements */
int bitmap_pad; /* padding requirements on bitmaps */
int bitmap_bit_order; /* LeastSignificant or MostSignificant */
int nformats; /* number of pixmap formats in list */
ScreenFormat *pixmap_format; /* pixmap format list */
int vnumber; /* Xlib's X protocol version number. */
int release; /* release of the server */
struct _XSQEvent *head, *tail; /* Input event queue. */
int qlen; /* Length of input event queue */
unsigned long last_request_read; /* seq number of last event read */
unsigned long request; /* sequence number of last request. */
char *last_req; /* beginning of last request, or dummy */
char *buffer; /* Output buffer starting address. */
char *bufptr; /* Output buffer index pointer. */
char *bufmax; /* Output buffer maximum+1 address. */
unsigned max_request_size; /* maximum number 32 bit words in request*/
struct _XrmHashBucketRec *db;
int (*synchandler)( /* Synchronization handler */
struct _XDisplay*
);
char *display_name; /* "host:display" string used on this connect*/
int default_screen; /* default screen for operations */
int nscreens; /* number of screens on this server*/
Screen *screens; /* pointer to list of screens */
unsigned long motion_buffer; /* size of motion buffer */
volatile unsigned long flags; /* internal connection flags */
int min_keycode; /* minimum defined keycode */
int max_keycode; /* maximum defined keycode */
KeySym *keysyms; /* This server's keysyms */
XModifierKeymap *modifiermap; /* This server's modifier keymap */
int keysyms_per_keycode;/* number of rows */
char *xdefaults; /* contents of defaults from server */
char *scratch_buffer; /* place to hang scratch buffer */
unsigned long scratch_length; /* length of scratch buffer */
int ext_number; /* extension number on this display */
struct _XExten *ext_procs; /* extensions initialized on this display */
/*
* the following can be fixed size, as the protocol defines how
* much address space is available.
* While this could be done using the extension vector, there
* may be MANY events processed, so a search through the extension
* list to find the right procedure for each event might be
* expensive if many extensions are being used.
*/
Bool (*event_vec[128])( /* vector for wire to event */
Display * /* dpy */,
XEvent * /* re */,
xEvent * /* event */
);
Status (*wire_vec[128])( /* vector for event to wire */
Display * /* dpy */,
XEvent * /* re */,
xEvent * /* event */
);
KeySym lock_meaning; /* for XLookupString */
struct _XLockInfo *lock; /* multi-thread state, display lock */
struct _XInternalAsync *async_handlers; /* for internal async */
unsigned long bigreq_size; /* max size of big requests */
struct _XLockPtrs *lock_fns; /* pointers to threads functions */
void (*idlist_alloc)( /* XID list allocator function */
Display * /* dpy */,
XID * /* ids */,
int /* count */
);
/* things above this line should not move, for binary compatibility */
struct _XKeytrans *key_bindings; /* for XLookupString */
Font cursor_font; /* for XCreateFontCursor */
struct _XDisplayAtoms *atoms; /* for XInternAtom */
unsigned int mode_switch; /* keyboard group modifiers */
unsigned int num_lock; /* keyboard numlock modifiers */
struct _XContextDB *context_db; /* context database */
Bool (**error_vec)( /* vector for wire to error */
Display * /* display */,
XErrorEvent * /* he */,
xError * /* we */
);
/*
* Xcms information
*/
struct {
XPointer defaultCCCs; /* pointer to an array of default XcmsCCC */
XPointer clientCmaps; /* pointer to linked list of XcmsCmapRec */
XPointer perVisualIntensityMaps;
/* linked list of XcmsIntensityMap */
} cms;
struct _XIMFilter *im_filters;
struct _XSQEvent *qfree; /* unallocated event queue elements */
unsigned long next_event_serial_num; /* inserted into next queue elt */
struct _XExten *flushes; /* Flush hooks */
struct _XConnectionInfo *im_fd_info; /* _XRegisterInternalConnection */
int im_fd_length; /* number of im_fd_info */
struct _XConnWatchInfo *conn_watchers; /* XAddConnectionWatch */
int watcher_count; /* number of conn_watchers */
XPointer filedes; /* struct pollfd cache for _XWaitForReadable */
int (*savedsynchandler)( /* user synchandler when Xlib usurps */
Display * /* dpy */
);
XID resource_max; /* allocator max ID */
int xcmisc_opcode; /* major opcode for XC-MISC */
struct _XkbInfoRec *xkb_info; /* XKB info */
struct _XtransConnInfo *trans_conn; /* transport connection object */
struct _X11XCBPrivate *xcb; /* XCB glue private data */
/* Generic event cookie handling */
unsigned int next_cookie; /* next event cookie */
/* vector for wire to generic event, index is (extension - 128) */
Bool (*generic_event_vec[128])(
Display * /* dpy */,
XGenericEventCookie * /* Xlib event */,
xEvent * /* wire event */);
/* vector for event copy, index is (extension - 128) */
Bool (*generic_event_copy_vec[128])(
Display * /* dpy */,
XGenericEventCookie * /* in */,
XGenericEventCookie * /* out*/);
void *cookiejar; /* cookie events returned but not claimed */
#ifndef LONG64
unsigned long last_request_read_upper32bit;
unsigned long request_upper32bit;
#endif
struct _XErrorThreadInfo *error_threads;
};
#define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)
/*
* access "last_request_read" and "request" with 64bit
* warning: the value argument of the SET-macros must not
* have any side-effects because it may get called twice.
*/
#ifndef LONG64
/* accessors for 32-bit unsigned long */
#define X_DPY_GET_REQUEST(dpy) \
( \
((uint64_t)(((struct _XDisplay*)dpy)->request)) \
+ (((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) << 32) \
)
#define X_DPY_SET_REQUEST(dpy, value) \
( \
(((struct _XDisplay*)dpy)->request = \
(value) & 0xFFFFFFFFUL), \
(((struct _XDisplay*)dpy)->request_upper32bit = \
((uint64_t)(value)) >> 32), \
(void)0 /* don't use the result */ \
)
#define X_DPY_GET_LAST_REQUEST_READ(dpy) \
( \
((uint64_t)(((struct _XDisplay*)dpy)->last_request_read)) \
+ ( \
((uint64_t)( \
((struct _XDisplay*)dpy)->last_request_read_upper32bit \
)) << 32 \
) \
)
#define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \
( \
(((struct _XDisplay*)dpy)->last_request_read = \
(value) & 0xFFFFFFFFUL), \
(((struct _XDisplay*)dpy)->last_request_read_upper32bit = \
((uint64_t)(value)) >> 32), \
(void)0 /* don't use the result */ \
)
/*
* widen a 32-bit sequence number to a 64 sequence number.
* This macro makes the following assumptions:
* - ulseq refers to a sequence that has already been sent
* - ulseq means the most recent possible sequence number
* with these lower 32 bits.
*
* The following optimization is used:
* The comparison result is taken a 0 or 1 to avoid a branch.
*/
#define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) \
( \
((uint64_t)ulseq) \
+ \
(( \
((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) \
- (uint64_t)( \
(ulseq) > (((struct _XDisplay*)dpy)->request) \
) \
) << 32) \
)
#define X_DPY_REQUEST_INCREMENT(dpy) \
( \
((struct _XDisplay*)dpy)->request++, \
( \
(((struct _XDisplay*)dpy)->request == 0) ? ( \
((struct _XDisplay*)dpy)->request_upper32bit++ \
) : 0 \
), \
(void)0 /* don't use the result */ \
)
#define X_DPY_REQUEST_DECREMENT(dpy) \
( \
( \
(((struct _XDisplay*)dpy)->request == 0) ? (\
((struct _XDisplay*)dpy)->request--, /* wrap */ \
((struct _XDisplay*)dpy)->request_upper32bit-- \
) : ( \
((struct _XDisplay*)dpy)->request-- \
) \
), \
(void)0 /* don't use the result */ \
)
#else
/* accessors for 64-bit unsigned long */
#define X_DPY_GET_REQUEST(dpy) \
(((struct _XDisplay*)dpy)->request)
#define X_DPY_SET_REQUEST(dpy, value) \
((struct _XDisplay*)dpy)->request = (value)
#define X_DPY_GET_LAST_REQUEST_READ(dpy) \
(((struct _XDisplay*)dpy)->last_request_read)
#define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \
((struct _XDisplay*)dpy)->last_request_read = (value)
#define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) ulseq
#define X_DPY_REQUEST_INCREMENT(dpy) ((struct _XDisplay*)dpy)->request++
#define X_DPY_REQUEST_DECREMENT(dpy) ((struct _XDisplay*)dpy)->request--
#endif
#ifndef _XEVENT_
/*
* _QEvent datatype for use in input queueing.
*/
typedef struct _XSQEvent
{
struct _XSQEvent *next;
XEvent event;
unsigned long qserial_num; /* so multi-threaded code can find new ones */
} _XQEvent;
#endif
#include <X11/Xproto.h>
#ifdef __sgi
#define _SGI_MP_SOURCE /* turn this on to get MP safe errno */
#endif
#include <errno.h>
#define _XBCOPYFUNC _Xbcopy
#include <X11/Xfuncs.h>
#include <X11/Xosdefs.h>
/* Utek leaves kernel macros around in include files (bleah) */
#ifdef dirty
#undef dirty
#endif
#include <stdlib.h>
#include <string.h>
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
/*
* The following definitions can be used for locking requests in multi-threaded
* address spaces.
*/
#ifdef XTHREADS
/* Author: Stephen Gildea, MIT X Consortium
*
* declarations for C Threads locking
*/
typedef struct _LockInfoRec *LockInfoPtr;
/* interfaces for locking.c */
struct _XLockPtrs {
/* used by all, including extensions; do not move */
void (*lock_display)(
Display *dpy
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
, char *file
, int line
#endif
);
void (*unlock_display)(
Display *dpy
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
, char *file
, int line
#endif
);
};
#if defined(WIN32) && !defined(_XLIBINT_)
#define _XCreateMutex_fn (*_XCreateMutex_fn_p)
#define _XFreeMutex_fn (*_XFreeMutex_fn_p)
#define _XLockMutex_fn (*_XLockMutex_fn_p)
#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p)
#define _Xglobal_lock (*_Xglobal_lock_p)
#endif
/* in XlibInt.c */
extern void (*_XCreateMutex_fn)(
LockInfoPtr /* lock */
);
extern void (*_XFreeMutex_fn)(
LockInfoPtr /* lock */
);
extern void (*_XLockMutex_fn)(
LockInfoPtr /* lock */
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
, char * /* file */
, int /* line */
#endif
);
extern void (*_XUnlockMutex_fn)(
LockInfoPtr /* lock */
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
, char * /* file */
, int /* line */
#endif
);
extern LockInfoPtr _Xglobal_lock;
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)((d),__FILE__,__LINE__)
#define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)((d),__FILE__,__LINE__)
#define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock,__FILE__,__LINE__)
#define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock,__FILE__,__LINE__)
#else
/* used everywhere, so must be fast if not using threads */
#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)(d)
#define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)(d)
#define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock)
#define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock)
#endif
#define _XCreateMutex(lock) if (_XCreateMutex_fn) (*_XCreateMutex_fn)(lock);
#define _XFreeMutex(lock) if (_XFreeMutex_fn) (*_XFreeMutex_fn)(lock);
#else /* XTHREADS */
#define LockDisplay(dis)
#define _XLockMutex(lock)
#define _XUnlockMutex(lock)
#define UnlockDisplay(dis)
#define _XCreateMutex(lock)
#define _XFreeMutex(lock)
#endif
#define Xfree(ptr) free((ptr))
/*
* Note that some machines do not return a valid pointer for malloc(0), in
* which case we provide an alternate under the control of the
* define MALLOC_0_RETURNS_NULL. This is necessary because some
* Xlib code expects malloc(0) to return a valid pointer to storage.
*/
#if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__)
# define Xmalloc(size) malloc(((size) == 0 ? 1 : (size)))
# define Xrealloc(ptr, size) realloc((ptr), ((size) == 0 ? 1 : (size)))
# define Xcalloc(nelem, elsize) calloc(((nelem) == 0 ? 1 : (nelem)), (elsize))
#else
# define Xmalloc(size) malloc((size))
# define Xrealloc(ptr, size) realloc((ptr), (size))
# define Xcalloc(nelem, elsize) calloc((nelem), (elsize))
#endif
#include <stddef.h>
#define LOCKED 1
#define UNLOCKED 0
#ifndef BUFSIZE
#define BUFSIZE 2048 /* X output buffer size. */
#endif
#ifndef PTSPERBATCH
#define PTSPERBATCH 1024 /* point batching */
#endif
#ifndef WLNSPERBATCH
#define WLNSPERBATCH 50 /* wide line batching */
#endif
#ifndef ZLNSPERBATCH
#define ZLNSPERBATCH 1024 /* thin line batching */
#endif
#ifndef WRCTSPERBATCH
#define WRCTSPERBATCH 10 /* wide line rectangle batching */
#endif
#ifndef ZRCTSPERBATCH
#define ZRCTSPERBATCH 256 /* thin line rectangle batching */
#endif
#ifndef FRCTSPERBATCH
#define FRCTSPERBATCH 256 /* filled rectangle batching */
#endif
#ifndef FARCSPERBATCH
#define FARCSPERBATCH 256 /* filled arc batching */
#endif
#ifndef CURSORFONT
#define CURSORFONT "cursor" /* standard cursor fonts */
#endif
/*
* Display flags
*/
#define XlibDisplayIOError (1L << 0)
#define XlibDisplayClosing (1L << 1)
#define XlibDisplayNoXkb (1L << 2)
#define XlibDisplayPrivSync (1L << 3)
#define XlibDisplayProcConni (1L << 4) /* in _XProcessInternalConnection */
#define XlibDisplayReadEvents (1L << 5) /* in _XReadEvents */
#define XlibDisplayReply (1L << 5) /* in _XReply */
#define XlibDisplayWriting (1L << 6) /* in _XFlushInt, _XSend */
#define XlibDisplayDfltRMDB (1L << 7) /* mark if RM db from XGetDefault */
/*
* X Protocol packetizing macros.
*/
/* Leftover from CRAY support - was defined empty on all non-Cray systems */
#define WORD64ALIGN
/**
* Return a len-sized request buffer for the request type. This function may
* flush the output queue.
*
* @param dpy The display connection
* @param type The request type
* @param len Length of the request in bytes
*
* @returns A pointer to the request buffer with a few default values
* initialized.
*/
extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
/* GetReqSized is the same as GetReq but allows the caller to specify the
* size in bytes. 'sz' must be a multiple of 4! */
#define GetReqSized(name, sz, req) \
req = (x##name##Req *) _XGetRequest(dpy, X_##name, sz)
/*
* GetReq - Get the next available X request packet in the buffer and
* return it.
*
* "name" is the name of the request, e.g. CreatePixmap, OpenFont, etc.
* "req" is the name of the request pointer.
*
*/
#define GetReq(name, req) \
GetReqSized(name, SIZEOF(x##name##Req), req)
/* GetReqExtra is the same as GetReq, but allocates "n" additional
bytes after the request. "n" must be a multiple of 4! */
#define GetReqExtra(name, n, req) \
GetReqSized(name, SIZEOF(x##name##Req) + n, req)
/*
* GetResReq is for those requests that have a resource ID
* (Window, Pixmap, GContext, etc.) as their single argument.
* "rid" is the name of the resource.
*/
#define GetResReq(name, rid, req) \
req = (xResourceReq *) _XGetRequest(dpy, X_##name, SIZEOF(xResourceReq)); \
req->id = (rid)
/*
* GetEmptyReq is for those requests that have no arguments
* at all.
*/
#define GetEmptyReq(name, req) \
req = (xReq *) _XGetRequest(dpy, X_##name, SIZEOF(xReq))
/*
* MakeBigReq sets the CARD16 "req->length" to 0 and inserts a new CARD32
* length, after req->length, before the data in the request. The new length
* includes the "n" extra 32-bit words.
*
* Do not use MakeBigReq if there is no data already in the request.
* req->length must already be >= 2.
*/
#ifdef LONG64
#define MakeBigReq(req,n) \
{ \
CARD64 _BRdat; \
CARD32 _BRlen = req->length - 1; \
req->length = 0; \
_BRdat = ((CARD32 *)req)[_BRlen]; \
memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) << 2); \
((CARD32 *)req)[1] = _BRlen + n + 2; \
Data32(dpy, &_BRdat, 4); \
}
#else
#define MakeBigReq(req,n) \
{ \
CARD32 _BRdat; \
CARD32 _BRlen = req->length - 1; \
req->length = 0; \
_BRdat = ((CARD32 *)req)[_BRlen]; \
memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) << 2); \
((CARD32 *)req)[1] = _BRlen + n + 2; \
Data32(dpy, &_BRdat, 4); \
}
#endif
/*
* SetReqLen increases the count of 32-bit words in the request by "n",
* or by "badlen" if "n" is too large.
*
* Do not use SetReqLen if "req" does not already have data after the
* xReq header. req->length must already be >= 2.
*/
#ifndef __clang_analyzer__
#define SetReqLen(req,n,badlen) \
if ((req->length + n) > (unsigned)65535) { \
if (dpy->bigreq_size) { \
MakeBigReq(req,n) \
} else { \
n = badlen; \
req->length += n; \
} \
} else \
req->length += n
#else
#define SetReqLen(req,n,badlen) \
req->length += n
#endif
#define SyncHandle() \
if (dpy->synchandler) (*dpy->synchandler)(dpy)
extern void _XFlushGCCache(Display *dpy, GC gc);
#define FlushGC(dpy, gc) \
if ((gc)->dirty) _XFlushGCCache((dpy), (gc))
/*
* Data - Place data in the buffer and pad the end to provide
* 32 bit word alignment. Transmit if the buffer fills.
*
* "dpy" is a pointer to a Display.
* "data" is a pointer to a data buffer.
* "len" is the length of the data buffer.
*/
#ifndef DataRoutineIsProcedure
#define Data(dpy, data, len) {\
if (dpy->bufptr + (len) <= dpy->bufmax) {\
memcpy(dpy->bufptr, data, (int)len);\
dpy->bufptr += ((len) + 3) & ~3;\
} else\
_XSend(dpy, data, len);\
}
#endif /* DataRoutineIsProcedure */
/* Allocate bytes from the buffer. No padding is done, so if
* the length is not a multiple of 4, the caller must be
* careful to leave the buffer aligned after sending the
* current request.
*
* "type" is the type of the pointer being assigned to.
* "ptr" is the pointer being assigned to.
* "n" is the number of bytes to allocate.
*
* Example:
* xTextElt *elt;
* BufAlloc (xTextElt *, elt, nbytes)
*/
#define BufAlloc(type, ptr, n) \
if (dpy->bufptr + (n) > dpy->bufmax) \
_XFlush (dpy); \
ptr = (type) dpy->bufptr; \
memset(ptr, '\0', n); \
dpy->bufptr += (n);
#define Data16(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len))
#define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))
#define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
#ifdef LONG64
#define Data32(dpy, data, len) _XData32(dpy, (_Xconst long *)data, len)
extern int _XData32(
Display *dpy,
register _Xconst long *data,
unsigned len
);
extern void _XRead32(
Display *dpy,
register long *data,
long len
);
#else
#define Data32(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len))
#define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
#endif
#define PackData16(dpy,data,len) Data16 (dpy, data, len)
#define PackData32(dpy,data,len) Data32 (dpy, data, len)
/* Xlib manual is bogus */
#define PackData(dpy,data,len) PackData16 (dpy, data, len)
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \
(((cs)->rbearing|(cs)->lbearing| \
(cs)->ascent|(cs)->descent) == 0))
/*
* CI_GET_CHAR_INFO_1D - return the charinfo struct for the indicated 8bit
* character. If the character is in the column and exists, then return the
* appropriate metrics (note that fonts with common per-character metrics will
* return min_bounds). If none of these hold true, try again with the default
* char.
*/
#define CI_GET_CHAR_INFO_1D(fs,col,def,cs) \
{ \
cs = def; \
if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
if (fs->per_char == NULL) { \
cs = &fs->min_bounds; \
} else { \
cs = &fs->per_char[(col - fs->min_char_or_byte2)]; \
if (CI_NONEXISTCHAR(cs)) cs = def; \
} \
} \
}
#define CI_GET_DEFAULT_INFO_1D(fs,cs) \
CI_GET_CHAR_INFO_1D (fs, fs->default_char, NULL, cs)
/*
* CI_GET_CHAR_INFO_2D - return the charinfo struct for the indicated row and
* column. This is used for fonts that have more than row zero.
*/
#define CI_GET_CHAR_INFO_2D(fs,row,col,def,cs) \
{ \
cs = def; \
if (row >= fs->min_byte1 && row <= fs->max_byte1 && \
col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
if (fs->per_char == NULL) { \
cs = &fs->min_bounds; \
} else { \
cs = &fs->per_char[((row - fs->min_byte1) * \
(fs->max_char_or_byte2 - \
fs->min_char_or_byte2 + 1)) + \
(col - fs->min_char_or_byte2)]; \
if (CI_NONEXISTCHAR(cs)) cs = def; \
} \
} \
}
#define CI_GET_DEFAULT_INFO_2D(fs,cs) \
{ \
unsigned int r = (fs->default_char >> 8); \
unsigned int c = (fs->default_char & 0xff); \
CI_GET_CHAR_INFO_2D (fs, r, c, NULL, cs); \
}
/* srcvar must be a variable for large architecture version */
#define OneDataCard32(dpy,dstaddr,srcvar) \
{ *(CARD32 *)(dstaddr) = (srcvar); }
typedef struct _XInternalAsync {
struct _XInternalAsync *next;
/*
* handler arguments:
* rep is the generic reply that caused this handler
* to be invoked. It must also be passed to _XGetAsyncReply.
* buf and len are opaque values that must be passed to
* _XGetAsyncReply or _XGetAsyncData.
* data is the closure stored in this struct.
* The handler returns True iff it handled this reply.
*/
Bool (*handler)(
Display* /* dpy */,
xReply* /* rep */,
char* /* buf */,
int /* len */,
XPointer /* data */
);
XPointer data;
} _XAsyncHandler;
/*
* This struct is part of the ABI and is defined by value
* in user-code. This means that we cannot make
* the sequence-numbers 64bit.
*/
typedef struct _XAsyncEState {
unsigned long min_sequence_number;
unsigned long max_sequence_number;
unsigned char error_code;
unsigned char major_opcode;
unsigned short minor_opcode;
unsigned char last_error_received;
int error_count;
} _XAsyncErrorState;
extern void _XDeqAsyncHandler(Display *dpy, _XAsyncHandler *handler);
#define DeqAsyncHandler(dpy,handler) { \
if (dpy->async_handlers == (handler)) \
dpy->async_handlers = (handler)->next; \
else \
_XDeqAsyncHandler(dpy, handler); \
}
typedef void (*FreeFuncType) (
Display* /* display */
);
typedef int (*FreeModmapType) (
XModifierKeymap* /* modmap */
);
/*
* This structure is private to the library.
*/
typedef struct _XFreeFuncs {
FreeFuncType atoms; /* _XFreeAtomTable */
FreeModmapType modifiermap; /* XFreeModifiermap */
FreeFuncType key_bindings; /* _XFreeKeyBindings */
FreeFuncType context_db; /* _XFreeContextDB */
FreeFuncType defaultCCCs; /* _XcmsFreeDefaultCCCs */
FreeFuncType clientCmaps; /* _XcmsFreeClientCmaps */
FreeFuncType intensityMaps; /* _XcmsFreeIntensityMaps */
FreeFuncType im_filters; /* _XFreeIMFilters */
FreeFuncType xkb; /* _XkbFreeInfo */
} _XFreeFuncRec;
/* types for InitExt.c */
typedef int (*CreateGCType) (
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
);
typedef int (*CopyGCType)(
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
);
typedef int (*FlushGCType) (
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
);
typedef int (*FreeGCType) (
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
);
typedef int (*CreateFontType) (
Display* /* display */,
XFontStruct* /* fs */,
XExtCodes* /* codes */
);
typedef int (*FreeFontType) (
Display* /* display */,
XFontStruct* /* fs */,
XExtCodes* /* codes */
);
typedef int (*CloseDisplayType) (
Display* /* display */,
XExtCodes* /* codes */
);
typedef int (*ErrorType) (
Display* /* display */,
xError* /* err */,
XExtCodes* /* codes */,
int* /* ret_code */
);
typedef char* (*ErrorStringType) (
Display* /* display */,
int /* code */,
XExtCodes* /* codes */,
char* /* buffer */,
int /* nbytes */
);
typedef void (*PrintErrorType)(
Display* /* display */,
XErrorEvent* /* ev */,
void* /* fp */
);
typedef void (*BeforeFlushType)(
Display* /* display */,
XExtCodes* /* codes */,
_Xconst char* /* data */,
long /* len */
);
/*
* This structure is private to the library.
*/
typedef struct _XExten { /* private to extension mechanism */
struct _XExten *next; /* next in list */
XExtCodes codes; /* public information, all extension told */
CreateGCType create_GC; /* routine to call when GC created */
CopyGCType copy_GC; /* routine to call when GC copied */
FlushGCType flush_GC; /* routine to call when GC flushed */
FreeGCType free_GC; /* routine to call when GC freed */
CreateFontType create_Font; /* routine to call when Font created */
FreeFontType free_Font; /* routine to call when Font freed */
CloseDisplayType close_display; /* routine to call when connection closed */
ErrorType error; /* who to call when an error occurs */
ErrorStringType error_string; /* routine to supply error string */
char *name; /* name of this extension */
PrintErrorType error_values; /* routine to supply error values */
BeforeFlushType before_flush; /* routine to call when sending data */
struct _XExten *next_flush; /* next in list of those with flushes */
} _XExtension;
/* Temporary definition until we can depend on an xproto release with it */
#ifdef _X_COLD
# define _XLIB_COLD _X_COLD
#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403) /* 4.3+ */
# define _XLIB_COLD __attribute__((__cold__))
#else
# define _XLIB_COLD /* nothing */
#endif
/* extension hooks */
#ifdef DataRoutineIsProcedure
extern void Data(Display *dpy, char *data, long len);
#endif
extern int _XError(
Display* /* dpy */,
xError* /* rep */
);
extern int _XIOError(
Display* /* dpy */
) _X_NORETURN;
extern int (*_XIOErrorFunction)(
Display* /* dpy */
);
extern int (*_XErrorFunction)(
Display* /* dpy */,
XErrorEvent* /* error_event */
);
extern void _XEatData(
Display* /* dpy */,
unsigned long /* n */
) _XLIB_COLD;
extern void _XEatDataWords(
Display* /* dpy */,
unsigned long /* n */
) _XLIB_COLD;
#if defined(__SUNPRO_C) /* Studio compiler alternative to "cold" attribute */
# pragma rarely_called(_XEatData, _XEatDataWords)
#endif
extern char *_XAllocScratch(
Display* /* dpy */,
unsigned long /* nbytes */
);
extern char *_XAllocTemp(
Display* /* dpy */,
unsigned long /* nbytes */
);
extern void _XFreeTemp(
Display* /* dpy */,
char* /* buf */,
unsigned long /* nbytes */
);
extern Visual *_XVIDtoVisual(
Display* /* dpy */,
VisualID /* id */
);
extern unsigned long _XSetLastRequestRead(
Display* /* dpy */,
xGenericReply* /* rep */
);
extern int _XGetHostname(
char* /* buf */,
int /* maxlen */
);
extern Screen *_XScreenOfWindow(
Display* /* dpy */,
Window /* w */
);
extern Bool _XAsyncErrorHandler(
Display* /* dpy */,
xReply* /* rep */,
char* /* buf */,
int /* len */,
XPointer /* data */
);
extern char *_XGetAsyncReply(
Display* /* dpy */,
char* /* replbuf */,
xReply* /* rep */,
char* /* buf */,
int /* len */,
int /* extra */,
Bool /* discard */
);
extern void _XGetAsyncData(
Display* /* dpy */,
char * /* data */,
char * /* buf */,
int /* len */,
int /* skip */,
int /* datalen */,
int /* discardtotal */
);
extern void _XFlush(
Display* /* dpy */
);
extern int _XEventsQueued(
Display* /* dpy */,
int /* mode */
);
extern void _XReadEvents(
Display* /* dpy */
);
extern int _XRead(
Display* /* dpy */,
char* /* data */,
long /* size */
);
extern void _XReadPad(
Display* /* dpy */,
char* /* data */,
long /* size */
);
extern void _XSend(
Display* /* dpy */,
_Xconst char* /* data */,
long /* size */
);
extern Status _XReply(
Display* /* dpy */,
xReply* /* rep */,
int /* extra */,
Bool /* discard */
);
extern void _XEnq(
Display* /* dpy */,
xEvent* /* event */
);
extern void _XDeq(
Display* /* dpy */,
_XQEvent* /* prev */,
_XQEvent* /* qelt */
);
extern Bool _XUnknownWireEvent(
Display* /* dpy */,
XEvent* /* re */,
xEvent* /* event */
);
extern Bool _XUnknownWireEventCookie(
Display* /* dpy */,
XGenericEventCookie* /* re */,
xEvent* /* event */
);
extern Bool _XUnknownCopyEventCookie(
Display* /* dpy */,
XGenericEventCookie* /* in */,
XGenericEventCookie* /* out */
);
extern Status _XUnknownNativeEvent(
Display* /* dpy */,
XEvent* /* re */,
xEvent* /* event */
);
extern Bool _XWireToEvent(Display *dpy, XEvent *re, xEvent *event);
extern Bool _XDefaultWireError(Display *display, XErrorEvent *he, xError *we);
extern Bool _XPollfdCacheInit(Display *dpy);
extern void _XPollfdCacheAdd(Display *dpy, int fd);
extern void _XPollfdCacheDel(Display *dpy, int fd);
extern XID _XAllocID(Display *dpy);
extern void _XAllocIDs(Display *dpy, XID *ids, int count);
extern int _XFreeExtData(
XExtData* /* extension */
);
extern int (*XESetCreateGC(
Display* /* display */,
int /* extension */,
int (*) (
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
) /* proc */
))(
Display*, GC, XExtCodes*
);
extern int (*XESetCopyGC(
Display* /* display */,
int /* extension */,
int (*) (
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
) /* proc */
))(
Display*, GC, XExtCodes*
);
extern int (*XESetFlushGC(
Display* /* display */,
int /* extension */,
int (*) (
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
) /* proc */
))(
Display*, GC, XExtCodes*
);
extern int (*XESetFreeGC(
Display* /* display */,
int /* extension */,
int (*) (
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
) /* proc */
))(
Display*, GC, XExtCodes*
);
extern int (*XESetCreateFont(
Display* /* display */,
int /* extension */,
int (*) (
Display* /* display */,
XFontStruct* /* fs */,
XExtCodes* /* codes */
) /* proc */
))(
Display*, XFontStruct*, XExtCodes*
);
extern int (*XESetFreeFont(
Display* /* display */,
int /* extension */,
int (*) (
Display* /* display */,
XFontStruct* /* fs */,
XExtCodes* /* codes */
) /* proc */
))(
Display*, XFontStruct*, XExtCodes*
);
extern int (*XESetCloseDisplay(
Display* /* display */,
int /* extension */,
int (*) (
Display* /* display */,
XExtCodes* /* codes */
) /* proc */
))(
Display*, XExtCodes*
);
extern int (*XESetError(
Display* /* display */,
int /* extension */,
int (*) (
Display* /* display */,
xError* /* err */,
XExtCodes* /* codes */,
int* /* ret_code */
) /* proc */
))(
Display*, xError*, XExtCodes*, int*
);
extern char* (*XESetErrorString(
Display* /* display */,
int /* extension */,
char* (*) (
Display* /* display */,
int /* code */,
XExtCodes* /* codes */,
char* /* buffer */,
int /* nbytes */
) /* proc */
))(
Display*, int, XExtCodes*, char*, int
);
extern void (*XESetPrintErrorValues (
Display* /* display */,
int /* extension */,
void (*)(
Display* /* display */,
XErrorEvent* /* ev */,
void* /* fp */
) /* proc */
))(
Display*, XErrorEvent*, void*
);
extern Bool (*XESetWireToEvent(
Display* /* display */,
int /* event_number */,
Bool (*) (
Display* /* display */,
XEvent* /* re */,
xEvent* /* event */
) /* proc */
))(
Display*, XEvent*, xEvent*
);
extern Bool (*XESetWireToEventCookie(
Display* /* display */,
int /* extension */,
Bool (*) (
Display* /* display */,
XGenericEventCookie* /* re */,
xEvent* /* event */
) /* proc */
))(
Display*, XGenericEventCookie*, xEvent*
);
extern Bool (*XESetCopyEventCookie(
Display* /* display */,
int /* extension */,
Bool (*) (
Display* /* display */,
XGenericEventCookie* /* in */,
XGenericEventCookie* /* out */
) /* proc */
))(
Display*, XGenericEventCookie*, XGenericEventCookie*
);
extern Status (*XESetEventToWire(
Display* /* display */,
int /* event_number */,
Status (*) (
Display* /* display */,
XEvent* /* re */,
xEvent* /* event */
) /* proc */
))(
Display*, XEvent*, xEvent*
);
extern Bool (*XESetWireToError(
Display* /* display */,
int /* error_number */,
Bool (*) (
Display* /* display */,
XErrorEvent* /* he */,
xError* /* we */
) /* proc */
))(
Display*, XErrorEvent*, xError*
);
extern void (*XESetBeforeFlush(
Display* /* display */,
int /* error_number */,
void (*) (
Display* /* display */,
XExtCodes* /* codes */,
_Xconst char* /* data */,
long /* len */
) /* proc */
))(
Display*, XExtCodes*, _Xconst char*, long
);
/* internal connections for IMs */
typedef void (*_XInternalConnectionProc)(
Display* /* dpy */,
int /* fd */,
XPointer /* call_data */
);
extern Status _XRegisterInternalConnection(
Display* /* dpy */,
int /* fd */,
_XInternalConnectionProc /* callback */,
XPointer /* call_data */
);
extern void _XUnregisterInternalConnection(
Display* /* dpy */,
int /* fd */
);
extern void _XProcessInternalConnection(
Display* /* dpy */,
struct _XConnectionInfo* /* conn_info */
);
/* Display structure has pointers to these */
struct _XConnectionInfo { /* info from _XRegisterInternalConnection */
int fd;
_XInternalConnectionProc read_callback;
XPointer call_data;
XPointer *watch_data; /* set/used by XConnectionWatchProc */
struct _XConnectionInfo *next;
};
struct _XConnWatchInfo { /* info from XAddConnectionWatch */
XConnectionWatchProc fn;
XPointer client_data;
struct _XConnWatchInfo *next;
};
#ifdef __UNIXOS2__
extern char* __XOS2RedirRoot(
char*
);
#endif
extern int _XTextHeight(
XFontStruct* /* font_struct */,
_Xconst char* /* string */,
int /* count */
);
extern int _XTextHeight16(
XFontStruct* /* font_struct */,
_Xconst XChar2b* /* string */,
int /* count */
);
#if defined(WIN32)
extern int _XOpenFile(
_Xconst char* /* path */,
int /* flags */
);
extern int _XOpenFileMode(
_Xconst char* /* path */,
int /* flags */,
mode_t /* mode */
);
extern void* _XFopenFile(
_Xconst char* /* path */,
_Xconst char* /* mode */
);
extern int _XAccessFile(
_Xconst char* /* path */
);
#else
#define _XOpenFile(path,flags) open(path,flags)
#define _XOpenFileMode(path,flags,mode) open(path,flags,mode)
#define _XFopenFile(path,mode) fopen(path,mode)
#endif
/* EvToWire.c */
extern Status _XEventToWire(Display *dpy, XEvent *re, xEvent *event);
extern int _XF86LoadQueryLocaleFont(
Display* /* dpy */,
_Xconst char* /* name*/,
XFontStruct** /* xfp*/,
Font* /* fidp */
);
extern void _XProcessWindowAttributes (
register Display *dpy,
xChangeWindowAttributesReq *req,
register unsigned long valuemask,
register XSetWindowAttributes *attributes);
extern int _XDefaultError(
Display *dpy,
XErrorEvent *event);
extern int _XDefaultIOError(
Display *dpy);
extern void _XSetClipRectangles (
register Display *dpy,
GC gc,
int clip_x_origin, int clip_y_origin,
XRectangle *rectangles,
int n,
int ordering);
Status _XGetWindowAttributes(
register Display *dpy,
Window w,
XWindowAttributes *attr);
int _XPutBackEvent (
register Display *dpy,
register XEvent *event);
extern Bool _XIsEventCookie(
Display *dpy,
XEvent *ev);
extern void _XFreeEventCookies(
Display *dpy);
extern void _XStoreEventCookie(
Display *dpy,
XEvent *ev);
extern Bool _XFetchEventCookie(
Display *dpy,
XGenericEventCookie *ev);
extern Bool _XCopyEventCookie(
Display *dpy,
XGenericEventCookie *in,
XGenericEventCookie *out);
/* lcFile.c */
extern void xlocaledir(
char *buf,
int buf_len
);
#ifdef __clang__
#pragma clang diagnostic pop
#endif
_XFUNCPROTOEND
#endif /* _X11_XLIBINT_H_ */
PK NzFZ���% % ObjectP.hnu �[��� /***********************************************************
Copyright 1987, 1988, 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
#ifndef _Xt_ObjectP_h_
#define _Xt_ObjectP_h_
#include <X11/Object.h>
_XFUNCPROTOBEGIN
/**********************************************************
* Object Instance Data Structures
*
**********************************************************/
/* these fields match CorePart and can not be changed */
typedef struct _ObjectPart {
Widget self; /* pointer to widget itself */
WidgetClass widget_class; /* pointer to Widget's ClassRec */
Widget parent; /* parent widget */
XrmName xrm_name; /* widget resource name quarkified */
Boolean being_destroyed; /* marked for destroy */
XtCallbackList destroy_callbacks; /* who to call when widget destroyed */
XtPointer constraints; /* constraint record */
} ObjectPart;
typedef struct _ObjectRec {
ObjectPart object;
} ObjectRec;
/********************************************************
* Object Class Data Structures
*
********************************************************/
/* these fields match CoreClassPart and can not be changed */
/* ideally these structures would only contain the fields required;
but because the CoreClassPart cannot be changed at this late date
extraneous fields are necessary to make the field offsets match */
typedef struct _ObjectClassPart {
WidgetClass superclass; /* pointer to superclass ClassRec */
String class_name; /* widget resource class name */
Cardinal widget_size; /* size in bytes of widget record */
XtProc class_initialize; /* class initialization proc */
XtWidgetClassProc class_part_initialize; /* dynamic initialization */
XtEnum class_inited; /* has class been initialized? */
XtInitProc initialize; /* initialize subclass fields */
XtArgsProc initialize_hook; /* notify that initialize called */
XtProc obj1; /* NULL */
XtPointer obj2; /* NULL */
Cardinal obj3; /* NULL */
XtResourceList resources; /* resources for subclass fields */
Cardinal num_resources; /* number of entries in resources */
XrmClass xrm_class; /* resource class quarkified */
Boolean obj4; /* NULL */
XtEnum obj5; /* NULL */
Boolean obj6; /* NULL */
Boolean obj7; /* NULL */
XtWidgetProc destroy; /* free data for subclass pointers */
XtProc obj8; /* NULL */
XtProc obj9; /* NULL */
XtSetValuesFunc set_values; /* set subclass resource values */
XtArgsFunc set_values_hook; /* notify that set_values called */
XtProc obj10; /* NULL */
XtArgsProc get_values_hook; /* notify that get_values called */
XtProc obj11; /* NULL */
XtVersionType version; /* version of intrinsics used */
XtPointer callback_private; /* list of callback offsets */
String obj12; /* NULL */
XtProc obj13; /* NULL */
XtProc obj14; /* NULL */
XtPointer extension; /* pointer to extension record */
}ObjectClassPart;
typedef struct {
XtPointer next_extension; /* 1st 4 required for all extension records */
XrmQuark record_type; /* NULLQUARK; when on ObjectClassPart */
long version; /* must be XtObjectExtensionVersion */
Cardinal record_size; /* sizeof(ObjectClassExtensionRec) */
XtAllocateProc allocate;
XtDeallocateProc deallocate;
} ObjectClassExtensionRec, *ObjectClassExtension;
typedef struct _ObjectClassRec {
ObjectClassPart object_class;
} ObjectClassRec;
externalref ObjectClassRec objectClassRec;
_XFUNCPROTOEND
#define XtObjectExtensionVersion 1L
#define XtInheritAllocate ((XtAllocateProc) _XtInherit)
#define XtInheritDeallocate ((XtDeallocateProc) _XtInherit)
#endif /*_Xt_ObjectP_h_*/
PK NzFZbJm�� �
HookObjI.hnu �[��� /*
Copyright 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
#ifndef _XtHookObjI_h
#define _XtHookObjI_h
_XFUNCPROTOBEGIN
/* This object is implementation-dependent and private to the library. */
typedef struct _HookObjRec *HookObject;
typedef struct _HookObjClassRec *HookObjectClass;
externalref WidgetClass hookObjectClass;
typedef struct _HookObjPart {
/* resources */
XtCallbackList createhook_callbacks;
XtCallbackList changehook_callbacks;
XtCallbackList confighook_callbacks;
XtCallbackList geometryhook_callbacks;
XtCallbackList destroyhook_callbacks;
WidgetList shells;
Cardinal num_shells;
/* private data */
Cardinal max_shells;
Screen* screen;
}HookObjPart;
typedef struct _HookObjRec {
ObjectPart object;
HookObjPart hooks;
} HookObjRec;
typedef struct _HookObjClassPart {
int unused;
} HookObjClassPart;
typedef struct _HookObjClassRec {
ObjectClassPart object_class;
HookObjClassPart hook_class;
} HookObjClassRec;
externalref HookObjClassRec hookObjClassRec;
_XFUNCPROTOEND
#endif /* ifndef _Xt_HookObjI_h */
PK NzFZ�|T�Y Y
VarargsI.hnu �[��� /*
Copyright 1985, 1986, 1987, 1988, 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
#ifndef _VarargsI_h_
#define _VarargsI_h_
#include <stdarg.h>
/* private routines */
_XFUNCPROTOBEGIN
extern void _XtCountVaList(
va_list /*var*/, int* /*total_count*/, int* /*typed_count*/
);
extern void _XtVaToArgList(
Widget /*widget*/, va_list /*var*/, int /*max_count*/, ArgList* /*args_return*/, Cardinal* /*num_args_return*/
);
extern void _XtVaToTypedArgList(
va_list /*var*/, int /*count*/, XtTypedArgList* /*args_return*/, Cardinal* /*num_args_return*/
);
extern XtTypedArgList _XtVaCreateTypedArgList(
va_list /*var*/, int /*count*/
);
extern void _XtFreeArgList(
ArgList /*args*/, int /*total_count*/, int /*typed_count*/
);
extern void _XtGetApplicationResources(
Widget /*w*/, XtPointer /*base*/, XtResourceList /*resources*/, Cardinal /*num_resources*/, ArgList /*args*/, Cardinal /*num_args*/, XtTypedArgList /*typed_args*/, Cardinal /*num_typed_args*/
);
extern void _XtGetSubresources(
Widget /*w*/, XtPointer /*base*/, const char* /*name*/, const char* /*class*/, XtResourceList /*resources*/, Cardinal /*num_resources*/, ArgList /*args*/, Cardinal /*num_args*/, XtTypedArgList /*typed_args*/, Cardinal /*num_typed_args*/
);
_XFUNCPROTOEND
#endif /* _VarargsI_h_ */
PK NzFZo9�
Constraint.hnu �[��� /***********************************************************
Copyright 1987, 1988, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
#ifndef _XtConstraint_h
#define _XtConstraint_h
_XFUNCPROTOBEGIN
typedef struct _ConstraintClassRec *ConstraintWidgetClass;
#ifndef VMS
externalref WidgetClass constraintWidgetClass;
#endif
_XFUNCPROTOEND
#endif /* _XtConstraint_h */
/* DON'T ADD STUFF AFTER THIS #endif */
PK NzFZ�-$� �
Xwinsock.hnu �[��� /*
Copyright 1996, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization from
The Open Group.
*/
/*
* This header file has for sole purpose to allow to include winsock.h
* without getting any name conflicts with our code.
* Conflicts come from the fact that including winsock.h actually pulls
* in the whole Windows API...
*/
#undef _XFree86Server
#ifdef XFree86Server
# define _XFree86Server
# undef XFree86Server
#endif
/*
* mingw-w64 headers define BOOL as a typedef, protecting against macros
* mingw.org headers define BOOL in terms of WINBOOL
* ... so try to come up with something which works with both :-)
*/
#define _NO_BOOL_TYPEDEF
#define BOOL WINBOOL
#define INT32 wINT32
#undef Status
#define Status wStatus
#define ATOM wATOM
#define BYTE wBYTE
#define FreeResource wFreeResource
#include <winsock2.h>
#undef Status
#define Status int
#undef BYTE
#undef BOOL
#undef INT32
#undef ATOM
#undef FreeResource
#undef CreateWindowA
#undef RT_FONT
#undef RT_CURSOR
/*
* Older version of this header used to name the windows API bool type wBOOL,
* rather than more standard name WINBOOL
*/
#define wBOOL WINBOOL
#ifdef _XFree86Server
# define XFree86Server
# undef _XFree86Server
#endif
PK NzFZ"��� � ap_keysym.hnu �[��� /******************************************************************
Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts.
Copyright 1989 by Hewlett-Packard Company.
All Rights Reserved
Permission to use, duplicate, change, and distribute this software and
its documentation for any purpose and without fee is granted, provided
that the above copyright notice appear in such copy and that this
copyright notice appear in all supporting documentation, and that the
names of Apollo Computer Inc., the Hewlett-Packard Company, or the X
Consortium not be used in advertising or publicity pertaining to
distribution of the software without written prior permission.
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. Hewlett-Packard shall not be liable for errors
contained herein or direct, indirect, special, incidental or
consequential damages in connection with the furnishing,
performance, or use of this material.
This software is not subject to any license of the American
Telephone and Telegraph Company or of the Regents of the
University of California.
******************************************************************/
#define apXK_LineDel 0x1000FF00
#define apXK_CharDel 0x1000FF01
#define apXK_Copy 0x1000FF02
#define apXK_Cut 0x1000FF03
#define apXK_Paste 0x1000FF04
#define apXK_Move 0x1000FF05
#define apXK_Grow 0x1000FF06
#define apXK_Cmd 0x1000FF07
#define apXK_Shell 0x1000FF08
#define apXK_LeftBar 0x1000FF09
#define apXK_RightBar 0x1000FF0A
#define apXK_LeftBox 0x1000FF0B
#define apXK_RightBox 0x1000FF0C
#define apXK_UpBox 0x1000FF0D
#define apXK_DownBox 0x1000FF0E
#define apXK_Pop 0x1000FF0F
#define apXK_Read 0x1000FF10
#define apXK_Edit 0x1000FF11
#define apXK_Save 0x1000FF12
#define apXK_Exit 0x1000FF13
#define apXK_Repeat 0x1000FF14
#define apXK_KP_parenleft 0x1000FFA8
#define apXK_KP_parenright 0x1000FFA9
PK NzFZ��ܝ� � ICE/ICEmsg.hnu �[��� /******************************************************************************
Copyright 1993, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Author: Ralph Mor, X Consortium
******************************************************************************/
#ifndef _ICEMSG_H_
#define _ICEMSG_H_
#include <X11/Xfuncproto.h>
#include <X11/ICE/ICEconn.h>
_XFUNCPROTOBEGIN
/*
* Function prototypes for internal ICElib functions
*/
extern Status _IceRead (
IceConn /* iceConn */,
unsigned long /* nbytes */,
char * /* ptr */
);
extern void _IceReadSkip (
IceConn /* iceConn */,
unsigned long /* nbytes */
);
extern void _IceWrite (
IceConn /* iceConn */,
unsigned long /* nbytes */,
char * /* ptr */
);
extern void _IceErrorBadMinor (
IceConn /* iceConn */,
int /* majorOpcode */,
int /* offendingMinor */,
int /* severity */
);
extern void _IceErrorBadState (
IceConn /* iceConn */,
int /* majorOpcode */,
int /* offendingMinor */,
int /* severity */
);
extern void _IceErrorBadLength (
IceConn /* iceConn */,
int /* majorOpcode */,
int /* offendingMinor */,
int /* severity */
);
extern void _IceErrorBadValue (
IceConn /* iceConn */,
int /* majorOpcode */,
int /* offendingMinor */,
int /* offset */,
int /* length */,
IcePointer /* value */
);
extern IcePoAuthStatus _IcePoMagicCookie1Proc (
IceConn /* iceConn */,
IcePointer * /* authStatePtr */,
Bool /* cleanUp */,
Bool /* swap */,
int /* authDataLen */,
IcePointer /* authData */,
int * /* replyDataLenRet */,
IcePointer * /* replyDataRet */,
char ** /* errorStringRet */
);
extern IcePaAuthStatus _IcePaMagicCookie1Proc (
IceConn /* iceConn */,
IcePointer * /* authStatePtr */,
Bool /* swap */,
int /* authDataLen */,
IcePointer /* authData */,
int * /* replyDataLenRet */,
IcePointer * /* replyDataRet */,
char ** /* errorStringRet */
);
/*
* Macro to check if IO operations are valid on an ICE connection.
*/
#define IceValidIO(_iceConn) _iceConn->io_ok
/*
* Macros for writing messages.
*/
#define IceGetHeader(_iceConn, _major, _minor, _headerSize, _msgType, _pMsg) \
if ((_iceConn->outbufptr + _headerSize) > _iceConn->outbufmax) \
IceFlush (_iceConn); \
_pMsg = (_msgType *) _iceConn->outbufptr; \
_pMsg->majorOpcode = _major; \
_pMsg->minorOpcode = _minor; \
_pMsg->length = (_headerSize - SIZEOF (iceMsg)) >> 3; \
_iceConn->outbufptr += _headerSize; \
_iceConn->send_sequence++
#define IceGetHeaderExtra(_iceConn, _major, _minor, _headerSize, _extra, _msgType, _pMsg, _pData) \
if ((_iceConn->outbufptr + \
_headerSize + ((_extra) << 3)) > _iceConn->outbufmax) \
IceFlush (_iceConn); \
_pMsg = (_msgType *) _iceConn->outbufptr; \
if ((_iceConn->outbufptr + \
_headerSize + ((_extra) << 3)) <= _iceConn->outbufmax) \
_pData = (char *) _pMsg + _headerSize; \
else \
_pData = NULL; \
_pMsg->majorOpcode = _major; \
_pMsg->minorOpcode = _minor; \
_pMsg->length = ((_headerSize - SIZEOF (iceMsg)) >> 3) + (_extra); \
_iceConn->outbufptr += (_headerSize + ((_extra) << 3)); \
_iceConn->send_sequence++
#define IceSimpleMessage(_iceConn, _major, _minor) \
{ \
iceMsg *_pMsg; \
IceGetHeader (_iceConn, _major, _minor, SIZEOF (iceMsg), iceMsg, _pMsg); \
}
#define IceErrorHeader(_iceConn, _offendingMajorOpcode, _offendingMinorOpcode, _offendingSequenceNum, _severity, _errorClass, _dataLength) \
{ \
iceErrorMsg *_pMsg; \
\
IceGetHeader (_iceConn, _offendingMajorOpcode, ICE_Error, \
SIZEOF (iceErrorMsg), iceErrorMsg, _pMsg); \
_pMsg->length += (_dataLength); \
_pMsg->offendingMinorOpcode = (CARD8) _offendingMinorOpcode; \
_pMsg->severity = (CARD8) _severity; \
_pMsg->offendingSequenceNum = (CARD32) _offendingSequenceNum; \
_pMsg->errorClass = (CARD16) _errorClass; \
}
/*
* Write data into the ICE output buffer.
*/
#define IceWriteData(_iceConn, _bytes, _data) \
{ \
if ((_iceConn->outbufptr + (_bytes)) > _iceConn->outbufmax) \
{ \
IceFlush (_iceConn); \
_IceWrite (_iceConn, (unsigned long) (_bytes), _data); \
} \
else \
{ \
memcpy (_iceConn->outbufptr, _data, _bytes); \
_iceConn->outbufptr += (_bytes); \
} \
}
#define IceWriteData16(_iceConn, _bytes, _data) \
IceWriteData (_iceConn, _bytes, (char *) _data)
#define IceWriteData32(_iceConn, _bytes, _data) \
IceWriteData (_iceConn, _bytes, (char *) _data)
/*
* The IceSendData macro bypasses copying the data to the
* ICE connection buffer and sends the data directly. If necessary,
* the ICE connection buffer is first flushed.
*/
#define IceSendData(_iceConn, _bytes, _data) \
{ \
if (_iceConn->outbufptr > _iceConn->outbuf) \
IceFlush (_iceConn); \
_IceWrite (_iceConn, (unsigned long) (_bytes), _data); \
}
/*
* Write pad bytes. Used to force 32 or 64 bit alignment.
* A maximum of 7 pad bytes can be specified.
*/
#define IceWritePad(_iceConn, _bytes) \
{ \
if ((_iceConn->outbufptr + (_bytes)) > _iceConn->outbufmax) \
{ \
char _dummy[7] = { 0 }; \
IceFlush (_iceConn); \
_IceWrite (_iceConn, (unsigned long) (_bytes), _dummy); \
} \
else \
{ \
_iceConn->outbufptr += (_bytes); \
} \
}
/*
* Macros for reading messages.
*/
#define IceReadCompleteMessage(_iceConn, _headerSize, _msgType, _pMsg, _pData)\
{ \
unsigned long _bytes; \
IceReadMessageHeader (_iceConn, _headerSize, _msgType, _pMsg); \
_bytes = (_pMsg->length << 3) - (_headerSize - SIZEOF (iceMsg)); \
if ((_iceConn->inbufmax - _iceConn->inbufptr) >= _bytes) \
{ \
_IceRead (_iceConn, _bytes, _iceConn->inbufptr); \
_pData = _iceConn->inbufptr; \
_iceConn->inbufptr += _bytes; \
} \
else \
{ \
_pData = malloc (_bytes); \
if (_pData) \
_IceRead (_iceConn, _bytes, _pData); \
else \
_IceReadSkip (_iceConn, _bytes); \
} \
}
#define IceDisposeCompleteMessage(_iceConn, _pData) \
if ((char *) _pData < _iceConn->inbuf || \
(char *) _pData >= _iceConn->inbufmax) \
free (_pData);
#define IceReadSimpleMessage(_iceConn, _msgType, _pMsg) \
_pMsg = (_msgType *) (_iceConn->inbuf);
#define IceReadMessageHeader(_iceConn, _headerSize, _msgType, _pMsg) \
{ \
_IceRead (_iceConn, \
(unsigned long) (_headerSize - SIZEOF (iceMsg)), \
_iceConn->inbufptr); \
_pMsg = (_msgType *) (_iceConn->inbuf); \
_iceConn->inbufptr += (_headerSize - SIZEOF (iceMsg)); \
}
#define IceReadData(_iceConn, _bytes, _pData) \
_IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
#define IceReadData16(_iceConn, _swap, _bytes, _pData) \
{ \
_IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
}
#define IceReadData32(_iceConn, _swap, _bytes, _pData) \
{ \
_IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
}
/*
* Read pad bytes (for 32 or 64 bit alignment).
* A maxium of 7 pad bytes can be specified.
*/
#define IceReadPad(_iceConn, _bytes) \
{ \
char _dummy[7]; \
_IceRead (_iceConn, (unsigned long) (_bytes), _dummy); \
}
_XFUNCPROTOEND
#endif /* _ICEMSG_H_ */
PK NzFZ����&