minimize X headers required
This commit is contained in:
parent
2228aa12ad
commit
6367a40d0c
334 changed files with 0 additions and 73528 deletions
119
X11/CallbackI.h
119
X11/CallbackI.h
|
|
@ -1,119 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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
|
||||
102
X11/Composite.h
102
X11/Composite.h
|
|
@ -1,102 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _XtComposite_h
|
||||
#define _XtComposite_h
|
||||
|
||||
typedef struct _CompositeClassRec *CompositeWidgetClass;
|
||||
|
||||
typedef Cardinal (*XtOrderProc)(
|
||||
Widget /* child */
|
||||
);
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern void XtManageChildren(
|
||||
WidgetList /* children */,
|
||||
Cardinal /* num_children */
|
||||
);
|
||||
|
||||
extern void XtManageChild(
|
||||
Widget /* child */
|
||||
);
|
||||
|
||||
extern void XtUnmanageChildren(
|
||||
WidgetList /* children */,
|
||||
Cardinal /* num_children */
|
||||
);
|
||||
|
||||
extern void XtUnmanageChild(
|
||||
Widget /* child */
|
||||
);
|
||||
|
||||
typedef void (*XtDoChangeProc)(
|
||||
Widget /* composite_parent */,
|
||||
WidgetList /* unmanage_children */,
|
||||
Cardinal * /* num_unmanage_children */,
|
||||
WidgetList /* manage_children */,
|
||||
Cardinal * /* num_manage_children */,
|
||||
XtPointer /* client_data */
|
||||
);
|
||||
|
||||
extern void XtChangeManagedSet(
|
||||
WidgetList /* unmanage_children */,
|
||||
Cardinal /* num_unmanage_children */,
|
||||
XtDoChangeProc /* do_change_proc */,
|
||||
XtPointer /* client_data */,
|
||||
WidgetList /* manage_children */,
|
||||
Cardinal /* num_manage_children */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#ifndef VMS
|
||||
externalref WidgetClass compositeWidgetClass;
|
||||
#endif
|
||||
|
||||
#endif /* _XtComposite_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
113
X11/CompositeP.h
113
X11/CompositeP.h
|
|
@ -1,113 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _XtCompositeP_h
|
||||
#define _XtCompositeP_h
|
||||
|
||||
#include <X11/Composite.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* Additional instance fields for widgets of (sub)class 'Composite'
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
typedef struct _CompositePart {
|
||||
WidgetList children; /* array of ALL widget children */
|
||||
Cardinal num_children; /* total number of widget children */
|
||||
Cardinal num_slots; /* number of slots in children array */
|
||||
XtOrderProc insert_position; /* compute position of new child */
|
||||
} CompositePart,*CompositePtr;
|
||||
|
||||
typedef struct _CompositeRec {
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
} CompositeRec;
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* Additional class fields for widgets of (sub)class 'Composite'
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
typedef struct _CompositeClassPart {
|
||||
XtGeometryHandler geometry_manager; /* geometry manager for children */
|
||||
XtWidgetProc change_managed; /* change managed state of child */
|
||||
XtWidgetProc insert_child; /* physically add child to parent */
|
||||
XtWidgetProc delete_child; /* physically remove child */
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} CompositeClassPart,*CompositePartPtr;
|
||||
|
||||
typedef struct {
|
||||
XtPointer next_extension; /* 1st 4 mandated for all extension records */
|
||||
XrmQuark record_type; /* NULLQUARK; on CompositeClassPart */
|
||||
long version; /* must be XtCompositeExtensionVersion */
|
||||
Cardinal record_size; /* sizeof(CompositeClassExtensionRec) */
|
||||
Boolean accepts_objects;
|
||||
Boolean allows_change_managed_set;
|
||||
} CompositeClassExtensionRec, *CompositeClassExtension;
|
||||
|
||||
|
||||
typedef struct _CompositeClassRec {
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
} CompositeClassRec;
|
||||
|
||||
externalref CompositeClassRec compositeClassRec;
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#define XtCompositeExtensionVersion 2L
|
||||
#define XtInheritGeometryManager ((XtGeometryHandler) _XtInherit)
|
||||
#define XtInheritChangeManaged ((XtWidgetProc) _XtInherit)
|
||||
#define XtInheritInsertChild ((XtWidgetProc) _XtInherit)
|
||||
#define XtInheritDeleteChild ((XtWidgetProc) _XtInherit)
|
||||
|
||||
#endif /* _XtCompositeP_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _XtConstraintP_h
|
||||
#define _XtConstraintP_h
|
||||
|
||||
#include <X11/Constraint.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
typedef struct _ConstraintPart {
|
||||
XtPointer mumble; /* No new fields, keep C compiler happy */
|
||||
} ConstraintPart;
|
||||
|
||||
typedef struct _ConstraintRec {
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
ConstraintPart constraint;
|
||||
} ConstraintRec, *ConstraintWidget;
|
||||
|
||||
typedef struct _ConstraintClassPart {
|
||||
XtResourceList resources; /* constraint resource list */
|
||||
Cardinal num_resources; /* number of constraints in list */
|
||||
Cardinal constraint_size; /* size of constraint record */
|
||||
XtInitProc initialize; /* constraint initialization */
|
||||
XtWidgetProc destroy; /* constraint destroy proc */
|
||||
XtSetValuesFunc set_values; /* constraint set_values proc */
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} ConstraintClassPart;
|
||||
|
||||
typedef struct {
|
||||
XtPointer next_extension; /* 1st 4 mandated for all extension records */
|
||||
XrmQuark record_type; /* NULLQUARK; on ConstraintClassPart */
|
||||
long version; /* must be XtConstraintExtensionVersion */
|
||||
Cardinal record_size; /* sizeof(ConstraintClassExtensionRec) */
|
||||
XtArgsProc get_values_hook;
|
||||
} ConstraintClassExtensionRec, *ConstraintClassExtension;
|
||||
|
||||
typedef struct _ConstraintClassRec {
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
ConstraintClassPart constraint_class;
|
||||
} ConstraintClassRec;
|
||||
|
||||
externalref ConstraintClassRec constraintClassRec;
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#define XtConstraintExtensionVersion 1L
|
||||
|
||||
#endif /* _XtConstraintP_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 */
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/* Representation types */
|
||||
|
||||
extern XrmQuark _XtQString;
|
||||
|
||||
/*
|
||||
* Resource conversions
|
||||
*/
|
||||
|
||||
typedef struct _ConverterRec **ConverterTable;
|
||||
|
||||
extern void _XtAddDefaultConverters(
|
||||
ConverterTable /* table */
|
||||
);
|
||||
|
||||
extern void _XtSetDefaultConverterTable(
|
||||
ConverterTable* /* table */
|
||||
);
|
||||
|
||||
extern void _XtFreeConverterTable(
|
||||
ConverterTable /* table */
|
||||
);
|
||||
|
||||
extern void _XtTableAddConverter(
|
||||
ConverterTable /* table */,
|
||||
XrmRepresentation /* from_type */,
|
||||
XrmRepresentation /* to_type */,
|
||||
XtTypeConverter /* converter */,
|
||||
XtConvertArgList /* convert_args */,
|
||||
Cardinal /* num_args */,
|
||||
_XtBoolean /* new_style */,
|
||||
XtCacheType /* cache_type */,
|
||||
XtDestructor /* destructor */,
|
||||
_XtBoolean /* global */
|
||||
);
|
||||
|
||||
extern Boolean _XtConvert(
|
||||
Widget /* widget */,
|
||||
XrmRepresentation /* from_type */,
|
||||
XrmValuePtr /* from */,
|
||||
XrmRepresentation /* to_type */,
|
||||
XrmValuePtr /* to */,
|
||||
XtCacheRef* /* cache_ref_return */
|
||||
);
|
||||
|
||||
void _XtConvertInitialize(void);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
65
X11/Core.h
65
X11/Core.h
|
|
@ -1,65 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _XtCore_h
|
||||
#define _XtCore_h
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
typedef struct _WidgetClassRec *CoreWidgetClass;
|
||||
typedef struct _WidgetRec *CoreWidget;
|
||||
externalref WidgetClass coreWidgetClass;
|
||||
|
||||
#ifndef VMS
|
||||
externalref WidgetClass widgetClass;
|
||||
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtCore_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
170
X11/CoreP.h
170
X11/CoreP.h
|
|
@ -1,170 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 XtCoreP_h
|
||||
#define XtCoreP_h
|
||||
|
||||
#include <X11/Core.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
externalref int _XtInheritTranslations;
|
||||
|
||||
#define XtInheritTranslations ((String) &_XtInheritTranslations)
|
||||
#define XtInheritRealize ((XtRealizeProc) _XtInherit)
|
||||
#define XtInheritResize ((XtWidgetProc) _XtInherit)
|
||||
#define XtInheritExpose ((XtExposeProc) _XtInherit)
|
||||
#define XtInheritSetValuesAlmost ((XtAlmostProc) _XtInherit)
|
||||
#define XtInheritAcceptFocus ((XtAcceptFocusProc) _XtInherit)
|
||||
#define XtInheritQueryGeometry ((XtGeometryHandler) _XtInherit)
|
||||
#define XtInheritDisplayAccelerator ((XtStringProc) _XtInherit)
|
||||
|
||||
/***************************************************************
|
||||
* Widget Core Data Structures
|
||||
*
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
typedef struct _CorePart {
|
||||
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 */
|
||||
Position x, y; /* window position */
|
||||
Dimension width, height; /* window dimensions */
|
||||
Dimension border_width; /* window border width */
|
||||
Boolean managed; /* is widget geometry managed? */
|
||||
Boolean sensitive; /* is widget sensitive to user events*/
|
||||
Boolean ancestor_sensitive; /* are all ancestors sensitive? */
|
||||
XtEventTable event_table; /* private to event dispatcher */
|
||||
XtTMRec tm; /* translation management */
|
||||
XtTranslations accelerators; /* accelerator translations */
|
||||
Pixel border_pixel; /* window border pixel */
|
||||
Pixmap border_pixmap; /* window border pixmap or NULL */
|
||||
WidgetList popup_list; /* list of popups */
|
||||
Cardinal num_popups; /* how many popups */
|
||||
String name; /* widget resource name */
|
||||
Screen *screen; /* window's screen */
|
||||
Colormap colormap; /* colormap */
|
||||
Window window; /* window ID */
|
||||
Cardinal depth; /* number of planes in window */
|
||||
Pixel background_pixel; /* window background pixel */
|
||||
Pixmap background_pixmap; /* window background pixmap or NULL */
|
||||
Boolean visible; /* is window mapped and not occluded?*/
|
||||
Boolean mapped_when_managed;/* map window if it's managed? */
|
||||
} CorePart;
|
||||
|
||||
typedef struct _WidgetRec {
|
||||
CorePart core;
|
||||
} WidgetRec, CoreRec;
|
||||
|
||||
|
||||
|
||||
/******************************************************************
|
||||
*
|
||||
* Core Class Structure. Widgets, regardless of their class, will have
|
||||
* these fields. All widgets of a given class will have the same values
|
||||
* for these fields. Widgets of a given class may also have additional
|
||||
* common fields. These additional fields are included in incremental
|
||||
* class structures, such as CommandClass.
|
||||
*
|
||||
* The fields that are specific to this subclass, as opposed to fields that
|
||||
* are part of the superclass, are called "subclass fields" below. Many
|
||||
* procedures are responsible only for the subclass fields, and not for
|
||||
* any superclass fields.
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
typedef struct _CoreClassPart {
|
||||
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 */
|
||||
XtRealizeProc realize; /* XCreateWindow for widget */
|
||||
XtActionList actions; /* widget semantics name to proc map */
|
||||
Cardinal num_actions; /* number of entries in actions */
|
||||
XtResourceList resources; /* resources for subclass fields */
|
||||
Cardinal num_resources; /* number of entries in resources */
|
||||
XrmClass xrm_class; /* resource class quarkified */
|
||||
Boolean compress_motion; /* compress MotionNotify for widget */
|
||||
XtEnum compress_exposure; /* compress Expose events for widget*/
|
||||
Boolean compress_enterleave;/* compress enter and leave events */
|
||||
Boolean visible_interest; /* select for VisibilityNotify */
|
||||
XtWidgetProc destroy; /* free data for subclass pointers */
|
||||
XtWidgetProc resize; /* geom manager changed widget size */
|
||||
XtExposeProc expose; /* rediplay window */
|
||||
XtSetValuesFunc set_values; /* set subclass resource values */
|
||||
XtArgsFunc set_values_hook; /* notify that set_values called */
|
||||
XtAlmostProc set_values_almost; /* set_values got "Almost" geo reply */
|
||||
XtArgsProc get_values_hook; /* notify that get_values called */
|
||||
XtAcceptFocusProc accept_focus; /* assign input focus to widget */
|
||||
XtVersionType version; /* version of intrinsics used */
|
||||
XtPointer callback_private; /* list of callback offsets */
|
||||
String tm_table; /* state machine */
|
||||
XtGeometryHandler query_geometry; /* return preferred geometry */
|
||||
XtStringProc display_accelerator;/* display your accelerator */
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} CoreClassPart;
|
||||
|
||||
typedef struct _WidgetClassRec {
|
||||
CoreClassPart core_class;
|
||||
} WidgetClassRec, CoreClassRec;
|
||||
|
||||
externalref WidgetClassRec widgetClassRec;
|
||||
#define coreClassRec widgetClassRec
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtCoreP_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef _XtcreateI_h
|
||||
#define _XtcreateI_h
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern Widget _XtCreateWidget(String name, WidgetClass widget_class,
|
||||
Widget parent, ArgList args, Cardinal num_args,
|
||||
XtTypedArgList typed_args,
|
||||
Cardinal num_typed_args);
|
||||
extern Widget _XtCreatePopupShell(String name, WidgetClass widget_class,
|
||||
Widget parent, ArgList args,
|
||||
Cardinal num_args, XtTypedArgList typed_args,
|
||||
Cardinal num_typed_args);
|
||||
extern Widget _XtAppCreateShell(String name, String class,
|
||||
WidgetClass widget_class, Display *display,
|
||||
ArgList args, Cardinal num_args,
|
||||
XtTypedArgList typed_args,
|
||||
Cardinal num_typed_args);
|
||||
extern Widget _XtCreateHookObj(Screen *screen);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/* VarCreate.c */
|
||||
extern Widget _XtVaOpenApplication(XtAppContext *app_context_return,
|
||||
_Xconst char* application_class,
|
||||
XrmOptionDescList options, Cardinal num_options,
|
||||
int *argc_in_out, String *argv_in_out,
|
||||
String *fallback_resources, WidgetClass widget_class,
|
||||
va_list var_args);
|
||||
extern Widget _XtVaAppInitialize(XtAppContext *app_context_return,
|
||||
_Xconst char* application_class,
|
||||
XrmOptionDescList options, Cardinal num_options,
|
||||
int *argc_in_out, String *argv_in_out,
|
||||
String *fallback_resources, va_list var_args);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtcreateI_h */
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
Copyright 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 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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
/*
|
||||
* DEC private keysyms
|
||||
* (29th bit set)
|
||||
*/
|
||||
|
||||
/* two-key compose sequence initiators, chosen to map to Latin1 characters */
|
||||
|
||||
#define DXK_ring_accent 0x1000FEB0
|
||||
#define DXK_circumflex_accent 0x1000FE5E
|
||||
#define DXK_cedilla_accent 0x1000FE2C
|
||||
#define DXK_acute_accent 0x1000FE27
|
||||
#define DXK_grave_accent 0x1000FE60
|
||||
#define DXK_tilde 0x1000FE7E
|
||||
#define DXK_diaeresis 0x1000FE22
|
||||
|
||||
/* special keysym for LK2** "Remove" key on editing keypad */
|
||||
|
||||
#define DXK_Remove 0x1000FF00 /* Remove */
|
||||
134
X11/EventI.h
134
X11/EventI.h
|
|
@ -1,134 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
/*
|
||||
* Event.h - exported types and functions for toolkit event handler
|
||||
*
|
||||
* Author: Charles Haynes
|
||||
* Digital Equipment Corporation
|
||||
* Western Software Laboratory
|
||||
* Date: Sun Dec 6 1987
|
||||
*/
|
||||
|
||||
#ifndef _Event_h_
|
||||
#define _Event_h_
|
||||
|
||||
typedef struct _XtGrabRec *XtGrabList;
|
||||
|
||||
#include "PassivGraI.h"
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern void _XtEventInitialize(
|
||||
void
|
||||
);
|
||||
|
||||
typedef struct _XtEventRec {
|
||||
XtEventTable next;
|
||||
EventMask mask; /* also select_data count for RecExt */
|
||||
XtEventHandler proc;
|
||||
XtPointer closure;
|
||||
unsigned int select:1;
|
||||
unsigned int has_type_specifier:1;
|
||||
unsigned int async:1; /* not used, here for Digital extension? */
|
||||
} XtEventRec;
|
||||
|
||||
typedef struct _XtGrabRec {
|
||||
XtGrabList next;
|
||||
Widget widget;
|
||||
unsigned int exclusive:1;
|
||||
unsigned int spring_loaded:1;
|
||||
}XtGrabRec;
|
||||
|
||||
typedef struct _BlockHookRec {
|
||||
struct _BlockHookRec* next;
|
||||
XtAppContext app;
|
||||
XtBlockHookProc proc;
|
||||
XtPointer closure;
|
||||
} BlockHookRec, *BlockHook;
|
||||
|
||||
extern void _XtFreeEventTable(
|
||||
XtEventTable* /* event_table */
|
||||
);
|
||||
|
||||
extern Boolean _XtOnGrabList(
|
||||
Widget /* widget */,
|
||||
XtGrabRec* /* grabList */
|
||||
);
|
||||
|
||||
extern void _XtRemoveAllInputs(
|
||||
XtAppContext /* app */
|
||||
);
|
||||
|
||||
extern void _XtRefreshMapping(
|
||||
XEvent* /* event */,
|
||||
_XtBoolean /* dispatch */
|
||||
);
|
||||
|
||||
extern void _XtSendFocusEvent(
|
||||
Widget /* child */,
|
||||
int /* type */);
|
||||
|
||||
extern EventMask _XtConvertTypeToMask(
|
||||
int /* eventType */
|
||||
);
|
||||
|
||||
/* EventUtil.c */
|
||||
extern Widget _XtFindRemapWidget(XEvent *event, Widget widget,
|
||||
EventMask mask, XtPerDisplayInput pdi);
|
||||
extern void _XtUngrabBadGrabs(XEvent *event, Widget widget,
|
||||
EventMask mask, XtPerDisplayInput pdi);
|
||||
extern void _XtFillAncestorList(Widget **listPtr, int *maxElemsPtr,
|
||||
int *numElemsPtr, Widget start,
|
||||
Widget breakWidget);
|
||||
|
||||
/* NextEvent.c */
|
||||
extern Boolean XtAppPeekEvent_SkipTimer;
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _Event_h_ */
|
||||
164
X11/HPkeysym.h
164
X11/HPkeysym.h
|
|
@ -1,164 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 1987, 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 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 names of Hewlett Packard
|
||||
or 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.
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _HPKEYSYM_H
|
||||
|
||||
#define _HPKEYSYM_H
|
||||
|
||||
#define hpXK_ClearLine 0x1000FF6F
|
||||
#define hpXK_InsertLine 0x1000FF70
|
||||
#define hpXK_DeleteLine 0x1000FF71
|
||||
#define hpXK_InsertChar 0x1000FF72
|
||||
#define hpXK_DeleteChar 0x1000FF73
|
||||
#define hpXK_BackTab 0x1000FF74
|
||||
#define hpXK_KP_BackTab 0x1000FF75
|
||||
#define hpXK_Modelock1 0x1000FF48
|
||||
#define hpXK_Modelock2 0x1000FF49
|
||||
#define hpXK_Reset 0x1000FF6C
|
||||
#define hpXK_System 0x1000FF6D
|
||||
#define hpXK_User 0x1000FF6E
|
||||
#define hpXK_mute_acute 0x100000A8
|
||||
#define hpXK_mute_grave 0x100000A9
|
||||
#define hpXK_mute_asciicircum 0x100000AA
|
||||
#define hpXK_mute_diaeresis 0x100000AB
|
||||
#define hpXK_mute_asciitilde 0x100000AC
|
||||
#define hpXK_lira 0x100000AF
|
||||
#define hpXK_guilder 0x100000BE
|
||||
#define hpXK_Ydiaeresis 0x100000EE
|
||||
#define hpXK_IO 0x100000EE
|
||||
#define hpXK_longminus 0x100000F6
|
||||
#define hpXK_block 0x100000FC
|
||||
|
||||
|
||||
#ifndef _OSF_Keysyms
|
||||
#define _OSF_Keysyms
|
||||
|
||||
#define osfXK_Copy 0x1004FF02
|
||||
#define osfXK_Cut 0x1004FF03
|
||||
#define osfXK_Paste 0x1004FF04
|
||||
#define osfXK_BackTab 0x1004FF07
|
||||
#define osfXK_BackSpace 0x1004FF08
|
||||
#define osfXK_Clear 0x1004FF0B
|
||||
#define osfXK_Escape 0x1004FF1B
|
||||
#define osfXK_AddMode 0x1004FF31
|
||||
#define osfXK_PrimaryPaste 0x1004FF32
|
||||
#define osfXK_QuickPaste 0x1004FF33
|
||||
#define osfXK_PageLeft 0x1004FF40
|
||||
#define osfXK_PageUp 0x1004FF41
|
||||
#define osfXK_PageDown 0x1004FF42
|
||||
#define osfXK_PageRight 0x1004FF43
|
||||
#define osfXK_Activate 0x1004FF44
|
||||
#define osfXK_MenuBar 0x1004FF45
|
||||
#define osfXK_Left 0x1004FF51
|
||||
#define osfXK_Up 0x1004FF52
|
||||
#define osfXK_Right 0x1004FF53
|
||||
#define osfXK_Down 0x1004FF54
|
||||
#define osfXK_EndLine 0x1004FF57
|
||||
#define osfXK_BeginLine 0x1004FF58
|
||||
#define osfXK_EndData 0x1004FF59
|
||||
#define osfXK_BeginData 0x1004FF5A
|
||||
#define osfXK_PrevMenu 0x1004FF5B
|
||||
#define osfXK_NextMenu 0x1004FF5C
|
||||
#define osfXK_PrevField 0x1004FF5D
|
||||
#define osfXK_NextField 0x1004FF5E
|
||||
#define osfXK_Select 0x1004FF60
|
||||
#define osfXK_Insert 0x1004FF63
|
||||
#define osfXK_Undo 0x1004FF65
|
||||
#define osfXK_Menu 0x1004FF67
|
||||
#define osfXK_Cancel 0x1004FF69
|
||||
#define osfXK_Help 0x1004FF6A
|
||||
#define osfXK_SelectAll 0x1004FF71
|
||||
#define osfXK_DeselectAll 0x1004FF72
|
||||
#define osfXK_Reselect 0x1004FF73
|
||||
#define osfXK_Extend 0x1004FF74
|
||||
#define osfXK_Restore 0x1004FF78
|
||||
#define osfXK_Delete 0x1004FFFF
|
||||
|
||||
#endif /* _OSF_Keysyms */
|
||||
|
||||
|
||||
/**************************************************************
|
||||
* The use of the following macros is deprecated.
|
||||
* They are listed below only for backwards compatibility.
|
||||
*/
|
||||
#define XK_Reset 0x1000FF6C
|
||||
#define XK_System 0x1000FF6D
|
||||
#define XK_User 0x1000FF6E
|
||||
#define XK_ClearLine 0x1000FF6F
|
||||
#define XK_InsertLine 0x1000FF70
|
||||
#define XK_DeleteLine 0x1000FF71
|
||||
#define XK_InsertChar 0x1000FF72
|
||||
#define XK_DeleteChar 0x1000FF73
|
||||
#define XK_BackTab 0x1000FF74
|
||||
#define XK_KP_BackTab 0x1000FF75
|
||||
#define XK_Ext16bit_L 0x1000FF76
|
||||
#define XK_Ext16bit_R 0x1000FF77
|
||||
#define XK_mute_acute 0x100000a8
|
||||
#define XK_mute_grave 0x100000a9
|
||||
#define XK_mute_asciicircum 0x100000aa
|
||||
#define XK_mute_diaeresis 0x100000ab
|
||||
#define XK_mute_asciitilde 0x100000ac
|
||||
#define XK_lira 0x100000af
|
||||
#define XK_guilder 0x100000be
|
||||
#ifndef XK_Ydiaeresis
|
||||
#define XK_Ydiaeresis 0x100000ee
|
||||
#endif
|
||||
#define XK_IO 0x100000ee
|
||||
#define XK_longminus 0x100000f6
|
||||
#define XK_block 0x100000fc
|
||||
|
||||
#endif /* _HPKEYSYM_H */
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
/*
|
||||
|
||||
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 */
|
||||
|
||||
|
||||
101
X11/ICE/ICE.h
101
X11/ICE/ICE.h
|
|
@ -1,101 +0,0 @@
|
|||
/******************************************************************************
|
||||
|
||||
|
||||
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 _ICE_H_
|
||||
#define _ICE_H_
|
||||
|
||||
/*
|
||||
* Protocol Version
|
||||
*/
|
||||
|
||||
#define IceProtoMajor 1
|
||||
#define IceProtoMinor 0
|
||||
|
||||
|
||||
/*
|
||||
* Byte Order
|
||||
*/
|
||||
|
||||
#define IceLSBfirst 0
|
||||
#define IceMSBfirst 1
|
||||
|
||||
|
||||
/*
|
||||
* ICE minor opcodes
|
||||
*/
|
||||
|
||||
#define ICE_Error 0
|
||||
#define ICE_ByteOrder 1
|
||||
#define ICE_ConnectionSetup 2
|
||||
#define ICE_AuthRequired 3
|
||||
#define ICE_AuthReply 4
|
||||
#define ICE_AuthNextPhase 5
|
||||
#define ICE_ConnectionReply 6
|
||||
#define ICE_ProtocolSetup 7
|
||||
#define ICE_ProtocolReply 8
|
||||
#define ICE_Ping 9
|
||||
#define ICE_PingReply 10
|
||||
#define ICE_WantToClose 11
|
||||
#define ICE_NoClose 12
|
||||
|
||||
|
||||
/*
|
||||
* Error severity
|
||||
*/
|
||||
|
||||
#define IceCanContinue 0
|
||||
#define IceFatalToProtocol 1
|
||||
#define IceFatalToConnection 2
|
||||
|
||||
|
||||
/*
|
||||
* ICE error classes that are common to all protocols
|
||||
*/
|
||||
|
||||
#define IceBadMinor 0x8000
|
||||
#define IceBadState 0x8001
|
||||
#define IceBadLength 0x8002
|
||||
#define IceBadValue 0x8003
|
||||
|
||||
|
||||
/*
|
||||
* ICE error classes that are specific to the ICE protocol
|
||||
*/
|
||||
|
||||
#define IceBadMajor 0
|
||||
#define IceNoAuth 1
|
||||
#define IceNoVersion 2
|
||||
#define IceSetupFailed 3
|
||||
#define IceAuthRejected 4
|
||||
#define IceAuthFailed 5
|
||||
#define IceProtocolDuplicate 6
|
||||
#define IceMajorOpcodeDuplicate 7
|
||||
#define IceUnknownProtocol 8
|
||||
|
||||
#endif /* _ICE_H_ */
|
||||
|
|
@ -1,250 +0,0 @@
|
|||
/******************************************************************************
|
||||
|
||||
|
||||
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 _ICECONN_H_
|
||||
#define _ICECONN_H_
|
||||
|
||||
#include <X11/ICE/ICElib.h>
|
||||
|
||||
/*
|
||||
* Data structures for ICE connection object
|
||||
*/
|
||||
|
||||
typedef struct _IceSavedReplyWait {
|
||||
IceReplyWaitInfo *reply_wait;
|
||||
Bool reply_ready;
|
||||
struct _IceSavedReplyWait *next;
|
||||
} _IceSavedReplyWait;
|
||||
|
||||
typedef struct _IcePingWait {
|
||||
IcePingReplyProc ping_reply_proc;
|
||||
IcePointer client_data;
|
||||
struct _IcePingWait *next;
|
||||
} _IcePingWait;
|
||||
|
||||
typedef struct {
|
||||
char *vendor;
|
||||
char *release;
|
||||
int version_count;
|
||||
IcePoVersionRec *version_recs;
|
||||
int auth_count;
|
||||
char **auth_names;
|
||||
IcePoAuthProc *auth_procs;
|
||||
IceIOErrorProc io_error_proc;
|
||||
} _IcePoProtocol;
|
||||
|
||||
typedef struct {
|
||||
char *vendor;
|
||||
char *release;
|
||||
int version_count;
|
||||
IcePaVersionRec *version_recs;
|
||||
IceProtocolSetupProc protocol_setup_proc;
|
||||
IceProtocolActivateProc protocol_activate_proc;
|
||||
int auth_count;
|
||||
char **auth_names;
|
||||
IcePaAuthProc *auth_procs;
|
||||
IceHostBasedAuthProc host_based_auth_proc;
|
||||
IceIOErrorProc io_error_proc;
|
||||
} _IcePaProtocol;
|
||||
|
||||
typedef struct {
|
||||
char *protocol_name;
|
||||
_IcePoProtocol *orig_client;
|
||||
_IcePaProtocol *accept_client;
|
||||
} _IceProtocol;
|
||||
|
||||
typedef struct {
|
||||
Bool in_use;
|
||||
int my_opcode;
|
||||
_IceProtocol *protocol;
|
||||
IcePointer client_data;
|
||||
Bool accept_flag;
|
||||
union {
|
||||
IcePaProcessMsgProc accept_client;
|
||||
IcePoProcessMsgProc orig_client;
|
||||
} process_msg_proc;
|
||||
} _IceProcessMsgInfo;
|
||||
|
||||
typedef struct {
|
||||
int his_version_index;
|
||||
int my_version_index;
|
||||
char *his_vendor;
|
||||
char *his_release;
|
||||
char my_auth_index;
|
||||
IcePointer my_auth_state;
|
||||
Bool must_authenticate;
|
||||
} _IceConnectToMeInfo;
|
||||
|
||||
typedef struct {
|
||||
int his_opcode;
|
||||
int my_opcode;
|
||||
int his_version_index;
|
||||
int my_version_index;
|
||||
char *his_vendor;
|
||||
char *his_release;
|
||||
char my_auth_index;
|
||||
IcePointer my_auth_state;
|
||||
Bool must_authenticate;
|
||||
} _IceProtoSetupToMeInfo;
|
||||
|
||||
typedef struct {
|
||||
Bool auth_active;
|
||||
char my_auth_index;
|
||||
IcePointer my_auth_state;
|
||||
} _IceConnectToYouInfo;
|
||||
|
||||
typedef struct {
|
||||
int my_opcode;
|
||||
int my_auth_count;
|
||||
int *my_auth_indices;
|
||||
Bool auth_active;
|
||||
char my_auth_index;
|
||||
IcePointer my_auth_state;
|
||||
} _IceProtoSetupToYouInfo;
|
||||
|
||||
|
||||
struct _IceConn {
|
||||
|
||||
unsigned int io_ok : 1; /* did an IO error occur? */
|
||||
unsigned int swap : 1; /* do we need to swap on reads? */
|
||||
unsigned int waiting_for_byteorder : 1; /* waiting for a ByteOrder msg? */
|
||||
unsigned int skip_want_to_close : 1; /* avoid shutdown negotiation? */
|
||||
unsigned int want_to_close : 1; /* did we send a WantToClose? */
|
||||
unsigned int free_asap : 1; /* free as soon as possible */
|
||||
unsigned int unused1 : 2; /* future use */
|
||||
unsigned int unused2 : 8; /* future use */
|
||||
|
||||
IceConnectStatus connection_status; /* pending, accepted, rejected */
|
||||
|
||||
unsigned char my_ice_version_index; /* which version are we using? */
|
||||
|
||||
struct _XtransConnInfo *trans_conn; /* transport connection object */
|
||||
unsigned long send_sequence; /* Sequence # of last msg sent */
|
||||
unsigned long receive_sequence; /* Sequence # of last msg received */
|
||||
|
||||
char *connection_string; /* network connection string */
|
||||
char *vendor; /* other client's vendor */
|
||||
char *release; /* other client's release */
|
||||
|
||||
char *inbuf; /* Input buffer starting address */
|
||||
char *inbufptr; /* Input buffer index pointer */
|
||||
char *inbufmax; /* Input buffer maximum+1 address */
|
||||
|
||||
char *outbuf; /* Output buffer starting address */
|
||||
char *outbufptr; /* Output buffer index pointer */
|
||||
char *outbufmax; /* Output buffer maximum+1 address */
|
||||
|
||||
char *scratch; /* scratch buffer */
|
||||
unsigned long scratch_size; /* scratch size */
|
||||
|
||||
int dispatch_level; /* IceProcessMessages dispatch level */
|
||||
|
||||
IcePointer context; /* context associated with caller
|
||||
of IceOpenConnection */
|
||||
|
||||
/*
|
||||
* Before we read a message, the major opcode of the message must be
|
||||
* mapped to our corresponding major opcode (the two clients can use
|
||||
* different opcodes for the same protocol). In order to save space,
|
||||
* we keep track of the mininum and maximum major opcodes used by the
|
||||
* other client. To get the information on how to process this message,
|
||||
* we do the following...
|
||||
*
|
||||
* processMsgInfo = iceConn->process_msg_info[
|
||||
* message->majorOpcode - iceConn->his_min_opcode]
|
||||
*
|
||||
* Note that the number of elements in the iceConn->process_msg_info
|
||||
* array is always (iceConn->his_max_opcode - iceConn->his_min_opcode + 1).
|
||||
* We check process_msg_info->in_use to see if the opcode is being used.
|
||||
*/
|
||||
|
||||
_IceProcessMsgInfo *process_msg_info;
|
||||
char his_min_opcode; /* [1..255] */
|
||||
char his_max_opcode; /* [1..255] */
|
||||
|
||||
|
||||
/*
|
||||
* Number of times this iceConn was returned in IceOpenConnection
|
||||
* or IceAcceptConnection.
|
||||
*/
|
||||
|
||||
unsigned char open_ref_count;
|
||||
|
||||
|
||||
/*
|
||||
* Number of active protocols.
|
||||
*/
|
||||
|
||||
unsigned char proto_ref_count;
|
||||
|
||||
|
||||
/*
|
||||
* If this ICE connection was created with IceAcceptConnection,
|
||||
* the listen_obj field is set to the listen object. Otherwise,
|
||||
* the listen_obj field is NULL.
|
||||
*/
|
||||
|
||||
IceListenObj listen_obj;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* We need to keep track of all the replies we're waiting for.
|
||||
* Check the comments in process.c for how this works.
|
||||
*/
|
||||
|
||||
_IceSavedReplyWait *saved_reply_waits;
|
||||
|
||||
|
||||
/*
|
||||
* We keep track of all Pings sent from the client. When the Ping reply
|
||||
* arrives, we remove it from the list.
|
||||
*/
|
||||
|
||||
_IcePingWait *ping_waits;
|
||||
|
||||
|
||||
/*
|
||||
* Some state for a client doing a Connection/Protocol Setup
|
||||
*/
|
||||
|
||||
_IceConnectToYouInfo *connect_to_you;
|
||||
_IceProtoSetupToYouInfo *protosetup_to_you;
|
||||
|
||||
|
||||
/*
|
||||
* Some state for a client receiving a Connection/Protocol Setup
|
||||
*/
|
||||
|
||||
_IceConnectToMeInfo *connect_to_me;
|
||||
_IceProtoSetupToMeInfo *protosetup_to_me;
|
||||
|
||||
};
|
||||
|
||||
#endif /* _ICECONN_H_ */
|
||||
431
X11/ICE/ICElib.h
431
X11/ICE/ICElib.h
|
|
@ -1,431 +0,0 @@
|
|||
/******************************************************************************
|
||||
|
||||
|
||||
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 _ICELIB_H_
|
||||
#define _ICELIB_H_
|
||||
|
||||
#include <X11/ICE/ICE.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
#define Bool int
|
||||
#define Status int
|
||||
#define True 1
|
||||
#define False 0
|
||||
|
||||
typedef void *IcePointer;
|
||||
|
||||
typedef enum {
|
||||
IcePoAuthHaveReply,
|
||||
IcePoAuthRejected,
|
||||
IcePoAuthFailed,
|
||||
IcePoAuthDoneCleanup
|
||||
} IcePoAuthStatus;
|
||||
|
||||
typedef enum {
|
||||
IcePaAuthContinue,
|
||||
IcePaAuthAccepted,
|
||||
IcePaAuthRejected,
|
||||
IcePaAuthFailed
|
||||
} IcePaAuthStatus;
|
||||
|
||||
typedef enum {
|
||||
IceConnectPending,
|
||||
IceConnectAccepted,
|
||||
IceConnectRejected,
|
||||
IceConnectIOError
|
||||
} IceConnectStatus;
|
||||
|
||||
typedef enum {
|
||||
IceProtocolSetupSuccess,
|
||||
IceProtocolSetupFailure,
|
||||
IceProtocolSetupIOError,
|
||||
IceProtocolAlreadyActive
|
||||
} IceProtocolSetupStatus;
|
||||
|
||||
typedef enum {
|
||||
IceAcceptSuccess,
|
||||
IceAcceptFailure,
|
||||
IceAcceptBadMalloc
|
||||
} IceAcceptStatus;
|
||||
|
||||
typedef enum {
|
||||
IceClosedNow,
|
||||
IceClosedASAP,
|
||||
IceConnectionInUse,
|
||||
IceStartedShutdownNegotiation
|
||||
} IceCloseStatus;
|
||||
|
||||
typedef enum {
|
||||
IceProcessMessagesSuccess,
|
||||
IceProcessMessagesIOError,
|
||||
IceProcessMessagesConnectionClosed
|
||||
} IceProcessMessagesStatus;
|
||||
|
||||
typedef struct {
|
||||
unsigned long sequence_of_request;
|
||||
int major_opcode_of_request;
|
||||
int minor_opcode_of_request;
|
||||
IcePointer reply;
|
||||
} IceReplyWaitInfo;
|
||||
|
||||
typedef struct _IceConn *IceConn;
|
||||
typedef struct _IceListenObj *IceListenObj;
|
||||
|
||||
typedef void (*IceWatchProc) (
|
||||
IceConn /* iceConn */,
|
||||
IcePointer /* clientData */,
|
||||
Bool /* opening */,
|
||||
IcePointer * /* watchData */
|
||||
);
|
||||
|
||||
typedef void (*IcePoProcessMsgProc) (
|
||||
IceConn /* iceConn */,
|
||||
IcePointer /* clientData */,
|
||||
int /* opcode */,
|
||||
unsigned long /* length */,
|
||||
Bool /* swap */,
|
||||
IceReplyWaitInfo * /* replyWait */,
|
||||
Bool * /* replyReadyRet */
|
||||
);
|
||||
|
||||
typedef void (*IcePaProcessMsgProc) (
|
||||
IceConn /* iceConn */,
|
||||
IcePointer /* clientData */,
|
||||
int /* opcode */,
|
||||
unsigned long /* length */,
|
||||
Bool /* swap */
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
int major_version;
|
||||
int minor_version;
|
||||
IcePoProcessMsgProc process_msg_proc;
|
||||
} IcePoVersionRec;
|
||||
|
||||
typedef struct {
|
||||
int major_version;
|
||||
int minor_version;
|
||||
IcePaProcessMsgProc process_msg_proc;
|
||||
} IcePaVersionRec;
|
||||
|
||||
typedef IcePoAuthStatus (*IcePoAuthProc) (
|
||||
IceConn /* iceConn */,
|
||||
IcePointer * /* authStatePtr */,
|
||||
Bool /* cleanUp */,
|
||||
Bool /* swap */,
|
||||
int /* authDataLen */,
|
||||
IcePointer /* authData */,
|
||||
int * /* replyDataLenRet */,
|
||||
IcePointer * /* replyDataRet */,
|
||||
char ** /* errorStringRet */
|
||||
);
|
||||
|
||||
typedef IcePaAuthStatus (*IcePaAuthProc) (
|
||||
IceConn /* iceConn */,
|
||||
IcePointer * /* authStatePtr */,
|
||||
Bool /* swap */,
|
||||
int /* authDataLen */,
|
||||
IcePointer /* authData */,
|
||||
int * /* replyDataLenRet */,
|
||||
IcePointer * /* replyDataRet */,
|
||||
char ** /* errorStringRet */
|
||||
);
|
||||
|
||||
typedef Bool (*IceHostBasedAuthProc) (
|
||||
char * /* hostName */
|
||||
);
|
||||
|
||||
typedef Status (*IceProtocolSetupProc) (
|
||||
IceConn /* iceConn */,
|
||||
int /* majorVersion */,
|
||||
int /* minorVersion */,
|
||||
char * /* vendor */,
|
||||
char * /* release */,
|
||||
IcePointer * /* clientDataRet */,
|
||||
char ** /* failureReasonRet */
|
||||
);
|
||||
|
||||
typedef void (*IceProtocolActivateProc) (
|
||||
IceConn /* iceConn */,
|
||||
IcePointer /* clientData */
|
||||
);
|
||||
|
||||
typedef void (*IceIOErrorProc) (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
typedef void (*IcePingReplyProc) (
|
||||
IceConn /* iceConn */,
|
||||
IcePointer /* clientData */
|
||||
);
|
||||
|
||||
typedef void (*IceErrorHandler) (
|
||||
IceConn /* iceConn */,
|
||||
Bool /* swap */,
|
||||
int /* offendingMinorOpcode */,
|
||||
unsigned long /* offendingSequence */,
|
||||
int /* errorClass */,
|
||||
int /* severity */,
|
||||
IcePointer /* values */
|
||||
);
|
||||
|
||||
typedef void (*IceIOErrorHandler) (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* Function prototypes
|
||||
*/
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern int IceRegisterForProtocolSetup (
|
||||
const char * /* protocolName */,
|
||||
const char * /* vendor */,
|
||||
const char * /* release */,
|
||||
int /* versionCount */,
|
||||
IcePoVersionRec * /* versionRecs */,
|
||||
int /* authCount */,
|
||||
const char ** /* authNames */,
|
||||
IcePoAuthProc * /* authProcs */,
|
||||
IceIOErrorProc /* IOErrorProc */
|
||||
);
|
||||
|
||||
extern int IceRegisterForProtocolReply (
|
||||
const char * /* protocolName */,
|
||||
const char * /* vendor */,
|
||||
const char * /* release */,
|
||||
int /* versionCount */,
|
||||
IcePaVersionRec * /* versionRecs */,
|
||||
int /* authCount */,
|
||||
const char ** /* authNames */,
|
||||
IcePaAuthProc * /* authProcs */,
|
||||
IceHostBasedAuthProc /* hostBasedAuthProc */,
|
||||
IceProtocolSetupProc /* protocolSetupProc */,
|
||||
IceProtocolActivateProc /* protocolActivateProc */,
|
||||
IceIOErrorProc /* IOErrorProc */
|
||||
);
|
||||
|
||||
extern IceConn IceOpenConnection (
|
||||
char * /* networkIdsList */,
|
||||
IcePointer /* context */,
|
||||
Bool /* mustAuthenticate */,
|
||||
int /* majorOpcodeCheck */,
|
||||
int /* errorLength */,
|
||||
char * /* errorStringRet */
|
||||
);
|
||||
|
||||
extern IcePointer IceGetConnectionContext (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern Status IceListenForConnections (
|
||||
int * /* countRet */,
|
||||
IceListenObj ** /* listenObjsRet */,
|
||||
int /* errorLength */,
|
||||
char * /* errorStringRet */
|
||||
);
|
||||
|
||||
extern Status IceListenForWellKnownConnections (
|
||||
char * /* port */,
|
||||
int * /* countRet */,
|
||||
IceListenObj ** /* listenObjsRet */,
|
||||
int /* errorLength */,
|
||||
char * /* errorStringRet */
|
||||
);
|
||||
|
||||
extern int IceGetListenConnectionNumber (
|
||||
IceListenObj /* listenObj */
|
||||
);
|
||||
|
||||
extern char *IceGetListenConnectionString (
|
||||
IceListenObj /* listenObj */
|
||||
);
|
||||
|
||||
extern char *IceComposeNetworkIdList (
|
||||
int /* count */,
|
||||
IceListenObj * /* listenObjs */
|
||||
);
|
||||
|
||||
extern void IceFreeListenObjs (
|
||||
int /* count */,
|
||||
IceListenObj * /* listenObjs */
|
||||
);
|
||||
|
||||
extern void IceSetHostBasedAuthProc (
|
||||
IceListenObj /* listenObj */,
|
||||
IceHostBasedAuthProc /* hostBasedAuthProc */
|
||||
);
|
||||
|
||||
extern IceConn IceAcceptConnection (
|
||||
IceListenObj /* listenObj */,
|
||||
IceAcceptStatus * /* statusRet */
|
||||
);
|
||||
|
||||
extern void IceSetShutdownNegotiation (
|
||||
IceConn /* iceConn */,
|
||||
Bool /* negotiate */
|
||||
);
|
||||
|
||||
extern Bool IceCheckShutdownNegotiation (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern IceCloseStatus IceCloseConnection (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern Status IceAddConnectionWatch (
|
||||
IceWatchProc /* watchProc */,
|
||||
IcePointer /* clientData */
|
||||
);
|
||||
|
||||
extern void IceRemoveConnectionWatch (
|
||||
IceWatchProc /* watchProc */,
|
||||
IcePointer /* clientData */
|
||||
);
|
||||
|
||||
extern IceProtocolSetupStatus IceProtocolSetup (
|
||||
IceConn /* iceConn */,
|
||||
int /* myOpcode */,
|
||||
IcePointer /* clientData */,
|
||||
Bool /* mustAuthenticate */,
|
||||
int * /* majorVersionRet */,
|
||||
int * /* minorVersionRet */,
|
||||
char ** /* vendorRet */,
|
||||
char ** /* releaseRet */,
|
||||
int /* errorLength */,
|
||||
char * /* errorStringRet */
|
||||
);
|
||||
|
||||
extern Status IceProtocolShutdown (
|
||||
IceConn /* iceConn */,
|
||||
int /* majorOpcode */
|
||||
);
|
||||
|
||||
extern IceProcessMessagesStatus IceProcessMessages (
|
||||
IceConn /* iceConn */,
|
||||
IceReplyWaitInfo * /* replyWait */,
|
||||
Bool * /* replyReadyRet */
|
||||
);
|
||||
|
||||
extern Status IcePing (
|
||||
IceConn /* iceConn */,
|
||||
IcePingReplyProc /* pingReplyProc */,
|
||||
IcePointer /* clientData */
|
||||
);
|
||||
|
||||
extern char *IceAllocScratch (
|
||||
IceConn /* iceConn */,
|
||||
unsigned long /* size */
|
||||
);
|
||||
|
||||
extern int IceFlush (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern int IceGetOutBufSize (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern int IceGetInBufSize (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern IceConnectStatus IceConnectionStatus (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern char *IceVendor (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern char *IceRelease (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern int IceProtocolVersion (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern int IceProtocolRevision (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern int IceConnectionNumber (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern char *IceConnectionString (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern unsigned long IceLastSentSequenceNumber (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern unsigned long IceLastReceivedSequenceNumber (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern Bool IceSwapping (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern IceErrorHandler IceSetErrorHandler (
|
||||
IceErrorHandler /* handler */
|
||||
);
|
||||
|
||||
extern IceIOErrorHandler IceSetIOErrorHandler (
|
||||
IceIOErrorHandler /* handler */
|
||||
);
|
||||
|
||||
extern char *IceGetPeerName (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
/*
|
||||
* Multithread Routines
|
||||
*/
|
||||
|
||||
extern Status IceInitThreads (
|
||||
void
|
||||
);
|
||||
|
||||
extern void IceAppLockConn (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
extern void IceAppUnlockConn (
|
||||
IceConn /* iceConn */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _ICELIB_H_ */
|
||||
300
X11/ICE/ICEmsg.h
300
X11/ICE/ICEmsg.h
|
|
@ -1,300 +0,0 @@
|
|||
/******************************************************************************
|
||||
|
||||
|
||||
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_ */
|
||||
|
|
@ -1,175 +0,0 @@
|
|||
/******************************************************************************
|
||||
|
||||
|
||||
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 _ICEPROTO_H_
|
||||
#define _ICEPROTO_H_
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 data[2];
|
||||
CARD32 length B32;
|
||||
} iceMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD16 errorClass B16;
|
||||
CARD32 length B32;
|
||||
CARD8 offendingMinorOpcode;
|
||||
CARD8 severity;
|
||||
CARD16 unused B16;
|
||||
CARD32 offendingSequenceNum B32;
|
||||
/* n varying values */
|
||||
/* p p = pad (n, 8) */
|
||||
} iceErrorMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 byteOrder;
|
||||
CARD8 unused;
|
||||
CARD32 length B32;
|
||||
} iceByteOrderMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 versionCount;
|
||||
CARD8 authCount;
|
||||
CARD32 length B32;
|
||||
CARD8 mustAuthenticate;
|
||||
CARD8 unused[7];
|
||||
/* i STRING vendor */
|
||||
/* j STRING release */
|
||||
/* k LIST of STRING authentication-protocol-names */
|
||||
/* m LIST of VERSION version-list */
|
||||
/* p p = pad (i+j+k+m, 8) */
|
||||
} iceConnectionSetupMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 authIndex;
|
||||
CARD8 unused1;
|
||||
CARD32 length B32;
|
||||
CARD16 authDataLength B16;
|
||||
CARD8 unused2[6];
|
||||
/* n varying data */
|
||||
/* p p = pad (n, 8) */
|
||||
} iceAuthRequiredMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused1[2];
|
||||
CARD32 length B32;
|
||||
CARD16 authDataLength B16;
|
||||
CARD8 unused2[6];
|
||||
/* n varying data */
|
||||
/* p p = pad (n, 8) */
|
||||
} iceAuthReplyMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused1[2];
|
||||
CARD32 length B32;
|
||||
CARD16 authDataLength B16;
|
||||
CARD8 unused2[6];
|
||||
/* n varying data */
|
||||
/* p p = pad (n, 8) */
|
||||
} iceAuthNextPhaseMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 versionIndex;
|
||||
CARD8 unused;
|
||||
CARD32 length B32;
|
||||
/* i STRING vendor */
|
||||
/* j STRING release */
|
||||
/* p p = pad (i+j, 8) */
|
||||
} iceConnectionReplyMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 protocolOpcode;
|
||||
CARD8 mustAuthenticate;
|
||||
CARD32 length B32;
|
||||
CARD8 versionCount;
|
||||
CARD8 authCount;
|
||||
CARD8 unused[6];
|
||||
/* i STRING protocol-name */
|
||||
/* j STRING vendor */
|
||||
/* k STRING release */
|
||||
/* m LIST of STRING authentication-protocol-names */
|
||||
/* n LIST of VERSION version-list */
|
||||
/* p p = pad (i+j+k+m+n, 8) */
|
||||
} iceProtocolSetupMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 versionIndex;
|
||||
CARD8 protocolOpcode;
|
||||
CARD32 length B32;
|
||||
/* i STRING vendor */
|
||||
/* j STRING release */
|
||||
/* p p = pad (i+j, 8) */
|
||||
} iceProtocolReplyMsg;
|
||||
|
||||
typedef iceMsg icePingMsg;
|
||||
typedef iceMsg icePingReplyMsg;
|
||||
typedef iceMsg iceWantToCloseMsg;
|
||||
typedef iceMsg iceNoCloseMsg;
|
||||
|
||||
|
||||
/*
|
||||
* SIZEOF values. These better be multiples of 8.
|
||||
*/
|
||||
|
||||
#define sz_iceMsg 8
|
||||
#define sz_iceErrorMsg 16
|
||||
#define sz_iceByteOrderMsg 8
|
||||
#define sz_iceConnectionSetupMsg 16
|
||||
#define sz_iceAuthRequiredMsg 16
|
||||
#define sz_iceAuthReplyMsg 16
|
||||
#define sz_iceAuthNextPhaseMsg 16
|
||||
#define sz_iceConnectionReplyMsg 8
|
||||
#define sz_iceProtocolSetupMsg 16
|
||||
#define sz_iceProtocolReplyMsg 8
|
||||
#define sz_icePingMsg 8
|
||||
#define sz_icePingReplyMsg 8
|
||||
#define sz_iceWantToCloseMsg 8
|
||||
#define sz_iceNoCloseMsg 8
|
||||
|
||||
#endif /* _ICEPROTO_H_ */
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
/******************************************************************************
|
||||
|
||||
|
||||
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 _ICEUTIL_H_
|
||||
#define _ICEUTIL_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/*
|
||||
* Data structure for entry in ICE authority file
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
char *protocol_name;
|
||||
unsigned short protocol_data_length;
|
||||
char *protocol_data;
|
||||
char *network_id;
|
||||
char *auth_name;
|
||||
unsigned short auth_data_length;
|
||||
char *auth_data;
|
||||
} IceAuthFileEntry;
|
||||
|
||||
|
||||
/*
|
||||
* Authentication data maintained in memory.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
char *protocol_name;
|
||||
char *network_id;
|
||||
char *auth_name;
|
||||
unsigned short auth_data_length;
|
||||
char *auth_data;
|
||||
} IceAuthDataEntry;
|
||||
|
||||
|
||||
/*
|
||||
* Return values from IceLockAuthFile
|
||||
*/
|
||||
|
||||
#define IceAuthLockSuccess 0 /* lock succeeded */
|
||||
#define IceAuthLockError 1 /* lock unexpectely failed, check errno */
|
||||
#define IceAuthLockTimeout 2 /* lock failed, timeouts expired */
|
||||
|
||||
|
||||
/*
|
||||
* Function Prototypes
|
||||
*/
|
||||
|
||||
extern char *IceAuthFileName (
|
||||
void
|
||||
);
|
||||
|
||||
extern int IceLockAuthFile (
|
||||
const char * /* file_name */,
|
||||
int /* retries */,
|
||||
int /* timeout */,
|
||||
long /* dead */
|
||||
);
|
||||
|
||||
extern void IceUnlockAuthFile (
|
||||
const char * /* file_name */
|
||||
);
|
||||
|
||||
extern IceAuthFileEntry *IceReadAuthFileEntry (
|
||||
FILE * /* auth_file */
|
||||
);
|
||||
|
||||
extern void IceFreeAuthFileEntry (
|
||||
IceAuthFileEntry * /* auth */
|
||||
);
|
||||
|
||||
extern Status IceWriteAuthFileEntry (
|
||||
FILE * /* auth_file */,
|
||||
IceAuthFileEntry * /* auth */
|
||||
);
|
||||
|
||||
extern IceAuthFileEntry *IceGetAuthFileEntry (
|
||||
const char * /* protocol_name */,
|
||||
const char * /* network_id */,
|
||||
const char * /* auth_name */
|
||||
);
|
||||
|
||||
extern char *IceGenerateMagicCookie (
|
||||
int /* len */
|
||||
);
|
||||
|
||||
extern void IceSetPaAuthData (
|
||||
int /* numEntries */,
|
||||
IceAuthDataEntry * /* entries */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _ICEUTIL_H_ */
|
||||
30
X11/ImUtil.h
30
X11/ImUtil.h
|
|
@ -1,30 +0,0 @@
|
|||
|
||||
#ifndef _X11_IMUTIL_H_
|
||||
#define _X11_IMUTIL_H_
|
||||
|
||||
extern int
|
||||
_XGetScanlinePad(
|
||||
Display *dpy,
|
||||
int depth);
|
||||
|
||||
extern int
|
||||
_XGetBitsPerPixel(
|
||||
Display *dpy,
|
||||
int depth);
|
||||
|
||||
extern int
|
||||
_XSetImage(
|
||||
XImage *srcimg,
|
||||
register XImage *dstimg,
|
||||
register int x,
|
||||
register int y);
|
||||
|
||||
extern int
|
||||
_XReverse_Bytes(
|
||||
register unsigned char *bpt,
|
||||
register int nb);
|
||||
extern void
|
||||
_XInitImageFuncPtrs(
|
||||
register XImage *image);
|
||||
|
||||
#endif /* _X11_IMUTIL_H_ */
|
||||
430
X11/InitialI.h
430
X11/InitialI.h
|
|
@ -1,430 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _XtinitialI_h
|
||||
#define _XtinitialI_h
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Displays
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
#ifndef X_NOT_POSIX
|
||||
#ifdef _POSIX_SOURCE
|
||||
#include <limits.h>
|
||||
#else
|
||||
#define _POSIX_SOURCE
|
||||
#include <limits.h>
|
||||
#undef _POSIX_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
#ifndef PATH_MAX
|
||||
#ifdef WIN32
|
||||
#define PATH_MAX 512
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#ifndef PATH_MAX
|
||||
#ifdef MAXPATHLEN
|
||||
#define PATH_MAX MAXPATHLEN
|
||||
#else
|
||||
#define PATH_MAX 1024
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <X11/Xos.h>
|
||||
#include <X11/Xpoll.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
typedef struct _TimerEventRec {
|
||||
struct timeval te_timer_value;
|
||||
struct _TimerEventRec *te_next;
|
||||
XtTimerCallbackProc te_proc;
|
||||
XtAppContext app;
|
||||
XtPointer te_closure;
|
||||
} TimerEventRec;
|
||||
|
||||
typedef struct _InputEvent {
|
||||
XtInputCallbackProc ie_proc;
|
||||
XtPointer ie_closure;
|
||||
struct _InputEvent *ie_next;
|
||||
struct _InputEvent *ie_oq;
|
||||
XtAppContext app;
|
||||
int ie_source;
|
||||
XtInputMask ie_condition;
|
||||
} InputEvent;
|
||||
|
||||
typedef struct _SignalEventRec {
|
||||
XtSignalCallbackProc se_proc;
|
||||
XtPointer se_closure;
|
||||
struct _SignalEventRec *se_next;
|
||||
XtAppContext app;
|
||||
Boolean se_notice;
|
||||
} SignalEventRec;
|
||||
|
||||
typedef struct _WorkProcRec {
|
||||
XtWorkProc proc;
|
||||
XtPointer closure;
|
||||
struct _WorkProcRec *next;
|
||||
XtAppContext app;
|
||||
} WorkProcRec;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
#ifndef USE_POLL
|
||||
fd_set rmask;
|
||||
fd_set wmask;
|
||||
fd_set emask;
|
||||
#endif
|
||||
int nfds;
|
||||
} FdStruct;
|
||||
|
||||
typedef struct _LangProcRec {
|
||||
XtLanguageProc proc;
|
||||
XtPointer closure;
|
||||
} LangProcRec;
|
||||
|
||||
typedef struct _ProcessContextRec {
|
||||
XtAppContext defaultAppContext;
|
||||
XtAppContext appContextList;
|
||||
ConverterTable globalConverterTable;
|
||||
LangProcRec globalLangProcRec;
|
||||
} ProcessContextRec, *ProcessContext;
|
||||
|
||||
typedef struct {
|
||||
char* start;
|
||||
char* current;
|
||||
int bytes_remaining;
|
||||
} Heap;
|
||||
|
||||
typedef struct _DestroyRec DestroyRec;
|
||||
|
||||
|
||||
typedef struct _XtAppStruct {
|
||||
XtAppContext next; /* link to next app in process context */
|
||||
ProcessContext process; /* back pointer to our process context */
|
||||
InternalCallbackList destroy_callbacks;
|
||||
Display **list;
|
||||
TimerEventRec *timerQueue;
|
||||
WorkProcRec *workQueue;
|
||||
InputEvent **input_list;
|
||||
InputEvent *outstandingQueue;
|
||||
SignalEventRec *signalQueue;
|
||||
XrmDatabase errorDB;
|
||||
XtErrorMsgHandler errorMsgHandler, warningMsgHandler;
|
||||
XtErrorHandler errorHandler, warningHandler;
|
||||
struct _ActionListRec *action_table;
|
||||
ConverterTable converterTable;
|
||||
unsigned long selectionTimeout;
|
||||
FdStruct fds;
|
||||
short count; /* num of assigned entries in list */
|
||||
short max; /* allocate size of list */
|
||||
short last;
|
||||
short input_count;
|
||||
short input_max; /* elts input_list init'd with */
|
||||
Boolean sync, being_destroyed, error_inited;
|
||||
#ifndef NO_IDENTIFY_WINDOWS
|
||||
Boolean identify_windows; /* debugging hack */
|
||||
#endif
|
||||
Heap heap;
|
||||
String * fallback_resources; /* Set by XtAppSetFallbackResources. */
|
||||
struct _ActionHookRec* action_hook_list;
|
||||
struct _BlockHookRec* block_hook_list;
|
||||
int destroy_list_size; /* state data for 2-phase destroy */
|
||||
int destroy_count;
|
||||
int dispatch_level;
|
||||
DestroyRec* destroy_list;
|
||||
Widget in_phase2_destroy;
|
||||
LangProcRec langProcRec;
|
||||
struct _TMBindCacheRec * free_bindings;
|
||||
String display_name_tried;
|
||||
Display **dpy_destroy_list;
|
||||
int dpy_destroy_count;
|
||||
Boolean exit_flag;
|
||||
Boolean rebuild_fdlist;
|
||||
#ifdef XTHREADS
|
||||
LockPtr lock_info;
|
||||
ThreadAppProc lock;
|
||||
ThreadAppProc unlock;
|
||||
ThreadAppYieldLockProc yield_lock;
|
||||
ThreadAppRestoreLockProc restore_lock;
|
||||
ThreadAppProc free_lock;
|
||||
#endif
|
||||
} XtAppStruct;
|
||||
|
||||
extern void _XtHeapInit(Heap* heap);
|
||||
extern void _XtHeapFree(Heap* heap);
|
||||
|
||||
#ifdef XTTRACEMEMORY
|
||||
|
||||
|
||||
extern char *_XtHeapMalloc(
|
||||
Heap* /* heap */,
|
||||
Cardinal /* size */,
|
||||
char * /* file */,
|
||||
int /* line */
|
||||
);
|
||||
|
||||
#define _XtHeapAlloc(heap,bytes) _XtHeapMalloc(heap, bytes, __FILE__, __LINE__)
|
||||
|
||||
#else /* XTTRACEMEMORY */
|
||||
|
||||
extern char* _XtHeapAlloc(
|
||||
Heap* /* heap */,
|
||||
Cardinal /* size */
|
||||
);
|
||||
|
||||
#endif /* XTTRACEMEMORY */
|
||||
|
||||
extern void _XtSetDefaultErrorHandlers(
|
||||
XtErrorMsgHandler* /* errMsg */,
|
||||
XtErrorMsgHandler* /* warnMsg */,
|
||||
XtErrorHandler* /* err */,
|
||||
XtErrorHandler* /* warn */
|
||||
);
|
||||
|
||||
extern void _XtSetDefaultSelectionTimeout(
|
||||
unsigned long* /* timeout */
|
||||
);
|
||||
|
||||
extern XtAppContext _XtDefaultAppContext(
|
||||
void
|
||||
);
|
||||
|
||||
extern ProcessContext _XtGetProcessContext(
|
||||
void
|
||||
);
|
||||
|
||||
Display *
|
||||
_XtAppInit(
|
||||
XtAppContext* /* app_context_return */,
|
||||
String /* application_class */,
|
||||
XrmOptionDescRec* /* options */,
|
||||
Cardinal /* num_options */,
|
||||
int* /* argc_in_out */,
|
||||
String** /* argv_in_out */,
|
||||
String* /* fallback_resources */
|
||||
);
|
||||
|
||||
extern void _XtDestroyAppContexts(
|
||||
void
|
||||
);
|
||||
|
||||
extern void _XtCloseDisplays(
|
||||
XtAppContext /* app */
|
||||
);
|
||||
|
||||
extern int _XtAppDestroyCount;
|
||||
|
||||
extern int _XtWaitForSomething(
|
||||
XtAppContext /* app */,
|
||||
_XtBoolean /* ignoreEvents */,
|
||||
_XtBoolean /* ignoreTimers */,
|
||||
_XtBoolean /* ignoreInputs */,
|
||||
_XtBoolean /* ignoreSignals */,
|
||||
_XtBoolean /* block */,
|
||||
#ifdef XTHREADS
|
||||
_XtBoolean /* drop_lock */,
|
||||
#endif
|
||||
unsigned long* /* howlong */
|
||||
);
|
||||
|
||||
typedef struct _CaseConverterRec *CaseConverterPtr;
|
||||
typedef struct _CaseConverterRec {
|
||||
KeySym start; /* first KeySym valid in converter */
|
||||
KeySym stop; /* last KeySym valid in converter */
|
||||
XtCaseProc proc; /* case converter function */
|
||||
CaseConverterPtr next; /* next converter record */
|
||||
} CaseConverterRec;
|
||||
|
||||
typedef struct _ExtensionSelectorRec {
|
||||
XtExtensionSelectProc proc;
|
||||
int min, max;
|
||||
XtPointer client_data;
|
||||
} ExtSelectRec;
|
||||
|
||||
typedef struct _XtPerDisplayStruct {
|
||||
InternalCallbackList destroy_callbacks;
|
||||
Region region;
|
||||
CaseConverterPtr case_cvt; /* user-registered case converters */
|
||||
XtKeyProc defaultKeycodeTranslator;
|
||||
XtAppContext appContext;
|
||||
unsigned long keysyms_serial; /* for tracking MappingNotify events */
|
||||
KeySym *keysyms; /* keycode to keysym table */
|
||||
int keysyms_per_keycode; /* number of keysyms for each keycode*/
|
||||
int min_keycode, max_keycode; /* range of keycodes */
|
||||
KeySym *modKeysyms; /* keysym values for modToKeysysm */
|
||||
ModToKeysymTable *modsToKeysyms; /* modifiers to Keysysms index table*/
|
||||
unsigned char isModifier[32]; /* key-is-modifier-p bit table */
|
||||
KeySym lock_meaning; /* Lock modifier meaning */
|
||||
Modifiers mode_switch; /* keyboard group modifiers */
|
||||
Modifiers num_lock; /* keyboard numlock modifiers */
|
||||
Boolean being_destroyed;
|
||||
Boolean rv; /* reverse_video resource */
|
||||
XrmName name; /* resolved app name */
|
||||
XrmClass class; /* application class */
|
||||
Heap heap;
|
||||
struct _GCrec *GClist; /* support for XtGetGC */
|
||||
Drawable **pixmap_tab; /* ditto for XtGetGC */
|
||||
String language; /* XPG language string */
|
||||
XEvent last_event; /* last event dispatched */
|
||||
Time last_timestamp; /* from last event dispatched */
|
||||
int multi_click_time; /* for XtSetMultiClickTime */
|
||||
struct _TMKeyContextRec* tm_context; /* for XtGetActionKeysym */
|
||||
InternalCallbackList mapping_callbacks; /* special case for TM */
|
||||
XtPerDisplayInputRec pdi; /* state for modal grabs & kbd focus */
|
||||
struct _WWTable *WWtable; /* window to widget table */
|
||||
XrmDatabase *per_screen_db; /* per screen resource databases */
|
||||
XrmDatabase cmd_db; /* db from command line, if needed */
|
||||
XrmDatabase server_db; /* resource property else .Xdefaults */
|
||||
XtEventDispatchProc* dispatcher_list;
|
||||
ExtSelectRec* ext_select_list;
|
||||
int ext_select_count;
|
||||
Widget hook_object;
|
||||
#ifndef X_NO_RESOURCE_CONFIGURATION_MANAGEMENT
|
||||
Atom rcm_init; /* ResConfig - initialize */
|
||||
Atom rcm_data; /* ResConfig - data atom */
|
||||
#endif
|
||||
} XtPerDisplayStruct, *XtPerDisplay;
|
||||
|
||||
typedef struct _PerDisplayTable {
|
||||
Display *dpy;
|
||||
XtPerDisplayStruct perDpy;
|
||||
struct _PerDisplayTable *next;
|
||||
} PerDisplayTable, *PerDisplayTablePtr;
|
||||
|
||||
extern PerDisplayTablePtr _XtperDisplayList;
|
||||
|
||||
extern XtPerDisplay _XtSortPerDisplayList(
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
extern XtPerDisplay _XtGetPerDisplay(
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
extern XtPerDisplayInputRec* _XtGetPerDisplayInput(
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
#if 0
|
||||
#ifdef DEBUG
|
||||
#define _XtGetPerDisplay(display) \
|
||||
((_XtperDisplayList != NULL && (_XtperDisplayList->dpy == (display))) \
|
||||
? &_XtperDisplayList->perDpy \
|
||||
: _XtSortPerDisplayList(display))
|
||||
#define _XtGetPerDisplayInput(display) \
|
||||
((_XtperDisplayList != NULL && (_XtperDisplayList->dpy == (display))) \
|
||||
? &_XtperDisplayList->perDpy.pdi \
|
||||
: &_XtSortPerDisplayList(display)->pdi)
|
||||
#else
|
||||
#define _XtGetPerDisplay(display) \
|
||||
((_XtperDisplayList->dpy == (display)) \
|
||||
? &_XtperDisplayList->perDpy \
|
||||
: _XtSortPerDisplayList(display))
|
||||
#define _XtGetPerDisplayInput(display) \
|
||||
((_XtperDisplayList->dpy == (display)) \
|
||||
? &_XtperDisplayList->perDpy.pdi \
|
||||
: &_XtSortPerDisplayList(display)->pdi)
|
||||
#endif /*DEBUG*/
|
||||
#endif
|
||||
|
||||
extern void _XtDisplayInitialize(
|
||||
Display* /* dpy */,
|
||||
XtPerDisplay /* pd */,
|
||||
_Xconst char* /* name */,
|
||||
XrmOptionDescRec* /* urlist */,
|
||||
Cardinal /* num_urs */,
|
||||
int* /* argc */,
|
||||
char** /* argv */
|
||||
);
|
||||
|
||||
extern void _XtCacheFlushTag(
|
||||
XtAppContext /* app */,
|
||||
XtPointer /* tag */
|
||||
);
|
||||
|
||||
extern void _XtFreeActions(
|
||||
struct _ActionListRec* /* action_table */
|
||||
);
|
||||
|
||||
extern void _XtDoPhase2Destroy(
|
||||
XtAppContext /* app */,
|
||||
int /* dispatch_level */
|
||||
);
|
||||
|
||||
extern void _XtDoFreeBindings(
|
||||
XtAppContext /* app */
|
||||
);
|
||||
|
||||
extern void _XtExtensionSelect(
|
||||
Widget /* widget */
|
||||
);
|
||||
|
||||
#define _XtSafeToDestroy(app) ((app)->dispatch_level == 0)
|
||||
|
||||
extern void _XtAllocWWTable(
|
||||
XtPerDisplay pd
|
||||
);
|
||||
|
||||
extern void _XtFreeWWTable(
|
||||
XtPerDisplay pd
|
||||
);
|
||||
|
||||
extern String _XtGetUserName(String dest, int len);
|
||||
extern XrmDatabase _XtPreparseCommandLine(XrmOptionDescRec *urlist,
|
||||
Cardinal num_urs, int argc, String *argv,
|
||||
String *applName, String *displayName,
|
||||
String *language);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtinitialI_h */
|
||||
2585
X11/Intrinsic.h
2585
X11/Intrinsic.h
File diff suppressed because it is too large
Load diff
229
X11/IntrinsicI.h
229
X11/IntrinsicI.h
|
|
@ -1,229 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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), (int) (size)); \
|
||||
}
|
||||
|
||||
#define XtBZero(dst, size) \
|
||||
bzero((char *) (dst), (int) (size))
|
||||
|
||||
#define XtMemcmp(b1, b2, size) \
|
||||
memcmp((char *) (b1), (char *) (b2), (int) (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,
|
||||
...
|
||||
) _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 */
|
||||
329
X11/IntrinsicP.h
329
X11/IntrinsicP.h
|
|
@ -1,329 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _XtintrinsicP_h
|
||||
#define _XtintrinsicP_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
/*
|
||||
* Field sizes and offsets of XrmResource must match those of XtResource.
|
||||
* Type long is used instead of XrmQuark here because XrmQuark and String
|
||||
* are not the same size on all systems.
|
||||
*/
|
||||
typedef struct {
|
||||
long xrm_name; /* Resource name quark */
|
||||
long xrm_class; /* Resource class quark */
|
||||
long xrm_type; /* Resource representation type quark */
|
||||
Cardinal xrm_size; /* Size in bytes of representation */
|
||||
int xrm_offset; /* -offset-1 */
|
||||
long xrm_default_type; /* Default representation type quark */
|
||||
XtPointer xrm_default_addr; /* Default resource address */
|
||||
} XrmResource, *XrmResourceList;
|
||||
|
||||
typedef unsigned long XtVersionType;
|
||||
|
||||
#define XT_VERSION 11
|
||||
#ifndef XT_REVISION
|
||||
#define XT_REVISION 6
|
||||
#endif
|
||||
#define XtVersion (XT_VERSION * 1000 + XT_REVISION)
|
||||
#define XtVersionDontCheck 0
|
||||
|
||||
typedef void (*XtProc)(
|
||||
void
|
||||
);
|
||||
|
||||
typedef void (*XtWidgetClassProc)(
|
||||
WidgetClass /* class */
|
||||
);
|
||||
|
||||
typedef void (*XtWidgetProc)(
|
||||
Widget /* widget */
|
||||
);
|
||||
|
||||
typedef Boolean (*XtAcceptFocusProc)(
|
||||
Widget /* widget */,
|
||||
Time* /* time */
|
||||
);
|
||||
|
||||
typedef void (*XtArgsProc)(
|
||||
Widget /* widget */,
|
||||
ArgList /* args */,
|
||||
Cardinal* /* num_args */
|
||||
);
|
||||
|
||||
typedef void (*XtInitProc)(
|
||||
Widget /* request */,
|
||||
Widget /* new */,
|
||||
ArgList /* args */,
|
||||
Cardinal* /* num_args */
|
||||
);
|
||||
|
||||
typedef Boolean (*XtSetValuesFunc)(
|
||||
Widget /* old */,
|
||||
Widget /* request */,
|
||||
Widget /* new */,
|
||||
ArgList /* args */,
|
||||
Cardinal* /* num_args */
|
||||
);
|
||||
|
||||
typedef Boolean (*XtArgsFunc)(
|
||||
Widget /* widget */,
|
||||
ArgList /* args */,
|
||||
Cardinal* /* num_args */
|
||||
);
|
||||
|
||||
typedef void (*XtAlmostProc)(
|
||||
Widget /* old */,
|
||||
Widget /* new */,
|
||||
XtWidgetGeometry* /* request */,
|
||||
XtWidgetGeometry* /* reply */
|
||||
);
|
||||
|
||||
typedef void (*XtExposeProc)(
|
||||
Widget /* widget */,
|
||||
XEvent* /* event */,
|
||||
Region /* region */
|
||||
);
|
||||
|
||||
/* compress_exposure options*/
|
||||
#define XtExposeNoCompress ((XtEnum)False)
|
||||
#define XtExposeCompressSeries ((XtEnum)True)
|
||||
#define XtExposeCompressMultiple 2
|
||||
#define XtExposeCompressMaximal 3
|
||||
|
||||
/* modifiers */
|
||||
#define XtExposeGraphicsExpose 0x10
|
||||
#define XtExposeGraphicsExposeMerged 0x20
|
||||
#define XtExposeNoExpose 0x40
|
||||
#define XtExposeNoRegion 0x80
|
||||
|
||||
typedef void (*XtRealizeProc)(
|
||||
Widget /* widget */,
|
||||
XtValueMask* /* mask */,
|
||||
XSetWindowAttributes* /* attributes */
|
||||
);
|
||||
|
||||
typedef XtGeometryResult (*XtGeometryHandler)(
|
||||
Widget /* widget */,
|
||||
XtWidgetGeometry* /* request */,
|
||||
XtWidgetGeometry* /* reply */
|
||||
);
|
||||
|
||||
typedef void (*XtStringProc)(
|
||||
Widget /* widget */,
|
||||
String /* str */
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
String name; /* resource name */
|
||||
String type; /* representation type name */
|
||||
XtArgVal value; /* representation */
|
||||
int size; /* size of representation */
|
||||
} XtTypedArg, *XtTypedArgList;
|
||||
|
||||
typedef void (*XtAllocateProc)(
|
||||
WidgetClass /* widget_class */,
|
||||
Cardinal * /* constraint_size */,
|
||||
Cardinal * /* more_bytes */,
|
||||
ArgList /* args */,
|
||||
Cardinal * /* num_args */,
|
||||
XtTypedArgList /* typed_args */,
|
||||
Cardinal * /* num_typed_args */,
|
||||
Widget * /* widget_return */,
|
||||
XtPointer * /* more_bytes_return */
|
||||
);
|
||||
|
||||
typedef void (*XtDeallocateProc)(
|
||||
Widget /* widget */,
|
||||
XtPointer /* more_bytes */
|
||||
);
|
||||
|
||||
struct _XtStateRec; /* Forward declare before use for C++ */
|
||||
|
||||
typedef struct _XtTMRec {
|
||||
XtTranslations translations; /* private to Translation Manager */
|
||||
XtBoundActions proc_table; /* procedure bindings for actions */
|
||||
struct _XtStateRec *current_state; /* Translation Manager state ptr */
|
||||
unsigned long lastEventTime;
|
||||
} XtTMRec, *XtTM;
|
||||
|
||||
#include <X11/CoreP.h>
|
||||
#include <X11/CompositeP.h>
|
||||
#include <X11/ConstrainP.h>
|
||||
#include <X11/ObjectP.h>
|
||||
#include <X11/RectObjP.h>
|
||||
|
||||
#define XtDisplay(widget) DisplayOfScreen((widget)->core.screen)
|
||||
#define XtScreen(widget) ((widget)->core.screen)
|
||||
#define XtWindow(widget) ((widget)->core.window)
|
||||
|
||||
#define XtClass(widget) ((widget)->core.widget_class)
|
||||
#define XtSuperclass(widget) (XtClass(widget)->core_class.superclass)
|
||||
#define XtIsRealized(object) (XtWindowOfObject(object) != None)
|
||||
#define XtParent(widget) ((widget)->core.parent)
|
||||
|
||||
#undef XtIsRectObj
|
||||
extern Boolean XtIsRectObj(Widget);
|
||||
#define XtIsRectObj(obj) \
|
||||
(((Object)(obj))->object.widget_class->core_class.class_inited & 0x02)
|
||||
|
||||
#undef XtIsWidget
|
||||
extern Boolean XtIsWidget(Widget);
|
||||
#define XtIsWidget(obj) \
|
||||
(((Object)(obj))->object.widget_class->core_class.class_inited & 0x04)
|
||||
|
||||
#undef XtIsComposite
|
||||
extern Boolean XtIsComposite(Widget);
|
||||
#define XtIsComposite(obj) \
|
||||
(((Object)(obj))->object.widget_class->core_class.class_inited & 0x08)
|
||||
|
||||
#undef XtIsConstraint
|
||||
extern Boolean XtIsConstraint(Widget);
|
||||
#define XtIsConstraint(obj) \
|
||||
(((Object)(obj))->object.widget_class->core_class.class_inited & 0x10)
|
||||
|
||||
#undef XtIsShell
|
||||
extern Boolean XtIsShell(Widget);
|
||||
#define XtIsShell(obj) \
|
||||
(((Object)(obj))->object.widget_class->core_class.class_inited & 0x20)
|
||||
|
||||
#undef XtIsWMShell
|
||||
extern Boolean XtIsWMShell(Widget);
|
||||
#define XtIsWMShell(obj) \
|
||||
(((Object)(obj))->object.widget_class->core_class.class_inited & 0x40)
|
||||
|
||||
#undef XtIsTopLevelShell
|
||||
extern Boolean XtIsTopLevelShell(Widget);
|
||||
#define XtIsTopLevelShell(obj) \
|
||||
(((Object)(obj))->object.widget_class->core_class.class_inited & 0x80)
|
||||
|
||||
#ifdef DEBUG
|
||||
#define XtCheckSubclass(w, widget_class_ptr, message) \
|
||||
if (!XtIsSubclass(((Widget)(w)), (widget_class_ptr))) { \
|
||||
String params[3]; \
|
||||
Cardinal num_params = 3; \
|
||||
params[0] = ((Widget)(w))->core.widget_class->core_class.class_name;\
|
||||
params[1] = (widget_class_ptr)->core_class.class_name; \
|
||||
params[2] = (message); \
|
||||
XtAppErrorMsg(XtWidgetToApplicationContext((Widget)(w)), \
|
||||
"subclassMismatch", "xtCheckSubclass", "XtToolkitError", \
|
||||
"Widget class %s found when subclass of %s expected: %s",\
|
||||
params, &num_params); \
|
||||
}
|
||||
#else
|
||||
#define XtCheckSubclass(w, widget_class, message) /* nothing */
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern Widget _XtWindowedAncestor( /* internal; implementation-dependent */
|
||||
Widget /* object */
|
||||
);
|
||||
|
||||
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(LIBXT_COMPILATION)
|
||||
__declspec(dllimport)
|
||||
#else
|
||||
extern
|
||||
#endif
|
||||
void _XtInherit(
|
||||
void
|
||||
);
|
||||
|
||||
extern void _XtHandleFocus(
|
||||
Widget /* widget */,
|
||||
XtPointer /* client_data */,
|
||||
XEvent * /* event */,
|
||||
Boolean * /* cont */);
|
||||
|
||||
extern void XtCreateWindow(
|
||||
Widget /* widget */,
|
||||
unsigned int /* window_class */,
|
||||
Visual* /* visual */,
|
||||
XtValueMask /* value_mask */,
|
||||
XSetWindowAttributes* /* attributes */
|
||||
);
|
||||
|
||||
extern void XtResizeWidget(
|
||||
Widget /* widget */,
|
||||
_XtDimension /* width */,
|
||||
_XtDimension /* height */,
|
||||
_XtDimension /* border_width */
|
||||
);
|
||||
|
||||
extern void XtMoveWidget(
|
||||
Widget /* widget */,
|
||||
_XtPosition /* x */,
|
||||
_XtPosition /* y */
|
||||
);
|
||||
|
||||
extern void XtConfigureWidget(
|
||||
Widget /* widget */,
|
||||
_XtPosition /* x */,
|
||||
_XtPosition /* y */,
|
||||
_XtDimension /* width */,
|
||||
_XtDimension /* height */,
|
||||
_XtDimension /* border_width */
|
||||
);
|
||||
|
||||
extern void XtResizeWindow(
|
||||
Widget /* widget */
|
||||
);
|
||||
|
||||
extern void XtProcessLock(
|
||||
void
|
||||
);
|
||||
|
||||
extern void XtProcessUnlock(
|
||||
void
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtIntrinsicP_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
63
X11/Object.h
63
X11/Object.h
|
|
@ -1,63 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _XtObject_h
|
||||
#define _XtObject_h
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
typedef struct _ObjectRec *Object;
|
||||
typedef struct _ObjectClassRec *ObjectClass;
|
||||
|
||||
#ifndef VMS
|
||||
externalref WidgetClass objectClass;
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtObject_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
141
X11/ObjectP.h
141
X11/ObjectP.h
|
|
@ -1,141 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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_*/
|
||||
185
X11/PassivGraI.h
185
X11/PassivGraI.h
|
|
@ -1,185 +0,0 @@
|
|||
/********************************************************
|
||||
|
||||
Copyright 1988 by Hewlett-Packard Company
|
||||
Copyright 1987, 1988, 1989 by Digital Equipment Corporation, Maynard
|
||||
|
||||
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 names of
|
||||
Hewlett-Packard or 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
/*
|
||||
|
||||
Copyright 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 _PDI_h_
|
||||
#define _PDI_h_
|
||||
|
||||
|
||||
#define KEYBOARD TRUE
|
||||
#define POINTER FALSE
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
typedef enum {
|
||||
XtNoServerGrab,
|
||||
XtPassiveServerGrab,
|
||||
XtActiveServerGrab,
|
||||
XtPseudoPassiveServerGrab,
|
||||
XtPseudoActiveServerGrab
|
||||
}XtServerGrabType;
|
||||
|
||||
typedef struct _XtServerGrabRec {
|
||||
struct _XtServerGrabRec *next;
|
||||
Widget widget;
|
||||
unsigned int ownerEvents:1;
|
||||
unsigned int pointerMode:1;
|
||||
unsigned int keyboardMode:1;
|
||||
unsigned int hasExt:1;
|
||||
unsigned int confineToIsWidgetWin:1;
|
||||
KeyCode keybut;
|
||||
unsigned short modifiers;
|
||||
unsigned short eventMask;
|
||||
} XtServerGrabRec, *XtServerGrabPtr;
|
||||
|
||||
typedef struct _XtGrabExtRec {
|
||||
Mask *pKeyButMask;
|
||||
Mask *pModifiersMask;
|
||||
Window confineTo;
|
||||
Cursor cursor;
|
||||
} XtServerGrabExtRec, *XtServerGrabExtPtr;
|
||||
|
||||
#define GRABEXT(p) ((XtServerGrabExtPtr)((p)+1))
|
||||
|
||||
typedef struct _XtDeviceRec{
|
||||
XtServerGrabRec grab; /* need copy in order to protect
|
||||
during grab */
|
||||
XtServerGrabType grabType;
|
||||
}XtDeviceRec, *XtDevice;
|
||||
|
||||
#define XtMyAncestor 0
|
||||
#define XtMyDescendant 1
|
||||
#define XtMyCousin 2
|
||||
#define XtMySelf 3
|
||||
#define XtUnrelated 4
|
||||
typedef char XtGeneology; /* do not use an enum makes PerWidgetInput larger */
|
||||
|
||||
typedef struct {
|
||||
Widget focusKid;
|
||||
XtServerGrabPtr keyList, ptrList;
|
||||
Widget queryEventDescendant;
|
||||
unsigned int map_handler_added:1;
|
||||
unsigned int realize_handler_added:1;
|
||||
unsigned int active_handler_added:1;
|
||||
unsigned int haveFocus:1;
|
||||
XtGeneology focalPoint;
|
||||
}XtPerWidgetInputRec, *XtPerWidgetInput;
|
||||
|
||||
typedef struct XtPerDisplayInputRec{
|
||||
XtGrabList grabList;
|
||||
XtDeviceRec keyboard, pointer;
|
||||
KeyCode activatingKey;
|
||||
Widget *trace;
|
||||
int traceDepth, traceMax;
|
||||
Widget focusWidget;
|
||||
}XtPerDisplayInputRec, *XtPerDisplayInput;
|
||||
|
||||
#define IsServerGrab(g) ((g == XtPassiveServerGrab) ||\
|
||||
(g == XtActiveServerGrab))
|
||||
|
||||
#define IsAnyGrab(g) ((g == XtPassiveServerGrab) ||\
|
||||
(g == XtActiveServerGrab) ||\
|
||||
(g == XtPseudoPassiveServerGrab))
|
||||
|
||||
#define IsEitherPassiveGrab(g) ((g == XtPassiveServerGrab) ||\
|
||||
(g == XtPseudoPassiveServerGrab))
|
||||
|
||||
#define IsPseudoGrab(g) ((g == XtPseudoPassiveServerGrab))
|
||||
|
||||
extern void _XtDestroyServerGrabs(
|
||||
Widget /* w */,
|
||||
XtPointer /* pwi */, /*XtPerWidgetInput*/
|
||||
XtPointer /* call_data */
|
||||
);
|
||||
|
||||
extern XtPerWidgetInput _XtGetPerWidgetInput(
|
||||
Widget /* widget */,
|
||||
_XtBoolean /* create */
|
||||
);
|
||||
|
||||
extern XtServerGrabPtr _XtCheckServerGrabsOnWidget(
|
||||
XEvent* /* event */,
|
||||
Widget /* widget */,
|
||||
_XtBoolean /* isKeyboard */
|
||||
);
|
||||
|
||||
/*
|
||||
extern XtGrabList* _XtGetGrabList( XtPerDisplayInput );
|
||||
*/
|
||||
|
||||
#define _XtGetGrabList(pdi) (&(pdi)->grabList)
|
||||
|
||||
extern void _XtFreePerWidgetInput(
|
||||
Widget /* w */,
|
||||
XtPerWidgetInput /* pwi */
|
||||
);
|
||||
|
||||
extern Widget _XtProcessKeyboardEvent(
|
||||
XKeyEvent* /* event */,
|
||||
Widget /* widget */,
|
||||
XtPerDisplayInput /* pdi */
|
||||
);
|
||||
|
||||
extern Widget _XtProcessPointerEvent(
|
||||
XButtonEvent* /* event */,
|
||||
Widget /* widget */,
|
||||
XtPerDisplayInput /* pdi */
|
||||
);
|
||||
|
||||
extern void _XtRegisterPassiveGrabs(
|
||||
Widget /* widget */
|
||||
);
|
||||
|
||||
extern void _XtClearAncestorCache(
|
||||
Widget /* widget */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _PDI_h_ */
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _XtRect_h
|
||||
#define _XtRect_h
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
typedef struct _RectObjRec *RectObj;
|
||||
typedef struct _RectObjClassRec *RectObjClass;
|
||||
|
||||
#ifndef VMS
|
||||
externalref WidgetClass rectObjClass;
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtRect_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
131
X11/RectObjP.h
131
X11/RectObjP.h
|
|
@ -1,131 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _Xt_RectObjP_h_
|
||||
#define _Xt_RectObjP_h_
|
||||
|
||||
#include <X11/RectObj.h>
|
||||
#include <X11/ObjectP.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/**********************************************************
|
||||
* Rectangle Object Instance Data Structures
|
||||
*
|
||||
**********************************************************/
|
||||
/* these fields match CorePart and can not be changed */
|
||||
|
||||
typedef struct _RectObjPart {
|
||||
Position x, y; /* rectangle position */
|
||||
Dimension width, height; /* rectangle dimensions */
|
||||
Dimension border_width; /* rectangle border width */
|
||||
Boolean managed; /* is widget geometry managed? */
|
||||
Boolean sensitive; /* is widget sensitive to user events*/
|
||||
Boolean ancestor_sensitive; /* are all ancestors sensitive? */
|
||||
}RectObjPart;
|
||||
|
||||
typedef struct _RectObjRec {
|
||||
ObjectPart object;
|
||||
RectObjPart rectangle;
|
||||
} RectObjRec;
|
||||
|
||||
|
||||
|
||||
/********************************************************
|
||||
* Rectangle 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 _RectObjClassPart {
|
||||
|
||||
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 rect1; /* NULL */
|
||||
XtPointer rect2; /* NULL */
|
||||
Cardinal rect3; /* NULL */
|
||||
XtResourceList resources; /* resources for subclass fields */
|
||||
Cardinal num_resources; /* number of entries in resources */
|
||||
XrmClass xrm_class; /* resource class quarkified */
|
||||
Boolean rect4; /* NULL */
|
||||
XtEnum rect5; /* NULL */
|
||||
Boolean rect6; /* NULL */
|
||||
Boolean rect7; /* NULL */
|
||||
XtWidgetProc destroy; /* free data for subclass pointers */
|
||||
XtWidgetProc resize; /* geom manager changed widget size */
|
||||
XtExposeProc expose; /* rediplay rectangle */
|
||||
XtSetValuesFunc set_values; /* set subclass resource values */
|
||||
XtArgsFunc set_values_hook; /* notify that set_values called */
|
||||
XtAlmostProc set_values_almost; /* set values almost for geometry */
|
||||
XtArgsProc get_values_hook; /* notify that get_values called */
|
||||
XtProc rect9; /* NULL */
|
||||
XtVersionType version; /* version of intrinsics used */
|
||||
XtPointer callback_private; /* list of callback offsets */
|
||||
String rect10; /* NULL */
|
||||
XtGeometryHandler query_geometry; /* return preferred geometry */
|
||||
XtProc rect11; /* NULL */
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} RectObjClassPart;
|
||||
|
||||
typedef struct _RectObjClassRec {
|
||||
RectObjClassPart rect_class;
|
||||
} RectObjClassRec;
|
||||
|
||||
externalref RectObjClassRec rectObjClassRec;
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /*_Xt_RectObjP_h_*/
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
/*
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
/*****************************************************************
|
||||
|
||||
(C) COPYRIGHT International Business Machines Corp. 1992,1997
|
||||
All Rights Reserved
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software.
|
||||
|
||||
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 IBM CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
|
||||
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL 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 IBM Corporation 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 IBM
|
||||
Corporation.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
#ifndef _RESCONFIGP_H
|
||||
#define _RESCONFIGP_H
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/*
|
||||
* Atom names for resource configuration management customization tool.
|
||||
*/
|
||||
#define RCM_DATA "Custom Data"
|
||||
#define RCM_INIT "Custom Init"
|
||||
|
||||
extern void _XtResourceConfigurationEH(
|
||||
Widget /* w */,
|
||||
XtPointer /* client_data */,
|
||||
XEvent * /* event */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif
|
||||
100
X11/ResourceI.h
100
X11/ResourceI.h
|
|
@ -1,100 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Resources
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
#ifndef _XtresourceI_h
|
||||
#define _XtresourceI_h
|
||||
|
||||
#define StringToQuark(string) XrmStringToQuark(string)
|
||||
#define StringToName(string) XrmStringToName(string)
|
||||
#define StringToClass(string) XrmStringToClass(string)
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern void _XtDependencies(
|
||||
XtResourceList * /* class_resp */,
|
||||
Cardinal * /* class_num_resp */,
|
||||
XrmResourceList * /* super_res */,
|
||||
Cardinal /* super_num_res */,
|
||||
Cardinal /* super_widget_size */);
|
||||
|
||||
extern void _XtResourceDependencies(
|
||||
WidgetClass /* wc */
|
||||
);
|
||||
|
||||
extern void _XtConstraintResDependencies(
|
||||
ConstraintWidgetClass /* wc */
|
||||
);
|
||||
|
||||
extern XtCacheRef* _XtGetResources(
|
||||
Widget /* w */,
|
||||
ArgList /* args */,
|
||||
Cardinal /* num_args */,
|
||||
XtTypedArgList /* typed_args */,
|
||||
Cardinal* /* num_typed_args */
|
||||
);
|
||||
|
||||
extern void _XtCopyFromParent(
|
||||
Widget /* widget */,
|
||||
int /* offset */,
|
||||
XrmValue* /* value */
|
||||
);
|
||||
|
||||
extern void _XtCopyToArg(char *src, XtArgVal *dst, unsigned int size);
|
||||
extern void _XtCopyFromArg(XtArgVal src, char *dst, unsigned int size);
|
||||
extern XrmResourceList* _XtCreateIndirectionTable(XtResourceList resources,
|
||||
Cardinal num_resources);
|
||||
extern void _XtResourceListInitialize(void);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtresourceI_h */
|
||||
128
X11/SM/SM.h
128
X11/SM/SM.h
|
|
@ -1,128 +0,0 @@
|
|||
/*
|
||||
|
||||
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 _SM_H_
|
||||
#define _SM_H_
|
||||
|
||||
/*
|
||||
* Protocol Version
|
||||
*/
|
||||
|
||||
#define SmProtoMajor 1
|
||||
#define SmProtoMinor 0
|
||||
|
||||
|
||||
/*
|
||||
* Interact Style
|
||||
*/
|
||||
|
||||
#define SmInteractStyleNone 0
|
||||
#define SmInteractStyleErrors 1
|
||||
#define SmInteractStyleAny 2
|
||||
|
||||
|
||||
/*
|
||||
* Dialog Type
|
||||
*/
|
||||
|
||||
#define SmDialogError 0
|
||||
#define SmDialogNormal 1
|
||||
|
||||
|
||||
/*
|
||||
* Save Type
|
||||
*/
|
||||
|
||||
#define SmSaveGlobal 0
|
||||
#define SmSaveLocal 1
|
||||
#define SmSaveBoth 2
|
||||
|
||||
|
||||
/*
|
||||
* Restart Style Hints
|
||||
*/
|
||||
|
||||
#define SmRestartIfRunning 0
|
||||
#define SmRestartAnyway 1
|
||||
#define SmRestartImmediately 2
|
||||
#define SmRestartNever 3
|
||||
|
||||
|
||||
/*
|
||||
* Property names
|
||||
*/
|
||||
|
||||
#define SmCloneCommand "CloneCommand"
|
||||
#define SmCurrentDirectory "CurrentDirectory"
|
||||
#define SmDiscardCommand "DiscardCommand"
|
||||
#define SmEnvironment "Environment"
|
||||
#define SmProcessID "ProcessID"
|
||||
#define SmProgram "Program"
|
||||
#define SmRestartCommand "RestartCommand"
|
||||
#define SmResignCommand "ResignCommand"
|
||||
#define SmRestartStyleHint "RestartStyleHint"
|
||||
#define SmShutdownCommand "ShutdownCommand"
|
||||
#define SmUserID "UserID"
|
||||
|
||||
|
||||
/*
|
||||
* Property types
|
||||
*/
|
||||
|
||||
#define SmCARD8 "CARD8"
|
||||
#define SmARRAY8 "ARRAY8"
|
||||
#define SmLISTofARRAY8 "LISTofARRAY8"
|
||||
|
||||
|
||||
/*
|
||||
* SM minor opcodes
|
||||
*/
|
||||
|
||||
#define SM_Error 0
|
||||
#define SM_RegisterClient 1
|
||||
#define SM_RegisterClientReply 2
|
||||
#define SM_SaveYourself 3
|
||||
#define SM_SaveYourselfRequest 4
|
||||
#define SM_InteractRequest 5
|
||||
#define SM_Interact 6
|
||||
#define SM_InteractDone 7
|
||||
#define SM_SaveYourselfDone 8
|
||||
#define SM_Die 9
|
||||
#define SM_ShutdownCancelled 10
|
||||
#define SM_CloseConnection 11
|
||||
#define SM_SetProperties 12
|
||||
#define SM_DeleteProperties 13
|
||||
#define SM_GetProperties 14
|
||||
#define SM_PropertiesReply 15
|
||||
#define SM_SaveYourselfPhase2Request 16
|
||||
#define SM_SaveYourselfPhase2 17
|
||||
#define SM_SaveComplete 18
|
||||
|
||||
#endif /* _SM_H_ */
|
||||
543
X11/SM/SMlib.h
543
X11/SM/SMlib.h
|
|
@ -1,543 +0,0 @@
|
|||
/*
|
||||
|
||||
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 _SMLIB_H_
|
||||
#define _SMLIB_H_
|
||||
|
||||
#include <X11/SM/SM.h>
|
||||
#include <X11/ICE/ICElib.h>
|
||||
|
||||
|
||||
/*
|
||||
* Generic SM pointer
|
||||
*/
|
||||
|
||||
typedef IcePointer SmPointer;
|
||||
|
||||
|
||||
/*
|
||||
* Connection objects. Defined in SMlibint.h
|
||||
*/
|
||||
|
||||
typedef struct _SmcConn *SmcConn;
|
||||
typedef struct _SmsConn *SmsConn;
|
||||
|
||||
|
||||
/*
|
||||
* Session Management property
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
int length; /* length (in bytes) of the value */
|
||||
SmPointer value; /* the value */
|
||||
} SmPropValue;
|
||||
|
||||
typedef struct {
|
||||
char *name; /* name of property */
|
||||
char *type; /* type of property */
|
||||
int num_vals; /* number of values in property */
|
||||
SmPropValue *vals; /* the values */
|
||||
} SmProp;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* SmcCloseConnection status return
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
SmcClosedNow,
|
||||
SmcClosedASAP,
|
||||
SmcConnectionInUse
|
||||
} SmcCloseStatus;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Client callbacks
|
||||
*/
|
||||
|
||||
typedef void (*SmcSaveYourselfProc) (
|
||||
SmcConn /* smcConn */,
|
||||
SmPointer /* clientData */,
|
||||
int /* saveType */,
|
||||
Bool /* shutdown */,
|
||||
int /* interactStyle */,
|
||||
Bool /* fast */
|
||||
);
|
||||
|
||||
typedef void (*SmcSaveYourselfPhase2Proc) (
|
||||
SmcConn /* smcConn */,
|
||||
SmPointer /* clientData */
|
||||
);
|
||||
|
||||
typedef void (*SmcInteractProc) (
|
||||
SmcConn /* smcConn */,
|
||||
SmPointer /* clientData */
|
||||
);
|
||||
|
||||
typedef void (*SmcDieProc) (
|
||||
SmcConn /* smcConn */,
|
||||
SmPointer /* clientData */
|
||||
);
|
||||
|
||||
typedef void (*SmcShutdownCancelledProc) (
|
||||
SmcConn /* smcConn */,
|
||||
SmPointer /* clientData */
|
||||
);
|
||||
|
||||
typedef void (*SmcSaveCompleteProc) (
|
||||
SmcConn /* smcConn */,
|
||||
SmPointer /* clientData */
|
||||
);
|
||||
|
||||
typedef void (*SmcPropReplyProc) (
|
||||
SmcConn /* smcConn */,
|
||||
SmPointer /* clientData */,
|
||||
int /* numProps */,
|
||||
SmProp ** /* props */
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* Callbacks set up at SmcOpenConnection time
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
|
||||
struct {
|
||||
SmcSaveYourselfProc callback;
|
||||
SmPointer client_data;
|
||||
} save_yourself;
|
||||
|
||||
struct {
|
||||
SmcDieProc callback;
|
||||
SmPointer client_data;
|
||||
} die;
|
||||
|
||||
struct {
|
||||
SmcSaveCompleteProc callback;
|
||||
SmPointer client_data;
|
||||
} save_complete;
|
||||
|
||||
struct {
|
||||
SmcShutdownCancelledProc callback;
|
||||
SmPointer client_data;
|
||||
} shutdown_cancelled;
|
||||
|
||||
} SmcCallbacks;
|
||||
|
||||
#define SmcSaveYourselfProcMask (1L << 0)
|
||||
#define SmcDieProcMask (1L << 1)
|
||||
#define SmcSaveCompleteProcMask (1L << 2)
|
||||
#define SmcShutdownCancelledProcMask (1L << 3)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Session manager callbacks
|
||||
*/
|
||||
|
||||
typedef Status (*SmsRegisterClientProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */,
|
||||
char * /* previousId */
|
||||
);
|
||||
|
||||
typedef void (*SmsInteractRequestProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */,
|
||||
int /* dialogType */
|
||||
);
|
||||
|
||||
typedef void (*SmsInteractDoneProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */,
|
||||
Bool /* cancelShutdown */
|
||||
);
|
||||
|
||||
typedef void (*SmsSaveYourselfRequestProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */,
|
||||
int /* saveType */,
|
||||
Bool /* shutdown */,
|
||||
int /* interactStyle */,
|
||||
Bool /* fast */,
|
||||
Bool /* global */
|
||||
);
|
||||
|
||||
typedef void (*SmsSaveYourselfPhase2RequestProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */
|
||||
);
|
||||
|
||||
typedef void (*SmsSaveYourselfDoneProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */,
|
||||
Bool /* success */
|
||||
);
|
||||
|
||||
typedef void (*SmsCloseConnectionProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */,
|
||||
int /* count */,
|
||||
char ** /* reasonMsgs */
|
||||
);
|
||||
|
||||
typedef void (*SmsSetPropertiesProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */,
|
||||
int /* numProps */,
|
||||
SmProp ** /* props */
|
||||
);
|
||||
|
||||
typedef void (*SmsDeletePropertiesProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */,
|
||||
int /* numProps */,
|
||||
char ** /* propNames */
|
||||
);
|
||||
|
||||
typedef void (*SmsGetPropertiesProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* Callbacks set up by a session manager when a new client connects.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
|
||||
struct {
|
||||
SmsRegisterClientProc callback;
|
||||
SmPointer manager_data;
|
||||
} register_client;
|
||||
|
||||
struct {
|
||||
SmsInteractRequestProc callback;
|
||||
SmPointer manager_data;
|
||||
} interact_request;
|
||||
|
||||
struct {
|
||||
SmsInteractDoneProc callback;
|
||||
SmPointer manager_data;
|
||||
} interact_done;
|
||||
|
||||
struct {
|
||||
SmsSaveYourselfRequestProc callback;
|
||||
SmPointer manager_data;
|
||||
} save_yourself_request;
|
||||
|
||||
struct {
|
||||
SmsSaveYourselfPhase2RequestProc callback;
|
||||
SmPointer manager_data;
|
||||
} save_yourself_phase2_request;
|
||||
|
||||
struct {
|
||||
SmsSaveYourselfDoneProc callback;
|
||||
SmPointer manager_data;
|
||||
} save_yourself_done;
|
||||
|
||||
struct {
|
||||
SmsCloseConnectionProc callback;
|
||||
SmPointer manager_data;
|
||||
} close_connection;
|
||||
|
||||
struct {
|
||||
SmsSetPropertiesProc callback;
|
||||
SmPointer manager_data;
|
||||
} set_properties;
|
||||
|
||||
struct {
|
||||
SmsDeletePropertiesProc callback;
|
||||
SmPointer manager_data;
|
||||
} delete_properties;
|
||||
|
||||
struct {
|
||||
SmsGetPropertiesProc callback;
|
||||
SmPointer manager_data;
|
||||
} get_properties;
|
||||
|
||||
} SmsCallbacks;
|
||||
|
||||
|
||||
#define SmsRegisterClientProcMask (1L << 0)
|
||||
#define SmsInteractRequestProcMask (1L << 1)
|
||||
#define SmsInteractDoneProcMask (1L << 2)
|
||||
#define SmsSaveYourselfRequestProcMask (1L << 3)
|
||||
#define SmsSaveYourselfP2RequestProcMask (1L << 4)
|
||||
#define SmsSaveYourselfDoneProcMask (1L << 5)
|
||||
#define SmsCloseConnectionProcMask (1L << 6)
|
||||
#define SmsSetPropertiesProcMask (1L << 7)
|
||||
#define SmsDeletePropertiesProcMask (1L << 8)
|
||||
#define SmsGetPropertiesProcMask (1L << 9)
|
||||
|
||||
|
||||
|
||||
typedef Status (*SmsNewClientProc) (
|
||||
SmsConn /* smsConn */,
|
||||
SmPointer /* managerData */,
|
||||
unsigned long * /* maskRet */,
|
||||
SmsCallbacks * /* callbacksRet */,
|
||||
char ** /* failureReasonRet */
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Error handlers
|
||||
*/
|
||||
|
||||
typedef void (*SmcErrorHandler) (
|
||||
SmcConn /* smcConn */,
|
||||
Bool /* swap */,
|
||||
int /* offendingMinorOpcode */,
|
||||
unsigned long /* offendingSequence */,
|
||||
int /* errorClass */,
|
||||
int /* severity */,
|
||||
SmPointer /* values */
|
||||
);
|
||||
|
||||
typedef void (*SmsErrorHandler) (
|
||||
SmsConn /* smsConn */,
|
||||
Bool /* swap */,
|
||||
int /* offendingMinorOpcode */,
|
||||
unsigned long /* offendingSequence */,
|
||||
int /* errorClass */,
|
||||
int /* severity */,
|
||||
SmPointer /* values */
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Function Prototypes
|
||||
*/
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern SmcConn SmcOpenConnection (
|
||||
char * /* networkIdsList */,
|
||||
SmPointer /* context */,
|
||||
int /* xsmpMajorRev */,
|
||||
int /* xsmpMinorRev */,
|
||||
unsigned long /* mask */,
|
||||
SmcCallbacks * /* callbacks */,
|
||||
const char * /* previousId */,
|
||||
char ** /* clientIdRet */,
|
||||
int /* errorLength */,
|
||||
char * /* errorStringRet */
|
||||
);
|
||||
|
||||
extern SmcCloseStatus SmcCloseConnection (
|
||||
SmcConn /* smcConn */,
|
||||
int /* count */,
|
||||
char ** /* reasonMsgs */
|
||||
);
|
||||
|
||||
extern void SmcModifyCallbacks (
|
||||
SmcConn /* smcConn */,
|
||||
unsigned long /* mask */,
|
||||
SmcCallbacks * /* callbacks */
|
||||
);
|
||||
|
||||
extern void SmcSetProperties (
|
||||
SmcConn /* smcConn */,
|
||||
int /* numProps */,
|
||||
SmProp ** /* props */
|
||||
);
|
||||
|
||||
extern void SmcDeleteProperties (
|
||||
SmcConn /* smcConn */,
|
||||
int /* numProps */,
|
||||
char ** /* propNames */
|
||||
);
|
||||
|
||||
extern Status SmcGetProperties (
|
||||
SmcConn /* smcConn */,
|
||||
SmcPropReplyProc /* propReplyProc */,
|
||||
SmPointer /* clientData */
|
||||
);
|
||||
|
||||
extern Status SmcInteractRequest (
|
||||
SmcConn /* smcConn */,
|
||||
int /* dialogType */,
|
||||
SmcInteractProc /* interactProc */,
|
||||
SmPointer /* clientData */
|
||||
);
|
||||
|
||||
extern void SmcInteractDone (
|
||||
SmcConn /* smcConn */,
|
||||
Bool /* cancelShutdown */
|
||||
);
|
||||
|
||||
extern void SmcRequestSaveYourself (
|
||||
SmcConn /* smcConn */,
|
||||
int /* saveType */,
|
||||
Bool /* shutdown */,
|
||||
int /* interactStyle */,
|
||||
Bool /* fast */,
|
||||
Bool /* global */
|
||||
);
|
||||
|
||||
extern Status SmcRequestSaveYourselfPhase2 (
|
||||
SmcConn /* smcConn */,
|
||||
SmcSaveYourselfPhase2Proc /* saveYourselfPhase2Proc */,
|
||||
SmPointer /* clientData */
|
||||
);
|
||||
|
||||
extern void SmcSaveYourselfDone (
|
||||
SmcConn /* smcConn */,
|
||||
Bool /* success */
|
||||
);
|
||||
|
||||
extern int SmcProtocolVersion (
|
||||
SmcConn /* smcConn */
|
||||
);
|
||||
|
||||
extern int SmcProtocolRevision (
|
||||
SmcConn /* smcConn */
|
||||
);
|
||||
|
||||
extern char *SmcVendor (
|
||||
SmcConn /* smcConn */
|
||||
);
|
||||
|
||||
extern char *SmcRelease (
|
||||
SmcConn /* smcConn */
|
||||
);
|
||||
|
||||
extern char *SmcClientID (
|
||||
SmcConn /* smcConn */
|
||||
);
|
||||
|
||||
extern IceConn SmcGetIceConnection (
|
||||
SmcConn /* smcConn */
|
||||
);
|
||||
|
||||
extern Status SmsInitialize (
|
||||
const char * /* vendor */,
|
||||
const char * /* release */,
|
||||
SmsNewClientProc /* newClientProc */,
|
||||
SmPointer /* managerData */,
|
||||
IceHostBasedAuthProc /* hostBasedAuthProc */,
|
||||
int /* errorLength */,
|
||||
char * /* errorStringRet */
|
||||
);
|
||||
|
||||
extern char *SmsClientHostName (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern char *SmsGenerateClientID (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern Status SmsRegisterClientReply (
|
||||
SmsConn /* smsConn */,
|
||||
char * /* clientId */
|
||||
);
|
||||
|
||||
extern void SmsSaveYourself (
|
||||
SmsConn /* smsConn */,
|
||||
int /* saveType */,
|
||||
Bool /* shutdown */,
|
||||
int /* interactStyle */,
|
||||
Bool /* fast */
|
||||
);
|
||||
|
||||
extern void SmsSaveYourselfPhase2 (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern void SmsInteract (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern void SmsDie (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern void SmsSaveComplete (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern void SmsShutdownCancelled (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern void SmsReturnProperties (
|
||||
SmsConn /* smsConn */,
|
||||
int /* numProps */,
|
||||
SmProp ** /* props */
|
||||
);
|
||||
|
||||
extern void SmsCleanUp (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern int SmsProtocolVersion (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern int SmsProtocolRevision (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern char *SmsClientID (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern IceConn SmsGetIceConnection (
|
||||
SmsConn /* smsConn */
|
||||
);
|
||||
|
||||
extern SmcErrorHandler SmcSetErrorHandler (
|
||||
SmcErrorHandler /* handler */
|
||||
);
|
||||
|
||||
extern SmsErrorHandler SmsSetErrorHandler (
|
||||
SmsErrorHandler /* handler */
|
||||
);
|
||||
|
||||
extern void SmFreeProperty (
|
||||
SmProp * /* prop */
|
||||
);
|
||||
|
||||
extern void SmFreeReasons (
|
||||
int /* count */,
|
||||
char ** /* reasonMsgs */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _SMLIB_H_ */
|
||||
206
X11/SM/SMproto.h
206
X11/SM/SMproto.h
|
|
@ -1,206 +0,0 @@
|
|||
/*
|
||||
|
||||
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 _SMPROTO_H_
|
||||
#define _SMPROTO_H_
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
/* n ARRAY8 previousId */
|
||||
} smRegisterClientMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
/* n ARRAY8 clientId */
|
||||
} smRegisterClientReplyMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused1[2];
|
||||
CARD32 length B32;
|
||||
CARD8 saveType;
|
||||
CARD8 shutdown;
|
||||
CARD8 interactStyle;
|
||||
CARD8 fast;
|
||||
CARD8 unused2[4];
|
||||
} smSaveYourselfMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused1[2];
|
||||
CARD32 length B32;
|
||||
CARD8 saveType;
|
||||
CARD8 shutdown;
|
||||
CARD8 interactStyle;
|
||||
CARD8 fast;
|
||||
CARD8 global;
|
||||
CARD8 unused2[3];
|
||||
} smSaveYourselfRequestMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 dialogType;
|
||||
CARD8 unused;
|
||||
CARD32 length B32;
|
||||
} smInteractRequestMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
} smInteractMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 cancelShutdown;
|
||||
CARD8 unused;
|
||||
CARD32 length B32;
|
||||
} smInteractDoneMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 success;
|
||||
CARD8 unused;
|
||||
CARD32 length B32;
|
||||
} smSaveYourselfDoneMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
} smDieMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
} smShutdownCancelledMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
/* b LISTofARRAY8 reasons */
|
||||
} smCloseConnectionMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
/* a LISTofPROPERTY properties */
|
||||
} smSetPropertiesMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
/* a LISTofARRAY8 property names */
|
||||
} smDeletePropertiesMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
} smGetPropertiesMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
/* a LISTofPROPERTY properties */
|
||||
} smPropertiesReplyMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
} smSaveYourselfPhase2RequestMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
} smSaveYourselfPhase2Msg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused[2];
|
||||
CARD32 length B32;
|
||||
} smSaveCompleteMsg;
|
||||
|
||||
|
||||
/*
|
||||
* SIZEOF values. These better be multiples of 8.
|
||||
*/
|
||||
|
||||
#define sz_smRegisterClientMsg 8
|
||||
#define sz_smRegisterClientReplyMsg 8
|
||||
#define sz_smSaveYourselfMsg 16
|
||||
#define sz_smSaveYourselfRequestMsg 16
|
||||
#define sz_smInteractRequestMsg 8
|
||||
#define sz_smInteractMsg 8
|
||||
#define sz_smInteractDoneMsg 8
|
||||
#define sz_smSaveYourselfDoneMsg 8
|
||||
#define sz_smDieMsg 8
|
||||
#define sz_smShutdownCancelledMsg 8
|
||||
#define sz_smCloseConnectionMsg 8
|
||||
#define sz_smSetPropertiesMsg 8
|
||||
#define sz_smDeletePropertiesMsg 8
|
||||
#define sz_smGetPropertiesMsg 8
|
||||
#define sz_smPropertiesReplyMsg 8
|
||||
#define sz_smSaveYourselfPhase2RequestMsg 8
|
||||
#define sz_smSaveYourselfPhase2Msg 8
|
||||
#define sz_smSaveCompleteMsg 8
|
||||
|
||||
#endif /* _SMPROTO_H_ */
|
||||
168
X11/SelectionI.h
168
X11/SelectionI.h
|
|
@ -1,168 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 */
|
||||
562
X11/Shell.h
562
X11/Shell.h
|
|
@ -1,562 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _XtShell_h
|
||||
#define _XtShell_h
|
||||
|
||||
#include <X11/SM/SMlib.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Shell Widget
|
||||
*
|
||||
***********************************************************************/
|
||||
/*
|
||||
* Shell-specific resources names, classes, and a representation type.
|
||||
*/
|
||||
|
||||
#ifndef XTSTRINGDEFINES
|
||||
#define _XtShell_h_Const const
|
||||
#endif
|
||||
|
||||
/* $Xorg: makestrs.c,v 1.6 2001/02/09 02:03:17 xorgcvs Exp $ */
|
||||
/* This file is automatically generated. */
|
||||
/* Default ABI version -- Do not edit */
|
||||
#ifdef XTSTRINGDEFINES
|
||||
#define XtNiconName "iconName"
|
||||
#define XtCIconName "IconName"
|
||||
#define XtNiconPixmap "iconPixmap"
|
||||
#define XtCIconPixmap "IconPixmap"
|
||||
#define XtNiconWindow "iconWindow"
|
||||
#define XtCIconWindow "IconWindow"
|
||||
#define XtNiconMask "iconMask"
|
||||
#define XtCIconMask "IconMask"
|
||||
#define XtNwindowGroup "windowGroup"
|
||||
#define XtCWindowGroup "WindowGroup"
|
||||
#define XtNvisual "visual"
|
||||
#define XtCVisual "Visual"
|
||||
#define XtNtitleEncoding "titleEncoding"
|
||||
#define XtCTitleEncoding "TitleEncoding"
|
||||
#define XtNsaveUnder "saveUnder"
|
||||
#define XtCSaveUnder "SaveUnder"
|
||||
#define XtNtransient "transient"
|
||||
#define XtCTransient "Transient"
|
||||
#define XtNoverrideRedirect "overrideRedirect"
|
||||
#define XtCOverrideRedirect "OverrideRedirect"
|
||||
#define XtNtransientFor "transientFor"
|
||||
#define XtCTransientFor "TransientFor"
|
||||
#define XtNiconNameEncoding "iconNameEncoding"
|
||||
#define XtCIconNameEncoding "IconNameEncoding"
|
||||
#define XtNallowShellResize "allowShellResize"
|
||||
#define XtCAllowShellResize "AllowShellResize"
|
||||
#define XtNcreatePopupChildProc "createPopupChildProc"
|
||||
#define XtCCreatePopupChildProc "CreatePopupChildProc"
|
||||
#define XtNtitle "title"
|
||||
#define XtCTitle "Title"
|
||||
#ifndef XtRAtom
|
||||
#define XtRAtom "Atom"
|
||||
#endif
|
||||
#define XtNargc "argc"
|
||||
#define XtCArgc "Argc"
|
||||
#define XtNargv "argv"
|
||||
#define XtCArgv "Argv"
|
||||
#define XtNiconX "iconX"
|
||||
#define XtCIconX "IconX"
|
||||
#define XtNiconY "iconY"
|
||||
#define XtCIconY "IconY"
|
||||
#define XtNinput "input"
|
||||
#define XtCInput "Input"
|
||||
#define XtNiconic "iconic"
|
||||
#define XtCIconic "Iconic"
|
||||
#define XtNinitialState "initialState"
|
||||
#define XtCInitialState "InitialState"
|
||||
#define XtNgeometry "geometry"
|
||||
#define XtCGeometry "Geometry"
|
||||
#define XtNbaseWidth "baseWidth"
|
||||
#define XtCBaseWidth "BaseWidth"
|
||||
#define XtNbaseHeight "baseHeight"
|
||||
#define XtCBaseHeight "BaseHeight"
|
||||
#define XtNwinGravity "winGravity"
|
||||
#define XtCWinGravity "WinGravity"
|
||||
#define XtNminWidth "minWidth"
|
||||
#define XtCMinWidth "MinWidth"
|
||||
#define XtNminHeight "minHeight"
|
||||
#define XtCMinHeight "MinHeight"
|
||||
#define XtNmaxWidth "maxWidth"
|
||||
#define XtCMaxWidth "MaxWidth"
|
||||
#define XtNmaxHeight "maxHeight"
|
||||
#define XtCMaxHeight "MaxHeight"
|
||||
#define XtNwidthInc "widthInc"
|
||||
#define XtCWidthInc "WidthInc"
|
||||
#define XtNheightInc "heightInc"
|
||||
#define XtCHeightInc "HeightInc"
|
||||
#define XtNminAspectY "minAspectY"
|
||||
#define XtCMinAspectY "MinAspectY"
|
||||
#define XtNmaxAspectY "maxAspectY"
|
||||
#define XtCMaxAspectY "MaxAspectY"
|
||||
#define XtNminAspectX "minAspectX"
|
||||
#define XtCMinAspectX "MinAspectX"
|
||||
#define XtNmaxAspectX "maxAspectX"
|
||||
#define XtCMaxAspectX "MaxAspectX"
|
||||
#define XtNwmTimeout "wmTimeout"
|
||||
#define XtCWmTimeout "WmTimeout"
|
||||
#define XtNwaitForWm "waitforwm"
|
||||
#define XtCWaitForWm "Waitforwm"
|
||||
#define XtNwaitforwm "waitforwm"
|
||||
#define XtCWaitforwm "Waitforwm"
|
||||
#define XtNclientLeader "clientLeader"
|
||||
#define XtCClientLeader "ClientLeader"
|
||||
#define XtNwindowRole "windowRole"
|
||||
#define XtCWindowRole "WindowRole"
|
||||
#define XtNurgency "urgency"
|
||||
#define XtCUrgency "Urgency"
|
||||
#define XtNcancelCallback "cancelCallback"
|
||||
#define XtNcloneCommand "cloneCommand"
|
||||
#define XtCCloneCommand "CloneCommand"
|
||||
#define XtNconnection "connection"
|
||||
#define XtCConnection "Connection"
|
||||
#define XtNcurrentDirectory "currentDirectory"
|
||||
#define XtCCurrentDirectory "CurrentDirectory"
|
||||
#define XtNdieCallback "dieCallback"
|
||||
#define XtNdiscardCommand "discardCommand"
|
||||
#define XtCDiscardCommand "DiscardCommand"
|
||||
#define XtNenvironment "environment"
|
||||
#define XtCEnvironment "Environment"
|
||||
#define XtNinteractCallback "interactCallback"
|
||||
#define XtNjoinSession "joinSession"
|
||||
#define XtCJoinSession "JoinSession"
|
||||
#define XtNprogramPath "programPath"
|
||||
#define XtCProgramPath "ProgramPath"
|
||||
#define XtNresignCommand "resignCommand"
|
||||
#define XtCResignCommand "ResignCommand"
|
||||
#define XtNrestartCommand "restartCommand"
|
||||
#define XtCRestartCommand "RestartCommand"
|
||||
#define XtNrestartStyle "restartStyle"
|
||||
#define XtCRestartStyle "RestartStyle"
|
||||
#define XtNsaveCallback "saveCallback"
|
||||
#define XtNsaveCompleteCallback "saveCompleteCallback"
|
||||
#define XtNsessionID "sessionID"
|
||||
#define XtCSessionID "SessionID"
|
||||
#define XtNshutdownCommand "shutdownCommand"
|
||||
#define XtCShutdownCommand "ShutdownCommand"
|
||||
#define XtNerrorCallback "errorCallback"
|
||||
#else
|
||||
extern _XtShell_h_Const char XtShellStrings[];
|
||||
#ifndef XtNiconName
|
||||
#define XtNiconName ((char*)&XtShellStrings[0])
|
||||
#endif
|
||||
#ifndef XtCIconName
|
||||
#define XtCIconName ((char*)&XtShellStrings[9])
|
||||
#endif
|
||||
#ifndef XtNiconPixmap
|
||||
#define XtNiconPixmap ((char*)&XtShellStrings[18])
|
||||
#endif
|
||||
#ifndef XtCIconPixmap
|
||||
#define XtCIconPixmap ((char*)&XtShellStrings[29])
|
||||
#endif
|
||||
#ifndef XtNiconWindow
|
||||
#define XtNiconWindow ((char*)&XtShellStrings[40])
|
||||
#endif
|
||||
#ifndef XtCIconWindow
|
||||
#define XtCIconWindow ((char*)&XtShellStrings[51])
|
||||
#endif
|
||||
#ifndef XtNiconMask
|
||||
#define XtNiconMask ((char*)&XtShellStrings[62])
|
||||
#endif
|
||||
#ifndef XtCIconMask
|
||||
#define XtCIconMask ((char*)&XtShellStrings[71])
|
||||
#endif
|
||||
#ifndef XtNwindowGroup
|
||||
#define XtNwindowGroup ((char*)&XtShellStrings[80])
|
||||
#endif
|
||||
#ifndef XtCWindowGroup
|
||||
#define XtCWindowGroup ((char*)&XtShellStrings[92])
|
||||
#endif
|
||||
#ifndef XtNvisual
|
||||
#define XtNvisual ((char*)&XtShellStrings[104])
|
||||
#endif
|
||||
#ifndef XtCVisual
|
||||
#define XtCVisual ((char*)&XtShellStrings[111])
|
||||
#endif
|
||||
#ifndef XtNtitleEncoding
|
||||
#define XtNtitleEncoding ((char*)&XtShellStrings[118])
|
||||
#endif
|
||||
#ifndef XtCTitleEncoding
|
||||
#define XtCTitleEncoding ((char*)&XtShellStrings[132])
|
||||
#endif
|
||||
#ifndef XtNsaveUnder
|
||||
#define XtNsaveUnder ((char*)&XtShellStrings[146])
|
||||
#endif
|
||||
#ifndef XtCSaveUnder
|
||||
#define XtCSaveUnder ((char*)&XtShellStrings[156])
|
||||
#endif
|
||||
#ifndef XtNtransient
|
||||
#define XtNtransient ((char*)&XtShellStrings[166])
|
||||
#endif
|
||||
#ifndef XtCTransient
|
||||
#define XtCTransient ((char*)&XtShellStrings[176])
|
||||
#endif
|
||||
#ifndef XtNoverrideRedirect
|
||||
#define XtNoverrideRedirect ((char*)&XtShellStrings[186])
|
||||
#endif
|
||||
#ifndef XtCOverrideRedirect
|
||||
#define XtCOverrideRedirect ((char*)&XtShellStrings[203])
|
||||
#endif
|
||||
#ifndef XtNtransientFor
|
||||
#define XtNtransientFor ((char*)&XtShellStrings[220])
|
||||
#endif
|
||||
#ifndef XtCTransientFor
|
||||
#define XtCTransientFor ((char*)&XtShellStrings[233])
|
||||
#endif
|
||||
#ifndef XtNiconNameEncoding
|
||||
#define XtNiconNameEncoding ((char*)&XtShellStrings[246])
|
||||
#endif
|
||||
#ifndef XtCIconNameEncoding
|
||||
#define XtCIconNameEncoding ((char*)&XtShellStrings[263])
|
||||
#endif
|
||||
#ifndef XtNallowShellResize
|
||||
#define XtNallowShellResize ((char*)&XtShellStrings[280])
|
||||
#endif
|
||||
#ifndef XtCAllowShellResize
|
||||
#define XtCAllowShellResize ((char*)&XtShellStrings[297])
|
||||
#endif
|
||||
#ifndef XtNcreatePopupChildProc
|
||||
#define XtNcreatePopupChildProc ((char*)&XtShellStrings[314])
|
||||
#endif
|
||||
#ifndef XtCCreatePopupChildProc
|
||||
#define XtCCreatePopupChildProc ((char*)&XtShellStrings[335])
|
||||
#endif
|
||||
#ifndef XtNtitle
|
||||
#define XtNtitle ((char*)&XtShellStrings[356])
|
||||
#endif
|
||||
#ifndef XtCTitle
|
||||
#define XtCTitle ((char*)&XtShellStrings[362])
|
||||
#endif
|
||||
#ifndef XtRAtom
|
||||
#define XtRAtom ((char*)&XtShellStrings[368])
|
||||
#endif
|
||||
#ifndef XtNargc
|
||||
#define XtNargc ((char*)&XtShellStrings[373])
|
||||
#endif
|
||||
#ifndef XtCArgc
|
||||
#define XtCArgc ((char*)&XtShellStrings[378])
|
||||
#endif
|
||||
#ifndef XtNargv
|
||||
#define XtNargv ((char*)&XtShellStrings[383])
|
||||
#endif
|
||||
#ifndef XtCArgv
|
||||
#define XtCArgv ((char*)&XtShellStrings[388])
|
||||
#endif
|
||||
#ifndef XtNiconX
|
||||
#define XtNiconX ((char*)&XtShellStrings[393])
|
||||
#endif
|
||||
#ifndef XtCIconX
|
||||
#define XtCIconX ((char*)&XtShellStrings[399])
|
||||
#endif
|
||||
#ifndef XtNiconY
|
||||
#define XtNiconY ((char*)&XtShellStrings[405])
|
||||
#endif
|
||||
#ifndef XtCIconY
|
||||
#define XtCIconY ((char*)&XtShellStrings[411])
|
||||
#endif
|
||||
#ifndef XtNinput
|
||||
#define XtNinput ((char*)&XtShellStrings[417])
|
||||
#endif
|
||||
#ifndef XtCInput
|
||||
#define XtCInput ((char*)&XtShellStrings[423])
|
||||
#endif
|
||||
#ifndef XtNiconic
|
||||
#define XtNiconic ((char*)&XtShellStrings[429])
|
||||
#endif
|
||||
#ifndef XtCIconic
|
||||
#define XtCIconic ((char*)&XtShellStrings[436])
|
||||
#endif
|
||||
#ifndef XtNinitialState
|
||||
#define XtNinitialState ((char*)&XtShellStrings[443])
|
||||
#endif
|
||||
#ifndef XtCInitialState
|
||||
#define XtCInitialState ((char*)&XtShellStrings[456])
|
||||
#endif
|
||||
#ifndef XtNgeometry
|
||||
#define XtNgeometry ((char*)&XtShellStrings[469])
|
||||
#endif
|
||||
#ifndef XtCGeometry
|
||||
#define XtCGeometry ((char*)&XtShellStrings[478])
|
||||
#endif
|
||||
#ifndef XtNbaseWidth
|
||||
#define XtNbaseWidth ((char*)&XtShellStrings[487])
|
||||
#endif
|
||||
#ifndef XtCBaseWidth
|
||||
#define XtCBaseWidth ((char*)&XtShellStrings[497])
|
||||
#endif
|
||||
#ifndef XtNbaseHeight
|
||||
#define XtNbaseHeight ((char*)&XtShellStrings[507])
|
||||
#endif
|
||||
#ifndef XtCBaseHeight
|
||||
#define XtCBaseHeight ((char*)&XtShellStrings[518])
|
||||
#endif
|
||||
#ifndef XtNwinGravity
|
||||
#define XtNwinGravity ((char*)&XtShellStrings[529])
|
||||
#endif
|
||||
#ifndef XtCWinGravity
|
||||
#define XtCWinGravity ((char*)&XtShellStrings[540])
|
||||
#endif
|
||||
#ifndef XtNminWidth
|
||||
#define XtNminWidth ((char*)&XtShellStrings[551])
|
||||
#endif
|
||||
#ifndef XtCMinWidth
|
||||
#define XtCMinWidth ((char*)&XtShellStrings[560])
|
||||
#endif
|
||||
#ifndef XtNminHeight
|
||||
#define XtNminHeight ((char*)&XtShellStrings[569])
|
||||
#endif
|
||||
#ifndef XtCMinHeight
|
||||
#define XtCMinHeight ((char*)&XtShellStrings[579])
|
||||
#endif
|
||||
#ifndef XtNmaxWidth
|
||||
#define XtNmaxWidth ((char*)&XtShellStrings[589])
|
||||
#endif
|
||||
#ifndef XtCMaxWidth
|
||||
#define XtCMaxWidth ((char*)&XtShellStrings[598])
|
||||
#endif
|
||||
#ifndef XtNmaxHeight
|
||||
#define XtNmaxHeight ((char*)&XtShellStrings[607])
|
||||
#endif
|
||||
#ifndef XtCMaxHeight
|
||||
#define XtCMaxHeight ((char*)&XtShellStrings[617])
|
||||
#endif
|
||||
#ifndef XtNwidthInc
|
||||
#define XtNwidthInc ((char*)&XtShellStrings[627])
|
||||
#endif
|
||||
#ifndef XtCWidthInc
|
||||
#define XtCWidthInc ((char*)&XtShellStrings[636])
|
||||
#endif
|
||||
#ifndef XtNheightInc
|
||||
#define XtNheightInc ((char*)&XtShellStrings[645])
|
||||
#endif
|
||||
#ifndef XtCHeightInc
|
||||
#define XtCHeightInc ((char*)&XtShellStrings[655])
|
||||
#endif
|
||||
#ifndef XtNminAspectY
|
||||
#define XtNminAspectY ((char*)&XtShellStrings[665])
|
||||
#endif
|
||||
#ifndef XtCMinAspectY
|
||||
#define XtCMinAspectY ((char*)&XtShellStrings[676])
|
||||
#endif
|
||||
#ifndef XtNmaxAspectY
|
||||
#define XtNmaxAspectY ((char*)&XtShellStrings[687])
|
||||
#endif
|
||||
#ifndef XtCMaxAspectY
|
||||
#define XtCMaxAspectY ((char*)&XtShellStrings[698])
|
||||
#endif
|
||||
#ifndef XtNminAspectX
|
||||
#define XtNminAspectX ((char*)&XtShellStrings[709])
|
||||
#endif
|
||||
#ifndef XtCMinAspectX
|
||||
#define XtCMinAspectX ((char*)&XtShellStrings[720])
|
||||
#endif
|
||||
#ifndef XtNmaxAspectX
|
||||
#define XtNmaxAspectX ((char*)&XtShellStrings[731])
|
||||
#endif
|
||||
#ifndef XtCMaxAspectX
|
||||
#define XtCMaxAspectX ((char*)&XtShellStrings[742])
|
||||
#endif
|
||||
#ifndef XtNwmTimeout
|
||||
#define XtNwmTimeout ((char*)&XtShellStrings[753])
|
||||
#endif
|
||||
#ifndef XtCWmTimeout
|
||||
#define XtCWmTimeout ((char*)&XtShellStrings[763])
|
||||
#endif
|
||||
#ifndef XtNwaitForWm
|
||||
#define XtNwaitForWm ((char*)&XtShellStrings[773])
|
||||
#endif
|
||||
#ifndef XtCWaitForWm
|
||||
#define XtCWaitForWm ((char*)&XtShellStrings[783])
|
||||
#endif
|
||||
#ifndef XtNwaitforwm
|
||||
#define XtNwaitforwm ((char*)&XtShellStrings[793])
|
||||
#endif
|
||||
#ifndef XtCWaitforwm
|
||||
#define XtCWaitforwm ((char*)&XtShellStrings[803])
|
||||
#endif
|
||||
#ifndef XtNclientLeader
|
||||
#define XtNclientLeader ((char*)&XtShellStrings[813])
|
||||
#endif
|
||||
#ifndef XtCClientLeader
|
||||
#define XtCClientLeader ((char*)&XtShellStrings[826])
|
||||
#endif
|
||||
#ifndef XtNwindowRole
|
||||
#define XtNwindowRole ((char*)&XtShellStrings[839])
|
||||
#endif
|
||||
#ifndef XtCWindowRole
|
||||
#define XtCWindowRole ((char*)&XtShellStrings[850])
|
||||
#endif
|
||||
#ifndef XtNurgency
|
||||
#define XtNurgency ((char*)&XtShellStrings[861])
|
||||
#endif
|
||||
#ifndef XtCUrgency
|
||||
#define XtCUrgency ((char*)&XtShellStrings[869])
|
||||
#endif
|
||||
#ifndef XtNcancelCallback
|
||||
#define XtNcancelCallback ((char*)&XtShellStrings[877])
|
||||
#endif
|
||||
#ifndef XtNcloneCommand
|
||||
#define XtNcloneCommand ((char*)&XtShellStrings[892])
|
||||
#endif
|
||||
#ifndef XtCCloneCommand
|
||||
#define XtCCloneCommand ((char*)&XtShellStrings[905])
|
||||
#endif
|
||||
#ifndef XtNconnection
|
||||
#define XtNconnection ((char*)&XtShellStrings[918])
|
||||
#endif
|
||||
#ifndef XtCConnection
|
||||
#define XtCConnection ((char*)&XtShellStrings[929])
|
||||
#endif
|
||||
#ifndef XtNcurrentDirectory
|
||||
#define XtNcurrentDirectory ((char*)&XtShellStrings[940])
|
||||
#endif
|
||||
#ifndef XtCCurrentDirectory
|
||||
#define XtCCurrentDirectory ((char*)&XtShellStrings[957])
|
||||
#endif
|
||||
#ifndef XtNdieCallback
|
||||
#define XtNdieCallback ((char*)&XtShellStrings[974])
|
||||
#endif
|
||||
#ifndef XtNdiscardCommand
|
||||
#define XtNdiscardCommand ((char*)&XtShellStrings[986])
|
||||
#endif
|
||||
#ifndef XtCDiscardCommand
|
||||
#define XtCDiscardCommand ((char*)&XtShellStrings[1001])
|
||||
#endif
|
||||
#ifndef XtNenvironment
|
||||
#define XtNenvironment ((char*)&XtShellStrings[1016])
|
||||
#endif
|
||||
#ifndef XtCEnvironment
|
||||
#define XtCEnvironment ((char*)&XtShellStrings[1028])
|
||||
#endif
|
||||
#ifndef XtNinteractCallback
|
||||
#define XtNinteractCallback ((char*)&XtShellStrings[1040])
|
||||
#endif
|
||||
#ifndef XtNjoinSession
|
||||
#define XtNjoinSession ((char*)&XtShellStrings[1057])
|
||||
#endif
|
||||
#ifndef XtCJoinSession
|
||||
#define XtCJoinSession ((char*)&XtShellStrings[1069])
|
||||
#endif
|
||||
#ifndef XtNprogramPath
|
||||
#define XtNprogramPath ((char*)&XtShellStrings[1081])
|
||||
#endif
|
||||
#ifndef XtCProgramPath
|
||||
#define XtCProgramPath ((char*)&XtShellStrings[1093])
|
||||
#endif
|
||||
#ifndef XtNresignCommand
|
||||
#define XtNresignCommand ((char*)&XtShellStrings[1105])
|
||||
#endif
|
||||
#ifndef XtCResignCommand
|
||||
#define XtCResignCommand ((char*)&XtShellStrings[1119])
|
||||
#endif
|
||||
#ifndef XtNrestartCommand
|
||||
#define XtNrestartCommand ((char*)&XtShellStrings[1133])
|
||||
#endif
|
||||
#ifndef XtCRestartCommand
|
||||
#define XtCRestartCommand ((char*)&XtShellStrings[1148])
|
||||
#endif
|
||||
#ifndef XtNrestartStyle
|
||||
#define XtNrestartStyle ((char*)&XtShellStrings[1163])
|
||||
#endif
|
||||
#ifndef XtCRestartStyle
|
||||
#define XtCRestartStyle ((char*)&XtShellStrings[1176])
|
||||
#endif
|
||||
#ifndef XtNsaveCallback
|
||||
#define XtNsaveCallback ((char*)&XtShellStrings[1189])
|
||||
#endif
|
||||
#ifndef XtNsaveCompleteCallback
|
||||
#define XtNsaveCompleteCallback ((char*)&XtShellStrings[1202])
|
||||
#endif
|
||||
#ifndef XtNsessionID
|
||||
#define XtNsessionID ((char*)&XtShellStrings[1223])
|
||||
#endif
|
||||
#ifndef XtCSessionID
|
||||
#define XtCSessionID ((char*)&XtShellStrings[1233])
|
||||
#endif
|
||||
#ifndef XtNshutdownCommand
|
||||
#define XtNshutdownCommand ((char*)&XtShellStrings[1243])
|
||||
#endif
|
||||
#ifndef XtCShutdownCommand
|
||||
#define XtCShutdownCommand ((char*)&XtShellStrings[1259])
|
||||
#endif
|
||||
#ifndef XtNerrorCallback
|
||||
#define XtNerrorCallback ((char*)&XtShellStrings[1275])
|
||||
#endif
|
||||
#endif /* XTSTRINGDEFINES */
|
||||
|
||||
#ifndef XTSTRINGDEFINES
|
||||
#undef _XtShell_h_Const
|
||||
#endif
|
||||
|
||||
/* Class record constants */
|
||||
|
||||
typedef struct _ShellClassRec *ShellWidgetClass;
|
||||
typedef struct _OverrideShellClassRec *OverrideShellWidgetClass;
|
||||
typedef struct _WMShellClassRec *WMShellWidgetClass;
|
||||
typedef struct _TransientShellClassRec *TransientShellWidgetClass;
|
||||
typedef struct _TopLevelShellClassRec *TopLevelShellWidgetClass;
|
||||
typedef struct _ApplicationShellClassRec *ApplicationShellWidgetClass;
|
||||
typedef struct _SessionShellClassRec *SessionShellWidgetClass;
|
||||
|
||||
#ifndef SHELL
|
||||
externalref WidgetClass shellWidgetClass;
|
||||
externalref WidgetClass overrideShellWidgetClass;
|
||||
externalref WidgetClass wmShellWidgetClass;
|
||||
externalref WidgetClass transientShellWidgetClass;
|
||||
externalref WidgetClass topLevelShellWidgetClass;
|
||||
externalref WidgetClass applicationShellWidgetClass;
|
||||
externalref WidgetClass sessionShellWidgetClass;
|
||||
#endif
|
||||
|
||||
#endif /* _XtShell_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
10
X11/ShellI.h
10
X11/ShellI.h
|
|
@ -1,10 +0,0 @@
|
|||
#ifndef _XtShellInternal_h
|
||||
#define _XtShellInternal_h
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern void _XtShellGetCoordinates(Widget widget, Position *x, Position *y);
|
||||
|
||||
#endif /* _XtShellInternal_h */
|
||||
434
X11/ShellP.h
434
X11/ShellP.h
|
|
@ -1,434 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
/*
|
||||
* ShellP.h - Private definitions for Shell widget
|
||||
*
|
||||
* Author: Paul Asente
|
||||
* Digital Equipment Corporation
|
||||
* Western Software Laboratory
|
||||
* Date: Thu Dec 3, 1987
|
||||
*/
|
||||
|
||||
#ifndef _XtShellPrivate_h
|
||||
#define _XtShellPrivate_h
|
||||
|
||||
#include <X11/Shell.h>
|
||||
|
||||
/* *****
|
||||
* ***** VendorP.h is included later on; it needs fields defined in the first
|
||||
* ***** part of this header file
|
||||
* *****
|
||||
*/
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Shell Widget Private Data
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
/* New fields for the Shell widget class record */
|
||||
|
||||
typedef struct {
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} ShellClassPart;
|
||||
|
||||
typedef struct {
|
||||
XtPointer next_extension; /* 1st 4 mandated for all extension records */
|
||||
XrmQuark record_type; /* NULLQUARK; on ShellClassPart */
|
||||
long version; /* must be XtShellExtensionVersion */
|
||||
Cardinal record_size; /* sizeof(ShellClassExtensionRec) */
|
||||
XtGeometryHandler root_geometry_manager;
|
||||
} ShellClassExtensionRec, *ShellClassExtension;
|
||||
|
||||
#define XtShellExtensionVersion 1L
|
||||
#define XtInheritRootGeometryManager ((XtGeometryHandler)_XtInherit)
|
||||
|
||||
typedef struct _ShellClassRec {
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
ShellClassPart shell_class;
|
||||
} ShellClassRec;
|
||||
|
||||
externalref ShellClassRec shellClassRec;
|
||||
|
||||
/* New fields for the shell widget */
|
||||
|
||||
typedef struct {
|
||||
char *geometry;
|
||||
XtCreatePopupChildProc create_popup_child_proc;
|
||||
XtGrabKind grab_kind;
|
||||
Boolean spring_loaded;
|
||||
Boolean popped_up;
|
||||
Boolean allow_shell_resize;
|
||||
Boolean client_specified; /* re-using old name */
|
||||
#define _XtShellPositionValid ((Boolean)(1<<0))
|
||||
#define _XtShellNotReparented ((Boolean)(1<<1))
|
||||
#define _XtShellPPositionOK ((Boolean)(1<<2))
|
||||
#define _XtShellGeometryParsed ((Boolean)(1<<3))
|
||||
Boolean save_under;
|
||||
Boolean override_redirect;
|
||||
|
||||
XtCallbackList popup_callback;
|
||||
XtCallbackList popdown_callback;
|
||||
Visual* visual;
|
||||
} ShellPart;
|
||||
|
||||
typedef struct {
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
ShellPart shell;
|
||||
} ShellRec, *ShellWidget;
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* OverrideShell Widget Private Data
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
/* New fields for the OverrideShell widget class record */
|
||||
|
||||
typedef struct {
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} OverrideShellClassPart;
|
||||
|
||||
typedef struct _OverrideShellClassRec {
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
ShellClassPart shell_class;
|
||||
OverrideShellClassPart override_shell_class;
|
||||
} OverrideShellClassRec;
|
||||
|
||||
externalref OverrideShellClassRec overrideShellClassRec;
|
||||
|
||||
/* No new fields for the override shell widget */
|
||||
|
||||
typedef struct {int frabjous;} OverrideShellPart;
|
||||
|
||||
typedef struct {
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
ShellPart shell;
|
||||
OverrideShellPart override;
|
||||
} OverrideShellRec, *OverrideShellWidget;
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* WMShell Widget Private Data
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
/* New fields for the WMShell widget class record */
|
||||
|
||||
typedef struct {
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} WMShellClassPart;
|
||||
|
||||
typedef struct _WMShellClassRec {
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
ShellClassPart shell_class;
|
||||
WMShellClassPart wm_shell_class;
|
||||
} WMShellClassRec;
|
||||
|
||||
externalref WMShellClassRec wmShellClassRec;
|
||||
|
||||
/* New fields for the WM shell widget */
|
||||
|
||||
typedef struct {
|
||||
char *title;
|
||||
int wm_timeout;
|
||||
Boolean wait_for_wm;
|
||||
Boolean transient;
|
||||
Boolean urgency;
|
||||
Widget client_leader;
|
||||
String window_role;
|
||||
struct _OldXSizeHints { /* pre-R4 Xlib structure */
|
||||
long flags;
|
||||
int x, y;
|
||||
int width, height;
|
||||
int min_width, min_height;
|
||||
int max_width, max_height;
|
||||
int width_inc, height_inc;
|
||||
struct {
|
||||
int x;
|
||||
int y;
|
||||
} min_aspect, max_aspect;
|
||||
} size_hints;
|
||||
XWMHints wm_hints;
|
||||
int base_width, base_height;
|
||||
int win_gravity;
|
||||
Atom title_encoding;
|
||||
} WMShellPart;
|
||||
|
||||
typedef struct {
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
ShellPart shell;
|
||||
WMShellPart wm;
|
||||
} WMShellRec, *WMShellWidget;
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#include <X11/VendorP.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* TransientShell Widget Private Data
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
/* New fields for the TransientShell widget class record */
|
||||
|
||||
typedef struct {
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} TransientShellClassPart;
|
||||
|
||||
typedef struct _TransientShellClassRec {
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
ShellClassPart shell_class;
|
||||
WMShellClassPart wm_shell_class;
|
||||
VendorShellClassPart vendor_shell_class;
|
||||
TransientShellClassPart transient_shell_class;
|
||||
} TransientShellClassRec;
|
||||
|
||||
externalref TransientShellClassRec transientShellClassRec;
|
||||
|
||||
/* New fields for the transient shell widget */
|
||||
|
||||
typedef struct {
|
||||
Widget transient_for;
|
||||
} TransientShellPart;
|
||||
|
||||
typedef struct {
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
ShellPart shell;
|
||||
WMShellPart wm;
|
||||
VendorShellPart vendor;
|
||||
TransientShellPart transient;
|
||||
} TransientShellRec, *TransientShellWidget;
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* TopLevelShell Widget Private Data
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
/* New fields for the TopLevelShell widget class record */
|
||||
|
||||
typedef struct {
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} TopLevelShellClassPart;
|
||||
|
||||
typedef struct _TopLevelShellClassRec {
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
ShellClassPart shell_class;
|
||||
WMShellClassPart wm_shell_class;
|
||||
VendorShellClassPart vendor_shell_class;
|
||||
TopLevelShellClassPart top_level_shell_class;
|
||||
} TopLevelShellClassRec;
|
||||
|
||||
externalref TopLevelShellClassRec topLevelShellClassRec;
|
||||
|
||||
/* New fields for the top level shell widget */
|
||||
|
||||
typedef struct {
|
||||
char *icon_name;
|
||||
Boolean iconic;
|
||||
Atom icon_name_encoding;
|
||||
} TopLevelShellPart;
|
||||
|
||||
typedef struct {
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
ShellPart shell;
|
||||
WMShellPart wm;
|
||||
VendorShellPart vendor;
|
||||
TopLevelShellPart topLevel;
|
||||
} TopLevelShellRec, *TopLevelShellWidget;
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* ApplicationShell Widget Private Data
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
/* New fields for the ApplicationShell widget class record */
|
||||
|
||||
typedef struct {
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} ApplicationShellClassPart;
|
||||
|
||||
typedef struct _ApplicationShellClassRec {
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
ShellClassPart shell_class;
|
||||
WMShellClassPart wm_shell_class;
|
||||
VendorShellClassPart vendor_shell_class;
|
||||
TopLevelShellClassPart top_level_shell_class;
|
||||
ApplicationShellClassPart application_shell_class;
|
||||
} ApplicationShellClassRec;
|
||||
|
||||
externalref ApplicationShellClassRec applicationShellClassRec;
|
||||
|
||||
/* New fields for the application shell widget */
|
||||
|
||||
typedef struct {
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
char *c_class;
|
||||
#else
|
||||
char *class;
|
||||
#endif
|
||||
XrmClass xrm_class;
|
||||
int argc;
|
||||
char **argv;
|
||||
} ApplicationShellPart;
|
||||
|
||||
typedef struct {
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
ShellPart shell;
|
||||
WMShellPart wm;
|
||||
VendorShellPart vendor;
|
||||
TopLevelShellPart topLevel;
|
||||
ApplicationShellPart application;
|
||||
} ApplicationShellRec, *ApplicationShellWidget;
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* SessionShell Widget Private Data
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
/* New fields for the SessionShell widget class record */
|
||||
|
||||
typedef struct {
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} SessionShellClassPart;
|
||||
|
||||
typedef struct _SessionShellClassRec {
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
ShellClassPart shell_class;
|
||||
WMShellClassPart wm_shell_class;
|
||||
VendorShellClassPart vendor_shell_class;
|
||||
TopLevelShellClassPart top_level_shell_class;
|
||||
ApplicationShellClassPart application_shell_class;
|
||||
SessionShellClassPart session_shell_class;
|
||||
} SessionShellClassRec;
|
||||
|
||||
externalref SessionShellClassRec sessionShellClassRec;
|
||||
|
||||
typedef struct _XtSaveYourselfRec *XtSaveYourself; /* implementation-private */
|
||||
|
||||
/* New fields for the session shell widget */
|
||||
|
||||
typedef struct {
|
||||
SmcConn connection;
|
||||
String session_id;
|
||||
String* restart_command;
|
||||
String* clone_command;
|
||||
String* discard_command;
|
||||
String* resign_command;
|
||||
String* shutdown_command;
|
||||
String* environment;
|
||||
String current_dir;
|
||||
String program_path;
|
||||
unsigned char restart_style;
|
||||
unsigned char checkpoint_state;
|
||||
Boolean join_session;
|
||||
XtCallbackList save_callbacks;
|
||||
XtCallbackList interact_callbacks;
|
||||
XtCallbackList cancel_callbacks;
|
||||
XtCallbackList save_complete_callbacks;
|
||||
XtCallbackList die_callbacks;
|
||||
XtCallbackList error_callbacks;
|
||||
XtSaveYourself save;
|
||||
XtInputId input_id;
|
||||
XtPointer ses20;
|
||||
XtPointer ses19;
|
||||
XtPointer ses18;
|
||||
XtPointer ses17;
|
||||
XtPointer ses16;
|
||||
XtPointer ses15;
|
||||
XtPointer ses14;
|
||||
XtPointer ses13;
|
||||
XtPointer ses12;
|
||||
XtPointer ses11;
|
||||
XtPointer ses10;
|
||||
XtPointer ses9;
|
||||
XtPointer ses8;
|
||||
XtPointer ses7;
|
||||
XtPointer ses6;
|
||||
XtPointer ses5;
|
||||
XtPointer ses4;
|
||||
XtPointer ses3;
|
||||
XtPointer ses2;
|
||||
XtPointer ses1;
|
||||
} SessionShellPart;
|
||||
|
||||
typedef struct {
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
ShellPart shell;
|
||||
WMShellPart wm;
|
||||
VendorShellPart vendor;
|
||||
TopLevelShellPart topLevel;
|
||||
ApplicationShellPart application;
|
||||
SessionShellPart session;
|
||||
} SessionShellRec, *SessionShellWidget;
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtShellPrivate_h */
|
||||
1085
X11/StringDefs.h
1085
X11/StringDefs.h
File diff suppressed because it is too large
Load diff
106
X11/Sunkeysym.h
106
X11/Sunkeysym.h
|
|
@ -1,106 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1991, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||
*/
|
||||
/************************************************************
|
||||
|
||||
Copyright 1991, 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.
|
||||
|
||||
***********************************************************/
|
||||
|
||||
/*
|
||||
* Floating Accent
|
||||
*/
|
||||
|
||||
#define SunXK_FA_Grave 0x1005FF00
|
||||
#define SunXK_FA_Circum 0x1005FF01
|
||||
#define SunXK_FA_Tilde 0x1005FF02
|
||||
#define SunXK_FA_Acute 0x1005FF03
|
||||
#define SunXK_FA_Diaeresis 0x1005FF04
|
||||
#define SunXK_FA_Cedilla 0x1005FF05
|
||||
|
||||
/*
|
||||
* Miscellaneous Functions
|
||||
*/
|
||||
|
||||
#define SunXK_F36 0x1005FF10 /* Labeled F11 */
|
||||
#define SunXK_F37 0x1005FF11 /* Labeled F12 */
|
||||
|
||||
#define SunXK_Sys_Req 0x1005FF60
|
||||
#define SunXK_Print_Screen 0x0000FF61 /* Same as XK_Print */
|
||||
|
||||
/*
|
||||
* International & Multi-Key Character Composition
|
||||
*/
|
||||
|
||||
#define SunXK_Compose 0x0000FF20 /* Same as XK_Multi_key */
|
||||
#define SunXK_AltGraph 0x0000FF7E /* Same as XK_Mode_switch */
|
||||
|
||||
/*
|
||||
* Cursor Control
|
||||
*/
|
||||
|
||||
#define SunXK_PageUp 0x0000FF55 /* Same as XK_Prior */
|
||||
#define SunXK_PageDown 0x0000FF56 /* Same as XK_Next */
|
||||
|
||||
/*
|
||||
* Open Look Functions
|
||||
*/
|
||||
|
||||
#define SunXK_Undo 0x0000FF65 /* Same as XK_Undo */
|
||||
#define SunXK_Again 0x0000FF66 /* Same as XK_Redo */
|
||||
#define SunXK_Find 0x0000FF68 /* Same as XK_Find */
|
||||
#define SunXK_Stop 0x0000FF69 /* Same as XK_Cancel */
|
||||
#define SunXK_Props 0x1005FF70
|
||||
#define SunXK_Front 0x1005FF71
|
||||
#define SunXK_Copy 0x1005FF72
|
||||
#define SunXK_Open 0x1005FF73
|
||||
#define SunXK_Paste 0x1005FF74
|
||||
#define SunXK_Cut 0x1005FF75
|
||||
|
||||
#define SunXK_PowerSwitch 0x1005FF76
|
||||
#define SunXK_AudioLowerVolume 0x1005FF77
|
||||
#define SunXK_AudioMute 0x1005FF78
|
||||
#define SunXK_AudioRaiseVolume 0x1005FF79
|
||||
#define SunXK_VideoDegauss 0x1005FF7A
|
||||
#define SunXK_VideoLowerBrightness 0x1005FF7B
|
||||
#define SunXK_VideoRaiseBrightness 0x1005FF7C
|
||||
#define SunXK_PowerSwitchShift 0x1005FF7D
|
||||
129
X11/ThreadsI.h
129
X11/ThreadsI.h
|
|
@ -1,129 +0,0 @@
|
|||
/************************************************************
|
||||
|
||||
Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
/*
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
/* $XFree86: xc/lib/Xt/ThreadsI.h,v 3.5 2001/12/14 19:56:31 dawes Exp $ */
|
||||
|
||||
#ifndef _XtThreadsI_h
|
||||
#define _XtThreadsI_h
|
||||
|
||||
#include <X11/XlibConf.h>
|
||||
|
||||
#ifdef XTHREADS
|
||||
|
||||
typedef struct _LockRec *LockPtr;
|
||||
|
||||
typedef void (*ThreadAppProc)(
|
||||
XtAppContext /* app */
|
||||
);
|
||||
|
||||
typedef void (*ThreadAppYieldLockProc)(
|
||||
XtAppContext, /* app */
|
||||
Boolean*, /* push_thread */
|
||||
Boolean*, /* pushed_thread */
|
||||
int* /* level */
|
||||
);
|
||||
|
||||
typedef void (*ThreadAppRestoreLockProc)(
|
||||
XtAppContext /* app */,
|
||||
int, /* level */
|
||||
Boolean* /* pushed_thread */
|
||||
);
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern void (*_XtProcessLock)(
|
||||
void
|
||||
);
|
||||
|
||||
extern void (*_XtProcessUnlock)(
|
||||
void
|
||||
);
|
||||
|
||||
extern void (*_XtInitAppLock)(
|
||||
XtAppContext /* app */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#define INIT_APP_LOCK(app) if(_XtInitAppLock) (*_XtInitAppLock)(app)
|
||||
#define FREE_APP_LOCK(app) if(app && app->free_lock)(*app->free_lock)(app)
|
||||
|
||||
#define LOCK_PROCESS if(_XtProcessLock)(*_XtProcessLock)()
|
||||
#define UNLOCK_PROCESS if(_XtProcessUnlock)(*_XtProcessUnlock)()
|
||||
#define LOCK_APP(app) if(app && app->lock)(*app->lock)(app)
|
||||
#define UNLOCK_APP(app) if(app && app->unlock)(*app->unlock)(app)
|
||||
|
||||
#define YIELD_APP_LOCK(app,push,pushed,level)\
|
||||
if(app && app->yield_lock) (*app->yield_lock)(app,push,pushed,level)
|
||||
#define RESTORE_APP_LOCK(app,level,pushed)\
|
||||
if(app && app->restore_lock) (*app->restore_lock)(app,level,pushed)
|
||||
|
||||
#define WIDGET_TO_APPCON(w) \
|
||||
XtAppContext app = (w && _XtProcessLock ? \
|
||||
XtWidgetToApplicationContext(w) : NULL)
|
||||
|
||||
#define DPY_TO_APPCON(d) \
|
||||
XtAppContext app = (_XtProcessLock ? XtDisplayToApplicationContext(d): NULL)
|
||||
|
||||
#else /* defined(XTHREADS) */
|
||||
|
||||
#define LOCK_PROCESS
|
||||
#define UNLOCK_PROCESS
|
||||
#define LOCK_APP(app)
|
||||
#define UNLOCK_APP(app)
|
||||
|
||||
#define INIT_APP_LOCK(app)
|
||||
#define FREE_APP_LOCK(app)
|
||||
|
||||
#define WIDGET_TO_APPCON(w)
|
||||
#define DPY_TO_APPCON(d)
|
||||
|
||||
#endif /* !defined(XTHREADS) */
|
||||
#endif /* _XtThreadsI_h */
|
||||
606
X11/TranslateI.h
606
X11/TranslateI.h
|
|
@ -1,606 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
/*
|
||||
* TranslateI.h - Header file private to translation management
|
||||
*
|
||||
* Author: Gabe Beged-Dov, HP
|
||||
*
|
||||
* Former Author: Charles Haynes
|
||||
* Digital Equipment Corporation
|
||||
* Western Research Laboratory
|
||||
* Date: Sat Aug 29 1987
|
||||
*/
|
||||
|
||||
/*#define REFCNT_TRANSLATIONS*/
|
||||
#define CACHE_TRANSLATIONS
|
||||
|
||||
#define TM_NO_MATCH (-2)
|
||||
|
||||
#define _XtRStateTablePair "_XtStateTablePair"
|
||||
|
||||
typedef unsigned char TMByteCard;
|
||||
typedef unsigned short TMShortCard;
|
||||
typedef unsigned long TMLongCard;
|
||||
typedef short TMShortInt;
|
||||
|
||||
typedef struct _TMTypeMatchRec *TMTypeMatch;
|
||||
typedef struct _TMModifierMatchRec *TMModifierMatch;
|
||||
typedef struct _TMEventRec *TMEventPtr;
|
||||
|
||||
typedef Boolean (*MatchProc)(TMTypeMatch typeMatch,
|
||||
TMModifierMatch modMatch,
|
||||
TMEventPtr eventSeq);
|
||||
|
||||
typedef struct _ModToKeysymTable {
|
||||
Modifiers mask;
|
||||
int count;
|
||||
int idx;
|
||||
} ModToKeysymTable;
|
||||
|
||||
typedef struct _LateBindings {
|
||||
unsigned int knot:1;
|
||||
unsigned int pair:1;
|
||||
unsigned short ref_count; /* garbage collection */
|
||||
KeySym keysym;
|
||||
} LateBindings, *LateBindingsPtr;
|
||||
|
||||
typedef short ModifierMask;
|
||||
|
||||
typedef struct _ActionsRec *ActionPtr;
|
||||
typedef struct _ActionsRec {
|
||||
int idx; /* index into quarkTable to find proc */
|
||||
String *params; /* pointer to array of params */
|
||||
Cardinal num_params; /* number of params */
|
||||
ActionPtr next; /* next action to perform */
|
||||
} ActionRec;
|
||||
|
||||
typedef struct _XtStateRec *StatePtr;
|
||||
typedef struct _XtStateRec {
|
||||
unsigned int isCycleStart:1;
|
||||
unsigned int isCycleEnd:1;
|
||||
TMShortCard typeIndex;
|
||||
TMShortCard modIndex;
|
||||
ActionPtr actions; /* rhs list of actions to perform */
|
||||
StatePtr nextLevel;
|
||||
}StateRec;
|
||||
|
||||
|
||||
#define XtTableReplace 0
|
||||
#define XtTableAugment 1
|
||||
#define XtTableOverride 2
|
||||
#define XtTableUnmerge 3
|
||||
|
||||
typedef unsigned int _XtTranslateOp;
|
||||
|
||||
/*
|
||||
* New Definitions
|
||||
*/
|
||||
typedef struct _TMModifierMatchRec{
|
||||
TMLongCard modifiers;
|
||||
TMLongCard modifierMask;
|
||||
LateBindingsPtr lateModifiers;
|
||||
Boolean standard;
|
||||
}TMModifierMatchRec;
|
||||
|
||||
typedef struct _TMTypeMatchRec{
|
||||
TMLongCard eventType;
|
||||
TMLongCard eventCode;
|
||||
TMLongCard eventCodeMask;
|
||||
MatchProc matchEvent;
|
||||
}TMTypeMatchRec;
|
||||
|
||||
typedef struct _TMBranchHeadRec {
|
||||
unsigned int isSimple:1;
|
||||
unsigned int hasActions:1;
|
||||
unsigned int hasCycles:1;
|
||||
unsigned int more:13;
|
||||
TMShortCard typeIndex;
|
||||
TMShortCard modIndex;
|
||||
}TMBranchHeadRec, *TMBranchHead;
|
||||
|
||||
/* NOTE: elements of this structure must match those of
|
||||
* TMComplexStateTreeRec and TMParseStateTreeRec.
|
||||
*/
|
||||
typedef struct _TMSimpleStateTreeRec{
|
||||
unsigned int isSimple:1;
|
||||
unsigned int isAccelerator:1;
|
||||
unsigned int mappingNotifyInterest:1;
|
||||
unsigned int refCount:13;
|
||||
TMShortCard numBranchHeads;
|
||||
TMShortCard numQuarks; /* # of entries in quarkTbl */
|
||||
TMShortCard unused; /* to ensure same alignment */
|
||||
TMBranchHeadRec *branchHeadTbl;
|
||||
XrmQuark *quarkTbl; /* table of quarkified rhs*/
|
||||
}TMSimpleStateTreeRec, *TMSimpleStateTree;
|
||||
|
||||
/* NOTE: elements of this structure must match those of
|
||||
* TMSimpleStateTreeRec and TMParseStateTreeRec.
|
||||
*/
|
||||
typedef struct _TMComplexStateTreeRec{
|
||||
unsigned int isSimple:1;
|
||||
unsigned int isAccelerator:1;
|
||||
unsigned int mappingNotifyInterest:1;
|
||||
unsigned int refCount:13;
|
||||
TMShortCard numBranchHeads;
|
||||
TMShortCard numQuarks; /* # of entries in quarkTbl */
|
||||
TMShortCard numComplexBranchHeads;
|
||||
TMBranchHeadRec *branchHeadTbl;
|
||||
XrmQuark *quarkTbl; /* table of quarkified rhs*/
|
||||
StatePtr *complexBranchHeadTbl;
|
||||
}TMComplexStateTreeRec, *TMComplexStateTree;
|
||||
|
||||
/* NOTE: elements of this structure must match those of
|
||||
* TMSimpleStateTreeRec and TMComplexStateTreeRec.
|
||||
*/
|
||||
typedef struct _TMParseStateTreeRec{
|
||||
unsigned int isSimple:1;
|
||||
unsigned int isAccelerator:1;
|
||||
unsigned int mappingNotifyInterest:1;
|
||||
unsigned int isStackQuarks:1;
|
||||
unsigned int isStackBranchHeads:1;
|
||||
unsigned int isStackComplexBranchHeads:1;
|
||||
unsigned int unused:10; /* to ensure correct alignment */
|
||||
TMShortCard numBranchHeads;
|
||||
TMShortCard numQuarks; /* # of entries in quarkTbl */
|
||||
TMShortCard numComplexBranchHeads;
|
||||
TMBranchHeadRec *branchHeadTbl;
|
||||
XrmQuark *quarkTbl; /* table of quarkified rhs*/
|
||||
StatePtr *complexBranchHeadTbl;
|
||||
TMShortCard branchHeadTblSize;
|
||||
TMShortCard quarkTblSize; /*total size of quarkTbl */
|
||||
TMShortCard complexBranchHeadTblSize;
|
||||
StatePtr head;
|
||||
}TMParseStateTreeRec, *TMParseStateTree;
|
||||
|
||||
typedef union _TMStateTreeRec{
|
||||
TMSimpleStateTreeRec simple;
|
||||
TMParseStateTreeRec parse;
|
||||
TMComplexStateTreeRec complex;
|
||||
}*TMStateTree, **TMStateTreePtr, **TMStateTreeList;
|
||||
|
||||
typedef struct _TMSimpleBindProcsRec {
|
||||
XtActionProc *procs;
|
||||
}TMSimpleBindProcsRec, *TMSimpleBindProcs;
|
||||
|
||||
typedef struct _TMComplexBindProcsRec {
|
||||
Widget widget; /*widgetID to pass to action Proc*/
|
||||
XtTranslations aXlations;
|
||||
XtActionProc *procs;
|
||||
}TMComplexBindProcsRec, *TMComplexBindProcs;
|
||||
|
||||
typedef struct _TMSimpleBindDataRec {
|
||||
unsigned int isComplex:1; /* must be first */
|
||||
TMSimpleBindProcsRec bindTbl[1]; /* variable length */
|
||||
}TMSimpleBindDataRec, *TMSimpleBindData;
|
||||
|
||||
typedef struct _TMComplexBindDataRec {
|
||||
unsigned int isComplex:1; /* must be first */
|
||||
struct _ATranslationData *accel_context; /* for GetValues */
|
||||
TMComplexBindProcsRec bindTbl[1]; /* variable length */
|
||||
}TMComplexBindDataRec, *TMComplexBindData;
|
||||
|
||||
typedef union _TMBindDataRec{
|
||||
TMSimpleBindDataRec simple;
|
||||
TMComplexBindDataRec complex;
|
||||
}*TMBindData;
|
||||
|
||||
typedef struct _TranslationData{
|
||||
unsigned char hasBindings; /* must be first */
|
||||
unsigned char operation; /*replace,augment,override*/
|
||||
TMShortCard numStateTrees;
|
||||
struct _TranslationData *composers[2];
|
||||
EventMask eventMask;
|
||||
TMStateTree stateTreeTbl[1]; /* variable length */
|
||||
}TranslationData;
|
||||
|
||||
/*
|
||||
* ATranslations is returned by GetValues for translations that contain
|
||||
* accelerators. The TM can differentiate between this and TranslationData
|
||||
* (that don't have a bindTbl) by looking at the first field (hasBindings)
|
||||
* of either structure. All ATranslationData structures associated with a
|
||||
* widget are chained off the BindData record of the widget.
|
||||
*/
|
||||
typedef struct _ATranslationData{
|
||||
unsigned char hasBindings; /* must be first */
|
||||
unsigned char operation;
|
||||
struct _TranslationData *xlations; /* actual translations */
|
||||
struct _ATranslationData *next; /* chain the contexts together */
|
||||
TMComplexBindProcsRec bindTbl[1]; /* accelerator bindings */
|
||||
}ATranslationData, *ATranslations;
|
||||
|
||||
typedef struct _TMConvertRec {
|
||||
XtTranslations old; /* table to merge into */
|
||||
XtTranslations new; /* table to merge from */
|
||||
} TMConvertRec;
|
||||
|
||||
#define _XtEventTimerEventType ((TMLongCard)~0L)
|
||||
#define KeysymModMask (1L<<27) /* private to TM */
|
||||
#define AnyButtonMask (1L<<28) /* private to TM */
|
||||
|
||||
typedef struct _EventRec {
|
||||
TMLongCard modifiers;
|
||||
TMLongCard modifierMask;
|
||||
LateBindingsPtr lateModifiers;
|
||||
TMLongCard eventType;
|
||||
TMLongCard eventCode;
|
||||
TMLongCard eventCodeMask;
|
||||
MatchProc matchEvent;
|
||||
Boolean standard;
|
||||
} Event;
|
||||
|
||||
typedef struct _EventSeqRec *EventSeqPtr;
|
||||
typedef struct _EventSeqRec {
|
||||
Event event; /* X event description */
|
||||
StatePtr state; /* private to state table builder */
|
||||
EventSeqPtr next; /* next event on line */
|
||||
ActionPtr actions; /* r.h.s. list of actions to perform */
|
||||
} EventSeqRec;
|
||||
|
||||
typedef EventSeqRec EventRec;
|
||||
typedef EventSeqPtr EventPtr;
|
||||
|
||||
typedef struct _TMEventRec {
|
||||
XEvent *xev;
|
||||
Event event;
|
||||
}TMEventRec;
|
||||
|
||||
typedef struct _ActionHookRec {
|
||||
struct _ActionHookRec* next; /* must remain first */
|
||||
XtAppContext app;
|
||||
XtActionHookProc proc;
|
||||
XtPointer closure;
|
||||
} ActionHookRec, *ActionHook;
|
||||
|
||||
/* choose a number between 2 and 8 */
|
||||
#define TMKEYCACHELOG2 6
|
||||
#define TMKEYCACHESIZE (1<<TMKEYCACHELOG2)
|
||||
|
||||
typedef struct _KeyCacheRec {
|
||||
unsigned char modifiers_return[256]; /* constant per KeyCode, key proc */
|
||||
KeyCode keycode[TMKEYCACHESIZE];
|
||||
unsigned char modifiers[TMKEYCACHESIZE];
|
||||
KeySym keysym[TMKEYCACHESIZE];
|
||||
} TMKeyCache;
|
||||
|
||||
typedef struct _TMKeyContextRec {
|
||||
XEvent *event;
|
||||
unsigned long serial;
|
||||
KeySym keysym;
|
||||
Modifiers modifiers;
|
||||
TMKeyCache keycache; /* keep this last, to keep offsets to others small */
|
||||
} TMKeyContextRec, *TMKeyContext;
|
||||
|
||||
typedef struct _TMGlobalRec{
|
||||
TMTypeMatchRec **typeMatchSegmentTbl;
|
||||
TMShortCard numTypeMatches;
|
||||
TMShortCard numTypeMatchSegments;
|
||||
TMShortCard typeMatchSegmentTblSize;
|
||||
TMModifierMatchRec **modMatchSegmentTbl;
|
||||
TMShortCard numModMatches;
|
||||
TMShortCard numModMatchSegments;
|
||||
TMShortCard modMatchSegmentTblSize;
|
||||
Boolean newMatchSemantics;
|
||||
#ifdef TRACE_TM
|
||||
XtTranslations *tmTbl;
|
||||
TMShortCard numTms;
|
||||
TMShortCard tmTblSize;
|
||||
struct _TMBindCacheRec **bindCacheTbl;
|
||||
TMShortCard numBindCache;
|
||||
TMShortCard bindCacheTblSize;
|
||||
TMShortCard numLateBindings;
|
||||
TMShortCard numBranchHeads;
|
||||
TMShortCard numComplexStates;
|
||||
TMShortCard numComplexActions;
|
||||
#endif /* TRACE_TM */
|
||||
}TMGlobalRec;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern TMGlobalRec _XtGlobalTM;
|
||||
|
||||
#define TM_MOD_SEGMENT_SIZE 16
|
||||
#define TM_TYPE_SEGMENT_SIZE 16
|
||||
|
||||
#define TMGetTypeMatch(idx) \
|
||||
((TMTypeMatch) \
|
||||
&((_XtGlobalTM.typeMatchSegmentTbl[((idx) >> 4)])[(idx) & 15]))
|
||||
#define TMGetModifierMatch(idx) \
|
||||
((TMModifierMatch) \
|
||||
&((_XtGlobalTM.modMatchSegmentTbl[(idx) >> 4])[(idx) & 15]))
|
||||
|
||||
/* Useful Access Macros */
|
||||
#define TMNewMatchSemantics() (_XtGlobalTM.newMatchSemantics)
|
||||
#define TMBranchMore(branch) (branch->more)
|
||||
#define TMComplexBranchHead(tree, br) \
|
||||
(((TMComplexStateTree)tree)->complexBranchHeadTbl[TMBranchMore(br)])
|
||||
|
||||
#define TMGetComplexBindEntry(bindData, idx) \
|
||||
((TMComplexBindProcs)&(((TMComplexBindData)bindData)->bindTbl[idx]))
|
||||
|
||||
#define TMGetSimpleBindEntry(bindData, idx) \
|
||||
((TMSimpleBindProcs)&(((TMSimpleBindData)bindData)->bindTbl[idx]))
|
||||
|
||||
|
||||
#define _InitializeKeysymTables(dpy, pd) \
|
||||
if (pd->keysyms == NULL) \
|
||||
_XtBuildKeysymTables(dpy, pd)
|
||||
|
||||
/*
|
||||
* Internal Functions
|
||||
*/
|
||||
|
||||
extern void _XtPopup(
|
||||
Widget /* widget */,
|
||||
XtGrabKind /* grab_kind */,
|
||||
_XtBoolean /* spring_loaded */
|
||||
);
|
||||
|
||||
extern String _XtPrintXlations(
|
||||
Widget /* w */,
|
||||
XtTranslations /* xlations */,
|
||||
Widget /* accelWidget */,
|
||||
_XtBoolean /* includeRHS */
|
||||
);
|
||||
|
||||
extern void _XtRegisterGrabs(
|
||||
Widget /* widget */
|
||||
);
|
||||
|
||||
extern XtPointer _XtInitializeActionData(
|
||||
struct _XtActionsRec * /* actions */,
|
||||
Cardinal /* count */,
|
||||
_XtBoolean /* inPlace */
|
||||
);
|
||||
|
||||
extern void _XtAddEventSeqToStateTree(
|
||||
EventSeqPtr /* eventSeq */,
|
||||
TMParseStateTree /* stateTree */
|
||||
);
|
||||
|
||||
extern Boolean _XtMatchUsingStandardMods(
|
||||
TMTypeMatch /* typeMatch */,
|
||||
TMModifierMatch /* modMatch */,
|
||||
TMEventPtr /* eventSeq */
|
||||
);
|
||||
|
||||
extern Boolean _XtMatchUsingDontCareMods(
|
||||
TMTypeMatch /* typeMatch */,
|
||||
TMModifierMatch /* modMatch */,
|
||||
TMEventPtr /* eventSeq */
|
||||
);
|
||||
|
||||
extern Boolean _XtRegularMatch(
|
||||
TMTypeMatch /* typeMatch */,
|
||||
TMModifierMatch /* modMatch */,
|
||||
TMEventPtr /* eventSeq */
|
||||
);
|
||||
|
||||
extern Boolean _XtMatchAtom(
|
||||
TMTypeMatch /* typeMatch */,
|
||||
TMModifierMatch /* modMatch */,
|
||||
TMEventPtr /* eventSeq */
|
||||
);
|
||||
|
||||
extern void _XtTranslateEvent(
|
||||
Widget /* widget */,
|
||||
XEvent* /* event */
|
||||
);
|
||||
|
||||
#include "CallbackI.h"
|
||||
#include "EventI.h"
|
||||
#include "HookObjI.h"
|
||||
#include "PassivGraI.h"
|
||||
#include "ThreadsI.h"
|
||||
#include "InitialI.h"
|
||||
#include "ResourceI.h"
|
||||
#include "StringDefs.h"
|
||||
|
||||
extern void _XtBuildKeysymTables(Display *dpy, XtPerDisplay pd);
|
||||
|
||||
#ifndef NO_MIT_HACKS
|
||||
extern void _XtDisplayTranslations(
|
||||
Widget /* widget */,
|
||||
XEvent* /* event */,
|
||||
String* /* params */,
|
||||
Cardinal* /* num_params */
|
||||
);
|
||||
|
||||
extern void _XtDisplayAccelerators(
|
||||
Widget /* widget */,
|
||||
XEvent* /* event */,
|
||||
String* /* params */,
|
||||
Cardinal* /* num_params */
|
||||
);
|
||||
|
||||
extern void _XtDisplayInstalledAccelerators(
|
||||
Widget /* widget */,
|
||||
XEvent* /* event */,
|
||||
String* /* params */,
|
||||
Cardinal* /* num_params */
|
||||
);
|
||||
#endif /* ifndef NO_MIT_HACKS */
|
||||
|
||||
extern void _XtPopupInitialize(
|
||||
XtAppContext /* app_context */
|
||||
);
|
||||
|
||||
extern void _XtBindActions(
|
||||
Widget /* widget */,
|
||||
XtTM /* tm_rec */
|
||||
);
|
||||
|
||||
extern Boolean _XtComputeLateBindings(
|
||||
Display* /* dpy */,
|
||||
LateBindingsPtr /* lateModifiers */,
|
||||
Modifiers* /* computed */,
|
||||
Modifiers* /* computedMask */
|
||||
);
|
||||
|
||||
extern XtTranslations _XtCreateXlations(
|
||||
TMStateTree * /* stateTrees */,
|
||||
TMShortCard /* numStateTrees */,
|
||||
XtTranslations /* first */,
|
||||
XtTranslations /* second */
|
||||
);
|
||||
|
||||
extern Boolean _XtCvtMergeTranslations(
|
||||
Display* /* dpy */,
|
||||
XrmValuePtr /* args */,
|
||||
Cardinal* /* num_args */,
|
||||
XrmValuePtr /* from */,
|
||||
XrmValuePtr /* to */,
|
||||
XtPointer* /* closure_ret */
|
||||
);
|
||||
|
||||
void _XtRemoveStateTreeByIndex(
|
||||
XtTranslations /* xlations */,
|
||||
TMShortCard /* i */);
|
||||
|
||||
void _XtFreeTranslations(
|
||||
XtAppContext /* app */,
|
||||
XrmValuePtr /* toVal */,
|
||||
XtPointer /* closure */,
|
||||
XrmValuePtr /* args */,
|
||||
Cardinal* /* num_args */
|
||||
);
|
||||
|
||||
extern TMShortCard _XtGetModifierIndex(
|
||||
Event* /* event */
|
||||
);
|
||||
|
||||
extern TMShortCard _XtGetQuarkIndex(
|
||||
TMParseStateTree /* stateTreePtr */,
|
||||
XrmQuark /* quark */
|
||||
);
|
||||
|
||||
extern XtTranslations _XtGetTranslationValue(
|
||||
Widget /* widget */
|
||||
);
|
||||
|
||||
extern TMShortCard _XtGetTypeIndex(
|
||||
Event* /* event */
|
||||
);
|
||||
|
||||
extern void _XtGrabInitialize(
|
||||
XtAppContext /* app */
|
||||
);
|
||||
|
||||
extern void _XtInstallTranslations(
|
||||
Widget /* widget */
|
||||
);
|
||||
|
||||
extern void _XtRemoveTranslations(
|
||||
Widget /* widget */
|
||||
);
|
||||
|
||||
extern void _XtDestroyTMData(
|
||||
Widget /* widget */
|
||||
);
|
||||
|
||||
extern void _XtMergeTranslations(
|
||||
Widget /* widget */,
|
||||
XtTranslations /* newXlations */,
|
||||
_XtTranslateOp /* operation */
|
||||
);
|
||||
|
||||
extern void _XtActionInitialize(
|
||||
XtAppContext /* app */
|
||||
);
|
||||
|
||||
extern TMStateTree _XtParseTreeToStateTree(
|
||||
TMParseStateTree /* parseTree */
|
||||
);
|
||||
|
||||
extern String _XtPrintActions(
|
||||
ActionRec* /* actions */,
|
||||
XrmQuark* /* quarkTbl */
|
||||
);
|
||||
|
||||
extern String _XtPrintState(
|
||||
TMStateTree /* stateTree */,
|
||||
TMBranchHead /* branchHead */);
|
||||
|
||||
extern String _XtPrintEventSeq(
|
||||
EventSeqPtr /* eventSeq */,
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
typedef Boolean (*_XtTraversalProc)(
|
||||
StatePtr /* state */,
|
||||
XtPointer /* data */
|
||||
);
|
||||
|
||||
extern void _XtTraverseStateTree(
|
||||
TMStateTree /* tree */,
|
||||
_XtTraversalProc /* func */,
|
||||
XtPointer /* data */
|
||||
);
|
||||
|
||||
extern void _XtTranslateInitialize(
|
||||
void
|
||||
);
|
||||
|
||||
extern void _XtAddTMConverters(
|
||||
ConverterTable /* table */
|
||||
);
|
||||
|
||||
extern void _XtUnbindActions(
|
||||
Widget /* widget */,
|
||||
XtTranslations /* xlations */,
|
||||
TMBindData /* bindData */
|
||||
);
|
||||
|
||||
extern void _XtUnmergeTranslations(
|
||||
Widget /* widget */,
|
||||
XtTranslations /* xlations */
|
||||
);
|
||||
|
||||
/* TMKey.c */
|
||||
extern void _XtAllocTMContext(XtPerDisplay pd);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
|
||||
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_ */
|
||||
70
X11/Vendor.h
70
X11/Vendor.h
|
|
@ -1,70 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 _XtVendor_h
|
||||
#define _XtVendor_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* VendorShell Widget
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
/* Class record constants */
|
||||
|
||||
typedef struct _VendorShellClassRec *VendorShellWidgetClass;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
externalref WidgetClass vendorShellWidgetClass;
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtVendor_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
102
X11/VendorP.h
102
X11/VendorP.h
|
|
@ -1,102 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
/*
|
||||
* VendorP.h - Private definitions for VendorShell widget
|
||||
*
|
||||
* Author: Paul Asente
|
||||
* Digital Equipment Corporation
|
||||
* Western Software Laboratory
|
||||
* Date: Thu Dec 3, 1987
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* VendorShell Widget Private Data
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef _XtVendorPrivate_h
|
||||
#define _XtVendorPrivate_h
|
||||
|
||||
#include <X11/Vendor.h>
|
||||
|
||||
/* New fields for the VendorShell widget class record */
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
typedef struct {
|
||||
XtPointer extension; /* pointer to extension record */
|
||||
} VendorShellClassPart;
|
||||
|
||||
typedef struct _VendorShellClassRec {
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
ShellClassPart shell_class;
|
||||
WMShellClassPart wm_shell_class;
|
||||
VendorShellClassPart vendor_shell_class;
|
||||
} VendorShellClassRec;
|
||||
|
||||
externalref VendorShellClassRec vendorShellClassRec;
|
||||
|
||||
/* New fields for the vendor shell widget. */
|
||||
|
||||
typedef struct {
|
||||
int vendor_specific;
|
||||
} VendorShellPart;
|
||||
|
||||
typedef struct {
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
ShellPart shell;
|
||||
WMShellPart wm;
|
||||
VendorShellPart vendor;
|
||||
} VendorShellRec, *VendorShellWidget;
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XtVendorPrivate_h */
|
||||
717
X11/X.h
717
X11/X.h
|
|
@ -1,717 +0,0 @@
|
|||
/* Definitions for the X window system likely to be used by applications */
|
||||
|
||||
#ifndef X_H
|
||||
#define X_H
|
||||
|
||||
/***********************************************************
|
||||
|
||||
Copyright 1987, 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 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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
#define X_PROTOCOL 11 /* current protocol version */
|
||||
#define X_PROTOCOL_REVISION 0 /* current minor version */
|
||||
|
||||
/* Resources */
|
||||
|
||||
/*
|
||||
* _XSERVER64 must ONLY be defined when compiling X server sources on
|
||||
* systems where unsigned long is not 32 bits, must NOT be used in
|
||||
* client or library code.
|
||||
*/
|
||||
#ifndef _XSERVER64
|
||||
# ifndef _XTYPEDEF_XID
|
||||
# define _XTYPEDEF_XID
|
||||
typedef unsigned long XID;
|
||||
# endif
|
||||
# ifndef _XTYPEDEF_MASK
|
||||
# define _XTYPEDEF_MASK
|
||||
typedef unsigned long Mask;
|
||||
# endif
|
||||
# ifndef _XTYPEDEF_ATOM
|
||||
# define _XTYPEDEF_ATOM
|
||||
typedef unsigned long Atom; /* Also in Xdefs.h */
|
||||
# endif
|
||||
typedef unsigned long VisualID;
|
||||
typedef unsigned long Time;
|
||||
#else
|
||||
# include <X11/Xmd.h>
|
||||
# ifndef _XTYPEDEF_XID
|
||||
# define _XTYPEDEF_XID
|
||||
typedef CARD32 XID;
|
||||
# endif
|
||||
# ifndef _XTYPEDEF_MASK
|
||||
# define _XTYPEDEF_MASK
|
||||
typedef CARD32 Mask;
|
||||
# endif
|
||||
# ifndef _XTYPEDEF_ATOM
|
||||
# define _XTYPEDEF_ATOM
|
||||
typedef CARD32 Atom;
|
||||
# endif
|
||||
typedef CARD32 VisualID;
|
||||
typedef CARD32 Time;
|
||||
#endif
|
||||
|
||||
typedef XID Window;
|
||||
typedef XID Drawable;
|
||||
#ifndef _XTYPEDEF_FONT
|
||||
# define _XTYPEDEF_FONT
|
||||
typedef XID Font;
|
||||
#endif
|
||||
typedef XID Pixmap;
|
||||
typedef XID Cursor;
|
||||
typedef XID Colormap;
|
||||
typedef XID GContext;
|
||||
typedef XID KeySym;
|
||||
|
||||
typedef unsigned char KeyCode;
|
||||
|
||||
/*****************************************************************
|
||||
* RESERVED RESOURCE AND CONSTANT DEFINITIONS
|
||||
*****************************************************************/
|
||||
|
||||
#ifndef None
|
||||
#define None 0L /* universal null resource or null atom */
|
||||
#endif
|
||||
|
||||
#define ParentRelative 1L /* background pixmap in CreateWindow
|
||||
and ChangeWindowAttributes */
|
||||
|
||||
#define CopyFromParent 0L /* border pixmap in CreateWindow
|
||||
and ChangeWindowAttributes
|
||||
special VisualID and special window
|
||||
class passed to CreateWindow */
|
||||
|
||||
#define PointerWindow 0L /* destination window in SendEvent */
|
||||
#define InputFocus 1L /* destination window in SendEvent */
|
||||
|
||||
#define PointerRoot 1L /* focus window in SetInputFocus */
|
||||
|
||||
#define AnyPropertyType 0L /* special Atom, passed to GetProperty */
|
||||
|
||||
#define AnyKey 0L /* special Key Code, passed to GrabKey */
|
||||
|
||||
#define AnyButton 0L /* special Button Code, passed to GrabButton */
|
||||
|
||||
#define AllTemporary 0L /* special Resource ID passed to KillClient */
|
||||
|
||||
#define CurrentTime 0L /* special Time */
|
||||
|
||||
#define NoSymbol 0L /* special KeySym */
|
||||
|
||||
/*****************************************************************
|
||||
* EVENT DEFINITIONS
|
||||
*****************************************************************/
|
||||
|
||||
/* Input Event Masks. Used as event-mask window attribute and as arguments
|
||||
to Grab requests. Not to be confused with event names. */
|
||||
|
||||
#define NoEventMask 0L
|
||||
#define KeyPressMask (1L<<0)
|
||||
#define KeyReleaseMask (1L<<1)
|
||||
#define ButtonPressMask (1L<<2)
|
||||
#define ButtonReleaseMask (1L<<3)
|
||||
#define EnterWindowMask (1L<<4)
|
||||
#define LeaveWindowMask (1L<<5)
|
||||
#define PointerMotionMask (1L<<6)
|
||||
#define PointerMotionHintMask (1L<<7)
|
||||
#define Button1MotionMask (1L<<8)
|
||||
#define Button2MotionMask (1L<<9)
|
||||
#define Button3MotionMask (1L<<10)
|
||||
#define Button4MotionMask (1L<<11)
|
||||
#define Button5MotionMask (1L<<12)
|
||||
#define ButtonMotionMask (1L<<13)
|
||||
#define KeymapStateMask (1L<<14)
|
||||
#define ExposureMask (1L<<15)
|
||||
#define VisibilityChangeMask (1L<<16)
|
||||
#define StructureNotifyMask (1L<<17)
|
||||
#define ResizeRedirectMask (1L<<18)
|
||||
#define SubstructureNotifyMask (1L<<19)
|
||||
#define SubstructureRedirectMask (1L<<20)
|
||||
#define FocusChangeMask (1L<<21)
|
||||
#define PropertyChangeMask (1L<<22)
|
||||
#define ColormapChangeMask (1L<<23)
|
||||
#define OwnerGrabButtonMask (1L<<24)
|
||||
|
||||
/* Event names. Used in "type" field in XEvent structures. Not to be
|
||||
confused with event masks above. They start from 2 because 0 and 1
|
||||
are reserved in the protocol for errors and replies. */
|
||||
|
||||
#define KeyPress 2
|
||||
#define KeyRelease 3
|
||||
#define ButtonPress 4
|
||||
#define ButtonRelease 5
|
||||
#define MotionNotify 6
|
||||
#define EnterNotify 7
|
||||
#define LeaveNotify 8
|
||||
#define FocusIn 9
|
||||
#define FocusOut 10
|
||||
#define KeymapNotify 11
|
||||
#define Expose 12
|
||||
#define GraphicsExpose 13
|
||||
#define NoExpose 14
|
||||
#define VisibilityNotify 15
|
||||
#define CreateNotify 16
|
||||
#define DestroyNotify 17
|
||||
#define UnmapNotify 18
|
||||
#define MapNotify 19
|
||||
#define MapRequest 20
|
||||
#define ReparentNotify 21
|
||||
#define ConfigureNotify 22
|
||||
#define ConfigureRequest 23
|
||||
#define GravityNotify 24
|
||||
#define ResizeRequest 25
|
||||
#define CirculateNotify 26
|
||||
#define CirculateRequest 27
|
||||
#define PropertyNotify 28
|
||||
#define SelectionClear 29
|
||||
#define SelectionRequest 30
|
||||
#define SelectionNotify 31
|
||||
#define ColormapNotify 32
|
||||
#define ClientMessage 33
|
||||
#define MappingNotify 34
|
||||
#define GenericEvent 35
|
||||
#define LASTEvent 36 /* must be bigger than any event # */
|
||||
|
||||
|
||||
/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
|
||||
state in various key-, mouse-, and button-related events. */
|
||||
|
||||
#define ShiftMask (1<<0)
|
||||
#define LockMask (1<<1)
|
||||
#define ControlMask (1<<2)
|
||||
#define Mod1Mask (1<<3)
|
||||
#define Mod2Mask (1<<4)
|
||||
#define Mod3Mask (1<<5)
|
||||
#define Mod4Mask (1<<6)
|
||||
#define Mod5Mask (1<<7)
|
||||
|
||||
/* modifier names. Used to build a SetModifierMapping request or
|
||||
to read a GetModifierMapping request. These correspond to the
|
||||
masks defined above. */
|
||||
#define ShiftMapIndex 0
|
||||
#define LockMapIndex 1
|
||||
#define ControlMapIndex 2
|
||||
#define Mod1MapIndex 3
|
||||
#define Mod2MapIndex 4
|
||||
#define Mod3MapIndex 5
|
||||
#define Mod4MapIndex 6
|
||||
#define Mod5MapIndex 7
|
||||
|
||||
|
||||
/* button masks. Used in same manner as Key masks above. Not to be confused
|
||||
with button names below. */
|
||||
|
||||
#define Button1Mask (1<<8)
|
||||
#define Button2Mask (1<<9)
|
||||
#define Button3Mask (1<<10)
|
||||
#define Button4Mask (1<<11)
|
||||
#define Button5Mask (1<<12)
|
||||
|
||||
#define AnyModifier (1<<15) /* used in GrabButton, GrabKey */
|
||||
|
||||
|
||||
/* button names. Used as arguments to GrabButton and as detail in ButtonPress
|
||||
and ButtonRelease events. Not to be confused with button masks above.
|
||||
Note that 0 is already defined above as "AnyButton". */
|
||||
|
||||
#define Button1 1
|
||||
#define Button2 2
|
||||
#define Button3 3
|
||||
#define Button4 4
|
||||
#define Button5 5
|
||||
|
||||
/* Notify modes */
|
||||
|
||||
#define NotifyNormal 0
|
||||
#define NotifyGrab 1
|
||||
#define NotifyUngrab 2
|
||||
#define NotifyWhileGrabbed 3
|
||||
|
||||
#define NotifyHint 1 /* for MotionNotify events */
|
||||
|
||||
/* Notify detail */
|
||||
|
||||
#define NotifyAncestor 0
|
||||
#define NotifyVirtual 1
|
||||
#define NotifyInferior 2
|
||||
#define NotifyNonlinear 3
|
||||
#define NotifyNonlinearVirtual 4
|
||||
#define NotifyPointer 5
|
||||
#define NotifyPointerRoot 6
|
||||
#define NotifyDetailNone 7
|
||||
|
||||
/* Visibility notify */
|
||||
|
||||
#define VisibilityUnobscured 0
|
||||
#define VisibilityPartiallyObscured 1
|
||||
#define VisibilityFullyObscured 2
|
||||
|
||||
/* Circulation request */
|
||||
|
||||
#define PlaceOnTop 0
|
||||
#define PlaceOnBottom 1
|
||||
|
||||
/* protocol families */
|
||||
|
||||
#define FamilyInternet 0 /* IPv4 */
|
||||
#define FamilyDECnet 1
|
||||
#define FamilyChaos 2
|
||||
#define FamilyInternet6 6 /* IPv6 */
|
||||
|
||||
/* authentication families not tied to a specific protocol */
|
||||
#define FamilyServerInterpreted 5
|
||||
|
||||
/* Property notification */
|
||||
|
||||
#define PropertyNewValue 0
|
||||
#define PropertyDelete 1
|
||||
|
||||
/* Color Map notification */
|
||||
|
||||
#define ColormapUninstalled 0
|
||||
#define ColormapInstalled 1
|
||||
|
||||
/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */
|
||||
|
||||
#define GrabModeSync 0
|
||||
#define GrabModeAsync 1
|
||||
|
||||
/* GrabPointer, GrabKeyboard reply status */
|
||||
|
||||
#define GrabSuccess 0
|
||||
#define AlreadyGrabbed 1
|
||||
#define GrabInvalidTime 2
|
||||
#define GrabNotViewable 3
|
||||
#define GrabFrozen 4
|
||||
|
||||
/* AllowEvents modes */
|
||||
|
||||
#define AsyncPointer 0
|
||||
#define SyncPointer 1
|
||||
#define ReplayPointer 2
|
||||
#define AsyncKeyboard 3
|
||||
#define SyncKeyboard 4
|
||||
#define ReplayKeyboard 5
|
||||
#define AsyncBoth 6
|
||||
#define SyncBoth 7
|
||||
|
||||
/* Used in SetInputFocus, GetInputFocus */
|
||||
|
||||
#define RevertToNone (int)None
|
||||
#define RevertToPointerRoot (int)PointerRoot
|
||||
#define RevertToParent 2
|
||||
|
||||
/*****************************************************************
|
||||
* ERROR CODES
|
||||
*****************************************************************/
|
||||
|
||||
#define Success 0 /* everything's okay */
|
||||
#define BadRequest 1 /* bad request code */
|
||||
#define BadValue 2 /* int parameter out of range */
|
||||
#define BadWindow 3 /* parameter not a Window */
|
||||
#define BadPixmap 4 /* parameter not a Pixmap */
|
||||
#define BadAtom 5 /* parameter not an Atom */
|
||||
#define BadCursor 6 /* parameter not a Cursor */
|
||||
#define BadFont 7 /* parameter not a Font */
|
||||
#define BadMatch 8 /* parameter mismatch */
|
||||
#define BadDrawable 9 /* parameter not a Pixmap or Window */
|
||||
#define BadAccess 10 /* depending on context:
|
||||
- key/button already grabbed
|
||||
- attempt to free an illegal
|
||||
cmap entry
|
||||
- attempt to store into a read-only
|
||||
color map entry.
|
||||
- attempt to modify the access control
|
||||
list from other than the local host.
|
||||
*/
|
||||
#define BadAlloc 11 /* insufficient resources */
|
||||
#define BadColor 12 /* no such colormap */
|
||||
#define BadGC 13 /* parameter not a GC */
|
||||
#define BadIDChoice 14 /* choice not in range or already used */
|
||||
#define BadName 15 /* font or color name doesn't exist */
|
||||
#define BadLength 16 /* Request length incorrect */
|
||||
#define BadImplementation 17 /* server is defective */
|
||||
|
||||
#define FirstExtensionError 128
|
||||
#define LastExtensionError 255
|
||||
|
||||
/*****************************************************************
|
||||
* WINDOW DEFINITIONS
|
||||
*****************************************************************/
|
||||
|
||||
/* Window classes used by CreateWindow */
|
||||
/* Note that CopyFromParent is already defined as 0 above */
|
||||
|
||||
#define InputOutput 1
|
||||
#define InputOnly 2
|
||||
|
||||
/* Window attributes for CreateWindow and ChangeWindowAttributes */
|
||||
|
||||
#define CWBackPixmap (1L<<0)
|
||||
#define CWBackPixel (1L<<1)
|
||||
#define CWBorderPixmap (1L<<2)
|
||||
#define CWBorderPixel (1L<<3)
|
||||
#define CWBitGravity (1L<<4)
|
||||
#define CWWinGravity (1L<<5)
|
||||
#define CWBackingStore (1L<<6)
|
||||
#define CWBackingPlanes (1L<<7)
|
||||
#define CWBackingPixel (1L<<8)
|
||||
#define CWOverrideRedirect (1L<<9)
|
||||
#define CWSaveUnder (1L<<10)
|
||||
#define CWEventMask (1L<<11)
|
||||
#define CWDontPropagate (1L<<12)
|
||||
#define CWColormap (1L<<13)
|
||||
#define CWCursor (1L<<14)
|
||||
|
||||
/* ConfigureWindow structure */
|
||||
|
||||
#define CWX (1<<0)
|
||||
#define CWY (1<<1)
|
||||
#define CWWidth (1<<2)
|
||||
#define CWHeight (1<<3)
|
||||
#define CWBorderWidth (1<<4)
|
||||
#define CWSibling (1<<5)
|
||||
#define CWStackMode (1<<6)
|
||||
|
||||
|
||||
/* Bit Gravity */
|
||||
|
||||
#define ForgetGravity 0
|
||||
#define NorthWestGravity 1
|
||||
#define NorthGravity 2
|
||||
#define NorthEastGravity 3
|
||||
#define WestGravity 4
|
||||
#define CenterGravity 5
|
||||
#define EastGravity 6
|
||||
#define SouthWestGravity 7
|
||||
#define SouthGravity 8
|
||||
#define SouthEastGravity 9
|
||||
#define StaticGravity 10
|
||||
|
||||
/* Window gravity + bit gravity above */
|
||||
|
||||
#define UnmapGravity 0
|
||||
|
||||
/* Used in CreateWindow for backing-store hint */
|
||||
|
||||
#define NotUseful 0
|
||||
#define WhenMapped 1
|
||||
#define Always 2
|
||||
|
||||
/* Used in GetWindowAttributes reply */
|
||||
|
||||
#define IsUnmapped 0
|
||||
#define IsUnviewable 1
|
||||
#define IsViewable 2
|
||||
|
||||
/* Used in ChangeSaveSet */
|
||||
|
||||
#define SetModeInsert 0
|
||||
#define SetModeDelete 1
|
||||
|
||||
/* Used in ChangeCloseDownMode */
|
||||
|
||||
#define DestroyAll 0
|
||||
#define RetainPermanent 1
|
||||
#define RetainTemporary 2
|
||||
|
||||
/* Window stacking method (in configureWindow) */
|
||||
|
||||
#define Above 0
|
||||
#define Below 1
|
||||
#define TopIf 2
|
||||
#define BottomIf 3
|
||||
#define Opposite 4
|
||||
|
||||
/* Circulation direction */
|
||||
|
||||
#define RaiseLowest 0
|
||||
#define LowerHighest 1
|
||||
|
||||
/* Property modes */
|
||||
|
||||
#define PropModeReplace 0
|
||||
#define PropModePrepend 1
|
||||
#define PropModeAppend 2
|
||||
|
||||
/*****************************************************************
|
||||
* GRAPHICS DEFINITIONS
|
||||
*****************************************************************/
|
||||
|
||||
/* graphics functions, as in GC.alu */
|
||||
|
||||
#define GXclear 0x0 /* 0 */
|
||||
#define GXand 0x1 /* src AND dst */
|
||||
#define GXandReverse 0x2 /* src AND NOT dst */
|
||||
#define GXcopy 0x3 /* src */
|
||||
#define GXandInverted 0x4 /* NOT src AND dst */
|
||||
#define GXnoop 0x5 /* dst */
|
||||
#define GXxor 0x6 /* src XOR dst */
|
||||
#define GXor 0x7 /* src OR dst */
|
||||
#define GXnor 0x8 /* NOT src AND NOT dst */
|
||||
#define GXequiv 0x9 /* NOT src XOR dst */
|
||||
#define GXinvert 0xa /* NOT dst */
|
||||
#define GXorReverse 0xb /* src OR NOT dst */
|
||||
#define GXcopyInverted 0xc /* NOT src */
|
||||
#define GXorInverted 0xd /* NOT src OR dst */
|
||||
#define GXnand 0xe /* NOT src OR NOT dst */
|
||||
#define GXset 0xf /* 1 */
|
||||
|
||||
/* LineStyle */
|
||||
|
||||
#define LineSolid 0
|
||||
#define LineOnOffDash 1
|
||||
#define LineDoubleDash 2
|
||||
|
||||
/* capStyle */
|
||||
|
||||
#define CapNotLast 0
|
||||
#define CapButt 1
|
||||
#define CapRound 2
|
||||
#define CapProjecting 3
|
||||
|
||||
/* joinStyle */
|
||||
|
||||
#define JoinMiter 0
|
||||
#define JoinRound 1
|
||||
#define JoinBevel 2
|
||||
|
||||
/* fillStyle */
|
||||
|
||||
#define FillSolid 0
|
||||
#define FillTiled 1
|
||||
#define FillStippled 2
|
||||
#define FillOpaqueStippled 3
|
||||
|
||||
/* fillRule */
|
||||
|
||||
#define EvenOddRule 0
|
||||
#define WindingRule 1
|
||||
|
||||
/* subwindow mode */
|
||||
|
||||
#define ClipByChildren 0
|
||||
#define IncludeInferiors 1
|
||||
|
||||
/* SetClipRectangles ordering */
|
||||
|
||||
#define Unsorted 0
|
||||
#define YSorted 1
|
||||
#define YXSorted 2
|
||||
#define YXBanded 3
|
||||
|
||||
/* CoordinateMode for drawing routines */
|
||||
|
||||
#define CoordModeOrigin 0 /* relative to the origin */
|
||||
#define CoordModePrevious 1 /* relative to previous point */
|
||||
|
||||
/* Polygon shapes */
|
||||
|
||||
#define Complex 0 /* paths may intersect */
|
||||
#define Nonconvex 1 /* no paths intersect, but not convex */
|
||||
#define Convex 2 /* wholly convex */
|
||||
|
||||
/* Arc modes for PolyFillArc */
|
||||
|
||||
#define ArcChord 0 /* join endpoints of arc */
|
||||
#define ArcPieSlice 1 /* join endpoints to center of arc */
|
||||
|
||||
/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
|
||||
GC.stateChanges */
|
||||
|
||||
#define GCFunction (1L<<0)
|
||||
#define GCPlaneMask (1L<<1)
|
||||
#define GCForeground (1L<<2)
|
||||
#define GCBackground (1L<<3)
|
||||
#define GCLineWidth (1L<<4)
|
||||
#define GCLineStyle (1L<<5)
|
||||
#define GCCapStyle (1L<<6)
|
||||
#define GCJoinStyle (1L<<7)
|
||||
#define GCFillStyle (1L<<8)
|
||||
#define GCFillRule (1L<<9)
|
||||
#define GCTile (1L<<10)
|
||||
#define GCStipple (1L<<11)
|
||||
#define GCTileStipXOrigin (1L<<12)
|
||||
#define GCTileStipYOrigin (1L<<13)
|
||||
#define GCFont (1L<<14)
|
||||
#define GCSubwindowMode (1L<<15)
|
||||
#define GCGraphicsExposures (1L<<16)
|
||||
#define GCClipXOrigin (1L<<17)
|
||||
#define GCClipYOrigin (1L<<18)
|
||||
#define GCClipMask (1L<<19)
|
||||
#define GCDashOffset (1L<<20)
|
||||
#define GCDashList (1L<<21)
|
||||
#define GCArcMode (1L<<22)
|
||||
|
||||
#define GCLastBit 22
|
||||
/*****************************************************************
|
||||
* FONTS
|
||||
*****************************************************************/
|
||||
|
||||
/* used in QueryFont -- draw direction */
|
||||
|
||||
#define FontLeftToRight 0
|
||||
#define FontRightToLeft 1
|
||||
|
||||
#define FontChange 255
|
||||
|
||||
/*****************************************************************
|
||||
* IMAGING
|
||||
*****************************************************************/
|
||||
|
||||
/* ImageFormat -- PutImage, GetImage */
|
||||
|
||||
#define XYBitmap 0 /* depth 1, XYFormat */
|
||||
#define XYPixmap 1 /* depth == drawable depth */
|
||||
#define ZPixmap 2 /* depth == drawable depth */
|
||||
|
||||
/*****************************************************************
|
||||
* COLOR MAP STUFF
|
||||
*****************************************************************/
|
||||
|
||||
/* For CreateColormap */
|
||||
|
||||
#define AllocNone 0 /* create map with no entries */
|
||||
#define AllocAll 1 /* allocate entire map writeable */
|
||||
|
||||
|
||||
/* Flags used in StoreNamedColor, StoreColors */
|
||||
|
||||
#define DoRed (1<<0)
|
||||
#define DoGreen (1<<1)
|
||||
#define DoBlue (1<<2)
|
||||
|
||||
/*****************************************************************
|
||||
* CURSOR STUFF
|
||||
*****************************************************************/
|
||||
|
||||
/* QueryBestSize Class */
|
||||
|
||||
#define CursorShape 0 /* largest size that can be displayed */
|
||||
#define TileShape 1 /* size tiled fastest */
|
||||
#define StippleShape 2 /* size stippled fastest */
|
||||
|
||||
/*****************************************************************
|
||||
* KEYBOARD/POINTER STUFF
|
||||
*****************************************************************/
|
||||
|
||||
#define AutoRepeatModeOff 0
|
||||
#define AutoRepeatModeOn 1
|
||||
#define AutoRepeatModeDefault 2
|
||||
|
||||
#define LedModeOff 0
|
||||
#define LedModeOn 1
|
||||
|
||||
/* masks for ChangeKeyboardControl */
|
||||
|
||||
#define KBKeyClickPercent (1L<<0)
|
||||
#define KBBellPercent (1L<<1)
|
||||
#define KBBellPitch (1L<<2)
|
||||
#define KBBellDuration (1L<<3)
|
||||
#define KBLed (1L<<4)
|
||||
#define KBLedMode (1L<<5)
|
||||
#define KBKey (1L<<6)
|
||||
#define KBAutoRepeatMode (1L<<7)
|
||||
|
||||
#define MappingSuccess 0
|
||||
#define MappingBusy 1
|
||||
#define MappingFailed 2
|
||||
|
||||
#define MappingModifier 0
|
||||
#define MappingKeyboard 1
|
||||
#define MappingPointer 2
|
||||
|
||||
/*****************************************************************
|
||||
* SCREEN SAVER STUFF
|
||||
*****************************************************************/
|
||||
|
||||
#define DontPreferBlanking 0
|
||||
#define PreferBlanking 1
|
||||
#define DefaultBlanking 2
|
||||
|
||||
#define DisableScreenSaver 0
|
||||
#define DisableScreenInterval 0
|
||||
|
||||
#define DontAllowExposures 0
|
||||
#define AllowExposures 1
|
||||
#define DefaultExposures 2
|
||||
|
||||
/* for ForceScreenSaver */
|
||||
|
||||
#define ScreenSaverReset 0
|
||||
#define ScreenSaverActive 1
|
||||
|
||||
/*****************************************************************
|
||||
* HOSTS AND CONNECTIONS
|
||||
*****************************************************************/
|
||||
|
||||
/* for ChangeHosts */
|
||||
|
||||
#define HostInsert 0
|
||||
#define HostDelete 1
|
||||
|
||||
/* for ChangeAccessControl */
|
||||
|
||||
#define EnableAccess 1
|
||||
#define DisableAccess 0
|
||||
|
||||
/* Display classes used in opening the connection
|
||||
* Note that the statically allocated ones are even numbered and the
|
||||
* dynamically changeable ones are odd numbered */
|
||||
|
||||
#define StaticGray 0
|
||||
#define GrayScale 1
|
||||
#define StaticColor 2
|
||||
#define PseudoColor 3
|
||||
#define TrueColor 4
|
||||
#define DirectColor 5
|
||||
|
||||
|
||||
/* Byte order used in imageByteOrder and bitmapBitOrder */
|
||||
|
||||
#define LSBFirst 0
|
||||
#define MSBFirst 1
|
||||
|
||||
#endif /* X_H */
|
||||
227
X11/XF86keysym.h
227
X11/XF86keysym.h
|
|
@ -1,227 +0,0 @@
|
|||
/*
|
||||
* XFree86 vendor specific keysyms.
|
||||
*
|
||||
* The XFree86 keysym range is 0x10080001 - 0x1008FFFF.
|
||||
*
|
||||
* X.Org will not be adding to the XF86 set of keysyms, though they have
|
||||
* been adopted and are considered a "standard" part of X keysym definitions.
|
||||
* XFree86 never properly commented these keysyms, so we have done our
|
||||
* best to explain the semantic meaning of these keys.
|
||||
*
|
||||
* XFree86 has removed their mail archives of the period, that might have
|
||||
* shed more light on some of these definitions. Until/unless we resurrect
|
||||
* these archives, these are from memory and usage.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ModeLock
|
||||
*
|
||||
* This one is old, and not really used any more since XKB offers this
|
||||
* functionality.
|
||||
*/
|
||||
|
||||
#define XF86XK_ModeLock 0x1008FF01 /* Mode Switch Lock */
|
||||
|
||||
/* Backlight controls. */
|
||||
#define XF86XK_MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */
|
||||
#define XF86XK_MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */
|
||||
#define XF86XK_KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */
|
||||
#define XF86XK_KbdBrightnessUp 0x1008FF05 /* Keyboards may be lit */
|
||||
#define XF86XK_KbdBrightnessDown 0x1008FF06 /* Keyboards may be lit */
|
||||
|
||||
/*
|
||||
* Keys found on some "Internet" keyboards.
|
||||
*/
|
||||
#define XF86XK_Standby 0x1008FF10 /* System into standby mode */
|
||||
#define XF86XK_AudioLowerVolume 0x1008FF11 /* Volume control down */
|
||||
#define XF86XK_AudioMute 0x1008FF12 /* Mute sound from the system */
|
||||
#define XF86XK_AudioRaiseVolume 0x1008FF13 /* Volume control up */
|
||||
#define XF86XK_AudioPlay 0x1008FF14 /* Start playing of audio > */
|
||||
#define XF86XK_AudioStop 0x1008FF15 /* Stop playing audio */
|
||||
#define XF86XK_AudioPrev 0x1008FF16 /* Previous track */
|
||||
#define XF86XK_AudioNext 0x1008FF17 /* Next track */
|
||||
#define XF86XK_HomePage 0x1008FF18 /* Display user's home page */
|
||||
#define XF86XK_Mail 0x1008FF19 /* Invoke user's mail program */
|
||||
#define XF86XK_Start 0x1008FF1A /* Start application */
|
||||
#define XF86XK_Search 0x1008FF1B /* Search */
|
||||
#define XF86XK_AudioRecord 0x1008FF1C /* Record audio application */
|
||||
|
||||
/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */
|
||||
#define XF86XK_Calculator 0x1008FF1D /* Invoke calculator program */
|
||||
#define XF86XK_Memo 0x1008FF1E /* Invoke Memo taking program */
|
||||
#define XF86XK_ToDoList 0x1008FF1F /* Invoke To Do List program */
|
||||
#define XF86XK_Calendar 0x1008FF20 /* Invoke Calendar program */
|
||||
#define XF86XK_PowerDown 0x1008FF21 /* Deep sleep the system */
|
||||
#define XF86XK_ContrastAdjust 0x1008FF22 /* Adjust screen contrast */
|
||||
#define XF86XK_RockerUp 0x1008FF23 /* Rocker switches exist up */
|
||||
#define XF86XK_RockerDown 0x1008FF24 /* and down */
|
||||
#define XF86XK_RockerEnter 0x1008FF25 /* and let you press them */
|
||||
|
||||
/* Some more "Internet" keyboard symbols */
|
||||
#define XF86XK_Back 0x1008FF26 /* Like back on a browser */
|
||||
#define XF86XK_Forward 0x1008FF27 /* Like forward on a browser */
|
||||
#define XF86XK_Stop 0x1008FF28 /* Stop current operation */
|
||||
#define XF86XK_Refresh 0x1008FF29 /* Refresh the page */
|
||||
#define XF86XK_PowerOff 0x1008FF2A /* Power off system entirely */
|
||||
#define XF86XK_WakeUp 0x1008FF2B /* Wake up system from sleep */
|
||||
#define XF86XK_Eject 0x1008FF2C /* Eject device (e.g. DVD) */
|
||||
#define XF86XK_ScreenSaver 0x1008FF2D /* Invoke screensaver */
|
||||
#define XF86XK_WWW 0x1008FF2E /* Invoke web browser */
|
||||
#define XF86XK_Sleep 0x1008FF2F /* Put system to sleep */
|
||||
#define XF86XK_Favorites 0x1008FF30 /* Show favorite locations */
|
||||
#define XF86XK_AudioPause 0x1008FF31 /* Pause audio playing */
|
||||
#define XF86XK_AudioMedia 0x1008FF32 /* Launch media collection app */
|
||||
#define XF86XK_MyComputer 0x1008FF33 /* Display "My Computer" window */
|
||||
#define XF86XK_VendorHome 0x1008FF34 /* Display vendor home web site */
|
||||
#define XF86XK_LightBulb 0x1008FF35 /* Light bulb keys exist */
|
||||
#define XF86XK_Shop 0x1008FF36 /* Display shopping web site */
|
||||
#define XF86XK_History 0x1008FF37 /* Show history of web surfing */
|
||||
#define XF86XK_OpenURL 0x1008FF38 /* Open selected URL */
|
||||
#define XF86XK_AddFavorite 0x1008FF39 /* Add URL to favorites list */
|
||||
#define XF86XK_HotLinks 0x1008FF3A /* Show "hot" links */
|
||||
#define XF86XK_BrightnessAdjust 0x1008FF3B /* Invoke brightness adj. UI */
|
||||
#define XF86XK_Finance 0x1008FF3C /* Display financial site */
|
||||
#define XF86XK_Community 0x1008FF3D /* Display user's community */
|
||||
#define XF86XK_AudioRewind 0x1008FF3E /* "rewind" audio track */
|
||||
#define XF86XK_BackForward 0x1008FF3F /* ??? */
|
||||
#define XF86XK_Launch0 0x1008FF40 /* Launch Application */
|
||||
#define XF86XK_Launch1 0x1008FF41 /* Launch Application */
|
||||
#define XF86XK_Launch2 0x1008FF42 /* Launch Application */
|
||||
#define XF86XK_Launch3 0x1008FF43 /* Launch Application */
|
||||
#define XF86XK_Launch4 0x1008FF44 /* Launch Application */
|
||||
#define XF86XK_Launch5 0x1008FF45 /* Launch Application */
|
||||
#define XF86XK_Launch6 0x1008FF46 /* Launch Application */
|
||||
#define XF86XK_Launch7 0x1008FF47 /* Launch Application */
|
||||
#define XF86XK_Launch8 0x1008FF48 /* Launch Application */
|
||||
#define XF86XK_Launch9 0x1008FF49 /* Launch Application */
|
||||
#define XF86XK_LaunchA 0x1008FF4A /* Launch Application */
|
||||
#define XF86XK_LaunchB 0x1008FF4B /* Launch Application */
|
||||
#define XF86XK_LaunchC 0x1008FF4C /* Launch Application */
|
||||
#define XF86XK_LaunchD 0x1008FF4D /* Launch Application */
|
||||
#define XF86XK_LaunchE 0x1008FF4E /* Launch Application */
|
||||
#define XF86XK_LaunchF 0x1008FF4F /* Launch Application */
|
||||
|
||||
#define XF86XK_ApplicationLeft 0x1008FF50 /* switch to application, left */
|
||||
#define XF86XK_ApplicationRight 0x1008FF51 /* switch to application, right*/
|
||||
#define XF86XK_Book 0x1008FF52 /* Launch bookreader */
|
||||
#define XF86XK_CD 0x1008FF53 /* Launch CD/DVD player */
|
||||
#define XF86XK_Calculater 0x1008FF54 /* Launch Calculater */
|
||||
#define XF86XK_Clear 0x1008FF55 /* Clear window, screen */
|
||||
#define XF86XK_Close 0x1008FF56 /* Close window */
|
||||
#define XF86XK_Copy 0x1008FF57 /* Copy selection */
|
||||
#define XF86XK_Cut 0x1008FF58 /* Cut selection */
|
||||
#define XF86XK_Display 0x1008FF59 /* Output switch key */
|
||||
#define XF86XK_DOS 0x1008FF5A /* Launch DOS (emulation) */
|
||||
#define XF86XK_Documents 0x1008FF5B /* Open documents window */
|
||||
#define XF86XK_Excel 0x1008FF5C /* Launch spread sheet */
|
||||
#define XF86XK_Explorer 0x1008FF5D /* Launch file explorer */
|
||||
#define XF86XK_Game 0x1008FF5E /* Launch game */
|
||||
#define XF86XK_Go 0x1008FF5F /* Go to URL */
|
||||
#define XF86XK_iTouch 0x1008FF60 /* Logitch iTouch- don't use */
|
||||
#define XF86XK_LogOff 0x1008FF61 /* Log off system */
|
||||
#define XF86XK_Market 0x1008FF62 /* ?? */
|
||||
#define XF86XK_Meeting 0x1008FF63 /* enter meeting in calendar */
|
||||
#define XF86XK_MenuKB 0x1008FF65 /* distingush keyboard from PB */
|
||||
#define XF86XK_MenuPB 0x1008FF66 /* distinuish PB from keyboard */
|
||||
#define XF86XK_MySites 0x1008FF67 /* Favourites */
|
||||
#define XF86XK_New 0x1008FF68 /* New (folder, document... */
|
||||
#define XF86XK_News 0x1008FF69 /* News */
|
||||
#define XF86XK_OfficeHome 0x1008FF6A /* Office home (old Staroffice)*/
|
||||
#define XF86XK_Open 0x1008FF6B /* Open */
|
||||
#define XF86XK_Option 0x1008FF6C /* ?? */
|
||||
#define XF86XK_Paste 0x1008FF6D /* Paste */
|
||||
#define XF86XK_Phone 0x1008FF6E /* Launch phone; dial number */
|
||||
#define XF86XK_Q 0x1008FF70 /* Compaq's Q - don't use */
|
||||
#define XF86XK_Reply 0x1008FF72 /* Reply e.g., mail */
|
||||
#define XF86XK_Reload 0x1008FF73 /* Reload web page, file, etc. */
|
||||
#define XF86XK_RotateWindows 0x1008FF74 /* Rotate windows e.g. xrandr */
|
||||
#define XF86XK_RotationPB 0x1008FF75 /* don't use */
|
||||
#define XF86XK_RotationKB 0x1008FF76 /* don't use */
|
||||
#define XF86XK_Save 0x1008FF77 /* Save (file, document, state */
|
||||
#define XF86XK_ScrollUp 0x1008FF78 /* Scroll window/contents up */
|
||||
#define XF86XK_ScrollDown 0x1008FF79 /* Scrool window/contentd down */
|
||||
#define XF86XK_ScrollClick 0x1008FF7A /* Use XKB mousekeys instead */
|
||||
#define XF86XK_Send 0x1008FF7B /* Send mail, file, object */
|
||||
#define XF86XK_Spell 0x1008FF7C /* Spell checker */
|
||||
#define XF86XK_SplitScreen 0x1008FF7D /* Split window or screen */
|
||||
#define XF86XK_Support 0x1008FF7E /* Get support (??) */
|
||||
#define XF86XK_TaskPane 0x1008FF7F /* Show tasks */
|
||||
#define XF86XK_Terminal 0x1008FF80 /* Launch terminal emulator */
|
||||
#define XF86XK_Tools 0x1008FF81 /* toolbox of desktop/app. */
|
||||
#define XF86XK_Travel 0x1008FF82 /* ?? */
|
||||
#define XF86XK_UserPB 0x1008FF84 /* ?? */
|
||||
#define XF86XK_User1KB 0x1008FF85 /* ?? */
|
||||
#define XF86XK_User2KB 0x1008FF86 /* ?? */
|
||||
#define XF86XK_Video 0x1008FF87 /* Launch video player */
|
||||
#define XF86XK_WheelButton 0x1008FF88 /* button from a mouse wheel */
|
||||
#define XF86XK_Word 0x1008FF89 /* Launch word processor */
|
||||
#define XF86XK_Xfer 0x1008FF8A
|
||||
#define XF86XK_ZoomIn 0x1008FF8B /* zoom in view, map, etc. */
|
||||
#define XF86XK_ZoomOut 0x1008FF8C /* zoom out view, map, etc. */
|
||||
|
||||
#define XF86XK_Away 0x1008FF8D /* mark yourself as away */
|
||||
#define XF86XK_Messenger 0x1008FF8E /* as in instant messaging */
|
||||
#define XF86XK_WebCam 0x1008FF8F /* Launch web camera app. */
|
||||
#define XF86XK_MailForward 0x1008FF90 /* Forward in mail */
|
||||
#define XF86XK_Pictures 0x1008FF91 /* Show pictures */
|
||||
#define XF86XK_Music 0x1008FF92 /* Launch music application */
|
||||
|
||||
#define XF86XK_Battery 0x1008FF93 /* Display battery information */
|
||||
#define XF86XK_Bluetooth 0x1008FF94 /* Enable/disable Bluetooth */
|
||||
#define XF86XK_WLAN 0x1008FF95 /* Enable/disable WLAN */
|
||||
#define XF86XK_UWB 0x1008FF96 /* Enable/disable UWB */
|
||||
|
||||
#define XF86XK_AudioForward 0x1008FF97 /* fast-forward audio track */
|
||||
#define XF86XK_AudioRepeat 0x1008FF98 /* toggle repeat mode */
|
||||
#define XF86XK_AudioRandomPlay 0x1008FF99 /* toggle shuffle mode */
|
||||
#define XF86XK_Subtitle 0x1008FF9A /* cycle through subtitle */
|
||||
#define XF86XK_AudioCycleTrack 0x1008FF9B /* cycle through audio tracks */
|
||||
#define XF86XK_CycleAngle 0x1008FF9C /* cycle through angles */
|
||||
#define XF86XK_FrameBack 0x1008FF9D /* video: go one frame back */
|
||||
#define XF86XK_FrameForward 0x1008FF9E /* video: go one frame forward */
|
||||
#define XF86XK_Time 0x1008FF9F /* display, or shows an entry for time seeking */
|
||||
#define XF86XK_Select 0x1008FFA0 /* Select button on joypads and remotes */
|
||||
#define XF86XK_View 0x1008FFA1 /* Show a view options/properties */
|
||||
#define XF86XK_TopMenu 0x1008FFA2 /* Go to a top-level menu in a video */
|
||||
|
||||
#define XF86XK_Red 0x1008FFA3 /* Red button */
|
||||
#define XF86XK_Green 0x1008FFA4 /* Green button */
|
||||
#define XF86XK_Yellow 0x1008FFA5 /* Yellow button */
|
||||
#define XF86XK_Blue 0x1008FFA6 /* Blue button */
|
||||
|
||||
#define XF86XK_Suspend 0x1008FFA7 /* Sleep to RAM */
|
||||
#define XF86XK_Hibernate 0x1008FFA8 /* Sleep to disk */
|
||||
#define XF86XK_TouchpadToggle 0x1008FFA9 /* Toggle between touchpad/trackstick */
|
||||
#define XF86XK_TouchpadOn 0x1008FFB0 /* The touchpad got switched on */
|
||||
#define XF86XK_TouchpadOff 0x1008FFB1 /* The touchpad got switched off */
|
||||
|
||||
#define XF86XK_AudioMicMute 0x1008FFB2 /* Mute the Mic from the system */
|
||||
|
||||
#define XF86XK_Keyboard 0x1008FFB3 /* User defined keyboard related action */
|
||||
|
||||
#define XF86XK_WWAN 0x1008FFB4 /* Toggle WWAN (LTE, UMTS, etc.) radio */
|
||||
#define XF86XK_RFKill 0x1008FFB5 /* Toggle radios on/off */
|
||||
|
||||
#define XF86XK_AudioPreset 0x1008FFB6 /* Select equalizer preset, e.g. theatre-mode */
|
||||
|
||||
/* Keys for special action keys (hot keys) */
|
||||
/* Virtual terminals on some operating systems */
|
||||
#define XF86XK_Switch_VT_1 0x1008FE01
|
||||
#define XF86XK_Switch_VT_2 0x1008FE02
|
||||
#define XF86XK_Switch_VT_3 0x1008FE03
|
||||
#define XF86XK_Switch_VT_4 0x1008FE04
|
||||
#define XF86XK_Switch_VT_5 0x1008FE05
|
||||
#define XF86XK_Switch_VT_6 0x1008FE06
|
||||
#define XF86XK_Switch_VT_7 0x1008FE07
|
||||
#define XF86XK_Switch_VT_8 0x1008FE08
|
||||
#define XF86XK_Switch_VT_9 0x1008FE09
|
||||
#define XF86XK_Switch_VT_10 0x1008FE0A
|
||||
#define XF86XK_Switch_VT_11 0x1008FE0B
|
||||
#define XF86XK_Switch_VT_12 0x1008FE0C
|
||||
|
||||
#define XF86XK_Ungrab 0x1008FE20 /* force ungrab */
|
||||
#define XF86XK_ClearGrab 0x1008FE21 /* kill application with grab */
|
||||
#define XF86XK_Next_VMode 0x1008FE22 /* next video mode available */
|
||||
#define XF86XK_Prev_VMode 0x1008FE23 /* prev. video mode available */
|
||||
#define XF86XK_LogWindowTree 0x1008FE24 /* print window tree to log */
|
||||
#define XF86XK_LogGrabInfo 0x1008FE25 /* print all active grabs to log */
|
||||
1149
X11/XKBlib.h
1149
X11/XKBlib.h
File diff suppressed because it is too large
Load diff
113
X11/XWDFile.h
113
X11/XWDFile.h
|
|
@ -1,113 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 1985, 1986, 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* XWDFile.h MIT Project Athena, X Window system window raster
|
||||
* image dumper, dump file format header file.
|
||||
*
|
||||
* Author: Tony Della Fera, DEC
|
||||
* 27-Jun-85
|
||||
*
|
||||
* Modifier: William F. Wyatt, SAO
|
||||
* 18-Nov-86 - version 6 for saving/restoring color maps
|
||||
*/
|
||||
|
||||
#ifndef XWDFILE_H
|
||||
#define XWDFILE_H
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#define XWD_FILE_VERSION 7
|
||||
#define sz_XWDheader 100
|
||||
#define sz_XWDColor 12
|
||||
|
||||
typedef CARD32 xwdval; /* for old broken programs */
|
||||
|
||||
/* Values in the file are most significant byte first. */
|
||||
|
||||
typedef struct _xwd_file_header {
|
||||
/* header_size = SIZEOF(XWDheader) + length of null-terminated
|
||||
* window name. */
|
||||
CARD32 header_size B32;
|
||||
|
||||
CARD32 file_version B32; /* = XWD_FILE_VERSION above */
|
||||
CARD32 pixmap_format B32; /* ZPixmap or XYPixmap */
|
||||
CARD32 pixmap_depth B32; /* Pixmap depth */
|
||||
CARD32 pixmap_width B32; /* Pixmap width */
|
||||
CARD32 pixmap_height B32; /* Pixmap height */
|
||||
CARD32 xoffset B32; /* Bitmap x offset, normally 0 */
|
||||
CARD32 byte_order B32; /* of image data: MSBFirst, LSBFirst */
|
||||
|
||||
/* bitmap_unit applies to bitmaps (depth 1 format XY) only.
|
||||
* It is the number of bits that each scanline is padded to. */
|
||||
CARD32 bitmap_unit B32;
|
||||
|
||||
CARD32 bitmap_bit_order B32; /* bitmaps only: MSBFirst, LSBFirst */
|
||||
|
||||
/* bitmap_pad applies to pixmaps (non-bitmaps) only.
|
||||
* It is the number of bits that each scanline is padded to. */
|
||||
CARD32 bitmap_pad B32;
|
||||
|
||||
CARD32 bits_per_pixel B32; /* Bits per pixel */
|
||||
|
||||
/* bytes_per_line is pixmap_width padded to bitmap_unit (bitmaps)
|
||||
* or bitmap_pad (pixmaps). It is the delta (in bytes) to get
|
||||
* to the same x position on an adjacent row. */
|
||||
CARD32 bytes_per_line B32;
|
||||
CARD32 visual_class B32; /* Class of colormap */
|
||||
CARD32 red_mask B32; /* Z red mask */
|
||||
CARD32 green_mask B32; /* Z green mask */
|
||||
CARD32 blue_mask B32; /* Z blue mask */
|
||||
CARD32 bits_per_rgb B32; /* Log2 of distinct color values */
|
||||
CARD32 colormap_entries B32; /* Number of entries in colormap; not used? */
|
||||
CARD32 ncolors B32; /* Number of XWDColor structures */
|
||||
CARD32 window_width B32; /* Window width */
|
||||
CARD32 window_height B32; /* Window height */
|
||||
CARD32 window_x B32; /* Window upper left X coordinate */
|
||||
CARD32 window_y B32; /* Window upper left Y coordinate */
|
||||
CARD32 window_bdrwidth B32; /* Window border width */
|
||||
} XWDFileHeader;
|
||||
|
||||
/* Null-terminated window name follows the above structure. */
|
||||
|
||||
/* Next comes XWDColor structures, at offset XWDFileHeader.header_size in
|
||||
* the file. XWDFileHeader.ncolors tells how many XWDColor structures
|
||||
* there are.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
CARD32 pixel B32;
|
||||
CARD16 red B16;
|
||||
CARD16 green B16;
|
||||
CARD16 blue B16;
|
||||
CARD8 flags;
|
||||
CARD8 pad;
|
||||
} XWDColor;
|
||||
|
||||
/* Last comes the image data in the format described by XWDFileHeader. */
|
||||
|
||||
#endif /* XWDFILE_H */
|
||||
|
||||
121
X11/Xalloca.h
121
X11/Xalloca.h
|
|
@ -1,121 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 1995, 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.
|
||||
|
||||
*/
|
||||
/*
|
||||
* The purpose of this header is to define the macros ALLOCATE_LOCAL and
|
||||
* DEALLOCATE_LOCAL appropriately for the platform being compiled on.
|
||||
* These macros are used to make fast, function-local memory allocations.
|
||||
* Their characteristics are as follows:
|
||||
*
|
||||
* void *ALLOCATE_LOCAL(int size)
|
||||
* Returns a pointer to size bytes of memory, or NULL if the allocation
|
||||
* failed. The memory must be freed with DEALLOCATE_LOCAL before the
|
||||
* function that made the allocation returns. You should not ask for
|
||||
* large blocks of memory with this function, since on many platforms
|
||||
* the memory comes from the stack, which may have limited size.
|
||||
*
|
||||
* void DEALLOCATE_LOCAL(void *)
|
||||
* Frees the memory allocated by ALLOCATE_LOCAL. Omission of this
|
||||
* step may be harmless on some platforms, but will result in
|
||||
* memory leaks or worse on others.
|
||||
*
|
||||
* Before including this file, you should define two macros,
|
||||
* ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK, that have the
|
||||
* same characteristics as ALLOCATE_LOCAL and DEALLOCATE_LOCAL. The
|
||||
* header uses the fallbacks if it doesn't know a "better" way to define
|
||||
* ALLOCATE_LOCAL and DEALLOCATE_LOCAL. Typical usage would be:
|
||||
*
|
||||
* #define ALLOCATE_LOCAL_FALLBACK(_size) malloc(_size)
|
||||
* #define DEALLOCATE_LOCAL_FALLBACK(_ptr) free(_ptr)
|
||||
* #include "Xalloca.h"
|
||||
*/
|
||||
|
||||
#ifndef XALLOCA_H
|
||||
#define XALLOCA_H 1
|
||||
|
||||
#ifndef INCLUDE_ALLOCA_H
|
||||
/* Need to add more here to match Imake *.cf's */
|
||||
# if defined(HAVE_ALLOCA_H) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
# define INCLUDE_ALLOCA_H
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
#endif
|
||||
|
||||
#ifndef NO_ALLOCA
|
||||
/*
|
||||
* os-dependent definition of local allocation and deallocation
|
||||
* If you want something other than (DE)ALLOCATE_LOCAL_FALLBACK
|
||||
* for ALLOCATE/DEALLOCATE_LOCAL then you add that in here.
|
||||
*/
|
||||
|
||||
|
||||
# ifdef __GNUC__
|
||||
# ifndef alloca
|
||||
# define alloca __builtin_alloca
|
||||
# endif /* !alloca */
|
||||
# define ALLOCATE_LOCAL(size) alloca((int)(size))
|
||||
# else /* ! __GNUC__ */
|
||||
|
||||
/*
|
||||
* warning: old mips alloca (pre 2.10) is unusable, new one is built in
|
||||
* Test is easy, the new one is named __builtin_alloca and comes
|
||||
* from alloca.h which #defines alloca.
|
||||
*/
|
||||
# if defined(__sun) || defined(alloca)
|
||||
/*
|
||||
* Some System V boxes extract alloca.o from /lib/libPW.a; if you
|
||||
* decide that you don't want to use alloca, you might want to fix it here.
|
||||
*/
|
||||
/* alloca might be a macro taking one arg (hi, Sun!), so give it one. */
|
||||
# if !defined(__cplusplus)
|
||||
# define __Xnullarg /* as nothing */
|
||||
extern void *alloca(__Xnullarg);
|
||||
# endif
|
||||
# define ALLOCATE_LOCAL(size) alloca((int)(size))
|
||||
# endif /* who does alloca */
|
||||
# endif /* __GNUC__ */
|
||||
|
||||
#endif /* NO_ALLOCA */
|
||||
|
||||
#if !defined(ALLOCATE_LOCAL)
|
||||
# if defined(ALLOCATE_LOCAL_FALLBACK) && defined(DEALLOCATE_LOCAL_FALLBACK)
|
||||
# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK(_size)
|
||||
# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK(_ptr)
|
||||
# else /* no fallbacks supplied; error */
|
||||
# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined!
|
||||
# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined!
|
||||
# endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */
|
||||
#else
|
||||
# if !defined(DEALLOCATE_LOCAL)
|
||||
# define DEALLOCATE_LOCAL(_ptr) do {} while(0)
|
||||
# endif
|
||||
#endif /* defined(ALLOCATE_LOCAL) */
|
||||
|
||||
#endif /* XALLOCA_H */
|
||||
79
X11/Xatom.h
79
X11/Xatom.h
|
|
@ -1,79 +0,0 @@
|
|||
#ifndef XATOM_H
|
||||
#define XATOM_H 1
|
||||
|
||||
/* THIS IS A GENERATED FILE
|
||||
*
|
||||
* Do not change! Changing this file implies a protocol change!
|
||||
*/
|
||||
|
||||
#define XA_PRIMARY ((Atom) 1)
|
||||
#define XA_SECONDARY ((Atom) 2)
|
||||
#define XA_ARC ((Atom) 3)
|
||||
#define XA_ATOM ((Atom) 4)
|
||||
#define XA_BITMAP ((Atom) 5)
|
||||
#define XA_CARDINAL ((Atom) 6)
|
||||
#define XA_COLORMAP ((Atom) 7)
|
||||
#define XA_CURSOR ((Atom) 8)
|
||||
#define XA_CUT_BUFFER0 ((Atom) 9)
|
||||
#define XA_CUT_BUFFER1 ((Atom) 10)
|
||||
#define XA_CUT_BUFFER2 ((Atom) 11)
|
||||
#define XA_CUT_BUFFER3 ((Atom) 12)
|
||||
#define XA_CUT_BUFFER4 ((Atom) 13)
|
||||
#define XA_CUT_BUFFER5 ((Atom) 14)
|
||||
#define XA_CUT_BUFFER6 ((Atom) 15)
|
||||
#define XA_CUT_BUFFER7 ((Atom) 16)
|
||||
#define XA_DRAWABLE ((Atom) 17)
|
||||
#define XA_FONT ((Atom) 18)
|
||||
#define XA_INTEGER ((Atom) 19)
|
||||
#define XA_PIXMAP ((Atom) 20)
|
||||
#define XA_POINT ((Atom) 21)
|
||||
#define XA_RECTANGLE ((Atom) 22)
|
||||
#define XA_RESOURCE_MANAGER ((Atom) 23)
|
||||
#define XA_RGB_COLOR_MAP ((Atom) 24)
|
||||
#define XA_RGB_BEST_MAP ((Atom) 25)
|
||||
#define XA_RGB_BLUE_MAP ((Atom) 26)
|
||||
#define XA_RGB_DEFAULT_MAP ((Atom) 27)
|
||||
#define XA_RGB_GRAY_MAP ((Atom) 28)
|
||||
#define XA_RGB_GREEN_MAP ((Atom) 29)
|
||||
#define XA_RGB_RED_MAP ((Atom) 30)
|
||||
#define XA_STRING ((Atom) 31)
|
||||
#define XA_VISUALID ((Atom) 32)
|
||||
#define XA_WINDOW ((Atom) 33)
|
||||
#define XA_WM_COMMAND ((Atom) 34)
|
||||
#define XA_WM_HINTS ((Atom) 35)
|
||||
#define XA_WM_CLIENT_MACHINE ((Atom) 36)
|
||||
#define XA_WM_ICON_NAME ((Atom) 37)
|
||||
#define XA_WM_ICON_SIZE ((Atom) 38)
|
||||
#define XA_WM_NAME ((Atom) 39)
|
||||
#define XA_WM_NORMAL_HINTS ((Atom) 40)
|
||||
#define XA_WM_SIZE_HINTS ((Atom) 41)
|
||||
#define XA_WM_ZOOM_HINTS ((Atom) 42)
|
||||
#define XA_MIN_SPACE ((Atom) 43)
|
||||
#define XA_NORM_SPACE ((Atom) 44)
|
||||
#define XA_MAX_SPACE ((Atom) 45)
|
||||
#define XA_END_SPACE ((Atom) 46)
|
||||
#define XA_SUPERSCRIPT_X ((Atom) 47)
|
||||
#define XA_SUPERSCRIPT_Y ((Atom) 48)
|
||||
#define XA_SUBSCRIPT_X ((Atom) 49)
|
||||
#define XA_SUBSCRIPT_Y ((Atom) 50)
|
||||
#define XA_UNDERLINE_POSITION ((Atom) 51)
|
||||
#define XA_UNDERLINE_THICKNESS ((Atom) 52)
|
||||
#define XA_STRIKEOUT_ASCENT ((Atom) 53)
|
||||
#define XA_STRIKEOUT_DESCENT ((Atom) 54)
|
||||
#define XA_ITALIC_ANGLE ((Atom) 55)
|
||||
#define XA_X_HEIGHT ((Atom) 56)
|
||||
#define XA_QUAD_WIDTH ((Atom) 57)
|
||||
#define XA_WEIGHT ((Atom) 58)
|
||||
#define XA_POINT_SIZE ((Atom) 59)
|
||||
#define XA_RESOLUTION ((Atom) 60)
|
||||
#define XA_COPYRIGHT ((Atom) 61)
|
||||
#define XA_NOTICE ((Atom) 62)
|
||||
#define XA_FONT_NAME ((Atom) 63)
|
||||
#define XA_FAMILY_NAME ((Atom) 64)
|
||||
#define XA_FULL_NAME ((Atom) 65)
|
||||
#define XA_CAP_HEIGHT ((Atom) 66)
|
||||
#define XA_WM_CLASS ((Atom) 67)
|
||||
#define XA_WM_TRANSIENT_FOR ((Atom) 68)
|
||||
|
||||
#define XA_LAST_PREDEFINED ((Atom) 68)
|
||||
#endif /* XATOM_H */
|
||||
149
X11/Xauth.h
149
X11/Xauth.h
|
|
@ -1,149 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _Xauth_h
|
||||
#define _Xauth_h
|
||||
|
||||
/* struct xauth is full of implicit padding to properly align the pointers
|
||||
after the length fields. 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
|
||||
|
||||
typedef struct xauth {
|
||||
unsigned short family;
|
||||
unsigned short address_length;
|
||||
char *address;
|
||||
unsigned short number_length;
|
||||
char *number;
|
||||
unsigned short name_length;
|
||||
char *name;
|
||||
unsigned short data_length;
|
||||
char *data;
|
||||
} Xauth;
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifndef _XAUTH_STRUCT_ONLY
|
||||
|
||||
# include <X11/Xfuncproto.h>
|
||||
# include <X11/Xfuncs.h>
|
||||
|
||||
# include <stdio.h>
|
||||
|
||||
# define FamilyLocal (256) /* not part of X standard (i.e. X.h) */
|
||||
# define FamilyWild (65535)
|
||||
# define FamilyNetname (254) /* not part of X standard */
|
||||
# define FamilyKrb5Principal (253) /* Kerberos 5 principal name */
|
||||
# define FamilyLocalHost (252) /* for local non-net authentication */
|
||||
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
char *XauFileName(void);
|
||||
|
||||
Xauth *XauReadAuth(
|
||||
FILE* /* auth_file */
|
||||
);
|
||||
|
||||
int XauLockAuth(
|
||||
_Xconst char* /* file_name */,
|
||||
int /* retries */,
|
||||
int /* timeout */,
|
||||
long /* dead */
|
||||
);
|
||||
|
||||
int XauUnlockAuth(
|
||||
_Xconst char* /* file_name */
|
||||
);
|
||||
|
||||
int XauWriteAuth(
|
||||
FILE* /* auth_file */,
|
||||
Xauth* /* auth */
|
||||
);
|
||||
|
||||
Xauth *XauGetAuthByAddr(
|
||||
#if NeedWidePrototypes
|
||||
unsigned int /* family */,
|
||||
unsigned int /* address_length */,
|
||||
#else
|
||||
unsigned short /* family */,
|
||||
unsigned short /* address_length */,
|
||||
#endif
|
||||
_Xconst char* /* address */,
|
||||
#if NeedWidePrototypes
|
||||
unsigned int /* number_length */,
|
||||
#else
|
||||
unsigned short /* number_length */,
|
||||
#endif
|
||||
_Xconst char* /* number */,
|
||||
#if NeedWidePrototypes
|
||||
unsigned int /* name_length */,
|
||||
#else
|
||||
unsigned short /* name_length */,
|
||||
#endif
|
||||
_Xconst char* /* name */
|
||||
);
|
||||
|
||||
Xauth *XauGetBestAuthByAddr(
|
||||
#if NeedWidePrototypes
|
||||
unsigned int /* family */,
|
||||
unsigned int /* address_length */,
|
||||
#else
|
||||
unsigned short /* family */,
|
||||
unsigned short /* address_length */,
|
||||
#endif
|
||||
_Xconst char* /* address */,
|
||||
#if NeedWidePrototypes
|
||||
unsigned int /* number_length */,
|
||||
#else
|
||||
unsigned short /* number_length */,
|
||||
#endif
|
||||
_Xconst char* /* number */,
|
||||
int /* types_length */,
|
||||
char** /* type_names */,
|
||||
_Xconst int* /* type_lengths */
|
||||
);
|
||||
|
||||
void XauDisposeAuth(
|
||||
Xauth* /* auth */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
/* Return values from XauLockAuth */
|
||||
|
||||
# define LOCK_SUCCESS 0 /* lock succeeded */
|
||||
# define LOCK_ERROR 1 /* lock unexpectely failed, check errno */
|
||||
# define LOCK_TIMEOUT 2 /* lock failed, timeouts expired */
|
||||
|
||||
#endif /* _XAUTH_STRUCT_ONLY */
|
||||
|
||||
#endif /* _Xauth_h */
|
||||
815
X11/Xcms.h
815
X11/Xcms.h
|
|
@ -1,815 +0,0 @@
|
|||
|
||||
/*
|
||||
* Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* This file is a component of an X Window System-specific implementation
|
||||
* of Xcms based on the TekColor Color Management System. Permission is
|
||||
* hereby granted to use, copy, modify, sell, and otherwise distribute this
|
||||
* software and its documentation for any purpose and without fee, provided
|
||||
* that this copyright, permission, and disclaimer notice is reproduced in
|
||||
* all copies of this software and in supporting documentation. TekColor
|
||||
* is a trademark of Tektronix, Inc.
|
||||
*
|
||||
* Tektronix makes no representation about the suitability of this software
|
||||
* for any purpose. It is provided "as is" and with all faults.
|
||||
*
|
||||
* TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
|
||||
* INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX 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 THE PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* DESCRIPTION
|
||||
* Public include file for X Color Management System
|
||||
*/
|
||||
#ifndef _X11_XCMS_H_
|
||||
#define _X11_XCMS_H_
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
/* The Xcms 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
|
||||
|
||||
/*
|
||||
* XCMS Status Values
|
||||
*/
|
||||
#define XcmsFailure 0
|
||||
#define XcmsSuccess 1
|
||||
#define XcmsSuccessWithCompression 2
|
||||
|
||||
/*
|
||||
* Color Space Format ID's
|
||||
* Color Space ID's are of XcmsColorFormat type.
|
||||
*
|
||||
* bit 31
|
||||
* 0 == Device-Independent
|
||||
* 1 == Device-Dependent
|
||||
*
|
||||
* bit 30:
|
||||
* 0 == Registered with X Consortium
|
||||
* 1 == Unregistered
|
||||
*/
|
||||
#define XcmsUndefinedFormat (XcmsColorFormat)0x00000000
|
||||
#define XcmsCIEXYZFormat (XcmsColorFormat)0x00000001
|
||||
#define XcmsCIEuvYFormat (XcmsColorFormat)0x00000002
|
||||
#define XcmsCIExyYFormat (XcmsColorFormat)0x00000003
|
||||
#define XcmsCIELabFormat (XcmsColorFormat)0x00000004
|
||||
#define XcmsCIELuvFormat (XcmsColorFormat)0x00000005
|
||||
#define XcmsTekHVCFormat (XcmsColorFormat)0x00000006
|
||||
#define XcmsRGBFormat (XcmsColorFormat)0x80000000
|
||||
#define XcmsRGBiFormat (XcmsColorFormat)0x80000001
|
||||
|
||||
/*
|
||||
* State of XcmsPerScrnInfo
|
||||
*/
|
||||
#define XcmsInitNone 0x00 /* no initialization attempted */
|
||||
#define XcmsInitSuccess 0x01 /* initialization successful */
|
||||
#define XcmsInitFailure 0xff /* failure, use defaults */
|
||||
|
||||
#define DisplayOfCCC(ccc) ((ccc)->dpy)
|
||||
#define ScreenNumberOfCCC(ccc) ((ccc)->screenNumber)
|
||||
#define VisualOfCCC(ccc) ((ccc)->visual)
|
||||
#define ClientWhitePointOfCCC(ccc) (&(ccc)->clientWhitePt)
|
||||
#define ScreenWhitePointOfCCC(ccc) (&(ccc)->pPerScrnInfo->screenWhitePt)
|
||||
#define FunctionSetOfCCC(ccc) ((ccc)->pPerScrnInfo->functionSet)
|
||||
|
||||
typedef unsigned long XcmsColorFormat; /* Color Space Format ID */
|
||||
|
||||
typedef double XcmsFloat;
|
||||
|
||||
/*
|
||||
* Device RGB
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned short red; /* scaled from 0x0000 to 0xffff */
|
||||
unsigned short green; /* scaled from 0x0000 to 0xffff */
|
||||
unsigned short blue; /* scaled from 0x0000 to 0xffff */
|
||||
} XcmsRGB;
|
||||
|
||||
/*
|
||||
* RGB Intensity
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat red; /* 0.0 - 1.0 */
|
||||
XcmsFloat green; /* 0.0 - 1.0 */
|
||||
XcmsFloat blue; /* 0.0 - 1.0 */
|
||||
} XcmsRGBi;
|
||||
|
||||
/*
|
||||
* CIE XYZ
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat X;
|
||||
XcmsFloat Y;
|
||||
XcmsFloat Z;
|
||||
} XcmsCIEXYZ;
|
||||
|
||||
/*
|
||||
* CIE u'v'Y
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat u_prime; /* 0.0 - 1.0 */
|
||||
XcmsFloat v_prime; /* 0.0 - 1.0 */
|
||||
XcmsFloat Y; /* 0.0 - 1.0 */
|
||||
} XcmsCIEuvY;
|
||||
|
||||
/*
|
||||
* CIE xyY
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat x; /* 0.0 - 1.0 */
|
||||
XcmsFloat y; /* 0.0 - 1.0 */
|
||||
XcmsFloat Y; /* 0.0 - 1.0 */
|
||||
} XcmsCIExyY;
|
||||
|
||||
/*
|
||||
* CIE L*a*b*
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat L_star; /* 0.0 - 100.0 */
|
||||
XcmsFloat a_star;
|
||||
XcmsFloat b_star;
|
||||
} XcmsCIELab;
|
||||
|
||||
/*
|
||||
* CIE L*u*v*
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat L_star; /* 0.0 - 100.0 */
|
||||
XcmsFloat u_star;
|
||||
XcmsFloat v_star;
|
||||
} XcmsCIELuv;
|
||||
|
||||
/*
|
||||
* TekHVC
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat H; /* 0.0 - 360.0 */
|
||||
XcmsFloat V; /* 0.0 - 100.0 */
|
||||
XcmsFloat C; /* 0.0 - 100.0 */
|
||||
} XcmsTekHVC;
|
||||
|
||||
/*
|
||||
* PAD
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat pad0;
|
||||
XcmsFloat pad1;
|
||||
XcmsFloat pad2;
|
||||
XcmsFloat pad3;
|
||||
} XcmsPad;
|
||||
|
||||
|
||||
/*
|
||||
* XCMS Color Structure
|
||||
*/
|
||||
typedef struct {
|
||||
union {
|
||||
XcmsRGB RGB;
|
||||
XcmsRGBi RGBi;
|
||||
XcmsCIEXYZ CIEXYZ;
|
||||
XcmsCIEuvY CIEuvY;
|
||||
XcmsCIExyY CIExyY;
|
||||
XcmsCIELab CIELab;
|
||||
XcmsCIELuv CIELuv;
|
||||
XcmsTekHVC TekHVC;
|
||||
XcmsPad Pad;
|
||||
} spec; /* the color specification */
|
||||
unsigned long pixel; /* pixel value (as needed) */
|
||||
XcmsColorFormat format; /* the specification format */
|
||||
} XcmsColor;
|
||||
|
||||
|
||||
/*
|
||||
* XCMS Per Screen related data
|
||||
*/
|
||||
|
||||
typedef struct _XcmsPerScrnInfo {
|
||||
XcmsColor screenWhitePt; /* Screen White point */
|
||||
XPointer functionSet; /* pointer to Screen Color Characterization */
|
||||
/* Function Set structure */
|
||||
XPointer screenData; /* pointer to corresponding Screen Color*/
|
||||
/* Characterization Data */
|
||||
unsigned char state; /* XcmsInitNone, XcmsInitSuccess, XcmsInitFailure */
|
||||
char pad[3];
|
||||
} XcmsPerScrnInfo;
|
||||
|
||||
typedef struct _XcmsCCC *XcmsCCC;
|
||||
|
||||
typedef Status (*XcmsCompressionProc)( /* Gamut Compression Proc */
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
typedef Status (*XcmsWhiteAdjustProc)( /* White Point Adjust Proc */
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* initial_white_point*/,
|
||||
XcmsColor* /* target_white_point*/,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
/*
|
||||
* XCMS Color Conversion Context
|
||||
*/
|
||||
typedef struct _XcmsCCC {
|
||||
Display *dpy; /* X Display */
|
||||
int screenNumber; /* X screen number */
|
||||
Visual *visual; /* X Visual */
|
||||
XcmsColor clientWhitePt; /* Client White Point */
|
||||
XcmsCompressionProc gamutCompProc; /* Gamut Compression Function */
|
||||
XPointer gamutCompClientData; /* Gamut Comp Func Client Data */
|
||||
XcmsWhiteAdjustProc whitePtAdjProc; /* White Point Adjustment Function */
|
||||
XPointer whitePtAdjClientData; /* White Pt Adj Func Client Data */
|
||||
XcmsPerScrnInfo *pPerScrnInfo; /* pointer to per screen information */
|
||||
/* associated with the above display */
|
||||
/* screenNumber */
|
||||
} XcmsCCCRec;
|
||||
|
||||
typedef Status (*XcmsScreenInitProc)( /* Screen Initialization Proc */
|
||||
Display* /* dpy */,
|
||||
int /* screen_number */,
|
||||
XcmsPerScrnInfo* /* screen_info */
|
||||
);
|
||||
|
||||
typedef void (*XcmsScreenFreeProc)(
|
||||
XPointer /* screenData */
|
||||
);
|
||||
|
||||
/*
|
||||
* Function List Pointer -- pointer to an array of function pointers.
|
||||
* The end of list is indicated by a NULL pointer.
|
||||
*/
|
||||
/*
|
||||
* XXX: The use of the XcmsConversionProc type is broken. The
|
||||
* device-independent colour conversion code uses it as:
|
||||
|
||||
typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, XcmsColor *,
|
||||
unsigned int);
|
||||
|
||||
* while the device-dependent code uses it as:
|
||||
|
||||
typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, unsigned int,
|
||||
Bool *);
|
||||
|
||||
* Until this is reworked, it's probably best to leave it unprotoized.
|
||||
* The code works regardless.
|
||||
*/
|
||||
typedef Status (*XcmsDDConversionProc)( /* using device-dependent version */
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* pcolors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* pCompressed */
|
||||
);
|
||||
|
||||
typedef Status (*XcmsDIConversionProc)( /* using device-independent version */
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* pcolors_in_out */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
typedef XcmsDIConversionProc XcmsConversionProc;
|
||||
typedef XcmsConversionProc *XcmsFuncListPtr;
|
||||
|
||||
typedef int (*XcmsParseStringProc)( /* Color String Parsing Proc */
|
||||
char* /* color_string */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
/*
|
||||
* Color Space -- per Color Space related data (Device-Independent
|
||||
* or Device-Dependent)
|
||||
*/
|
||||
typedef struct _XcmsColorSpace {
|
||||
const char *prefix; /* Prefix of string format. */
|
||||
XcmsColorFormat id; /* Format ID number. */
|
||||
XcmsParseStringProc parseString;
|
||||
/* String format parsing function */
|
||||
XcmsFuncListPtr to_CIEXYZ; /* Pointer to an array of function */
|
||||
/* pointers such that when the */
|
||||
/* functions are executed in sequence */
|
||||
/* will convert a XcmsColor structure */
|
||||
/* from this color space to CIEXYZ */
|
||||
/* space. */
|
||||
XcmsFuncListPtr from_CIEXYZ;/* Pointer to an array of function */
|
||||
/* pointers such that when the */
|
||||
/* functions are executed in sequence */
|
||||
/* will convert a XcmsColor structure */
|
||||
/* from CIEXYZ space to this color */
|
||||
/* space. */
|
||||
int inverse_flag; /* If 1, indicates that for 0 <= i < n */
|
||||
/* where n is the number of function */
|
||||
/* pointers in the lists to_CIEXYZ */
|
||||
/* and from_CIEXYZ; for each function */
|
||||
/* to_CIEXYZ[i] its inverse function */
|
||||
/* is from_CIEXYZ[n - i]. */
|
||||
|
||||
} XcmsColorSpace;
|
||||
|
||||
/*
|
||||
* Screen Color Characterization Function Set -- per device class
|
||||
* color space conversion functions.
|
||||
*/
|
||||
typedef struct _XcmsFunctionSet {
|
||||
XcmsColorSpace **DDColorSpaces;
|
||||
/* Pointer to an array of pointers to */
|
||||
/* Device-DEPENDENT color spaces */
|
||||
/* understood by this SCCFuncSet. */
|
||||
XcmsScreenInitProc screenInitProc;
|
||||
/* Screen initialization function that */
|
||||
/* reads Screen Color Characterization*/
|
||||
/* Data off properties on the screen's*/
|
||||
/* root window. */
|
||||
XcmsScreenFreeProc screenFreeProc;
|
||||
/* Function that frees the SCCData */
|
||||
/* structures. */
|
||||
} XcmsFunctionSet;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern Status XcmsAddColorSpace (
|
||||
XcmsColorSpace* /* pColorSpace */
|
||||
);
|
||||
|
||||
extern Status XcmsAddFunctionSet (
|
||||
XcmsFunctionSet* /* functionSet */
|
||||
);
|
||||
|
||||
extern Status XcmsAllocColor (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsColor* /* color_in_out */,
|
||||
XcmsColorFormat /* result_format */
|
||||
);
|
||||
|
||||
extern Status XcmsAllocNamedColor (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
_Xconst char* /* color_string */,
|
||||
XcmsColor* /* color_scrn_return */,
|
||||
XcmsColor* /* color_exact_return */,
|
||||
XcmsColorFormat /* result_format */
|
||||
);
|
||||
|
||||
extern XcmsCCC XcmsCCCOfColormap (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabClipab(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabClipL(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabClipLab(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabQueryMaxC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* L_star */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabQueryMaxL (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabQueryMaxLC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabQueryMinL (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabToCIEXYZ (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabWhiteShiftColors(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* initial_white_point*/,
|
||||
XcmsColor* /* target_white_point*/,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvClipL(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvClipLuv(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvClipuv(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvQueryMaxC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* L_star */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvQueryMaxL (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvQueryMaxLC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvQueryMinL (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvToCIEuvY (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvWhiteShiftColors(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* initial_white_point*/,
|
||||
XcmsColor* /* target_white_point*/,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEXYZToCIELab (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEXYZToCIEuvY (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEXYZToCIExyY (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEXYZToRGBi (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEuvYToCIELuv (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEuvYToCIEXYZ (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEuvYToTekHVC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIExyYToCIEXYZ (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern XcmsColor *XcmsClientWhitePointOfCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern Status XcmsConvertColors (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colorArry_in_out */,
|
||||
unsigned int /* nColors */,
|
||||
XcmsColorFormat /* targetFormat */,
|
||||
Bool* /* compArry_return */
|
||||
);
|
||||
|
||||
extern XcmsCCC XcmsCreateCCC (
|
||||
Display* /* dpy */,
|
||||
int /* screenNumber */,
|
||||
Visual* /* visual */,
|
||||
XcmsColor* /* clientWhitePt */,
|
||||
XcmsCompressionProc /* gamutCompProc */,
|
||||
XPointer /* gamutCompClientData */,
|
||||
XcmsWhiteAdjustProc /* whitePtAdjProc */,
|
||||
XPointer /* whitePtAdjClientData */
|
||||
);
|
||||
|
||||
extern XcmsCCC XcmsDefaultCCC (
|
||||
Display* /* dpy */,
|
||||
int /* screenNumber */
|
||||
);
|
||||
|
||||
extern Display *XcmsDisplayOfCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern XcmsColorFormat XcmsFormatOfPrefix (
|
||||
char* /* prefix */
|
||||
);
|
||||
|
||||
extern void XcmsFreeCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern Status XcmsLookupColor (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
_Xconst char* /* color_string */,
|
||||
XcmsColor* /* pColor_exact_in_out */,
|
||||
XcmsColor* /* pColor_scrn_in_out */,
|
||||
XcmsColorFormat /* result_format */
|
||||
);
|
||||
|
||||
extern char *XcmsPrefixOfFormat (
|
||||
XcmsColorFormat /* id */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryBlack (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryBlue (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryColor (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsColor* /* pColor_in_out */,
|
||||
XcmsColorFormat /* result_format */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryColors (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsColor* /* colorArry_in_out */,
|
||||
unsigned int /* nColors */,
|
||||
XcmsColorFormat /* result_format */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryGreen (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryRed (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryWhite (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsRGBiToCIEXYZ (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsRGBiToRGB (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsRGBToRGBi (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern int XcmsScreenNumberOfCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern XcmsColor *XcmsScreenWhitePointOfCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern XcmsCCC XcmsSetCCCOfColormap(
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern XcmsCompressionProc XcmsSetCompressionProc (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsCompressionProc /* compression_proc */,
|
||||
XPointer /* client_data */
|
||||
);
|
||||
|
||||
extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsWhiteAdjustProc /* white_adjust_proc */,
|
||||
XPointer /* client_data */
|
||||
);
|
||||
|
||||
extern Status XcmsSetWhitePoint (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* color */
|
||||
);
|
||||
|
||||
extern Status XcmsStoreColor (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsColor* /* pColor_in */
|
||||
);
|
||||
|
||||
extern Status XcmsStoreColors (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsColor* /* colorArry_in */,
|
||||
unsigned int /* nColors */,
|
||||
Bool* /* compArry_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCClipC(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCClipV(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCClipVC(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCQueryMaxC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue */,
|
||||
XcmsFloat /* value */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCQueryMaxV (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCQueryMaxVC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCQueryMaxVSamples (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue */,
|
||||
XcmsColor* /* colors_return */,
|
||||
unsigned int /* nsamples */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCQueryMinV (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCToCIEuvY (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCWhiteShiftColors(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* initial_white_point*/,
|
||||
XcmsColor* /* target_white_point*/,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Visual *XcmsVisualOfCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _X11_XCMS_H_ */
|
||||
|
|
@ -1,500 +0,0 @@
|
|||
/* include/X11/Xcursor/Xcursor.h. Generated from Xcursor.h.in by configure. */
|
||||
/*
|
||||
* Copyright © 2002 Keith Packard
|
||||
*
|
||||
* 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, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD 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 _XCURSOR_H_
|
||||
#define _XCURSOR_H_
|
||||
#include <stdio.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
typedef int XcursorBool;
|
||||
typedef unsigned int XcursorUInt;
|
||||
|
||||
typedef XcursorUInt XcursorDim;
|
||||
typedef XcursorUInt XcursorPixel;
|
||||
|
||||
#define XcursorTrue 1
|
||||
#define XcursorFalse 0
|
||||
|
||||
/*
|
||||
* Cursor files start with a header. The header
|
||||
* contains a magic number, a version number and a
|
||||
* table of contents which has type and offset information
|
||||
* for the remaining tables in the file.
|
||||
*
|
||||
* File minor versions increment for compatible changes
|
||||
* File major versions increment for incompatible changes (never, we hope)
|
||||
*
|
||||
* Chunks of the same type are always upward compatible. Incompatible
|
||||
* changes are made with new chunk types; the old data can remain under
|
||||
* the old type. Upward compatible changes can add header data as the
|
||||
* header lengths are specified in the file.
|
||||
*
|
||||
* File:
|
||||
* FileHeader
|
||||
* LISTofChunk
|
||||
*
|
||||
* FileHeader:
|
||||
* CARD32 magic magic number
|
||||
* CARD32 header bytes in file header
|
||||
* CARD32 version file version
|
||||
* CARD32 ntoc number of toc entries
|
||||
* LISTofFileToc toc table of contents
|
||||
*
|
||||
* FileToc:
|
||||
* CARD32 type entry type
|
||||
* CARD32 subtype entry subtype (size for images)
|
||||
* CARD32 position absolute file position
|
||||
*/
|
||||
|
||||
#define XCURSOR_MAGIC 0x72756358 /* "Xcur" LSBFirst */
|
||||
|
||||
/*
|
||||
* Current Xcursor version number. Will be substituted by configure
|
||||
* from the version in the libXcursor configure.ac file.
|
||||
*/
|
||||
|
||||
#define XCURSOR_LIB_MAJOR 1
|
||||
#define XCURSOR_LIB_MINOR 1
|
||||
#define XCURSOR_LIB_REVISION 15
|
||||
#define XCURSOR_LIB_VERSION ((XCURSOR_LIB_MAJOR * 10000) + \
|
||||
(XCURSOR_LIB_MINOR * 100) + \
|
||||
(XCURSOR_LIB_REVISION))
|
||||
|
||||
/*
|
||||
* This version number is stored in cursor files; changes to the
|
||||
* file format require updating this version number
|
||||
*/
|
||||
#define XCURSOR_FILE_MAJOR 1
|
||||
#define XCURSOR_FILE_MINOR 0
|
||||
#define XCURSOR_FILE_VERSION ((XCURSOR_FILE_MAJOR << 16) | (XCURSOR_FILE_MINOR))
|
||||
#define XCURSOR_FILE_HEADER_LEN (4 * 4)
|
||||
#define XCURSOR_FILE_TOC_LEN (3 * 4)
|
||||
|
||||
typedef struct _XcursorFileToc {
|
||||
XcursorUInt type; /* chunk type */
|
||||
XcursorUInt subtype; /* subtype (size for images) */
|
||||
XcursorUInt position; /* absolute position in file */
|
||||
} XcursorFileToc;
|
||||
|
||||
typedef struct _XcursorFileHeader {
|
||||
XcursorUInt magic; /* magic number */
|
||||
XcursorUInt header; /* byte length of header */
|
||||
XcursorUInt version; /* file version number */
|
||||
XcursorUInt ntoc; /* number of toc entries */
|
||||
XcursorFileToc *tocs; /* table of contents */
|
||||
} XcursorFileHeader;
|
||||
|
||||
/*
|
||||
* The rest of the file is a list of chunks, each tagged by type
|
||||
* and version.
|
||||
*
|
||||
* Chunk:
|
||||
* ChunkHeader
|
||||
* <extra type-specific header fields>
|
||||
* <type-specific data>
|
||||
*
|
||||
* ChunkHeader:
|
||||
* CARD32 header bytes in chunk header + type header
|
||||
* CARD32 type chunk type
|
||||
* CARD32 subtype chunk subtype
|
||||
* CARD32 version chunk type version
|
||||
*/
|
||||
|
||||
#define XCURSOR_CHUNK_HEADER_LEN (4 * 4)
|
||||
|
||||
typedef struct _XcursorChunkHeader {
|
||||
XcursorUInt header; /* bytes in chunk header */
|
||||
XcursorUInt type; /* chunk type */
|
||||
XcursorUInt subtype; /* chunk subtype (size for images) */
|
||||
XcursorUInt version; /* version of this type */
|
||||
} XcursorChunkHeader;
|
||||
|
||||
/*
|
||||
* Here's a list of the known chunk types
|
||||
*/
|
||||
|
||||
/*
|
||||
* Comments consist of a 4-byte length field followed by
|
||||
* UTF-8 encoded text
|
||||
*
|
||||
* Comment:
|
||||
* ChunkHeader header chunk header
|
||||
* CARD32 length bytes in text
|
||||
* LISTofCARD8 text UTF-8 encoded text
|
||||
*/
|
||||
|
||||
#define XCURSOR_COMMENT_TYPE 0xfffe0001
|
||||
#define XCURSOR_COMMENT_VERSION 1
|
||||
#define XCURSOR_COMMENT_HEADER_LEN (XCURSOR_CHUNK_HEADER_LEN + (1 *4))
|
||||
#define XCURSOR_COMMENT_COPYRIGHT 1
|
||||
#define XCURSOR_COMMENT_LICENSE 2
|
||||
#define XCURSOR_COMMENT_OTHER 3
|
||||
#define XCURSOR_COMMENT_MAX_LEN 0x100000
|
||||
|
||||
typedef struct _XcursorComment {
|
||||
XcursorUInt version;
|
||||
XcursorUInt comment_type;
|
||||
char *comment;
|
||||
} XcursorComment;
|
||||
|
||||
/*
|
||||
* Each cursor image occupies a separate image chunk.
|
||||
* The length of the image header follows the chunk header
|
||||
* so that future versions can extend the header without
|
||||
* breaking older applications
|
||||
*
|
||||
* Image:
|
||||
* ChunkHeader header chunk header
|
||||
* CARD32 width actual width
|
||||
* CARD32 height actual height
|
||||
* CARD32 xhot hot spot x
|
||||
* CARD32 yhot hot spot y
|
||||
* CARD32 delay animation delay
|
||||
* LISTofCARD32 pixels ARGB pixels
|
||||
*/
|
||||
|
||||
#define XCURSOR_IMAGE_TYPE 0xfffd0002
|
||||
#define XCURSOR_IMAGE_VERSION 1
|
||||
#define XCURSOR_IMAGE_HEADER_LEN (XCURSOR_CHUNK_HEADER_LEN + (5*4))
|
||||
#define XCURSOR_IMAGE_MAX_SIZE 0x7fff /* 32767x32767 max cursor size */
|
||||
|
||||
typedef struct _XcursorImage {
|
||||
XcursorUInt version; /* version of the image data */
|
||||
XcursorDim size; /* nominal size for matching */
|
||||
XcursorDim width; /* actual width */
|
||||
XcursorDim height; /* actual height */
|
||||
XcursorDim xhot; /* hot spot x (must be inside image) */
|
||||
XcursorDim yhot; /* hot spot y (must be inside image) */
|
||||
XcursorUInt delay; /* animation delay to next frame (ms) */
|
||||
XcursorPixel *pixels; /* pointer to pixels */
|
||||
} XcursorImage;
|
||||
|
||||
/*
|
||||
* Other data structures exposed by the library API
|
||||
*/
|
||||
typedef struct _XcursorImages {
|
||||
int nimage; /* number of images */
|
||||
XcursorImage **images; /* array of XcursorImage pointers */
|
||||
char *name; /* name used to load images */
|
||||
} XcursorImages;
|
||||
|
||||
typedef struct _XcursorCursors {
|
||||
Display *dpy; /* Display holding cursors */
|
||||
int ref; /* reference count */
|
||||
int ncursor; /* number of cursors */
|
||||
Cursor *cursors; /* array of cursors */
|
||||
} XcursorCursors;
|
||||
|
||||
typedef struct _XcursorAnimate {
|
||||
XcursorCursors *cursors; /* list of cursors to use */
|
||||
int sequence; /* which cursor is next */
|
||||
} XcursorAnimate;
|
||||
|
||||
typedef struct _XcursorFile XcursorFile;
|
||||
|
||||
struct _XcursorFile {
|
||||
void *closure;
|
||||
int (*read) (XcursorFile *file, unsigned char *buf, int len);
|
||||
int (*write) (XcursorFile *file, unsigned char *buf, int len);
|
||||
int (*seek) (XcursorFile *file, long offset, int whence);
|
||||
};
|
||||
|
||||
typedef struct _XcursorComments {
|
||||
int ncomment; /* number of comments */
|
||||
XcursorComment **comments; /* array of XcursorComment pointers */
|
||||
} XcursorComments;
|
||||
|
||||
#define XCURSOR_CORE_THEME "core"
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/*
|
||||
* Manage Image objects
|
||||
*/
|
||||
XcursorImage *
|
||||
XcursorImageCreate (int width, int height);
|
||||
|
||||
void
|
||||
XcursorImageDestroy (XcursorImage *image);
|
||||
|
||||
/*
|
||||
* Manage Images objects
|
||||
*/
|
||||
XcursorImages *
|
||||
XcursorImagesCreate (int size);
|
||||
|
||||
void
|
||||
XcursorImagesDestroy (XcursorImages *images);
|
||||
|
||||
void
|
||||
XcursorImagesSetName (XcursorImages *images, const char *name);
|
||||
|
||||
/*
|
||||
* Manage Cursor objects
|
||||
*/
|
||||
XcursorCursors *
|
||||
XcursorCursorsCreate (Display *dpy, int size);
|
||||
|
||||
void
|
||||
XcursorCursorsDestroy (XcursorCursors *cursors);
|
||||
|
||||
/*
|
||||
* Manage Animate objects
|
||||
*/
|
||||
XcursorAnimate *
|
||||
XcursorAnimateCreate (XcursorCursors *cursors);
|
||||
|
||||
void
|
||||
XcursorAnimateDestroy (XcursorAnimate *animate);
|
||||
|
||||
Cursor
|
||||
XcursorAnimateNext (XcursorAnimate *animate);
|
||||
|
||||
/*
|
||||
* Manage Comment objects
|
||||
*/
|
||||
XcursorComment *
|
||||
XcursorCommentCreate (XcursorUInt comment_type, int length);
|
||||
|
||||
void
|
||||
XcursorCommentDestroy (XcursorComment *comment);
|
||||
|
||||
XcursorComments *
|
||||
XcursorCommentsCreate (int size);
|
||||
|
||||
void
|
||||
XcursorCommentsDestroy (XcursorComments *comments);
|
||||
|
||||
/*
|
||||
* XcursorFile/Image APIs
|
||||
*/
|
||||
XcursorImage *
|
||||
XcursorXcFileLoadImage (XcursorFile *file, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorXcFileLoadImages (XcursorFile *file, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorXcFileLoadAllImages (XcursorFile *file);
|
||||
|
||||
XcursorBool
|
||||
XcursorXcFileLoad (XcursorFile *file,
|
||||
XcursorComments **commentsp,
|
||||
XcursorImages **imagesp);
|
||||
|
||||
XcursorBool
|
||||
XcursorXcFileSave (XcursorFile *file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images);
|
||||
|
||||
/*
|
||||
* FILE/Image APIs
|
||||
*/
|
||||
XcursorImage *
|
||||
XcursorFileLoadImage (FILE *file, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorFileLoadImages (FILE *file, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorFileLoadAllImages (FILE *file);
|
||||
|
||||
XcursorBool
|
||||
XcursorFileLoad (FILE *file,
|
||||
XcursorComments **commentsp,
|
||||
XcursorImages **imagesp);
|
||||
|
||||
XcursorBool
|
||||
XcursorFileSaveImages (FILE *file, const XcursorImages *images);
|
||||
|
||||
XcursorBool
|
||||
XcursorFileSave (FILE * file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images);
|
||||
|
||||
/*
|
||||
* Filename/Image APIs
|
||||
*/
|
||||
XcursorImage *
|
||||
XcursorFilenameLoadImage (const char *filename, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorFilenameLoadImages (const char *filename, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorFilenameLoadAllImages (const char *filename);
|
||||
|
||||
XcursorBool
|
||||
XcursorFilenameLoad (const char *file,
|
||||
XcursorComments **commentsp,
|
||||
XcursorImages **imagesp);
|
||||
|
||||
XcursorBool
|
||||
XcursorFilenameSaveImages (const char *filename, const XcursorImages *images);
|
||||
|
||||
XcursorBool
|
||||
XcursorFilenameSave (const char *file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images);
|
||||
|
||||
/*
|
||||
* Library/Image APIs
|
||||
*/
|
||||
XcursorImage *
|
||||
XcursorLibraryLoadImage (const char *library, const char *theme, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorLibraryLoadImages (const char *library, const char *theme, int size);
|
||||
|
||||
/*
|
||||
* Library/shape API
|
||||
*/
|
||||
|
||||
const char *
|
||||
XcursorLibraryPath (void);
|
||||
|
||||
int
|
||||
XcursorLibraryShape (const char *library);
|
||||
|
||||
/*
|
||||
* Image/Cursor APIs
|
||||
*/
|
||||
|
||||
Cursor
|
||||
XcursorImageLoadCursor (Display *dpy, const XcursorImage *image);
|
||||
|
||||
XcursorCursors *
|
||||
XcursorImagesLoadCursors (Display *dpy, const XcursorImages *images);
|
||||
|
||||
Cursor
|
||||
XcursorImagesLoadCursor (Display *dpy, const XcursorImages *images);
|
||||
|
||||
/*
|
||||
* Filename/Cursor APIs
|
||||
*/
|
||||
Cursor
|
||||
XcursorFilenameLoadCursor (Display *dpy, const char *file);
|
||||
|
||||
XcursorCursors *
|
||||
XcursorFilenameLoadCursors (Display *dpy, const char *file);
|
||||
|
||||
/*
|
||||
* Library/Cursor APIs
|
||||
*/
|
||||
Cursor
|
||||
XcursorLibraryLoadCursor (Display *dpy, const char *file);
|
||||
|
||||
XcursorCursors *
|
||||
XcursorLibraryLoadCursors (Display *dpy, const char *file);
|
||||
|
||||
/*
|
||||
* Shape/Image APIs
|
||||
*/
|
||||
|
||||
XcursorImage *
|
||||
XcursorShapeLoadImage (unsigned int shape, const char *theme, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorShapeLoadImages (unsigned int shape, const char *theme, int size);
|
||||
|
||||
/*
|
||||
* Shape/Cursor APIs
|
||||
*/
|
||||
Cursor
|
||||
XcursorShapeLoadCursor (Display *dpy, unsigned int shape);
|
||||
|
||||
XcursorCursors *
|
||||
XcursorShapeLoadCursors (Display *dpy, unsigned int shape);
|
||||
|
||||
/*
|
||||
* This is the function called by Xlib when attempting to
|
||||
* load cursors from XCreateGlyphCursor. The interface must
|
||||
* not change as Xlib loads 'libXcursor.so' instead of
|
||||
* a specific major version
|
||||
*/
|
||||
Cursor
|
||||
XcursorTryShapeCursor (Display *dpy,
|
||||
Font source_font,
|
||||
Font mask_font,
|
||||
unsigned int source_char,
|
||||
unsigned int mask_char,
|
||||
XColor _Xconst *foreground,
|
||||
XColor _Xconst *background);
|
||||
|
||||
void
|
||||
XcursorNoticeCreateBitmap (Display *dpy,
|
||||
Pixmap pid,
|
||||
unsigned int width,
|
||||
unsigned int height);
|
||||
|
||||
void
|
||||
XcursorNoticePutBitmap (Display *dpy,
|
||||
Drawable draw,
|
||||
XImage *image);
|
||||
|
||||
Cursor
|
||||
XcursorTryShapeBitmapCursor (Display *dpy,
|
||||
Pixmap source,
|
||||
Pixmap mask,
|
||||
XColor *foreground,
|
||||
XColor *background,
|
||||
unsigned int x,
|
||||
unsigned int y);
|
||||
|
||||
#define XCURSOR_BITMAP_HASH_SIZE 16
|
||||
|
||||
void
|
||||
XcursorImageHash (XImage *image,
|
||||
unsigned char hash[XCURSOR_BITMAP_HASH_SIZE]);
|
||||
|
||||
/*
|
||||
* Display information APIs
|
||||
*/
|
||||
XcursorBool
|
||||
XcursorSupportsARGB (Display *dpy);
|
||||
|
||||
XcursorBool
|
||||
XcursorSupportsAnim (Display *dpy);
|
||||
|
||||
XcursorBool
|
||||
XcursorSetDefaultSize (Display *dpy, int size);
|
||||
|
||||
int
|
||||
XcursorGetDefaultSize (Display *dpy);
|
||||
|
||||
XcursorBool
|
||||
XcursorSetTheme (Display *dpy, const char *theme);
|
||||
|
||||
char *
|
||||
XcursorGetTheme (Display *dpy);
|
||||
|
||||
XcursorBool
|
||||
XcursorGetThemeCore (Display *dpy);
|
||||
|
||||
XcursorBool
|
||||
XcursorSetThemeCore (Display *dpy, XcursorBool theme_core);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif
|
||||
181
X11/Xdmcp.h
181
X11/Xdmcp.h
|
|
@ -1,181 +0,0 @@
|
|||
/*
|
||||
* Copyright 1989 Network Computing Devices, Inc., Mountain View, California.
|
||||
*
|
||||
* 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 N.C.D. not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. N.C.D. makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _XDMCP_H_
|
||||
#define _XDMCP_H_
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
#define XDM_PROTOCOL_VERSION 1
|
||||
#define XDM_UDP_PORT 177
|
||||
|
||||
/* IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned
|
||||
* multicast addresses for XDMCP, where X in the prefix may be replaced
|
||||
* by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local,
|
||||
* 5 for Site-Local, and so on. We set the default here to the Link-Local
|
||||
* version to most closely match the old IPv4 subnet broadcast behavior.
|
||||
* Both xdm and X -query allow specifying a different address if a different
|
||||
* scope is defined.
|
||||
*/
|
||||
#define XDM_DEFAULT_MCAST_ADDR6 "ff02:0:0:0:0:0:0:12b"
|
||||
|
||||
#define XDM_MAX_MSGLEN 8192
|
||||
#define XDM_MIN_RTX 2
|
||||
#define XDM_MAX_RTX 32
|
||||
#define XDM_RTX_LIMIT 7
|
||||
#define XDM_KA_RTX_LIMIT 4
|
||||
#define XDM_DEF_DORMANCY (3 * 60) /* 3 minutes */
|
||||
#define XDM_MAX_DORMANCY (24 * 60 * 60) /* 24 hours */
|
||||
|
||||
typedef enum {
|
||||
BROADCAST_QUERY = 1, QUERY, INDIRECT_QUERY, FORWARD_QUERY,
|
||||
WILLING, UNWILLING, REQUEST, ACCEPT, DECLINE, MANAGE, REFUSE,
|
||||
FAILED, KEEPALIVE, ALIVE
|
||||
} xdmOpCode;
|
||||
|
||||
typedef enum {
|
||||
XDM_QUERY, XDM_BROADCAST, XDM_INDIRECT, XDM_COLLECT_QUERY,
|
||||
XDM_COLLECT_BROADCAST_QUERY, XDM_COLLECT_INDIRECT_QUERY,
|
||||
XDM_START_CONNECTION, XDM_AWAIT_REQUEST_RESPONSE,
|
||||
XDM_AWAIT_MANAGE_RESPONSE, XDM_MANAGE, XDM_RUN_SESSION, XDM_OFF,
|
||||
XDM_AWAIT_USER_INPUT, XDM_KEEPALIVE, XDM_AWAIT_ALIVE_RESPONSE,
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
XDM_MULTICAST, XDM_COLLECT_MULTICAST_QUERY,
|
||||
#endif
|
||||
XDM_KEEP_ME_LAST
|
||||
} xdmcp_states;
|
||||
|
||||
#ifdef NOTDEF
|
||||
/* table of hosts */
|
||||
|
||||
#define XDM_MAX_STR_LEN 21
|
||||
#define XDM_MAX_HOSTS 20
|
||||
struct xdm_host_table {
|
||||
struct sockaddr_in sockaddr;
|
||||
char name[XDM_MAX_STR_LEN];
|
||||
char status[XDM_MAX_STR_LEN];
|
||||
};
|
||||
#endif /* NOTDEF */
|
||||
|
||||
typedef CARD8 *CARD8Ptr;
|
||||
typedef CARD16 *CARD16Ptr;
|
||||
typedef CARD32 *CARD32Ptr;
|
||||
|
||||
typedef struct _ARRAY8 {
|
||||
CARD16 length;
|
||||
CARD8Ptr data;
|
||||
} ARRAY8, *ARRAY8Ptr;
|
||||
|
||||
typedef struct _ARRAY16 {
|
||||
CARD8 length;
|
||||
CARD16Ptr data;
|
||||
} ARRAY16, *ARRAY16Ptr;
|
||||
|
||||
typedef struct _ARRAY32 {
|
||||
CARD8 length;
|
||||
CARD32Ptr data;
|
||||
} ARRAY32, *ARRAY32Ptr;
|
||||
|
||||
typedef struct _ARRAYofARRAY8 {
|
||||
CARD8 length;
|
||||
ARRAY8Ptr data;
|
||||
} ARRAYofARRAY8, *ARRAYofARRAY8Ptr;
|
||||
|
||||
typedef struct _XdmcpHeader {
|
||||
CARD16 version, opcode, length;
|
||||
} XdmcpHeader, *XdmcpHeaderPtr;
|
||||
|
||||
typedef struct _XdmcpBuffer {
|
||||
BYTE *data;
|
||||
int size; /* size of buffer pointed by to data */
|
||||
int pointer; /* current index into data */
|
||||
int count; /* bytes read from network into data */
|
||||
} XdmcpBuffer, *XdmcpBufferPtr;
|
||||
|
||||
typedef struct _XdmAuthKey {
|
||||
BYTE data[8];
|
||||
} XdmAuthKeyRec, *XdmAuthKeyPtr;
|
||||
|
||||
|
||||
/* implementation-independent network address structure.
|
||||
Equiv to sockaddr* for sockets. */
|
||||
|
||||
typedef char *XdmcpNetaddr;
|
||||
|
||||
extern int XdmcpWriteARRAY16(XdmcpBufferPtr buffer, const ARRAY16Ptr array);
|
||||
extern int XdmcpWriteARRAY32(XdmcpBufferPtr buffer, const ARRAY32Ptr array);
|
||||
extern int XdmcpWriteARRAY8(XdmcpBufferPtr buffer, const ARRAY8Ptr array);
|
||||
extern int XdmcpWriteARRAYofARRAY8(XdmcpBufferPtr buffer, const ARRAYofARRAY8Ptr array);
|
||||
extern int XdmcpWriteCARD16(XdmcpBufferPtr buffer, unsigned value);
|
||||
extern int XdmcpWriteCARD32(XdmcpBufferPtr buffer, unsigned value);
|
||||
extern int XdmcpWriteCARD8(XdmcpBufferPtr buffer, unsigned value);
|
||||
extern int XdmcpWriteHeader(XdmcpBufferPtr buffer, const XdmcpHeaderPtr header);
|
||||
|
||||
extern int XdmcpFlush(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr to, int tolen);
|
||||
|
||||
extern int XdmcpReadARRAY16(XdmcpBufferPtr buffer, ARRAY16Ptr array);
|
||||
extern int XdmcpReadARRAY32(XdmcpBufferPtr buffer, ARRAY32Ptr array);
|
||||
extern int XdmcpReadARRAY8(XdmcpBufferPtr buffer, ARRAY8Ptr array);
|
||||
extern int XdmcpReadARRAYofARRAY8(XdmcpBufferPtr buffer, ARRAYofARRAY8Ptr array);
|
||||
extern int XdmcpReadCARD16(XdmcpBufferPtr buffer, CARD16Ptr valuep);
|
||||
extern int XdmcpReadCARD32(XdmcpBufferPtr buffer, CARD32Ptr valuep);
|
||||
extern int XdmcpReadCARD8(XdmcpBufferPtr buffer, CARD8Ptr valuep);
|
||||
extern int XdmcpReadHeader(XdmcpBufferPtr buffer, XdmcpHeaderPtr header);
|
||||
|
||||
extern int XdmcpFill(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr from, int *fromlen);
|
||||
|
||||
extern int XdmcpReadRemaining(const XdmcpBufferPtr buffer);
|
||||
|
||||
extern void XdmcpDisposeARRAY8(ARRAY8Ptr array);
|
||||
extern void XdmcpDisposeARRAY16(ARRAY16Ptr array);
|
||||
extern void XdmcpDisposeARRAY32(ARRAY32Ptr array);
|
||||
extern void XdmcpDisposeARRAYofARRAY8(ARRAYofARRAY8Ptr array);
|
||||
|
||||
extern int XdmcpCopyARRAY8(const ARRAY8Ptr src, ARRAY8Ptr dst);
|
||||
|
||||
extern int XdmcpARRAY8Equal(const ARRAY8Ptr array1, const ARRAY8Ptr array2);
|
||||
|
||||
extern void XdmcpGenerateKey (XdmAuthKeyPtr key);
|
||||
extern void XdmcpIncrementKey (XdmAuthKeyPtr key);
|
||||
extern void XdmcpDecrementKey (XdmAuthKeyPtr key);
|
||||
#ifdef HASXDMAUTH
|
||||
extern void XdmcpWrap(unsigned char *input, unsigned char *wrapper, unsigned char *output, int bytes);
|
||||
extern void XdmcpUnwrap(unsigned char *input, unsigned char *wrapper, unsigned char *output, int bytes);
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
extern int XdmcpCompareKeys (const XdmAuthKeyPtr a, const XdmAuthKeyPtr b);
|
||||
|
||||
extern int XdmcpAllocARRAY16 (ARRAY16Ptr array, int length);
|
||||
extern int XdmcpAllocARRAY32 (ARRAY32Ptr array, int length);
|
||||
extern int XdmcpAllocARRAY8 (ARRAY8Ptr array, int length);
|
||||
extern int XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length);
|
||||
|
||||
extern int XdmcpReallocARRAY16 (ARRAY16Ptr array, int length);
|
||||
extern int XdmcpReallocARRAY32 (ARRAY32Ptr array, int length);
|
||||
extern int XdmcpReallocARRAY8 (ARRAY8Ptr array, int length);
|
||||
extern int XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XDMCP_H_ */
|
||||
618
X11/Xft/Xft.h
618
X11/Xft/Xft.h
|
|
@ -1,618 +0,0 @@
|
|||
/* include/X11/Xft/Xft.h. Generated from Xft.h.in by configure. */
|
||||
/*
|
||||
* Copyright © 2000 Keith Packard
|
||||
*
|
||||
* 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, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD 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 _XFT_H_
|
||||
#define _XFT_H_
|
||||
|
||||
/*
|
||||
* Current Xft version number, set from version in the Xft configure.ac file.
|
||||
*/
|
||||
/* #undef will be substituted by configure */
|
||||
#define XFT_MAJOR 2
|
||||
#define XFT_MINOR 3
|
||||
#define XFT_REVISION 2
|
||||
|
||||
#define XFT_VERSION ((XFT_MAJOR * 10000) + (XFT_MINOR * 100) + (XFT_REVISION))
|
||||
#define XftVersion XFT_VERSION
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
/* #include <X11/Xosdefs.h>*/
|
||||
#ifndef _X_SENTINEL
|
||||
# define _X_SENTINEL(x)
|
||||
#endif
|
||||
|
||||
#ifndef _XFT_NO_COMPAT_
|
||||
#include <X11/Xft/XftCompat.h>
|
||||
#endif
|
||||
|
||||
#define XFT_CORE "core"
|
||||
#define XFT_RENDER "render"
|
||||
#define XFT_XLFD "xlfd"
|
||||
#define XFT_MAX_GLYPH_MEMORY "maxglyphmemory"
|
||||
#define XFT_MAX_UNREF_FONTS "maxunreffonts"
|
||||
|
||||
extern FT_Library _XftFTlibrary;
|
||||
|
||||
typedef struct _XftFontInfo XftFontInfo;
|
||||
|
||||
typedef struct _XftFont {
|
||||
int ascent;
|
||||
int descent;
|
||||
int height;
|
||||
int max_advance_width;
|
||||
FcCharSet *charset;
|
||||
FcPattern *pattern;
|
||||
} XftFont;
|
||||
|
||||
typedef struct _XftDraw XftDraw;
|
||||
|
||||
typedef struct _XftColor {
|
||||
unsigned long pixel;
|
||||
XRenderColor color;
|
||||
} XftColor;
|
||||
|
||||
typedef struct _XftCharSpec {
|
||||
FcChar32 ucs4;
|
||||
short x;
|
||||
short y;
|
||||
} XftCharSpec;
|
||||
|
||||
typedef struct _XftCharFontSpec {
|
||||
XftFont *font;
|
||||
FcChar32 ucs4;
|
||||
short x;
|
||||
short y;
|
||||
} XftCharFontSpec;
|
||||
|
||||
typedef struct _XftGlyphSpec {
|
||||
FT_UInt glyph;
|
||||
short x;
|
||||
short y;
|
||||
} XftGlyphSpec;
|
||||
|
||||
typedef struct _XftGlyphFontSpec {
|
||||
XftFont *font;
|
||||
FT_UInt glyph;
|
||||
short x;
|
||||
short y;
|
||||
} XftGlyphFontSpec;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
|
||||
/* xftcolor.c */
|
||||
Bool
|
||||
XftColorAllocName (Display *dpy,
|
||||
_Xconst Visual *visual,
|
||||
Colormap cmap,
|
||||
_Xconst char *name,
|
||||
XftColor *result);
|
||||
|
||||
Bool
|
||||
XftColorAllocValue (Display *dpy,
|
||||
Visual *visual,
|
||||
Colormap cmap,
|
||||
_Xconst XRenderColor *color,
|
||||
XftColor *result);
|
||||
|
||||
void
|
||||
XftColorFree (Display *dpy,
|
||||
Visual *visual,
|
||||
Colormap cmap,
|
||||
XftColor *color);
|
||||
|
||||
/* xftdpy.c */
|
||||
Bool
|
||||
XftDefaultHasRender (Display *dpy);
|
||||
|
||||
Bool
|
||||
XftDefaultSet (Display *dpy, FcPattern *defaults);
|
||||
|
||||
void
|
||||
XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern);
|
||||
|
||||
/* xftdraw.c */
|
||||
|
||||
XftDraw *
|
||||
XftDrawCreate (Display *dpy,
|
||||
Drawable drawable,
|
||||
Visual *visual,
|
||||
Colormap colormap);
|
||||
|
||||
XftDraw *
|
||||
XftDrawCreateBitmap (Display *dpy,
|
||||
Pixmap bitmap);
|
||||
|
||||
XftDraw *
|
||||
XftDrawCreateAlpha (Display *dpy,
|
||||
Pixmap pixmap,
|
||||
int depth);
|
||||
|
||||
void
|
||||
XftDrawChange (XftDraw *draw,
|
||||
Drawable drawable);
|
||||
|
||||
Display *
|
||||
XftDrawDisplay (XftDraw *draw);
|
||||
|
||||
Drawable
|
||||
XftDrawDrawable (XftDraw *draw);
|
||||
|
||||
Colormap
|
||||
XftDrawColormap (XftDraw *draw);
|
||||
|
||||
Visual *
|
||||
XftDrawVisual (XftDraw *draw);
|
||||
|
||||
void
|
||||
XftDrawDestroy (XftDraw *draw);
|
||||
|
||||
Picture
|
||||
XftDrawPicture (XftDraw *draw);
|
||||
|
||||
Picture
|
||||
XftDrawSrcPicture (XftDraw *draw, _Xconst XftColor *color);
|
||||
|
||||
void
|
||||
XftDrawGlyphs (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
XftFont *pub,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FT_UInt *glyphs,
|
||||
int nglyphs);
|
||||
|
||||
void
|
||||
XftDrawString8 (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
XftFont *pub,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar8 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftDrawString16 (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
XftFont *pub,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar16 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftDrawString32 (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
XftFont *pub,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar32 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftDrawStringUtf8 (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
XftFont *pub,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar8 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftDrawStringUtf16 (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
XftFont *pub,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar8 *string,
|
||||
FcEndian endian,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftDrawCharSpec (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
XftFont *pub,
|
||||
_Xconst XftCharSpec *chars,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftDrawCharFontSpec (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
_Xconst XftCharFontSpec *chars,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftDrawGlyphSpec (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
XftFont *pub,
|
||||
_Xconst XftGlyphSpec *glyphs,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftDrawGlyphFontSpec (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
_Xconst XftGlyphFontSpec *glyphs,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftDrawRect (XftDraw *draw,
|
||||
_Xconst XftColor *color,
|
||||
int x,
|
||||
int y,
|
||||
unsigned int width,
|
||||
unsigned int height);
|
||||
|
||||
|
||||
Bool
|
||||
XftDrawSetClip (XftDraw *draw,
|
||||
Region r);
|
||||
|
||||
|
||||
Bool
|
||||
XftDrawSetClipRectangles (XftDraw *draw,
|
||||
int xOrigin,
|
||||
int yOrigin,
|
||||
_Xconst XRectangle *rects,
|
||||
int n);
|
||||
|
||||
void
|
||||
XftDrawSetSubwindowMode (XftDraw *draw,
|
||||
int mode);
|
||||
|
||||
/* xftextent.c */
|
||||
|
||||
void
|
||||
XftGlyphExtents (Display *dpy,
|
||||
XftFont *pub,
|
||||
_Xconst FT_UInt *glyphs,
|
||||
int nglyphs,
|
||||
XGlyphInfo *extents);
|
||||
|
||||
void
|
||||
XftTextExtents8 (Display *dpy,
|
||||
XftFont *pub,
|
||||
_Xconst FcChar8 *string,
|
||||
int len,
|
||||
XGlyphInfo *extents);
|
||||
|
||||
void
|
||||
XftTextExtents16 (Display *dpy,
|
||||
XftFont *pub,
|
||||
_Xconst FcChar16 *string,
|
||||
int len,
|
||||
XGlyphInfo *extents);
|
||||
|
||||
void
|
||||
XftTextExtents32 (Display *dpy,
|
||||
XftFont *pub,
|
||||
_Xconst FcChar32 *string,
|
||||
int len,
|
||||
XGlyphInfo *extents);
|
||||
|
||||
void
|
||||
XftTextExtentsUtf8 (Display *dpy,
|
||||
XftFont *pub,
|
||||
_Xconst FcChar8 *string,
|
||||
int len,
|
||||
XGlyphInfo *extents);
|
||||
|
||||
void
|
||||
XftTextExtentsUtf16 (Display *dpy,
|
||||
XftFont *pub,
|
||||
_Xconst FcChar8 *string,
|
||||
FcEndian endian,
|
||||
int len,
|
||||
XGlyphInfo *extents);
|
||||
|
||||
/* xftfont.c */
|
||||
FcPattern *
|
||||
XftFontMatch (Display *dpy,
|
||||
int screen,
|
||||
_Xconst FcPattern *pattern,
|
||||
FcResult *result);
|
||||
|
||||
XftFont *
|
||||
XftFontOpen (Display *dpy, int screen, ...) _X_SENTINEL(0);
|
||||
|
||||
XftFont *
|
||||
XftFontOpenName (Display *dpy, int screen, _Xconst char *name);
|
||||
|
||||
XftFont *
|
||||
XftFontOpenXlfd (Display *dpy, int screen, _Xconst char *xlfd);
|
||||
|
||||
/* xftfreetype.c */
|
||||
|
||||
FT_Face
|
||||
XftLockFace (XftFont *pub);
|
||||
|
||||
void
|
||||
XftUnlockFace (XftFont *pub);
|
||||
|
||||
XftFontInfo *
|
||||
XftFontInfoCreate (Display *dpy, _Xconst FcPattern *pattern);
|
||||
|
||||
void
|
||||
XftFontInfoDestroy (Display *dpy, XftFontInfo *fi);
|
||||
|
||||
FcChar32
|
||||
XftFontInfoHash (_Xconst XftFontInfo *fi);
|
||||
|
||||
FcBool
|
||||
XftFontInfoEqual (_Xconst XftFontInfo *a, _Xconst XftFontInfo *b);
|
||||
|
||||
XftFont *
|
||||
XftFontOpenInfo (Display *dpy,
|
||||
FcPattern *pattern,
|
||||
XftFontInfo *fi);
|
||||
|
||||
XftFont *
|
||||
XftFontOpenPattern (Display *dpy, FcPattern *pattern);
|
||||
|
||||
XftFont *
|
||||
XftFontCopy (Display *dpy, XftFont *pub);
|
||||
|
||||
void
|
||||
XftFontClose (Display *dpy, XftFont *pub);
|
||||
|
||||
FcBool
|
||||
XftInitFtLibrary(void);
|
||||
|
||||
/* xftglyphs.c */
|
||||
void
|
||||
XftFontLoadGlyphs (Display *dpy,
|
||||
XftFont *pub,
|
||||
FcBool need_bitmaps,
|
||||
_Xconst FT_UInt *glyphs,
|
||||
int nglyph);
|
||||
|
||||
void
|
||||
XftFontUnloadGlyphs (Display *dpy,
|
||||
XftFont *pub,
|
||||
_Xconst FT_UInt *glyphs,
|
||||
int nglyph);
|
||||
|
||||
#define XFT_NMISSING 256
|
||||
|
||||
FcBool
|
||||
XftFontCheckGlyph (Display *dpy,
|
||||
XftFont *pub,
|
||||
FcBool need_bitmaps,
|
||||
FT_UInt glyph,
|
||||
FT_UInt *missing,
|
||||
int *nmissing);
|
||||
|
||||
FcBool
|
||||
XftCharExists (Display *dpy,
|
||||
XftFont *pub,
|
||||
FcChar32 ucs4);
|
||||
|
||||
FT_UInt
|
||||
XftCharIndex (Display *dpy,
|
||||
XftFont *pub,
|
||||
FcChar32 ucs4);
|
||||
|
||||
/* xftinit.c */
|
||||
FcBool
|
||||
XftInit (_Xconst char *config);
|
||||
|
||||
int
|
||||
XftGetVersion (void);
|
||||
|
||||
/* xftlist.c */
|
||||
|
||||
FcFontSet *
|
||||
XftListFonts (Display *dpy,
|
||||
int screen,
|
||||
...) _X_SENTINEL(0);
|
||||
|
||||
/* xftname.c */
|
||||
FcPattern
|
||||
*XftNameParse (_Xconst char *name);
|
||||
|
||||
/* xftrender.c */
|
||||
void
|
||||
XftGlyphRender (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FT_UInt *glyphs,
|
||||
int nglyphs);
|
||||
|
||||
void
|
||||
XftGlyphSpecRender (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
_Xconst XftGlyphSpec *glyphs,
|
||||
int nglyphs);
|
||||
|
||||
void
|
||||
XftCharSpecRender (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
_Xconst XftCharSpec *chars,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftGlyphFontSpecRender (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
_Xconst XftGlyphFontSpec *glyphs,
|
||||
int nglyphs);
|
||||
|
||||
void
|
||||
XftCharFontSpecRender (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
_Xconst XftCharFontSpec *chars,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftTextRender8 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar8 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftTextRender16 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar16 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftTextRender16BE (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar8 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftTextRender16LE (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar8 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftTextRender32 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar32 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftTextRender32BE (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar8 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftTextRender32LE (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar8 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftTextRenderUtf8 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar8 *string,
|
||||
int len);
|
||||
|
||||
void
|
||||
XftTextRenderUtf16 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
XftFont *pub,
|
||||
Picture dst,
|
||||
int srcx,
|
||||
int srcy,
|
||||
int x,
|
||||
int y,
|
||||
_Xconst FcChar8 *string,
|
||||
FcEndian endian,
|
||||
int len);
|
||||
|
||||
/* xftxlfd.c */
|
||||
FcPattern *
|
||||
XftXlfdParse (_Xconst char *xlfd_orig, Bool ignore_scalable, Bool complete);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XFT_H_ */
|
||||
|
|
@ -1,163 +0,0 @@
|
|||
/*
|
||||
* Copyright © 2001 Keith Packard
|
||||
*
|
||||
* 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, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD 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 _XFTCOMPAT_H_
|
||||
#define _XFTCOMPAT_H_
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
/*
|
||||
* Compatibility definitions -- map Fc names to Xft names
|
||||
*/
|
||||
|
||||
typedef FcChar8 XftChar8;
|
||||
typedef FcChar16 XftChar16;
|
||||
typedef FcChar32 XftChar32;
|
||||
|
||||
#define XFT_FAMILY FC_FAMILY
|
||||
#define XFT_STYLE FC_STYLE
|
||||
#define XFT_SLANT FC_SLANT
|
||||
#define XFT_WEIGHT FC_WEIGHT
|
||||
#define XFT_SIZE FC_SIZE
|
||||
#define XFT_PIXEL_SIZE FC_PIXEL_SIZE
|
||||
#define XFT_SPACING FC_SPACING
|
||||
#define XFT_FOUNDRY FC_FOUNDRY
|
||||
#define XFT_ANTIALIAS FC_ANTIALIAS
|
||||
#define XFT_FILE FC_FILE
|
||||
#define XFT_INDEX FC_INDEX
|
||||
#define XFT_RASTERIZER FC_RASTERIZER
|
||||
#define XFT_OUTLINE FC_OUTLINE
|
||||
#define XFT_SCALABLE FC_SCALABLE
|
||||
#define XFT_RGBA FC_RGBA
|
||||
|
||||
/* defaults from resources */
|
||||
#define XFT_SCALE FC_SCALE
|
||||
#define XFT_MINSPACE FC_MINSPACE
|
||||
#define XFT_DPI FC_DPI
|
||||
|
||||
/* specific to FreeType rasterizer */
|
||||
#define XFT_CHAR_WIDTH FC_CHAR_WIDTH
|
||||
#define XFT_CHAR_HEIGHT FC_CHAR_HEIGHT
|
||||
#define XFT_MATRIX FC_MATRIX
|
||||
|
||||
#define XFT_WEIGHT_LIGHT FC_WEIGHT_LIGHT
|
||||
#define XFT_WEIGHT_MEDIUM FC_WEIGHT_MEDIUM
|
||||
#define XFT_WEIGHT_DEMIBOLD FC_WEIGHT_DEMIBOLD
|
||||
#define XFT_WEIGHT_BOLD FC_WEIGHT_BOLD
|
||||
#define XFT_WEIGHT_BLACK FC_WEIGHT_BLACK
|
||||
|
||||
#define XFT_SLANT_ROMAN FC_SLANT_ROMAN
|
||||
#define XFT_SLANT_ITALIC FC_SLANT_ITALIC
|
||||
#define XFT_SLANT_OBLIQUE FC_SLANT_OBLIQUE
|
||||
|
||||
#define XFT_PROPORTIONAL FC_PROPORTIONAL
|
||||
#define XFT_MONO FC_MONO
|
||||
#define XFT_CHARCELL FC_CHARCELL
|
||||
|
||||
#define XFT_RGBA_UNKNOWN FC_RGBA_UNKNOWN
|
||||
#define XFT_RGBA_RGB FC_RGBA_RGB
|
||||
#define XFT_RGBA_BGR FC_RGBA_BGR
|
||||
#define XFT_RGBA_VRGB FC_RGBA_VRGB
|
||||
#define XFT_RGBA_VBGR FC_RGBA_VBGR
|
||||
#define XFT_RGBA_NONE FC_RGBA_NONE
|
||||
|
||||
/*
|
||||
* Old constants
|
||||
*/
|
||||
#define XFT_ENCODING "encoding"
|
||||
|
||||
typedef FcType XftType;
|
||||
|
||||
typedef FcMatrix XftMatrix;
|
||||
|
||||
#define XftMatrixInit(m) FcMatrixInit(m)
|
||||
|
||||
typedef FcResult XftResult;
|
||||
|
||||
#define XftResultMatch FcResultMatch
|
||||
#define XftResultNoMatch FcResultNoMatch
|
||||
#define XftResultTypeMismatch FcResultTypeMismatch
|
||||
#define XftResultNoId FcResultNoId
|
||||
|
||||
typedef FcValue XftValue;
|
||||
typedef FcPattern XftPattern;
|
||||
typedef FcFontSet XftFontSet;
|
||||
typedef FcObjectSet XftObjectSet;
|
||||
|
||||
#define XftGlyphExists XftCharExists
|
||||
|
||||
#define XftObjectSetCreate FcObjectSetCreate
|
||||
#define XftObjectSetAdd FcObjectSetAdd
|
||||
#define XftObjectSetDestroy FcObjectSetDestroy
|
||||
#define XftObjectSetVaBuild FcObjectSetVaBuild
|
||||
#define XftObjectSetBuild FcObjectSetBuild
|
||||
|
||||
#define XftFontSetMatch FcFontSetMatch
|
||||
#define XftFontSetDestroy FcFontSetDestroy
|
||||
|
||||
#define XftMatrixEqual FcMatrixEqual
|
||||
#define XftMatrixMultiply FcMatrixMultiply
|
||||
#define XftMatrixRotate FcMatrixRotate
|
||||
#define XftMatrixScale FcMatrixScale
|
||||
#define XftMatrixShear FcMatrixShear
|
||||
|
||||
#define XftPatternCreate FcPatternCreate
|
||||
#define XftPatternDuplicate FcPatternDuplicate
|
||||
#define XftValueDestroy FcValueDestroy
|
||||
#define XftValueListDestroy FcValueListDestroy
|
||||
#define XftPatternDestroy FcPatternDestroy
|
||||
#define XftPatternFind FcPatternFind
|
||||
#define XftPatternAdd FcPatternAdd
|
||||
#define XftPatternGet FcPatternGet
|
||||
#define XftPatternDel FcPatternDel
|
||||
#define XftPatternAddInteger FcPatternAddInteger
|
||||
#define XftPatternAddDouble FcPatternAddDouble
|
||||
#define XftPatternAddString(p,e,s) FcPatternAddString(p,e,(FcChar8 *)(s))
|
||||
#define XftPatternAddMatrix FcPatternAddMatrix
|
||||
#define XftPatternAddBool FcPatternAddBool
|
||||
#define XftPatternGetInteger FcPatternGetInteger
|
||||
#define XftPatternGetDouble FcPatternGetDouble
|
||||
#define XftPatternGetString(p,e,i,n) FcPatternGetString(p,e,i,(FcChar8 **) (n))
|
||||
#define XftPatternGetMatrix FcPatternGetMatrix
|
||||
#define XftPatternGetBool FcPatternGetBool
|
||||
#define XftPatternVaBuild FcPatternVaBuild
|
||||
#define XftPatternBuild FcPatternBuild
|
||||
|
||||
#define XftUtf8ToUcs4 FcUtf8ToUcs4
|
||||
#define XftUtf8Len FcUtf8Len
|
||||
|
||||
#define XftTypeVoid FcTypeVoid
|
||||
#define XftTypeInteger FcTypeInteger
|
||||
#define XftTypeDouble FcTypeDouble
|
||||
#define XftTypeString FcTypeString
|
||||
#define XftTypeBool FcTypeBool
|
||||
#define XftTypeMatrix FcTypeMatrix
|
||||
|
||||
#define XftConfigSubstitute(p) FcConfigSubstitute (0, p, FcMatchPattern)
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
FcBool
|
||||
XftNameUnparse (XftPattern *pat, char *dest, int len);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XFTCOMPAT_H_ */
|
||||
221
X11/Xfuncproto.h
221
X11/Xfuncproto.h
|
|
@ -1,221 +0,0 @@
|
|||
/*
|
||||
*
|
||||
Copyright 1989, 1991, 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Definitions to make function prototypes manageable */
|
||||
|
||||
#ifndef _XFUNCPROTO_H_
|
||||
#define _XFUNCPROTO_H_
|
||||
|
||||
#ifndef NeedFunctionPrototypes
|
||||
#define NeedFunctionPrototypes 1
|
||||
#endif /* NeedFunctionPrototypes */
|
||||
|
||||
#ifndef NeedVarargsPrototypes
|
||||
#define NeedVarargsPrototypes 1
|
||||
#endif /* NeedVarargsPrototypes */
|
||||
|
||||
#if NeedFunctionPrototypes
|
||||
|
||||
#ifndef NeedNestedPrototypes
|
||||
#define NeedNestedPrototypes 1
|
||||
#endif /* NeedNestedPrototypes */
|
||||
|
||||
#ifndef _Xconst
|
||||
#define _Xconst const
|
||||
#endif /* _Xconst */
|
||||
|
||||
/* Function prototype configuration (see configure for more info) */
|
||||
#if !defined(NARROWPROTO) && \
|
||||
(defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__))
|
||||
#define NARROWPROTO
|
||||
#endif
|
||||
#ifndef FUNCPROTO
|
||||
#define FUNCPROTO 15
|
||||
#endif
|
||||
|
||||
#ifndef NeedWidePrototypes
|
||||
#ifdef NARROWPROTO
|
||||
#define NeedWidePrototypes 0
|
||||
#else
|
||||
#define NeedWidePrototypes 1 /* default to make interropt. easier */
|
||||
#endif
|
||||
#endif /* NeedWidePrototypes */
|
||||
|
||||
#endif /* NeedFunctionPrototypes */
|
||||
|
||||
#ifndef _XFUNCPROTOBEGIN
|
||||
#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
|
||||
#define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
|
||||
#define _XFUNCPROTOEND }
|
||||
#else
|
||||
#define _XFUNCPROTOBEGIN
|
||||
#define _XFUNCPROTOEND
|
||||
#endif
|
||||
#endif /* _XFUNCPROTOBEGIN */
|
||||
|
||||
/* http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute */
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
#ifndef __has_feature
|
||||
# define __has_feature(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
#ifndef __has_extension
|
||||
# define __has_extension(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
|
||||
/* Added in X11R6.9, so available in any version of modular xproto */
|
||||
#if __has_attribute(__sentinel__) || (defined(__GNUC__) && (__GNUC__ >= 4))
|
||||
# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
|
||||
#else
|
||||
# define _X_SENTINEL(x)
|
||||
#endif /* GNUC >= 4 */
|
||||
|
||||
/* Added in X11R6.9, so available in any version of modular xproto */
|
||||
#if (__has_attribute(visibility) || (defined(__GNUC__) && (__GNUC__ >= 4))) \
|
||||
&& !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define _X_EXPORT __attribute__((visibility("default")))
|
||||
# define _X_HIDDEN __attribute__((visibility("hidden")))
|
||||
# define _X_INTERNAL __attribute__((visibility("internal")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
# define _X_EXPORT __global
|
||||
# define _X_HIDDEN __hidden
|
||||
# define _X_INTERNAL __hidden
|
||||
#else /* not gcc >= 4 and not Sun Studio >= 8 */
|
||||
# define _X_EXPORT
|
||||
# define _X_HIDDEN
|
||||
# define _X_INTERNAL
|
||||
#endif /* GNUC >= 4 */
|
||||
|
||||
/* Branch prediction hints for individual conditionals */
|
||||
/* requires xproto >= 7.0.9 */
|
||||
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
|
||||
# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
|
||||
# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
|
||||
#else /* not gcc >= 3.3 */
|
||||
# define _X_LIKELY(x) (x)
|
||||
# define _X_UNLIKELY(x) (x)
|
||||
#endif
|
||||
|
||||
/* Bulk branch prediction hints via marking error path functions as "cold" */
|
||||
/* requires xproto >= 7.0.25 */
|
||||
#if __has_attribute(__cold__) || \
|
||||
(defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403)) /* 4.3+ */
|
||||
# define _X_COLD __attribute__((__cold__))
|
||||
#else
|
||||
# define _X_COLD /* nothing */
|
||||
#endif
|
||||
|
||||
/* Added in X11R6.9, so available in any version of modular xproto */
|
||||
#if __has_attribute(deprecated) \
|
||||
|| (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)) \
|
||||
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5130))
|
||||
# define _X_DEPRECATED __attribute__((deprecated))
|
||||
#else /* not gcc >= 3.1 */
|
||||
# define _X_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.30 */
|
||||
#if __has_extension(attribute_deprecated_with_message) || \
|
||||
(defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
|
||||
# define _X_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg)))
|
||||
#else
|
||||
# define _X_DEPRECATED_MSG(_msg) _X_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.17 */
|
||||
#if __has_attribute(noreturn) \
|
||||
|| (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
|
||||
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
||||
# define _X_NORETURN __attribute((noreturn))
|
||||
#else
|
||||
# define _X_NORETURN
|
||||
#endif /* GNUC */
|
||||
|
||||
/* Added in X11R6.9, so available in any version of modular xproto */
|
||||
#if __has_attribute(__format__) \
|
||||
|| defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
|
||||
# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
|
||||
#else /* not gcc >= 2.3 */
|
||||
# define _X_ATTRIBUTE_PRINTF(x,y)
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable
|
||||
argument macros, must be only used inside #ifdef _X_NONNULL guards, as
|
||||
many legacy X clients are compiled in C89 mode still. */
|
||||
#if __has_attribute(nonnull) \
|
||||
&& defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
|
||||
#define _X_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
|
||||
#elif __has_attribute(nonnull) \
|
||||
|| defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
|
||||
#define _X_NONNULL(args...) __attribute__((nonnull(args)))
|
||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
|
||||
#define _X_NONNULL(...) /* */
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.22 */
|
||||
#if __has_attribute(__unused__) \
|
||||
|| defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)
|
||||
#define _X_UNUSED __attribute__((__unused__))
|
||||
#else
|
||||
#define _X_UNUSED /* */
|
||||
#endif
|
||||
|
||||
/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */
|
||||
/* requires xproto >= 7.0.9
|
||||
(introduced in 7.0.8 but didn't support all compilers until 7.0.9) */
|
||||
#if defined(inline) /* assume autoconf set it correctly */ || \
|
||||
(defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \
|
||||
(defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550))
|
||||
# define _X_INLINE inline
|
||||
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
|
||||
# define _X_INLINE __inline__
|
||||
#else
|
||||
# define _X_INLINE
|
||||
#endif
|
||||
|
||||
/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */
|
||||
/* requires xproto >= 7.0.21 */
|
||||
#ifndef _X_RESTRICT_KYWD
|
||||
# if defined(restrict) /* assume autoconf set it correctly */ || \
|
||||
(defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ \
|
||||
&& !defined(__cplusplus)) /* Workaround g++ issue on Solaris */
|
||||
# define _X_RESTRICT_KYWD restrict
|
||||
# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
|
||||
# define _X_RESTRICT_KYWD __restrict__
|
||||
# else
|
||||
# define _X_RESTRICT_KYWD
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.30 */
|
||||
#if __has_attribute(no_sanitize_thread)
|
||||
# define _X_NOTSAN __attribute__((no_sanitize_thread))
|
||||
#else
|
||||
# define _X_NOTSAN
|
||||
#endif
|
||||
|
||||
#endif /* _XFUNCPROTO_H_ */
|
||||
69
X11/Xfuncs.h
69
X11/Xfuncs.h
|
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
*
|
||||
Copyright 1990, 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 _XFUNCS_H_
|
||||
# define _XFUNCS_H_
|
||||
|
||||
# include <X11/Xosdefs.h>
|
||||
|
||||
/* the old Xfuncs.h, for pre-R6 */
|
||||
# if !(defined(XFree86LOADER) && defined(IN_MODULE))
|
||||
|
||||
# ifdef X_USEBFUNCS
|
||||
void bcopy();
|
||||
void bzero();
|
||||
int bcmp();
|
||||
# else
|
||||
# if defined(SYSV) && !defined(__SCO__) && !defined(__sun) && !defined(__UNIXWARE__) && !defined(_AIX)
|
||||
# include <memory.h>
|
||||
void bcopy();
|
||||
# define bzero(b,len) memset(b, 0, len)
|
||||
# define bcmp(b1,b2,len) memcmp(b1, b2, len)
|
||||
# else
|
||||
# include <string.h>
|
||||
# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__)
|
||||
# include <strings.h>
|
||||
# endif
|
||||
# define _XFUNCS_H_INCLUDED_STRING_H
|
||||
# endif
|
||||
# endif /* X_USEBFUNCS */
|
||||
|
||||
/* the new Xfuncs.h */
|
||||
|
||||
/* the ANSI C way */
|
||||
# ifndef _XFUNCS_H_INCLUDED_STRING_H
|
||||
# include <string.h>
|
||||
# endif
|
||||
# undef bzero
|
||||
# define bzero(b,len) memset(b,0,len)
|
||||
|
||||
# if defined WIN32 && defined __MINGW32__
|
||||
# define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
|
||||
# endif
|
||||
|
||||
# endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
|
||||
|
||||
#endif /* _XFUNCS_H_ */
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/* 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_ */
|
||||
4015
X11/Xlib.h
4015
X11/Xlib.h
File diff suppressed because it is too large
Load diff
|
|
@ -1,38 +0,0 @@
|
|||
/* include/X11/XlibConf.h. Generated from XlibConf.h.in by configure. */
|
||||
/*
|
||||
* Copyright © 2005 Keith Packard
|
||||
*
|
||||
* 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, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD 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 _XLIBCONF_H_
|
||||
#define _XLIBCONF_H_
|
||||
/*
|
||||
* This header file exports defines necessary to correctly
|
||||
* use Xlibint.h both inside Xlib and by external libraries
|
||||
* such as extensions.
|
||||
*/
|
||||
|
||||
/* Threading support? */
|
||||
#define XTHREADS 1
|
||||
|
||||
/* Use multi-threaded libc functions? */
|
||||
#define XUSE_MTSAFE_API 1
|
||||
|
||||
#endif /* _XLIBCONF_H_ */
|
||||
1444
X11/Xlibint.h
1444
X11/Xlibint.h
File diff suppressed because it is too large
Load diff
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 1991, 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_XLOCALE_H_
|
||||
#define _X11_XLOCALE_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xosdefs.h>
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#endif /* _X11_XLOCALE_H_ */
|
||||
142
X11/Xmd.h
142
X11/Xmd.h
|
|
@ -1,142 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
Copyright 1987, 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 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 XMD_H
|
||||
# define XMD_H 1
|
||||
/*
|
||||
* Xmd.h: MACHINE DEPENDENT DECLARATIONS.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Special per-machine configuration flags.
|
||||
*/
|
||||
# if defined(__sun) && defined(__SVR4)
|
||||
# include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
|
||||
# endif
|
||||
|
||||
# if defined (_LP64) || defined(__LP64__) || \
|
||||
defined(__alpha) || defined(__alpha__) || \
|
||||
defined(__ia64__) || defined(ia64) || \
|
||||
defined(__sparc64__) || \
|
||||
defined(__s390x__) || \
|
||||
defined(__amd64__) || defined(amd64) || \
|
||||
defined(__powerpc64__)
|
||||
# if !defined(__ILP32__) /* amd64-x32 is 32bit */
|
||||
# define LONG64 /* 32/64-bit architecture */
|
||||
# endif /* !__ILP32__ */
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Definition of macro used to set constants for size of network structures;
|
||||
* machines with preprocessors that can't handle all of the sz_ symbols
|
||||
* can define this macro to be sizeof(x) if and only if their compiler doesn't
|
||||
* pad out structures (esp. the xTextElt structure which contains only two
|
||||
* one-byte fields). Network structures should always define sz_symbols.
|
||||
*
|
||||
* The sz_ prefix is used instead of something more descriptive so that the
|
||||
* symbols are no more than 32 characters long (which causes problems for some
|
||||
* compilers and preprocessors).
|
||||
*
|
||||
* The extra indirection is to get macro arguments to expand correctly before
|
||||
* the concatenation, rather than afterward.
|
||||
*/
|
||||
# define _SIZEOF(x) sz_##x
|
||||
# define SIZEOF(x) _SIZEOF(x)
|
||||
|
||||
/*
|
||||
* Bitfield suffixes for the protocol structure elements, if you
|
||||
* need them. Note that bitfields are not guaranteed to be signed
|
||||
* (or even unsigned) according to ANSI C.
|
||||
*/
|
||||
# define B32 /* bitfield not needed on architectures with native 32-bit type */
|
||||
# define B16 /* bitfield not needed on architectures with native 16-bit type */
|
||||
# ifdef LONG64
|
||||
typedef long INT64;
|
||||
typedef int INT32;
|
||||
# else
|
||||
typedef long INT32;
|
||||
# endif
|
||||
typedef short INT16;
|
||||
|
||||
typedef signed char INT8;
|
||||
|
||||
# ifdef LONG64
|
||||
typedef unsigned long CARD64;
|
||||
typedef unsigned int CARD32;
|
||||
# else
|
||||
typedef unsigned long long CARD64;
|
||||
typedef unsigned long CARD32;
|
||||
# endif
|
||||
typedef unsigned short CARD16;
|
||||
typedef unsigned char CARD8;
|
||||
|
||||
typedef CARD32 BITS32;
|
||||
typedef CARD16 BITS16;
|
||||
|
||||
typedef CARD8 BYTE;
|
||||
typedef CARD8 BOOL;
|
||||
|
||||
/*
|
||||
* was definitions for sign-extending bitfields on architectures without
|
||||
* native types smaller than 64-bit, now just backwards compatibility
|
||||
*/
|
||||
# define cvtINT8toInt(val) (val)
|
||||
# define cvtINT16toInt(val) (val)
|
||||
# define cvtINT32toInt(val) (val)
|
||||
# define cvtINT8toShort(val) (val)
|
||||
# define cvtINT16toShort(val) (val)
|
||||
# define cvtINT32toShort(val) (val)
|
||||
# define cvtINT8toLong(val) (val)
|
||||
# define cvtINT16toLong(val) (val)
|
||||
# define cvtINT32toLong(val) (val)
|
||||
|
||||
/*
|
||||
* this version should leave result of type (t *), but that should only be
|
||||
* used when not in MUSTCOPY
|
||||
*/
|
||||
# define NEXTPTR(p,t) (((t *)(p)) + 1)
|
||||
|
||||
#endif /* XMD_H */
|
||||
123
X11/Xmu/Atoms.h
123
X11/Xmu/Atoms.h
|
|
@ -1,123 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_ATOMS_H_
|
||||
#define _XMU_ATOMS_H_
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
typedef struct _AtomRec *AtomPtr;
|
||||
|
||||
extern AtomPtr
|
||||
_XA_ATOM_PAIR,
|
||||
_XA_CHARACTER_POSITION,
|
||||
_XA_CLASS,
|
||||
_XA_CLIENT_WINDOW,
|
||||
_XA_CLIPBOARD,
|
||||
_XA_COMPOUND_TEXT,
|
||||
_XA_DECNET_ADDRESS,
|
||||
_XA_DELETE,
|
||||
_XA_FILENAME,
|
||||
_XA_HOSTNAME,
|
||||
_XA_IP_ADDRESS,
|
||||
_XA_LENGTH,
|
||||
_XA_LIST_LENGTH,
|
||||
_XA_NAME,
|
||||
_XA_NET_ADDRESS,
|
||||
_XA_NULL,
|
||||
_XA_OWNER_OS,
|
||||
_XA_SPAN,
|
||||
_XA_TARGETS,
|
||||
_XA_TEXT,
|
||||
_XA_TIMESTAMP,
|
||||
_XA_USER,
|
||||
_XA_UTF8_STRING;
|
||||
|
||||
#define XA_ATOM_PAIR(d) XmuInternAtom(d, _XA_ATOM_PAIR)
|
||||
#define XA_CHARACTER_POSITION(d) XmuInternAtom(d, _XA_CHARACTER_POSITION)
|
||||
#define XA_CLASS(d) XmuInternAtom(d, _XA_CLASS)
|
||||
#define XA_CLIENT_WINDOW(d) XmuInternAtom(d, _XA_CLIENT_WINDOW)
|
||||
#define XA_CLIPBOARD(d) XmuInternAtom(d, _XA_CLIPBOARD)
|
||||
#define XA_COMPOUND_TEXT(d) XmuInternAtom(d, _XA_COMPOUND_TEXT)
|
||||
#define XA_DECNET_ADDRESS(d) XmuInternAtom(d, _XA_DECNET_ADDRESS)
|
||||
#define XA_DELETE(d) XmuInternAtom(d, _XA_DELETE)
|
||||
#define XA_FILENAME(d) XmuInternAtom(d, _XA_FILENAME)
|
||||
#define XA_HOSTNAME(d) XmuInternAtom(d, _XA_HOSTNAME)
|
||||
#define XA_IP_ADDRESS(d) XmuInternAtom(d, _XA_IP_ADDRESS)
|
||||
#define XA_LENGTH(d) XmuInternAtom(d, _XA_LENGTH)
|
||||
#define XA_LIST_LENGTH(d) XmuInternAtom(d, _XA_LIST_LENGTH)
|
||||
#define XA_NAME(d) XmuInternAtom(d, _XA_NAME)
|
||||
#define XA_NET_ADDRESS(d) XmuInternAtom(d, _XA_NET_ADDRESS)
|
||||
#define XA_NULL(d) XmuInternAtom(d, _XA_NULL)
|
||||
#define XA_OWNER_OS(d) XmuInternAtom(d, _XA_OWNER_OS)
|
||||
#define XA_SPAN(d) XmuInternAtom(d, _XA_SPAN)
|
||||
#define XA_TARGETS(d) XmuInternAtom(d, _XA_TARGETS)
|
||||
#define XA_TEXT(d) XmuInternAtom(d, _XA_TEXT)
|
||||
#define XA_TIMESTAMP(d) XmuInternAtom(d, _XA_TIMESTAMP)
|
||||
#define XA_USER(d) XmuInternAtom(d, _XA_USER)
|
||||
#define XA_UTF8_STRING(d) XmuInternAtom(d, _XA_UTF8_STRING)
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
char *XmuGetAtomName
|
||||
(
|
||||
Display *dpy,
|
||||
Atom atom
|
||||
);
|
||||
|
||||
Atom XmuInternAtom
|
||||
(
|
||||
Display *dpy,
|
||||
AtomPtr atom_ptr
|
||||
);
|
||||
|
||||
void XmuInternStrings
|
||||
(
|
||||
Display *dpy,
|
||||
String *names,
|
||||
Cardinal count,
|
||||
Atom *atoms_return
|
||||
);
|
||||
|
||||
AtomPtr XmuMakeAtom
|
||||
(
|
||||
_Xconst char *name
|
||||
);
|
||||
|
||||
char *XmuNameOfAtom
|
||||
(
|
||||
AtomPtr atom_ptr
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_ATOMS_H_ */
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_CHARSET_H_
|
||||
#define _XMU_CHARSET_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
void XmuCopyISOLatin1Lowered
|
||||
(
|
||||
char *dst_return,
|
||||
_Xconst char *src
|
||||
);
|
||||
|
||||
void XmuCopyISOLatin1Uppered
|
||||
(
|
||||
char *dst_return,
|
||||
_Xconst char *src
|
||||
);
|
||||
|
||||
int XmuCompareISOLatin1
|
||||
(
|
||||
_Xconst char *first,
|
||||
_Xconst char *second
|
||||
);
|
||||
|
||||
void XmuNCopyISOLatin1Lowered
|
||||
(
|
||||
char *dst_return,
|
||||
_Xconst char *src,
|
||||
int size
|
||||
);
|
||||
|
||||
void XmuNCopyISOLatin1Uppered
|
||||
(
|
||||
char *dst_return,
|
||||
_Xconst char *src,
|
||||
int size
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_CHARSET_H_ */
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_CLOSEHOOK_H_
|
||||
#define _XMU_CLOSEHOOK_H_
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xlibint.h>
|
||||
|
||||
typedef XPointer CloseHook;
|
||||
|
||||
typedef int (*XmuCloseHookProc)(Display *dpy, XPointer data);
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
CloseHook XmuAddCloseDisplayHook
|
||||
(
|
||||
Display *dpy,
|
||||
XmuCloseHookProc proc,
|
||||
XPointer arg
|
||||
);
|
||||
|
||||
Bool XmuLookupCloseDisplayHook
|
||||
(
|
||||
Display *dpy,
|
||||
CloseHook handle,
|
||||
XmuCloseHookProc proc,
|
||||
XPointer arg
|
||||
);
|
||||
|
||||
Bool XmuRemoveCloseDisplayHook
|
||||
(
|
||||
Display *dpy,
|
||||
CloseHook handle,
|
||||
XmuCloseHookProc proc,
|
||||
XPointer arg
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_CLOSEHOOK_H_ */
|
||||
|
|
@ -1,277 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_STRCONVERT_H_
|
||||
#define _XMU_STRCONVERT_H_
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
void XmuCvtFunctionToCallback
|
||||
(
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal
|
||||
);
|
||||
|
||||
#define XtNbackingStore "backingStore"
|
||||
#define XtCBackingStore "BackingStore"
|
||||
#define XtRBackingStore "BackingStore"
|
||||
#define XtEnotUseful "notUseful"
|
||||
#define XtEwhenMapped "whenMapped"
|
||||
#define XtEalways "always"
|
||||
#define XtEdefault "default"
|
||||
void XmuCvtStringToBackingStore
|
||||
(
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal
|
||||
);
|
||||
|
||||
Boolean XmuCvtBackingStoreToString
|
||||
(
|
||||
Display *dpy,
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal,
|
||||
XtPointer *converter_data
|
||||
);
|
||||
|
||||
void XmuCvtStringToCursor
|
||||
(
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal
|
||||
);
|
||||
|
||||
#define XtRColorCursor "ColorCursor"
|
||||
#define XtNpointerColor "pointerColor"
|
||||
#define XtNpointerColorBackground "pointerColorBackground"
|
||||
Boolean XmuCvtStringToColorCursor
|
||||
(
|
||||
Display *dpy,
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal,
|
||||
XtPointer *converter_data
|
||||
);
|
||||
|
||||
typedef int XtGravity;
|
||||
|
||||
#ifndef XtRGravity
|
||||
#define XtRGravity "Gravity"
|
||||
#endif
|
||||
#define XtEForget "forget"
|
||||
#define XtENorthWest "northwest"
|
||||
#define XtENorth "north"
|
||||
#define XtENorthEast "northeast"
|
||||
#define XtEWest "west"
|
||||
#define XtECenter "center"
|
||||
#define XtEEast "east"
|
||||
#define XtESouthWest "southwest"
|
||||
#define XtESouth "south"
|
||||
#define XtESouthEast "southeast"
|
||||
#define XtEStatic "static"
|
||||
#define XtEUnmap "unmap"
|
||||
void XmuCvtStringToGravity
|
||||
(
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal
|
||||
);
|
||||
|
||||
Boolean XmuCvtGravityToString
|
||||
(
|
||||
Display *dpy,
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal,
|
||||
XtPointer *converter_data
|
||||
);
|
||||
|
||||
typedef enum {
|
||||
XtJustifyLeft, /* justify text to left side of button */
|
||||
XtJustifyCenter, /* justify text in center of button */
|
||||
XtJustifyRight /* justify text to right side of button */
|
||||
} XtJustify;
|
||||
#ifndef XtRJustify
|
||||
#define XtRJustify "Justify"
|
||||
#endif
|
||||
#define XtEleft "left"
|
||||
#define XtEcenter "center"
|
||||
#define XtEright "right"
|
||||
#define XtEtop "top"
|
||||
#define XtEbottom "bottom"
|
||||
void XmuCvtStringToJustify
|
||||
(
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal
|
||||
);
|
||||
|
||||
Boolean XmuCvtJustifyToString
|
||||
(
|
||||
Display *dpy,
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal,
|
||||
XtPointer *converter_data
|
||||
);
|
||||
|
||||
#define XtRLong "Long"
|
||||
void XmuCvtStringToLong
|
||||
(
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal
|
||||
);
|
||||
Boolean XmuCvtLongToString
|
||||
(
|
||||
Display *dpy,
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal,
|
||||
XtPointer *converter_data
|
||||
);
|
||||
|
||||
typedef enum {
|
||||
XtorientHorizontal,
|
||||
XtorientVertical
|
||||
} XtOrientation;
|
||||
void XmuCvtStringToOrientation
|
||||
(
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal
|
||||
);
|
||||
|
||||
Boolean XmuCvtOrientationToString
|
||||
(
|
||||
Display *dpy,
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal,
|
||||
XtPointer *converter_data
|
||||
);
|
||||
|
||||
void XmuCvtStringToBitmap
|
||||
(
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal
|
||||
);
|
||||
|
||||
#define XtRShapeStyle "ShapeStyle"
|
||||
#define XtERectangle "Rectangle"
|
||||
#define XtEOval "Oval"
|
||||
#define XtEEllipse "Ellipse"
|
||||
#define XtERoundedRectangle "RoundedRectangle"
|
||||
|
||||
#define XmuShapeRectangle 1
|
||||
#define XmuShapeOval 2
|
||||
#define XmuShapeEllipse 3
|
||||
#define XmuShapeRoundedRectangle 4
|
||||
|
||||
Boolean XmuCvtStringToShapeStyle
|
||||
(
|
||||
Display *dpy,
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal,
|
||||
XtPointer *converter_data
|
||||
);
|
||||
|
||||
Boolean XmuCvtShapeStyleToString
|
||||
(
|
||||
Display *dpy,
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal,
|
||||
XtPointer *converter_data
|
||||
);
|
||||
|
||||
Boolean XmuReshapeWidget
|
||||
(
|
||||
Widget w,
|
||||
int shape_style,
|
||||
int corner_width,
|
||||
int corner_height
|
||||
);
|
||||
|
||||
void XmuCvtStringToWidget
|
||||
(
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValuePtr fromVal,
|
||||
XrmValuePtr toVal
|
||||
);
|
||||
|
||||
Boolean XmuNewCvtStringToWidget
|
||||
(
|
||||
Display *display,
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValue *fromVal,
|
||||
XrmValue *toVal,
|
||||
XtPointer *converter_data
|
||||
);
|
||||
|
||||
Boolean XmuCvtWidgetToString
|
||||
(
|
||||
Display *dpy,
|
||||
XrmValue *args,
|
||||
Cardinal *num_args,
|
||||
XrmValue *fromVal,
|
||||
XrmValue *toVal,
|
||||
XtPointer *converter_data
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_STRCONVERT_H_ */
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_CURUTIL_H_
|
||||
#define _XMU_CURUTIL_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
int XmuCursorNameToIndex
|
||||
(
|
||||
_Xconst char *name
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_CURUTIL_H_ */
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* Public Interfaces
|
||||
*
|
||||
* XmuCvtCache *XmuCvtCacheLookupDisplay (dpy)
|
||||
* Display *dpy;
|
||||
*/
|
||||
|
||||
#ifndef _XMU_CVTCACHE_H_
|
||||
#define _XMU_CVTCACHE_H_
|
||||
|
||||
#include <X11/Xmu/DisplayQue.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
typedef struct _XmuCvtCache {
|
||||
struct {
|
||||
char **bitmapFilePath;
|
||||
} string_to_bitmap;
|
||||
/* add other per-display data that needs to be cached */
|
||||
} XmuCvtCache;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
XmuCvtCache *_XmuCCLookupDisplay
|
||||
(
|
||||
Display *dpy
|
||||
);
|
||||
|
||||
extern void _XmuStringToBitmapInitCache(XmuCvtCache *c);
|
||||
extern void _XmuStringToBitmapFreeCache(XmuCvtCache *c);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_CVTCACHE_H_ */
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
/*
|
||||
|
||||
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 _XMU_DISPLAYQUE_H_
|
||||
#define _XMU_DISPLAYQUE_H_
|
||||
|
||||
#include <X11/Xmu/CloseHook.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
/*
|
||||
* Public Entry Points
|
||||
*
|
||||
*
|
||||
* XmuDisplayQueue *XmuDQCreate (closefunc, freefunc, data)
|
||||
* XmuCloseDisplayQueueProc closefunc;
|
||||
* XmuFreeDisplayQueueProc freefunc;
|
||||
* XPointer data;
|
||||
*
|
||||
* Creates and returns a queue into which displays may be placed. When
|
||||
* the display is closed, the closefunc (if non-NULL) is upcalled with
|
||||
* as follows:
|
||||
*
|
||||
* (*closefunc) (queue, entry)
|
||||
*
|
||||
* The freeproc, if non-NULL, is called whenever the last display is
|
||||
* closed, notifying the creator that display queue may be released
|
||||
* using XmuDQDestroy.
|
||||
*
|
||||
*
|
||||
* Bool XmuDQDestroy (q, docallbacks)
|
||||
* XmuDisplayQueue *q;
|
||||
* Bool docallbacks;
|
||||
*
|
||||
* Releases all memory for the indicated display queue. If docallbacks
|
||||
* is true, then the closefunc (if non-NULL) is called for each
|
||||
* display.
|
||||
*
|
||||
*
|
||||
* XmuDisplayQueueEntry *XmuDQLookupDisplay (q, dpy)
|
||||
* XmuDisplayQueue *q;
|
||||
* Display *dpy;
|
||||
*
|
||||
* Returns the queue entry for the specified display or NULL if the
|
||||
* display is not in the queue.
|
||||
*
|
||||
*
|
||||
* XmuDisplayQueueEntry *XmuDQAddDisplay (q, dpy, data)
|
||||
* XmuDisplayQueue *q;
|
||||
* Display *dpy;
|
||||
* XPointer data;
|
||||
*
|
||||
* Adds the indicated display to the end of the queue or NULL if it
|
||||
* is unable to allocate memory. The data field may be used by the
|
||||
* caller to attach arbitrary data to this display in this queue. The
|
||||
* caller should use XmuDQLookupDisplay to make sure that the display
|
||||
* hasn't already been added.
|
||||
*
|
||||
*
|
||||
* Bool XmuDQRemoveDisplay (q, dpy)
|
||||
* XmuDisplayQueue *q;
|
||||
* Display *dpy;
|
||||
*
|
||||
* Removes the specified display from the given queue. If the
|
||||
* indicated display is not found on this queue, False is returned,
|
||||
* otherwise True is returned.
|
||||
*/
|
||||
|
||||
typedef struct _XmuDisplayQueue XmuDisplayQueue;
|
||||
typedef struct _XmuDisplayQueueEntry XmuDisplayQueueEntry;
|
||||
|
||||
typedef int (*XmuCloseDisplayQueueProc)(XmuDisplayQueue *queue,
|
||||
XmuDisplayQueueEntry *entry);
|
||||
|
||||
typedef int (*XmuFreeDisplayQueueProc)(XmuDisplayQueue *queue);
|
||||
|
||||
struct _XmuDisplayQueueEntry {
|
||||
struct _XmuDisplayQueueEntry *prev, *next;
|
||||
Display *display;
|
||||
CloseHook closehook;
|
||||
XPointer data;
|
||||
};
|
||||
|
||||
struct _XmuDisplayQueue {
|
||||
int nentries;
|
||||
XmuDisplayQueueEntry *head, *tail;
|
||||
XmuCloseDisplayQueueProc closefunc;
|
||||
XmuFreeDisplayQueueProc freefunc;
|
||||
XPointer data;
|
||||
};
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
XmuDisplayQueue *XmuDQCreate
|
||||
(
|
||||
XmuCloseDisplayQueueProc closefunc,
|
||||
XmuFreeDisplayQueueProc freefunc,
|
||||
XPointer data
|
||||
);
|
||||
|
||||
Bool XmuDQDestroy
|
||||
(
|
||||
XmuDisplayQueue *q,
|
||||
Bool docallbacks
|
||||
);
|
||||
|
||||
XmuDisplayQueueEntry *XmuDQLookupDisplay
|
||||
(
|
||||
XmuDisplayQueue *q,
|
||||
Display *dpy
|
||||
);
|
||||
|
||||
XmuDisplayQueueEntry *XmuDQAddDisplay
|
||||
(
|
||||
XmuDisplayQueue *q,
|
||||
Display *dpy,
|
||||
XPointer data
|
||||
);
|
||||
|
||||
Bool XmuDQRemoveDisplay
|
||||
(
|
||||
XmuDisplayQueue *q,
|
||||
Display *dpy
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#define XmuDQNDisplays(q) ((q)->nentries)
|
||||
|
||||
#endif /* _XMU_DISPLAYQUE_H_ */
|
||||
|
|
@ -1,158 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_DRAWING_H_
|
||||
#define _XMU_DRAWING_H_
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#if ! defined(_XtIntrinsic_h) && ! defined(PIXEL_ALREADY_TYPEDEFED)
|
||||
typedef unsigned long Pixel;
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
void XmuDrawRoundedRectangle
|
||||
(
|
||||
Display *dpy,
|
||||
Drawable draw,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
int h,
|
||||
int ew,
|
||||
int eh
|
||||
);
|
||||
|
||||
void XmuFillRoundedRectangle
|
||||
(
|
||||
Display *dpy,
|
||||
Drawable draw,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
int h,
|
||||
int ew,
|
||||
int eh
|
||||
);
|
||||
|
||||
void XmuDrawLogo
|
||||
(
|
||||
Display *dpy,
|
||||
Drawable drawable,
|
||||
GC gcFore,
|
||||
GC gcBack,
|
||||
int x,
|
||||
int y,
|
||||
unsigned int width,
|
||||
unsigned int height
|
||||
);
|
||||
|
||||
Pixmap XmuCreatePixmapFromBitmap
|
||||
(
|
||||
Display *dpy,
|
||||
Drawable d,
|
||||
Pixmap bitmap,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
unsigned int depth,
|
||||
unsigned long fore,
|
||||
unsigned long back
|
||||
);
|
||||
|
||||
Pixmap XmuCreateStippledPixmap
|
||||
(
|
||||
Screen *screen,
|
||||
Pixel fore,
|
||||
Pixel back,
|
||||
unsigned int depth
|
||||
);
|
||||
|
||||
void XmuReleaseStippledPixmap
|
||||
(
|
||||
Screen *screen,
|
||||
Pixmap pixmap
|
||||
);
|
||||
|
||||
Pixmap XmuLocateBitmapFile
|
||||
(
|
||||
Screen *screen,
|
||||
_Xconst char *name,
|
||||
char *srcname_return,
|
||||
int srcnamelen,
|
||||
int *width_return,
|
||||
int *height_return,
|
||||
int *xhot_return,
|
||||
int *yhot_return
|
||||
);
|
||||
|
||||
Pixmap XmuLocatePixmapFile
|
||||
(
|
||||
Screen *screen,
|
||||
_Xconst char *name,
|
||||
unsigned long fore,
|
||||
unsigned long back,
|
||||
unsigned int depth,
|
||||
char *srcname_return,
|
||||
int srcnamelen,
|
||||
int *width_return,
|
||||
int *height_return,
|
||||
int *xhot_return,
|
||||
int *yhot_return
|
||||
);
|
||||
|
||||
int XmuReadBitmapData
|
||||
(
|
||||
FILE *fstream,
|
||||
unsigned int *width_return,
|
||||
unsigned int *height_return,
|
||||
unsigned char **datap_return,
|
||||
int *xhot_return,
|
||||
int *yhot_return
|
||||
);
|
||||
|
||||
int XmuReadBitmapDataFromFile
|
||||
(
|
||||
_Xconst char *filename,
|
||||
unsigned int *width_return,
|
||||
unsigned int *height_return,
|
||||
unsigned char **datap_return,
|
||||
int *xhot_return,
|
||||
int *yhot_return
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_DRAWING_H_ */
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 1991, 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.
|
||||
|
||||
*/
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
void _XEditResCheckMessages
|
||||
(
|
||||
Widget w,
|
||||
XtPointer data,
|
||||
XEvent *event,
|
||||
Boolean *cont
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
|
@ -1,406 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chris D. Peterson, MIT X Consortium
|
||||
*/
|
||||
|
||||
/************************************************************
|
||||
|
||||
The Editres Protocol
|
||||
|
||||
|
||||
The Client message sent to the application is:
|
||||
|
||||
ATOM = "ResEditor" --- RES_EDITOR_NAME
|
||||
|
||||
FORMAT = 32 --- RES_EDIT_SEND_EVENT_FORMAT
|
||||
|
||||
l[0] = timestamp
|
||||
l[1] = command atom name
|
||||
l[2] = ident of command
|
||||
l[3] = protocol version number to use
|
||||
|
||||
|
||||
|
||||
The binary protocol has the following format:
|
||||
|
||||
Card8: 8-bit unsingned integer
|
||||
Card16: 16-bit unsingned integer
|
||||
Card32: 32-bit unsingned integer
|
||||
Int16: 16-bit signed integer
|
||||
Window: 32-bit value
|
||||
Widget: 32-bit value
|
||||
String8: ListOfCard8
|
||||
|
||||
[a][b][c] represent an exclusive list of choices.
|
||||
|
||||
All widgets are passed as a list of widgets, containing the
|
||||
full instance heirarch of this widget. The hierarchy is ordered
|
||||
from parent to child. Thus the first element of each list is
|
||||
the root of the widget tree (this makes verifying that the widget
|
||||
still exists, MUCH faster).
|
||||
|
||||
ListOfFoo comprises a list of things in the following format:
|
||||
|
||||
number: Card16
|
||||
<number> things: ????
|
||||
|
||||
This is a synchronous protocol, every request MUST be followed by a
|
||||
reply.
|
||||
|
||||
Request:
|
||||
|
||||
Serial Number: Card8
|
||||
Op Code: Card8 - { SendWidgetTree = 0,
|
||||
SetValues = 1,
|
||||
GetResources = 2,
|
||||
GetGeometry = 3,
|
||||
FindChild = 4,
|
||||
GetValues = 5 }
|
||||
Length: Card32
|
||||
Data:
|
||||
|
||||
Reply:
|
||||
|
||||
Serial Number: Card8
|
||||
Type: Card8 - { Formatted = 0,
|
||||
Unformatted = 1,
|
||||
ProtocolMismatch = 2
|
||||
}
|
||||
Length: Card32
|
||||
|
||||
|
||||
Byte Order:
|
||||
|
||||
All Fields are MSB -> LSB
|
||||
|
||||
Data:
|
||||
|
||||
Formatted:
|
||||
|
||||
The data contains the reply information for the request as
|
||||
specified below if the reply type is "Formatted". The return
|
||||
values for the other reply types are shown below.
|
||||
|
||||
Unformatted:
|
||||
|
||||
Message: String8
|
||||
|
||||
ProtocolMismatch:
|
||||
|
||||
RequestedVersion: Card8
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
SendWidgetTree:
|
||||
|
||||
--->
|
||||
|
||||
Number of Entries: Card16
|
||||
Entry:
|
||||
widget: ListOfWidgets
|
||||
name: String8
|
||||
class: String8
|
||||
window: Card32
|
||||
toolkit: String8
|
||||
|
||||
Send Widget Tree returns the toolkit type, and a fuly specified list
|
||||
of widgets for each widget in the tree. This is enough information
|
||||
to completely reconstruct the entire widget heirarchy.
|
||||
|
||||
The window return value contains the Xid of the window currently
|
||||
used by this widget. If the widget is unrealized then 0 is returned,
|
||||
and if widget is a non-windowed object a value of 2 is returned.
|
||||
|
||||
SetValues:
|
||||
|
||||
name: String8
|
||||
type: String8
|
||||
value: String8
|
||||
Number of Entries: Card16
|
||||
Entry:
|
||||
widget: ListOfWidgets
|
||||
|
||||
--->
|
||||
|
||||
Number of Entries: Card16
|
||||
Entry:
|
||||
widget: ListOfWidgets
|
||||
message: String8
|
||||
|
||||
SetValues will allow the same resource to be set on a number of
|
||||
widgets. This function will return an error message if the SetValues
|
||||
request caused an Xt error.
|
||||
|
||||
GetValues:
|
||||
|
||||
names: ListOfString8
|
||||
widget: Widget
|
||||
|
||||
--->
|
||||
novalues: ListOfCard16
|
||||
values: ListOfString8
|
||||
|
||||
GetValues will allow a number of resource values to be read
|
||||
on a particular widget. The request specifies the names of
|
||||
the resources wanted and the widget id these resources are
|
||||
from. The reply returns a list of indices from the requests
|
||||
name list of resources for which a value can not be returned.
|
||||
It also returns a list of returned values, in the order of the
|
||||
requests names list, skipping those indices present in novalues.
|
||||
|
||||
GetResources:
|
||||
|
||||
Number of Entries: Card16
|
||||
Entry
|
||||
widget: ListOfWidgets:
|
||||
|
||||
---->
|
||||
|
||||
Number of Entries: Card16
|
||||
Entry
|
||||
Widget: ListOfWidgets:
|
||||
Error: Bool
|
||||
|
||||
[ Message: String 8 ]
|
||||
[ Number of Resources: Card16
|
||||
Resource:
|
||||
Kind: {normal, constraint}
|
||||
Name: String8
|
||||
Class: String8
|
||||
Type: String8 ]
|
||||
|
||||
GetResource retrieves the kind, name, class and type for every
|
||||
widget passed to it. If an error occured with the resource fetch
|
||||
Error will be set to True for the given widget and a message
|
||||
is returned rather than the resource info.
|
||||
|
||||
GetGeometry:
|
||||
|
||||
Number of Entries: Card16
|
||||
Entry
|
||||
Widget: ListOfWidgets:
|
||||
|
||||
---->
|
||||
|
||||
Number of Entries: Card16
|
||||
Entry
|
||||
Widget: ListOfWidgets:
|
||||
Error: Bool
|
||||
|
||||
[ message: String 8 ]
|
||||
[ mapped: Boolean
|
||||
X: Int16
|
||||
Y: Int16
|
||||
Width: Card16
|
||||
Height: Card16
|
||||
BorderWidth: Card16 ]
|
||||
|
||||
GetGeometry retreives the mapping state, x, y, width, height
|
||||
and border width for each widget specified. If an error occured
|
||||
with the geometry fetch "Error" will be set to True for the given
|
||||
widget and a message is returned rather than the geometry info.
|
||||
X an Y corrospond to the root coordinates of the upper left corner
|
||||
of the widget (outside the window border).
|
||||
|
||||
FindChild:
|
||||
|
||||
Widget: ListOfWidgets
|
||||
X: Int16
|
||||
Y: Int16
|
||||
|
||||
--->
|
||||
|
||||
Widget: ListOfWidgets
|
||||
|
||||
Find Child returns a descendent of the widget specified that
|
||||
is at the root coordinates specified.
|
||||
|
||||
NOTE:
|
||||
|
||||
The returned widget is undefined if the point is contained in
|
||||
two or more mapped widgets, or in two overlapping Rect objs.
|
||||
|
||||
GetValues:
|
||||
|
||||
names: ListOfString8
|
||||
widget: Widget
|
||||
|
||||
--->
|
||||
|
||||
values: ListOfString8
|
||||
|
||||
GetValues will allow a number of resource values to be read
|
||||
on a particular widget. Currently only InterViews 3.0.1 Styles
|
||||
and their attributes are supported. In addition, the current
|
||||
user interface only supports the return of 1 resource. The ability
|
||||
to specify and return multiple resources is defined for future editres
|
||||
interfaces where some or all of a widgets resource values are returned
|
||||
and displayed at once.
|
||||
|
||||
|
||||
************************************************************/
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
#define XER_NBBY 8 /* number of bits in a byte */
|
||||
#define BYTE_MASK 255
|
||||
|
||||
#define HEADER_SIZE 6
|
||||
|
||||
#define EDITRES_IS_OBJECT 2
|
||||
#define EDITRES_IS_UNREALIZED 0
|
||||
|
||||
/*
|
||||
* Format for atoms
|
||||
*/
|
||||
#define EDITRES_FORMAT 8
|
||||
#define EDITRES_SEND_EVENT_FORMAT 32
|
||||
|
||||
/*
|
||||
* Atoms
|
||||
*/
|
||||
#define EDITRES_NAME "Editres"
|
||||
#define EDITRES_COMMAND_ATOM "EditresCommand"
|
||||
#define EDITRES_COMM_ATOM "EditresComm"
|
||||
#define EDITRES_CLIENT_VALUE "EditresClientVal"
|
||||
#define EDITRES_PROTOCOL_ATOM "EditresProtocol"
|
||||
|
||||
typedef enum {
|
||||
SendWidgetTree = 0,
|
||||
SetValues = 1,
|
||||
GetResources = 2,
|
||||
GetGeometry = 3,
|
||||
FindChild = 4,
|
||||
GetValues = 5
|
||||
} EditresCommand;
|
||||
|
||||
typedef enum {
|
||||
NormalResource = 0,
|
||||
ConstraintResource = 1
|
||||
} ResourceType;
|
||||
|
||||
/*
|
||||
* The type of a resource identifier
|
||||
*/
|
||||
typedef unsigned char ResIdent;
|
||||
|
||||
typedef enum {
|
||||
PartialSuccess = 0,
|
||||
Failure = 1,
|
||||
ProtocolMismatch = 2
|
||||
} EditResError;
|
||||
|
||||
typedef struct _WidgetInfo {
|
||||
unsigned short num_widgets;
|
||||
unsigned long *ids;
|
||||
Widget real_widget;
|
||||
} WidgetInfo;
|
||||
|
||||
typedef struct _ProtocolStream {
|
||||
unsigned long size, alloc;
|
||||
unsigned char *real_top, *top, *current;
|
||||
} ProtocolStream;
|
||||
|
||||
/************************************************************
|
||||
* Function definitions for reading and writing protocol requests
|
||||
************************************************************/
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
void _XEditResPutString8
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
_Xconst char *str
|
||||
);
|
||||
|
||||
void _XEditResPut8
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
unsigned int value
|
||||
);
|
||||
|
||||
void _XEditResPut16
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
unsigned int value
|
||||
);
|
||||
|
||||
void _XEditResPut32
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
unsigned long value
|
||||
);
|
||||
|
||||
void _XEditResPutWidgetInfo
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
WidgetInfo *info
|
||||
);
|
||||
|
||||
void _XEditResResetStream
|
||||
(
|
||||
ProtocolStream *stream
|
||||
);
|
||||
|
||||
Bool _XEditResGet8
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
unsigned char *value
|
||||
);
|
||||
|
||||
Bool _XEditResGet16
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
unsigned short *value
|
||||
);
|
||||
|
||||
Bool _XEditResGetSigned16
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
short *value
|
||||
);
|
||||
|
||||
Bool _XEditResGet32
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
unsigned long *value
|
||||
);
|
||||
|
||||
Bool _XEditResGetString8
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
char **str
|
||||
);
|
||||
|
||||
Bool _XEditResGetWidgetInfo
|
||||
(
|
||||
ProtocolStream *stream,
|
||||
WidgetInfo *info
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_ERROR_H_
|
||||
#define _XMU_ERROR_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
int XmuPrintDefaultErrorMessage
|
||||
(
|
||||
Display *dpy,
|
||||
XErrorEvent *event,
|
||||
FILE *fp
|
||||
);
|
||||
|
||||
int XmuSimpleErrorHandler
|
||||
(
|
||||
Display *dpy,
|
||||
XErrorEvent *errorp
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_ERROR_H_ */
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern void XmuRegisterExternalAgent
|
||||
(
|
||||
Widget w,
|
||||
XtPointer data,
|
||||
XEvent *event,
|
||||
Boolean *cont
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_INITER_H_
|
||||
#define _XMU_INITER_H_
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
typedef void (*XmuInitializerProc)(XtAppContext app_context, XPointer data);
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
void XmuCallInitializers
|
||||
(
|
||||
XtAppContext app_context
|
||||
);
|
||||
|
||||
void XmuAddInitializer
|
||||
(
|
||||
XmuInitializerProc func,
|
||||
XPointer data
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_INITER_H_ */
|
||||
124
X11/Xmu/Lookup.h
124
X11/Xmu/Lookup.h
|
|
@ -1,124 +0,0 @@
|
|||
/************************************************************
|
||||
|
||||
Copyright 1999 by Thomas E. Dickey <dickey@clark.net>
|
||||
|
||||
All Rights Reserved
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright
|
||||
holders shall not be used in advertising or otherwise to promote the
|
||||
sale, use or other dealings in this Software without prior written
|
||||
authorization.
|
||||
|
||||
********************************************************/
|
||||
|
||||
#ifndef included_xmu_lookup_h
|
||||
#define included_xmu_lookup_h 1
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
extern int XmuLookupString(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status,
|
||||
unsigned long keysymSet);
|
||||
|
||||
extern int XmuLookupLatin1(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
extern int XmuLookupLatin2(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
extern int XmuLookupLatin3(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
extern int XmuLookupLatin4(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
extern int XmuLookupKana(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
extern int XmuLookupJISX0201(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
extern int XmuLookupArabic(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
extern int XmuLookupCyrillic(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
extern int XmuLookupGreek(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
extern int XmuLookupAPL(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
extern int XmuLookupHebrew(
|
||||
XKeyEvent *event,
|
||||
unsigned char *buffer,
|
||||
int nbytes,
|
||||
KeySym *keysym,
|
||||
XComposeStatus *status);
|
||||
|
||||
#endif /* included_xmu_lookup_h */
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
|
||||
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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
/* Various useful constant and macro definitions */
|
||||
|
||||
#ifndef _Xmu_Misc_h
|
||||
#define _Xmu_Misc_h
|
||||
|
||||
#define MAXDIMENSION ((1 << 31)-1)
|
||||
|
||||
#define Max(x, y) (((x) > (y)) ? (x) : (y))
|
||||
#define Min(x, y) (((x) < (y)) ? (x) : (y))
|
||||
#define AssignMax(x, y) {if ((y) > (x)) x = (y);}
|
||||
#define AssignMin(x, y) {if ((y) < (x)) x = (y);}
|
||||
|
||||
#endif /*_Xmu_Misc_h*/
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_STDCMAP_H_
|
||||
#define _XMU_STDCMAP_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Status XmuAllStandardColormaps
|
||||
(
|
||||
Display *dpy
|
||||
);
|
||||
|
||||
Status XmuCreateColormap
|
||||
(
|
||||
Display *dpy,
|
||||
XStandardColormap *colormap
|
||||
);
|
||||
|
||||
void XmuDeleteStandardColormap
|
||||
(
|
||||
Display *dpy,
|
||||
int screen,
|
||||
Atom property
|
||||
);
|
||||
|
||||
Status XmuGetColormapAllocation
|
||||
(
|
||||
XVisualInfo *vinfo,
|
||||
Atom property,
|
||||
unsigned long *red_max_return,
|
||||
unsigned long *green_max_return,
|
||||
unsigned long *blue_max_return
|
||||
);
|
||||
|
||||
Status XmuLookupStandardColormap
|
||||
(
|
||||
Display *dpy,
|
||||
int screen,
|
||||
VisualID visualid,
|
||||
unsigned int depth,
|
||||
Atom property,
|
||||
Bool replace,
|
||||
Bool retain
|
||||
);
|
||||
|
||||
XStandardColormap *XmuStandardColormap
|
||||
(
|
||||
Display *dpy,
|
||||
int screen,
|
||||
VisualID visualid,
|
||||
unsigned int depth,
|
||||
Atom property,
|
||||
Colormap cmap,
|
||||
unsigned long red_max,
|
||||
unsigned long green_max,
|
||||
unsigned long blue_max
|
||||
);
|
||||
|
||||
Status XmuVisualStandardColormaps
|
||||
(
|
||||
Display *dpy,
|
||||
int screen,
|
||||
VisualID visualid,
|
||||
unsigned int depth,
|
||||
Bool replace,
|
||||
Bool retain
|
||||
);
|
||||
|
||||
Bool XmuDistinguishableColors
|
||||
(
|
||||
XColor *colors,
|
||||
int count
|
||||
);
|
||||
|
||||
Bool XmuDistinguishablePixels
|
||||
(
|
||||
Display *dpy,
|
||||
Colormap cmap,
|
||||
unsigned long *pixels,
|
||||
int count
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_STDCMAP_H_ */
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_SELECTION_H_
|
||||
#define _XMU_SELECTION_H_
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Boolean XmuConvertStandardSelection
|
||||
(
|
||||
Widget w,
|
||||
Time timev,
|
||||
Atom *selection,
|
||||
Atom *target,
|
||||
Atom *type_return,
|
||||
XPointer *value_return,
|
||||
unsigned long *length_return,
|
||||
int *format_return
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_SELECTION_H_ */
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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 _SYSUTIL_H_
|
||||
#define _SYSUTIL_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
int XmuGetHostname
|
||||
(
|
||||
char *buf_return,
|
||||
int maxlen
|
||||
);
|
||||
|
||||
#ifndef _XMU_H_
|
||||
int XmuSnprintf
|
||||
(
|
||||
char *str,
|
||||
int size,
|
||||
_Xconst char *fmt,
|
||||
...
|
||||
)
|
||||
_X_ATTRIBUTE_PRINTF(3,4);
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _SYSUTIL_H_ */
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 1991, 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.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* DESCRIPTION
|
||||
* This file contains a series of standard white point values.
|
||||
*/
|
||||
#define CIE_A_u 0.2560
|
||||
#define CIE_A_v 0.5243
|
||||
#define CIE_A_Y 1.0000
|
||||
|
||||
#define CIE_B_u 0.2137
|
||||
#define CIE_B_v 0.4852
|
||||
#define CIE_B_Y 1.0000
|
||||
|
||||
#define CIE_C_u 0.2009
|
||||
#define CIE_C_v 0.4609
|
||||
#define CIE_C_Y 1.0000
|
||||
|
||||
#define CIE_D55_u 0.2044
|
||||
#define CIE_D55_v 0.4808
|
||||
#define CIE_D55_Y 1.0000
|
||||
|
||||
#define CIE_D65_u 0.1978
|
||||
#define CIE_D65_v 0.4684
|
||||
#define CIE_D65_Y 1.0000
|
||||
|
||||
#define CIE_D75_u 0.1935
|
||||
#define CIE_D75_v 0.4586
|
||||
#define CIE_D75_Y 1.0000
|
||||
|
||||
#define ASTM_D50_u 0.2092
|
||||
#define ASTM_D50_v 0.4881
|
||||
#define ASTM_D50_Y 1.0000
|
||||
|
||||
#define WP_9300K_u 0.1884
|
||||
#define WP_9300K_v 0.4463
|
||||
#define WP_9300K_Y 1.0000
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 1990, 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: Jim Fulton, MIT X Consortium
|
||||
*/
|
||||
|
||||
#ifndef _XmuWidgetNode_h
|
||||
#define _XmuWidgetNode_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
/*
|
||||
* This is usually initialized by setting the first two fields and letting
|
||||
* rest be implicitly nulled (by genlist.sh, for example)
|
||||
*/
|
||||
typedef struct _XmuWidgetNode {
|
||||
char *label; /* mixed case name */
|
||||
WidgetClass *widget_class_ptr; /* addr of widget class */
|
||||
struct _XmuWidgetNode *superclass; /* superclass of widget_class */
|
||||
struct _XmuWidgetNode *children, *siblings; /* subclass links */
|
||||
char *lowered_label; /* lowercase version of label */
|
||||
char *lowered_classname; /* lowercase version of class_name */
|
||||
Bool have_resources; /* resources have been fetched */
|
||||
XtResourceList resources; /* extracted resource database */
|
||||
struct _XmuWidgetNode **resourcewn; /* where resources come from */
|
||||
Cardinal nresources; /* number of resources */
|
||||
XtResourceList constraints; /* extracted constraint resources */
|
||||
struct _XmuWidgetNode **constraintwn; /* where constraints come from */
|
||||
Cardinal nconstraints; /* number of constraint resources */
|
||||
XtPointer data; /* extra data */
|
||||
} XmuWidgetNode;
|
||||
|
||||
#define XmuWnClass(wn) ((wn)->widget_class_ptr[0])
|
||||
#define XmuWnClassname(wn) (XmuWnClass(wn)->core_class.class_name)
|
||||
#define XmuWnSuperclass(wn) ((XmuWnClass(wn))->core_class.superclass)
|
||||
|
||||
/* external interfaces */
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
void XmuWnInitializeNodes
|
||||
(
|
||||
XmuWidgetNode *nodearray,
|
||||
int nnodes
|
||||
);
|
||||
|
||||
void XmuWnFetchResources
|
||||
(
|
||||
XmuWidgetNode *node,
|
||||
Widget toplevel,
|
||||
XmuWidgetNode *topnode
|
||||
);
|
||||
|
||||
int XmuWnCountOwnedResources
|
||||
(
|
||||
XmuWidgetNode *node,
|
||||
XmuWidgetNode *ownernode,
|
||||
Bool constraints
|
||||
);
|
||||
|
||||
XmuWidgetNode *XmuWnNameToNode
|
||||
(
|
||||
XmuWidgetNode *nodelist,
|
||||
int nnodes,
|
||||
_Xconst char *name
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XmuWidgetNode_h */
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_WINDOWUTIL_H_
|
||||
#define _XMU_WINDOWUTIL_H_
|
||||
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Window XmuClientWindow
|
||||
(
|
||||
Display *dpy,
|
||||
Window win
|
||||
);
|
||||
|
||||
Bool XmuUpdateMapHints
|
||||
(
|
||||
Display *dpy,
|
||||
Window win,
|
||||
XSizeHints *hints
|
||||
);
|
||||
|
||||
Screen *XmuScreenOfWindow
|
||||
(
|
||||
Display *dpy,
|
||||
Window w
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XMU_WINDOWUTIL_H_ */
|
||||
165
X11/Xmu/Xct.h
165
X11/Xmu/Xct.h
|
|
@ -1,165 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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 _Xct_h
|
||||
#define _Xct_h
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
#define XctVersion 1
|
||||
|
||||
typedef unsigned char *XctString;
|
||||
|
||||
typedef enum {
|
||||
XctUnspecified,
|
||||
XctLeftToRight,
|
||||
XctRightToLeft
|
||||
} XctHDirection;
|
||||
|
||||
typedef unsigned long XctFlags;
|
||||
|
||||
/* These are bits in XctFlags. */
|
||||
|
||||
#define XctSingleSetSegments 0x0001
|
||||
/* This means that returned segments should contain characters from only
|
||||
* one set (C0, C1, GL, GR). When this is requested, XctSegment is never
|
||||
* returned, instead XctC0Segment, XctC1Segment, XctGlSegment, and
|
||||
* XctGRSegment are returned. C0 and C1 segments are always returned as
|
||||
* singleton characters.
|
||||
*/
|
||||
|
||||
#define XctProvideExtensions 0x0002
|
||||
/* This means that if the Compound Text string is from a higher version
|
||||
* than this code is implemented to, then syntactically correct but unknown
|
||||
* control sequences should be returned as XctExtension items. If this
|
||||
* flag is not set, and the Compound Text string version indicates that
|
||||
* extensions cannot be ignored, then each unknown control sequence will be
|
||||
* reported as an XctError.
|
||||
*/
|
||||
|
||||
#define XctAcceptC0Extensions 0x0004
|
||||
/* This means that if the Compound Text string is from a higher version
|
||||
* than this code is implemented to, then unknown C0 characters should be
|
||||
* treated as if they were legal, and returned as C0 characters (regardless
|
||||
* of how XctProvideExtensions is set). If this flag is not set, then all
|
||||
* unknown C0 characters are treated according to XctProvideExtensions.
|
||||
*/
|
||||
|
||||
#define XctAcceptC1Extensions 0x0008
|
||||
/* This means that if the Compound Text string is from a higher version
|
||||
* than this code is implemented to, then unknown C0 characters should be
|
||||
* treated as if they were legal, and returned as C0 characters (regardless
|
||||
* of how XctProvideExtensions is set). If this flag is not set, then all
|
||||
* unknown C0 characters are treated according to XctProvideExtensions.
|
||||
*/
|
||||
|
||||
#define XctHideDirection 0x0010
|
||||
/* This means that horizontal direction changes should be reported as
|
||||
* XctHorizontal items. If this flag is not set, then direction changes are
|
||||
* not returned as items, but the current direction is still maintained and
|
||||
* reported for other items.
|
||||
*/
|
||||
|
||||
#define XctFreeString 0x0020
|
||||
/* This means that XctFree should free the Compound Text string (that was
|
||||
* passed to XctCreate. If this flag is not set, the string is not freed.
|
||||
*/
|
||||
|
||||
#define XctShiftMultiGRToGL 0x0040
|
||||
/* Translate GR segments on-the-fly into GL segments for the GR sets:
|
||||
* GB2312.1980-1, JISX0208.1983-1, and KSC5601.1987-1.
|
||||
*/
|
||||
|
||||
/* This is the return type for XctNextItem. */
|
||||
typedef enum {
|
||||
XctSegment, /* used when XctSingleSetSegments is not requested */
|
||||
XctC0Segment, /* used when XctSingleSetSegments is requested */
|
||||
XctGLSegment, /* used when XctSingleSetSegments is requested */
|
||||
XctC1Segment, /* used when XctSingleSetSegments is requested */
|
||||
XctGRSegment, /* used when XctSingleSetSegments is requested */
|
||||
XctExtendedSegment, /* an extended segment */
|
||||
XctExtension, /* used when XctProvideExtensions is requested */
|
||||
XctHorizontal, /* horizontal direction or depth change */
|
||||
XctEndOfText, /* end of text string */
|
||||
XctError /* syntactic or semantic error */
|
||||
} XctResult;
|
||||
|
||||
typedef struct _XctRec {
|
||||
XctString total_string; /* as given to XctCreate */
|
||||
int total_length; /* as given to XctCreate */
|
||||
XctFlags flags; /* as given to XctCreate */
|
||||
int version; /* indicates the version of the CT spec
|
||||
* the string was produced from */
|
||||
int can_ignore_exts;/* non-zero if ignoring extensions is
|
||||
* acceptable, else zero */
|
||||
XctString item; /* item returned from XctNextItem */
|
||||
unsigned item_length; /* length of item in bytes */
|
||||
int char_size; /* number of bytes per character in
|
||||
* item, with zero meaning variable */
|
||||
char *encoding; /* Encoding name for item */
|
||||
XctHDirection horizontal; /* direction of item */
|
||||
unsigned horz_depth; /* current direction nesting depth */
|
||||
char *GL; /* "{I} F" string for current GL */
|
||||
char *GL_encoding; /* Encoding name for current GL */
|
||||
int GL_set_size; /* 94 or 96 */
|
||||
int GL_char_size; /* number of bytes per GL character */
|
||||
char *GR; /* "{I} F" string for current GR */
|
||||
char *GR_encoding; /* Encoding name for current GR */
|
||||
int GR_set_size; /* 94 or 96 */
|
||||
int GR_char_size; /* number of bytes per GR character */
|
||||
char *GLGR_encoding; /* Encoding name for current GL+GR,
|
||||
* if known */
|
||||
struct _XctPriv *priv; /* private to parser, don't peek */
|
||||
} *XctData;
|
||||
|
||||
/* these are the external routines */
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
XctData XctCreate
|
||||
(
|
||||
_Xconst unsigned char *string,
|
||||
int length,
|
||||
XctFlags flags
|
||||
);
|
||||
|
||||
XctResult XctNextItem
|
||||
(
|
||||
XctData data
|
||||
);
|
||||
|
||||
void XctFree
|
||||
(
|
||||
XctData data
|
||||
);
|
||||
|
||||
void XctReset
|
||||
(
|
||||
XctData data
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _Xct_h */
|
||||
122
X11/Xmu/Xmu.h
122
X11/Xmu/Xmu.h
|
|
@ -1,122 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* The interfaces described by this header file are for miscellaneous utilities
|
||||
* and are not part of the Xlib standard.
|
||||
*/
|
||||
|
||||
#ifndef _XMU_H_
|
||||
#define _XMU_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xmu/Atoms.h> /* _XA_... */
|
||||
#include <X11/Xmu/CharSet.h> /* CopyISOLatin1Lowered */
|
||||
#include <X11/Xmu/Converters.h> /* CvtStringTo... */
|
||||
#include <X11/Xmu/Drawing.h> /* DrawRoundedRect, DrawLogo */
|
||||
#include <X11/Xmu/Error.h> /* PrintDefaultError */
|
||||
#include <X11/Xmu/StdSel.h> /* ConvertStandardSelection */
|
||||
|
||||
/*
|
||||
* clip lists
|
||||
*/
|
||||
typedef struct _XmuSegment {
|
||||
int x1, x2;
|
||||
struct _XmuSegment *next;
|
||||
} XmuSegment;
|
||||
|
||||
typedef struct _XmuScanline {
|
||||
int y;
|
||||
XmuSegment *segment;
|
||||
struct _XmuScanline *next;
|
||||
} XmuScanline;
|
||||
|
||||
typedef struct _XmuArea {
|
||||
XmuScanline *scanline;
|
||||
} XmuArea;
|
||||
|
||||
#define XmuCreateArea() XmuNewArea(0, 0, 0, 0)
|
||||
#define XmuAreaOr(dst, src) XmuAreaOrXor((dst), (src), True)
|
||||
#define XmuAreaXor(dst, src) XmuAreaOrXor((dst), (src), False)
|
||||
|
||||
#define XmuDestroyArea(a) \
|
||||
do { \
|
||||
XmuDestroyScanlineList((a)->scanline); \
|
||||
XtFree((char *)(a)); \
|
||||
} while (0)
|
||||
|
||||
#define FreeArea(a) \
|
||||
do { \
|
||||
XmuDestroyScanlineList((a)->scanline); \
|
||||
a->scanline = (Scanline *)0; \
|
||||
} while (0)
|
||||
|
||||
#define XmuValidSegment(s) ((s)->x1 < (s)->x2)
|
||||
#define XmuSegmentEqu(s1, s2) ((s1)->x1 == (s2)->x1 && (s1)->x2 == (s2)->x2)
|
||||
#define XmuDestroySegment(s) XtFree((char *)(s))
|
||||
|
||||
#define XmuDestroyScanline(s) \
|
||||
do { \
|
||||
XmuDestroySegmentList((s)->segment); \
|
||||
XtFree((char*)(s)); \
|
||||
} while (0)
|
||||
|
||||
XmuArea *XmuNewArea(int, int, int, int);
|
||||
XmuArea *XmuAreaDup(XmuArea*);
|
||||
XmuArea *XmuAreaCopy(XmuArea*, XmuArea*);
|
||||
XmuArea *XmuAreaNot(XmuArea*, int, int, int, int);
|
||||
XmuArea *XmuAreaOrXor(XmuArea*, XmuArea*, Bool);
|
||||
XmuArea *XmuAreaAnd(XmuArea*, XmuArea*);
|
||||
Bool XmuValidArea(XmuArea*);
|
||||
Bool XmuValidScanline(XmuScanline*);
|
||||
Bool XmuScanlineEqu(XmuScanline*, XmuScanline*);
|
||||
XmuSegment *XmuNewSegment(int, int);
|
||||
void XmuDestroySegmentList(XmuSegment*);
|
||||
XmuScanline *XmuScanlineCopy(XmuScanline*, XmuScanline*);
|
||||
Bool XmuAppendSegment(XmuSegment*, XmuSegment*);
|
||||
XmuScanline *XmuOptimizeScanline(XmuScanline*);
|
||||
XmuScanline *XmuScanlineNot(XmuScanline *scanline, int, int);
|
||||
XmuScanline *XmuScanlineOr(XmuScanline*, XmuScanline*);
|
||||
XmuScanline *XmuScanlineAnd(XmuScanline*, XmuScanline*);
|
||||
XmuScanline *XmuScanlineXor(XmuScanline*, XmuScanline*);
|
||||
XmuScanline *XmuNewScanline(int, int, int);
|
||||
void XmuDestroyScanlineList(XmuScanline*);
|
||||
XmuArea *XmuOptimizeArea(XmuArea *area);
|
||||
|
||||
#ifndef notdef
|
||||
XmuScanline *XmuScanlineOrSegment(XmuScanline*, XmuSegment*);
|
||||
XmuScanline *XmuScanlineAndSegment(XmuScanline*, XmuSegment*);
|
||||
XmuScanline *XmuScanlineXorSegment(XmuScanline*, XmuSegment*);
|
||||
#endif /* notdef */
|
||||
|
||||
#ifndef _SYSUTIL_H_
|
||||
int XmuSnprintf(char *str, int size, _Xconst char *fmt, ...)
|
||||
_X_ATTRIBUTE_PRINTF(3,4);
|
||||
#endif
|
||||
|
||||
#endif /* _XMU_H_ */
|
||||
|
||||
1095
X11/Xos_r.h
1095
X11/Xos_r.h
File diff suppressed because it is too large
Load diff
116
X11/Xosdefs.h
116
X11/Xosdefs.h
|
|
@ -1,116 +0,0 @@
|
|||
/*
|
||||
* O/S-dependent (mis)feature macro definitions
|
||||
*
|
||||
Copyright 1991, 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 _XOSDEFS_H_
|
||||
# define _XOSDEFS_H_
|
||||
|
||||
/*
|
||||
* X_NOT_POSIX means does not have POSIX header files. Lack of this
|
||||
* symbol does NOT mean that the POSIX environment is the default.
|
||||
* You may still have to define _POSIX_SOURCE to get it.
|
||||
*/
|
||||
|
||||
|
||||
# ifdef _SCO_DS
|
||||
# ifndef __SCO__
|
||||
# define __SCO__
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef __i386__
|
||||
# ifdef SYSV
|
||||
# if !defined(__SCO__) && \
|
||||
!defined(__UNIXWARE__) && !defined(__sun)
|
||||
# if !defined(_POSIX_SOURCE)
|
||||
# define X_NOT_POSIX
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef __sun
|
||||
/* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4
|
||||
* This check allows non-Imake configured programs to build correctly.
|
||||
*/
|
||||
# if defined(__SVR4) && !defined(SVR4)
|
||||
# define SVR4 1
|
||||
# endif
|
||||
# ifdef SVR4
|
||||
/* define this to whatever it needs to be */
|
||||
# define X_POSIX_C_SOURCE 199300L
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef WIN32
|
||||
# ifndef _POSIX_
|
||||
# define X_NOT_POSIX
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
||||
# ifdef __APPLE__
|
||||
# define NULL_NOT_ZERO
|
||||
|
||||
/* Defining any of these will sanitize the namespace to JUST want is defined by
|
||||
* that particular standard. If that happens, we don't get some expected
|
||||
* prototypes, typedefs, etc (like fd_mask). We can define _DARWIN_C_SOURCE to
|
||||
* loosen our belts a tad.
|
||||
*/
|
||||
# if defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE)
|
||||
# ifndef _DARWIN_C_SOURCE
|
||||
# define _DARWIN_C_SOURCE
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
# ifdef __GNU__
|
||||
# ifndef PATH_MAX
|
||||
# define PATH_MAX 4096
|
||||
# endif
|
||||
# ifndef MAXPATHLEN
|
||||
# define MAXPATHLEN 4096
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if defined(__SCO__) || defined(__UNIXWARE__)
|
||||
# ifndef PATH_MAX
|
||||
# define PATH_MAX 1024
|
||||
# endif
|
||||
# ifndef MAXPATHLEN
|
||||
# define MAXPATHLEN 1024
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) \
|
||||
|| defined(__APPLE__) || defined(__DragonFly__)
|
||||
# ifndef CSRG_BASED
|
||||
# define CSRG_BASED
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif /* _XOSDEFS_H_ */
|
||||
|
||||
230
X11/Xpoll.h
230
X11/Xpoll.h
|
|
@ -1,230 +0,0 @@
|
|||
/*
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright © 2005 Daniel Stone
|
||||
*
|
||||
* 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, and that the name of Daniel Stone not be used in advertising
|
||||
* or publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. Daniel Stone makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* DANIEL STONE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
||||
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
||||
* DANIEL STONE 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 _XPOLL_H_
|
||||
#define _XPOLL_H_
|
||||
|
||||
#if !defined(WIN32) || defined(__CYGWIN__)
|
||||
|
||||
#ifndef USE_POLL
|
||||
|
||||
#include <X11/Xos.h>
|
||||
|
||||
#include <sys/select.h> /* Get the FD_* macros. */
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#ifdef CSRG_BASED
|
||||
#include <sys/param.h>
|
||||
# if BSD < 199103
|
||||
typedef long fd_mask;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(FD_SETSIZE) && FD_SETSIZE < 512
|
||||
# define XFD_SETSIZE FD_SETSIZE
|
||||
#else
|
||||
# define XFD_SETSIZE 512
|
||||
# ifndef FD_SETSIZE
|
||||
# define FD_SETSIZE XFD_SETSIZE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef NBBY
|
||||
#define NBBY 8 /* number of bits in a byte */
|
||||
#endif
|
||||
|
||||
#ifndef NFDBITS
|
||||
#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
|
||||
#endif
|
||||
|
||||
#ifndef howmany
|
||||
#define howmany(x,y) (((x)+((y)-1))/(y))
|
||||
#endif
|
||||
|
||||
#if defined(BSD) && BSD < 198911
|
||||
typedef struct fd_set {
|
||||
fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
|
||||
} fd_set;
|
||||
#endif
|
||||
|
||||
# define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
|
||||
|
||||
#define __X_FDS_BITS __fds_bits
|
||||
|
||||
#ifndef __FDS_BITS
|
||||
# define __FDS_BITS(p) ((p)->__X_FDS_BITS)
|
||||
#endif
|
||||
|
||||
#define __XFDS_BITS(p, n) (__FDS_BITS(p))[n]
|
||||
|
||||
#ifndef FD_SET
|
||||
#define FD_SET(n, p) (__XFDS_BITS(p, ((n)/NFDBITS)) |= ((fd_mask)1 << ((n) % NFDBITS)))
|
||||
#endif
|
||||
#ifndef FD_CLR
|
||||
#define FD_CLR(n, p) (__XFDS_BITS((p), ((n)/NFDBITS)) &= ~((fd_mask)1 << ((n) % NFDBITS)))
|
||||
#endif
|
||||
#ifndef FD_ISSET
|
||||
#define FD_ISSET(n, p) ((__XFDS_BITS((p), ((n)/NFDBITS))) & ((fd_mask)1 << ((n) % NFDBITS)))
|
||||
#endif
|
||||
#ifndef FD_ZERO
|
||||
#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The howmany(FD_SETSIZE, NFDBITS) computes the number of elements in the
|
||||
* array. before accessing an element in the array we check it exists.
|
||||
* If it does not exist then the compiler discards the code to access it.
|
||||
*/
|
||||
#define XFD_ANYSET(p) \
|
||||
((howmany(FD_SETSIZE, NFDBITS) > 0 && (__XFDS_BITS(p, 0))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 1 && (__XFDS_BITS(p, 1))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 2 && (__XFDS_BITS(p, 2))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 3 && (__XFDS_BITS(p, 3))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 4 && (__XFDS_BITS(p, 4))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 5 && (__XFDS_BITS(p, 5))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 6 && (__XFDS_BITS(p, 6))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 7 && (__XFDS_BITS(p, 7))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 8 && (__XFDS_BITS(p, 8))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 9 && (__XFDS_BITS(p, 9))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 10 && (__XFDS_BITS(p, 10))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 11 && (__XFDS_BITS(p, 11))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 12 && (__XFDS_BITS(p, 12))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 13 && (__XFDS_BITS(p, 13))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 14 && (__XFDS_BITS(p, 14))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 15 && (__XFDS_BITS(p, 15))))
|
||||
|
||||
|
||||
#define XFD_COPYSET(src,dst) { \
|
||||
int __i__; \
|
||||
for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
|
||||
__XFDS_BITS((dst), __i__) = __XFDS_BITS((src), __i__); \
|
||||
}
|
||||
#define XFD_ANDSET(dst,b1,b2) { \
|
||||
int __i__; \
|
||||
for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
|
||||
__XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) & (__XFDS_BITS((b2), __i__))); \
|
||||
}
|
||||
#define XFD_ORSET(dst,b1,b2) { \
|
||||
int __i__; \
|
||||
for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
|
||||
__XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) | (__XFDS_BITS((b2), __i__))); \
|
||||
}
|
||||
#define XFD_UNSET(dst,b1) { \
|
||||
int __i__; \
|
||||
for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
|
||||
__XFDS_BITS((dst), __i__) &= ~(__XFDS_BITS((b1), __i__)); \
|
||||
}
|
||||
|
||||
#else /* USE_POLL */
|
||||
#include <sys/poll.h>
|
||||
#endif /* USE_POLL */
|
||||
|
||||
#else /* WIN32 */
|
||||
|
||||
#define XFD_SETSIZE 512
|
||||
#ifndef FD_SETSIZE
|
||||
#define FD_SETSIZE XFD_SETSIZE
|
||||
#endif
|
||||
#include <X11/Xwinsock.h>
|
||||
|
||||
#define Select(n,r,w,e,t) select(0,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
|
||||
|
||||
#define XFD_SETCOUNT(p) (((fd_set FAR *)(p))->fd_count)
|
||||
#define XFD_FD(p,i) (((fd_set FAR *)(p))->fd_array[i])
|
||||
#define XFD_ANYSET(p) XFD_SETCOUNT(p)
|
||||
|
||||
#define XFD_COPYSET(src,dst) { \
|
||||
u_int __i; \
|
||||
FD_ZERO(dst); \
|
||||
for (__i = 0; __i < XFD_SETCOUNT(src) ; __i++) { \
|
||||
XFD_FD(dst,__i) = XFD_FD(src,__i); \
|
||||
} \
|
||||
XFD_SETCOUNT(dst) = XFD_SETCOUNT(src); \
|
||||
}
|
||||
|
||||
#define XFD_ANDSET(dst,b1,b2) { \
|
||||
u_int __i; \
|
||||
FD_ZERO(dst); \
|
||||
for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \
|
||||
if (FD_ISSET(XFD_FD(b1,__i), b2)) \
|
||||
FD_SET(XFD_FD(b1,__i), dst); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define XFD_ORSET(dst,b1,b2) { \
|
||||
u_int __i; \
|
||||
if (dst != b1) XFD_COPYSET(b1,dst); \
|
||||
for (__i = 0; __i < XFD_SETCOUNT(b2) ; __i++) { \
|
||||
if (!FD_ISSET(XFD_FD(b2,__i), dst)) \
|
||||
FD_SET(XFD_FD(b2,__i), dst); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* this one is really sub-optimal */
|
||||
#define XFD_UNSET(dst,b1) { \
|
||||
u_int __i; \
|
||||
for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \
|
||||
FD_CLR(XFD_FD(b1,__i), dst); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* we have to pay the price of having an array here, unlike with bitmasks
|
||||
calling twice FD_SET with the same fd is not transparent, so be careful */
|
||||
#undef FD_SET
|
||||
#define FD_SET(fd,set) do { \
|
||||
if (XFD_SETCOUNT(set) < FD_SETSIZE && !FD_ISSET(fd,set)) \
|
||||
XFD_FD(set,XFD_SETCOUNT(set)++)=(fd); \
|
||||
} while(0)
|
||||
|
||||
#define getdtablesize() FD_SETSIZE
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
#endif /* _XPOLL_H_ */
|
||||
2157
X11/Xproto.h
2157
X11/Xproto.h
File diff suppressed because it is too large
Load diff
|
|
@ -1,77 +0,0 @@
|
|||
#ifndef XPROTOSTRUCTS_H
|
||||
#define XPROTOSTRUCTS_H
|
||||
|
||||
/***********************************************************
|
||||
|
||||
Copyright 1987, 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 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.
|
||||
|
||||
******************************************************************/
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
/* Used by PolySegment */
|
||||
|
||||
typedef struct _xSegment {
|
||||
INT16 x1 B16, y1 B16, x2 B16, y2 B16;
|
||||
} xSegment;
|
||||
|
||||
/* POINT */
|
||||
|
||||
typedef struct _xPoint {
|
||||
INT16 x B16, y B16;
|
||||
} xPoint;
|
||||
|
||||
typedef struct _xRectangle {
|
||||
INT16 x B16, y B16;
|
||||
CARD16 width B16, height B16;
|
||||
} xRectangle;
|
||||
|
||||
/* ARC */
|
||||
|
||||
typedef struct _xArc {
|
||||
INT16 x B16, y B16;
|
||||
CARD16 width B16, height B16;
|
||||
INT16 angle1 B16, angle2 B16;
|
||||
} xArc;
|
||||
|
||||
#endif /* XPROTOSTRUCTS_H */
|
||||
190
X11/Xregion.h
190
X11/Xregion.h
|
|
@ -1,190 +0,0 @@
|
|||
/************************************************************************
|
||||
|
||||
Copyright 1987, 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 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 _X11_XREGION_H_
|
||||
#define _X11_XREGION_H_
|
||||
|
||||
typedef struct {
|
||||
short x1, x2, y1, y2;
|
||||
} Box, BOX, BoxRec, *BoxPtr;
|
||||
|
||||
typedef struct {
|
||||
short x, y, width, height;
|
||||
}RECTANGLE, RectangleRec, *RectanglePtr;
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#define MAXSHORT 32767
|
||||
#define MINSHORT -MAXSHORT
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* clip region
|
||||
*/
|
||||
|
||||
typedef struct _XRegion {
|
||||
long size;
|
||||
long numRects;
|
||||
BOX *rects;
|
||||
BOX extents;
|
||||
} REGION;
|
||||
|
||||
/* Xutil.h contains the declaration:
|
||||
* typedef struct _XRegion *Region;
|
||||
*/
|
||||
|
||||
/* 1 if two BOXs overlap.
|
||||
* 0 if two BOXs do not overlap.
|
||||
* Remember, x2 and y2 are not in the region
|
||||
*/
|
||||
#define EXTENTCHECK(r1, r2) \
|
||||
((r1)->x2 > (r2)->x1 && \
|
||||
(r1)->x1 < (r2)->x2 && \
|
||||
(r1)->y2 > (r2)->y1 && \
|
||||
(r1)->y1 < (r2)->y2)
|
||||
|
||||
/*
|
||||
* update region extents
|
||||
*/
|
||||
#define EXTENTS(r,idRect){\
|
||||
if((r)->x1 < (idRect)->extents.x1)\
|
||||
(idRect)->extents.x1 = (r)->x1;\
|
||||
if((r)->y1 < (idRect)->extents.y1)\
|
||||
(idRect)->extents.y1 = (r)->y1;\
|
||||
if((r)->x2 > (idRect)->extents.x2)\
|
||||
(idRect)->extents.x2 = (r)->x2;\
|
||||
if((r)->y2 > (idRect)->extents.y2)\
|
||||
(idRect)->extents.y2 = (r)->y2;\
|
||||
}
|
||||
|
||||
/*
|
||||
* Check to see if there is enough memory in the present region.
|
||||
*/
|
||||
#define MEMCHECK(reg, rect, firstrect){\
|
||||
if ((reg)->numRects >= ((reg)->size - 1)){\
|
||||
BoxPtr tmpRect = Xrealloc ((firstrect), \
|
||||
(2 * (sizeof(BOX)) * ((reg)->size))); \
|
||||
if (tmpRect == NULL) \
|
||||
return(0);\
|
||||
(firstrect) = tmpRect; \
|
||||
(reg)->size *= 2;\
|
||||
(rect) = &(firstrect)[(reg)->numRects];\
|
||||
}\
|
||||
}
|
||||
|
||||
/* this routine checks to see if the previous rectangle is the same
|
||||
* or subsumes the new rectangle to add.
|
||||
*/
|
||||
|
||||
#define CHECK_PREVIOUS(Reg, R, Rx1, Ry1, Rx2, Ry2)\
|
||||
(!(((Reg)->numRects > 0)&&\
|
||||
((R-1)->y1 == (Ry1)) &&\
|
||||
((R-1)->y2 == (Ry2)) &&\
|
||||
((R-1)->x1 <= (Rx1)) &&\
|
||||
((R-1)->x2 >= (Rx2))))
|
||||
|
||||
/* add a rectangle to the given Region */
|
||||
#define ADDRECT(reg, r, rx1, ry1, rx2, ry2){\
|
||||
if (((rx1) < (rx2)) && ((ry1) < (ry2)) &&\
|
||||
CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\
|
||||
(r)->x1 = (rx1);\
|
||||
(r)->y1 = (ry1);\
|
||||
(r)->x2 = (rx2);\
|
||||
(r)->y2 = (ry2);\
|
||||
EXTENTS((r), (reg));\
|
||||
(reg)->numRects++;\
|
||||
(r)++;\
|
||||
}\
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* add a rectangle to the given Region */
|
||||
#define ADDRECTNOX(reg, r, rx1, ry1, rx2, ry2){\
|
||||
if ((rx1 < rx2) && (ry1 < ry2) &&\
|
||||
CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\
|
||||
(r)->x1 = (rx1);\
|
||||
(r)->y1 = (ry1);\
|
||||
(r)->x2 = (rx2);\
|
||||
(r)->y2 = (ry2);\
|
||||
(reg)->numRects++;\
|
||||
(r)++;\
|
||||
}\
|
||||
}
|
||||
|
||||
#define EMPTY_REGION(pReg) pReg->numRects = 0
|
||||
|
||||
#define REGION_NOT_EMPTY(pReg) pReg->numRects
|
||||
|
||||
#define INBOX(r, x, y) \
|
||||
( ( ((r).x2 > x)) && \
|
||||
( ((r).x1 <= x)) && \
|
||||
( ((r).y2 > y)) && \
|
||||
( ((r).y1 <= y)) )
|
||||
|
||||
/*
|
||||
* number of points to buffer before sending them off
|
||||
* to scanlines() : Must be an even number
|
||||
*/
|
||||
#define NUMPTSTOBUFFER 200
|
||||
|
||||
/*
|
||||
* used to allocate buffers for points and link
|
||||
* the buffers together
|
||||
*/
|
||||
typedef struct _POINTBLOCK {
|
||||
XPoint pts[NUMPTSTOBUFFER];
|
||||
struct _POINTBLOCK *next;
|
||||
} POINTBLOCK;
|
||||
|
||||
#endif /* _X11_XREGION_H_ */
|
||||
358
X11/Xresource.h
358
X11/Xresource.h
|
|
@ -1,358 +0,0 @@
|
|||
|
||||
/***********************************************************
|
||||
|
||||
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 _X11_XRESOURCE_H_
|
||||
#define _X11_XRESOURCE_H_
|
||||
|
||||
#ifndef _XP_PRINT_SERVER_
|
||||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************
|
||||
****************************************************************
|
||||
*** ***
|
||||
*** ***
|
||||
*** X Resource Manager Intrinsics ***
|
||||
*** ***
|
||||
*** ***
|
||||
****************************************************************
|
||||
****************************************************************/
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Memory Management
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
extern char *Xpermalloc(
|
||||
unsigned int /* size */
|
||||
);
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Quark Management
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef int XrmQuark, *XrmQuarkList;
|
||||
#define NULLQUARK ((XrmQuark) 0)
|
||||
|
||||
typedef char *XrmString;
|
||||
#define NULLSTRING ((XrmString) 0)
|
||||
|
||||
/* find quark for string, create new quark if none already exists */
|
||||
extern XrmQuark XrmStringToQuark(
|
||||
_Xconst char* /* string */
|
||||
);
|
||||
|
||||
extern XrmQuark XrmPermStringToQuark(
|
||||
_Xconst char* /* string */
|
||||
);
|
||||
|
||||
/* find string for quark */
|
||||
extern XrmString XrmQuarkToString(
|
||||
XrmQuark /* quark */
|
||||
);
|
||||
|
||||
extern XrmQuark XrmUniqueQuark(
|
||||
void
|
||||
);
|
||||
|
||||
#define XrmStringsEqual(a1, a2) (strcmp(a1, a2) == 0)
|
||||
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Conversion of Strings to Lists
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;
|
||||
|
||||
extern void XrmStringToQuarkList(
|
||||
_Xconst char* /* string */,
|
||||
XrmQuarkList /* quarks_return */
|
||||
);
|
||||
|
||||
extern void XrmStringToBindingQuarkList(
|
||||
_Xconst char* /* string */,
|
||||
XrmBindingList /* bindings_return */,
|
||||
XrmQuarkList /* quarks_return */
|
||||
);
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Name and Class lists.
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef XrmQuark XrmName;
|
||||
typedef XrmQuarkList XrmNameList;
|
||||
#define XrmNameToString(name) XrmQuarkToString(name)
|
||||
#define XrmStringToName(string) XrmStringToQuark(string)
|
||||
#define XrmStringToNameList(str, name) XrmStringToQuarkList(str, name)
|
||||
|
||||
typedef XrmQuark XrmClass;
|
||||
typedef XrmQuarkList XrmClassList;
|
||||
#define XrmClassToString(c_class) XrmQuarkToString(c_class)
|
||||
#define XrmStringToClass(c_class) XrmStringToQuark(c_class)
|
||||
#define XrmStringToClassList(str,c_class) XrmStringToQuarkList(str, c_class)
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Resource Representation Types and Values
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef XrmQuark XrmRepresentation;
|
||||
#define XrmStringToRepresentation(string) XrmStringToQuark(string)
|
||||
#define XrmRepresentationToString(type) XrmQuarkToString(type)
|
||||
|
||||
typedef struct {
|
||||
unsigned int size;
|
||||
XPointer addr;
|
||||
} XrmValue, *XrmValuePtr;
|
||||
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Resource Manager Functions
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef struct _XrmHashBucketRec *XrmHashBucket;
|
||||
typedef XrmHashBucket *XrmHashTable;
|
||||
typedef XrmHashTable XrmSearchList[];
|
||||
typedef struct _XrmHashBucketRec *XrmDatabase;
|
||||
|
||||
|
||||
extern void XrmDestroyDatabase(
|
||||
XrmDatabase /* database */
|
||||
);
|
||||
|
||||
extern void XrmQPutResource(
|
||||
XrmDatabase* /* database */,
|
||||
XrmBindingList /* bindings */,
|
||||
XrmQuarkList /* quarks */,
|
||||
XrmRepresentation /* type */,
|
||||
XrmValue* /* value */
|
||||
);
|
||||
|
||||
extern void XrmPutResource(
|
||||
XrmDatabase* /* database */,
|
||||
_Xconst char* /* specifier */,
|
||||
_Xconst char* /* type */,
|
||||
XrmValue* /* value */
|
||||
);
|
||||
|
||||
extern void XrmQPutStringResource(
|
||||
XrmDatabase* /* database */,
|
||||
XrmBindingList /* bindings */,
|
||||
XrmQuarkList /* quarks */,
|
||||
_Xconst char* /* value */
|
||||
);
|
||||
|
||||
extern void XrmPutStringResource(
|
||||
XrmDatabase* /* database */,
|
||||
_Xconst char* /* specifier */,
|
||||
_Xconst char* /* value */
|
||||
);
|
||||
|
||||
extern void XrmPutLineResource(
|
||||
XrmDatabase* /* database */,
|
||||
_Xconst char* /* line */
|
||||
);
|
||||
|
||||
extern Bool XrmQGetResource(
|
||||
XrmDatabase /* database */,
|
||||
XrmNameList /* quark_name */,
|
||||
XrmClassList /* quark_class */,
|
||||
XrmRepresentation* /* quark_type_return */,
|
||||
XrmValue* /* value_return */
|
||||
);
|
||||
|
||||
extern Bool XrmGetResource(
|
||||
XrmDatabase /* database */,
|
||||
_Xconst char* /* str_name */,
|
||||
_Xconst char* /* str_class */,
|
||||
char** /* str_type_return */,
|
||||
XrmValue* /* value_return */
|
||||
);
|
||||
|
||||
extern Bool XrmQGetSearchList(
|
||||
XrmDatabase /* database */,
|
||||
XrmNameList /* names */,
|
||||
XrmClassList /* classes */,
|
||||
XrmSearchList /* list_return */,
|
||||
int /* list_length */
|
||||
);
|
||||
|
||||
extern Bool XrmQGetSearchResource(
|
||||
XrmSearchList /* list */,
|
||||
XrmName /* name */,
|
||||
XrmClass /* class */,
|
||||
XrmRepresentation* /* type_return */,
|
||||
XrmValue* /* value_return */
|
||||
);
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Resource Database Management
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
#ifndef _XP_PRINT_SERVER_
|
||||
|
||||
extern void XrmSetDatabase(
|
||||
Display* /* display */,
|
||||
XrmDatabase /* database */
|
||||
);
|
||||
|
||||
extern XrmDatabase XrmGetDatabase(
|
||||
Display* /* display */
|
||||
);
|
||||
|
||||
#endif /* !_XP_PRINT_SERVER_ */
|
||||
|
||||
extern XrmDatabase XrmGetFileDatabase(
|
||||
_Xconst char* /* filename */
|
||||
);
|
||||
|
||||
extern Status XrmCombineFileDatabase(
|
||||
_Xconst char* /* filename */,
|
||||
XrmDatabase* /* target */,
|
||||
Bool /* override */
|
||||
);
|
||||
|
||||
extern XrmDatabase XrmGetStringDatabase(
|
||||
_Xconst char* /* data */ /* null terminated string */
|
||||
);
|
||||
|
||||
extern void XrmPutFileDatabase(
|
||||
XrmDatabase /* database */,
|
||||
_Xconst char* /* filename */
|
||||
);
|
||||
|
||||
extern void XrmMergeDatabases(
|
||||
XrmDatabase /* source_db */,
|
||||
XrmDatabase* /* target_db */
|
||||
);
|
||||
|
||||
extern void XrmCombineDatabase(
|
||||
XrmDatabase /* source_db */,
|
||||
XrmDatabase* /* target_db */,
|
||||
Bool /* override */
|
||||
);
|
||||
|
||||
#define XrmEnumAllLevels 0
|
||||
#define XrmEnumOneLevel 1
|
||||
|
||||
extern Bool XrmEnumerateDatabase(
|
||||
XrmDatabase /* db */,
|
||||
XrmNameList /* name_prefix */,
|
||||
XrmClassList /* class_prefix */,
|
||||
int /* mode */,
|
||||
Bool (*)(
|
||||
XrmDatabase* /* db */,
|
||||
XrmBindingList /* bindings */,
|
||||
XrmQuarkList /* quarks */,
|
||||
XrmRepresentation* /* type */,
|
||||
XrmValue* /* value */,
|
||||
XPointer /* closure */
|
||||
) /* proc */,
|
||||
XPointer /* closure */
|
||||
);
|
||||
|
||||
extern const char *XrmLocaleOfDatabase(
|
||||
XrmDatabase /* database */
|
||||
);
|
||||
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Command line option mapping to resource entries
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef enum {
|
||||
XrmoptionNoArg, /* Value is specified in OptionDescRec.value */
|
||||
XrmoptionIsArg, /* Value is the option string itself */
|
||||
XrmoptionStickyArg, /* Value is characters immediately following option */
|
||||
XrmoptionSepArg, /* Value is next argument in argv */
|
||||
XrmoptionResArg, /* Resource and value in next argument in argv */
|
||||
XrmoptionSkipArg, /* Ignore this option and the next argument in argv */
|
||||
XrmoptionSkipLine, /* Ignore this option and the rest of argv */
|
||||
XrmoptionSkipNArgs /* Ignore this option and the next
|
||||
OptionDescRes.value arguments in argv */
|
||||
} XrmOptionKind;
|
||||
|
||||
typedef struct {
|
||||
char *option; /* Option abbreviation in argv */
|
||||
char *specifier; /* Resource specifier */
|
||||
XrmOptionKind argKind; /* Which style of option it is */
|
||||
XPointer value; /* Value to provide if XrmoptionNoArg */
|
||||
} XrmOptionDescRec, *XrmOptionDescList;
|
||||
|
||||
|
||||
extern void XrmParseCommand(
|
||||
XrmDatabase* /* database */,
|
||||
XrmOptionDescList /* table */,
|
||||
int /* table_count */,
|
||||
_Xconst char* /* name */,
|
||||
int* /* argc_in_out */,
|
||||
char** /* argv_in_out */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _X11_XRESOURCE_H_ */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
314
X11/Xthreads.h
314
X11/Xthreads.h
|
|
@ -1,314 +0,0 @@
|
|||
/*
|
||||
*
|
||||
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.
|
||||
* *
|
||||
*/
|
||||
|
||||
#ifndef _XTHREADS_H_
|
||||
# define _XTHREADS_H_
|
||||
|
||||
/* Redefine these to XtMalloc/XtFree or whatever you want before including
|
||||
* this header file.
|
||||
*/
|
||||
# ifndef xmalloc
|
||||
# define xmalloc malloc
|
||||
# endif
|
||||
# ifndef xfree
|
||||
# define xfree free
|
||||
# endif
|
||||
|
||||
# ifdef CTHREADS
|
||||
# include <cthreads.h>
|
||||
typedef cthread_t xthread_t;
|
||||
typedef struct condition xcondition_rec;
|
||||
typedef struct mutex xmutex_rec;
|
||||
# define xthread_init() cthread_init()
|
||||
# define xthread_self cthread_self
|
||||
# define xthread_fork(func,closure) cthread_fork(func,closure)
|
||||
# define xthread_yield() cthread_yield()
|
||||
# define xthread_exit(v) cthread_exit(v)
|
||||
# define xthread_set_name(t,str) cthread_set_name(t,str)
|
||||
# define xmutex_init(m) mutex_init(m)
|
||||
# define xmutex_clear(m) mutex_clear(m)
|
||||
# define xmutex_lock(m) mutex_lock(m)
|
||||
# define xmutex_unlock(m) mutex_unlock(m)
|
||||
# define xmutex_set_name(m,str) mutex_set_name(m,str)
|
||||
# define xcondition_init(cv) condition_init(cv)
|
||||
# define xcondition_clear(cv) condition_clear(cv)
|
||||
# define xcondition_wait(cv,m) condition_wait(cv,m)
|
||||
# define xcondition_signal(cv) condition_signal(cv)
|
||||
# define xcondition_broadcast(cv) condition_broadcast(cv)
|
||||
# define xcondition_set_name(cv,str) condition_set_name(cv,str)
|
||||
# else /* !CTHREADS */
|
||||
# if defined(SVR4)
|
||||
# include <thread.h>
|
||||
# include <synch.h>
|
||||
typedef thread_t xthread_t;
|
||||
typedef thread_key_t xthread_key_t;
|
||||
typedef cond_t xcondition_rec;
|
||||
typedef mutex_t xmutex_rec;
|
||||
# if defined(__UNIXWARE__)
|
||||
extern xthread_t (*_x11_thr_self)();
|
||||
# define xthread_self (_x11_thr_self)
|
||||
# else
|
||||
# define xthread_self thr_self
|
||||
# endif
|
||||
# define xthread_fork(func,closure) thr_create(NULL,0,func,closure,THR_NEW_LWP|THR_DETACHED,NULL)
|
||||
# define xthread_yield() thr_yield()
|
||||
# define xthread_exit(v) thr_exit(v)
|
||||
# define xthread_key_create(kp,d) thr_keycreate(kp,d)
|
||||
# ifdef __sun
|
||||
# define xthread_key_delete(k) 0
|
||||
# else
|
||||
# define xthread_key_delete(k) thr_keydelete(k)
|
||||
# endif
|
||||
# define xthread_set_specific(k,v) thr_setspecific(k,v)
|
||||
# define xthread_get_specific(k,vp) thr_getspecific(k,vp)
|
||||
# define xmutex_init(m) mutex_init(m,USYNC_THREAD,0)
|
||||
# define xmutex_clear(m) mutex_destroy(m)
|
||||
# define xmutex_lock(m) mutex_lock(m)
|
||||
# define xmutex_unlock(m) mutex_unlock(m)
|
||||
# define xcondition_init(cv) cond_init(cv,USYNC_THREAD,0)
|
||||
# define xcondition_clear(cv) cond_destroy(cv)
|
||||
# define xcondition_wait(cv,m) cond_wait(cv,m)
|
||||
# define xcondition_signal(cv) cond_signal(cv)
|
||||
# define xcondition_broadcast(cv) cond_broadcast(cv)
|
||||
# else /* !SVR4 */
|
||||
# ifdef WIN32
|
||||
# include <X11/Xwindows.h>
|
||||
typedef DWORD xthread_t;
|
||||
typedef DWORD xthread_key_t;
|
||||
struct _xthread_waiter {
|
||||
HANDLE sem;
|
||||
struct _xthread_waiter *next;
|
||||
};
|
||||
typedef struct {
|
||||
CRITICAL_SECTION cs;
|
||||
struct _xthread_waiter *waiters;
|
||||
} xcondition_rec;
|
||||
typedef CRITICAL_SECTION xmutex_rec;
|
||||
extern void _Xthread_init(void);
|
||||
# define xthread_init() _Xthread_init()
|
||||
# define xthread_self GetCurrentThreadId
|
||||
# define xthread_fork(func,closure) { \
|
||||
DWORD _tmptid; \
|
||||
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, (LPVOID)closure, 0, \
|
||||
&_tmptid); \
|
||||
}
|
||||
# define xthread_yield() Sleep(0)
|
||||
# define xthread_exit(v) ExitThread((DWORD)(v))
|
||||
# define xthread_key_create(kp,d) *(kp) = TlsAlloc()
|
||||
# define xthread_key_delete(k) TlsFree(k)
|
||||
# define xthread_set_specific(k,v) TlsSetValue(k,v)
|
||||
# define xthread_get_specific(k,vp) TlsGetValue(k)
|
||||
# define xmutex_init(m) InitializeCriticalSection(m)
|
||||
# define xmutex_clear(m) DeleteCriticalSection(m)
|
||||
# define _XMUTEX_NESTS
|
||||
# define xmutex_lock(m) EnterCriticalSection(m)
|
||||
# define xmutex_unlock(m) LeaveCriticalSection(m)
|
||||
# define xcondition_init(cv) { \
|
||||
InitializeCriticalSection(&(cv)->cs); \
|
||||
(cv)->waiters = NULL; \
|
||||
}
|
||||
# define xcondition_clear(cv) DeleteCriticalSection(&(cv)->cs)
|
||||
extern struct _xthread_waiter *_Xthread_waiter();
|
||||
# define xcondition_wait(cv,m) { \
|
||||
struct _xthread_waiter *_tmpthr = _Xthread_waiter(); \
|
||||
EnterCriticalSection(&(cv)->cs); \
|
||||
_tmpthr->next = (cv)->waiters; \
|
||||
(cv)->waiters = _tmpthr; \
|
||||
LeaveCriticalSection(&(cv)->cs); \
|
||||
LeaveCriticalSection(m); \
|
||||
WaitForSingleObject(_tmpthr->sem, INFINITE); \
|
||||
EnterCriticalSection(m); \
|
||||
}
|
||||
# define xcondition_signal(cv) { \
|
||||
EnterCriticalSection(&(cv)->cs); \
|
||||
if ((cv)->waiters) { \
|
||||
ReleaseSemaphore((cv)->waiters->sem, 1, NULL); \
|
||||
(cv)->waiters = (cv)->waiters->next; \
|
||||
} \
|
||||
LeaveCriticalSection(&(cv)->cs); \
|
||||
}
|
||||
# define xcondition_broadcast(cv) { \
|
||||
struct _xthread_waiter *_tmpthr; \
|
||||
EnterCriticalSection(&(cv)->cs); \
|
||||
for (_tmpthr = (cv)->waiters; _tmpthr; _tmpthr = _tmpthr->next) \
|
||||
ReleaseSemaphore(_tmpthr->sem, 1, NULL); \
|
||||
(cv)->waiters = NULL; \
|
||||
LeaveCriticalSection(&(cv)->cs); \
|
||||
}
|
||||
# else /* !WIN32 */
|
||||
# ifdef USE_TIS_SUPPORT
|
||||
/*
|
||||
* TIS support is intended for thread safe libraries.
|
||||
* This should not be used for general client programming.
|
||||
*/
|
||||
# include <tis.h>
|
||||
typedef pthread_t xthread_t;
|
||||
typedef pthread_key_t xthread_key_t;
|
||||
typedef pthread_cond_t xcondition_rec;
|
||||
typedef pthread_mutex_t xmutex_rec;
|
||||
# define xthread_self tis_self
|
||||
# define xthread_fork(func,closure) { pthread_t _tmpxthr; \
|
||||
pthread_create(&_tmpxthr,NULL,func,closure); }
|
||||
# define xthread_yield() pthread_yield_np()
|
||||
# define xthread_exit(v) pthread_exit(v)
|
||||
# define xthread_key_create(kp,d) tis_key_create(kp,d)
|
||||
# define xthread_key_delete(k) tis_key_delete(k)
|
||||
# define xthread_set_specific(k,v) tis_setspecific(k,v)
|
||||
# define xthread_get_specific(k,vp) *(vp) = tis_getspecific(k)
|
||||
# define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||
# define xmutex_init(m) tis_mutex_init(m)
|
||||
# define xmutex_clear(m) tis_mutex_destroy(m)
|
||||
# define xmutex_lock(m) tis_mutex_lock(m)
|
||||
# define xmutex_unlock(m) tis_mutex_unlock(m)
|
||||
# define xcondition_init(c) tis_cond_init(c)
|
||||
# define xcondition_clear(c) tis_cond_destroy(c)
|
||||
# define xcondition_wait(c,m) tis_cond_wait(c,m)
|
||||
# define xcondition_signal(c) tis_cond_signal(c)
|
||||
# define xcondition_broadcast(c) tis_cond_broadcast(c)
|
||||
# else
|
||||
# ifdef USE_NBSD_THREADLIB
|
||||
/*
|
||||
* NetBSD threadlib support is intended for thread safe libraries.
|
||||
* This should not be used for general client programming.
|
||||
*/
|
||||
# include <threadlib.h>
|
||||
typedef thr_t xthread_t;
|
||||
typedef thread_key_t xthread_key_t;
|
||||
typedef cond_t xcondition_rec;
|
||||
typedef mutex_t xmutex_rec;
|
||||
# define xthread_self thr_self
|
||||
# define xthread_fork(func,closure) { thr_t _tmpxthr; \
|
||||
/* XXX Create it detached? --thorpej */ \
|
||||
thr_create(&_tmpxthr,NULL,func,closure); }
|
||||
# define xthread_yield() thr_yield()
|
||||
# define xthread_exit(v) thr_exit(v)
|
||||
# define xthread_key_create(kp,d) thr_keycreate(kp,d)
|
||||
# define xthread_key_delete(k) thr_keydelete(k)
|
||||
# define xthread_set_specific(k,v) thr_setspecific(k,v)
|
||||
# define xthread_get_specific(k,vp) *(vp) = thr_getspecific(k)
|
||||
# define XMUTEX_INITIALIZER MUTEX_INITIALIZER
|
||||
# define xmutex_init(m) mutex_init(m, 0)
|
||||
# define xmutex_clear(m) mutex_destroy(m)
|
||||
# define xmutex_lock(m) mutex_lock(m)
|
||||
# define xmutex_unlock(m) mutex_unlock(m)
|
||||
# define xcondition_init(c) cond_init(c, 0, 0)
|
||||
# define xcondition_clear(c) cond_destroy(c)
|
||||
# define xcondition_wait(c,m) cond_wait(c,m)
|
||||
# define xcondition_signal(c) cond_signal(c)
|
||||
# define xcondition_broadcast(c) cond_broadcast(c)
|
||||
# else
|
||||
# include <pthread.h>
|
||||
typedef pthread_t xthread_t;
|
||||
typedef pthread_key_t xthread_key_t;
|
||||
typedef pthread_cond_t xcondition_rec;
|
||||
typedef pthread_mutex_t xmutex_rec;
|
||||
# define xthread_self pthread_self
|
||||
# define xthread_yield() pthread_yield()
|
||||
# define xthread_exit(v) pthread_exit(v)
|
||||
# define xthread_set_specific(k,v) pthread_setspecific(k,v)
|
||||
# define xmutex_clear(m) pthread_mutex_destroy(m)
|
||||
# define xmutex_lock(m) pthread_mutex_lock(m)
|
||||
# define xmutex_unlock(m) pthread_mutex_unlock(m)
|
||||
# ifndef XPRE_STANDARD_API
|
||||
# define xthread_key_create(kp,d) pthread_key_create(kp,d)
|
||||
# define xthread_key_delete(k) pthread_key_delete(k)
|
||||
# define xthread_get_specific(k,vp) *(vp) = pthread_getspecific(k)
|
||||
# define xthread_fork(func,closure) { pthread_t _tmpxthr; \
|
||||
pthread_create(&_tmpxthr,NULL,func,closure); }
|
||||
# define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||
# define xmutex_init(m) pthread_mutex_init(m, NULL)
|
||||
# define xcondition_init(c) pthread_cond_init(c, NULL)
|
||||
# else /* XPRE_STANDARD_API */
|
||||
# define xthread_key_create(kp,d) pthread_keycreate(kp,d)
|
||||
# define xthread_key_delete(k) 0
|
||||
# define xthread_get_specific(k,vp) pthread_getspecific(k,vp)
|
||||
# define xthread_fork(func,closure) { pthread_t _tmpxthr; \
|
||||
pthread_create(&_tmpxthr,pthread_attr_default,func,closure); }
|
||||
# define xmutex_init(m) pthread_mutex_init(m, pthread_mutexattr_default)
|
||||
# define xcondition_init(c) pthread_cond_init(c, pthread_condattr_default)
|
||||
# endif /* XPRE_STANDARD_API */
|
||||
# define xcondition_clear(c) pthread_cond_destroy(c)
|
||||
# define xcondition_wait(c,m) pthread_cond_wait(c,m)
|
||||
# define xcondition_signal(c) pthread_cond_signal(c)
|
||||
# define xcondition_broadcast(c) pthread_cond_broadcast(c)
|
||||
# if defined(_DECTHREADS_)
|
||||
static xthread_t _X_no_thread_id;
|
||||
# define xthread_have_id(id) !pthread_equal(id, _X_no_thread_id)
|
||||
# define xthread_clear_id(id) id = _X_no_thread_id
|
||||
# define xthread_equal(id1,id2) pthread_equal(id1, id2)
|
||||
# endif /* _DECTHREADS_ */
|
||||
# if defined(__linux__)
|
||||
# define xthread_have_id(id) !pthread_equal(id, 0)
|
||||
# define xthread_clear_id(id) id = 0
|
||||
# define xthread_equal(id1,id2) pthread_equal(id1, id2)
|
||||
# endif /* linux */
|
||||
# if defined(_CMA_VENDOR_) && defined(_CMA__IBM) && (_CMA_VENDOR_ == _CMA__IBM)
|
||||
# ifdef DEBUG /* too much of a hack to enable normally */
|
||||
/* see also cma__obj_set_name() */
|
||||
# define xmutex_set_name(m,str) ((char**)(m)->field1)[5] = (str)
|
||||
# define xcondition_set_name(cv,str) ((char**)(cv)->field1)[5] = (str)
|
||||
# endif /* DEBUG */
|
||||
# endif /* _CMA_VENDOR_ == _CMA__IBM */
|
||||
# endif /* USE_NBSD_THREADLIB */
|
||||
# endif /* USE_TIS_SUPPORT */
|
||||
# endif /* WIN32 */
|
||||
# endif /* SVR4 */
|
||||
# endif /* CTHREADS */
|
||||
typedef xcondition_rec *xcondition_t;
|
||||
typedef xmutex_rec *xmutex_t;
|
||||
# ifndef xcondition_malloc
|
||||
# define xcondition_malloc() (xcondition_t)xmalloc(sizeof(xcondition_rec))
|
||||
# endif
|
||||
# ifndef xcondition_free
|
||||
# define xcondition_free(c) xfree((char *)c)
|
||||
# endif
|
||||
# ifndef xmutex_malloc
|
||||
# define xmutex_malloc() (xmutex_t)xmalloc(sizeof(xmutex_rec))
|
||||
# endif
|
||||
# ifndef xmutex_free
|
||||
# define xmutex_free(m) xfree((char *)m)
|
||||
# endif
|
||||
# ifndef xthread_have_id
|
||||
# define xthread_have_id(id) id
|
||||
# endif
|
||||
# ifndef xthread_clear_id
|
||||
# define xthread_clear_id(id) id = 0
|
||||
# endif
|
||||
# ifndef xthread_equal
|
||||
# define xthread_equal(id1,id2) ((id1) == (id2))
|
||||
# endif
|
||||
/* aids understood by some debuggers */
|
||||
# ifndef xthread_set_name
|
||||
# define xthread_set_name(t,str)
|
||||
# endif
|
||||
# ifndef xmutex_set_name
|
||||
# define xmutex_set_name(m,str)
|
||||
# endif
|
||||
# ifndef xcondition_set_name
|
||||
# define xcondition_set_name(cv,str)
|
||||
# endif
|
||||
|
||||
#endif /* _XTHREADS_H_ */
|
||||
69
X11/Xtos.h
69
X11/Xtos.h
|
|
@ -1,69 +0,0 @@
|
|||
/***********************************************************
|
||||
|
||||
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 */
|
||||
1514
X11/Xtrans/Xtrans.c
1514
X11/Xtrans/Xtrans.c
File diff suppressed because it is too large
Load diff
|
|
@ -1,466 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 1993, 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 1993, 1994 NCR Corporation - Dayton, Ohio, USA
|
||||
*
|
||||
* 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 NCR not be used in advertising
|
||||
* or publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. NCR makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
|
||||
* NO EVENT SHALL NCR 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 _XTRANS_H_
|
||||
#define _XTRANS_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xos.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
/* Not all clients make use of all provided statics */
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Set the functions names according to where this code is being compiled.
|
||||
*/
|
||||
|
||||
#ifdef X11_t
|
||||
#define TRANS(func) _X11Trans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_X11Trans";
|
||||
#endif
|
||||
#endif /* X11_t */
|
||||
|
||||
#ifdef XSERV_t
|
||||
#define TRANS(func) _XSERVTrans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_XSERVTrans";
|
||||
#endif
|
||||
#define X11_t
|
||||
#endif /* XSERV_t */
|
||||
|
||||
#ifdef XIM_t
|
||||
#define TRANS(func) _XimXTrans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_XimTrans";
|
||||
#endif
|
||||
#endif /* XIM_t */
|
||||
|
||||
#ifdef FS_t
|
||||
#define TRANS(func) _FSTrans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_FSTrans";
|
||||
#endif
|
||||
#endif /* FS_t */
|
||||
|
||||
#ifdef FONT_t
|
||||
#define TRANS(func) _FontTrans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_FontTrans";
|
||||
#endif
|
||||
#endif /* FONT_t */
|
||||
|
||||
#ifdef ICE_t
|
||||
#define TRANS(func) _IceTrans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_IceTrans";
|
||||
#endif
|
||||
#endif /* ICE_t */
|
||||
|
||||
#ifdef TEST_t
|
||||
#define TRANS(func) _TESTTrans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_TESTTrans";
|
||||
#endif
|
||||
#endif /* TEST_t */
|
||||
|
||||
#ifdef LBXPROXY_t
|
||||
#define TRANS(func) _LBXPROXYTrans##func
|
||||
#define X11_t /* The server defines this - so should the LBX proxy */
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_LBXPROXYTrans";
|
||||
#endif
|
||||
#endif /* LBXPROXY_t */
|
||||
|
||||
#if !defined(TRANS)
|
||||
#define TRANS(func) _XTrans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_XTrans";
|
||||
#endif
|
||||
#endif /* !TRANS */
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Create a single address structure that can be used wherever
|
||||
* an address structure is needed. struct sockaddr is not big enough
|
||||
* to hold a sockadd_un, so we create this definition to have a single
|
||||
* structure that is big enough for all the structures we might need.
|
||||
*
|
||||
* This structure needs to be independent of the socket/TLI interface used.
|
||||
*/
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
typedef struct sockaddr_storage Xtransaddr;
|
||||
#else
|
||||
#define XTRANS_MAX_ADDR_LEN 128 /* large enough to hold sun_path */
|
||||
|
||||
typedef struct {
|
||||
unsigned char addr[XTRANS_MAX_ADDR_LEN];
|
||||
} Xtransaddr;
|
||||
#endif
|
||||
|
||||
#ifdef LONG64
|
||||
typedef int BytesReadable_t;
|
||||
#else
|
||||
typedef long BytesReadable_t;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(WIN32) || defined(USG)
|
||||
|
||||
/*
|
||||
* TRANS(Readv) and TRANS(Writev) use struct iovec, normally found
|
||||
* in Berkeley systems in <sys/uio.h>. See the readv(2) and writev(2)
|
||||
* manual pages for details.
|
||||
*/
|
||||
|
||||
struct iovec {
|
||||
caddr_t iov_base;
|
||||
int iov_len;
|
||||
};
|
||||
|
||||
#else
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
|
||||
typedef struct _XtransConnInfo *XtransConnInfo;
|
||||
|
||||
|
||||
/*
|
||||
* Transport Option definitions
|
||||
*/
|
||||
|
||||
#define TRANS_NONBLOCKING 1
|
||||
#define TRANS_CLOSEONEXEC 2
|
||||
|
||||
|
||||
/*
|
||||
* Return values of Connect (0 is success)
|
||||
*/
|
||||
|
||||
#define TRANS_CONNECT_FAILED -1
|
||||
#define TRANS_TRY_CONNECT_AGAIN -2
|
||||
#define TRANS_IN_PROGRESS -3
|
||||
|
||||
|
||||
/*
|
||||
* Return values of CreateListener (0 is success)
|
||||
*/
|
||||
|
||||
#define TRANS_CREATE_LISTENER_FAILED -1
|
||||
#define TRANS_ADDR_IN_USE -2
|
||||
|
||||
|
||||
/*
|
||||
* Return values of Accept (0 is success)
|
||||
*/
|
||||
|
||||
#define TRANS_ACCEPT_BAD_MALLOC -1
|
||||
#define TRANS_ACCEPT_FAILED -2
|
||||
#define TRANS_ACCEPT_MISC_ERROR -3
|
||||
|
||||
|
||||
/*
|
||||
* ResetListener return values
|
||||
*/
|
||||
|
||||
#define TRANS_RESET_NOOP 1
|
||||
#define TRANS_RESET_NEW_FD 2
|
||||
#define TRANS_RESET_FAILURE 3
|
||||
|
||||
|
||||
/*
|
||||
* Function prototypes for the exposed interface
|
||||
*/
|
||||
|
||||
void TRANS(FreeConnInfo) (
|
||||
XtransConnInfo /* ciptr */
|
||||
);
|
||||
|
||||
#ifdef TRANS_CLIENT
|
||||
|
||||
XtransConnInfo TRANS(OpenCOTSClient)(
|
||||
const char * /* address */
|
||||
);
|
||||
|
||||
#endif /* TRANS_CLIENT */
|
||||
|
||||
#ifdef TRANS_SERVER
|
||||
|
||||
XtransConnInfo TRANS(OpenCOTSServer)(
|
||||
const char * /* address */
|
||||
);
|
||||
|
||||
#endif /* TRANS_SERVER */
|
||||
|
||||
#ifdef TRANS_CLIENT
|
||||
|
||||
XtransConnInfo TRANS(OpenCLTSClient)(
|
||||
const char * /* address */
|
||||
);
|
||||
|
||||
#endif /* TRANS_CLIENT */
|
||||
|
||||
#ifdef TRANS_SERVER
|
||||
|
||||
XtransConnInfo TRANS(OpenCLTSServer)(
|
||||
const char * /* address */
|
||||
);
|
||||
|
||||
#endif /* TRANS_SERVER */
|
||||
|
||||
#ifdef TRANS_REOPEN
|
||||
|
||||
XtransConnInfo TRANS(ReopenCOTSServer)(
|
||||
int, /* trans_id */
|
||||
int, /* fd */
|
||||
const char * /* port */
|
||||
);
|
||||
|
||||
XtransConnInfo TRANS(ReopenCLTSServer)(
|
||||
int, /* trans_id */
|
||||
int, /* fd */
|
||||
const char * /* port */
|
||||
);
|
||||
|
||||
int TRANS(GetReopenInfo)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
int *, /* trans_id */
|
||||
int *, /* fd */
|
||||
char ** /* port */
|
||||
);
|
||||
|
||||
#endif /* TRANS_REOPEN */
|
||||
|
||||
|
||||
int TRANS(SetOption)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
int, /* option */
|
||||
int /* arg */
|
||||
);
|
||||
|
||||
#ifdef TRANS_SERVER
|
||||
|
||||
int TRANS(CreateListener)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
const char *, /* port */
|
||||
unsigned int /* flags */
|
||||
);
|
||||
|
||||
int TRANS(Received) (
|
||||
const char* /* protocol*/
|
||||
);
|
||||
|
||||
int TRANS(NoListen) (
|
||||
const char* /* protocol*/
|
||||
);
|
||||
|
||||
int TRANS(Listen) (
|
||||
const char* /* protocol*/
|
||||
);
|
||||
|
||||
int TRANS(IsListening) (
|
||||
const char* /* protocol*/
|
||||
);
|
||||
|
||||
int TRANS(ResetListener)(
|
||||
XtransConnInfo /* ciptr */
|
||||
);
|
||||
|
||||
XtransConnInfo TRANS(Accept)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
int * /* status */
|
||||
);
|
||||
|
||||
#endif /* TRANS_SERVER */
|
||||
|
||||
#ifdef TRANS_CLIENT
|
||||
|
||||
int TRANS(Connect)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
const char * /* address */
|
||||
);
|
||||
|
||||
#endif /* TRANS_CLIENT */
|
||||
|
||||
int TRANS(BytesReadable)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
BytesReadable_t * /* pend */
|
||||
);
|
||||
|
||||
int TRANS(Read)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
char *, /* buf */
|
||||
int /* size */
|
||||
);
|
||||
|
||||
int TRANS(Write)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
char *, /* buf */
|
||||
int /* size */
|
||||
);
|
||||
|
||||
int TRANS(Readv)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
struct iovec *, /* buf */
|
||||
int /* size */
|
||||
);
|
||||
|
||||
int TRANS(Writev)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
struct iovec *, /* buf */
|
||||
int /* size */
|
||||
);
|
||||
|
||||
int TRANS(SendFd) (XtransConnInfo ciptr, int fd, int do_close);
|
||||
|
||||
int TRANS(RecvFd) (XtransConnInfo ciptr);
|
||||
|
||||
int TRANS(Disconnect)(
|
||||
XtransConnInfo /* ciptr */
|
||||
);
|
||||
|
||||
int TRANS(Close)(
|
||||
XtransConnInfo /* ciptr */
|
||||
);
|
||||
|
||||
int TRANS(CloseForCloning)(
|
||||
XtransConnInfo /* ciptr */
|
||||
);
|
||||
|
||||
int TRANS(IsLocal)(
|
||||
XtransConnInfo /* ciptr */
|
||||
);
|
||||
|
||||
int TRANS(GetMyAddr)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
int *, /* familyp */
|
||||
int *, /* addrlenp */
|
||||
Xtransaddr ** /* addrp */
|
||||
);
|
||||
|
||||
int TRANS(GetPeerAddr)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
int *, /* familyp */
|
||||
int *, /* addrlenp */
|
||||
Xtransaddr ** /* addrp */
|
||||
);
|
||||
|
||||
int TRANS(GetConnectionNumber)(
|
||||
XtransConnInfo /* ciptr */
|
||||
);
|
||||
|
||||
#ifdef TRANS_SERVER
|
||||
|
||||
int TRANS(MakeAllCOTSServerListeners)(
|
||||
const char *, /* port */
|
||||
int *, /* partial */
|
||||
int *, /* count_ret */
|
||||
XtransConnInfo ** /* ciptrs_ret */
|
||||
);
|
||||
|
||||
int TRANS(MakeAllCLTSServerListeners)(
|
||||
const char *, /* port */
|
||||
int *, /* partial */
|
||||
int *, /* count_ret */
|
||||
XtransConnInfo ** /* ciptrs_ret */
|
||||
);
|
||||
|
||||
#endif /* TRANS_SERVER */
|
||||
|
||||
|
||||
/*
|
||||
* Function Prototypes for Utility Functions.
|
||||
*/
|
||||
|
||||
#ifdef X11_t
|
||||
|
||||
int TRANS(ConvertAddress)(
|
||||
int *, /* familyp */
|
||||
int *, /* addrlenp */
|
||||
Xtransaddr ** /* addrp */
|
||||
);
|
||||
|
||||
#endif /* X11_t */
|
||||
|
||||
#ifdef ICE_t
|
||||
|
||||
char *
|
||||
TRANS(GetMyNetworkId)(
|
||||
XtransConnInfo /* ciptr */
|
||||
);
|
||||
|
||||
char *
|
||||
TRANS(GetPeerNetworkId)(
|
||||
XtransConnInfo /* ciptr */
|
||||
);
|
||||
|
||||
#endif /* ICE_t */
|
||||
|
||||
int
|
||||
TRANS(GetHostname) (
|
||||
char * /* buf */,
|
||||
int /* maxlen */
|
||||
);
|
||||
|
||||
#if defined(WIN32) && defined(TCPCONN)
|
||||
int TRANS(WSAStartup)();
|
||||
#endif
|
||||
|
||||
#endif /* _XTRANS_H_ */
|
||||
|
|
@ -1,464 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright 1993, 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 1993, 1994 NCR Corporation - Dayton, Ohio, USA
|
||||
*
|
||||
* 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 NCR not be used in advertising
|
||||
* or publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. NCR makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
|
||||
* NO EVENT SHALL NCR 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 _XTRANSINT_H_
|
||||
#define _XTRANSINT_H_
|
||||
|
||||
/*
|
||||
* XTRANSDEBUG will enable the PRMSG() macros used in the X Transport
|
||||
* Interface code. Each use of the PRMSG macro has a level associated with
|
||||
* it. XTRANSDEBUG is defined to be a level. If the invocation level is =<
|
||||
* the value of XTRANSDEBUG, then the message will be printed out to stderr.
|
||||
* Recommended levels are:
|
||||
*
|
||||
* XTRANSDEBUG=1 Error messages
|
||||
* XTRANSDEBUG=2 API Function Tracing
|
||||
* XTRANSDEBUG=3 All Function Tracing
|
||||
* XTRANSDEBUG=4 printing of intermediate values
|
||||
* XTRANSDEBUG=5 really detailed stuff
|
||||
#define XTRANSDEBUG 2
|
||||
*
|
||||
* Defining XTRANSDEBUGTIMESTAMP will cause printing timestamps with each
|
||||
* message.
|
||||
*/
|
||||
|
||||
#if !defined(XTRANSDEBUG) && defined(XTRANS_TRANSPORT_C)
|
||||
# define XTRANSDEBUG 1
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# define _WILLWINSOCK_
|
||||
#endif
|
||||
|
||||
#include "Xtrans.h"
|
||||
|
||||
#ifndef _X_UNUSED /* Defined in Xfuncproto.h in xproto >= 7.0.22 */
|
||||
# define _X_UNUSED /* */
|
||||
#endif
|
||||
|
||||
#ifdef XTRANSDEBUG
|
||||
# include <stdio.h>
|
||||
#endif /* XTRANSDEBUG */
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef WIN32
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <arpa/inet.h>
|
||||
|
||||
/*
|
||||
* Moved the setting of NEED_UTSNAME to this header file from Xtrans.c,
|
||||
* to avoid a race condition. JKJ (6/5/97)
|
||||
*/
|
||||
|
||||
# if defined(_POSIX_SOURCE) || defined(USG) || defined(SVR4) || defined(__SVR4) || defined(__SCO__)
|
||||
# ifndef NEED_UTSNAME
|
||||
# define NEED_UTSNAME
|
||||
# endif
|
||||
# include <sys/utsname.h>
|
||||
# endif
|
||||
|
||||
# define ESET(val) errno = val
|
||||
# define EGET() errno
|
||||
|
||||
#else /* WIN32 */
|
||||
|
||||
# include <limits.h> /* for USHRT_MAX */
|
||||
|
||||
# define ESET(val) WSASetLastError(val)
|
||||
# define EGET() WSAGetLastError()
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef X11_t
|
||||
#define X_TCP_PORT 6000
|
||||
#endif
|
||||
|
||||
#if XTRANS_SEND_FDS
|
||||
|
||||
struct _XtransConnFd {
|
||||
struct _XtransConnFd *next;
|
||||
int fd;
|
||||
int do_close;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
struct _XtransConnInfo {
|
||||
struct _Xtransport *transptr;
|
||||
int index;
|
||||
char *priv;
|
||||
int flags;
|
||||
int fd;
|
||||
char *port;
|
||||
int family;
|
||||
char *addr;
|
||||
int addrlen;
|
||||
char *peeraddr;
|
||||
int peeraddrlen;
|
||||
struct _XtransConnFd *recv_fds;
|
||||
struct _XtransConnFd *send_fds;
|
||||
};
|
||||
|
||||
#define XTRANS_OPEN_COTS_CLIENT 1
|
||||
#define XTRANS_OPEN_COTS_SERVER 2
|
||||
#define XTRANS_OPEN_CLTS_CLIENT 3
|
||||
#define XTRANS_OPEN_CLTS_SERVER 4
|
||||
|
||||
|
||||
typedef struct _Xtransport {
|
||||
const char *TransName;
|
||||
int flags;
|
||||
|
||||
#ifdef TRANS_CLIENT
|
||||
|
||||
XtransConnInfo (*OpenCOTSClient)(
|
||||
struct _Xtransport *, /* transport */
|
||||
const char *, /* protocol */
|
||||
const char *, /* host */
|
||||
const char * /* port */
|
||||
);
|
||||
|
||||
#endif /* TRANS_CLIENT */
|
||||
|
||||
#ifdef TRANS_SERVER
|
||||
const char ** nolisten;
|
||||
XtransConnInfo (*OpenCOTSServer)(
|
||||
struct _Xtransport *, /* transport */
|
||||
const char *, /* protocol */
|
||||
const char *, /* host */
|
||||
const char * /* port */
|
||||
);
|
||||
|
||||
#endif /* TRANS_SERVER */
|
||||
|
||||
#ifdef TRANS_CLIENT
|
||||
|
||||
XtransConnInfo (*OpenCLTSClient)(
|
||||
struct _Xtransport *, /* transport */
|
||||
const char *, /* protocol */
|
||||
const char *, /* host */
|
||||
const char * /* port */
|
||||
);
|
||||
|
||||
#endif /* TRANS_CLIENT */
|
||||
|
||||
#ifdef TRANS_SERVER
|
||||
|
||||
XtransConnInfo (*OpenCLTSServer)(
|
||||
struct _Xtransport *, /* transport */
|
||||
const char *, /* protocol */
|
||||
const char *, /* host */
|
||||
const char * /* port */
|
||||
);
|
||||
|
||||
#endif /* TRANS_SERVER */
|
||||
|
||||
|
||||
#ifdef TRANS_REOPEN
|
||||
|
||||
XtransConnInfo (*ReopenCOTSServer)(
|
||||
struct _Xtransport *, /* transport */
|
||||
int, /* fd */
|
||||
const char * /* port */
|
||||
);
|
||||
|
||||
XtransConnInfo (*ReopenCLTSServer)(
|
||||
struct _Xtransport *, /* transport */
|
||||
int, /* fd */
|
||||
const char * /* port */
|
||||
);
|
||||
|
||||
#endif /* TRANS_REOPEN */
|
||||
|
||||
|
||||
int (*SetOption)(
|
||||
XtransConnInfo, /* connection */
|
||||
int, /* option */
|
||||
int /* arg */
|
||||
);
|
||||
|
||||
#ifdef TRANS_SERVER
|
||||
/* Flags */
|
||||
# define ADDR_IN_USE_ALLOWED 1
|
||||
|
||||
int (*CreateListener)(
|
||||
XtransConnInfo, /* connection */
|
||||
const char *, /* port */
|
||||
unsigned int /* flags */
|
||||
);
|
||||
|
||||
int (*ResetListener)(
|
||||
XtransConnInfo /* connection */
|
||||
);
|
||||
|
||||
XtransConnInfo (*Accept)(
|
||||
XtransConnInfo, /* connection */
|
||||
int * /* status */
|
||||
);
|
||||
|
||||
#endif /* TRANS_SERVER */
|
||||
|
||||
#ifdef TRANS_CLIENT
|
||||
|
||||
int (*Connect)(
|
||||
XtransConnInfo, /* connection */
|
||||
const char *, /* host */
|
||||
const char * /* port */
|
||||
);
|
||||
|
||||
#endif /* TRANS_CLIENT */
|
||||
|
||||
int (*BytesReadable)(
|
||||
XtransConnInfo, /* connection */
|
||||
BytesReadable_t * /* pend */
|
||||
);
|
||||
|
||||
int (*Read)(
|
||||
XtransConnInfo, /* connection */
|
||||
char *, /* buf */
|
||||
int /* size */
|
||||
);
|
||||
|
||||
int (*Write)(
|
||||
XtransConnInfo, /* connection */
|
||||
char *, /* buf */
|
||||
int /* size */
|
||||
);
|
||||
|
||||
int (*Readv)(
|
||||
XtransConnInfo, /* connection */
|
||||
struct iovec *, /* buf */
|
||||
int /* size */
|
||||
);
|
||||
|
||||
int (*Writev)(
|
||||
XtransConnInfo, /* connection */
|
||||
struct iovec *, /* buf */
|
||||
int /* size */
|
||||
);
|
||||
|
||||
#if XTRANS_SEND_FDS
|
||||
int (*SendFd)(
|
||||
XtransConnInfo, /* connection */
|
||||
int, /* fd */
|
||||
int /* do_close */
|
||||
);
|
||||
|
||||
int (*RecvFd)(
|
||||
XtransConnInfo /* connection */
|
||||
);
|
||||
#endif
|
||||
|
||||
int (*Disconnect)(
|
||||
XtransConnInfo /* connection */
|
||||
);
|
||||
|
||||
int (*Close)(
|
||||
XtransConnInfo /* connection */
|
||||
);
|
||||
|
||||
int (*CloseForCloning)(
|
||||
XtransConnInfo /* connection */
|
||||
);
|
||||
|
||||
} Xtransport;
|
||||
|
||||
|
||||
typedef struct _Xtransport_table {
|
||||
Xtransport *transport;
|
||||
int transport_id;
|
||||
} Xtransport_table;
|
||||
|
||||
|
||||
/*
|
||||
* Flags for the flags member of Xtransport.
|
||||
*/
|
||||
|
||||
#define TRANS_ALIAS (1<<0) /* record is an alias, don't create server */
|
||||
#define TRANS_LOCAL (1<<1) /* local transport */
|
||||
#define TRANS_DISABLED (1<<2) /* Don't open this one */
|
||||
#define TRANS_NOLISTEN (1<<3) /* Don't listen on this one */
|
||||
#define TRANS_NOUNLINK (1<<4) /* Don't unlink transport endpoints */
|
||||
#define TRANS_ABSTRACT (1<<5) /* Use abstract sockets if available */
|
||||
#define TRANS_NOXAUTH (1<<6) /* Don't verify authentication (because it's secure some other way at the OS layer) */
|
||||
#define TRANS_RECEIVED (1<<7) /* The fd for this has already been opened by someone else. */
|
||||
|
||||
/* Flags to preserve when setting others */
|
||||
#define TRANS_KEEPFLAGS (TRANS_NOUNLINK|TRANS_ABSTRACT)
|
||||
|
||||
#ifdef XTRANS_TRANSPORT_C /* only provide static function prototypes when
|
||||
building the transport.c file that has them in */
|
||||
|
||||
#ifdef __clang__
|
||||
/* Not all clients make use of all provided statics */
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* readv() and writev() don't exist or don't work correctly on some
|
||||
* systems, so they may be emulated.
|
||||
*/
|
||||
|
||||
#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32)
|
||||
|
||||
#define READV(ciptr, iov, iovcnt) TRANS(ReadV)(ciptr, iov, iovcnt)
|
||||
|
||||
static int TRANS(ReadV)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
struct iovec *, /* iov */
|
||||
int /* iovcnt */
|
||||
);
|
||||
|
||||
#else
|
||||
|
||||
#define READV(ciptr, iov, iovcnt) readv(ciptr->fd, iov, iovcnt)
|
||||
|
||||
#endif /* CRAY || (SYSV && __i386__) || WIN32 || __sxg__ || */
|
||||
|
||||
|
||||
#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32)
|
||||
|
||||
#define WRITEV(ciptr, iov, iovcnt) TRANS(WriteV)(ciptr, iov, iovcnt)
|
||||
|
||||
static int TRANS(WriteV)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
struct iovec *, /* iov */
|
||||
int /* iovcnt */
|
||||
);
|
||||
|
||||
#else
|
||||
|
||||
#define WRITEV(ciptr, iov, iovcnt) writev(ciptr->fd, iov, iovcnt)
|
||||
|
||||
#endif /* CRAY || WIN32 || __sxg__ */
|
||||
|
||||
|
||||
static int is_numeric (
|
||||
const char * /* str */
|
||||
);
|
||||
|
||||
#ifdef TRANS_SERVER
|
||||
static int trans_mkdir (
|
||||
const char *, /* path */
|
||||
int /* mode */
|
||||
);
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Some XTRANSDEBUG stuff
|
||||
*/
|
||||
|
||||
#ifdef XTRANSDEBUG
|
||||
#include <stdarg.h>
|
||||
|
||||
/*
|
||||
* The X server provides ErrorF() & VErrorF(), for other software that uses
|
||||
* xtrans, we provide our own simple versions.
|
||||
*/
|
||||
# if defined(XSERV_t) && defined(TRANS_SERVER)
|
||||
# include "os.h"
|
||||
# else
|
||||
static inline void _X_ATTRIBUTE_PRINTF(1, 0)
|
||||
VErrorF(const char *f, va_list args)
|
||||
{
|
||||
vfprintf(stderr, f, args);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
static inline void _X_ATTRIBUTE_PRINTF(1, 2)
|
||||
ErrorF(const char *f, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, f);
|
||||
VErrorF(f, args);
|
||||
va_end(args);
|
||||
}
|
||||
# endif /* xserver */
|
||||
#endif /* XTRANSDEBUG */
|
||||
|
||||
static inline void _X_ATTRIBUTE_PRINTF(2, 3)
|
||||
prmsg(int lvl, const char *f, ...)
|
||||
{
|
||||
#ifdef XTRANSDEBUG
|
||||
va_list args;
|
||||
|
||||
va_start(args, f);
|
||||
if (lvl <= XTRANSDEBUG) {
|
||||
int saveerrno = errno;
|
||||
|
||||
ErrorF("%s", __xtransname);
|
||||
VErrorF(f, args);
|
||||
|
||||
# ifdef XTRANSDEBUGTIMESTAMP
|
||||
{
|
||||
struct timeval tp;
|
||||
gettimeofday(&tp, 0);
|
||||
ErrorF("timestamp (ms): %d\n",
|
||||
tp.tv_sec * 1000 + tp.tv_usec / 1000);
|
||||
}
|
||||
# endif
|
||||
errno = saveerrno;
|
||||
}
|
||||
va_end(args);
|
||||
#endif /* XTRANSDEBUG */
|
||||
}
|
||||
|
||||
#endif /* XTRANS_TRANSPORT_C */
|
||||
|
||||
#endif /* _XTRANSINT_H_ */
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue