X11を入れ込む

守矢諏訪子 <suwako@076.moe>、2026-06-25 00:03
コミット 2ae4f5bc20a9d50571f401b0321a79ebac53fc6b ・親 21fbc5c ・ファイルを見る

489個のファイル、+19986 -9(多過ぎるので途中まで)

@@ -13,7 +13,6 @@
1313 set(BUILD_SHARED_LIBS OFF CACHE BOOL "静的リンク" FORCE)
1414
1515 if(MSVC)
16- # set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Release>:Release>")
1716 set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
1817 add_compile_options(/utf-8)
1918 endif()
@@ -28,6 +27,10 @@
2827 option(GLFW_INSTALL OFF)
2928 add_subdirectory(deps/glfw)
3029
30+if(UNIX)
31+ find_package(OpenGL REQUIRED)
32+endif()
33+
3134 add_subdirectory(deps/glm)
3235 add_subdirectory(deps/imgui)
3336 add_subdirectory(deps/luajit)
@@ -35,23 +38,69 @@
3538 add_subdirectory(deps/sqlite)
3639 add_subdirectory(deps/stb_image)
3740
38-
3941 file(GLOB_RECURSE SHADERPLAYGROUND_SRC CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc")
4042 file(GLOB_RECURSE SHADERPLAYGROUND_INC CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.hh")
4143
4244 add_executable(shaderplayground main.cc ${SHADERPLAYGROUND_SRC} ${SHADERPLAYGROUND_INC})
4345 set_target_properties(shaderplayground PROPERTIES CXX_STANDARD 20)
4446
47+set(PLATFORM_LIBS "")
48+
4549 if(UNIX)
4650 if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
47- message(STATUS "Solaris又はIllumosで静的リンクが不可能為、動的リンクで伺います。")
48- elseif(CMAKE_SYSTEM_NAME STREQUAL "Haiku")
49- message(STATUS "Haikuで静的リンクが不可能為、動的リンクで伺います。")
50- elseif(APPLE)
51- target_link_options(shaderplayground PRIVATE -static -static-libstdc++ -static-libgcc)
51+ message(STATUS "【!】Solaris又はIllumosで静的リンクが不可能為、動的リンクで伺います。")
5252 else()
53- target_link_options(shaderplayground PRIVATE -static)
53+ target_link_options(shaderplayground PRIVATE -static-libstdc++ -static-libgcc)
5454 endif()
55+
56+ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
57+ list(APPEND PLATFORM_LIBS
58+ -Wl,-Bstatic
59+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/illumos-x64/libX11.a
60+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/illumos-x64/libxcb.a
61+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/illumos-x64/libXau.a
62+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/illumos-x64/libXdmcp.a
63+ -Wl,-Bdynamic
64+ )
65+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
66+ list(APPEND PLATFORM_LIBS
67+ -Wl,-Bstatic
68+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/linux-x64/libX11.a
69+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/linux-x64/libxcb.a
70+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/linux-x64/libXau.a
71+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/linux-x64/libXdmcp.a
72+ -Wl,-Bdynamic
73+ )
74+ elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
75+ list(APPEND PLATFORM_LIBS
76+ -Wl,-Bstatic
77+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/freebsd-x64/libX11.a
78+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/freebsd-x64/libxcb.a
79+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/freebsd-x64/libXau.a
80+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/freebsd-x64/libXdmcp.a
81+ -Wl,-Bdynamic
82+ )
83+ elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
84+ list(APPEND PLATFORM_LIBS
85+ -Wl,-Bstatic
86+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/openbsd-x64/libX11.a
87+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/openbsd-x64/libxcb.a
88+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/openbsd-x64/libXau.a
89+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/openbsd-x64/libXdmcp.a
90+ -Wl,-Bdynamic
91+ )
92+ elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
93+ list(APPEND PLATFORM_LIBS
94+ -Wl,-Bstatic
95+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/netbsd-x64/libX11.a
96+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/netbsd-x64/libxcb.a
97+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/netbsd-x64/libXau.a
98+ ${CMAKE_SOURCE_DIR}/deps/xlibre/lib/netbsd-x64/libXdmcp.a
99+ -Wl,-Bdynamic
100+ )
101+ endif()
102+
103+ list(APPEND PLATFORM_LIBS OpenGL::GL)
55104 endif()
56105
57106 if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
@@ -123,6 +172,7 @@
123172 luajit
124173 sqlite3
125174 sol2
175+ ${PLATFORM_LIBS}
126176 )
127177
128178 target_include_directories(shaderplayground PRIVATE
@@ -17,7 +17,7 @@
1717 elseif(UNIX AND CMAKE_SYSTEM_NAME STREQUAL "SunOS")
1818 set(LUAJIT_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/illumos-x64)
1919 endif()
20- set(LUAJIT_LIB ${LUAJIT_LIB_DIR}/luajit.a)
20+ set(LUAJIT_LIB ${LUAJIT_LIB_DIR}/libluajit.a)
2121 endif()
2222
2323 add_library(luajit STATIC IMPORTED GLOBAL)
@@ -0,0 +1,31 @@
1+cmake_minimum_required(VERSION 3.14...3.28)
2+project(xlibre LANGUAGES C)
3+
4+if(UNIX)
5+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
6+ set(XLIBRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/linux-x64)
7+ elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
8+ set(XLIBRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/freebsd-x64)
9+ elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
10+ set(XLIBRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/openbsd-x64)
11+ elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
12+ set(LCMAKE_CURRENT_SOURCE_DIR}/lib/netbsd-x64)
13+ elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
14+ set(XLIBRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/illumos-x64)
15+ endif()
16+ set(XLIBRE_LIB
17+ ${XLIBRE_LIB_DIR}/libX11.a
18+ ${XLIBRE_LIB_DIR}/libX11-xcb.a
19+ ${XLIBRE_LIB_DIR}/libxcb.a
20+ )
21+endif()
22+
23+add_library(xlibre STATIC IMPORTED GLOBAL)
24+set_target_properties(xlibre PROPERTIES
25+ IMPORTED_LOCATION "${XLIBRE_LIB}"
26+ INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include"
27+)
28+
29+if(UNIX)
30+ target_link_libraries(xlibre INTERFACE m dl)
31+endif()
@@ -0,0 +1,123 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/****************************************************************
49+ *
50+ * Callbacks
51+ *
52+ ****************************************************************/
53+
54+typedef XrmResource **CallbackTable;
55+
56+#define _XtCBCalling 1
57+#define _XtCBFreeAfterCalling 2
58+
59+_XFUNCPROTOBEGIN
60+
61+typedef struct internalCallbackRec {
62+ unsigned short count;
63+ char is_padded; /* contains NULL padding for external form */
64+ char call_state; /* combination of _XtCB{FreeAfter}Calling */
65+#if __STDC_VERSION__ >= 199901L
66+ /* When compiling with C99 or newer, use a flexible member to ensure
67+ * padding and alignment for sizeof(). */
68+ XtCallbackRec callbacks[];
69+#elif defined(LONG64)
70+ unsigned int align_pad; /* padding to align callback list */
71+#endif
72+ /* XtCallbackList */
73+} InternalCallbackRec, *InternalCallbackList;
74+
75+typedef Boolean (*_XtConditionProc)(
76+ XtPointer /* data */
77+);
78+
79+extern void _XtAddCallback(
80+ InternalCallbackList* /* callbacks */,
81+ XtCallbackProc /* callback */,
82+ XtPointer /* closure */
83+);
84+
85+extern void _XtAddCallbackOnce(
86+ InternalCallbackList* /* callbacks */,
87+ XtCallbackProc /* callback */,
88+ XtPointer /* closure */
89+);
90+
91+extern InternalCallbackList _XtCompileCallbackList(
92+ XtCallbackList /* xtcallbacks */
93+);
94+
95+extern XtCallbackList _XtGetCallbackList(
96+ InternalCallbackList* /* callbacks */
97+);
98+
99+extern void _XtRemoveAllCallbacks(
100+ InternalCallbackList* /* callbacks */
101+);
102+
103+extern void _XtRemoveCallback(
104+ InternalCallbackList* /* callbacks */,
105+ XtCallbackProc /* callback */,
106+ XtPointer /* closure */
107+);
108+
109+extern void _XtPeekCallback(
110+ Widget /* widget */,
111+ XtCallbackList /* callbacks */,
112+ XtCallbackProc * /* callback */,
113+ XtPointer * /* closure */
114+);
115+
116+extern void _XtCallConditionalCallbackList(
117+ Widget /* widget */,
118+ XtCallbackList /* callbacks */,
119+ XtPointer /* call_data */,
120+ _XtConditionProc /* cond_proc */
121+);
122+
123+_XFUNCPROTOEND
@@ -0,0 +1,100 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtComposite_h
49+#define _XtComposite_h
50+
51+typedef struct _CompositeClassRec *CompositeWidgetClass;
52+
53+typedef Cardinal (*XtOrderProc)(
54+ Widget /* child */
55+);
56+
57+_XFUNCPROTOBEGIN
58+
59+extern void XtManageChildren(
60+ WidgetList /* children */,
61+ Cardinal /* num_children */
62+);
63+
64+extern void XtManageChild(
65+ Widget /* child */
66+);
67+
68+extern void XtUnmanageChildren(
69+ WidgetList /* children */,
70+ Cardinal /* num_children */
71+);
72+
73+extern void XtUnmanageChild(
74+ Widget /* child */
75+);
76+
77+typedef void (*XtDoChangeProc)(
78+ Widget /* composite_parent */,
79+ WidgetList /* unmanage_children */,
80+ Cardinal * /* num_unmanage_children */,
81+ WidgetList /* manage_children */,
82+ Cardinal * /* num_manage_children */,
83+ XtPointer /* client_data */
84+);
85+
86+extern void XtChangeManagedSet(
87+ WidgetList /* unmanage_children */,
88+ Cardinal /* num_unmanage_children */,
89+ XtDoChangeProc /* do_change_proc */,
90+ XtPointer /* client_data */,
91+ WidgetList /* manage_children */,
92+ Cardinal /* num_manage_children */
93+);
94+
95+_XFUNCPROTOEND
96+
97+externalref WidgetClass compositeWidgetClass;
98+
99+#endif /* _XtComposite_h */
100+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,113 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtCompositeP_h
49+#define _XtCompositeP_h
50+
51+#include <X11/Composite.h>
52+
53+_XFUNCPROTOBEGIN
54+
55+/************************************************************************
56+ *
57+ * Additional instance fields for widgets of (sub)class 'Composite'
58+ *
59+ ************************************************************************/
60+
61+typedef struct _CompositePart {
62+ WidgetList children; /* array of ALL widget children */
63+ Cardinal num_children; /* total number of widget children */
64+ Cardinal num_slots; /* number of slots in children array */
65+ XtOrderProc insert_position; /* compute position of new child */
66+} CompositePart,*CompositePtr;
67+
68+typedef struct _CompositeRec {
69+ CorePart core;
70+ CompositePart composite;
71+} CompositeRec;
72+
73+/*********************************************************************
74+ *
75+ * Additional class fields for widgets of (sub)class 'Composite'
76+ *
77+ ********************************************************************/
78+
79+typedef struct _CompositeClassPart {
80+ XtGeometryHandler geometry_manager; /* geometry manager for children */
81+ XtWidgetProc change_managed; /* change managed state of child */
82+ XtWidgetProc insert_child; /* physically add child to parent */
83+ XtWidgetProc delete_child; /* physically remove child */
84+ XtPointer extension; /* pointer to extension record */
85+} CompositeClassPart,*CompositePartPtr;
86+
87+typedef struct {
88+ XtPointer next_extension; /* 1st 4 mandated for all extension records */
89+ XrmQuark record_type; /* NULLQUARK; on CompositeClassPart */
90+ long version; /* must be XtCompositeExtensionVersion */
91+ Cardinal record_size; /* sizeof(CompositeClassExtensionRec) */
92+ Boolean accepts_objects;
93+ Boolean allows_change_managed_set;
94+} CompositeClassExtensionRec, *CompositeClassExtension;
95+
96+
97+typedef struct _CompositeClassRec {
98+ CoreClassPart core_class;
99+ CompositeClassPart composite_class;
100+} CompositeClassRec;
101+
102+externalref CompositeClassRec compositeClassRec;
103+
104+_XFUNCPROTOEND
105+
106+#define XtCompositeExtensionVersion 2L
107+#define XtInheritGeometryManager ((XtGeometryHandler) _XtInherit)
108+#define XtInheritChangeManaged ((XtWidgetProc) _XtInherit)
109+#define XtInheritInsertChild ((XtWidgetProc) _XtInherit)
110+#define XtInheritDeleteChild ((XtWidgetProc) _XtInherit)
111+
112+#endif /* _XtCompositeP_h */
113+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,96 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtConstraintP_h
49+#define _XtConstraintP_h
50+
51+#include <X11/Constraint.h>
52+
53+_XFUNCPROTOBEGIN
54+
55+typedef struct _ConstraintPart {
56+ XtPointer mumble; /* No new fields, keep C compiler happy */
57+} ConstraintPart;
58+
59+typedef struct _ConstraintRec {
60+ CorePart core;
61+ CompositePart composite;
62+ ConstraintPart constraint;
63+} ConstraintRec, *ConstraintWidget;
64+
65+typedef struct _ConstraintClassPart {
66+ XtResourceList resources; /* constraint resource list */
67+ Cardinal num_resources; /* number of constraints in list */
68+ Cardinal constraint_size; /* size of constraint record */
69+ XtInitProc initialize; /* constraint initialization */
70+ XtWidgetProc destroy; /* constraint destroy proc */
71+ XtSetValuesFunc set_values; /* constraint set_values proc */
72+ XtPointer extension; /* pointer to extension record */
73+} ConstraintClassPart;
74+
75+typedef struct {
76+ XtPointer next_extension; /* 1st 4 mandated for all extension records */
77+ XrmQuark record_type; /* NULLQUARK; on ConstraintClassPart */
78+ long version; /* must be XtConstraintExtensionVersion */
79+ Cardinal record_size; /* sizeof(ConstraintClassExtensionRec) */
80+ XtArgsProc get_values_hook;
81+} ConstraintClassExtensionRec, *ConstraintClassExtension;
82+
83+typedef struct _ConstraintClassRec {
84+ CoreClassPart core_class;
85+ CompositeClassPart composite_class;
86+ ConstraintClassPart constraint_class;
87+} ConstraintClassRec;
88+
89+externalref ConstraintClassRec constraintClassRec;
90+
91+_XFUNCPROTOEND
92+
93+#define XtConstraintExtensionVersion 1L
94+
95+#endif /* _XtConstraintP_h */
96+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,60 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtConstraint_h
49+#define _XtConstraint_h
50+
51+_XFUNCPROTOBEGIN
52+
53+typedef struct _ConstraintClassRec *ConstraintWidgetClass;
54+
55+externalref WidgetClass constraintWidgetClass;
56+
57+_XFUNCPROTOEND
58+
59+#endif /* _XtConstraint_h */
60+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,100 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+_XFUNCPROTOBEGIN
49+
50+/* Representation types */
51+
52+extern XrmQuark _XtQString;
53+
54+/*
55+ * Resource conversions
56+ */
57+
58+typedef struct _ConverterRec **ConverterTable;
59+
60+extern void _XtAddDefaultConverters(
61+ ConverterTable /* table */
62+);
63+
64+extern void _XtSetDefaultConverterTable(
65+ ConverterTable* /* table */
66+);
67+
68+extern void _XtFreeConverterTable(
69+ ConverterTable /* table */
70+);
71+
72+extern void _XtTableAddConverter(
73+ ConverterTable /* table */,
74+ XrmRepresentation /* from_type */,
75+ XrmRepresentation /* to_type */,
76+ XtTypeConverter /* converter */,
77+ XtConvertArgRec const * /* convert_args */,
78+ Cardinal /* num_args */,
79+ _XtBoolean /* new_style */,
80+ XtCacheType /* cache_type */,
81+ XtDestructor /* destructor */,
82+ _XtBoolean /* global */
83+);
84+
85+extern Boolean _XtConvert(
86+ Widget /* widget */,
87+ XrmRepresentation /* from_type */,
88+ XrmValuePtr /* from */,
89+ XrmRepresentation /* to_type */,
90+ XrmValuePtr /* to */,
91+ XtCacheRef* /* cache_ref_return */
92+);
93+
94+void _XtConvertInitialize(void);
95+
96+#ifdef DEBUG
97+void _XtConverterCacheStats(void);
98+#endif
99+
100+_XFUNCPROTOEND
@@ -0,0 +1,63 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtCore_h
49+#define _XtCore_h
50+
51+_XFUNCPROTOBEGIN
52+
53+typedef struct _WidgetClassRec *CoreWidgetClass;
54+typedef struct _WidgetRec *CoreWidget;
55+externalref WidgetClass coreWidgetClass;
56+
57+externalref WidgetClass widgetClass;
58+
59+
60+_XFUNCPROTOEND
61+
62+#endif /* _XtCore_h */
63+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,170 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef XtCoreP_h
49+#define XtCoreP_h
50+
51+#include <X11/Core.h>
52+
53+_XFUNCPROTOBEGIN
54+
55+externalref int _XtInheritTranslations;
56+
57+#define XtInheritTranslations ((String) &_XtInheritTranslations)
58+#define XtInheritRealize ((XtRealizeProc) _XtInherit)
59+#define XtInheritResize ((XtWidgetProc) _XtInherit)
60+#define XtInheritExpose ((XtExposeProc) _XtInherit)
61+#define XtInheritSetValuesAlmost ((XtAlmostProc) _XtInherit)
62+#define XtInheritAcceptFocus ((XtAcceptFocusProc) _XtInherit)
63+#define XtInheritQueryGeometry ((XtGeometryHandler) _XtInherit)
64+#define XtInheritDisplayAccelerator ((XtStringProc) _XtInherit)
65+
66+/***************************************************************
67+ * Widget Core Data Structures
68+ *
69+ *
70+ **************************************************************/
71+
72+typedef struct _CorePart {
73+ Widget self; /* pointer to widget itself */
74+ WidgetClass widget_class; /* pointer to Widget's ClassRec */
75+ Widget parent; /* parent widget */
76+ XrmName xrm_name; /* widget resource name quarkified */
77+ Boolean being_destroyed; /* marked for destroy */
78+ XtCallbackList destroy_callbacks; /* who to call when widget destroyed */
79+ XtPointer constraints; /* constraint record */
80+ Position x, y; /* window position */
81+ Dimension width, height; /* window dimensions */
82+ Dimension border_width; /* window border width */
83+ Boolean managed; /* is widget geometry managed? */
84+ Boolean sensitive; /* is widget sensitive to user events*/
85+ Boolean ancestor_sensitive; /* are all ancestors sensitive? */
86+ XtEventTable event_table; /* private to event dispatcher */
87+ XtTMRec tm; /* translation management */
88+ XtTranslations accelerators; /* accelerator translations */
89+ Pixel border_pixel; /* window border pixel */
90+ Pixmap border_pixmap; /* window border pixmap or NULL */
91+ WidgetList popup_list; /* list of popups */
92+ Cardinal num_popups; /* how many popups */
93+ String name; /* widget resource name */
94+ Screen *screen; /* window's screen */
95+ Colormap colormap; /* colormap */
96+ Window window; /* window ID */
97+ Cardinal depth; /* number of planes in window */
98+ Pixel background_pixel; /* window background pixel */
99+ Pixmap background_pixmap; /* window background pixmap or NULL */
100+ Boolean visible; /* is window mapped and not occluded?*/
101+ Boolean mapped_when_managed;/* map window if it's managed? */
102+} CorePart;
103+
104+typedef struct _WidgetRec {
105+ CorePart core;
106+ } WidgetRec, CoreRec;
107+
108+
109+
110+/******************************************************************
111+ *
112+ * Core Class Structure. Widgets, regardless of their class, will have
113+ * these fields. All widgets of a given class will have the same values
114+ * for these fields. Widgets of a given class may also have additional
115+ * common fields. These additional fields are included in incremental
116+ * class structures, such as CommandClass.
117+ *
118+ * The fields that are specific to this subclass, as opposed to fields that
119+ * are part of the superclass, are called "subclass fields" below. Many
120+ * procedures are responsible only for the subclass fields, and not for
121+ * any superclass fields.
122+ *
123+ ********************************************************************/
124+
125+typedef struct _CoreClassPart {
126+ WidgetClass superclass; /* pointer to superclass ClassRec */
127+ String class_name; /* widget resource class name */
128+ Cardinal widget_size; /* size in bytes of widget record */
129+ XtProc class_initialize; /* class initialization proc */
130+ XtWidgetClassProc class_part_initialize; /* dynamic initialization */
131+ XtEnum class_inited; /* has class been initialized? */
132+ XtInitProc initialize; /* initialize subclass fields */
133+ XtArgsProc initialize_hook; /* notify that initialize called */
134+ XtRealizeProc realize; /* XCreateWindow for widget */
135+ XtActionList actions; /* widget semantics name to proc map */
136+ Cardinal num_actions; /* number of entries in actions */
137+ XtResourceList resources; /* resources for subclass fields */
138+ Cardinal num_resources; /* number of entries in resources */
139+ XrmClass xrm_class; /* resource class quarkified */
140+ Boolean compress_motion; /* compress MotionNotify for widget */
141+ XtEnum compress_exposure; /* compress Expose events for widget*/
142+ Boolean compress_enterleave;/* compress enter and leave events */
143+ Boolean visible_interest; /* select for VisibilityNotify */
144+ XtWidgetProc destroy; /* free data for subclass pointers */
145+ XtWidgetProc resize; /* geom manager changed widget size */
146+ XtExposeProc expose; /* rediplay window */
147+ XtSetValuesFunc set_values; /* set subclass resource values */
148+ XtArgsFunc set_values_hook; /* notify that set_values called */
149+ XtAlmostProc set_values_almost; /* set_values got "Almost" geo reply */
150+ XtArgsProc get_values_hook; /* notify that get_values called */
151+ XtAcceptFocusProc accept_focus; /* assign input focus to widget */
152+ XtVersionType version; /* version of intrinsics used */
153+ XtPointer callback_private; /* list of callback offsets */
154+ String tm_table; /* state machine */
155+ XtGeometryHandler query_geometry; /* return preferred geometry */
156+ XtStringProc display_accelerator;/* display your accelerator */
157+ XtPointer extension; /* pointer to extension record */
158+ } CoreClassPart;
159+
160+typedef struct _WidgetClassRec {
161+ CoreClassPart core_class;
162+} WidgetClassRec, CoreClassRec;
163+
164+externalref WidgetClassRec widgetClassRec;
165+#define coreClassRec widgetClassRec
166+
167+_XFUNCPROTOEND
168+
169+#endif /* _XtCoreP_h */
170+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,42 @@
1+#ifndef _XtcreateI_h
2+#define _XtcreateI_h
3+
4+_XFUNCPROTOBEGIN
5+
6+extern Widget _XtCreateWidget(String name, WidgetClass widget_class,
7+ Widget parent, ArgList args, Cardinal num_args,
8+ XtTypedArgList typed_args,
9+ Cardinal num_typed_args);
10+extern Widget _XtCreatePopupShell(String name, WidgetClass widget_class,
11+ Widget parent, ArgList args,
12+ Cardinal num_args, XtTypedArgList typed_args,
13+ Cardinal num_typed_args);
14+extern Widget _XtAppCreateShell(String name, String class,
15+ WidgetClass widget_class, Display *display,
16+ ArgList args, Cardinal num_args,
17+ XtTypedArgList typed_args,
18+ Cardinal num_typed_args);
19+extern Widget _XtCreateHookObj(Screen *screen);
20+
21+_XFUNCPROTOEND
22+
23+#include <stdarg.h>
24+
25+_XFUNCPROTOBEGIN
26+
27+/* VarCreate.c */
28+extern Widget _XtVaOpenApplication(XtAppContext *app_context_return,
29+ _Xconst char* application_class,
30+ XrmOptionDescList options, Cardinal num_options,
31+ int *argc_in_out, _XtString *argv_in_out,
32+ String *fallback_resources, WidgetClass widget_class,
33+ va_list var_args);
34+extern Widget _XtVaAppInitialize(XtAppContext *app_context_return,
35+ _Xconst char* application_class,
36+ XrmOptionDescList options, Cardinal num_options,
37+ int *argc_in_out, _XtString *argv_in_out,
38+ String *fallback_resources, va_list var_args);
39+
40+_XFUNCPROTOEND
41+
42+#endif /* _XtcreateI_h */
@@ -0,0 +1,65 @@
1+/***********************************************************
2+
3+Copyright 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * DEC private keysyms
50+ * (29th bit set)
51+ */
52+
53+/* two-key compose sequence initiators, chosen to map to Latin1 characters */
54+
55+#define DXK_ring_accent 0x1000feb0
56+#define DXK_circumflex_accent 0x1000fe5e
57+#define DXK_cedilla_accent 0x1000fe2c
58+#define DXK_acute_accent 0x1000fe27
59+#define DXK_grave_accent 0x1000fe60
60+#define DXK_tilde 0x1000fe7e
61+#define DXK_diaeresis 0x1000fe22
62+
63+/* special keysym for LK2** "Remove" key on editing keypad */
64+
65+#define DXK_Remove 0x1000ff00 /* Remove */
@@ -0,0 +1,134 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * Event.h - exported types and functions for toolkit event handler
50+ *
51+ * Author: Charles Haynes
52+ * Digital Equipment Corporation
53+ * Western Software Laboratory
54+ * Date: Sun Dec 6 1987
55+ */
56+
57+#ifndef _Event_h_
58+#define _Event_h_
59+
60+typedef struct _XtGrabRec *XtGrabList;
61+
62+#include "PassivGraI.h"
63+
64+_XFUNCPROTOBEGIN
65+
66+extern void _XtEventInitialize(
67+ void
68+);
69+
70+typedef struct _XtEventRec {
71+ XtEventTable next;
72+ EventMask mask; /* also select_data count for RecExt */
73+ XtEventHandler proc;
74+ XtPointer closure;
75+ unsigned int select:1;
76+ unsigned int has_type_specifier:1;
77+ unsigned int async:1; /* not used, here for Digital extension? */
78+} XtEventRec;
79+
80+typedef struct _XtGrabRec {
81+ XtGrabList next;
82+ Widget widget;
83+ unsigned int exclusive:1;
84+ unsigned int spring_loaded:1;
85+}XtGrabRec;
86+
87+typedef struct _BlockHookRec {
88+ struct _BlockHookRec* next;
89+ XtAppContext app;
90+ XtBlockHookProc proc;
91+ XtPointer closure;
92+} BlockHookRec, *BlockHook;
93+
94+extern void _XtFreeEventTable(
95+ XtEventTable* /* event_table */
96+);
97+
98+extern Boolean _XtOnGrabList(
99+ Widget /* widget */,
100+ XtGrabRec* /* grabList */
101+);
102+
103+extern void _XtRemoveAllInputs(
104+ XtAppContext /* app */
105+);
106+
107+extern void _XtRefreshMapping(
108+ XEvent* /* event */,
109+ _XtBoolean /* dispatch */
110+);
111+
112+extern void _XtSendFocusEvent(
113+ Widget /* child */,
114+ int /* type */);
115+
116+extern EventMask _XtConvertTypeToMask(
117+ int /* eventType */
118+);
119+
120+/* EventUtil.c */
121+extern Widget _XtFindRemapWidget(XEvent *event, Widget widget,
122+ EventMask mask, XtPerDisplayInput pdi);
123+extern void _XtUngrabBadGrabs(XEvent *event, Widget widget,
124+ EventMask mask, XtPerDisplayInput pdi);
125+extern void _XtFillAncestorList(Widget **listPtr, int *maxElemsPtr,
126+ int *numElemsPtr, Widget start,
127+ Widget breakWidget);
128+
129+/* NextEvent.c */
130+extern Boolean XtAppPeekEvent_SkipTimer;
131+
132+_XFUNCPROTOEND
133+
134+#endif /* _Event_h_ */
@@ -0,0 +1,164 @@
1+/*
2+
3+Copyright 1987, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included
12+in all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the name of The Open Group shall
23+not be used in advertising or otherwise to promote the sale, use or
24+other dealings in this Software without prior written authorization
25+from The Open Group.
26+
27+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
28+
29+ All Rights Reserved
30+
31+Permission to use, copy, modify, and distribute this software and its
32+documentation for any purpose and without fee is hereby granted,
33+provided that the above copyright notice appear in all copies and that
34+both that copyright notice and this permission notice appear in
35+supporting documentation, and that the names of Hewlett Packard
36+or Digital not be
37+used in advertising or publicity pertaining to distribution of the
38+software without specific, written prior permission.
39+
40+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
41+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
42+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
43+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
44+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
46+SOFTWARE.
47+
48+HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
49+TO THIS SOFTWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
51+PURPOSE. Hewlett-Packard shall not be liable for errors
52+contained herein or direct, indirect, special, incidental or
53+consequential damages in connection with the furnishing,
54+performance, or use of this material.
55+
56+*/
57+
58+#ifndef _HPKEYSYM_H
59+
60+#define _HPKEYSYM_H
61+
62+#define hpXK_ClearLine 0x1000ff6f
63+#define hpXK_InsertLine 0x1000ff70
64+#define hpXK_DeleteLine 0x1000ff71
65+#define hpXK_InsertChar 0x1000ff72
66+#define hpXK_DeleteChar 0x1000ff73
67+#define hpXK_BackTab 0x1000ff74
68+#define hpXK_KP_BackTab 0x1000ff75
69+#define hpXK_Modelock1 0x1000ff48
70+#define hpXK_Modelock2 0x1000ff49
71+#define hpXK_Reset 0x1000ff6c
72+#define hpXK_System 0x1000ff6d
73+#define hpXK_User 0x1000ff6e
74+#define hpXK_mute_acute 0x100000a8
75+#define hpXK_mute_grave 0x100000a9
76+#define hpXK_mute_asciicircum 0x100000aa
77+#define hpXK_mute_diaeresis 0x100000ab
78+#define hpXK_mute_asciitilde 0x100000ac
79+#define hpXK_lira 0x100000af
80+#define hpXK_guilder 0x100000be
81+#define hpXK_Ydiaeresis 0x100000ee
82+#define hpXK_IO 0x100000ee /* deprecated alias for hpYdiaeresis */
83+#define hpXK_longminus 0x100000f6
84+#define hpXK_block 0x100000fc
85+
86+
87+#ifndef _OSF_Keysyms
88+#define _OSF_Keysyms
89+
90+#define osfXK_Copy 0x1004ff02
91+#define osfXK_Cut 0x1004ff03
92+#define osfXK_Paste 0x1004ff04
93+#define osfXK_BackTab 0x1004ff07
94+#define osfXK_BackSpace 0x1004ff08
95+#define osfXK_Clear 0x1004ff0b
96+#define osfXK_Escape 0x1004ff1b
97+#define osfXK_AddMode 0x1004ff31
98+#define osfXK_PrimaryPaste 0x1004ff32
99+#define osfXK_QuickPaste 0x1004ff33
100+#define osfXK_PageLeft 0x1004ff40
101+#define osfXK_PageUp 0x1004ff41
102+#define osfXK_PageDown 0x1004ff42
103+#define osfXK_PageRight 0x1004ff43
104+#define osfXK_Activate 0x1004ff44
105+#define osfXK_MenuBar 0x1004ff45
106+#define osfXK_Left 0x1004ff51
107+#define osfXK_Up 0x1004ff52
108+#define osfXK_Right 0x1004ff53
109+#define osfXK_Down 0x1004ff54
110+#define osfXK_EndLine 0x1004ff57
111+#define osfXK_BeginLine 0x1004ff58
112+#define osfXK_EndData 0x1004ff59
113+#define osfXK_BeginData 0x1004ff5a
114+#define osfXK_PrevMenu 0x1004ff5b
115+#define osfXK_NextMenu 0x1004ff5c
116+#define osfXK_PrevField 0x1004ff5d
117+#define osfXK_NextField 0x1004ff5e
118+#define osfXK_Select 0x1004ff60
119+#define osfXK_Insert 0x1004ff63
120+#define osfXK_Undo 0x1004ff65
121+#define osfXK_Menu 0x1004ff67
122+#define osfXK_Cancel 0x1004ff69
123+#define osfXK_Help 0x1004ff6a
124+#define osfXK_SelectAll 0x1004ff71
125+#define osfXK_DeselectAll 0x1004ff72
126+#define osfXK_Reselect 0x1004ff73
127+#define osfXK_Extend 0x1004ff74
128+#define osfXK_Restore 0x1004ff78
129+#define osfXK_Delete 0x1004ffff
130+
131+#endif /* _OSF_Keysyms */
132+
133+
134+/**************************************************************
135+ * The use of the following macros is deprecated.
136+ * They are listed below only for backwards compatibility.
137+ */
138+#define XK_Reset 0x1000ff6c /* deprecated alias for hpReset */
139+#define XK_System 0x1000ff6d /* deprecated alias for hpSystem */
140+#define XK_User 0x1000ff6e /* deprecated alias for hpUser */
141+#define XK_ClearLine 0x1000ff6f /* deprecated alias for hpClearLine */
142+#define XK_InsertLine 0x1000ff70 /* deprecated alias for hpInsertLine */
143+#define XK_DeleteLine 0x1000ff71 /* deprecated alias for hpDeleteLine */
144+#define XK_InsertChar 0x1000ff72 /* deprecated alias for hpInsertChar */
145+#define XK_DeleteChar 0x1000ff73 /* deprecated alias for hpDeleteChar */
146+#define XK_BackTab 0x1000ff74 /* deprecated alias for hpBackTab */
147+#define XK_KP_BackTab 0x1000ff75 /* deprecated alias for hpKP_BackTab */
148+#define XK_Ext16bit_L 0x1000ff76 /* deprecated */
149+#define XK_Ext16bit_R 0x1000ff77 /* deprecated */
150+#define XK_mute_acute 0x100000a8 /* deprecated alias for hpmute_acute */
151+#define XK_mute_grave 0x100000a9 /* deprecated alias for hpmute_grave */
152+#define XK_mute_asciicircum 0x100000aa /* deprecated alias for hpmute_asciicircum */
153+#define XK_mute_diaeresis 0x100000ab /* deprecated alias for hpmute_diaeresis */
154+#define XK_mute_asciitilde 0x100000ac /* deprecated alias for hpmute_asciitilde */
155+#define XK_lira 0x100000af /* deprecated alias for hplira */
156+#define XK_guilder 0x100000be /* deprecated alias for hpguilder */
157+#ifndef XK_Ydiaeresis
158+#define XK_Ydiaeresis 0x100000ee /* deprecated */
159+#endif
160+#define XK_IO 0x100000ee /* deprecated alias for hpYdiaeresis */
161+#define XK_longminus 0x100000f6 /* deprecated alias for hplongminus */
162+#define XK_block 0x100000fc /* deprecated alias for hpblock */
163+
164+#endif /* _HPKEYSYM_H */
@@ -0,0 +1,73 @@
1+/*
2+
3+Copyright 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+*/
26+
27+#ifndef _XtHookObjI_h
28+#define _XtHookObjI_h
29+
30+_XFUNCPROTOBEGIN
31+
32+/* This object is implementation-dependent and private to the library. */
33+
34+typedef struct _HookObjRec *HookObject;
35+typedef struct _HookObjClassRec *HookObjectClass;
36+
37+externalref WidgetClass hookObjectClass;
38+
39+typedef struct _HookObjPart {
40+ /* resources */
41+ XtCallbackList createhook_callbacks;
42+ XtCallbackList changehook_callbacks;
43+ XtCallbackList confighook_callbacks;
44+ XtCallbackList geometryhook_callbacks;
45+ XtCallbackList destroyhook_callbacks;
46+ WidgetList shells;
47+ Cardinal num_shells;
48+ /* private data */
49+ Cardinal max_shells;
50+ Screen* screen;
51+}HookObjPart;
52+
53+typedef struct _HookObjRec {
54+ ObjectPart object;
55+ HookObjPart hooks;
56+} HookObjRec;
57+
58+typedef struct _HookObjClassPart {
59+ int unused;
60+} HookObjClassPart;
61+
62+typedef struct _HookObjClassRec {
63+ ObjectClassPart object_class;
64+ HookObjClassPart hook_class;
65+} HookObjClassRec;
66+
67+externalref HookObjClassRec hookObjClassRec;
68+
69+_XFUNCPROTOEND
70+
71+#endif /* ifndef _Xt_HookObjI_h */
72+
73+
@@ -0,0 +1,101 @@
1+/******************************************************************************
2+
3+
4+Copyright 1993, 1998 The Open Group
5+
6+Permission to use, copy, modify, distribute, and sell this software and its
7+documentation for any purpose is hereby granted without fee, provided that
8+the above copyright notice appear in all copies and that both that
9+copyright notice and this permission notice appear in supporting
10+documentation.
11+
12+The above copyright notice and this permission notice shall be included in
13+all copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the name of The Open Group shall not be
23+used in advertising or otherwise to promote the sale, use or other dealings
24+in this Software without prior written authorization from The Open Group.
25+
26+Author: Ralph Mor, X Consortium
27+
28+******************************************************************************/
29+
30+#ifndef _ICE_H_
31+#define _ICE_H_
32+
33+/*
34+ * Protocol Version
35+ */
36+
37+#define IceProtoMajor 1
38+#define IceProtoMinor 0
39+
40+
41+/*
42+ * Byte Order
43+ */
44+
45+#define IceLSBfirst 0
46+#define IceMSBfirst 1
47+
48+
49+/*
50+ * ICE minor opcodes
51+ */
52+
53+#define ICE_Error 0
54+#define ICE_ByteOrder 1
55+#define ICE_ConnectionSetup 2
56+#define ICE_AuthRequired 3
57+#define ICE_AuthReply 4
58+#define ICE_AuthNextPhase 5
59+#define ICE_ConnectionReply 6
60+#define ICE_ProtocolSetup 7
61+#define ICE_ProtocolReply 8
62+#define ICE_Ping 9
63+#define ICE_PingReply 10
64+#define ICE_WantToClose 11
65+#define ICE_NoClose 12
66+
67+
68+/*
69+ * Error severity
70+ */
71+
72+#define IceCanContinue 0
73+#define IceFatalToProtocol 1
74+#define IceFatalToConnection 2
75+
76+
77+/*
78+ * ICE error classes that are common to all protocols
79+ */
80+
81+#define IceBadMinor 0x8000
82+#define IceBadState 0x8001
83+#define IceBadLength 0x8002
84+#define IceBadValue 0x8003
85+
86+
87+/*
88+ * ICE error classes that are specific to the ICE protocol
89+ */
90+
91+#define IceBadMajor 0
92+#define IceNoAuth 1
93+#define IceNoVersion 2
94+#define IceSetupFailed 3
95+#define IceAuthRejected 4
96+#define IceAuthFailed 5
97+#define IceProtocolDuplicate 6
98+#define IceMajorOpcodeDuplicate 7
99+#define IceUnknownProtocol 8
100+
101+#endif /* _ICE_H_ */
@@ -0,0 +1,250 @@
1+/******************************************************************************
2+
3+
4+Copyright 1993, 1998 The Open Group
5+
6+Permission to use, copy, modify, distribute, and sell this software and its
7+documentation for any purpose is hereby granted without fee, provided that
8+the above copyright notice appear in all copies and that both that
9+copyright notice and this permission notice appear in supporting
10+documentation.
11+
12+The above copyright notice and this permission notice shall be included in
13+all copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the name of The Open Group shall not be
23+used in advertising or otherwise to promote the sale, use or other dealings
24+in this Software without prior written authorization from The Open Group.
25+
26+Author: Ralph Mor, X Consortium
27+******************************************************************************/
28+
29+#ifndef _ICECONN_H_
30+#define _ICECONN_H_
31+
32+#include <X11/ICE/ICElib.h>
33+
34+/*
35+ * Data structures for ICE connection object
36+ */
37+
38+typedef struct _IceSavedReplyWait {
39+ IceReplyWaitInfo *reply_wait;
40+ Bool reply_ready;
41+ struct _IceSavedReplyWait *next;
42+} _IceSavedReplyWait;
43+
44+typedef struct _IcePingWait {
45+ IcePingReplyProc ping_reply_proc;
46+ IcePointer client_data;
47+ struct _IcePingWait *next;
48+} _IcePingWait;
49+
50+typedef struct {
51+ char *vendor;
52+ char *release;
53+ int version_count;
54+ IcePoVersionRec *version_recs;
55+ int auth_count;
56+ char **auth_names;
57+ IcePoAuthProc *auth_procs;
58+ IceIOErrorProc io_error_proc;
59+} _IcePoProtocol;
60+
61+typedef struct {
62+ char *vendor;
63+ char *release;
64+ int version_count;
65+ IcePaVersionRec *version_recs;
66+ IceProtocolSetupProc protocol_setup_proc;
67+ IceProtocolActivateProc protocol_activate_proc;
68+ int auth_count;
69+ char **auth_names;
70+ IcePaAuthProc *auth_procs;
71+ IceHostBasedAuthProc host_based_auth_proc;
72+ IceIOErrorProc io_error_proc;
73+} _IcePaProtocol;
74+
75+typedef struct {
76+ char *protocol_name;
77+ _IcePoProtocol *orig_client;
78+ _IcePaProtocol *accept_client;
79+} _IceProtocol;
80+
81+typedef struct {
82+ Bool in_use;
83+ int my_opcode;
84+ _IceProtocol *protocol;
85+ IcePointer client_data;
86+ Bool accept_flag;
87+ union {
88+ IcePaProcessMsgProc accept_client;
89+ IcePoProcessMsgProc orig_client;
90+ } process_msg_proc;
91+} _IceProcessMsgInfo;
92+
93+typedef struct {
94+ int his_version_index;
95+ int my_version_index;
96+ char *his_vendor;
97+ char *his_release;
98+ char my_auth_index;
99+ IcePointer my_auth_state;
100+ Bool must_authenticate;
101+} _IceConnectToMeInfo;
102+
103+typedef struct {
104+ int his_opcode;
105+ int my_opcode;
106+ int his_version_index;
107+ int my_version_index;
108+ char *his_vendor;
109+ char *his_release;
110+ char my_auth_index;
111+ IcePointer my_auth_state;
112+ Bool must_authenticate;
113+} _IceProtoSetupToMeInfo;
114+
115+typedef struct {
116+ Bool auth_active;
117+ char my_auth_index;
118+ IcePointer my_auth_state;
119+} _IceConnectToYouInfo;
120+
121+typedef struct {
122+ int my_opcode;
123+ int my_auth_count;
124+ int *my_auth_indices;
125+ Bool auth_active;
126+ char my_auth_index;
127+ IcePointer my_auth_state;
128+} _IceProtoSetupToYouInfo;
129+
130+
131+struct _IceConn {
132+
133+ unsigned int io_ok : 1; /* did an IO error occur? */
134+ unsigned int swap : 1; /* do we need to swap on reads? */
135+ unsigned int waiting_for_byteorder : 1; /* waiting for a ByteOrder msg? */
136+ unsigned int skip_want_to_close : 1; /* avoid shutdown negotiation? */
137+ unsigned int want_to_close : 1; /* did we send a WantToClose? */
138+ unsigned int free_asap : 1; /* free as soon as possible */
139+ unsigned int unused1 : 2; /* future use */
140+ unsigned int unused2 : 8; /* future use */
141+
142+ IceConnectStatus connection_status; /* pending, accepted, rejected */
143+
144+ unsigned char my_ice_version_index; /* which version are we using? */
145+
146+ struct _XtransConnInfo *trans_conn; /* transport connection object */
147+ unsigned long send_sequence; /* Sequence # of last msg sent */
148+ unsigned long receive_sequence; /* Sequence # of last msg received */
149+
150+ char *connection_string; /* network connection string */
151+ char *vendor; /* other client's vendor */
152+ char *release; /* other client's release */
153+
154+ char *inbuf; /* Input buffer starting address */
155+ char *inbufptr; /* Input buffer index pointer */
156+ char *inbufmax; /* Input buffer maximum+1 address */
157+
158+ char *outbuf; /* Output buffer starting address */
159+ char *outbufptr; /* Output buffer index pointer */
160+ char *outbufmax; /* Output buffer maximum+1 address */
161+
162+ char *scratch; /* scratch buffer */
163+ unsigned long scratch_size; /* scratch size */
164+
165+ int dispatch_level; /* IceProcessMessages dispatch level */
166+
167+ IcePointer context; /* context associated with caller
168+ of IceOpenConnection */
169+
170+ /*
171+ * Before we read a message, the major opcode of the message must be
172+ * mapped to our corresponding major opcode (the two clients can use
173+ * different opcodes for the same protocol). In order to save space,
174+ * we keep track of the minimum and maximum major opcodes used by the
175+ * other client. To get the information on how to process this message,
176+ * we do the following...
177+ *
178+ * processMsgInfo = iceConn->process_msg_info[
179+ * message->majorOpcode - iceConn->his_min_opcode]
180+ *
181+ * Note that the number of elements in the iceConn->process_msg_info
182+ * array is always (iceConn->his_max_opcode - iceConn->his_min_opcode + 1).
183+ * We check process_msg_info->in_use to see if the opcode is being used.
184+ */
185+
186+ _IceProcessMsgInfo *process_msg_info;
187+ char his_min_opcode; /* [1..255] */
188+ char his_max_opcode; /* [1..255] */
189+
190+
191+ /*
192+ * Number of times this iceConn was returned in IceOpenConnection
193+ * or IceAcceptConnection.
194+ */
195+
196+ unsigned char open_ref_count;
197+
198+
199+ /*
200+ * Number of active protocols.
201+ */
202+
203+ unsigned char proto_ref_count;
204+
205+
206+ /*
207+ * If this ICE connection was created with IceAcceptConnection,
208+ * the listen_obj field is set to the listen object. Otherwise,
209+ * the listen_obj field is NULL.
210+ */
211+
212+ IceListenObj listen_obj;
213+
214+
215+
216+
217+ /*
218+ * We need to keep track of all the replies we're waiting for.
219+ * Check the comments in process.c for how this works.
220+ */
221+
222+ _IceSavedReplyWait *saved_reply_waits;
223+
224+
225+ /*
226+ * We keep track of all Pings sent from the client. When the Ping reply
227+ * arrives, we remove it from the list.
228+ */
229+
230+ _IcePingWait *ping_waits;
231+
232+
233+ /*
234+ * Some state for a client doing a Connection/Protocol Setup
235+ */
236+
237+ _IceConnectToYouInfo *connect_to_you;
238+ _IceProtoSetupToYouInfo *protosetup_to_you;
239+
240+
241+ /*
242+ * Some state for a client receiving a Connection/Protocol Setup
243+ */
244+
245+ _IceConnectToMeInfo *connect_to_me;
246+ _IceProtoSetupToMeInfo *protosetup_to_me;
247+
248+};
249+
250+#endif /* _ICECONN_H_ */
@@ -0,0 +1,431 @@
1+/******************************************************************************
2+
3+
4+Copyright 1993, 1998 The Open Group
5+
6+Permission to use, copy, modify, distribute, and sell this software and its
7+documentation for any purpose is hereby granted without fee, provided that
8+the above copyright notice appear in all copies and that both that
9+copyright notice and this permission notice appear in supporting
10+documentation.
11+
12+The above copyright notice and this permission notice shall be included in
13+all copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the name of The Open Group shall not be
23+used in advertising or otherwise to promote the sale, use or other dealings
24+in this Software without prior written authorization from The Open Group.
25+
26+Author: Ralph Mor, X Consortium
27+******************************************************************************/
28+
29+#ifndef _ICELIB_H_
30+#define _ICELIB_H_
31+
32+#include <X11/ICE/ICE.h>
33+#include <X11/Xfuncproto.h>
34+
35+#define Bool int
36+#define Status int
37+#define True 1
38+#define False 0
39+
40+typedef void *IcePointer;
41+
42+typedef enum {
43+ IcePoAuthHaveReply,
44+ IcePoAuthRejected,
45+ IcePoAuthFailed,
46+ IcePoAuthDoneCleanup
47+} IcePoAuthStatus;
48+
49+typedef enum {
50+ IcePaAuthContinue,
51+ IcePaAuthAccepted,
52+ IcePaAuthRejected,
53+ IcePaAuthFailed
54+} IcePaAuthStatus;
55+
56+typedef enum {
57+ IceConnectPending,
58+ IceConnectAccepted,
59+ IceConnectRejected,
60+ IceConnectIOError
61+} IceConnectStatus;
62+
63+typedef enum {
64+ IceProtocolSetupSuccess,
65+ IceProtocolSetupFailure,
66+ IceProtocolSetupIOError,
67+ IceProtocolAlreadyActive
68+} IceProtocolSetupStatus;
69+
70+typedef enum {
71+ IceAcceptSuccess,
72+ IceAcceptFailure,
73+ IceAcceptBadMalloc
74+} IceAcceptStatus;
75+
76+typedef enum {
77+ IceClosedNow,
78+ IceClosedASAP,
79+ IceConnectionInUse,
80+ IceStartedShutdownNegotiation
81+} IceCloseStatus;
82+
83+typedef enum {
84+ IceProcessMessagesSuccess,
85+ IceProcessMessagesIOError,
86+ IceProcessMessagesConnectionClosed
87+} IceProcessMessagesStatus;
88+
89+typedef struct {
90+ unsigned long sequence_of_request;
91+ int major_opcode_of_request;
92+ int minor_opcode_of_request;
93+ IcePointer reply;
94+} IceReplyWaitInfo;
95+
96+typedef struct _IceConn *IceConn;
97+typedef struct _IceListenObj *IceListenObj;
98+
99+typedef void (*IceWatchProc) (
100+ IceConn /* iceConn */,
101+ IcePointer /* clientData */,
102+ Bool /* opening */,
103+ IcePointer * /* watchData */
104+);
105+
106+typedef void (*IcePoProcessMsgProc) (
107+ IceConn /* iceConn */,
108+ IcePointer /* clientData */,
109+ int /* opcode */,
110+ unsigned long /* length */,
111+ Bool /* swap */,
112+ IceReplyWaitInfo * /* replyWait */,
113+ Bool * /* replyReadyRet */
114+);
115+
116+typedef void (*IcePaProcessMsgProc) (
117+ IceConn /* iceConn */,
118+ IcePointer /* clientData */,
119+ int /* opcode */,
120+ unsigned long /* length */,
121+ Bool /* swap */
122+);
123+
124+typedef struct {
125+ int major_version;
126+ int minor_version;
127+ IcePoProcessMsgProc process_msg_proc;
128+} IcePoVersionRec;
129+
130+typedef struct {
131+ int major_version;
132+ int minor_version;
133+ IcePaProcessMsgProc process_msg_proc;
134+} IcePaVersionRec;
135+
136+typedef IcePoAuthStatus (*IcePoAuthProc) (
137+ IceConn /* iceConn */,
138+ IcePointer * /* authStatePtr */,
139+ Bool /* cleanUp */,
140+ Bool /* swap */,
141+ int /* authDataLen */,
142+ IcePointer /* authData */,
143+ int * /* replyDataLenRet */,
144+ IcePointer * /* replyDataRet */,
145+ char ** /* errorStringRet */
146+);
147+
148+typedef IcePaAuthStatus (*IcePaAuthProc) (
149+ IceConn /* iceConn */,
150+ IcePointer * /* authStatePtr */,
151+ Bool /* swap */,
152+ int /* authDataLen */,
153+ IcePointer /* authData */,
154+ int * /* replyDataLenRet */,
155+ IcePointer * /* replyDataRet */,
156+ char ** /* errorStringRet */
157+);
158+
159+typedef Bool (*IceHostBasedAuthProc) (
160+ char * /* hostName */
161+);
162+
163+typedef Status (*IceProtocolSetupProc) (
164+ IceConn /* iceConn */,
165+ int /* majorVersion */,
166+ int /* minorVersion */,
167+ char * /* vendor */,
168+ char * /* release */,
169+ IcePointer * /* clientDataRet */,
170+ char ** /* failureReasonRet */
171+);
172+
173+typedef void (*IceProtocolActivateProc) (
174+ IceConn /* iceConn */,
175+ IcePointer /* clientData */
176+);
177+
178+typedef void (*IceIOErrorProc) (
179+ IceConn /* iceConn */
180+);
181+
182+typedef void (*IcePingReplyProc) (
183+ IceConn /* iceConn */,
184+ IcePointer /* clientData */
185+);
186+
187+typedef void (*IceErrorHandler) (
188+ IceConn /* iceConn */,
189+ Bool /* swap */,
190+ int /* offendingMinorOpcode */,
191+ unsigned long /* offendingSequence */,
192+ int /* errorClass */,
193+ int /* severity */,
194+ IcePointer /* values */
195+);
196+
197+typedef void (*IceIOErrorHandler) (
198+ IceConn /* iceConn */
199+);
200+
201+
202+/*
203+ * Function prototypes
204+ */
205+
206+_XFUNCPROTOBEGIN
207+
208+extern int IceRegisterForProtocolSetup (
209+ const char * /* protocolName */,
210+ const char * /* vendor */,
211+ const char * /* release */,
212+ int /* versionCount */,
213+ IcePoVersionRec * /* versionRecs */,
214+ int /* authCount */,
215+ const char ** /* authNames */,
216+ IcePoAuthProc * /* authProcs */,
217+ IceIOErrorProc /* IOErrorProc */
218+);
219+
220+extern int IceRegisterForProtocolReply (
221+ const char * /* protocolName */,
222+ const char * /* vendor */,
223+ const char * /* release */,
224+ int /* versionCount */,
225+ IcePaVersionRec * /* versionRecs */,
226+ int /* authCount */,
227+ const char ** /* authNames */,
228+ IcePaAuthProc * /* authProcs */,
229+ IceHostBasedAuthProc /* hostBasedAuthProc */,
230+ IceProtocolSetupProc /* protocolSetupProc */,
231+ IceProtocolActivateProc /* protocolActivateProc */,
232+ IceIOErrorProc /* IOErrorProc */
233+);
234+
235+extern IceConn IceOpenConnection (
236+ char * /* networkIdsList */,
237+ IcePointer /* context */,
238+ Bool /* mustAuthenticate */,
239+ int /* majorOpcodeCheck */,
240+ int /* errorLength */,
241+ char * /* errorStringRet */
242+);
243+
244+extern IcePointer IceGetConnectionContext (
245+ IceConn /* iceConn */
246+);
247+
248+extern Status IceListenForConnections (
249+ int * /* countRet */,
250+ IceListenObj ** /* listenObjsRet */,
251+ int /* errorLength */,
252+ char * /* errorStringRet */
253+);
254+
255+extern Status IceListenForWellKnownConnections (
256+ char * /* port */,
257+ int * /* countRet */,
258+ IceListenObj ** /* listenObjsRet */,
259+ int /* errorLength */,
260+ char * /* errorStringRet */
261+);
262+
263+extern int IceGetListenConnectionNumber (
264+ IceListenObj /* listenObj */
265+);
266+
267+extern char *IceGetListenConnectionString (
268+ IceListenObj /* listenObj */
269+);
270+
271+extern char *IceComposeNetworkIdList (
272+ int /* count */,
273+ IceListenObj * /* listenObjs */
274+);
275+
276+extern void IceFreeListenObjs (
277+ int /* count */,
278+ IceListenObj * /* listenObjs */
279+);
280+
281+extern void IceSetHostBasedAuthProc (
282+ IceListenObj /* listenObj */,
283+ IceHostBasedAuthProc /* hostBasedAuthProc */
284+);
285+
286+extern IceConn IceAcceptConnection (
287+ IceListenObj /* listenObj */,
288+ IceAcceptStatus * /* statusRet */
289+);
290+
291+extern void IceSetShutdownNegotiation (
292+ IceConn /* iceConn */,
293+ Bool /* negotiate */
294+);
295+
296+extern Bool IceCheckShutdownNegotiation (
297+ IceConn /* iceConn */
298+);
299+
300+extern IceCloseStatus IceCloseConnection (
301+ IceConn /* iceConn */
302+);
303+
304+extern Status IceAddConnectionWatch (
305+ IceWatchProc /* watchProc */,
306+ IcePointer /* clientData */
307+);
308+
309+extern void IceRemoveConnectionWatch (
310+ IceWatchProc /* watchProc */,
311+ IcePointer /* clientData */
312+);
313+
314+extern IceProtocolSetupStatus IceProtocolSetup (
315+ IceConn /* iceConn */,
316+ int /* myOpcode */,
317+ IcePointer /* clientData */,
318+ Bool /* mustAuthenticate */,
319+ int * /* majorVersionRet */,
320+ int * /* minorVersionRet */,
321+ char ** /* vendorRet */,
322+ char ** /* releaseRet */,
323+ int /* errorLength */,
324+ char * /* errorStringRet */
325+);
326+
327+extern Status IceProtocolShutdown (
328+ IceConn /* iceConn */,
329+ int /* majorOpcode */
330+);
331+
332+extern IceProcessMessagesStatus IceProcessMessages (
333+ IceConn /* iceConn */,
334+ IceReplyWaitInfo * /* replyWait */,
335+ Bool * /* replyReadyRet */
336+);
337+
338+extern Status IcePing (
339+ IceConn /* iceConn */,
340+ IcePingReplyProc /* pingReplyProc */,
341+ IcePointer /* clientData */
342+);
343+
344+extern char *IceAllocScratch (
345+ IceConn /* iceConn */,
346+ unsigned long /* size */
347+);
348+
349+extern int IceFlush (
350+ IceConn /* iceConn */
351+);
352+
353+extern int IceGetOutBufSize (
354+ IceConn /* iceConn */
355+);
356+
357+extern int IceGetInBufSize (
358+ IceConn /* iceConn */
359+);
360+
361+extern IceConnectStatus IceConnectionStatus (
362+ IceConn /* iceConn */
363+);
364+
365+extern char *IceVendor (
366+ IceConn /* iceConn */
367+);
368+
369+extern char *IceRelease (
370+ IceConn /* iceConn */
371+);
372+
373+extern int IceProtocolVersion (
374+ IceConn /* iceConn */
375+);
376+
377+extern int IceProtocolRevision (
378+ IceConn /* iceConn */
379+);
380+
381+extern int IceConnectionNumber (
382+ IceConn /* iceConn */
383+);
384+
385+extern char *IceConnectionString (
386+ IceConn /* iceConn */
387+);
388+
389+extern unsigned long IceLastSentSequenceNumber (
390+ IceConn /* iceConn */
391+);
392+
393+extern unsigned long IceLastReceivedSequenceNumber (
394+ IceConn /* iceConn */
395+);
396+
397+extern Bool IceSwapping (
398+ IceConn /* iceConn */
399+);
400+
401+extern IceErrorHandler IceSetErrorHandler (
402+ IceErrorHandler /* handler */
403+);
404+
405+extern IceIOErrorHandler IceSetIOErrorHandler (
406+ IceIOErrorHandler /* handler */
407+);
408+
409+extern char *IceGetPeerName (
410+ IceConn /* iceConn */
411+);
412+
413+/*
414+ * Multithread Routines
415+ */
416+
417+extern Status IceInitThreads (
418+ void
419+);
420+
421+extern void IceAppLockConn (
422+ IceConn /* iceConn */
423+);
424+
425+extern void IceAppUnlockConn (
426+ IceConn /* iceConn */
427+);
428+
429+_XFUNCPROTOEND
430+
431+#endif /* _ICELIB_H_ */
@@ -0,0 +1,306 @@
1+/******************************************************************************
2+
3+
4+Copyright 1993, 1998 The Open Group
5+
6+Permission to use, copy, modify, distribute, and sell this software and its
7+documentation for any purpose is hereby granted without fee, provided that
8+the above copyright notice appear in all copies and that both that
9+copyright notice and this permission notice appear in supporting
10+documentation.
11+
12+The above copyright notice and this permission notice shall be included in
13+all copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the name of The Open Group shall not be
23+used in advertising or otherwise to promote the sale, use or other dealings
24+in this Software without prior written authorization from The Open Group.
25+
26+Author: Ralph Mor, X Consortium
27+******************************************************************************/
28+
29+#ifndef _ICEMSG_H_
30+#define _ICEMSG_H_
31+
32+#include <X11/Xfuncproto.h>
33+
34+#include <X11/ICE/ICEconn.h>
35+
36+#include <assert.h>
37+#if !defined(__cplusplus) && !defined(static_assert)
38+#define static_assert(cond, msg) /* skip for non-C11 compilers */
39+#endif
40+
41+_XFUNCPROTOBEGIN
42+
43+/*
44+ * Function prototypes for internal ICElib functions
45+ */
46+
47+extern Status _IceRead (
48+ IceConn /* iceConn */,
49+ unsigned long /* nbytes */,
50+ char * /* ptr */
51+);
52+
53+extern void _IceReadSkip (
54+ IceConn /* iceConn */,
55+ unsigned long /* nbytes */
56+);
57+
58+extern void _IceWrite (
59+ IceConn /* iceConn */,
60+ unsigned long /* nbytes */,
61+ char * /* ptr */
62+);
63+
64+
65+extern void _IceErrorBadMinor (
66+ IceConn /* iceConn */,
67+ int /* majorOpcode */,
68+ int /* offendingMinor */,
69+ int /* severity */
70+);
71+
72+extern void _IceErrorBadState (
73+ IceConn /* iceConn */,
74+ int /* majorOpcode */,
75+ int /* offendingMinor */,
76+ int /* severity */
77+);
78+
79+extern void _IceErrorBadLength (
80+ IceConn /* iceConn */,
81+ int /* majorOpcode */,
82+ int /* offendingMinor */,
83+ int /* severity */
84+);
85+
86+extern void _IceErrorBadValue (
87+ IceConn /* iceConn */,
88+ int /* majorOpcode */,
89+ int /* offendingMinor */,
90+ int /* offset */,
91+ int /* length */,
92+ IcePointer /* value */
93+);
94+
95+extern IcePoAuthStatus _IcePoMagicCookie1Proc (
96+ IceConn /* iceConn */,
97+ IcePointer * /* authStatePtr */,
98+ Bool /* cleanUp */,
99+ Bool /* swap */,
100+ int /* authDataLen */,
101+ IcePointer /* authData */,
102+ int * /* replyDataLenRet */,
103+ IcePointer * /* replyDataRet */,
104+ char ** /* errorStringRet */
105+);
106+
107+extern IcePaAuthStatus _IcePaMagicCookie1Proc (
108+ IceConn /* iceConn */,
109+ IcePointer * /* authStatePtr */,
110+ Bool /* swap */,
111+ int /* authDataLen */,
112+ IcePointer /* authData */,
113+ int * /* replyDataLenRet */,
114+ IcePointer * /* replyDataRet */,
115+ char ** /* errorStringRet */
116+);
117+
118+
119+/*
120+ * Macro to check if IO operations are valid on an ICE connection.
121+ */
122+
123+#define IceValidIO(_iceConn) _iceConn->io_ok
124+
125+
126+/*
127+ * Macros for writing messages.
128+ */
129+
130+#define IceGetHeader(_iceConn, _major, _minor, _headerSize, _msgType, _pMsg) \
131+do { \
132+ static_assert(_headerSize <= 1024, \
133+ "Header size larger than ICE_OUTBUFSIZE"); \
134+ if ((_iceConn->outbufptr + _headerSize) > _iceConn->outbufmax) \
135+ IceFlush (_iceConn); \
136+ _pMsg = (_msgType *) _iceConn->outbufptr; \
137+ _pMsg->majorOpcode = _major; \
138+ _pMsg->minorOpcode = _minor; \
139+ _pMsg->length = (_headerSize - SIZEOF (iceMsg)) >> 3; \
140+ _iceConn->outbufptr += _headerSize; \
141+ _iceConn->send_sequence++; \
142+} while (0)
143+
144+#define IceGetHeaderExtra(_iceConn, _major, _minor, _headerSize, _extra, _msgType, _pMsg, _pData) \
145+do { \
146+ static_assert(_headerSize <= 1024, \
147+ "Header size larger than ICE_OUTBUFSIZE"); \
148+ if ((_iceConn->outbufptr + \
149+ _headerSize + ((_extra) << 3)) > _iceConn->outbufmax) \
150+ IceFlush (_iceConn); \
151+ _pMsg = (_msgType *) _iceConn->outbufptr; \
152+ _iceConn->outbufptr += _headerSize; \
153+ if ((_iceConn->outbufptr + ((_extra) << 3)) <= _iceConn->outbufmax) { \
154+ _pData = _iceConn->outbufptr; \
155+ _iceConn->outbufptr += ((_extra) << 3); \
156+ } \
157+ else \
158+ _pData = NULL; \
159+ _pMsg->majorOpcode = _major; \
160+ _pMsg->minorOpcode = _minor; \
161+ _pMsg->length = ((_headerSize - SIZEOF (iceMsg)) >> 3) + (_extra); \
162+ _iceConn->send_sequence++; \
163+} while (0)
164+
165+#define IceSimpleMessage(_iceConn, _major, _minor) \
166+{ \
167+ iceMsg *_pMsg; \
168+ IceGetHeader (_iceConn, _major, _minor, SIZEOF (iceMsg), iceMsg, _pMsg); \
169+}
170+
171+#define IceErrorHeader(_iceConn, _offendingMajorOpcode, _offendingMinorOpcode, _offendingSequenceNum, _severity, _errorClass, _dataLength) \
172+{ \
173+ iceErrorMsg *_pMsg; \
174+\
175+ IceGetHeader (_iceConn, _offendingMajorOpcode, ICE_Error, \
176+ SIZEOF (iceErrorMsg), iceErrorMsg, _pMsg); \
177+ _pMsg->length += (_dataLength); \
178+ _pMsg->offendingMinorOpcode = (CARD8) _offendingMinorOpcode; \
179+ _pMsg->severity = (CARD8) _severity; \
180+ _pMsg->offendingSequenceNum = (CARD32) _offendingSequenceNum; \
181+ _pMsg->errorClass = (CARD16) _errorClass; \
182+}
183+
184+
185+/*
186+ * Write data into the ICE output buffer.
187+ */
188+
189+#define IceWriteData(_iceConn, _bytes, _data) \
190+{ \
191+ if ((_iceConn->outbufptr + (_bytes)) > _iceConn->outbufmax) \
192+ { \
193+ IceFlush (_iceConn); \
194+ _IceWrite (_iceConn, (unsigned long) (_bytes), _data); \
195+ } \
196+ else \
197+ { \
198+ memcpy (_iceConn->outbufptr, _data, _bytes); \
199+ _iceConn->outbufptr += (_bytes); \
200+ } \
201+}
202+
203+#define IceWriteData16(_iceConn, _bytes, _data) \
204+ IceWriteData (_iceConn, _bytes, (char *) _data)
205+
206+#define IceWriteData32(_iceConn, _bytes, _data) \
207+ IceWriteData (_iceConn, _bytes, (char *) _data)
208+
209+
210+/*
211+ * The IceSendData macro bypasses copying the data to the
212+ * ICE connection buffer and sends the data directly. If necessary,
213+ * the ICE connection buffer is first flushed.
214+ */
215+
216+#define IceSendData(_iceConn, _bytes, _data) \
217+{ \
218+ if (_iceConn->outbufptr > _iceConn->outbuf) \
219+ IceFlush (_iceConn); \
220+ _IceWrite (_iceConn, (unsigned long) (_bytes), _data); \
221+}
222+
223+
224+/*
225+ * Write pad bytes. Used to force 32 or 64 bit alignment.
226+ * A maximum of 7 pad bytes can be specified.
227+ */
228+
229+#define IceWritePad(_iceConn, _bytes) \
230+{ \
231+ char _dummy[7] = { 0 }; \
232+ IceWriteData (_iceConn, (_bytes), _dummy); \
233+}
234+
235+
236+/*
237+ * Macros for reading messages.
238+ */
239+
240+#define IceReadCompleteMessage(_iceConn, _headerSize, _msgType, _pMsg, _pData)\
241+{ \
242+ unsigned long _bytes; \
243+ IceReadMessageHeader (_iceConn, _headerSize, _msgType, _pMsg); \
244+ _bytes = (_pMsg->length << 3) - (_headerSize - SIZEOF (iceMsg)); \
245+ if ((_iceConn->inbufmax - _iceConn->inbufptr) >= _bytes) \
246+ { \
247+ _IceRead (_iceConn, _bytes, _iceConn->inbufptr); \
248+ _pData = _iceConn->inbufptr; \
249+ _iceConn->inbufptr += _bytes; \
250+ } \
251+ else \
252+ { \
253+ _pData = malloc (_bytes); \
254+ if (_pData) \
255+ _IceRead (_iceConn, _bytes, _pData); \
256+ else \
257+ _IceReadSkip (_iceConn, _bytes); \
258+ } \
259+}
260+
261+#define IceDisposeCompleteMessage(_iceConn, _pData) \
262+ if ((char *) _pData < _iceConn->inbuf || \
263+ (char *) _pData >= _iceConn->inbufmax) \
264+ free (_pData);
265+
266+
267+#define IceReadSimpleMessage(_iceConn, _msgType, _pMsg) \
268+ _pMsg = (_msgType *) (_iceConn->inbuf);
269+
270+#define IceReadMessageHeader(_iceConn, _headerSize, _msgType, _pMsg) \
271+{ \
272+ _IceRead (_iceConn, \
273+ (unsigned long) (_headerSize - SIZEOF (iceMsg)), \
274+ _iceConn->inbufptr); \
275+ _pMsg = (_msgType *) (_iceConn->inbuf); \
276+ _iceConn->inbufptr += (_headerSize - SIZEOF (iceMsg)); \
277+}
278+
279+#define IceReadData(_iceConn, _bytes, _pData) \
280+ _IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
281+
282+#define IceReadData16(_iceConn, _swap, _bytes, _pData) \
283+{ \
284+ _IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
285+}
286+
287+#define IceReadData32(_iceConn, _swap, _bytes, _pData) \
288+{ \
289+ _IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
290+}
291+
292+
293+/*
294+ * Read pad bytes (for 32 or 64 bit alignment).
295+ * A maximum of 7 pad bytes can be specified.
296+ */
297+
298+#define IceReadPad(_iceConn, _bytes) \
299+{ \
300+ char _dummy[7]; \
301+ _IceRead (_iceConn, (unsigned long) (_bytes), _dummy); \
302+}
303+
304+_XFUNCPROTOEND
305+
306+#endif /* _ICEMSG_H_ */
@@ -0,0 +1,175 @@
1+/******************************************************************************
2+
3+
4+Copyright 1993, 1998 The Open Group
5+
6+Permission to use, copy, modify, distribute, and sell this software and its
7+documentation for any purpose is hereby granted without fee, provided that
8+the above copyright notice appear in all copies and that both that
9+copyright notice and this permission notice appear in supporting
10+documentation.
11+
12+The above copyright notice and this permission notice shall be included in
13+all copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the name of The Open Group shall not be
23+used in advertising or otherwise to promote the sale, use or other dealings
24+in this Software without prior written authorization from The Open Group.
25+
26+Author: Ralph Mor, X Consortium
27+******************************************************************************/
28+
29+#ifndef _ICEPROTO_H_
30+#define _ICEPROTO_H_
31+
32+#include <X11/Xmd.h>
33+
34+typedef struct {
35+ CARD8 majorOpcode;
36+ CARD8 minorOpcode;
37+ CARD8 data[2];
38+ CARD32 length;
39+} iceMsg;
40+
41+typedef struct {
42+ CARD8 majorOpcode;
43+ CARD8 minorOpcode;
44+ CARD16 errorClass;
45+ CARD32 length;
46+ CARD8 offendingMinorOpcode;
47+ CARD8 severity;
48+ CARD16 unused;
49+ CARD32 offendingSequenceNum;
50+ /* n varying values */
51+ /* p p = pad (n, 8) */
52+} iceErrorMsg;
53+
54+typedef struct {
55+ CARD8 majorOpcode;
56+ CARD8 minorOpcode;
57+ CARD8 byteOrder;
58+ CARD8 unused;
59+ CARD32 length;
60+} iceByteOrderMsg;
61+
62+typedef struct {
63+ CARD8 majorOpcode;
64+ CARD8 minorOpcode;
65+ CARD8 versionCount;
66+ CARD8 authCount;
67+ CARD32 length;
68+ CARD8 mustAuthenticate;
69+ CARD8 unused[7];
70+ /* i STRING vendor */
71+ /* j STRING release */
72+ /* k LIST of STRING authentication-protocol-names */
73+ /* m LIST of VERSION version-list */
74+ /* p p = pad (i+j+k+m, 8) */
75+} iceConnectionSetupMsg;
76+
77+typedef struct {
78+ CARD8 majorOpcode;
79+ CARD8 minorOpcode;
80+ CARD8 authIndex;
81+ CARD8 unused1;
82+ CARD32 length;
83+ CARD16 authDataLength;
84+ CARD8 unused2[6];
85+ /* n varying data */
86+ /* p p = pad (n, 8) */
87+} iceAuthRequiredMsg;
88+
89+typedef struct {
90+ CARD8 majorOpcode;
91+ CARD8 minorOpcode;
92+ CARD8 unused1[2];
93+ CARD32 length;
94+ CARD16 authDataLength;
95+ CARD8 unused2[6];
96+ /* n varying data */
97+ /* p p = pad (n, 8) */
98+} iceAuthReplyMsg;
99+
100+typedef struct {
101+ CARD8 majorOpcode;
102+ CARD8 minorOpcode;
103+ CARD8 unused1[2];
104+ CARD32 length;
105+ CARD16 authDataLength;
106+ CARD8 unused2[6];
107+ /* n varying data */
108+ /* p p = pad (n, 8) */
109+} iceAuthNextPhaseMsg;
110+
111+typedef struct {
112+ CARD8 majorOpcode;
113+ CARD8 minorOpcode;
114+ CARD8 versionIndex;
115+ CARD8 unused;
116+ CARD32 length;
117+ /* i STRING vendor */
118+ /* j STRING release */
119+ /* p p = pad (i+j, 8) */
120+} iceConnectionReplyMsg;
121+
122+typedef struct {
123+ CARD8 majorOpcode;
124+ CARD8 minorOpcode;
125+ CARD8 protocolOpcode;
126+ CARD8 mustAuthenticate;
127+ CARD32 length;
128+ CARD8 versionCount;
129+ CARD8 authCount;
130+ CARD8 unused[6];
131+ /* i STRING protocol-name */
132+ /* j STRING vendor */
133+ /* k STRING release */
134+ /* m LIST of STRING authentication-protocol-names */
135+ /* n LIST of VERSION version-list */
136+ /* p p = pad (i+j+k+m+n, 8) */
137+} iceProtocolSetupMsg;
138+
139+typedef struct {
140+ CARD8 majorOpcode;
141+ CARD8 minorOpcode;
142+ CARD8 versionIndex;
143+ CARD8 protocolOpcode;
144+ CARD32 length;
145+ /* i STRING vendor */
146+ /* j STRING release */
147+ /* p p = pad (i+j, 8) */
148+} iceProtocolReplyMsg;
149+
150+typedef iceMsg icePingMsg;
151+typedef iceMsg icePingReplyMsg;
152+typedef iceMsg iceWantToCloseMsg;
153+typedef iceMsg iceNoCloseMsg;
154+
155+
156+/*
157+ * SIZEOF values. These better be multiples of 8.
158+ */
159+
160+#define sz_iceMsg 8
161+#define sz_iceErrorMsg 16
162+#define sz_iceByteOrderMsg 8
163+#define sz_iceConnectionSetupMsg 16
164+#define sz_iceAuthRequiredMsg 16
165+#define sz_iceAuthReplyMsg 16
166+#define sz_iceAuthNextPhaseMsg 16
167+#define sz_iceConnectionReplyMsg 8
168+#define sz_iceProtocolSetupMsg 16
169+#define sz_iceProtocolReplyMsg 8
170+#define sz_icePingMsg 8
171+#define sz_icePingReplyMsg 8
172+#define sz_iceWantToCloseMsg 8
173+#define sz_iceNoCloseMsg 8
174+
175+#endif /* _ICEPROTO_H_ */
@@ -0,0 +1,124 @@
1+/******************************************************************************
2+
3+
4+Copyright 1993, 1998 The Open Group
5+
6+Permission to use, copy, modify, distribute, and sell this software and its
7+documentation for any purpose is hereby granted without fee, provided that
8+the above copyright notice appear in all copies and that both that
9+copyright notice and this permission notice appear in supporting
10+documentation.
11+
12+The above copyright notice and this permission notice shall be included in
13+all copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the name of The Open Group shall not be
23+used in advertising or otherwise to promote the sale, use or other dealings
24+in this Software without prior written authorization from The Open Group.
25+
26+Author: Ralph Mor, X Consortium
27+******************************************************************************/
28+
29+#ifndef _ICEUTIL_H_
30+#define _ICEUTIL_H_
31+
32+#include <X11/Xfuncproto.h>
33+
34+#include <stdio.h>
35+
36+_XFUNCPROTOBEGIN
37+
38+/*
39+ * Data structure for entry in ICE authority file
40+ */
41+
42+typedef struct {
43+ char *protocol_name;
44+ unsigned short protocol_data_length;
45+ char *protocol_data;
46+ char *network_id;
47+ char *auth_name;
48+ unsigned short auth_data_length;
49+ char *auth_data;
50+} IceAuthFileEntry;
51+
52+
53+/*
54+ * Authentication data maintained in memory.
55+ */
56+
57+typedef struct {
58+ char *protocol_name;
59+ char *network_id;
60+ char *auth_name;
61+ unsigned short auth_data_length;
62+ char *auth_data;
63+} IceAuthDataEntry;
64+
65+
66+/*
67+ * Return values from IceLockAuthFile
68+ */
69+
70+#define IceAuthLockSuccess 0 /* lock succeeded */
71+#define IceAuthLockError 1 /* lock unexpectedly failed, check errno */
72+#define IceAuthLockTimeout 2 /* lock failed, timeouts expired */
73+
74+
75+/*
76+ * Function Prototypes
77+ */
78+
79+extern char *IceAuthFileName (
80+ void
81+);
82+
83+extern int IceLockAuthFile (
84+ const char * /* file_name */,
85+ int /* retries */,
86+ int /* timeout */,
87+ long /* dead */
88+);
89+
90+extern void IceUnlockAuthFile (
91+ const char * /* file_name */
92+);
93+
94+extern IceAuthFileEntry *IceReadAuthFileEntry (
95+ FILE * /* auth_file */
96+);
97+
98+extern void IceFreeAuthFileEntry (
99+ IceAuthFileEntry * /* auth */
100+);
101+
102+extern Status IceWriteAuthFileEntry (
103+ FILE * /* auth_file */,
104+ IceAuthFileEntry * /* auth */
105+);
106+
107+extern IceAuthFileEntry *IceGetAuthFileEntry (
108+ const char * /* protocol_name */,
109+ const char * /* network_id */,
110+ const char * /* auth_name */
111+);
112+
113+extern char *IceGenerateMagicCookie (
114+ int /* len */
115+);
116+
117+extern void IceSetPaAuthData (
118+ int /* numEntries */,
119+ IceAuthDataEntry * /* entries */
120+);
121+
122+_XFUNCPROTOEND
123+
124+#endif /* _ICEUTIL_H_ */
@@ -0,0 +1,30 @@
1+
2+#ifndef _X11_IMUTIL_H_
3+#define _X11_IMUTIL_H_
4+
5+extern int
6+_XGetScanlinePad(
7+ Display *dpy,
8+ int depth);
9+
10+extern int
11+_XGetBitsPerPixel(
12+ Display *dpy,
13+ int depth);
14+
15+extern int
16+_XSetImage(
17+ XImage *srcimg,
18+ XImage *dstimg,
19+ int x,
20+ int y);
21+
22+extern int
23+_XReverse_Bytes(
24+ unsigned char *bpt,
25+ int nb);
26+extern void
27+_XInitImageFuncPtrs(
28+ XImage *image);
29+
30+#endif /* _X11_IMUTIL_H_ */
@@ -0,0 +1,430 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtinitialI_h
49+#define _XtinitialI_h
50+
51+/****************************************************************
52+ *
53+ * Displays
54+ *
55+ ****************************************************************/
56+
57+#ifndef X_NOT_POSIX
58+#ifdef _POSIX_SOURCE
59+#include <limits.h>
60+#else
61+#define _POSIX_SOURCE
62+#include <limits.h>
63+#undef _POSIX_SOURCE
64+#endif
65+#endif
66+#ifndef PATH_MAX
67+#ifdef WIN32
68+#define PATH_MAX 512
69+#else
70+#include <sys/param.h>
71+#endif
72+#ifndef PATH_MAX
73+#ifdef MAXPATHLEN
74+#define PATH_MAX MAXPATHLEN
75+#else
76+#define PATH_MAX 1024
77+#endif
78+#endif
79+#endif
80+
81+#include <X11/Xos.h>
82+#include <X11/Xpoll.h>
83+
84+_XFUNCPROTOBEGIN
85+
86+typedef struct _TimerEventRec {
87+ struct timeval te_timer_value;
88+ struct _TimerEventRec *te_next;
89+ XtTimerCallbackProc te_proc;
90+ XtAppContext app;
91+ XtPointer te_closure;
92+} TimerEventRec;
93+
94+typedef struct _InputEvent {
95+ XtInputCallbackProc ie_proc;
96+ XtPointer ie_closure;
97+ struct _InputEvent *ie_next;
98+ struct _InputEvent *ie_oq;
99+ XtAppContext app;
100+ int ie_source;
101+ XtInputMask ie_condition;
102+} InputEvent;
103+
104+typedef struct _SignalEventRec {
105+ XtSignalCallbackProc se_proc;
106+ XtPointer se_closure;
107+ struct _SignalEventRec *se_next;
108+ XtAppContext app;
109+ Boolean se_notice;
110+} SignalEventRec;
111+
112+typedef struct _WorkProcRec {
113+ XtWorkProc proc;
114+ XtPointer closure;
115+ struct _WorkProcRec *next;
116+ XtAppContext app;
117+} WorkProcRec;
118+
119+
120+typedef struct
121+{
122+#ifndef USE_POLL
123+ fd_set rmask;
124+ fd_set wmask;
125+ fd_set emask;
126+#endif
127+ int nfds;
128+} FdStruct;
129+
130+typedef struct _LangProcRec {
131+ XtLanguageProc proc;
132+ XtPointer closure;
133+} LangProcRec;
134+
135+typedef struct _ProcessContextRec {
136+ XtAppContext defaultAppContext;
137+ XtAppContext appContextList;
138+ ConverterTable globalConverterTable;
139+ LangProcRec globalLangProcRec;
140+} ProcessContextRec, *ProcessContext;
141+
142+typedef struct {
143+ char* start;
144+ char* current;
145+ int bytes_remaining;
146+} Heap;
147+
148+typedef struct _DestroyRec DestroyRec;
149+
150+
151+typedef struct _XtAppStruct {
152+ XtAppContext next; /* link to next app in process context */
153+ ProcessContext process; /* back pointer to our process context */
154+ InternalCallbackList destroy_callbacks;
155+ Display **list;
156+ TimerEventRec *timerQueue;
157+ WorkProcRec *workQueue;
158+ InputEvent **input_list;
159+ InputEvent *outstandingQueue;
160+ SignalEventRec *signalQueue;
161+ XrmDatabase errorDB;
162+ XtErrorMsgHandler errorMsgHandler, warningMsgHandler;
163+ XtErrorHandler errorHandler, warningHandler;
164+ struct _ActionListRec *action_table;
165+ ConverterTable converterTable;
166+ unsigned long selectionTimeout;
167+ FdStruct fds;
168+ short count; /* num of assigned entries in list */
169+ short max; /* allocate size of list */
170+ short last;
171+ short input_count;
172+ short input_max; /* elts input_list init'd with */
173+ Boolean sync, being_destroyed, error_inited;
174+#ifndef NO_IDENTIFY_WINDOWS
175+ Boolean identify_windows; /* debugging hack */
176+#endif
177+ Heap heap;
178+ String * fallback_resources; /* Set by XtAppSetFallbackResources. */
179+ struct _ActionHookRec* action_hook_list;
180+ struct _BlockHookRec* block_hook_list;
181+ int destroy_list_size; /* state data for 2-phase destroy */
182+ int destroy_count;
183+ int dispatch_level;
184+ DestroyRec* destroy_list;
185+ Widget in_phase2_destroy;
186+ LangProcRec langProcRec;
187+ struct _TMBindCacheRec * free_bindings;
188+ _XtString display_name_tried;
189+ Display **dpy_destroy_list;
190+ int dpy_destroy_count;
191+ Boolean exit_flag;
192+ Boolean rebuild_fdlist;
193+#ifdef XTHREADS
194+ LockPtr lock_info;
195+ ThreadAppProc lock;
196+ ThreadAppProc unlock;
197+ ThreadAppYieldLockProc yield_lock;
198+ ThreadAppRestoreLockProc restore_lock;
199+ ThreadAppProc free_lock;
200+#endif
201+} XtAppStruct;
202+
203+extern void _XtHeapInit(Heap* heap);
204+extern void _XtHeapFree(Heap* heap);
205+
206+#ifdef XTTRACEMEMORY
207+
208+
209+extern char *_XtHeapMalloc(
210+ Heap* /* heap */,
211+ Cardinal /* size */,
212+ const char */* file */,
213+ int /* line */
214+);
215+
216+#define _XtHeapAlloc(heap,bytes) _XtHeapMalloc(heap, bytes, __FILE__, __LINE__)
217+
218+#else /* XTTRACEMEMORY */
219+
220+extern char* _XtHeapAlloc(
221+ Heap* /* heap */,
222+ Cardinal /* size */
223+);
224+
225+#endif /* XTTRACEMEMORY */
226+
227+extern void _XtSetDefaultErrorHandlers(
228+ XtErrorMsgHandler* /* errMsg */,
229+ XtErrorMsgHandler* /* warnMsg */,
230+ XtErrorHandler* /* err */,
231+ XtErrorHandler* /* warn */
232+);
233+
234+extern void _XtSetDefaultSelectionTimeout(
235+ unsigned long* /* timeout */
236+);
237+
238+extern XtAppContext _XtDefaultAppContext(
239+ void
240+);
241+
242+extern ProcessContext _XtGetProcessContext(
243+ void
244+);
245+
246+Display *
247+_XtAppInit(
248+ XtAppContext* /* app_context_return */,
249+ String /* application_class */,
250+ XrmOptionDescRec* /* options */,
251+ Cardinal /* num_options */,
252+ int* /* argc_in_out */,
253+ _XtString** /* argv_in_out */,
254+ String* /* fallback_resources */
255+);
256+
257+extern void _XtDestroyAppContexts(
258+ void
259+);
260+
261+extern void _XtCloseDisplays(
262+ XtAppContext /* app */
263+);
264+
265+extern int _XtAppDestroyCount;
266+
267+extern int _XtWaitForSomething(
268+ XtAppContext /* app */,
269+ _XtBoolean /* ignoreEvents */,
270+ _XtBoolean /* ignoreTimers */,
271+ _XtBoolean /* ignoreInputs */,
272+ _XtBoolean /* ignoreSignals */,
273+ _XtBoolean /* block */,
274+#ifdef XTHREADS
275+ _XtBoolean /* drop_lock */,
276+#endif
277+ unsigned long* /* howlong */
278+);
279+
280+typedef struct _CaseConverterRec *CaseConverterPtr;
281+typedef struct _CaseConverterRec {
282+ KeySym start; /* first KeySym valid in converter */
283+ KeySym stop; /* last KeySym valid in converter */
284+ XtCaseProc proc; /* case converter function */
285+ CaseConverterPtr next; /* next converter record */
286+} CaseConverterRec;
287+
288+typedef struct _ExtensionSelectorRec {
289+ XtExtensionSelectProc proc;
290+ int min, max;
291+ XtPointer client_data;
292+} ExtSelectRec;
293+
294+typedef struct _XtPerDisplayStruct {
295+ InternalCallbackList destroy_callbacks;
296+ Region region;
297+ CaseConverterPtr case_cvt; /* user-registered case converters */
298+ XtKeyProc defaultKeycodeTranslator;
299+ XtAppContext appContext;
300+ unsigned long keysyms_serial; /* for tracking MappingNotify events */
301+ KeySym *keysyms; /* keycode to keysym table */
302+ int keysyms_per_keycode; /* number of keysyms for each keycode*/
303+ int min_keycode, max_keycode; /* range of keycodes */
304+ KeySym *modKeysyms; /* keysym values for modToKeysysm */
305+ ModToKeysymTable *modsToKeysyms; /* modifiers to Keysysms index table*/
306+ unsigned char isModifier[32]; /* key-is-modifier-p bit table */
307+ KeySym lock_meaning; /* Lock modifier meaning */
308+ Modifiers mode_switch; /* keyboard group modifiers */
309+ Modifiers num_lock; /* keyboard numlock modifiers */
310+ Boolean being_destroyed;
311+ Boolean rv; /* reverse_video resource */
312+ XrmName name; /* resolved app name */
313+ XrmClass class; /* application class */
314+ Heap heap;
315+ struct _GCrec *GClist; /* support for XtGetGC */
316+ Drawable **pixmap_tab; /* ditto for XtGetGC */
317+ String language; /* XPG language string */
318+ XEvent last_event; /* last event dispatched */
319+ Time last_timestamp; /* from last event dispatched */
320+ int multi_click_time; /* for XtSetMultiClickTime */
321+ struct _TMKeyContextRec* tm_context; /* for XtGetActionKeysym */
322+ InternalCallbackList mapping_callbacks; /* special case for TM */
323+ XtPerDisplayInputRec pdi; /* state for modal grabs & kbd focus */
324+ struct _WWTable *WWtable; /* window to widget table */
325+ XrmDatabase *per_screen_db; /* per screen resource databases */
326+ XrmDatabase cmd_db; /* db from command line, if needed */
327+ XrmDatabase server_db; /* resource property else .Xdefaults */
328+ XtEventDispatchProc* dispatcher_list;
329+ ExtSelectRec* ext_select_list;
330+ int ext_select_count;
331+ Widget hook_object;
332+#ifndef X_NO_RESOURCE_CONFIGURATION_MANAGEMENT
333+ Atom rcm_init; /* ResConfig - initialize */
334+ Atom rcm_data; /* ResConfig - data atom */
335+#endif
336+} XtPerDisplayStruct, *XtPerDisplay;
337+
338+typedef struct _PerDisplayTable {
339+ Display *dpy;
340+ XtPerDisplayStruct perDpy;
341+ struct _PerDisplayTable *next;
342+} PerDisplayTable, *PerDisplayTablePtr;
343+
344+extern PerDisplayTablePtr _XtperDisplayList;
345+
346+extern XtPerDisplay _XtSortPerDisplayList(
347+ Display* /* dpy */
348+);
349+
350+extern XtPerDisplay _XtGetPerDisplay(
351+ Display* /* dpy */
352+);
353+
354+extern XtPerDisplayInputRec* _XtGetPerDisplayInput(
355+ Display* /* dpy */
356+);
357+
358+#if 0
359+#ifdef DEBUG
360+#define _XtGetPerDisplay(display) \
361+ ((_XtperDisplayList != NULL && (_XtperDisplayList->dpy == (display))) \
362+ ? &_XtperDisplayList->perDpy \
363+ : _XtSortPerDisplayList(display))
364+#define _XtGetPerDisplayInput(display) \
365+ ((_XtperDisplayList != NULL && (_XtperDisplayList->dpy == (display))) \
366+ ? &_XtperDisplayList->perDpy.pdi \
367+ : &_XtSortPerDisplayList(display)->pdi)
368+#else
369+#define _XtGetPerDisplay(display) \
370+ ((_XtperDisplayList->dpy == (display)) \
371+ ? &_XtperDisplayList->perDpy \
372+ : _XtSortPerDisplayList(display))
373+#define _XtGetPerDisplayInput(display) \
374+ ((_XtperDisplayList->dpy == (display)) \
375+ ? &_XtperDisplayList->perDpy.pdi \
376+ : &_XtSortPerDisplayList(display)->pdi)
377+#endif /*DEBUG*/
378+#endif
379+
380+extern void _XtDisplayInitialize(
381+ Display* /* dpy */,
382+ XtPerDisplay /* pd */,
383+ _Xconst char* /* name */,
384+ XrmOptionDescRec* /* urlist */,
385+ Cardinal /* num_urs */,
386+ int* /* argc */,
387+ _XtString* /* argv */
388+);
389+
390+extern void _XtCacheFlushTag(
391+ XtAppContext /* app */,
392+ XtPointer /* tag */
393+);
394+
395+extern void _XtFreeActions(
396+ struct _ActionListRec* /* action_table */
397+);
398+
399+extern void _XtDoPhase2Destroy(
400+ XtAppContext /* app */,
401+ int /* dispatch_level */
402+);
403+
404+extern void _XtDoFreeBindings(
405+ XtAppContext /* app */
406+);
407+
408+extern void _XtExtensionSelect(
409+ Widget /* widget */
410+);
411+
412+#define _XtSafeToDestroy(app) ((app)->dispatch_level == 0)
413+
414+extern void _XtAllocWWTable(
415+ XtPerDisplay pd
416+);
417+
418+extern void _XtFreeWWTable(
419+ XtPerDisplay pd
420+);
421+
422+extern String _XtGetUserName(_XtString dest, int len);
423+extern XrmDatabase _XtPreparseCommandLine(XrmOptionDescRec *urlist,
424+ Cardinal num_urs, int argc, _XtString *argv,
425+ String *applName, String *displayName,
426+ String *language);
427+
428+_XFUNCPROTOEND
429+
430+#endif /* _XtinitialI_h */
@@ -0,0 +1,2629 @@
1+/***********************************************************
2+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
3+
4+ All Rights Reserved
5+
6+Permission to use, copy, modify, and distribute this software and its
7+documentation for any purpose and without fee is hereby granted,
8+provided that the above copyright notice appear in all copies and that
9+both that copyright notice and this permission notice appear in
10+supporting documentation, and that the name Digital not be
11+used in advertising or publicity pertaining to distribution of the
12+software without specific, written prior permission.
13+
14+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20+SOFTWARE.
21+
22+******************************************************************/
23+
24+/*
25+
26+Copyright 1987, 1988, 1994, 1998 The Open Group
27+
28+Permission to use, copy, modify, distribute, and sell this software and its
29+documentation for any purpose is hereby granted without fee, provided that
30+the above copyright notice appear in all copies and that both that
31+copyright notice and this permission notice appear in supporting
32+documentation.
33+
34+The above copyright notice and this permission notice shall be included in
35+all copies or substantial portions of the Software.
36+
37+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
41+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
42+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43+
44+Except as contained in this notice, the name of The Open Group shall not be
45+used in advertising or otherwise to promote the sale, use or other dealings
46+in this Software without prior written authorization from The Open Group.
47+
48+*/
49+
50+#ifndef _XtIntrinsic_h
51+#define _XtIntrinsic_h
52+
53+#include <X11/Xlib.h>
54+#include <X11/Xutil.h>
55+#include <X11/Xresource.h>
56+#include <X11/Xfuncproto.h>
57+#ifdef XT_BC
58+#include <X11/Xos.h> /* for R4 compatibility */
59+#else
60+#include <X11/Xosdefs.h>
61+#include <string.h> /* for XtNewString */
62+#endif /* XT_BC else */
63+
64+#define XtSpecificationRelease 7
65+
66+/*
67+ * As used in its function interface, the String type of libXt can be readonly.
68+ * But compiling libXt with this feature may require some internal changes,
69+ * e.g., casts and occasionally using a plain "char*".
70+ */
71+#ifdef _CONST_X_STRING
72+typedef const char *String;
73+#else
74+typedef char *String;
75+#endif
76+
77+/* We do this in order to get "const" declarations to work right. We
78+ * use _XtString instead of String so that C++ applications can
79+ * #define String to something else if they choose, to avoid conflicts
80+ * with other C++ libraries.
81+ */
82+#define _XtString char*
83+
84+/* _Xt names are private to Xt implementation, do not use in client code */
85+#if NeedWidePrototypes
86+#define _XtBoolean int
87+#define _XtDimension unsigned int
88+#define _XtKeyCode unsigned int
89+#define _XtPosition int
90+#define _XtXtEnum unsigned int
91+#else
92+#define _XtBoolean Boolean
93+#define _XtDimension Dimension
94+#define _XtKeyCode KeyCode
95+#define _XtPosition Position
96+#define _XtXtEnum XtEnum
97+#endif /* NeedWidePrototypes */
98+
99+#include <stddef.h>
100+
101+#define externalref extern
102+#define externaldef(psect)
103+
104+#ifndef FALSE
105+#define FALSE 0
106+#define TRUE 1
107+#endif
108+
109+#if __STDC_VERSION__ >= 199901L
110+#include <stdint.h>
111+typedef intptr_t XtIntPtr;
112+typedef uintptr_t XtUIntPtr;
113+#else
114+typedef long XtIntPtr;
115+typedef unsigned long XtUIntPtr;
116+#endif
117+
118+#define XtNumber(arr) ((Cardinal) (sizeof(arr) / sizeof(arr[0])))
119+
120+typedef struct _WidgetRec *Widget;
121+typedef Widget *WidgetList;
122+typedef struct _WidgetClassRec *WidgetClass;
123+typedef struct _CompositeRec *CompositeWidget;
124+typedef struct _XtActionsRec *XtActionList;
125+typedef struct _XtEventRec *XtEventTable;
126+
127+typedef struct _XtAppStruct *XtAppContext;
128+typedef unsigned long XtValueMask;
129+typedef XtUIntPtr XtIntervalId;
130+typedef XtUIntPtr XtInputId;
131+typedef XtUIntPtr XtWorkProcId;
132+typedef XtUIntPtr XtSignalId;
133+typedef unsigned int XtGeometryMask;
134+typedef unsigned long XtGCMask; /* Mask of values that are used by widget*/
135+typedef unsigned long Pixel; /* Index into colormap */
136+typedef int XtCacheType;
137+#define XtCacheNone 0x001
138+#define XtCacheAll 0x002
139+#define XtCacheByDisplay 0x003
140+#define XtCacheRefCount 0x100
141+
142+/****************************************************************
143+ *
144+ * System Dependent Definitions; see spec for specific range
145+ * requirements. Do not assume every implementation uses the
146+ * same base types!
147+ *
148+ *
149+ * XtArgVal ought to be a union of XtPointer, char *, long, int *, and proc *
150+ * but casting to union types is not really supported.
151+ *
152+ * So the typedef for XtArgVal should be chosen such that
153+ *
154+ * sizeof (XtArgVal) >= sizeof(XtPointer)
155+ * sizeof(char *)
156+ * sizeof(long)
157+ * sizeof(int *)
158+ * sizeof(proc *)
159+ *
160+ * ArgLists rely heavily on the above typedef.
161+ *
162+ ****************************************************************/
163+typedef char Boolean;
164+typedef XtIntPtr XtArgVal;
165+typedef unsigned char XtEnum;
166+
167+typedef unsigned int Cardinal;
168+typedef unsigned short Dimension; /* Size in pixels */
169+typedef short Position; /* Offset from 0 coordinate */
170+
171+typedef void* XtPointer;
172+#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
173+_Static_assert(sizeof(XtArgVal) >= sizeof(XtPointer), "XtArgVal too small");
174+_Static_assert(sizeof(XtArgVal) >= sizeof(long), "XtArgVal too small");
175+#endif
176+
177+
178+/* The type Opaque is NOT part of the Xt standard, do NOT use it. */
179+/* (It remains here only for backward compatibility.) */
180+typedef XtPointer Opaque;
181+
182+#include <X11/Core.h>
183+#include <X11/Composite.h>
184+#include <X11/Constraint.h>
185+#include <X11/Object.h>
186+#include <X11/RectObj.h>
187+
188+typedef struct _TranslationData *XtTranslations;
189+typedef struct _TranslationData *XtAccelerators;
190+typedef unsigned int Modifiers;
191+
192+typedef void (*XtActionProc)(
193+ Widget /* widget */,
194+ XEvent* /* event */,
195+ String* /* params */,
196+ Cardinal* /* num_params */
197+);
198+
199+typedef XtActionProc* XtBoundActions;
200+
201+typedef struct _XtActionsRec{
202+ String string;
203+ XtActionProc proc;
204+} XtActionsRec;
205+
206+typedef enum {
207+/* address mode parameter representation */
208+/* ------------ ------------------------ */
209+ XtAddress, /* address */
210+ XtBaseOffset, /* offset */
211+ XtImmediate, /* constant */
212+ XtResourceString, /* resource name string */
213+ XtResourceQuark, /* resource name quark */
214+ XtWidgetBaseOffset, /* offset from ancestor */
215+ XtProcedureArg /* procedure to invoke */
216+} XtAddressMode;
217+
218+typedef struct {
219+ XtAddressMode address_mode;
220+ XtPointer address_id;
221+ Cardinal size;
222+} XtConvertArgRec, *XtConvertArgList;
223+
224+typedef void (*XtConvertArgProc)(
225+ Widget /* widget */,
226+ Cardinal* /* size */,
227+ XrmValue* /* value */
228+);
229+
230+typedef struct {
231+ XtGeometryMask request_mode;
232+ Position x, y;
233+ Dimension width, height, border_width;
234+ Widget sibling;
235+ int stack_mode; /* Above, Below, TopIf, BottomIf, Opposite, DontChange */
236+} XtWidgetGeometry;
237+
238+/* Additions to Xlib geometry requests: ask what would happen, don't do it */
239+#define XtCWQueryOnly (1 << 7)
240+
241+/* Additions to Xlib stack modes: don't change stack order */
242+#define XtSMDontChange 5
243+
244+typedef void (*XtConverter)( /* obsolete */
245+ XrmValue* /* args */,
246+ Cardinal* /* num_args */,
247+ XrmValue* /* from */,
248+ XrmValue* /* to */
249+);
250+
251+typedef Boolean (*XtTypeConverter)(
252+ Display* /* dpy */,
253+ XrmValue* /* args */,
254+ Cardinal* /* num_args */,
255+ XrmValue* /* from */,
256+ XrmValue* /* to */,
257+ XtPointer* /* converter_data */
258+);
259+
260+typedef void (*XtDestructor)(
261+ XtAppContext /* app */,
262+ XrmValue* /* to */,
263+ XtPointer /* converter_data */,
264+ XrmValue* /* args */,
265+ Cardinal* /* num_args */
266+);
267+
268+typedef Opaque XtCacheRef;
269+
270+typedef Opaque XtActionHookId;
271+
272+typedef void (*XtActionHookProc)(
273+ Widget /* w */,
274+ XtPointer /* client_data */,
275+ String /* action_name */,
276+ XEvent* /* event */,
277+ String* /* params */,
278+ Cardinal* /* num_params */
279+);
280+
281+typedef XtUIntPtr XtBlockHookId;
282+
283+typedef void (*XtBlockHookProc)(
284+ XtPointer /* client_data */
285+);
286+
287+typedef void (*XtKeyProc)(
288+ Display* /* dpy */,
289+ _XtKeyCode /* keycode */,
290+ Modifiers /* modifiers */,
291+ Modifiers* /* modifiers_return */,
292+ KeySym* /* keysym_return */
293+);
294+
295+typedef void (*XtCaseProc)(
296+ Display* /* display */,
297+ KeySym /* keysym */,
298+ KeySym* /* lower_return */,
299+ KeySym* /* upper_return */
300+);
301+
302+typedef void (*XtEventHandler)(
303+ Widget /* widget */,
304+ XtPointer /* closure */,
305+ XEvent* /* event */,
306+ Boolean* /* continue_to_dispatch */
307+);
308+typedef unsigned long EventMask;
309+
310+typedef enum {XtListHead, XtListTail } XtListPosition;
311+
312+typedef unsigned long XtInputMask;
313+#define XtInputNoneMask 0L
314+#define XtInputReadMask (1L<<0)
315+#define XtInputWriteMask (1L<<1)
316+#define XtInputExceptMask (1L<<2)
317+
318+typedef void (*XtTimerCallbackProc)(
319+ XtPointer /* closure */,
320+ XtIntervalId* /* id */
321+);
322+
323+typedef void (*XtInputCallbackProc)(
324+ XtPointer /* closure */,
325+ int* /* source */,
326+ XtInputId* /* id */
327+);
328+
329+typedef void (*XtSignalCallbackProc)(
330+ XtPointer /* closure */,
331+ XtSignalId* /* id */
332+);
333+
334+typedef struct {
335+ String name;
336+ XtArgVal value;
337+} Arg, *ArgList;
338+
339+typedef XtPointer XtVarArgsList;
340+
341+typedef void (*XtCallbackProc)(
342+ Widget /* widget */,
343+ XtPointer /* closure */, /* data the application registered */
344+ XtPointer /* call_data */ /* callback specific data */
345+);
346+
347+typedef struct _XtCallbackRec {
348+ XtCallbackProc callback;
349+ XtPointer closure;
350+} XtCallbackRec, *XtCallbackList;
351+
352+typedef enum {
353+ XtCallbackNoList,
354+ XtCallbackHasNone,
355+ XtCallbackHasSome
356+} XtCallbackStatus;
357+
358+typedef enum {
359+ XtGeometryYes, /* Request accepted. */
360+ XtGeometryNo, /* Request denied. */
361+ XtGeometryAlmost, /* Request denied, but willing to take replyBox. */
362+ XtGeometryDone /* Request accepted and done. */
363+} XtGeometryResult;
364+
365+typedef enum {XtGrabNone, XtGrabNonexclusive, XtGrabExclusive} XtGrabKind;
366+
367+typedef struct {
368+ Widget shell_widget;
369+ Widget enable_widget;
370+} XtPopdownIDRec, *XtPopdownID;
371+
372+typedef struct _XtResource {
373+ String resource_name; /* Resource name */
374+ String resource_class; /* Resource class */
375+ String resource_type; /* Representation type desired */
376+ Cardinal resource_size; /* Size in bytes of representation */
377+ Cardinal resource_offset;/* Offset from base to put resource value */
378+ String default_type; /* representation type of specified default */
379+ XtPointer default_addr; /* Address of default resource */
380+} XtResource, *XtResourceList;
381+
382+typedef void (*XtResourceDefaultProc)(
383+ Widget /* widget */,
384+ int /* offset */,
385+ XrmValue* /* value */
386+);
387+
388+typedef String (*XtLanguageProc)(
389+ Display* /* dpy */,
390+ String /* xnl */,
391+ XtPointer /* client_data */
392+);
393+
394+typedef void (*XtErrorMsgHandler)(
395+ String /* name */,
396+ String /* type */,
397+ String /* class */,
398+ String /* default */,
399+ String* /* params */,
400+ Cardinal* /* num_params */
401+);
402+
403+typedef void (*XtErrorHandler)(
404+ String /* msg */
405+);
406+
407+typedef void (*XtCreatePopupChildProc)(
408+ Widget /* shell */
409+);
410+
411+typedef Boolean (*XtWorkProc)(
412+ XtPointer /* closure */ /* data the application registered */
413+);
414+
415+typedef struct {
416+ char match;
417+ _XtString substitution;
418+} SubstitutionRec, *Substitution;
419+
420+typedef Boolean (*XtFilePredicate)(
421+ String /* filename */
422+);
423+
424+typedef XtPointer XtRequestId;
425+
426+typedef Boolean (*XtConvertSelectionProc)(
427+ Widget /* widget */,
428+ Atom* /* selection */,
429+ Atom* /* target */,
430+ Atom* /* type_return */,
431+ XtPointer* /* value_return */,
432+ unsigned long* /* length_return */,
433+ int* /* format_return */
434+);
435+
436+typedef void (*XtLoseSelectionProc)(
437+ Widget /* widget */,
438+ Atom* /* selection */
439+);
440+
441+typedef void (*XtSelectionDoneProc)(
442+ Widget /* widget */,
443+ Atom* /* selection */,
444+ Atom* /* target */
445+);
446+
447+typedef void (*XtSelectionCallbackProc)(
448+ Widget /* widget */,
449+ XtPointer /* closure */,
450+ Atom* /* selection */,
451+ Atom* /* type */,
452+ XtPointer /* value */,
453+ unsigned long* /* length */,
454+ int* /* format */
455+);
456+
457+typedef void (*XtLoseSelectionIncrProc)(
458+ Widget /* widget */,
459+ Atom* /* selection */,
460+ XtPointer /* client_data */
461+);
462+
463+typedef void (*XtSelectionDoneIncrProc)(
464+ Widget /* widget */,
465+ Atom* /* selection */,
466+ Atom* /* target */,
467+ XtRequestId* /* receiver_id */,
468+ XtPointer /* client_data */
469+);
470+
471+typedef Boolean (*XtConvertSelectionIncrProc)(
472+ Widget /* widget */,
473+ Atom* /* selection */,
474+ Atom* /* target */,
475+ Atom* /* type */,
476+ XtPointer* /* value */,
477+ unsigned long* /* length */,
478+ int* /* format */,
479+ unsigned long* /* max_length */,
480+ XtPointer /* client_data */,
481+ XtRequestId* /* receiver_id */
482+);
483+
484+typedef void (*XtCancelConvertSelectionProc)(
485+ Widget /* widget */,
486+ Atom* /* selection */,
487+ Atom* /* target */,
488+ XtRequestId* /* receiver_id */,
489+ XtPointer /* client_data */
490+);
491+
492+typedef Boolean (*XtEventDispatchProc)(
493+ XEvent* /* event */
494+);
495+
496+typedef void (*XtExtensionSelectProc)(
497+ Widget /* widget */,
498+ int* /* event_types */,
499+ XtPointer* /* select_data */,
500+ int /* count */,
501+ XtPointer /* client_data */
502+);
503+
504+/***************************************************************
505+ *
506+ * Exported Interfaces
507+ *
508+ ****************************************************************/
509+
510+_XFUNCPROTOBEGIN
511+
512+extern Boolean XtConvertAndStore(
513+ Widget /* widget */,
514+ _Xconst _XtString /* from_type */,
515+ XrmValue* /* from */,
516+ _Xconst _XtString /* to_type */,
517+ XrmValue* /* to_in_out */
518+);
519+
520+extern Boolean XtCallConverter(
521+ Display* /* dpy */,
522+ XtTypeConverter /* converter */,
523+ XrmValuePtr /* args */,
524+ Cardinal /* num_args */,
525+ XrmValuePtr /* from */,
526+ XrmValue* /* to_in_out */,
527+ XtCacheRef* /* cache_ref_return */
528+);
529+
530+extern Boolean XtDispatchEvent(
531+ XEvent* /* event */
532+);
533+
534+extern Boolean XtCallAcceptFocus(
535+ Widget /* widget */,
536+ Time* /* time */
537+);
538+
539+extern Boolean XtPeekEvent( /* obsolete */
540+ XEvent* /* event_return */
541+);
542+
543+extern Boolean XtAppPeekEvent(
544+ XtAppContext /* app_context */,
545+ XEvent* /* event_return */
546+);
547+
548+extern Boolean XtIsSubclass(
549+ Widget /* widget */,
550+ WidgetClass /* widgetClass */
551+);
552+
553+extern Boolean XtIsObject(
554+ Widget /* object */
555+);
556+
557+extern Boolean _XtCheckSubclassFlag( /* implementation-private */
558+ Widget /* object */,
559+ _XtXtEnum /* type_flag */
560+);
561+
562+extern Boolean _XtIsSubclassOf( /* implementation-private */
563+ Widget /* object */,
564+ WidgetClass /* widget_class */,
565+ WidgetClass /* flag_class */,
566+ _XtXtEnum /* type_flag */
567+);
568+
569+extern Boolean XtIsManaged(
570+ Widget /* rectobj */
571+);
572+
573+extern Boolean XtIsRealized(
574+ Widget /* widget */
575+);
576+
577+extern Boolean XtIsSensitive(
578+ Widget /* widget */
579+);
580+
581+extern Boolean XtOwnSelection(
582+ Widget /* widget */,
583+ Atom /* selection */,
584+ Time /* time */,
585+ XtConvertSelectionProc /* convert */,
586+ XtLoseSelectionProc /* lose */,
587+ XtSelectionDoneProc /* done */
588+);
589+
590+extern Boolean XtOwnSelectionIncremental(
591+ Widget /* widget */,
592+ Atom /* selection */,
593+ Time /* time */,
594+ XtConvertSelectionIncrProc /* convert_callback */,
595+ XtLoseSelectionIncrProc /* lose_callback */,
596+ XtSelectionDoneIncrProc /* done_callback */,
597+ XtCancelConvertSelectionProc /* cancel_callback */,
598+ XtPointer /* client_data */
599+);
600+
601+extern XtGeometryResult XtMakeResizeRequest(
602+ Widget /* widget */,
603+ _XtDimension /* width */,
604+ _XtDimension /* height */,
605+ Dimension* /* width_return */,
606+ Dimension* /* height_return */
607+);
608+
609+extern void XtTranslateCoords(
610+ Widget /* widget */,
611+ _XtPosition /* x */,
612+ _XtPosition /* y */,
613+ Position* /* rootx_return */,
614+ Position* /* rooty_return */
615+);
616+
617+extern KeySym* XtGetKeysymTable(
618+ Display* /* dpy */,
619+ KeyCode* /* min_keycode_return */,
620+ int* /* keysyms_per_keycode_return */
621+);
622+
623+extern void XtKeysymToKeycodeList(
624+ Display* /* dpy */,
625+ KeySym /* keysym */,
626+ KeyCode** /* keycodes_return */,
627+ Cardinal* /* keycount_return */
628+);
629+
630+extern void XtStringConversionWarning( /* obsolete */
631+ _Xconst _XtString /* from_value */,
632+ _Xconst _XtString /* to_type */
633+);
634+
635+extern void XtDisplayStringConversionWarning(
636+ Display* /* dpy */,
637+ _Xconst _XtString /* from_value */,
638+ _Xconst _XtString /* to_type */
639+);
640+
641+externalref XtConvertArgRec const colorConvertArgs[];
642+externalref XtConvertArgRec const screenConvertArg[];
643+
644+extern void XtAppAddConverter( /* obsolete */
645+ XtAppContext /* app_context */,
646+ _Xconst _XtString /* from_type */,
647+ _Xconst _XtString /* to_type */,
648+ XtConverter /* converter */,
649+ XtConvertArgList /* convert_args */,
650+ Cardinal /* num_args */
651+);
652+
653+extern void XtAddConverter( /* obsolete */
654+ _Xconst _XtString /* from_type */,
655+ _Xconst _XtString /* to_type */,
656+ XtConverter /* converter */,
657+ XtConvertArgList /* convert_args */,
658+ Cardinal /* num_args */
659+);
660+
661+extern void XtSetTypeConverter(
662+ _Xconst _XtString /* from_type */,
663+ _Xconst _XtString /* to_type */,
664+ XtTypeConverter /* converter */,
665+ XtConvertArgList /* convert_args */,
666+ Cardinal /* num_args */,
667+ XtCacheType /* cache_type */,
668+ XtDestructor /* destructor */
669+);
670+
671+extern void XtAppSetTypeConverter(
672+ XtAppContext /* app_context */,
673+ _Xconst _XtString /* from_type */,
674+ _Xconst _XtString /* to_type */,
675+ XtTypeConverter /* converter */,
676+ XtConvertArgList /* convert_args */,
677+ Cardinal /* num_args */,
678+ XtCacheType /* cache_type */,
679+ XtDestructor /* destructor */
680+);
681+
682+extern void XtConvert( /* obsolete */
683+ Widget /* widget */,
684+ _Xconst _XtString /* from_type */,
685+ XrmValue* /* from */,
686+ _Xconst _XtString /* to_type */,
687+ XrmValue* /* to_return */
688+);
689+
690+extern void XtDirectConvert( /* obsolete */
691+ XtConverter /* converter */,
692+ XrmValuePtr /* args */,
693+ Cardinal /* num_args */,
694+ XrmValuePtr /* from */,
695+ XrmValue* /* to_return */
696+);
697+
698+/****************************************************************
699+ *
700+ * Translation Management
701+ *
702+ ****************************************************************/
703+
704+extern XtTranslations XtParseTranslationTable(
705+ _Xconst _XtString /* table */
706+);
707+
708+extern XtAccelerators XtParseAcceleratorTable(
709+ _Xconst _XtString /* source */
710+);
711+
712+extern void XtOverrideTranslations(
713+ Widget /* widget */,
714+ XtTranslations /* translations */
715+);
716+
717+extern void XtAugmentTranslations(
718+ Widget /* widget */,
719+ XtTranslations /* translations */
720+);
721+
722+extern void XtInstallAccelerators(
723+ Widget /* destination */,
724+ Widget /* source */
725+);
726+
727+extern void XtInstallAllAccelerators(
728+ Widget /* destination */,
729+ Widget /* source */
730+);
731+
732+extern void XtUninstallTranslations(
733+ Widget /* widget */
734+);
735+
736+extern void XtAppAddActions(
737+ XtAppContext /* app_context */,
738+ XtActionList /* actions */,
739+ Cardinal /* num_actions */
740+);
741+
742+extern void XtAddActions( /* obsolete */
743+ XtActionList /* actions */,
744+ Cardinal /* num_actions */
745+);
746+
747+extern XtActionHookId XtAppAddActionHook(
748+ XtAppContext /* app_context */,
749+ XtActionHookProc /* proc */,
750+ XtPointer /* client_data */
751+);
752+
753+extern void XtRemoveActionHook(
754+ XtActionHookId /* id */
755+);
756+
757+extern void XtGetActionList(
758+ WidgetClass /* widget_class */,
759+ XtActionList* /* actions_return */,
760+ Cardinal* /* num_actions_return */
761+);
762+
763+extern void XtCallActionProc(
764+ Widget /* widget */,
765+ _Xconst _XtString /* action */,
766+ XEvent* /* event */,
767+ String* /* params */,
768+ Cardinal /* num_params */
769+);
770+
771+extern void XtRegisterGrabAction(
772+ XtActionProc /* action_proc */,
773+ _XtBoolean /* owner_events */,
774+ unsigned int /* event_mask */,
775+ int /* pointer_mode */,
776+ int /* keyboard_mode */
777+);
778+
779+extern void XtSetMultiClickTime(
780+ Display* /* dpy */,
781+ int /* milliseconds */
782+);
783+
784+extern int XtGetMultiClickTime(
785+ Display* /* dpy */
786+);
787+
788+extern KeySym XtGetActionKeysym(
789+ XEvent* /* event */,
790+ Modifiers* /* modifiers_return */
791+);
792+
793+/***************************************************************
794+ *
795+ * Keycode and Keysym procedures for translation management
796+ *
797+ ****************************************************************/
798+
799+extern void XtTranslateKeycode(
800+ Display* /* dpy */,
801+ _XtKeyCode /* keycode */,
802+ Modifiers /* modifiers */,
803+ Modifiers* /* modifiers_return */,
804+ KeySym* /* keysym_return */
805+);
806+
807+extern void XtTranslateKey(
808+ Display* /* dpy */,
809+ _XtKeyCode /* keycode */,
810+ Modifiers /* modifiers */,
811+ Modifiers* /* modifiers_return */,
812+ KeySym* /* keysym_return */
813+);
814+
815+extern void XtSetKeyTranslator(
816+ Display* /* dpy */,
817+ XtKeyProc /* proc */
818+);
819+
820+extern void XtRegisterCaseConverter(
821+ Display* /* dpy */,
822+ XtCaseProc /* proc */,
823+ KeySym /* start */,
824+ KeySym /* stop */
825+);
826+
827+extern void XtConvertCase(
828+ Display* /* dpy */,
829+ KeySym /* keysym */,
830+ KeySym* /* lower_return */,
831+ KeySym* /* upper_return */
832+);
833+
834+/****************************************************************
835+ *
836+ * Event Management
837+ *
838+ ****************************************************************/
839+
840+/* XtAllEvents is valid only for XtRemoveEventHandler and
841+ * XtRemoveRawEventHandler; don't use it to select events!
842+ */
843+#define XtAllEvents ((EventMask) -1L)
844+
845+extern void XtAddEventHandler(
846+ Widget /* widget */,
847+ EventMask /* event_mask */,
848+ _XtBoolean /* nonmaskable */,
849+ XtEventHandler /* proc */,
850+ XtPointer /* closure */
851+);
852+
853+extern void XtRemoveEventHandler(
854+ Widget /* widget */,
855+ EventMask /* event_mask */,
856+ _XtBoolean /* nonmaskable */,
857+ XtEventHandler /* proc */,
858+ XtPointer /* closure */
859+);
860+
861+extern void XtAddRawEventHandler(
862+ Widget /* widget */,
863+ EventMask /* event_mask */,
864+ _XtBoolean /* nonmaskable */,
865+ XtEventHandler /* proc */,
866+ XtPointer /* closure */
867+);
868+
869+extern void XtRemoveRawEventHandler(
870+ Widget /* widget */,
871+ EventMask /* event_mask */,
872+ _XtBoolean /* nonmaskable */,
873+ XtEventHandler /* proc */,
874+ XtPointer /* closure */
875+);
876+
877+extern void XtInsertEventHandler(
878+ Widget /* widget */,
879+ EventMask /* event_mask */,
880+ _XtBoolean /* nonmaskable */,
881+ XtEventHandler /* proc */,
882+ XtPointer /* closure */,
883+ XtListPosition /* position */
884+);
885+
886+extern void XtInsertRawEventHandler(
887+ Widget /* widget */,
888+ EventMask /* event_mask */,
889+ _XtBoolean /* nonmaskable */,
890+ XtEventHandler /* proc */,
891+ XtPointer /* closure */,
892+ XtListPosition /* position */
893+);
894+
895+extern XtEventDispatchProc XtSetEventDispatcher(
896+ Display* /* dpy */,
897+ int /* event_type */,
898+ XtEventDispatchProc /* proc */
899+);
900+
901+extern Boolean XtDispatchEventToWidget(
902+ Widget /* widget */,
903+ XEvent* /* event */
904+);
905+
906+extern void XtInsertEventTypeHandler(
907+ Widget /* widget */,
908+ int /* type */,
909+ XtPointer /* select_data */,
910+ XtEventHandler /* proc */,
911+ XtPointer /* closure */,
912+ XtListPosition /* position */
913+);
914+
915+extern void XtRemoveEventTypeHandler(
916+ Widget /* widget */,
917+ int /* type */,
918+ XtPointer /* select_data */,
919+ XtEventHandler /* proc */,
920+ XtPointer /* closure */
921+);
922+
923+extern EventMask XtBuildEventMask(
924+ Widget /* widget */
925+);
926+
927+extern void XtRegisterExtensionSelector(
928+ Display* /* dpy */,
929+ int /* min_event_type */,
930+ int /* max_event_type */,
931+ XtExtensionSelectProc /* proc */,
932+ XtPointer /* client_data */
933+);
934+
935+extern void XtAddGrab(
936+ Widget /* widget */,
937+ _XtBoolean /* exclusive */,
938+ _XtBoolean /* spring_loaded */
939+);
940+
941+extern void XtRemoveGrab(
942+ Widget /* widget */
943+);
944+
945+extern void XtProcessEvent( /* obsolete */
946+ XtInputMask /* mask */
947+);
948+
949+extern void XtAppProcessEvent(
950+ XtAppContext /* app_context */,
951+ XtInputMask /* mask */
952+);
953+
954+extern void XtMainLoop( /* obsolete */
955+ void
956+);
957+
958+extern void XtAppMainLoop(
959+ XtAppContext /* app_context */
960+);
961+
962+extern void XtAddExposureToRegion(
963+ XEvent* /* event */,
964+ Region /* region */
965+);
966+
967+extern void XtSetKeyboardFocus(
968+ Widget /* subtree */,
969+ Widget /* descendent */
970+);
971+
972+extern Widget XtGetKeyboardFocusWidget(
973+ Widget /* widget */
974+);
975+
976+extern XEvent* XtLastEventProcessed(
977+ Display* /* dpy */
978+);
979+
980+extern Time XtLastTimestampProcessed(
981+ Display* /* dpy */
982+);
983+
984+/****************************************************************
985+ *
986+ * Event Gathering Routines
987+ *
988+ ****************************************************************/
989+
990+extern XtIntervalId XtAddTimeOut( /* obsolete */
991+ unsigned long /* interval */,
992+ XtTimerCallbackProc /* proc */,
993+ XtPointer /* closure */
994+);
995+
996+extern XtIntervalId XtAppAddTimeOut(
997+ XtAppContext /* app_context */,
998+ unsigned long /* interval */,
999+ XtTimerCallbackProc /* proc */,
1000+ XtPointer /* closure */
1001+);
1002+
1003+extern void XtRemoveTimeOut(
1004+ XtIntervalId /* timer */
1005+);
1006+
1007+extern XtInputId XtAddInput( /* obsolete */
1008+ int /* source */,
1009+ XtPointer /* condition */,
1010+ XtInputCallbackProc /* proc */,
1011+ XtPointer /* closure */
1012+);
1013+
1014+extern XtInputId XtAppAddInput(
1015+ XtAppContext /* app_context */,
1016+ int /* source */,
1017+ XtPointer /* condition */,
1018+ XtInputCallbackProc /* proc */,
1019+ XtPointer /* closure */
1020+);
1021+
1022+extern void XtRemoveInput(
1023+ XtInputId /* id */
1024+);
1025+
1026+extern XtSignalId XtAddSignal(
1027+ XtSignalCallbackProc /* proc */,
1028+ XtPointer /* closure */);
1029+
1030+extern XtSignalId XtAppAddSignal(
1031+ XtAppContext /* app_context */,
1032+ XtSignalCallbackProc /* proc */,
1033+ XtPointer /* closure */
1034+);
1035+
1036+extern void XtRemoveSignal(
1037+ XtSignalId /* id */
1038+);
1039+
1040+extern void XtNoticeSignal(
1041+ XtSignalId /* id */
1042+);
1043+
1044+extern void XtNextEvent( /* obsolete */
1045+ XEvent* /* event */
1046+);
1047+
1048+extern void XtAppNextEvent(
1049+ XtAppContext /* app_context */,
1050+ XEvent* /* event_return */
1051+);
1052+
1053+#define XtIMXEvent 1
1054+#define XtIMTimer 2
1055+#define XtIMAlternateInput 4
1056+#define XtIMSignal 8
1057+#define XtIMAll (XtIMXEvent | XtIMTimer | XtIMAlternateInput | XtIMSignal)
1058+
1059+extern Boolean XtPending( /* obsolete */
1060+ void
1061+);
1062+
1063+extern XtInputMask XtAppPending(
1064+ XtAppContext /* app_context */
1065+);
1066+
1067+extern XtBlockHookId XtAppAddBlockHook(
1068+ XtAppContext /* app_context */,
1069+ XtBlockHookProc /* proc */,
1070+ XtPointer /* client_data */
1071+);
1072+
1073+extern void XtRemoveBlockHook(
1074+ XtBlockHookId /* id */
1075+);
1076+
1077+/****************************************************************
1078+ *
1079+ * Random utility routines
1080+ *
1081+ ****************************************************************/
1082+
1083+#define XtIsRectObj(object) (_XtCheckSubclassFlag(object, (XtEnum)0x02))
1084+#define XtIsWidget(object) (_XtCheckSubclassFlag(object, (XtEnum)0x04))
1085+#define XtIsComposite(widget) (_XtCheckSubclassFlag(widget, (XtEnum)0x08))
1086+#define XtIsConstraint(widget) (_XtCheckSubclassFlag(widget, (XtEnum)0x10))
1087+#define XtIsShell(widget) (_XtCheckSubclassFlag(widget, (XtEnum)0x20))
1088+
1089+#undef XtIsOverrideShell
1090+extern Boolean XtIsOverrideShell(Widget /* object */);
1091+#define XtIsOverrideShell(widget) \
1092+ (_XtIsSubclassOf(widget, (WidgetClass)overrideShellWidgetClass, \
1093+ (WidgetClass)shellWidgetClass, (XtEnum)0x20))
1094+
1095+#define XtIsWMShell(widget) (_XtCheckSubclassFlag(widget, (XtEnum)0x40))
1096+
1097+#undef XtIsVendorShell
1098+extern Boolean XtIsVendorShell(Widget /* object */);
1099+#define XtIsVendorShell(widget) \
1100+ (_XtIsSubclassOf(widget, (WidgetClass)vendorShellWidgetClass, \
1101+ (WidgetClass)wmShellWidgetClass, (XtEnum)0x40))
1102+
1103+#undef XtIsTransientShell
1104+extern Boolean XtIsTransientShell(Widget /* object */);
1105+#define XtIsTransientShell(widget) \
1106+ (_XtIsSubclassOf(widget, (WidgetClass)transientShellWidgetClass, \
1107+ (WidgetClass)wmShellWidgetClass, (XtEnum)0x40))
1108+#define XtIsTopLevelShell(widget) (_XtCheckSubclassFlag(widget, (XtEnum)0x80))
1109+
1110+#undef XtIsApplicationShell
1111+extern Boolean XtIsApplicationShell(Widget /* object */);
1112+#define XtIsApplicationShell(widget) \
1113+ (_XtIsSubclassOf(widget, (WidgetClass)applicationShellWidgetClass, \
1114+ (WidgetClass)topLevelShellWidgetClass, (XtEnum)0x80))
1115+
1116+#undef XtIsSessionShell
1117+extern Boolean XtIsSessionShell(Widget /* object */);
1118+#define XtIsSessionShell(widget) \
1119+ (_XtIsSubclassOf(widget, (WidgetClass)sessionShellWidgetClass, \
1120+ (WidgetClass)topLevelShellWidgetClass, (XtEnum)0x80))
1121+
1122+extern void XtRealizeWidget(
1123+ Widget /* widget */
1124+);
1125+
1126+void XtUnrealizeWidget(
1127+ Widget /* widget */
1128+);
1129+
1130+extern void XtDestroyWidget(
1131+ Widget /* widget */
1132+);
1133+
1134+extern void XtSetSensitive(
1135+ Widget /* widget */,
1136+ _XtBoolean /* sensitive */
1137+);
1138+
1139+extern void XtSetMappedWhenManaged(
1140+ Widget /* widget */,
1141+ _XtBoolean /* mapped_when_managed */
1142+);
1143+
1144+extern Widget XtNameToWidget(
1145+ Widget /* reference */,
1146+ _Xconst _XtString /* names */
1147+);
1148+
1149+extern Widget XtWindowToWidget(
1150+ Display* /* display */,
1151+ Window /* window */
1152+);
1153+
1154+extern XtPointer XtGetClassExtension(
1155+ WidgetClass /* object_class */,
1156+ Cardinal /* byte_offset */,
1157+ XrmQuark /* type */,
1158+ long /* version */,
1159+ Cardinal /* record_size */
1160+);
1161+
1162+/***************************************************************
1163+ *
1164+ * Arg lists
1165+ *
1166+ ****************************************************************/
1167+
1168+
1169+#define XtSetArg(arg, n, d) \
1170+ ((void)( (arg).name = (n), (arg).value = (XtArgVal)(d) ))
1171+
1172+extern ArgList XtMergeArgLists(
1173+ ArgList /* args1 */,
1174+ Cardinal /* num_args1 */,
1175+ ArgList /* args2 */,
1176+ Cardinal /* num_args2 */
1177+);
1178+
1179+/***************************************************************
1180+ *
1181+ * Vararg lists
1182+ *
1183+ ****************************************************************/
1184+
1185+#define XtVaNestedList "XtVaNestedList"
1186+#define XtVaTypedArg "XtVaTypedArg"
1187+
1188+extern XtVarArgsList XtVaCreateArgsList(
1189+ XtPointer /*unused*/, ...
1190+) _X_SENTINEL(0);
1191+
1192+/*************************************************************
1193+ *
1194+ * Information routines
1195+ *
1196+ ************************************************************/
1197+
1198+#ifndef _XtIntrinsicP_h
1199+
1200+/* We're not included from the private file, so define these */
1201+
1202+extern Display *XtDisplay(
1203+ Widget /* widget */
1204+);
1205+
1206+extern Display *XtDisplayOfObject(
1207+ Widget /* object */
1208+);
1209+
1210+extern Screen *XtScreen(
1211+ Widget /* widget */
1212+);
1213+
1214+extern Screen *XtScreenOfObject(
1215+ Widget /* object */
1216+);
1217+
1218+extern Window XtWindow(
1219+ Widget /* widget */
1220+);
1221+
1222+extern Window XtWindowOfObject(
1223+ Widget /* object */
1224+);
1225+
1226+extern String XtName(
1227+ Widget /* object */
1228+);
1229+
1230+extern WidgetClass XtSuperclass(
1231+ Widget /* object */
1232+);
1233+
1234+extern WidgetClass XtClass(
1235+ Widget /* object */
1236+);
1237+
1238+extern Widget XtParent(
1239+ Widget /* widget */
1240+);
1241+
1242+#endif /*_XtIntrinsicP_h*/
1243+
1244+#undef XtMapWidget
1245+extern void XtMapWidget(Widget /* w */);
1246+#define XtMapWidget(widget) XMapWindow(XtDisplay(widget), XtWindow(widget))
1247+
1248+#undef XtUnmapWidget
1249+extern void XtUnmapWidget(Widget /* w */);
1250+#define XtUnmapWidget(widget) \
1251+ XUnmapWindow(XtDisplay(widget), XtWindow(widget))
1252+
1253+extern void XtAddCallback(
1254+ Widget /* widget */,
1255+ _Xconst _XtString /* callback_name */,
1256+ XtCallbackProc /* callback */,
1257+ XtPointer /* closure */
1258+);
1259+
1260+extern void XtRemoveCallback(
1261+ Widget /* widget */,
1262+ _Xconst _XtString /* callback_name */,
1263+ XtCallbackProc /* callback */,
1264+ XtPointer /* closure */
1265+);
1266+
1267+extern void XtAddCallbacks(
1268+ Widget /* widget */,
1269+ _Xconst _XtString /* callback_name */,
1270+ XtCallbackList /* callbacks */
1271+);
1272+
1273+extern void XtRemoveCallbacks(
1274+ Widget /* widget */,
1275+ _Xconst _XtString /* callback_name */,
1276+ XtCallbackList /* callbacks */
1277+);
1278+
1279+extern void XtRemoveAllCallbacks(
1280+ Widget /* widget */,
1281+ _Xconst _XtString /* callback_name */
1282+);
1283+
1284+
1285+extern void XtCallCallbacks(
1286+ Widget /* widget */,
1287+ _Xconst _XtString /* callback_name */,
1288+ XtPointer /* call_data */
1289+);
1290+
1291+extern void XtCallCallbackList(
1292+ Widget /* widget */,
1293+ XtCallbackList /* callbacks */,
1294+ XtPointer /* call_data */
1295+);
1296+
1297+extern XtCallbackStatus XtHasCallbacks(
1298+ Widget /* widget */,
1299+ _Xconst _XtString /* callback_name */
1300+);
1301+
1302+/****************************************************************
1303+ *
1304+ * Geometry Management
1305+ *
1306+ ****************************************************************/
1307+
1308+
1309+extern XtGeometryResult XtMakeGeometryRequest(
1310+ Widget /* widget */,
1311+ XtWidgetGeometry* /* request */,
1312+ XtWidgetGeometry* /* reply_return */
1313+);
1314+
1315+extern XtGeometryResult XtQueryGeometry(
1316+ Widget /* widget */,
1317+ XtWidgetGeometry* /* intended */,
1318+ XtWidgetGeometry* /* preferred_return */
1319+);
1320+
1321+extern Widget XtCreatePopupShell(
1322+ _Xconst _XtString /* name */,
1323+ WidgetClass /* widgetClass */,
1324+ Widget /* parent */,
1325+ ArgList /* args */,
1326+ Cardinal /* num_args */
1327+);
1328+
1329+extern Widget XtVaCreatePopupShell(
1330+ _Xconst _XtString /* name */,
1331+ WidgetClass /* widgetClass */,
1332+ Widget /* parent */,
1333+ ...
1334+) _X_SENTINEL(0);
1335+
1336+extern void XtPopup(
1337+ Widget /* popup_shell */,
1338+ XtGrabKind /* grab_kind */
1339+);
1340+
1341+extern void XtPopupSpringLoaded(
1342+ Widget /* popup_shell */
1343+);
1344+
1345+extern void XtCallbackNone(
1346+ Widget /* widget */,
1347+ XtPointer /* closure */,
1348+ XtPointer /* call_data */
1349+);
1350+
1351+extern void XtCallbackNonexclusive(
1352+ Widget /* widget */,
1353+ XtPointer /* closure */,
1354+ XtPointer /* call_data */
1355+);
1356+
1357+extern void XtCallbackExclusive(
1358+ Widget /* widget */,
1359+ XtPointer /* closure */,
1360+ XtPointer /* call_data */
1361+);
1362+
1363+extern void XtPopdown(
1364+ Widget /* popup_shell */
1365+);
1366+
1367+extern void XtCallbackPopdown(
1368+ Widget /* widget */,
1369+ XtPointer /* closure */,
1370+ XtPointer /* call_data */
1371+);
1372+
1373+extern void XtMenuPopupAction(
1374+ Widget /* widget */,
1375+ XEvent* /* event */,
1376+ String* /* params */,
1377+ Cardinal* /* num_params */
1378+);
1379+
1380+extern Widget XtCreateWidget(
1381+ _Xconst _XtString /* name */,
1382+ WidgetClass /* widget_class */,
1383+ Widget /* parent */,
1384+ ArgList /* args */,
1385+ Cardinal /* num_args */
1386+);
1387+
1388+extern Widget XtCreateManagedWidget(
1389+ _Xconst _XtString /* name */,
1390+ WidgetClass /* widget_class */,
1391+ Widget /* parent */,
1392+ ArgList /* args */,
1393+ Cardinal /* num_args */
1394+);
1395+
1396+extern Widget XtVaCreateWidget(
1397+ _Xconst _XtString /* name */,
1398+ WidgetClass /* widget */,
1399+ Widget /* parent */,
1400+ ...
1401+) _X_SENTINEL(0);
1402+
1403+extern Widget XtVaCreateManagedWidget(
1404+ _Xconst _XtString /* name */,
1405+ WidgetClass /* widget_class */,
1406+ Widget /* parent */,
1407+ ...
1408+) _X_SENTINEL(0);
1409+
1410+extern Widget XtCreateApplicationShell( /* obsolete */
1411+ _Xconst _XtString /* name */,
1412+ WidgetClass /* widget_class */,
1413+ ArgList /* args */,
1414+ Cardinal /* num_args */
1415+);
1416+
1417+extern Widget XtAppCreateShell(
1418+ _Xconst _XtString /* application_name */,
1419+ _Xconst _XtString /* application_class */,
1420+ WidgetClass /* widget_class */,
1421+ Display* /* display */,
1422+ ArgList /* args */,
1423+ Cardinal /* num_args */
1424+);
1425+
1426+extern Widget XtVaAppCreateShell(
1427+ _Xconst _XtString /* application_name */,
1428+ _Xconst _XtString /* application_class */,
1429+ WidgetClass /* widget_class */,
1430+ Display* /* display */,
1431+ ...
1432+) _X_SENTINEL(0);
1433+
1434+/****************************************************************
1435+ *
1436+ * Toolkit initialization
1437+ *
1438+ ****************************************************************/
1439+
1440+extern void XtToolkitInitialize(
1441+ void
1442+);
1443+
1444+extern XtLanguageProc XtSetLanguageProc(
1445+ XtAppContext /* app_context */,
1446+ XtLanguageProc /* proc */,
1447+ XtPointer /* client_data */
1448+);
1449+
1450+extern void XtDisplayInitialize(
1451+ XtAppContext /* app_context */,
1452+ Display* /* dpy */,
1453+ _Xconst _XtString /* application_name */,
1454+ _Xconst _XtString /* application_class */,
1455+ XrmOptionDescRec* /* options */,
1456+ Cardinal /* num_options */,
1457+ int* /* argc */,
1458+ _XtString* /* argv */
1459+);
1460+
1461+extern Widget XtOpenApplication(
1462+ XtAppContext* /* app_context_return */,
1463+ _Xconst _XtString /* application_class */,
1464+ XrmOptionDescList /* options */,
1465+ Cardinal /* num_options */,
1466+ int* /* argc_in_out */,
1467+ _XtString* /* argv_in_out */,
1468+ String* /* fallback_resources */,
1469+ WidgetClass /* widget_class */,
1470+ ArgList /* args */,
1471+ Cardinal /* num_args */
1472+);
1473+
1474+extern Widget XtVaOpenApplication(
1475+ XtAppContext* /* app_context_return */,
1476+ _Xconst _XtString /* application_class */,
1477+ XrmOptionDescList /* options */,
1478+ Cardinal /* num_options */,
1479+ int* /* argc_in_out */,
1480+ _XtString* /* argv_in_out */,
1481+ String* /* fallback_resources */,
1482+ WidgetClass /* widget_class */,
1483+ ...
1484+) _X_SENTINEL(0);
1485+
1486+extern Widget XtAppInitialize( /* obsolete */
1487+ XtAppContext* /* app_context_return */,
1488+ _Xconst _XtString /* application_class */,
1489+ XrmOptionDescList /* options */,
1490+ Cardinal /* num_options */,
1491+ int* /* argc_in_out */,
1492+ _XtString* /* argv_in_out */,
1493+ String* /* fallback_resources */,
1494+ ArgList /* args */,
1495+ Cardinal /* num_args */
1496+);
1497+
1498+extern Widget XtVaAppInitialize( /* obsolete */
1499+ XtAppContext* /* app_context_return */,
1500+ _Xconst _XtString /* application_class */,
1501+ XrmOptionDescList /* options */,
1502+ Cardinal /* num_options */,
1503+ int* /* argc_in_out */,
1504+ _XtString* /* argv_in_out */,
1505+ String* /* fallback_resources */,
1506+ ...
1507+) _X_SENTINEL(0);
1508+
1509+extern Widget XtInitialize( /* obsolete */
1510+ _Xconst _XtString /* shell_name */,
1511+ _Xconst _XtString /* application_class */,
1512+ XrmOptionDescRec* /* options */,
1513+ Cardinal /* num_options */,
1514+ int* /* argc */,
1515+ _XtString* /* argv */
1516+);
1517+
1518+extern Display *XtOpenDisplay(
1519+ XtAppContext /* app_context */,
1520+ _Xconst _XtString /* display_string */,
1521+ _Xconst _XtString /* application_name */,
1522+ _Xconst _XtString /* application_class */,
1523+ XrmOptionDescRec* /* options */,
1524+ Cardinal /* num_options */,
1525+ int* /* argc */,
1526+ _XtString* /* argv */
1527+);
1528+
1529+extern XtAppContext XtCreateApplicationContext(
1530+ void
1531+);
1532+
1533+extern void XtAppSetFallbackResources(
1534+ XtAppContext /* app_context */,
1535+ String* /* specification_list */
1536+);
1537+
1538+extern void XtDestroyApplicationContext(
1539+ XtAppContext /* app_context */
1540+);
1541+
1542+extern void XtInitializeWidgetClass(
1543+ WidgetClass /* widget_class */
1544+);
1545+
1546+extern XtAppContext XtWidgetToApplicationContext(
1547+ Widget /* widget */
1548+);
1549+
1550+extern XtAppContext XtDisplayToApplicationContext(
1551+ Display* /* dpy */
1552+);
1553+
1554+extern XrmDatabase XtDatabase(
1555+ Display* /* dpy */
1556+);
1557+
1558+extern XrmDatabase XtScreenDatabase(
1559+ Screen* /* screen */
1560+);
1561+
1562+extern void XtCloseDisplay(
1563+ Display* /* dpy */
1564+);
1565+
1566+extern void XtGetApplicationResources(
1567+ Widget /* widget */,
1568+ XtPointer /* base */,
1569+ XtResourceList /* resources */,
1570+ Cardinal /* num_resources */,
1571+ ArgList /* args */,
1572+ Cardinal /* num_args */
1573+);
1574+
1575+extern void XtVaGetApplicationResources(
1576+ Widget /* widget */,
1577+ XtPointer /* base */,
1578+ XtResourceList /* resources */,
1579+ Cardinal /* num_resources */,
1580+ ...
1581+) _X_SENTINEL(0);
1582+
1583+extern void XtGetSubresources(
1584+ Widget /* widget */,
1585+ XtPointer /* base */,
1586+ _Xconst _XtString /* name */,
1587+ _Xconst _XtString /* class */,
1588+ XtResourceList /* resources */,
1589+ Cardinal /* num_resources */,
1590+ ArgList /* args */,
1591+ Cardinal /* num_args */
1592+);
1593+
1594+extern void XtVaGetSubresources(
1595+ Widget /* widget */,
1596+ XtPointer /* base */,
1597+ _Xconst _XtString /* name */,
1598+ _Xconst _XtString /* class */,
1599+ XtResourceList /* resources */,
1600+ Cardinal /* num_resources */,
1601+ ...
1602+) _X_SENTINEL(0);
1603+
1604+extern void XtSetValues(
1605+ Widget /* widget */,
1606+ ArgList /* args */,
1607+ Cardinal /* num_args */
1608+);
1609+
1610+extern void XtVaSetValues(
1611+ Widget /* widget */,
1612+ ...
1613+) _X_SENTINEL(0);
1614+
1615+extern void XtGetValues(
1616+ Widget /* widget */,
1617+ ArgList /* args */,
1618+ Cardinal /* num_args */
1619+);
1620+
1621+extern void XtVaGetValues(
1622+ Widget /* widget */,
1623+ ...
1624+) _X_SENTINEL(0);
1625+
1626+extern void XtSetSubvalues(
1627+ XtPointer /* base */,
1628+ XtResourceList /* resources */,
1629+ Cardinal /* num_resources */,
1630+ ArgList /* args */,
1631+ Cardinal /* num_args */
1632+);
1633+
1634+extern void XtVaSetSubvalues(
1635+ XtPointer /* base */,
1636+ XtResourceList /* resources */,
1637+ Cardinal /* num_resources */,
1638+ ...
1639+) _X_SENTINEL(0);
1640+
1641+extern void XtGetSubvalues(
1642+ XtPointer /* base */,
1643+ XtResourceList /* resources */,
1644+ Cardinal /* num_resources */,
1645+ ArgList /* args */,
1646+ Cardinal /* num_args */
1647+);
1648+
1649+extern void XtVaGetSubvalues(
1650+ XtPointer /* base */,
1651+ XtResourceList /* resources */,
1652+ Cardinal /* num_resources */,
1653+ ...
1654+) _X_SENTINEL(0);
1655+
1656+extern void XtGetResourceList(
1657+ WidgetClass /* widget_class */,
1658+ XtResourceList* /* resources_return */,
1659+ Cardinal* /* num_resources_return */
1660+);
1661+
1662+extern void XtGetConstraintResourceList(
1663+ WidgetClass /* widget_class */,
1664+ XtResourceList* /* resources_return */,
1665+ Cardinal* /* num_resources_return */
1666+);
1667+
1668+#define XtUnspecifiedPixmap ((Pixmap)2)
1669+#define XtUnspecifiedShellInt (-1)
1670+#define XtUnspecifiedWindow ((Window)2)
1671+#define XtUnspecifiedWindowGroup ((Window)3)
1672+#define XtCurrentDirectory "XtCurrentDirectory"
1673+#define XtDefaultForeground "XtDefaultForeground"
1674+#define XtDefaultBackground "XtDefaultBackground"
1675+#define XtDefaultFont "XtDefaultFont"
1676+#define XtDefaultFontSet "XtDefaultFontSet"
1677+
1678+#define XtOffset(p_type,field) \
1679+ ((Cardinal) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
1680+
1681+#ifdef offsetof
1682+#define XtOffsetOf(s_type,field) offsetof(s_type,field)
1683+#else
1684+#define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
1685+#endif
1686+
1687+/*************************************************************
1688+ *
1689+ * Session Management
1690+ *
1691+ ************************************************************/
1692+
1693+typedef struct _XtCheckpointTokenRec {
1694+ int save_type;
1695+ int interact_style;
1696+ Boolean shutdown;
1697+ Boolean fast;
1698+ Boolean cancel_shutdown;
1699+ int phase;
1700+ int interact_dialog_type; /* return */
1701+ Boolean request_cancel; /* return */
1702+ Boolean request_next_phase; /* return */
1703+ Boolean save_success; /* return */
1704+ int type; /* implementation private */
1705+ Widget widget; /* implementation private */
1706+} XtCheckpointTokenRec, *XtCheckpointToken;
1707+
1708+XtCheckpointToken XtSessionGetToken(
1709+ Widget /* widget */
1710+);
1711+
1712+void XtSessionReturnToken(
1713+ XtCheckpointToken /* token */
1714+);
1715+
1716+/*************************************************************
1717+ *
1718+ * Error Handling
1719+ *
1720+ ************************************************************/
1721+
1722+extern XtErrorMsgHandler XtAppSetErrorMsgHandler(
1723+ XtAppContext /* app_context */,
1724+ XtErrorMsgHandler /* handler */ _X_NORETURN
1725+);
1726+
1727+extern void XtSetErrorMsgHandler( /* obsolete */
1728+ XtErrorMsgHandler /* handler */ _X_NORETURN
1729+);
1730+
1731+extern XtErrorMsgHandler XtAppSetWarningMsgHandler(
1732+ XtAppContext /* app_context */,
1733+ XtErrorMsgHandler /* handler */
1734+);
1735+
1736+extern void XtSetWarningMsgHandler( /* obsolete */
1737+ XtErrorMsgHandler /* handler */
1738+);
1739+
1740+extern void XtAppErrorMsg(
1741+ XtAppContext /* app_context */,
1742+ _Xconst _XtString /* name */,
1743+ _Xconst _XtString /* type */,
1744+ _Xconst _XtString /* class */,
1745+ _Xconst _XtString /* default */,
1746+ String* /* params */,
1747+ Cardinal* /* num_params */
1748+) _X_NORETURN;
1749+
1750+extern void XtErrorMsg( /* obsolete */
1751+ _Xconst _XtString /* name */,
1752+ _Xconst _XtString /* type */,
1753+ _Xconst _XtString /* class */,
1754+ _Xconst _XtString /* default */,
1755+ String* /* params */,
1756+ Cardinal* /* num_params */
1757+) _X_NORETURN;
1758+
1759+extern void XtAppWarningMsg(
1760+ XtAppContext /* app_context */,
1761+ _Xconst _XtString /* name */,
1762+ _Xconst _XtString /* type */,
1763+ _Xconst _XtString /* class */,
1764+ _Xconst _XtString /* default */,
1765+ String* /* params */,
1766+ Cardinal* /* num_params */
1767+);
1768+
1769+extern void XtWarningMsg( /* obsolete */
1770+ _Xconst _XtString /* name */,
1771+ _Xconst _XtString /* type */,
1772+ _Xconst _XtString /* class */,
1773+ _Xconst _XtString /* default */,
1774+ String* /* params */,
1775+ Cardinal* /* num_params */
1776+);
1777+
1778+extern XtErrorHandler XtAppSetErrorHandler(
1779+ XtAppContext /* app_context */,
1780+ XtErrorHandler /* handler */ _X_NORETURN
1781+);
1782+
1783+extern void XtSetErrorHandler( /* obsolete */
1784+ XtErrorHandler /* handler */ _X_NORETURN
1785+);
1786+
1787+extern XtErrorHandler XtAppSetWarningHandler(
1788+ XtAppContext /* app_context */,
1789+ XtErrorHandler /* handler */
1790+);
1791+
1792+extern void XtSetWarningHandler( /* obsolete */
1793+ XtErrorHandler /* handler */
1794+);
1795+
1796+extern void XtAppError(
1797+ XtAppContext /* app_context */,
1798+ _Xconst _XtString /* message */
1799+) _X_NORETURN;
1800+
1801+extern void XtError( /* obsolete */
1802+ _Xconst _XtString /* message */
1803+) _X_NORETURN;
1804+
1805+extern void XtAppWarning(
1806+ XtAppContext /* app_context */,
1807+ _Xconst _XtString /* message */
1808+);
1809+
1810+extern void XtWarning( /* obsolete */
1811+ _Xconst _XtString /* message */
1812+);
1813+
1814+extern XrmDatabase *XtAppGetErrorDatabase(
1815+ XtAppContext /* app_context */
1816+);
1817+
1818+extern XrmDatabase *XtGetErrorDatabase( /* obsolete */
1819+ void
1820+);
1821+
1822+extern void XtAppGetErrorDatabaseText(
1823+ XtAppContext /* app_context */,
1824+ _Xconst _XtString /* name */,
1825+ _Xconst _XtString /* type */,
1826+ _Xconst _XtString /* class */,
1827+ _Xconst _XtString /* default */,
1828+ _XtString /* buffer_return */,
1829+ int /* nbytes */,
1830+ XrmDatabase /* database */
1831+);
1832+
1833+extern void XtGetErrorDatabaseText( /* obsolete */
1834+ _Xconst _XtString /* name */,
1835+ _Xconst _XtString /* type */,
1836+ _Xconst _XtString /* class */,
1837+ _Xconst _XtString /* default */,
1838+ _XtString /* buffer_return */,
1839+ int /* nbytes */
1840+);
1841+
1842+/****************************************************************
1843+ *
1844+ * Memory Management
1845+ *
1846+ ****************************************************************/
1847+
1848+extern char *XtMalloc(
1849+ Cardinal /* size */
1850+);
1851+
1852+extern char *XtCalloc(
1853+ Cardinal /* num */,
1854+ Cardinal /* size */
1855+);
1856+
1857+extern char *XtRealloc(
1858+ char* /* ptr */,
1859+ Cardinal /* num */
1860+);
1861+
1862+extern void *XtReallocArray(
1863+ void * /* ptr */,
1864+ Cardinal /* num */,
1865+ Cardinal /* size */
1866+);
1867+
1868+extern void XtFree(
1869+ char* /* ptr */
1870+);
1871+
1872+#ifndef _X_RESTRICT_KYWD
1873+# define _X_RESTRICT_KYWD
1874+#endif
1875+extern Cardinal XtAsprintf(
1876+ _XtString *new_string,
1877+ _Xconst char * _X_RESTRICT_KYWD format,
1878+ ...
1879+) _X_ATTRIBUTE_PRINTF(2,3);
1880+
1881+#ifdef XTTRACEMEMORY
1882+
1883+extern char *_XtMalloc( /* implementation-private */
1884+ Cardinal /* size */,
1885+ const char */* file */,
1886+ int /* line */
1887+);
1888+
1889+extern char *_XtRealloc( /* implementation-private */
1890+ char * /* ptr */,
1891+ Cardinal /* size */,
1892+ const char */* file */,
1893+ int /* line */
1894+);
1895+
1896+extern char *_XtReallocArray( /* implementation-private */
1897+ char * /* ptr */,
1898+ Cardinal /* num */,
1899+ Cardinal /* size */,
1900+ const char */* file */,
1901+ int /* line */
1902+);
1903+
1904+extern char *_XtCalloc( /* implementation-private */
1905+ Cardinal /* num */,
1906+ Cardinal /* size */,
1907+ const char */* file */,
1908+ int /* line */
1909+);
1910+
1911+extern void _XtFree( /* implementation-private */
1912+ char * /* ptr */
1913+);
1914+
1915+extern Boolean _XtIsValidPointer( /* implementation-private */
1916+ char * /* ptr */);
1917+
1918+extern void _XtPrintMemory( /* implementation-private */
1919+ const char */* filename */);
1920+
1921+#define XtMalloc(size) _XtMalloc(size, __FILE__, __LINE__)
1922+#define XtRealloc(ptr,size) _XtRealloc(ptr, size, __FILE__, __LINE__)
1923+#define XtMallocArray(num,size) _XtReallocArray(NULL, num, size, __FILE__, __LINE__)
1924+#define XtReallocArray(ptr,num,size) _XtReallocArray(ptr, num, size, __FILE__, __LINE__)
1925+#define XtCalloc(num,size) _XtCalloc(num, size, __FILE__, __LINE__)
1926+#define XtFree(ptr) _XtFree(ptr)
1927+
1928+#else
1929+
1930+#define XtMallocArray(num,size) XtReallocArray(NULL, num, size)
1931+
1932+#endif /* ifdef XTTRACEMEMORY */
1933+
1934+#define XtNew(type) ((type *) XtMalloc((unsigned) sizeof(type)))
1935+
1936+#undef XtNewString
1937+extern String XtNewString(String /* str */);
1938+#define XtNewString(str) \
1939+ ((str) != NULL ? (strcpy(XtMalloc((unsigned)strlen(str) + 1), str)) : NULL)
1940+
1941+/*************************************************************
1942+ *
1943+ * Work procs
1944+ *
1945+ **************************************************************/
1946+
1947+extern XtWorkProcId XtAddWorkProc( /* obsolete */
1948+ XtWorkProc /* proc */,
1949+ XtPointer /* closure */
1950+);
1951+
1952+extern XtWorkProcId XtAppAddWorkProc(
1953+ XtAppContext /* app_context */,
1954+ XtWorkProc /* proc */,
1955+ XtPointer /* closure */
1956+);
1957+
1958+extern void XtRemoveWorkProc(
1959+ XtWorkProcId /* id */
1960+);
1961+
1962+
1963+/****************************************************************
1964+ *
1965+ * Graphic Context Management
1966+ *****************************************************************/
1967+
1968+extern GC XtGetGC(
1969+ Widget /* widget */,
1970+ XtGCMask /* valueMask */,
1971+ XGCValues* /* values */
1972+);
1973+
1974+extern GC XtAllocateGC(
1975+ Widget /* widget */,
1976+ Cardinal /* depth */,
1977+ XtGCMask /* valueMask */,
1978+ XGCValues* /* values */,
1979+ XtGCMask /* dynamicMask */,
1980+ XtGCMask /* unusedMask */
1981+);
1982+
1983+/* This implementation of XtDestroyGC differs from the formal specification
1984+ * for historic backwards compatibility reasons. As other implementations
1985+ * may conform to the spec, use of XtReleaseGC is strongly encouraged.
1986+ */
1987+extern void XtDestroyGC( /* obsolete */
1988+ GC /* gc */
1989+);
1990+
1991+extern void XtReleaseGC(
1992+ Widget /* object */,
1993+ GC /* gc */
1994+);
1995+
1996+
1997+
1998+extern void XtAppReleaseCacheRefs(
1999+ XtAppContext /* app_context */,
2000+ XtCacheRef* /* cache_ref */
2001+);
2002+
2003+extern void XtCallbackReleaseCacheRef(
2004+ Widget /* widget */,
2005+ XtPointer /* closure */, /* XtCacheRef */
2006+ XtPointer /* call_data */
2007+);
2008+
2009+extern void XtCallbackReleaseCacheRefList(
2010+ Widget /* widget */,
2011+ XtPointer /* closure */, /* XtCacheRef* */
2012+ XtPointer /* call_data */
2013+);
2014+
2015+extern void XtSetWMColormapWindows(
2016+ Widget /* widget */,
2017+ Widget* /* list */,
2018+ Cardinal /* count */
2019+);
2020+
2021+extern _XtString XtFindFile(
2022+ _Xconst _XtString /* path */,
2023+ Substitution /* substitutions */,
2024+ Cardinal /* num_substitutions */,
2025+ XtFilePredicate /* predicate */
2026+);
2027+
2028+extern _XtString XtResolvePathname(
2029+ Display* /* dpy */,
2030+ _Xconst _XtString /* type */,
2031+ _Xconst _XtString /* filename */,
2032+ _Xconst _XtString /* suffix */,
2033+ _Xconst _XtString /* path */,
2034+ Substitution /* substitutions */,
2035+ Cardinal /* num_substitutions */,
2036+ XtFilePredicate /* predicate */
2037+);
2038+
2039+/****************************************************************
2040+ *
2041+ * Selections
2042+ *
2043+ *****************************************************************/
2044+
2045+#define XT_CONVERT_FAIL (Atom)0x80000001
2046+
2047+extern void XtDisownSelection(
2048+ Widget /* widget */,
2049+ Atom /* selection */,
2050+ Time /* time */
2051+);
2052+
2053+extern void XtGetSelectionValue(
2054+ Widget /* widget */,
2055+ Atom /* selection */,
2056+ Atom /* target */,
2057+ XtSelectionCallbackProc /* callback */,
2058+ XtPointer /* closure */,
2059+ Time /* time */
2060+);
2061+
2062+extern void XtGetSelectionValues(
2063+ Widget /* widget */,
2064+ Atom /* selection */,
2065+ Atom* /* targets */,
2066+ int /* count */,
2067+ XtSelectionCallbackProc /* callback */,
2068+ XtPointer* /* closures */,
2069+ Time /* time */
2070+);
2071+
2072+extern void XtAppSetSelectionTimeout(
2073+ XtAppContext /* app_context */,
2074+ unsigned long /* timeout */
2075+);
2076+
2077+extern void XtSetSelectionTimeout( /* obsolete */
2078+ unsigned long /* timeout */
2079+);
2080+
2081+extern unsigned long XtAppGetSelectionTimeout(
2082+ XtAppContext /* app_context */
2083+);
2084+
2085+extern unsigned long XtGetSelectionTimeout( /* obsolete */
2086+ void
2087+);
2088+
2089+extern XSelectionRequestEvent *XtGetSelectionRequest(
2090+ Widget /* widget */,
2091+ Atom /* selection */,
2092+ XtRequestId /* request_id */
2093+);
2094+
2095+extern void XtGetSelectionValueIncremental(
2096+ Widget /* widget */,
2097+ Atom /* selection */,
2098+ Atom /* target */,
2099+ XtSelectionCallbackProc /* selection_callback */,
2100+ XtPointer /* client_data */,
2101+ Time /* time */
2102+);
2103+
2104+extern void XtGetSelectionValuesIncremental(
2105+ Widget /* widget */,
2106+ Atom /* selection */,
2107+ Atom* /* targets */,
2108+ int /* count */,
2109+ XtSelectionCallbackProc /* callback */,
2110+ XtPointer* /* client_data */,
2111+ Time /* time */
2112+);
2113+
2114+extern void XtSetSelectionParameters(
2115+ Widget /* requestor */,
2116+ Atom /* selection */,
2117+ Atom /* type */,
2118+ XtPointer /* value */,
2119+ unsigned long /* length */,
2120+ int /* format */
2121+);
2122+
2123+extern void XtGetSelectionParameters(
2124+ Widget /* owner */,
2125+ Atom /* selection */,
2126+ XtRequestId /* request_id */,
2127+ Atom* /* type_return */,
2128+ XtPointer* /* value_return */,
2129+ unsigned long* /* length_return */,
2130+ int* /* format_return */
2131+);
2132+
2133+extern void XtCreateSelectionRequest(
2134+ Widget /* requestor */,
2135+ Atom /* selection */
2136+);
2137+
2138+extern void XtSendSelectionRequest(
2139+ Widget /* requestor */,
2140+ Atom /* selection */,
2141+ Time /* time */
2142+);
2143+
2144+extern void XtCancelSelectionRequest(
2145+ Widget /* requestor */,
2146+ Atom /* selection */
2147+);
2148+
2149+extern Atom XtReservePropertyAtom(
2150+ Widget /* widget */
2151+);
2152+
2153+extern void XtReleasePropertyAtom(
2154+ Widget /* widget */,
2155+ Atom /* selection */
2156+);
2157+
2158+extern void XtGrabKey(
2159+ Widget /* widget */,
2160+ _XtKeyCode /* keycode */,
2161+ Modifiers /* modifiers */,
2162+ _XtBoolean /* owner_events */,
2163+ int /* pointer_mode */,
2164+ int /* keyboard_mode */
2165+);
2166+
2167+extern void XtUngrabKey(
2168+ Widget /* widget */,
2169+ _XtKeyCode /* keycode */,
2170+ Modifiers /* modifiers */
2171+);
2172+
2173+extern int XtGrabKeyboard(
2174+ Widget /* widget */,
2175+ _XtBoolean /* owner_events */,
2176+ int /* pointer_mode */,
2177+ int /* keyboard_mode */,
2178+ Time /* time */
2179+);
2180+
2181+extern void XtUngrabKeyboard(
2182+ Widget /* widget */,
2183+ Time /* time */
2184+);
2185+
2186+extern void XtGrabButton(
2187+ Widget /* widget */,
2188+ int /* button */,
2189+ Modifiers /* modifiers */,
2190+ _XtBoolean /* owner_events */,
2191+ unsigned int /* event_mask */,
2192+ int /* pointer_mode */,
2193+ int /* keyboard_mode */,
2194+ Window /* confine_to */,
2195+ Cursor /* cursor */
2196+);
2197+
2198+extern void XtUngrabButton(
2199+ Widget /* widget */,
2200+ unsigned int /* button */,
2201+ Modifiers /* modifiers */
2202+);
2203+
2204+extern int XtGrabPointer(
2205+ Widget /* widget */,
2206+ _XtBoolean /* owner_events */,
2207+ unsigned int /* event_mask */,
2208+ int /* pointer_mode */,
2209+ int /* keyboard_mode */,
2210+ Window /* confine_to */,
2211+ Cursor /* cursor */,
2212+ Time /* time */
2213+);
2214+
2215+extern void XtUngrabPointer(
2216+ Widget /* widget */,
2217+ Time /* time */
2218+);
2219+
2220+extern void XtGetApplicationNameAndClass(
2221+ Display* /* dpy */,
2222+ String* /* name_return */,
2223+ String* /* class_return */
2224+);
2225+
2226+extern void XtRegisterDrawable(
2227+ Display* /* dpy */,
2228+ Drawable /* drawable */,
2229+ Widget /* widget */
2230+);
2231+
2232+extern void XtUnregisterDrawable(
2233+ Display* /* dpy */,
2234+ Drawable /* drawable */
2235+);
2236+
2237+extern Widget XtHooksOfDisplay(
2238+ Display* /* dpy */
2239+);
2240+
2241+typedef struct {
2242+ String type;
2243+ Widget widget;
2244+ ArgList args;
2245+ Cardinal num_args;
2246+} XtCreateHookDataRec, *XtCreateHookData;
2247+
2248+typedef struct {
2249+ String type;
2250+ Widget widget;
2251+ XtPointer event_data;
2252+ Cardinal num_event_data;
2253+} XtChangeHookDataRec, *XtChangeHookData;
2254+
2255+typedef struct {
2256+ Widget old, req;
2257+ ArgList args;
2258+ Cardinal num_args;
2259+} XtChangeHookSetValuesDataRec, *XtChangeHookSetValuesData;
2260+
2261+typedef struct {
2262+ String type;
2263+ Widget widget;
2264+ XtGeometryMask changeMask;
2265+ XWindowChanges changes;
2266+} XtConfigureHookDataRec, *XtConfigureHookData;
2267+
2268+typedef struct {
2269+ String type;
2270+ Widget widget;
2271+ XtWidgetGeometry* request;
2272+ XtWidgetGeometry* reply;
2273+ XtGeometryResult result;
2274+} XtGeometryHookDataRec, *XtGeometryHookData;
2275+
2276+typedef struct {
2277+ String type;
2278+ Widget widget;
2279+} XtDestroyHookDataRec, *XtDestroyHookData;
2280+
2281+extern void XtGetDisplays(
2282+ XtAppContext /* app_context */,
2283+ Display*** /* dpy_return */,
2284+ Cardinal* /* num_dpy_return */
2285+);
2286+
2287+extern Boolean XtToolkitThreadInitialize(
2288+ void
2289+);
2290+
2291+extern void XtAppSetExitFlag(
2292+ XtAppContext /* app_context */
2293+);
2294+
2295+extern Boolean XtAppGetExitFlag(
2296+ XtAppContext /* app_context */
2297+);
2298+
2299+extern void XtAppLock(
2300+ XtAppContext /* app_context */
2301+);
2302+
2303+extern void XtAppUnlock(
2304+ XtAppContext /* app_context */
2305+);
2306+
2307+/*
2308+ * Predefined Resource Converters
2309+ */
2310+
2311+
2312+/* String converters */
2313+
2314+extern Boolean XtCvtStringToAcceleratorTable(
2315+ Display* /* dpy */,
2316+ XrmValuePtr /* args */, /* none */
2317+ Cardinal* /* num_args */,
2318+ XrmValuePtr /* fromVal */,
2319+ XrmValuePtr /* toVal */,
2320+ XtPointer* /* closure_ret */
2321+);
2322+
2323+extern Boolean XtCvtStringToAtom(
2324+ Display* /* dpy */,
2325+ XrmValuePtr /* args */, /* Display */
2326+ Cardinal* /* num_args */,
2327+ XrmValuePtr /* fromVal */,
2328+ XrmValuePtr /* toVal */,
2329+ XtPointer* /* closure_ret */
2330+);
2331+
2332+extern Boolean XtCvtStringToBool(
2333+ Display* /* dpy */,
2334+ XrmValuePtr /* args */, /* none */
2335+ Cardinal* /* num_args */,
2336+ XrmValuePtr /* fromVal */,
2337+ XrmValuePtr /* toVal */,
2338+ XtPointer* /* closure_ret */
2339+);
2340+
2341+extern Boolean XtCvtStringToBoolean(
2342+ Display* /* dpy */,
2343+ XrmValuePtr /* args */, /* none */
2344+ Cardinal* /* num_args */,
2345+ XrmValuePtr /* fromVal */,
2346+ XrmValuePtr /* toVal */,
2347+ XtPointer* /* closure_ret */
2348+);
2349+
2350+extern Boolean XtCvtStringToCommandArgArray(
2351+ Display* /* dpy */,
2352+ XrmValuePtr /* args */, /* none */
2353+ Cardinal* /* num_args */,
2354+ XrmValuePtr /* fromVal */,
2355+ XrmValuePtr /* toVal */,
2356+ XtPointer* /* closure_ret */
2357+);
2358+
2359+extern Boolean XtCvtStringToCursor(
2360+ Display* /* dpy */,
2361+ XrmValuePtr /* args */, /* Display */
2362+ Cardinal* /* num_args */,
2363+ XrmValuePtr /* fromVal */,
2364+ XrmValuePtr /* toVal */,
2365+ XtPointer* /* closure_ret */
2366+);
2367+
2368+extern Boolean XtCvtStringToDimension(
2369+ Display* /* dpy */,
2370+ XrmValuePtr /* args */, /* none */
2371+ Cardinal* /* num_args */,
2372+ XrmValuePtr /* fromVal */,
2373+ XrmValuePtr /* toVal */,
2374+ XtPointer* /* closure_ret */
2375+);
2376+
2377+extern Boolean XtCvtStringToDirectoryString(
2378+ Display* /* dpy */,
2379+ XrmValuePtr /* args */, /* none */
2380+ Cardinal* /* num_args */,
2381+ XrmValuePtr /* fromVal */,
2382+ XrmValuePtr /* toVal */,
2383+ XtPointer* /* closure_ret */
2384+);
2385+
2386+extern Boolean XtCvtStringToDisplay(
2387+ Display* /* dpy */,
2388+ XrmValuePtr /* args */, /* none */
2389+ Cardinal* /* num_args */,
2390+ XrmValuePtr /* fromVal */,
2391+ XrmValuePtr /* toVal */,
2392+ XtPointer* /* closure_ret */
2393+);
2394+
2395+extern Boolean XtCvtStringToFile(
2396+ Display* /* dpy */,
2397+ XrmValuePtr /* args */, /* none */
2398+ Cardinal* /* num_args */,
2399+ XrmValuePtr /* fromVal */,
2400+ XrmValuePtr /* toVal */,
2401+ XtPointer* /* closure_ret */
2402+);
2403+
2404+extern Boolean XtCvtStringToFloat(
2405+ Display* /* dpy */,
2406+ XrmValuePtr /* args */, /* none */
2407+ Cardinal* /* num_args */,
2408+ XrmValuePtr /* fromVal */,
2409+ XrmValuePtr /* toVal */,
2410+ XtPointer* /* closure_ret */
2411+);
2412+
2413+extern Boolean XtCvtStringToFont(
2414+ Display* /* dpy */,
2415+ XrmValuePtr /* args */, /* Display */
2416+ Cardinal* /* num_args */,
2417+ XrmValuePtr /* fromVal */,
2418+ XrmValuePtr /* toVal */,
2419+ XtPointer* /* closure_ret */
2420+);
2421+
2422+extern Boolean XtCvtStringToFontSet(
2423+ Display* /* dpy */,
2424+ XrmValuePtr /* args */, /* Display, locale */
2425+ Cardinal* /* num_args */,
2426+ XrmValuePtr /* fromVal */,
2427+ XrmValuePtr /* toVal */,
2428+ XtPointer* /* closure_ret */
2429+);
2430+
2431+extern Boolean XtCvtStringToFontStruct(
2432+ Display* /* dpy */,
2433+ XrmValuePtr /* args */, /* Display */
2434+ Cardinal* /* num_args */,
2435+ XrmValuePtr /* fromVal */,
2436+ XrmValuePtr /* toVal */,
2437+ XtPointer* /* closure_ret */
2438+);
2439+
2440+extern Boolean XtCvtStringToGravity(
2441+ Display* /* dpy */,
2442+ XrmValuePtr /* args */,
2443+ Cardinal* /* num_args */,
2444+ XrmValuePtr /* fromVal */,
2445+ XrmValuePtr /* toVal */,
2446+ XtPointer* /* closure_ret */
2447+);
2448+
2449+extern Boolean XtCvtStringToInitialState(
2450+ Display* /* dpy */,
2451+ XrmValuePtr /* args */, /* none */
2452+ Cardinal* /* num_args */,
2453+ XrmValuePtr /* fromVal */,
2454+ XrmValuePtr /* toVal */,
2455+ XtPointer* /* closure_ret */
2456+);
2457+
2458+extern Boolean XtCvtStringToInt(
2459+ Display* /* dpy */,
2460+ XrmValuePtr /* args */, /* none */
2461+ Cardinal* /* num_args */,
2462+ XrmValuePtr /* fromVal */,
2463+ XrmValuePtr /* toVal */,
2464+ XtPointer* /* closure_ret */
2465+);
2466+
2467+extern Boolean XtCvtStringToPixel(
2468+ Display* /* dpy */,
2469+ XrmValuePtr /* args */, /* Screen, Colormap */
2470+ Cardinal* /* num_args */,
2471+ XrmValuePtr /* fromVal */,
2472+ XrmValuePtr /* toVal */,
2473+ XtPointer* /* closure_ret */
2474+);
2475+
2476+#define XtCvtStringToPosition XtCvtStringToShort
2477+
2478+extern Boolean XtCvtStringToRestartStyle(
2479+ Display* /* dpy */,
2480+ XrmValuePtr /* args */, /* none */
2481+ Cardinal* /* num_args */,
2482+ XrmValuePtr /* fromVal */,
2483+ XrmValuePtr /* toVal */,
2484+ XtPointer* /* closure_ret */
2485+);
2486+
2487+extern Boolean XtCvtStringToShort(
2488+ Display* /* dpy */,
2489+ XrmValuePtr /* args */, /* none */
2490+ Cardinal* /* num_args */,
2491+ XrmValuePtr /* fromVal */,
2492+ XrmValuePtr /* toVal */,
2493+ XtPointer* /* closure_ret */
2494+);
2495+
2496+extern Boolean XtCvtStringToTranslationTable(
2497+ Display* /* dpy */,
2498+ XrmValuePtr /* args */, /* none */
2499+ Cardinal* /* num_args */,
2500+ XrmValuePtr /* fromVal */,
2501+ XrmValuePtr /* toVal */,
2502+ XtPointer* /* closure_ret */
2503+);
2504+
2505+extern Boolean XtCvtStringToUnsignedChar(
2506+ Display* /* dpy */,
2507+ XrmValuePtr /* args */, /* none */
2508+ Cardinal* /* num_args */,
2509+ XrmValuePtr /* fromVal */,
2510+ XrmValuePtr /* toVal */,
2511+ XtPointer* /* closure_ret */
2512+);
2513+
2514+extern Boolean XtCvtStringToVisual(
2515+ Display* /* dpy */,
2516+ XrmValuePtr /* args */, /* Screen, depth */
2517+ Cardinal* /* num_args */,
2518+ XrmValuePtr /* fromVal */,
2519+ XrmValuePtr /* toVal */,
2520+ XtPointer* /* closure_ret */
2521+);
2522+
2523+/* int converters */
2524+
2525+extern Boolean XtCvtIntToBool(
2526+ Display* /* dpy */,
2527+ XrmValuePtr /* args */, /* none */
2528+ Cardinal* /* num_args */,
2529+ XrmValuePtr /* fromVal */,
2530+ XrmValuePtr /* toVal */,
2531+ XtPointer* /* closure_ret */
2532+);
2533+
2534+extern Boolean XtCvtIntToBoolean(
2535+ Display* /* dpy */,
2536+ XrmValuePtr /* args */, /* none */
2537+ Cardinal* /* num_args */,
2538+ XrmValuePtr /* fromVal */,
2539+ XrmValuePtr /* toVal */,
2540+ XtPointer* /* closure_ret */
2541+);
2542+
2543+extern Boolean XtCvtIntToColor(
2544+ Display* /* dpy */,
2545+ XrmValuePtr /* args */, /* Screen, Colormap */
2546+ Cardinal* /* num_args */,
2547+ XrmValuePtr /* fromVal */,
2548+ XrmValuePtr /* toVal */,
2549+ XtPointer* /* closure_ret */
2550+);
2551+
2552+#define XtCvtIntToDimension XtCvtIntToShort
2553+
2554+extern Boolean XtCvtIntToFloat(
2555+ Display* /* dpy */,
2556+ XrmValuePtr /* args */, /* none */
2557+ Cardinal* /* num_args */,
2558+ XrmValuePtr /* fromVal */,
2559+ XrmValuePtr /* toVal */,
2560+ XtPointer* /* closure_ret */
2561+);
2562+
2563+extern Boolean XtCvtIntToFont(
2564+ Display* /* dpy */,
2565+ XrmValuePtr /* args */, /* none */
2566+ Cardinal* /* num_args */,
2567+ XrmValuePtr /* fromVal */,
2568+ XrmValuePtr /* toVal */,
2569+ XtPointer* /* closure_ret */
2570+);
2571+
2572+extern Boolean XtCvtIntToPixel(
2573+ Display* /* dpy */,
2574+ XrmValuePtr /* args */, /* none */
2575+ Cardinal* /* num_args */,
2576+ XrmValuePtr /* fromVal */,
2577+ XrmValuePtr /* toVal */,
2578+ XtPointer* /* closure_ret */
2579+);
2580+
2581+extern Boolean XtCvtIntToPixmap(
2582+ Display* /* dpy */,
2583+ XrmValuePtr /* args */, /* none */
2584+ Cardinal* /* num_args */,
2585+ XrmValuePtr /* fromVal */,
2586+ XrmValuePtr /* toVal */,
2587+ XtPointer* /* closure_ret */
2588+);
2589+
2590+#define XtCvtIntToPosition XtCvtIntToShort
2591+
2592+extern Boolean XtCvtIntToShort(
2593+ Display* /* dpy */,
2594+ XrmValuePtr /* args */, /* none */
2595+ Cardinal* /* num_args */,
2596+ XrmValuePtr /* fromVal */,
2597+ XrmValuePtr /* toVal */,
2598+ XtPointer* /* closure_ret */
2599+);
2600+
2601+extern Boolean XtCvtIntToUnsignedChar(
2602+ Display* /* dpy */,
2603+ XrmValuePtr /* args */, /* none */
2604+ Cardinal* /* num_args */,
2605+ XrmValuePtr /* fromVal */,
2606+ XrmValuePtr /* toVal */,
2607+ XtPointer* /* closure_ret */
2608+);
2609+
2610+/* Color converter */
2611+
2612+extern Boolean XtCvtColorToPixel(
2613+ Display* /* dpy */,
2614+ XrmValuePtr /* args */, /* none */
2615+ Cardinal* /* num_args */,
2616+ XrmValuePtr /* fromVal */,
2617+ XrmValuePtr /* toVal */,
2618+ XtPointer* /* closure_ret */
2619+);
2620+
2621+/* Pixel converter */
2622+
2623+#define XtCvtPixelToColor XtCvtIntToColor
2624+
2625+
2626+_XFUNCPROTOEND
2627+
2628+#endif /*_XtIntrinsic_h*/
2629+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,238 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtintrinsicI_h
49+#define _XtintrinsicI_h
50+
51+#include "Xtos.h"
52+#include "IntrinsicP.h"
53+#ifdef WIN32
54+#define _WILLWINSOCK_
55+#endif
56+#include <X11/Xos.h>
57+
58+#include "Object.h"
59+#include "RectObj.h"
60+#include "ObjectP.h"
61+#include "RectObjP.h"
62+
63+#include "ConvertI.h"
64+#include "TranslateI.h"
65+
66+#define RectObjClassFlag 0x02
67+#define WidgetClassFlag 0x04
68+#define CompositeClassFlag 0x08
69+#define ConstraintClassFlag 0x10
70+#define ShellClassFlag 0x20
71+#define WMShellClassFlag 0x40
72+#define TopLevelClassFlag 0x80
73+
74+/*
75+ * The following macros, though very handy, are not suitable for
76+ * IntrinsicP.h as they violate the rule that arguments are to
77+ * be evaluated exactly once.
78+ */
79+
80+#define XtDisplayOfObject(object) \
81+ (XtIsWidget(object) ? (object)->core.screen->display : \
82+ _XtIsHookObject(object) ? ((HookObject)(object))->hooks.screen->display : \
83+ _XtWindowedAncestor(object)->core.screen->display)
84+
85+#define XtScreenOfObject(object) \
86+ (XtIsWidget(object) ? (object)->core.screen : \
87+ _XtIsHookObject(object) ? ((HookObject)(object))->hooks.screen : \
88+ _XtWindowedAncestor(object)->core.screen)
89+
90+#define XtWindowOfObject(object) \
91+ ((XtIsWidget(object) ? (object) : _XtWindowedAncestor(object)) \
92+ ->core.window)
93+
94+#define XtIsManaged(object) \
95+ (XtIsRectObj(object) ? (object)->core.managed : False)
96+
97+#define XtIsSensitive(object) \
98+ (XtIsRectObj(object) ? ((object)->core.sensitive && \
99+ (object)->core.ancestor_sensitive) : False)
100+
101+
102+/****************************************************************
103+ *
104+ * Bit utilities
105+ *
106+ ****************************************************************/
107+#define XtSetBits(dst,src,len) dst = (((1U << (len)) - 1) & (unsigned)(src))
108+#define XtSetBit(dst,src) XtSetBits(dst,src,1)
109+
110+/****************************************************************
111+ *
112+ * Byte utilities
113+ *
114+ ****************************************************************/
115+
116+#define _XBCOPYFUNC _XtBcopy
117+#include <X11/Xfuncs.h>
118+
119+#define XtMemmove(dst, src, size) \
120+ if ((const void *)(dst) != (const void *)(src)) { \
121+ (void) memcpy((void *) (dst), (const void *) (src), (size_t) (size)); \
122+ }
123+
124+#define XtBZero(dst, size) \
125+ memset((void *) (dst), 0, (size_t) (size))
126+
127+#define XtMemcmp(b1, b2, size) \
128+ memcmp((const void *) (b1), (const void *) (b2), (size_t) (size))
129+
130+
131+/****************************************************************
132+ *
133+ * Stack cache allocation/free
134+ *
135+ ****************************************************************/
136+
137+#define XtStackAlloc(size, stack_cache_array) \
138+ ((size) <= sizeof(stack_cache_array) \
139+ ? (XtPointer)(stack_cache_array) \
140+ : XtMalloc((Cardinal)(size)))
141+
142+#define XtStackFree(pointer, stack_cache_array) \
143+ { if ((pointer) != ((XtPointer)(stack_cache_array))) XtFree(pointer); }
144+
145+/***************************************************************
146+ *
147+ * Filename defines
148+ *
149+ **************************************************************/
150+
151+/* used by XtResolvePathname */
152+#ifndef XFILESEARCHPATHDEFAULT
153+#define XFILESEARCHPATHDEFAULT "/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S"
154+#endif
155+
156+/* the following two were both "X Toolkit " prior to R4 */
157+#ifndef XTERROR_PREFIX
158+#define XTERROR_PREFIX ""
159+#endif
160+
161+#ifndef XTWARNING_PREFIX
162+#define XTWARNING_PREFIX ""
163+#endif
164+
165+#ifndef ERRORDB
166+#define ERRORDB "/usr/lib/X11/XtErrorDB"
167+#endif
168+
169+_XFUNCPROTOBEGIN
170+
171+extern String XtCXtToolkitError;
172+
173+extern void _XtAllocError(
174+ String /* alloc_type */
175+) _X_NORETURN;
176+
177+extern void _XtCompileResourceList(
178+ XtResourceList /* resources */,
179+ Cardinal /* num_resources */
180+);
181+
182+extern XtGeometryResult _XtMakeGeometryRequest(
183+ Widget /* widget */,
184+ XtWidgetGeometry* /* request */,
185+ XtWidgetGeometry* /* reply_return */,
186+ Boolean* /* clear_rect_obj */
187+);
188+
189+extern Boolean _XtIsHookObject(
190+ Widget /* widget */
191+);
192+
193+extern void _XtAddShellToHookObj(
194+ Widget /* widget */
195+);
196+
197+/* GCManager.c */
198+extern void _XtGClistFree(Display *dpy, XtPerDisplay pd);
199+
200+/** GeoTattler stuff */
201+
202+#ifdef XT_GEO_TATTLER
203+
204+extern void _XtGeoTab (int);
205+extern void _XtGeoTrace (
206+ Widget widget,
207+ const char *,
208+ ...
209+) _X_ATTRIBUTE_PRINTF(2,3);
210+
211+#define CALLGEOTAT(f) f
212+
213+#else /* XT_GEO_TATTLER */
214+
215+#define CALLGEOTAT(f)
216+
217+#endif /* XT_GEO_TATTLER */
218+
219+#ifndef XTTRACEMEMORY
220+
221+extern char* __XtMalloc (
222+ unsigned /* size */
223+);
224+extern char* __XtCalloc (
225+ unsigned /* num */,
226+ unsigned /* size */
227+);
228+
229+#else
230+
231+#define __XtMalloc XtMalloc
232+#define __XtCalloc XtCalloc
233+#endif
234+
235+_XFUNCPROTOEND
236+
237+#endif /* _XtintrinsicI_h */
238+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,334 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtintrinsicP_h
49+#define _XtintrinsicP_h
50+
51+#include <X11/Intrinsic.h>
52+
53+/*
54+ * Field sizes and offsets of XrmResource must match those of XtResource.
55+ * Type long is used instead of XrmQuark here because XrmQuark and String
56+ * are not the same size on all systems.
57+ */
58+typedef struct {
59+ XtIntPtr xrm_name; /* Resource name quark */
60+ XtIntPtr xrm_class; /* Resource class quark */
61+ XtIntPtr xrm_type; /* Resource representation type quark */
62+ Cardinal xrm_size; /* Size in bytes of representation */
63+ int xrm_offset; /* -offset-1 */
64+ XtIntPtr xrm_default_type; /* Default representation type quark */
65+ XtPointer xrm_default_addr; /* Default resource address */
66+} XrmResource, *XrmResourceList;
67+#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
68+_Static_assert(XtOffsetOf(XrmResource, xrm_default_addr) ==
69+ XtOffsetOf(XtResource, default_addr),
70+ "Field offset mismatch");
71+#endif
72+
73+typedef unsigned long XtVersionType;
74+
75+#define XT_VERSION 11
76+#ifndef XT_REVISION
77+#define XT_REVISION 6
78+#endif
79+#define XtVersion (XT_VERSION * 1000 + XT_REVISION)
80+#define XtVersionDontCheck 0
81+
82+typedef void (*XtProc)(
83+ void
84+);
85+
86+typedef void (*XtWidgetClassProc)(
87+ WidgetClass /* class */
88+);
89+
90+typedef void (*XtWidgetProc)(
91+ Widget /* widget */
92+);
93+
94+typedef Boolean (*XtAcceptFocusProc)(
95+ Widget /* widget */,
96+ Time* /* time */
97+);
98+
99+typedef void (*XtArgsProc)(
100+ Widget /* widget */,
101+ ArgList /* args */,
102+ Cardinal* /* num_args */
103+);
104+
105+typedef void (*XtInitProc)(
106+ Widget /* request */,
107+ Widget /* new */,
108+ ArgList /* args */,
109+ Cardinal* /* num_args */
110+);
111+
112+typedef Boolean (*XtSetValuesFunc)(
113+ Widget /* old */,
114+ Widget /* request */,
115+ Widget /* new */,
116+ ArgList /* args */,
117+ Cardinal* /* num_args */
118+);
119+
120+typedef Boolean (*XtArgsFunc)(
121+ Widget /* widget */,
122+ ArgList /* args */,
123+ Cardinal* /* num_args */
124+);
125+
126+typedef void (*XtAlmostProc)(
127+ Widget /* old */,
128+ Widget /* new */,
129+ XtWidgetGeometry* /* request */,
130+ XtWidgetGeometry* /* reply */
131+);
132+
133+typedef void (*XtExposeProc)(
134+ Widget /* widget */,
135+ XEvent* /* event */,
136+ Region /* region */
137+);
138+
139+/* compress_exposure options*/
140+#define XtExposeNoCompress ((XtEnum)False)
141+#define XtExposeCompressSeries ((XtEnum)True)
142+#define XtExposeCompressMultiple 2
143+#define XtExposeCompressMaximal 3
144+
145+/* modifiers */
146+#define XtExposeGraphicsExpose 0x10
147+#define XtExposeGraphicsExposeMerged 0x20
148+#define XtExposeNoExpose 0x40
149+#define XtExposeNoRegion 0x80
150+
151+typedef void (*XtRealizeProc)(
152+ Widget /* widget */,
153+ XtValueMask* /* mask */,
154+ XSetWindowAttributes* /* attributes */
155+);
156+
157+typedef XtGeometryResult (*XtGeometryHandler)(
158+ Widget /* widget */,
159+ XtWidgetGeometry* /* request */,
160+ XtWidgetGeometry* /* reply */
161+);
162+
163+typedef void (*XtStringProc)(
164+ Widget /* widget */,
165+ String /* str */
166+);
167+
168+typedef struct {
169+ String name; /* resource name */
170+ String type; /* representation type name */
171+ XtArgVal value; /* representation */
172+ int size; /* size of representation */
173+} XtTypedArg, *XtTypedArgList;
174+
175+typedef void (*XtAllocateProc)(
176+ WidgetClass /* widget_class */,
177+ Cardinal * /* constraint_size */,
178+ Cardinal * /* more_bytes */,
179+ ArgList /* args */,
180+ Cardinal * /* num_args */,
181+ XtTypedArgList /* typed_args */,
182+ Cardinal * /* num_typed_args */,
183+ Widget * /* widget_return */,
184+ XtPointer * /* more_bytes_return */
185+);
186+
187+typedef void (*XtDeallocateProc)(
188+ Widget /* widget */,
189+ XtPointer /* more_bytes */
190+);
191+
192+struct _XtStateRec; /* Forward declare before use for C++ */
193+
194+typedef struct _XtTMRec {
195+ XtTranslations translations; /* private to Translation Manager */
196+ XtBoundActions proc_table; /* procedure bindings for actions */
197+ struct _XtStateRec *current_state; /* Translation Manager state ptr */
198+ unsigned long lastEventTime;
199+} XtTMRec, *XtTM;
200+
201+#include <X11/CoreP.h>
202+#include <X11/CompositeP.h>
203+#include <X11/ConstrainP.h>
204+#include <X11/ObjectP.h>
205+#include <X11/RectObjP.h>
206+
207+#define XtDisplay(widget) DisplayOfScreen((widget)->core.screen)
208+#define XtScreen(widget) ((widget)->core.screen)
209+#define XtWindow(widget) ((widget)->core.window)
210+
211+#define XtClass(widget) ((widget)->core.widget_class)
212+#define XtSuperclass(widget) (XtClass(widget)->core_class.superclass)
213+#define XtIsRealized(object) (XtWindowOfObject(object) != None)
214+#define XtParent(widget) ((widget)->core.parent)
215+
216+#undef XtIsRectObj
217+extern Boolean XtIsRectObj(Widget);
218+#define XtIsRectObj(obj) \
219+ (((Object)(obj))->object.widget_class->core_class.class_inited & 0x02)
220+
221+#undef XtIsWidget
222+extern Boolean XtIsWidget(Widget);
223+#define XtIsWidget(obj) \
224+ (((Object)(obj))->object.widget_class->core_class.class_inited & 0x04)
225+
226+#undef XtIsComposite
227+extern Boolean XtIsComposite(Widget);
228+#define XtIsComposite(obj) \
229+ (((Object)(obj))->object.widget_class->core_class.class_inited & 0x08)
230+
231+#undef XtIsConstraint
232+extern Boolean XtIsConstraint(Widget);
233+#define XtIsConstraint(obj) \
234+ (((Object)(obj))->object.widget_class->core_class.class_inited & 0x10)
235+
236+#undef XtIsShell
237+extern Boolean XtIsShell(Widget);
238+#define XtIsShell(obj) \
239+ (((Object)(obj))->object.widget_class->core_class.class_inited & 0x20)
240+
241+#undef XtIsWMShell
242+extern Boolean XtIsWMShell(Widget);
243+#define XtIsWMShell(obj) \
244+ (((Object)(obj))->object.widget_class->core_class.class_inited & 0x40)
245+
246+#undef XtIsTopLevelShell
247+extern Boolean XtIsTopLevelShell(Widget);
248+#define XtIsTopLevelShell(obj) \
249+ (((Object)(obj))->object.widget_class->core_class.class_inited & 0x80)
250+
251+#ifdef DEBUG
252+#define XtCheckSubclass(w, widget_class_ptr, message) \
253+ if (!XtIsSubclass(((Widget)(w)), (widget_class_ptr))) { \
254+ String dbgArgV[3]; \
255+ Cardinal dbgArgC = 3; \
256+ dbgArgV[0] = ((Widget)(w))->core.widget_class->core_class.class_name;\
257+ dbgArgV[1] = (widget_class_ptr)->core_class.class_name; \
258+ dbgArgV[2] = (message); \
259+ XtAppErrorMsg(XtWidgetToApplicationContext((Widget)(w)), \
260+ "subclassMismatch", "xtCheckSubclass", "XtToolkitError", \
261+ "Widget class %s found when subclass of %s expected: %s",\
262+ dbgArgV, &dbgArgC); \
263+ }
264+#else
265+#define XtCheckSubclass(w, widget_class, message) /* nothing */
266+#endif
267+
268+_XFUNCPROTOBEGIN
269+
270+extern Widget _XtWindowedAncestor( /* internal; implementation-dependent */
271+ Widget /* object */
272+);
273+
274+#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(LIBXT_COMPILATION)
275+__declspec(dllimport)
276+#else
277+extern
278+#endif
279+void _XtInherit(
280+ void
281+);
282+
283+extern void _XtHandleFocus(
284+ Widget /* widget */,
285+ XtPointer /* client_data */,
286+ XEvent * /* event */,
287+ Boolean * /* cont */);
288+
289+extern void XtCreateWindow(
290+ Widget /* widget */,
291+ unsigned int /* window_class */,
292+ Visual* /* visual */,
293+ XtValueMask /* value_mask */,
294+ XSetWindowAttributes* /* attributes */
295+);
296+
297+extern void XtResizeWidget(
298+ Widget /* widget */,
299+ _XtDimension /* width */,
300+ _XtDimension /* height */,
301+ _XtDimension /* border_width */
302+);
303+
304+extern void XtMoveWidget(
305+ Widget /* widget */,
306+ _XtPosition /* x */,
307+ _XtPosition /* y */
308+);
309+
310+extern void XtConfigureWidget(
311+ Widget /* widget */,
312+ _XtPosition /* x */,
313+ _XtPosition /* y */,
314+ _XtDimension /* width */,
315+ _XtDimension /* height */,
316+ _XtDimension /* border_width */
317+);
318+
319+extern void XtResizeWindow(
320+ Widget /* widget */
321+);
322+
323+extern void XtProcessLock(
324+ void
325+);
326+
327+extern void XtProcessUnlock(
328+ void
329+);
330+
331+_XFUNCPROTOEND
332+
333+#endif /* _XtIntrinsicP_h */
334+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,61 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtObject_h
49+#define _XtObject_h
50+
51+_XFUNCPROTOBEGIN
52+
53+typedef struct _ObjectRec *Object;
54+typedef struct _ObjectClassRec *ObjectClass;
55+
56+externalref WidgetClass objectClass;
57+
58+_XFUNCPROTOEND
59+
60+#endif /* _XtObject_h */
61+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,141 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _Xt_ObjectP_h_
49+#define _Xt_ObjectP_h_
50+
51+#include <X11/Object.h>
52+
53+_XFUNCPROTOBEGIN
54+
55+/**********************************************************
56+ * Object Instance Data Structures
57+ *
58+ **********************************************************/
59+/* these fields match CorePart and can not be changed */
60+
61+typedef struct _ObjectPart {
62+ Widget self; /* pointer to widget itself */
63+ WidgetClass widget_class; /* pointer to Widget's ClassRec */
64+ Widget parent; /* parent widget */
65+ XrmName xrm_name; /* widget resource name quarkified */
66+ Boolean being_destroyed; /* marked for destroy */
67+ XtCallbackList destroy_callbacks; /* who to call when widget destroyed */
68+ XtPointer constraints; /* constraint record */
69+} ObjectPart;
70+
71+typedef struct _ObjectRec {
72+ ObjectPart object;
73+} ObjectRec;
74+
75+/********************************************************
76+ * Object Class Data Structures
77+ *
78+ ********************************************************/
79+/* these fields match CoreClassPart and can not be changed */
80+/* ideally these structures would only contain the fields required;
81+ but because the CoreClassPart cannot be changed at this late date
82+ extraneous fields are necessary to make the field offsets match */
83+
84+typedef struct _ObjectClassPart {
85+
86+ WidgetClass superclass; /* pointer to superclass ClassRec */
87+ String class_name; /* widget resource class name */
88+ Cardinal widget_size; /* size in bytes of widget record */
89+ XtProc class_initialize; /* class initialization proc */
90+ XtWidgetClassProc class_part_initialize; /* dynamic initialization */
91+ XtEnum class_inited; /* has class been initialized? */
92+ XtInitProc initialize; /* initialize subclass fields */
93+ XtArgsProc initialize_hook; /* notify that initialize called */
94+ XtProc obj1; /* NULL */
95+ XtPointer obj2; /* NULL */
96+ Cardinal obj3; /* NULL */
97+ XtResourceList resources; /* resources for subclass fields */
98+ Cardinal num_resources; /* number of entries in resources */
99+ XrmClass xrm_class; /* resource class quarkified */
100+ Boolean obj4; /* NULL */
101+ XtEnum obj5; /* NULL */
102+ Boolean obj6; /* NULL */
103+ Boolean obj7; /* NULL */
104+ XtWidgetProc destroy; /* free data for subclass pointers */
105+ XtProc obj8; /* NULL */
106+ XtProc obj9; /* NULL */
107+ XtSetValuesFunc set_values; /* set subclass resource values */
108+ XtArgsFunc set_values_hook; /* notify that set_values called */
109+ XtProc obj10; /* NULL */
110+ XtArgsProc get_values_hook; /* notify that get_values called */
111+ XtProc obj11; /* NULL */
112+ XtVersionType version; /* version of intrinsics used */
113+ XtPointer callback_private; /* list of callback offsets */
114+ String obj12; /* NULL */
115+ XtProc obj13; /* NULL */
116+ XtProc obj14; /* NULL */
117+ XtPointer extension; /* pointer to extension record */
118+}ObjectClassPart;
119+
120+typedef struct {
121+ XtPointer next_extension; /* 1st 4 required for all extension records */
122+ XrmQuark record_type; /* NULLQUARK; when on ObjectClassPart */
123+ long version; /* must be XtObjectExtensionVersion */
124+ Cardinal record_size; /* sizeof(ObjectClassExtensionRec) */
125+ XtAllocateProc allocate;
126+ XtDeallocateProc deallocate;
127+} ObjectClassExtensionRec, *ObjectClassExtension;
128+
129+typedef struct _ObjectClassRec {
130+ ObjectClassPart object_class;
131+} ObjectClassRec;
132+
133+externalref ObjectClassRec objectClassRec;
134+
135+_XFUNCPROTOEND
136+
137+#define XtObjectExtensionVersion 1L
138+#define XtInheritAllocate ((XtAllocateProc) _XtInherit)
139+#define XtInheritDeallocate ((XtDeallocateProc) _XtInherit)
140+
141+#endif /*_Xt_ObjectP_h_*/
@@ -0,0 +1,185 @@
1+/********************************************************
2+
3+Copyright 1988 by Hewlett-Packard Company
4+Copyright 1987, 1988, 1989 by Digital Equipment Corporation, Maynard
5+
6+Permission to use, copy, modify, and distribute this software
7+and its documentation for any purpose and without fee is hereby
8+granted, provided that the above copyright notice appear in all
9+copies and that both that copyright notice and this permission
10+notice appear in supporting documentation, and that the names of
11+Hewlett-Packard or Digital not be used in advertising or
12+publicity pertaining to distribution of the software without specific,
13+written prior permission.
14+
15+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
16+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
17+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
18+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
19+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
20+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
21+SOFTWARE.
22+
23+********************************************************/
24+
25+/*
26+
27+Copyright 1987, 1988, 1989, 1998 The Open Group
28+
29+Permission to use, copy, modify, distribute, and sell this software and its
30+documentation for any purpose is hereby granted without fee, provided that
31+the above copyright notice appear in all copies and that both that
32+copyright notice and this permission notice appear in supporting
33+documentation.
34+
35+The above copyright notice and this permission notice shall be included in
36+all copies or substantial portions of the Software.
37+
38+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
42+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
43+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44+
45+Except as contained in this notice, the name of The Open Group shall not be
46+used in advertising or otherwise to promote the sale, use or other dealings
47+in this Software without prior written authorization from The Open Group.
48+
49+*/
50+
51+#ifndef _PDI_h_
52+#define _PDI_h_
53+
54+
55+#define KEYBOARD TRUE
56+#define POINTER FALSE
57+
58+_XFUNCPROTOBEGIN
59+
60+typedef enum {
61+ XtNoServerGrab,
62+ XtPassiveServerGrab,
63+ XtActiveServerGrab,
64+ XtPseudoPassiveServerGrab,
65+ XtPseudoActiveServerGrab
66+}XtServerGrabType;
67+
68+typedef struct _XtServerGrabRec {
69+ struct _XtServerGrabRec *next;
70+ Widget widget;
71+ unsigned int ownerEvents:1;
72+ unsigned int pointerMode:1;
73+ unsigned int keyboardMode:1;
74+ unsigned int hasExt:1;
75+ unsigned int confineToIsWidgetWin:1;
76+ KeyCode keybut;
77+ unsigned short modifiers;
78+ unsigned short eventMask;
79+} XtServerGrabRec, *XtServerGrabPtr;
80+
81+typedef struct _XtGrabExtRec {
82+ Mask *pKeyButMask;
83+ Mask *pModifiersMask;
84+ Window confineTo;
85+ Cursor cursor;
86+} XtServerGrabExtRec, *XtServerGrabExtPtr;
87+
88+#define GRABEXT(p) ((XtServerGrabExtPtr)((p)+1))
89+
90+typedef struct _XtDeviceRec{
91+ XtServerGrabRec grab; /* need copy in order to protect
92+ during grab */
93+ XtServerGrabType grabType;
94+}XtDeviceRec, *XtDevice;
95+
96+#define XtMyAncestor 0
97+#define XtMyDescendant 1
98+#define XtMyCousin 2
99+#define XtMySelf 3
100+#define XtUnrelated 4
101+typedef char XtGeneology; /* do not use an enum makes PerWidgetInput larger */
102+
103+typedef struct {
104+ Widget focusKid;
105+ XtServerGrabPtr keyList, ptrList;
106+ Widget queryEventDescendant;
107+ unsigned int map_handler_added:1;
108+ unsigned int realize_handler_added:1;
109+ unsigned int active_handler_added:1;
110+ unsigned int haveFocus:1;
111+ XtGeneology focalPoint;
112+}XtPerWidgetInputRec, *XtPerWidgetInput;
113+
114+typedef struct XtPerDisplayInputRec{
115+ XtGrabList grabList;
116+ XtDeviceRec keyboard, pointer;
117+ KeyCode activatingKey;
118+ Widget *trace;
119+ int traceDepth, traceMax;
120+ Widget focusWidget;
121+}XtPerDisplayInputRec, *XtPerDisplayInput;
122+
123+#define IsServerGrab(g) ((g == XtPassiveServerGrab) ||\
124+ (g == XtActiveServerGrab))
125+
126+#define IsAnyGrab(g) ((g == XtPassiveServerGrab) ||\
127+ (g == XtActiveServerGrab) ||\
128+ (g == XtPseudoPassiveServerGrab))
129+
130+#define IsEitherPassiveGrab(g) ((g == XtPassiveServerGrab) ||\
131+ (g == XtPseudoPassiveServerGrab))
132+
133+#define IsPseudoGrab(g) ((g == XtPseudoPassiveServerGrab))
134+
135+extern void _XtDestroyServerGrabs(
136+ Widget /* w */,
137+ XtPointer /* pwi */, /*XtPerWidgetInput*/
138+ XtPointer /* call_data */
139+);
140+
141+extern XtPerWidgetInput _XtGetPerWidgetInput(
142+ Widget /* widget */,
143+ _XtBoolean /* create */
144+);
145+
146+extern XtServerGrabPtr _XtCheckServerGrabsOnWidget(
147+ XEvent* /* event */,
148+ Widget /* widget */,
149+ _XtBoolean /* isKeyboard */
150+);
151+
152+/*
153+extern XtGrabList* _XtGetGrabList( XtPerDisplayInput );
154+*/
155+
156+#define _XtGetGrabList(pdi) (&(pdi)->grabList)
157+
158+extern void _XtFreePerWidgetInput(
159+ Widget /* w */,
160+ XtPerWidgetInput /* pwi */
161+);
162+
163+extern Widget _XtProcessKeyboardEvent(
164+ XKeyEvent* /* event */,
165+ Widget /* widget */,
166+ XtPerDisplayInput /* pdi */
167+);
168+
169+extern Widget _XtProcessPointerEvent(
170+ XButtonEvent* /* event */,
171+ Widget /* widget */,
172+ XtPerDisplayInput /* pdi */
173+);
174+
175+extern void _XtRegisterPassiveGrabs(
176+ Widget /* widget */
177+);
178+
179+extern void _XtClearAncestorCache(
180+ Widget /* widget */
181+);
182+
183+_XFUNCPROTOEND
184+
185+#endif /* _PDI_h_ */
@@ -0,0 +1,61 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtRect_h
49+#define _XtRect_h
50+
51+_XFUNCPROTOBEGIN
52+
53+typedef struct _RectObjRec *RectObj;
54+typedef struct _RectObjClassRec *RectObjClass;
55+
56+externalref WidgetClass rectObjClass;
57+
58+_XFUNCPROTOEND
59+
60+#endif /* _XtRect_h */
61+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,131 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _Xt_RectObjP_h_
49+#define _Xt_RectObjP_h_
50+
51+#include <X11/RectObj.h>
52+#include <X11/ObjectP.h>
53+
54+_XFUNCPROTOBEGIN
55+
56+/**********************************************************
57+ * Rectangle Object Instance Data Structures
58+ *
59+ **********************************************************/
60+/* these fields match CorePart and can not be changed */
61+
62+typedef struct _RectObjPart {
63+ Position x, y; /* rectangle position */
64+ Dimension width, height; /* rectangle dimensions */
65+ Dimension border_width; /* rectangle border width */
66+ Boolean managed; /* is widget geometry managed? */
67+ Boolean sensitive; /* is widget sensitive to user events*/
68+ Boolean ancestor_sensitive; /* are all ancestors sensitive? */
69+}RectObjPart;
70+
71+typedef struct _RectObjRec {
72+ ObjectPart object;
73+ RectObjPart rectangle;
74+} RectObjRec;
75+
76+
77+
78+/********************************************************
79+ * Rectangle Object Class Data Structures
80+ *
81+ ********************************************************/
82+/* these fields match CoreClassPart and can not be changed */
83+/* ideally these structures would only contain the fields required;
84+ but because the CoreClassPart cannot be changed at this late date
85+ extraneous fields are necessary to make the field offsets match */
86+
87+typedef struct _RectObjClassPart {
88+
89+ WidgetClass superclass; /* pointer to superclass ClassRec */
90+ String class_name; /* widget resource class name */
91+ Cardinal widget_size; /* size in bytes of widget record */
92+ XtProc class_initialize; /* class initialization proc */
93+ XtWidgetClassProc class_part_initialize; /* dynamic initialization */
94+ XtEnum class_inited; /* has class been initialized? */
95+ XtInitProc initialize; /* initialize subclass fields */
96+ XtArgsProc initialize_hook; /* notify that initialize called */
97+ XtProc rect1; /* NULL */
98+ XtPointer rect2; /* NULL */
99+ Cardinal rect3; /* NULL */
100+ XtResourceList resources; /* resources for subclass fields */
101+ Cardinal num_resources; /* number of entries in resources */
102+ XrmClass xrm_class; /* resource class quarkified */
103+ Boolean rect4; /* NULL */
104+ XtEnum rect5; /* NULL */
105+ Boolean rect6; /* NULL */
106+ Boolean rect7; /* NULL */
107+ XtWidgetProc destroy; /* free data for subclass pointers */
108+ XtWidgetProc resize; /* geom manager changed widget size */
109+ XtExposeProc expose; /* rediplay rectangle */
110+ XtSetValuesFunc set_values; /* set subclass resource values */
111+ XtArgsFunc set_values_hook; /* notify that set_values called */
112+ XtAlmostProc set_values_almost; /* set values almost for geometry */
113+ XtArgsProc get_values_hook; /* notify that get_values called */
114+ XtProc rect9; /* NULL */
115+ XtVersionType version; /* version of intrinsics used */
116+ XtPointer callback_private; /* list of callback offsets */
117+ String rect10; /* NULL */
118+ XtGeometryHandler query_geometry; /* return preferred geometry */
119+ XtProc rect11; /* NULL */
120+ XtPointer extension; /* pointer to extension record */
121+} RectObjClassPart;
122+
123+typedef struct _RectObjClassRec {
124+ RectObjClassPart rect_class;
125+} RectObjClassRec;
126+
127+externalref RectObjClassRec rectObjClassRec;
128+
129+_XFUNCPROTOEND
130+
131+#endif /*_Xt_RectObjP_h_*/
@@ -0,0 +1,77 @@
1+/*
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+*/
26+/*****************************************************************
27+
28+(C) COPYRIGHT International Business Machines Corp. 1992,1997
29+ All Rights Reserved
30+
31+Permission is hereby granted, free of charge, to any person obtaining a copy
32+of this software and associated documentation files (the "Software"), to deal
33+in the Software without restriction, including without limitation the rights
34+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35+copies of the Software.
36+
37+The above copyright notice and this permission notice shall be included in
38+all copies or substantial portions of the Software.
39+
40+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
43+THE IBM CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
44+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
45+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
46+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
47+
48+Except as contained in this notice, the name of the IBM Corporation shall
49+not be used in advertising or otherwise to promote the sale, use or other
50+dealings in this Software without prior written authorization from the IBM
51+Corporation.
52+
53+******************************************************************/
54+
55+#ifndef _RESCONFIGP_H
56+#define _RESCONFIGP_H
57+
58+#include <X11/Xfuncproto.h>
59+
60+_XFUNCPROTOBEGIN
61+
62+/*
63+ * Atom names for resource configuration management customization tool.
64+ */
65+#define RCM_DATA "Custom Data"
66+#define RCM_INIT "Custom Init"
67+
68+extern void _XtResourceConfigurationEH(
69+ Widget /* w */,
70+ XtPointer /* client_data */,
71+ XEvent * /* event */,
72+ Boolean * /* continue_to_dispatch */
73+);
74+
75+_XFUNCPROTOEND
76+
77+#endif
@@ -0,0 +1,100 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/****************************************************************
49+ *
50+ * Resources
51+ *
52+ ****************************************************************/
53+
54+#ifndef _XtresourceI_h
55+#define _XtresourceI_h
56+
57+#define StringToQuark(string) XrmStringToQuark(string)
58+#define StringToName(string) XrmStringToName(string)
59+#define StringToClass(string) XrmStringToClass(string)
60+
61+_XFUNCPROTOBEGIN
62+
63+extern void _XtDependencies(
64+ XtResourceList * /* class_resp */,
65+ Cardinal * /* class_num_resp */,
66+ XrmResourceList * /* super_res */,
67+ Cardinal /* super_num_res */,
68+ Cardinal /* super_widget_size */);
69+
70+extern void _XtResourceDependencies(
71+ WidgetClass /* wc */
72+);
73+
74+extern void _XtConstraintResDependencies(
75+ ConstraintWidgetClass /* wc */
76+);
77+
78+extern XtCacheRef* _XtGetResources(
79+ Widget /* w */,
80+ ArgList /* args */,
81+ Cardinal /* num_args */,
82+ XtTypedArgList /* typed_args */,
83+ Cardinal* /* num_typed_args */
84+);
85+
86+extern void _XtCopyFromParent(
87+ Widget /* widget */,
88+ int /* offset */,
89+ XrmValue* /* value */
90+);
91+
92+extern void _XtCopyToArg(char *src, XtArgVal *dst, unsigned int size);
93+extern void _XtCopyFromArg(XtArgVal src, char *dst, unsigned int size);
94+extern XrmResourceList* _XtCreateIndirectionTable(XtResourceList resources,
95+ Cardinal num_resources);
96+extern void _XtResourceListInitialize(void);
97+
98+_XFUNCPROTOEND
99+
100+#endif /* _XtresourceI_h */
@@ -0,0 +1,128 @@
1+/*
2+
3+Copyright 1993, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+*/
26+
27+/*
28+ * Author: Ralph Mor, X Consortium
29+ */
30+
31+#ifndef _SM_H_
32+#define _SM_H_
33+
34+/*
35+ * Protocol Version
36+ */
37+
38+#define SmProtoMajor 1
39+#define SmProtoMinor 0
40+
41+
42+/*
43+ * Interact Style
44+ */
45+
46+#define SmInteractStyleNone 0
47+#define SmInteractStyleErrors 1
48+#define SmInteractStyleAny 2
49+
50+
51+/*
52+ * Dialog Type
53+ */
54+
55+#define SmDialogError 0
56+#define SmDialogNormal 1
57+
58+
59+/*
60+ * Save Type
61+ */
62+
63+#define SmSaveGlobal 0
64+#define SmSaveLocal 1
65+#define SmSaveBoth 2
66+
67+
68+/*
69+ * Restart Style Hints
70+ */
71+
72+#define SmRestartIfRunning 0
73+#define SmRestartAnyway 1
74+#define SmRestartImmediately 2
75+#define SmRestartNever 3
76+
77+
78+/*
79+ * Property names
80+ */
81+
82+#define SmCloneCommand "CloneCommand"
83+#define SmCurrentDirectory "CurrentDirectory"
84+#define SmDiscardCommand "DiscardCommand"
85+#define SmEnvironment "Environment"
86+#define SmProcessID "ProcessID"
87+#define SmProgram "Program"
88+#define SmRestartCommand "RestartCommand"
89+#define SmResignCommand "ResignCommand"
90+#define SmRestartStyleHint "RestartStyleHint"
91+#define SmShutdownCommand "ShutdownCommand"
92+#define SmUserID "UserID"
93+
94+
95+/*
96+ * Property types
97+ */
98+
99+#define SmCARD8 "CARD8"
100+#define SmARRAY8 "ARRAY8"
101+#define SmLISTofARRAY8 "LISTofARRAY8"
102+
103+
104+/*
105+ * SM minor opcodes
106+ */
107+
108+#define SM_Error 0
109+#define SM_RegisterClient 1
110+#define SM_RegisterClientReply 2
111+#define SM_SaveYourself 3
112+#define SM_SaveYourselfRequest 4
113+#define SM_InteractRequest 5
114+#define SM_Interact 6
115+#define SM_InteractDone 7
116+#define SM_SaveYourselfDone 8
117+#define SM_Die 9
118+#define SM_ShutdownCancelled 10
119+#define SM_CloseConnection 11
120+#define SM_SetProperties 12
121+#define SM_DeleteProperties 13
122+#define SM_GetProperties 14
123+#define SM_PropertiesReply 15
124+#define SM_SaveYourselfPhase2Request 16
125+#define SM_SaveYourselfPhase2 17
126+#define SM_SaveComplete 18
127+
128+#endif /* _SM_H_ */
@@ -0,0 +1,543 @@
1+/*
2+
3+Copyright 1993, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+*/
26+
27+/*
28+ * Author: Ralph Mor, X Consortium
29+ */
30+
31+#ifndef _SMLIB_H_
32+#define _SMLIB_H_
33+
34+#include <X11/SM/SM.h>
35+#include <X11/ICE/ICElib.h>
36+
37+
38+/*
39+ * Generic SM pointer
40+ */
41+
42+typedef IcePointer SmPointer;
43+
44+
45+/*
46+ * Connection objects. Defined in SMlibint.h
47+ */
48+
49+typedef struct _SmcConn *SmcConn;
50+typedef struct _SmsConn *SmsConn;
51+
52+
53+/*
54+ * Session Management property
55+ */
56+
57+typedef struct {
58+ int length; /* length (in bytes) of the value */
59+ SmPointer value; /* the value */
60+} SmPropValue;
61+
62+typedef struct {
63+ char *name; /* name of property */
64+ char *type; /* type of property */
65+ int num_vals; /* number of values in property */
66+ SmPropValue *vals; /* the values */
67+} SmProp;
68+
69+
70+
71+/*
72+ * SmcCloseConnection status return
73+ */
74+
75+typedef enum {
76+ SmcClosedNow,
77+ SmcClosedASAP,
78+ SmcConnectionInUse
79+} SmcCloseStatus;
80+
81+
82+
83+/*
84+ * Client callbacks
85+ */
86+
87+typedef void (*SmcSaveYourselfProc) (
88+ SmcConn /* smcConn */,
89+ SmPointer /* clientData */,
90+ int /* saveType */,
91+ Bool /* shutdown */,
92+ int /* interactStyle */,
93+ Bool /* fast */
94+);
95+
96+typedef void (*SmcSaveYourselfPhase2Proc) (
97+ SmcConn /* smcConn */,
98+ SmPointer /* clientData */
99+);
100+
101+typedef void (*SmcInteractProc) (
102+ SmcConn /* smcConn */,
103+ SmPointer /* clientData */
104+);
105+
106+typedef void (*SmcDieProc) (
107+ SmcConn /* smcConn */,
108+ SmPointer /* clientData */
109+);
110+
111+typedef void (*SmcShutdownCancelledProc) (
112+ SmcConn /* smcConn */,
113+ SmPointer /* clientData */
114+);
115+
116+typedef void (*SmcSaveCompleteProc) (
117+ SmcConn /* smcConn */,
118+ SmPointer /* clientData */
119+);
120+
121+typedef void (*SmcPropReplyProc) (
122+ SmcConn /* smcConn */,
123+ SmPointer /* clientData */,
124+ int /* numProps */,
125+ SmProp ** /* props */
126+);
127+
128+
129+/*
130+ * Callbacks set up at SmcOpenConnection time
131+ */
132+
133+typedef struct {
134+
135+ struct {
136+ SmcSaveYourselfProc callback;
137+ SmPointer client_data;
138+ } save_yourself;
139+
140+ struct {
141+ SmcDieProc callback;
142+ SmPointer client_data;
143+ } die;
144+
145+ struct {
146+ SmcSaveCompleteProc callback;
147+ SmPointer client_data;
148+ } save_complete;
149+
150+ struct {
151+ SmcShutdownCancelledProc callback;
152+ SmPointer client_data;
153+ } shutdown_cancelled;
154+
155+} SmcCallbacks;
156+
157+#define SmcSaveYourselfProcMask (1L << 0)
158+#define SmcDieProcMask (1L << 1)
159+#define SmcSaveCompleteProcMask (1L << 2)
160+#define SmcShutdownCancelledProcMask (1L << 3)
161+
162+
163+
164+/*
165+ * Session manager callbacks
166+ */
167+
168+typedef Status (*SmsRegisterClientProc) (
169+ SmsConn /* smsConn */,
170+ SmPointer /* managerData */,
171+ char * /* previousId */
172+);
173+
174+typedef void (*SmsInteractRequestProc) (
175+ SmsConn /* smsConn */,
176+ SmPointer /* managerData */,
177+ int /* dialogType */
178+);
179+
180+typedef void (*SmsInteractDoneProc) (
181+ SmsConn /* smsConn */,
182+ SmPointer /* managerData */,
183+ Bool /* cancelShutdown */
184+);
185+
186+typedef void (*SmsSaveYourselfRequestProc) (
187+ SmsConn /* smsConn */,
188+ SmPointer /* managerData */,
189+ int /* saveType */,
190+ Bool /* shutdown */,
191+ int /* interactStyle */,
192+ Bool /* fast */,
193+ Bool /* global */
194+);
195+
196+typedef void (*SmsSaveYourselfPhase2RequestProc) (
197+ SmsConn /* smsConn */,
198+ SmPointer /* managerData */
199+);
200+
201+typedef void (*SmsSaveYourselfDoneProc) (
202+ SmsConn /* smsConn */,
203+ SmPointer /* managerData */,
204+ Bool /* success */
205+);
206+
207+typedef void (*SmsCloseConnectionProc) (
208+ SmsConn /* smsConn */,
209+ SmPointer /* managerData */,
210+ int /* count */,
211+ char ** /* reasonMsgs */
212+);
213+
214+typedef void (*SmsSetPropertiesProc) (
215+ SmsConn /* smsConn */,
216+ SmPointer /* managerData */,
217+ int /* numProps */,
218+ SmProp ** /* props */
219+);
220+
221+typedef void (*SmsDeletePropertiesProc) (
222+ SmsConn /* smsConn */,
223+ SmPointer /* managerData */,
224+ int /* numProps */,
225+ char ** /* propNames */
226+);
227+
228+typedef void (*SmsGetPropertiesProc) (
229+ SmsConn /* smsConn */,
230+ SmPointer /* managerData */
231+);
232+
233+
234+/*
235+ * Callbacks set up by a session manager when a new client connects.
236+ */
237+
238+typedef struct {
239+
240+ struct {
241+ SmsRegisterClientProc callback;
242+ SmPointer manager_data;
243+ } register_client;
244+
245+ struct {
246+ SmsInteractRequestProc callback;
247+ SmPointer manager_data;
248+ } interact_request;
249+
250+ struct {
251+ SmsInteractDoneProc callback;
252+ SmPointer manager_data;
253+ } interact_done;
254+
255+ struct {
256+ SmsSaveYourselfRequestProc callback;
257+ SmPointer manager_data;
258+ } save_yourself_request;
259+
260+ struct {
261+ SmsSaveYourselfPhase2RequestProc callback;
262+ SmPointer manager_data;
263+ } save_yourself_phase2_request;
264+
265+ struct {
266+ SmsSaveYourselfDoneProc callback;
267+ SmPointer manager_data;
268+ } save_yourself_done;
269+
270+ struct {
271+ SmsCloseConnectionProc callback;
272+ SmPointer manager_data;
273+ } close_connection;
274+
275+ struct {
276+ SmsSetPropertiesProc callback;
277+ SmPointer manager_data;
278+ } set_properties;
279+
280+ struct {
281+ SmsDeletePropertiesProc callback;
282+ SmPointer manager_data;
283+ } delete_properties;
284+
285+ struct {
286+ SmsGetPropertiesProc callback;
287+ SmPointer manager_data;
288+ } get_properties;
289+
290+} SmsCallbacks;
291+
292+
293+#define SmsRegisterClientProcMask (1L << 0)
294+#define SmsInteractRequestProcMask (1L << 1)
295+#define SmsInteractDoneProcMask (1L << 2)
296+#define SmsSaveYourselfRequestProcMask (1L << 3)
297+#define SmsSaveYourselfP2RequestProcMask (1L << 4)
298+#define SmsSaveYourselfDoneProcMask (1L << 5)
299+#define SmsCloseConnectionProcMask (1L << 6)
300+#define SmsSetPropertiesProcMask (1L << 7)
301+#define SmsDeletePropertiesProcMask (1L << 8)
302+#define SmsGetPropertiesProcMask (1L << 9)
303+
304+
305+
306+typedef Status (*SmsNewClientProc) (
307+ SmsConn /* smsConn */,
308+ SmPointer /* managerData */,
309+ unsigned long * /* maskRet */,
310+ SmsCallbacks * /* callbacksRet */,
311+ char ** /* failureReasonRet */
312+);
313+
314+
315+
316+/*
317+ * Error handlers
318+ */
319+
320+typedef void (*SmcErrorHandler) (
321+ SmcConn /* smcConn */,
322+ Bool /* swap */,
323+ int /* offendingMinorOpcode */,
324+ unsigned long /* offendingSequence */,
325+ int /* errorClass */,
326+ int /* severity */,
327+ SmPointer /* values */
328+);
329+
330+typedef void (*SmsErrorHandler) (
331+ SmsConn /* smsConn */,
332+ Bool /* swap */,
333+ int /* offendingMinorOpcode */,
334+ unsigned long /* offendingSequence */,
335+ int /* errorClass */,
336+ int /* severity */,
337+ SmPointer /* values */
338+);
339+
340+
341+
342+/*
343+ * Function Prototypes
344+ */
345+
346+_XFUNCPROTOBEGIN
347+
348+extern SmcConn SmcOpenConnection (
349+ char * /* networkIdsList */,
350+ SmPointer /* context */,
351+ int /* xsmpMajorRev */,
352+ int /* xsmpMinorRev */,
353+ unsigned long /* mask */,
354+ SmcCallbacks * /* callbacks */,
355+ const char * /* previousId */,
356+ char ** /* clientIdRet */,
357+ int /* errorLength */,
358+ char * /* errorStringRet */
359+);
360+
361+extern SmcCloseStatus SmcCloseConnection (
362+ SmcConn /* smcConn */,
363+ int /* count */,
364+ char ** /* reasonMsgs */
365+);
366+
367+extern void SmcModifyCallbacks (
368+ SmcConn /* smcConn */,
369+ unsigned long /* mask */,
370+ SmcCallbacks * /* callbacks */
371+);
372+
373+extern void SmcSetProperties (
374+ SmcConn /* smcConn */,
375+ int /* numProps */,
376+ SmProp ** /* props */
377+);
378+
379+extern void SmcDeleteProperties (
380+ SmcConn /* smcConn */,
381+ int /* numProps */,
382+ char ** /* propNames */
383+);
384+
385+extern Status SmcGetProperties (
386+ SmcConn /* smcConn */,
387+ SmcPropReplyProc /* propReplyProc */,
388+ SmPointer /* clientData */
389+);
390+
391+extern Status SmcInteractRequest (
392+ SmcConn /* smcConn */,
393+ int /* dialogType */,
394+ SmcInteractProc /* interactProc */,
395+ SmPointer /* clientData */
396+);
397+
398+extern void SmcInteractDone (
399+ SmcConn /* smcConn */,
400+ Bool /* cancelShutdown */
401+);
402+
403+extern void SmcRequestSaveYourself (
404+ SmcConn /* smcConn */,
405+ int /* saveType */,
406+ Bool /* shutdown */,
407+ int /* interactStyle */,
408+ Bool /* fast */,
409+ Bool /* global */
410+);
411+
412+extern Status SmcRequestSaveYourselfPhase2 (
413+ SmcConn /* smcConn */,
414+ SmcSaveYourselfPhase2Proc /* saveYourselfPhase2Proc */,
415+ SmPointer /* clientData */
416+);
417+
418+extern void SmcSaveYourselfDone (
419+ SmcConn /* smcConn */,
420+ Bool /* success */
421+);
422+
423+extern int SmcProtocolVersion (
424+ SmcConn /* smcConn */
425+);
426+
427+extern int SmcProtocolRevision (
428+ SmcConn /* smcConn */
429+);
430+
431+extern char *SmcVendor (
432+ SmcConn /* smcConn */
433+);
434+
435+extern char *SmcRelease (
436+ SmcConn /* smcConn */
437+);
438+
439+extern char *SmcClientID (
440+ SmcConn /* smcConn */
441+);
442+
443+extern IceConn SmcGetIceConnection (
444+ SmcConn /* smcConn */
445+);
446+
447+extern Status SmsInitialize (
448+ const char * /* vendor */,
449+ const char * /* release */,
450+ SmsNewClientProc /* newClientProc */,
451+ SmPointer /* managerData */,
452+ IceHostBasedAuthProc /* hostBasedAuthProc */,
453+ int /* errorLength */,
454+ char * /* errorStringRet */
455+);
456+
457+extern char *SmsClientHostName (
458+ SmsConn /* smsConn */
459+);
460+
461+extern char *SmsGenerateClientID (
462+ SmsConn /* smsConn */
463+);
464+
465+extern Status SmsRegisterClientReply (
466+ SmsConn /* smsConn */,
467+ char * /* clientId */
468+);
469+
470+extern void SmsSaveYourself (
471+ SmsConn /* smsConn */,
472+ int /* saveType */,
473+ Bool /* shutdown */,
474+ int /* interactStyle */,
475+ Bool /* fast */
476+);
477+
478+extern void SmsSaveYourselfPhase2 (
479+ SmsConn /* smsConn */
480+);
481+
482+extern void SmsInteract (
483+ SmsConn /* smsConn */
484+);
485+
486+extern void SmsDie (
487+ SmsConn /* smsConn */
488+);
489+
490+extern void SmsSaveComplete (
491+ SmsConn /* smsConn */
492+);
493+
494+extern void SmsShutdownCancelled (
495+ SmsConn /* smsConn */
496+);
497+
498+extern void SmsReturnProperties (
499+ SmsConn /* smsConn */,
500+ int /* numProps */,
501+ SmProp ** /* props */
502+);
503+
504+extern void SmsCleanUp (
505+ SmsConn /* smsConn */
506+);
507+
508+extern int SmsProtocolVersion (
509+ SmsConn /* smsConn */
510+);
511+
512+extern int SmsProtocolRevision (
513+ SmsConn /* smsConn */
514+);
515+
516+extern char *SmsClientID (
517+ SmsConn /* smsConn */
518+);
519+
520+extern IceConn SmsGetIceConnection (
521+ SmsConn /* smsConn */
522+);
523+
524+extern SmcErrorHandler SmcSetErrorHandler (
525+ SmcErrorHandler /* handler */
526+);
527+
528+extern SmsErrorHandler SmsSetErrorHandler (
529+ SmsErrorHandler /* handler */
530+);
531+
532+extern void SmFreeProperty (
533+ SmProp * /* prop */
534+);
535+
536+extern void SmFreeReasons (
537+ int /* count */,
538+ char ** /* reasonMsgs */
539+);
540+
541+_XFUNCPROTOEND
542+
543+#endif /* _SMLIB_H_ */
@@ -0,0 +1,206 @@
1+/*
2+
3+Copyright 1993, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+*/
26+
27+/*
28+ * Author: Ralph Mor, X Consortium
29+ */
30+
31+#ifndef _SMPROTO_H_
32+#define _SMPROTO_H_
33+
34+#include <X11/Xmd.h>
35+
36+typedef struct {
37+ CARD8 majorOpcode;
38+ CARD8 minorOpcode;
39+ CARD8 unused[2];
40+ CARD32 length;
41+ /* n ARRAY8 previousId */
42+} smRegisterClientMsg;
43+
44+typedef struct {
45+ CARD8 majorOpcode;
46+ CARD8 minorOpcode;
47+ CARD8 unused[2];
48+ CARD32 length;
49+ /* n ARRAY8 clientId */
50+} smRegisterClientReplyMsg;
51+
52+typedef struct {
53+ CARD8 majorOpcode;
54+ CARD8 minorOpcode;
55+ CARD8 unused1[2];
56+ CARD32 length;
57+ CARD8 saveType;
58+ CARD8 shutdown;
59+ CARD8 interactStyle;
60+ CARD8 fast;
61+ CARD8 unused2[4];
62+} smSaveYourselfMsg;
63+
64+typedef struct {
65+ CARD8 majorOpcode;
66+ CARD8 minorOpcode;
67+ CARD8 unused1[2];
68+ CARD32 length;
69+ CARD8 saveType;
70+ CARD8 shutdown;
71+ CARD8 interactStyle;
72+ CARD8 fast;
73+ CARD8 global;
74+ CARD8 unused2[3];
75+} smSaveYourselfRequestMsg;
76+
77+typedef struct {
78+ CARD8 majorOpcode;
79+ CARD8 minorOpcode;
80+ CARD8 dialogType;
81+ CARD8 unused;
82+ CARD32 length;
83+} smInteractRequestMsg;
84+
85+typedef struct {
86+ CARD8 majorOpcode;
87+ CARD8 minorOpcode;
88+ CARD8 unused[2];
89+ CARD32 length;
90+} smInteractMsg;
91+
92+typedef struct {
93+ CARD8 majorOpcode;
94+ CARD8 minorOpcode;
95+ CARD8 cancelShutdown;
96+ CARD8 unused;
97+ CARD32 length;
98+} smInteractDoneMsg;
99+
100+typedef struct {
101+ CARD8 majorOpcode;
102+ CARD8 minorOpcode;
103+ CARD8 success;
104+ CARD8 unused;
105+ CARD32 length;
106+} smSaveYourselfDoneMsg;
107+
108+typedef struct {
109+ CARD8 majorOpcode;
110+ CARD8 minorOpcode;
111+ CARD8 unused[2];
112+ CARD32 length;
113+} smDieMsg;
114+
115+typedef struct {
116+ CARD8 majorOpcode;
117+ CARD8 minorOpcode;
118+ CARD8 unused[2];
119+ CARD32 length;
120+} smShutdownCancelledMsg;
121+
122+typedef struct {
123+ CARD8 majorOpcode;
124+ CARD8 minorOpcode;
125+ CARD8 unused[2];
126+ CARD32 length;
127+ /* b LISTofARRAY8 reasons */
128+} smCloseConnectionMsg;
129+
130+typedef struct {
131+ CARD8 majorOpcode;
132+ CARD8 minorOpcode;
133+ CARD8 unused[2];
134+ CARD32 length;
135+ /* a LISTofPROPERTY properties */
136+} smSetPropertiesMsg;
137+
138+typedef struct {
139+ CARD8 majorOpcode;
140+ CARD8 minorOpcode;
141+ CARD8 unused[2];
142+ CARD32 length;
143+ /* a LISTofARRAY8 property names */
144+} smDeletePropertiesMsg;
145+
146+typedef struct {
147+ CARD8 majorOpcode;
148+ CARD8 minorOpcode;
149+ CARD8 unused[2];
150+ CARD32 length;
151+} smGetPropertiesMsg;
152+
153+typedef struct {
154+ CARD8 majorOpcode;
155+ CARD8 minorOpcode;
156+ CARD8 unused[2];
157+ CARD32 length;
158+ /* a LISTofPROPERTY properties */
159+} smPropertiesReplyMsg;
160+
161+typedef struct {
162+ CARD8 majorOpcode;
163+ CARD8 minorOpcode;
164+ CARD8 unused[2];
165+ CARD32 length;
166+} smSaveYourselfPhase2RequestMsg;
167+
168+typedef struct {
169+ CARD8 majorOpcode;
170+ CARD8 minorOpcode;
171+ CARD8 unused[2];
172+ CARD32 length;
173+} smSaveYourselfPhase2Msg;
174+
175+typedef struct {
176+ CARD8 majorOpcode;
177+ CARD8 minorOpcode;
178+ CARD8 unused[2];
179+ CARD32 length;
180+} smSaveCompleteMsg;
181+
182+
183+/*
184+ * SIZEOF values. These better be multiples of 8.
185+ */
186+
187+#define sz_smRegisterClientMsg 8
188+#define sz_smRegisterClientReplyMsg 8
189+#define sz_smSaveYourselfMsg 16
190+#define sz_smSaveYourselfRequestMsg 16
191+#define sz_smInteractRequestMsg 8
192+#define sz_smInteractMsg 8
193+#define sz_smInteractDoneMsg 8
194+#define sz_smSaveYourselfDoneMsg 8
195+#define sz_smDieMsg 8
196+#define sz_smShutdownCancelledMsg 8
197+#define sz_smCloseConnectionMsg 8
198+#define sz_smSetPropertiesMsg 8
199+#define sz_smDeletePropertiesMsg 8
200+#define sz_smGetPropertiesMsg 8
201+#define sz_smPropertiesReplyMsg 8
202+#define sz_smSaveYourselfPhase2RequestMsg 8
203+#define sz_smSaveYourselfPhase2Msg 8
204+#define sz_smSaveCompleteMsg 8
205+
206+#endif /* _SMPROTO_H_ */
@@ -0,0 +1,168 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtselectionI_h
49+#define _XtselectionI_h
50+
51+#include "Intrinsic.h"
52+
53+typedef struct _RequestRec *Request;
54+typedef struct _SelectRec *Select;
55+
56+typedef struct _RequestRec {
57+ Select ctx; /* logical owner */
58+ Widget widget; /* widget actually receiving Selection events */
59+ Window requestor;
60+ Atom property;
61+ Atom target;
62+ Atom type;
63+ int format;
64+ XtPointer value;
65+ unsigned long bytelength;
66+ unsigned long offset;
67+ XtIntervalId timeout;
68+ XSelectionRequestEvent event; /* for XtGetSelectionRequest */
69+ Boolean allSent;
70+} RequestRec;
71+
72+typedef struct {
73+ Atom prop;
74+ Boolean avail;
75+} SelectionPropRec, *SelectionProp;
76+
77+typedef struct {
78+ Display *dpy;
79+ Atom incr_atom, indirect_atom, timestamp_atom;
80+ int propCount;
81+ SelectionProp list;
82+} PropListRec, *PropList;
83+
84+typedef struct _SelectRec {
85+ Atom selection; /* constant */
86+ Display *dpy; /* constant */
87+ Widget widget;
88+ Time time;
89+ unsigned long serial;
90+ XtConvertSelectionProc convert;
91+ XtLoseSelectionProc loses;
92+ XtSelectionDoneProc notify;
93+ XtCancelConvertSelectionProc owner_cancel;
94+ XtPointer owner_closure;
95+ PropList prop_list;
96+ Request req; /* state for local non-incr xfer */
97+ int ref_count; /* of active transfers */
98+ unsigned int incremental:1;
99+ unsigned int free_when_done:1;
100+ unsigned int was_disowned:1;
101+} SelectRec;
102+
103+typedef struct _ParamRec {
104+ Atom selection;
105+ Atom param;
106+} ParamRec, *Param;
107+
108+typedef struct _ParamInfoRec {
109+ unsigned int count;
110+ Param paramlist;
111+} ParamInfoRec, *ParamInfo;
112+
113+typedef struct _QueuedRequestRec {
114+ Atom selection;
115+ Atom target;
116+ Atom param;
117+ XtSelectionCallbackProc callback;
118+ XtPointer closure;
119+ Time time;
120+ Boolean incremental;
121+} QueuedRequestRec, *QueuedRequest;
122+
123+typedef struct _QueuedRequestInfoRec {
124+ int count;
125+ Atom *selections;
126+ QueuedRequest *requests;
127+} QueuedRequestInfoRec, *QueuedRequestInfo;
128+
129+typedef struct {
130+ XtSelectionCallbackProc *callbacks;
131+ XtPointer *req_closure;
132+ Atom property;
133+ Atom *target;
134+ Atom type;
135+ int format;
136+ char *value;
137+ int bytelength;
138+ int offset;
139+ XtIntervalId timeout;
140+ XtEventHandler proc;
141+ Widget widget;
142+ Time time;
143+ Select ctx;
144+ Boolean *incremental;
145+ int current;
146+} CallBackInfoRec, *CallBackInfo;
147+
148+typedef struct {
149+ Atom target;
150+ Atom property;
151+} IndirectPair;
152+
153+#define IndirectPairWordSize 2
154+
155+typedef struct {
156+ int active_transfer_count;
157+} RequestWindowRec;
158+
159+#define MAX_SELECTION_INCR(dpy) (((65536 < XMaxRequestSize(dpy)) ? \
160+ (65536 << 2) : (XMaxRequestSize(dpy) << 2))-100)
161+
162+#define MATCH_SELECT(event, info) ((event->time == info->time) && \
163+ (event->requestor == XtWindow(info->widget)) && \
164+ (event->selection == info->ctx->selection) && \
165+ (event->target == *info->target))
166+
167+#endif /* _XtselectionI_h */
168+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,562 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtShell_h
49+#define _XtShell_h
50+
51+#include <X11/SM/SMlib.h>
52+#include <X11/Intrinsic.h>
53+
54+/***********************************************************************
55+ *
56+ * Shell Widget
57+ *
58+ ***********************************************************************/
59+/*
60+ * Shell-specific resources names, classes, and a representation type.
61+ */
62+
63+#ifndef XTSTRINGDEFINES
64+#define _XtShell_h_Const const
65+#endif
66+
67+/* $Xorg: makestrs.c,v 1.6 2001/02/09 02:03:17 xorgcvs Exp $ */
68+/* This file is automatically generated. */
69+/* Default ABI version -- Do not edit */
70+#ifdef XTSTRINGDEFINES
71+#define XtNiconName "iconName"
72+#define XtCIconName "IconName"
73+#define XtNiconPixmap "iconPixmap"
74+#define XtCIconPixmap "IconPixmap"
75+#define XtNiconWindow "iconWindow"
76+#define XtCIconWindow "IconWindow"
77+#define XtNiconMask "iconMask"
78+#define XtCIconMask "IconMask"
79+#define XtNwindowGroup "windowGroup"
80+#define XtCWindowGroup "WindowGroup"
81+#define XtNvisual "visual"
82+#define XtCVisual "Visual"
83+#define XtNtitleEncoding "titleEncoding"
84+#define XtCTitleEncoding "TitleEncoding"
85+#define XtNsaveUnder "saveUnder"
86+#define XtCSaveUnder "SaveUnder"
87+#define XtNtransient "transient"
88+#define XtCTransient "Transient"
89+#define XtNoverrideRedirect "overrideRedirect"
90+#define XtCOverrideRedirect "OverrideRedirect"
91+#define XtNtransientFor "transientFor"
92+#define XtCTransientFor "TransientFor"
93+#define XtNiconNameEncoding "iconNameEncoding"
94+#define XtCIconNameEncoding "IconNameEncoding"
95+#define XtNallowShellResize "allowShellResize"
96+#define XtCAllowShellResize "AllowShellResize"
97+#define XtNcreatePopupChildProc "createPopupChildProc"
98+#define XtCCreatePopupChildProc "CreatePopupChildProc"
99+#define XtNtitle "title"
100+#define XtCTitle "Title"
101+#ifndef XtRAtom
102+#define XtRAtom "Atom"
103+#endif
104+#define XtNargc "argc"
105+#define XtCArgc "Argc"
106+#define XtNargv "argv"
107+#define XtCArgv "Argv"
108+#define XtNiconX "iconX"
109+#define XtCIconX "IconX"
110+#define XtNiconY "iconY"
111+#define XtCIconY "IconY"
112+#define XtNinput "input"
113+#define XtCInput "Input"
114+#define XtNiconic "iconic"
115+#define XtCIconic "Iconic"
116+#define XtNinitialState "initialState"
117+#define XtCInitialState "InitialState"
118+#define XtNgeometry "geometry"
119+#define XtCGeometry "Geometry"
120+#define XtNbaseWidth "baseWidth"
121+#define XtCBaseWidth "BaseWidth"
122+#define XtNbaseHeight "baseHeight"
123+#define XtCBaseHeight "BaseHeight"
124+#define XtNwinGravity "winGravity"
125+#define XtCWinGravity "WinGravity"
126+#define XtNminWidth "minWidth"
127+#define XtCMinWidth "MinWidth"
128+#define XtNminHeight "minHeight"
129+#define XtCMinHeight "MinHeight"
130+#define XtNmaxWidth "maxWidth"
131+#define XtCMaxWidth "MaxWidth"
132+#define XtNmaxHeight "maxHeight"
133+#define XtCMaxHeight "MaxHeight"
134+#define XtNwidthInc "widthInc"
135+#define XtCWidthInc "WidthInc"
136+#define XtNheightInc "heightInc"
137+#define XtCHeightInc "HeightInc"
138+#define XtNminAspectY "minAspectY"
139+#define XtCMinAspectY "MinAspectY"
140+#define XtNmaxAspectY "maxAspectY"
141+#define XtCMaxAspectY "MaxAspectY"
142+#define XtNminAspectX "minAspectX"
143+#define XtCMinAspectX "MinAspectX"
144+#define XtNmaxAspectX "maxAspectX"
145+#define XtCMaxAspectX "MaxAspectX"
146+#define XtNwmTimeout "wmTimeout"
147+#define XtCWmTimeout "WmTimeout"
148+#define XtNwaitForWm "waitforwm"
149+#define XtCWaitForWm "Waitforwm"
150+#define XtNwaitforwm "waitforwm"
151+#define XtCWaitforwm "Waitforwm"
152+#define XtNclientLeader "clientLeader"
153+#define XtCClientLeader "ClientLeader"
154+#define XtNwindowRole "windowRole"
155+#define XtCWindowRole "WindowRole"
156+#define XtNurgency "urgency"
157+#define XtCUrgency "Urgency"
158+#define XtNcancelCallback "cancelCallback"
159+#define XtNcloneCommand "cloneCommand"
160+#define XtCCloneCommand "CloneCommand"
161+#define XtNconnection "connection"
162+#define XtCConnection "Connection"
163+#define XtNcurrentDirectory "currentDirectory"
164+#define XtCCurrentDirectory "CurrentDirectory"
165+#define XtNdieCallback "dieCallback"
166+#define XtNdiscardCommand "discardCommand"
167+#define XtCDiscardCommand "DiscardCommand"
168+#define XtNenvironment "environment"
169+#define XtCEnvironment "Environment"
170+#define XtNinteractCallback "interactCallback"
171+#define XtNjoinSession "joinSession"
172+#define XtCJoinSession "JoinSession"
173+#define XtNprogramPath "programPath"
174+#define XtCProgramPath "ProgramPath"
175+#define XtNresignCommand "resignCommand"
176+#define XtCResignCommand "ResignCommand"
177+#define XtNrestartCommand "restartCommand"
178+#define XtCRestartCommand "RestartCommand"
179+#define XtNrestartStyle "restartStyle"
180+#define XtCRestartStyle "RestartStyle"
181+#define XtNsaveCallback "saveCallback"
182+#define XtNsaveCompleteCallback "saveCompleteCallback"
183+#define XtNsessionID "sessionID"
184+#define XtCSessionID "SessionID"
185+#define XtNshutdownCommand "shutdownCommand"
186+#define XtCShutdownCommand "ShutdownCommand"
187+#define XtNerrorCallback "errorCallback"
188+#else
189+extern _XtShell_h_Const char XtShellStrings[];
190+#ifndef XtNiconName
191+#define XtNiconName ((String)&XtShellStrings[0])
192+#endif
193+#ifndef XtCIconName
194+#define XtCIconName ((String)&XtShellStrings[9])
195+#endif
196+#ifndef XtNiconPixmap
197+#define XtNiconPixmap ((String)&XtShellStrings[18])
198+#endif
199+#ifndef XtCIconPixmap
200+#define XtCIconPixmap ((String)&XtShellStrings[29])
201+#endif
202+#ifndef XtNiconWindow
203+#define XtNiconWindow ((String)&XtShellStrings[40])
204+#endif
205+#ifndef XtCIconWindow
206+#define XtCIconWindow ((String)&XtShellStrings[51])
207+#endif
208+#ifndef XtNiconMask
209+#define XtNiconMask ((String)&XtShellStrings[62])
210+#endif
211+#ifndef XtCIconMask
212+#define XtCIconMask ((String)&XtShellStrings[71])
213+#endif
214+#ifndef XtNwindowGroup
215+#define XtNwindowGroup ((String)&XtShellStrings[80])
216+#endif
217+#ifndef XtCWindowGroup
218+#define XtCWindowGroup ((String)&XtShellStrings[92])
219+#endif
220+#ifndef XtNvisual
221+#define XtNvisual ((String)&XtShellStrings[104])
222+#endif
223+#ifndef XtCVisual
224+#define XtCVisual ((String)&XtShellStrings[111])
225+#endif
226+#ifndef XtNtitleEncoding
227+#define XtNtitleEncoding ((String)&XtShellStrings[118])
228+#endif
229+#ifndef XtCTitleEncoding
230+#define XtCTitleEncoding ((String)&XtShellStrings[132])
231+#endif
232+#ifndef XtNsaveUnder
233+#define XtNsaveUnder ((String)&XtShellStrings[146])
234+#endif
235+#ifndef XtCSaveUnder
236+#define XtCSaveUnder ((String)&XtShellStrings[156])
237+#endif
238+#ifndef XtNtransient
239+#define XtNtransient ((String)&XtShellStrings[166])
240+#endif
241+#ifndef XtCTransient
242+#define XtCTransient ((String)&XtShellStrings[176])
243+#endif
244+#ifndef XtNoverrideRedirect
245+#define XtNoverrideRedirect ((String)&XtShellStrings[186])
246+#endif
247+#ifndef XtCOverrideRedirect
248+#define XtCOverrideRedirect ((String)&XtShellStrings[203])
249+#endif
250+#ifndef XtNtransientFor
251+#define XtNtransientFor ((String)&XtShellStrings[220])
252+#endif
253+#ifndef XtCTransientFor
254+#define XtCTransientFor ((String)&XtShellStrings[233])
255+#endif
256+#ifndef XtNiconNameEncoding
257+#define XtNiconNameEncoding ((String)&XtShellStrings[246])
258+#endif
259+#ifndef XtCIconNameEncoding
260+#define XtCIconNameEncoding ((String)&XtShellStrings[263])
261+#endif
262+#ifndef XtNallowShellResize
263+#define XtNallowShellResize ((String)&XtShellStrings[280])
264+#endif
265+#ifndef XtCAllowShellResize
266+#define XtCAllowShellResize ((String)&XtShellStrings[297])
267+#endif
268+#ifndef XtNcreatePopupChildProc
269+#define XtNcreatePopupChildProc ((String)&XtShellStrings[314])
270+#endif
271+#ifndef XtCCreatePopupChildProc
272+#define XtCCreatePopupChildProc ((String)&XtShellStrings[335])
273+#endif
274+#ifndef XtNtitle
275+#define XtNtitle ((String)&XtShellStrings[356])
276+#endif
277+#ifndef XtCTitle
278+#define XtCTitle ((String)&XtShellStrings[362])
279+#endif
280+#ifndef XtRAtom
281+#define XtRAtom ((String)&XtShellStrings[368])
282+#endif
283+#ifndef XtNargc
284+#define XtNargc ((String)&XtShellStrings[373])
285+#endif
286+#ifndef XtCArgc
287+#define XtCArgc ((String)&XtShellStrings[378])
288+#endif
289+#ifndef XtNargv
290+#define XtNargv ((String)&XtShellStrings[383])
291+#endif
292+#ifndef XtCArgv
293+#define XtCArgv ((String)&XtShellStrings[388])
294+#endif
295+#ifndef XtNiconX
296+#define XtNiconX ((String)&XtShellStrings[393])
297+#endif
298+#ifndef XtCIconX
299+#define XtCIconX ((String)&XtShellStrings[399])
300+#endif
301+#ifndef XtNiconY
302+#define XtNiconY ((String)&XtShellStrings[405])
303+#endif
304+#ifndef XtCIconY
305+#define XtCIconY ((String)&XtShellStrings[411])
306+#endif
307+#ifndef XtNinput
308+#define XtNinput ((String)&XtShellStrings[417])
309+#endif
310+#ifndef XtCInput
311+#define XtCInput ((String)&XtShellStrings[423])
312+#endif
313+#ifndef XtNiconic
314+#define XtNiconic ((String)&XtShellStrings[429])
315+#endif
316+#ifndef XtCIconic
317+#define XtCIconic ((String)&XtShellStrings[436])
318+#endif
319+#ifndef XtNinitialState
320+#define XtNinitialState ((String)&XtShellStrings[443])
321+#endif
322+#ifndef XtCInitialState
323+#define XtCInitialState ((String)&XtShellStrings[456])
324+#endif
325+#ifndef XtNgeometry
326+#define XtNgeometry ((String)&XtShellStrings[469])
327+#endif
328+#ifndef XtCGeometry
329+#define XtCGeometry ((String)&XtShellStrings[478])
330+#endif
331+#ifndef XtNbaseWidth
332+#define XtNbaseWidth ((String)&XtShellStrings[487])
333+#endif
334+#ifndef XtCBaseWidth
335+#define XtCBaseWidth ((String)&XtShellStrings[497])
336+#endif
337+#ifndef XtNbaseHeight
338+#define XtNbaseHeight ((String)&XtShellStrings[507])
339+#endif
340+#ifndef XtCBaseHeight
341+#define XtCBaseHeight ((String)&XtShellStrings[518])
342+#endif
343+#ifndef XtNwinGravity
344+#define XtNwinGravity ((String)&XtShellStrings[529])
345+#endif
346+#ifndef XtCWinGravity
347+#define XtCWinGravity ((String)&XtShellStrings[540])
348+#endif
349+#ifndef XtNminWidth
350+#define XtNminWidth ((String)&XtShellStrings[551])
351+#endif
352+#ifndef XtCMinWidth
353+#define XtCMinWidth ((String)&XtShellStrings[560])
354+#endif
355+#ifndef XtNminHeight
356+#define XtNminHeight ((String)&XtShellStrings[569])
357+#endif
358+#ifndef XtCMinHeight
359+#define XtCMinHeight ((String)&XtShellStrings[579])
360+#endif
361+#ifndef XtNmaxWidth
362+#define XtNmaxWidth ((String)&XtShellStrings[589])
363+#endif
364+#ifndef XtCMaxWidth
365+#define XtCMaxWidth ((String)&XtShellStrings[598])
366+#endif
367+#ifndef XtNmaxHeight
368+#define XtNmaxHeight ((String)&XtShellStrings[607])
369+#endif
370+#ifndef XtCMaxHeight
371+#define XtCMaxHeight ((String)&XtShellStrings[617])
372+#endif
373+#ifndef XtNwidthInc
374+#define XtNwidthInc ((String)&XtShellStrings[627])
375+#endif
376+#ifndef XtCWidthInc
377+#define XtCWidthInc ((String)&XtShellStrings[636])
378+#endif
379+#ifndef XtNheightInc
380+#define XtNheightInc ((String)&XtShellStrings[645])
381+#endif
382+#ifndef XtCHeightInc
383+#define XtCHeightInc ((String)&XtShellStrings[655])
384+#endif
385+#ifndef XtNminAspectY
386+#define XtNminAspectY ((String)&XtShellStrings[665])
387+#endif
388+#ifndef XtCMinAspectY
389+#define XtCMinAspectY ((String)&XtShellStrings[676])
390+#endif
391+#ifndef XtNmaxAspectY
392+#define XtNmaxAspectY ((String)&XtShellStrings[687])
393+#endif
394+#ifndef XtCMaxAspectY
395+#define XtCMaxAspectY ((String)&XtShellStrings[698])
396+#endif
397+#ifndef XtNminAspectX
398+#define XtNminAspectX ((String)&XtShellStrings[709])
399+#endif
400+#ifndef XtCMinAspectX
401+#define XtCMinAspectX ((String)&XtShellStrings[720])
402+#endif
403+#ifndef XtNmaxAspectX
404+#define XtNmaxAspectX ((String)&XtShellStrings[731])
405+#endif
406+#ifndef XtCMaxAspectX
407+#define XtCMaxAspectX ((String)&XtShellStrings[742])
408+#endif
409+#ifndef XtNwmTimeout
410+#define XtNwmTimeout ((String)&XtShellStrings[753])
411+#endif
412+#ifndef XtCWmTimeout
413+#define XtCWmTimeout ((String)&XtShellStrings[763])
414+#endif
415+#ifndef XtNwaitForWm
416+#define XtNwaitForWm ((String)&XtShellStrings[773])
417+#endif
418+#ifndef XtCWaitForWm
419+#define XtCWaitForWm ((String)&XtShellStrings[783])
420+#endif
421+#ifndef XtNwaitforwm
422+#define XtNwaitforwm ((String)&XtShellStrings[793])
423+#endif
424+#ifndef XtCWaitforwm
425+#define XtCWaitforwm ((String)&XtShellStrings[803])
426+#endif
427+#ifndef XtNclientLeader
428+#define XtNclientLeader ((String)&XtShellStrings[813])
429+#endif
430+#ifndef XtCClientLeader
431+#define XtCClientLeader ((String)&XtShellStrings[826])
432+#endif
433+#ifndef XtNwindowRole
434+#define XtNwindowRole ((String)&XtShellStrings[839])
435+#endif
436+#ifndef XtCWindowRole
437+#define XtCWindowRole ((String)&XtShellStrings[850])
438+#endif
439+#ifndef XtNurgency
440+#define XtNurgency ((String)&XtShellStrings[861])
441+#endif
442+#ifndef XtCUrgency
443+#define XtCUrgency ((String)&XtShellStrings[869])
444+#endif
445+#ifndef XtNcancelCallback
446+#define XtNcancelCallback ((String)&XtShellStrings[877])
447+#endif
448+#ifndef XtNcloneCommand
449+#define XtNcloneCommand ((String)&XtShellStrings[892])
450+#endif
451+#ifndef XtCCloneCommand
452+#define XtCCloneCommand ((String)&XtShellStrings[905])
453+#endif
454+#ifndef XtNconnection
455+#define XtNconnection ((String)&XtShellStrings[918])
456+#endif
457+#ifndef XtCConnection
458+#define XtCConnection ((String)&XtShellStrings[929])
459+#endif
460+#ifndef XtNcurrentDirectory
461+#define XtNcurrentDirectory ((String)&XtShellStrings[940])
462+#endif
463+#ifndef XtCCurrentDirectory
464+#define XtCCurrentDirectory ((String)&XtShellStrings[957])
465+#endif
466+#ifndef XtNdieCallback
467+#define XtNdieCallback ((String)&XtShellStrings[974])
468+#endif
469+#ifndef XtNdiscardCommand
470+#define XtNdiscardCommand ((String)&XtShellStrings[986])
471+#endif
472+#ifndef XtCDiscardCommand
473+#define XtCDiscardCommand ((String)&XtShellStrings[1001])
474+#endif
475+#ifndef XtNenvironment
476+#define XtNenvironment ((String)&XtShellStrings[1016])
477+#endif
478+#ifndef XtCEnvironment
479+#define XtCEnvironment ((String)&XtShellStrings[1028])
480+#endif
481+#ifndef XtNinteractCallback
482+#define XtNinteractCallback ((String)&XtShellStrings[1040])
483+#endif
484+#ifndef XtNjoinSession
485+#define XtNjoinSession ((String)&XtShellStrings[1057])
486+#endif
487+#ifndef XtCJoinSession
488+#define XtCJoinSession ((String)&XtShellStrings[1069])
489+#endif
490+#ifndef XtNprogramPath
491+#define XtNprogramPath ((String)&XtShellStrings[1081])
492+#endif
493+#ifndef XtCProgramPath
494+#define XtCProgramPath ((String)&XtShellStrings[1093])
495+#endif
496+#ifndef XtNresignCommand
497+#define XtNresignCommand ((String)&XtShellStrings[1105])
498+#endif
499+#ifndef XtCResignCommand
500+#define XtCResignCommand ((String)&XtShellStrings[1119])
501+#endif
502+#ifndef XtNrestartCommand
503+#define XtNrestartCommand ((String)&XtShellStrings[1133])
504+#endif
505+#ifndef XtCRestartCommand
506+#define XtCRestartCommand ((String)&XtShellStrings[1148])
507+#endif
508+#ifndef XtNrestartStyle
509+#define XtNrestartStyle ((String)&XtShellStrings[1163])
510+#endif
511+#ifndef XtCRestartStyle
512+#define XtCRestartStyle ((String)&XtShellStrings[1176])
513+#endif
514+#ifndef XtNsaveCallback
515+#define XtNsaveCallback ((String)&XtShellStrings[1189])
516+#endif
517+#ifndef XtNsaveCompleteCallback
518+#define XtNsaveCompleteCallback ((String)&XtShellStrings[1202])
519+#endif
520+#ifndef XtNsessionID
521+#define XtNsessionID ((String)&XtShellStrings[1223])
522+#endif
523+#ifndef XtCSessionID
524+#define XtCSessionID ((String)&XtShellStrings[1233])
525+#endif
526+#ifndef XtNshutdownCommand
527+#define XtNshutdownCommand ((String)&XtShellStrings[1243])
528+#endif
529+#ifndef XtCShutdownCommand
530+#define XtCShutdownCommand ((String)&XtShellStrings[1259])
531+#endif
532+#ifndef XtNerrorCallback
533+#define XtNerrorCallback ((String)&XtShellStrings[1275])
534+#endif
535+#endif /* XTSTRINGDEFINES */
536+
537+#ifndef XTSTRINGDEFINES
538+#undef _XtShell_h_Const
539+#endif
540+
541+/* Class record constants */
542+
543+typedef struct _ShellClassRec *ShellWidgetClass;
544+typedef struct _OverrideShellClassRec *OverrideShellWidgetClass;
545+typedef struct _WMShellClassRec *WMShellWidgetClass;
546+typedef struct _TransientShellClassRec *TransientShellWidgetClass;
547+typedef struct _TopLevelShellClassRec *TopLevelShellWidgetClass;
548+typedef struct _ApplicationShellClassRec *ApplicationShellWidgetClass;
549+typedef struct _SessionShellClassRec *SessionShellWidgetClass;
550+
551+#ifndef SHELL
552+externalref WidgetClass shellWidgetClass;
553+externalref WidgetClass overrideShellWidgetClass;
554+externalref WidgetClass wmShellWidgetClass;
555+externalref WidgetClass transientShellWidgetClass;
556+externalref WidgetClass topLevelShellWidgetClass;
557+externalref WidgetClass applicationShellWidgetClass;
558+externalref WidgetClass sessionShellWidgetClass;
559+#endif
560+
561+#endif /* _XtShell_h */
562+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,10 @@
1+#ifndef _XtShellInternal_h
2+#define _XtShellInternal_h
3+
4+#include <X11/Xfuncproto.h>
5+
6+_XFUNCPROTOBEGIN
7+
8+extern void _XtShellGetCoordinates(Widget widget, Position *x, Position *y);
9+
10+#endif /* _XtShellInternal_h */
@@ -0,0 +1,434 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * ShellP.h - Private definitions for Shell widget
50+ *
51+ * Author: Paul Asente
52+ * Digital Equipment Corporation
53+ * Western Software Laboratory
54+ * Date: Thu Dec 3, 1987
55+ */
56+
57+#ifndef _XtShellPrivate_h
58+#define _XtShellPrivate_h
59+
60+#include <X11/Shell.h>
61+
62+/* *****
63+ * ***** VendorP.h is included later on; it needs fields defined in the first
64+ * ***** part of this header file
65+ * *****
66+ */
67+
68+_XFUNCPROTOBEGIN
69+
70+/***********************************************************************
71+ *
72+ * Shell Widget Private Data
73+ *
74+ ***********************************************************************/
75+
76+/* New fields for the Shell widget class record */
77+
78+typedef struct {
79+ XtPointer extension; /* pointer to extension record */
80+} ShellClassPart;
81+
82+typedef struct {
83+ XtPointer next_extension; /* 1st 4 mandated for all extension records */
84+ XrmQuark record_type; /* NULLQUARK; on ShellClassPart */
85+ long version; /* must be XtShellExtensionVersion */
86+ Cardinal record_size; /* sizeof(ShellClassExtensionRec) */
87+ XtGeometryHandler root_geometry_manager;
88+} ShellClassExtensionRec, *ShellClassExtension;
89+
90+#define XtShellExtensionVersion 1L
91+#define XtInheritRootGeometryManager ((XtGeometryHandler)_XtInherit)
92+
93+typedef struct _ShellClassRec {
94+ CoreClassPart core_class;
95+ CompositeClassPart composite_class;
96+ ShellClassPart shell_class;
97+} ShellClassRec;
98+
99+externalref ShellClassRec shellClassRec;
100+
101+/* New fields for the shell widget */
102+
103+typedef struct {
104+ char *geometry;
105+ XtCreatePopupChildProc create_popup_child_proc;
106+ XtGrabKind grab_kind;
107+ Boolean spring_loaded;
108+ Boolean popped_up;
109+ Boolean allow_shell_resize;
110+ Boolean client_specified; /* re-using old name */
111+#define _XtShellPositionValid ((Boolean)(1<<0))
112+#define _XtShellNotReparented ((Boolean)(1<<1))
113+#define _XtShellPPositionOK ((Boolean)(1<<2))
114+#define _XtShellGeometryParsed ((Boolean)(1<<3))
115+ Boolean save_under;
116+ Boolean override_redirect;
117+
118+ XtCallbackList popup_callback;
119+ XtCallbackList popdown_callback;
120+ Visual* visual;
121+} ShellPart;
122+
123+typedef struct {
124+ CorePart core;
125+ CompositePart composite;
126+ ShellPart shell;
127+} ShellRec, *ShellWidget;
128+
129+/***********************************************************************
130+ *
131+ * OverrideShell Widget Private Data
132+ *
133+ ***********************************************************************/
134+
135+/* New fields for the OverrideShell widget class record */
136+
137+typedef struct {
138+ XtPointer extension; /* pointer to extension record */
139+} OverrideShellClassPart;
140+
141+typedef struct _OverrideShellClassRec {
142+ CoreClassPart core_class;
143+ CompositeClassPart composite_class;
144+ ShellClassPart shell_class;
145+ OverrideShellClassPart override_shell_class;
146+} OverrideShellClassRec;
147+
148+externalref OverrideShellClassRec overrideShellClassRec;
149+
150+/* No new fields for the override shell widget */
151+
152+typedef struct {int frabjous;} OverrideShellPart;
153+
154+typedef struct {
155+ CorePart core;
156+ CompositePart composite;
157+ ShellPart shell;
158+ OverrideShellPart override;
159+} OverrideShellRec, *OverrideShellWidget;
160+
161+/***********************************************************************
162+ *
163+ * WMShell Widget Private Data
164+ *
165+ ***********************************************************************/
166+
167+/* New fields for the WMShell widget class record */
168+
169+typedef struct {
170+ XtPointer extension; /* pointer to extension record */
171+} WMShellClassPart;
172+
173+typedef struct _WMShellClassRec {
174+ CoreClassPart core_class;
175+ CompositeClassPart composite_class;
176+ ShellClassPart shell_class;
177+ WMShellClassPart wm_shell_class;
178+} WMShellClassRec;
179+
180+externalref WMShellClassRec wmShellClassRec;
181+
182+/* New fields for the WM shell widget */
183+
184+typedef struct {
185+ char *title;
186+ int wm_timeout;
187+ Boolean wait_for_wm;
188+ Boolean transient;
189+ Boolean urgency;
190+ Widget client_leader;
191+ String window_role;
192+ struct _OldXSizeHints { /* pre-R4 Xlib structure */
193+ long flags;
194+ int x, y;
195+ int width, height;
196+ int min_width, min_height;
197+ int max_width, max_height;
198+ int width_inc, height_inc;
199+ struct {
200+ int x;
201+ int y;
202+ } min_aspect, max_aspect;
203+ } size_hints;
204+ XWMHints wm_hints;
205+ int base_width, base_height;
206+ int win_gravity;
207+ Atom title_encoding;
208+} WMShellPart;
209+
210+typedef struct {
211+ CorePart core;
212+ CompositePart composite;
213+ ShellPart shell;
214+ WMShellPart wm;
215+} WMShellRec, *WMShellWidget;
216+
217+_XFUNCPROTOEND
218+
219+#include <X11/VendorP.h>
220+
221+_XFUNCPROTOBEGIN
222+
223+/***********************************************************************
224+ *
225+ * TransientShell Widget Private Data
226+ *
227+ ***********************************************************************/
228+
229+/* New fields for the TransientShell widget class record */
230+
231+typedef struct {
232+ XtPointer extension; /* pointer to extension record */
233+} TransientShellClassPart;
234+
235+typedef struct _TransientShellClassRec {
236+ CoreClassPart core_class;
237+ CompositeClassPart composite_class;
238+ ShellClassPart shell_class;
239+ WMShellClassPart wm_shell_class;
240+ VendorShellClassPart vendor_shell_class;
241+ TransientShellClassPart transient_shell_class;
242+} TransientShellClassRec;
243+
244+externalref TransientShellClassRec transientShellClassRec;
245+
246+/* New fields for the transient shell widget */
247+
248+typedef struct {
249+ Widget transient_for;
250+} TransientShellPart;
251+
252+typedef struct {
253+ CorePart core;
254+ CompositePart composite;
255+ ShellPart shell;
256+ WMShellPart wm;
257+ VendorShellPart vendor;
258+ TransientShellPart transient;
259+} TransientShellRec, *TransientShellWidget;
260+
261+/***********************************************************************
262+ *
263+ * TopLevelShell Widget Private Data
264+ *
265+ ***********************************************************************/
266+
267+/* New fields for the TopLevelShell widget class record */
268+
269+typedef struct {
270+ XtPointer extension; /* pointer to extension record */
271+} TopLevelShellClassPart;
272+
273+typedef struct _TopLevelShellClassRec {
274+ CoreClassPart core_class;
275+ CompositeClassPart composite_class;
276+ ShellClassPart shell_class;
277+ WMShellClassPart wm_shell_class;
278+ VendorShellClassPart vendor_shell_class;
279+ TopLevelShellClassPart top_level_shell_class;
280+} TopLevelShellClassRec;
281+
282+externalref TopLevelShellClassRec topLevelShellClassRec;
283+
284+/* New fields for the top level shell widget */
285+
286+typedef struct {
287+ char *icon_name;
288+ Boolean iconic;
289+ Atom icon_name_encoding;
290+} TopLevelShellPart;
291+
292+typedef struct {
293+ CorePart core;
294+ CompositePart composite;
295+ ShellPart shell;
296+ WMShellPart wm;
297+ VendorShellPart vendor;
298+ TopLevelShellPart topLevel;
299+} TopLevelShellRec, *TopLevelShellWidget;
300+
301+/***********************************************************************
302+ *
303+ * ApplicationShell Widget Private Data
304+ *
305+ ***********************************************************************/
306+
307+/* New fields for the ApplicationShell widget class record */
308+
309+typedef struct {
310+ XtPointer extension; /* pointer to extension record */
311+} ApplicationShellClassPart;
312+
313+typedef struct _ApplicationShellClassRec {
314+ CoreClassPart core_class;
315+ CompositeClassPart composite_class;
316+ ShellClassPart shell_class;
317+ WMShellClassPart wm_shell_class;
318+ VendorShellClassPart vendor_shell_class;
319+ TopLevelShellClassPart top_level_shell_class;
320+ ApplicationShellClassPart application_shell_class;
321+} ApplicationShellClassRec;
322+
323+externalref ApplicationShellClassRec applicationShellClassRec;
324+
325+/* New fields for the application shell widget */
326+
327+typedef struct {
328+#if defined(__cplusplus) || defined(c_plusplus)
329+ char *c_class;
330+#else
331+ char *class;
332+#endif
333+ XrmClass xrm_class;
334+ int argc;
335+ _XtString *argv;
336+} ApplicationShellPart;
337+
338+typedef struct {
339+ CorePart core;
340+ CompositePart composite;
341+ ShellPart shell;
342+ WMShellPart wm;
343+ VendorShellPart vendor;
344+ TopLevelShellPart topLevel;
345+ ApplicationShellPart application;
346+} ApplicationShellRec, *ApplicationShellWidget;
347+
348+/***********************************************************************
349+ *
350+ * SessionShell Widget Private Data
351+ *
352+ ***********************************************************************/
353+
354+/* New fields for the SessionShell widget class record */
355+
356+typedef struct {
357+ XtPointer extension; /* pointer to extension record */
358+} SessionShellClassPart;
359+
360+typedef struct _SessionShellClassRec {
361+ CoreClassPart core_class;
362+ CompositeClassPart composite_class;
363+ ShellClassPart shell_class;
364+ WMShellClassPart wm_shell_class;
365+ VendorShellClassPart vendor_shell_class;
366+ TopLevelShellClassPart top_level_shell_class;
367+ ApplicationShellClassPart application_shell_class;
368+ SessionShellClassPart session_shell_class;
369+} SessionShellClassRec;
370+
371+externalref SessionShellClassRec sessionShellClassRec;
372+
373+typedef struct _XtSaveYourselfRec *XtSaveYourself; /* implementation-private */
374+
375+/* New fields for the session shell widget */
376+
377+typedef struct {
378+ SmcConn connection;
379+ _XtString session_id;
380+ _XtString* restart_command;
381+ _XtString* clone_command;
382+ _XtString* discard_command;
383+ _XtString* resign_command;
384+ _XtString* shutdown_command;
385+ _XtString* environment;
386+ _XtString current_dir;
387+ String program_path;
388+ unsigned char restart_style;
389+ unsigned char checkpoint_state;
390+ Boolean join_session;
391+ XtCallbackList save_callbacks;
392+ XtCallbackList interact_callbacks;
393+ XtCallbackList cancel_callbacks;
394+ XtCallbackList save_complete_callbacks;
395+ XtCallbackList die_callbacks;
396+ XtCallbackList error_callbacks;
397+ XtSaveYourself save;
398+ XtInputId input_id;
399+ XtPointer ses20;
400+ XtPointer ses19;
401+ XtPointer ses18;
402+ XtPointer ses17;
403+ XtPointer ses16;
404+ XtPointer ses15;
405+ XtPointer ses14;
406+ XtPointer ses13;
407+ XtPointer ses12;
408+ XtPointer ses11;
409+ XtPointer ses10;
410+ XtPointer ses9;
411+ XtPointer ses8;
412+ XtPointer ses7;
413+ XtPointer ses6;
414+ XtPointer ses5;
415+ XtPointer ses4;
416+ XtPointer ses3;
417+ XtPointer ses2;
418+ XtPointer ses1;
419+} SessionShellPart;
420+
421+typedef struct {
422+ CorePart core;
423+ CompositePart composite;
424+ ShellPart shell;
425+ WMShellPart wm;
426+ VendorShellPart vendor;
427+ TopLevelShellPart topLevel;
428+ ApplicationShellPart application;
429+ SessionShellPart session;
430+} SessionShellRec, *SessionShellWidget;
431+
432+_XFUNCPROTOEND
433+
434+#endif /* _XtShellPrivate_h */
@@ -0,0 +1,1085 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtStringDefs_h_
49+#define _XtStringDefs_h_
50+
51+#ifndef XTSTRINGDEFINES
52+#define _XtStringDefs_h_Const const
53+#endif
54+
55+/* $Xorg: makestrs.c,v 1.6 2001/02/09 02:03:17 xorgcvs Exp $ */
56+/* This file is automatically generated. */
57+/* Default ABI version -- Do not edit */
58+#ifdef XTSTRINGDEFINES
59+#define XtNaccelerators "accelerators"
60+#define XtNallowHoriz "allowHoriz"
61+#define XtNallowVert "allowVert"
62+#define XtNancestorSensitive "ancestorSensitive"
63+#define XtNbackground "background"
64+#define XtNbackgroundPixmap "backgroundPixmap"
65+#define XtNbitmap "bitmap"
66+#define XtNborderColor "borderColor"
67+#define XtNborder "borderColor"
68+#define XtNborderPixmap "borderPixmap"
69+#define XtNborderWidth "borderWidth"
70+#define XtNcallback "callback"
71+#define XtNchildren "children"
72+#define XtNcolormap "colormap"
73+#define XtNdepth "depth"
74+#define XtNdestroyCallback "destroyCallback"
75+#define XtNeditType "editType"
76+#define XtNfile "file"
77+#define XtNfont "font"
78+#define XtNforceBars "forceBars"
79+#define XtNforeground "foreground"
80+#define XtNfunction "function"
81+#define XtNheight "height"
82+#define XtNhighlight "highlight"
83+#define XtNhSpace "hSpace"
84+#define XtNindex "index"
85+#define XtNinitialResourcesPersistent "initialResourcesPersistent"
86+#define XtNinnerHeight "innerHeight"
87+#define XtNinnerWidth "innerWidth"
88+#define XtNinnerWindow "innerWindow"
89+#define XtNinsertPosition "insertPosition"
90+#define XtNinternalHeight "internalHeight"
91+#define XtNinternalWidth "internalWidth"
92+#define XtNjumpProc "jumpProc"
93+#define XtNjustify "justify"
94+#define XtNknobHeight "knobHeight"
95+#define XtNknobIndent "knobIndent"
96+#define XtNknobPixel "knobPixel"
97+#define XtNknobWidth "knobWidth"
98+#define XtNlabel "label"
99+#define XtNlength "length"
100+#define XtNlowerRight "lowerRight"
101+#define XtNmappedWhenManaged "mappedWhenManaged"
102+#define XtNmenuEntry "menuEntry"
103+#define XtNname "name"
104+#define XtNnotify "notify"
105+#define XtNnumChildren "numChildren"
106+#define XtNorientation "orientation"
107+#define XtNparameter "parameter"
108+#define XtNpixmap "pixmap"
109+#define XtNpopupCallback "popupCallback"
110+#define XtNpopdownCallback "popdownCallback"
111+#define XtNresize "resize"
112+#define XtNreverseVideo "reverseVideo"
113+#define XtNscreen "screen"
114+#define XtNscrollProc "scrollProc"
115+#define XtNscrollDCursor "scrollDCursor"
116+#define XtNscrollHCursor "scrollHCursor"
117+#define XtNscrollLCursor "scrollLCursor"
118+#define XtNscrollRCursor "scrollRCursor"
119+#define XtNscrollUCursor "scrollUCursor"
120+#define XtNscrollVCursor "scrollVCursor"
121+#define XtNselection "selection"
122+#define XtNselectionArray "selectionArray"
123+#define XtNsensitive "sensitive"
124+#define XtNshown "shown"
125+#define XtNspace "space"
126+#define XtNstring "string"
127+#define XtNtextOptions "textOptions"
128+#define XtNtextSink "textSink"
129+#define XtNtextSource "textSource"
130+#define XtNthickness "thickness"
131+#define XtNthumb "thumb"
132+#define XtNthumbProc "thumbProc"
133+#define XtNtop "top"
134+#define XtNtranslations "translations"
135+#define XtNunrealizeCallback "unrealizeCallback"
136+#define XtNupdate "update"
137+#define XtNuseBottom "useBottom"
138+#define XtNuseRight "useRight"
139+#define XtNvalue "value"
140+#define XtNvSpace "vSpace"
141+#define XtNwidth "width"
142+#define XtNwindow "window"
143+#define XtNx "x"
144+#define XtNy "y"
145+#define XtCAccelerators "Accelerators"
146+#define XtCBackground "Background"
147+#define XtCBitmap "Bitmap"
148+#define XtCBoolean "Boolean"
149+#define XtCBorderColor "BorderColor"
150+#define XtCBorderWidth "BorderWidth"
151+#define XtCCallback "Callback"
152+#define XtCColormap "Colormap"
153+#define XtCColor "Color"
154+#define XtCCursor "Cursor"
155+#define XtCDepth "Depth"
156+#define XtCEditType "EditType"
157+#define XtCEventBindings "EventBindings"
158+#define XtCFile "File"
159+#define XtCFont "Font"
160+#define XtCForeground "Foreground"
161+#define XtCFraction "Fraction"
162+#define XtCFunction "Function"
163+#define XtCHeight "Height"
164+#define XtCHSpace "HSpace"
165+#define XtCIndex "Index"
166+#define XtCInitialResourcesPersistent "InitialResourcesPersistent"
167+#define XtCInsertPosition "InsertPosition"
168+#define XtCInterval "Interval"
169+#define XtCJustify "Justify"
170+#define XtCKnobIndent "KnobIndent"
171+#define XtCKnobPixel "KnobPixel"
172+#define XtCLabel "Label"
173+#define XtCLength "Length"
174+#define XtCMappedWhenManaged "MappedWhenManaged"
175+#define XtCMargin "Margin"
176+#define XtCMenuEntry "MenuEntry"
177+#define XtCNotify "Notify"
178+#define XtCOrientation "Orientation"
179+#define XtCParameter "Parameter"
180+#define XtCPixmap "Pixmap"
181+#define XtCPosition "Position"
182+#define XtCReadOnly "ReadOnly"
183+#define XtCResize "Resize"
184+#define XtCReverseVideo "ReverseVideo"
185+#define XtCScreen "Screen"
186+#define XtCScrollProc "ScrollProc"
187+#define XtCScrollDCursor "ScrollDCursor"
188+#define XtCScrollHCursor "ScrollHCursor"
189+#define XtCScrollLCursor "ScrollLCursor"
190+#define XtCScrollRCursor "ScrollRCursor"
191+#define XtCScrollUCursor "ScrollUCursor"
192+#define XtCScrollVCursor "ScrollVCursor"
193+#define XtCSelection "Selection"
194+#define XtCSensitive "Sensitive"
195+#define XtCSelectionArray "SelectionArray"
196+#define XtCSpace "Space"
197+#define XtCString "String"
198+#define XtCTextOptions "TextOptions"
199+#define XtCTextPosition "TextPosition"
200+#define XtCTextSink "TextSink"
201+#define XtCTextSource "TextSource"
202+#define XtCThickness "Thickness"
203+#define XtCThumb "Thumb"
204+#define XtCTranslations "Translations"
205+#define XtCValue "Value"
206+#define XtCVSpace "VSpace"
207+#define XtCWidth "Width"
208+#define XtCWindow "Window"
209+#define XtCX "X"
210+#define XtCY "Y"
211+#define XtRAcceleratorTable "AcceleratorTable"
212+#ifndef XtRAtom
213+#define XtRAtom "Atom"
214+#endif
215+#define XtRBitmap "Bitmap"
216+#define XtRBool "Bool"
217+#define XtRBoolean "Boolean"
218+#define XtRCallback "Callback"
219+#define XtRCallProc "CallProc"
220+#define XtRCardinal "Cardinal"
221+#define XtRColor "Color"
222+#define XtRColormap "Colormap"
223+#define XtRCursor "Cursor"
224+#define XtRDimension "Dimension"
225+#define XtRDisplay "Display"
226+#define XtREditMode "EditMode"
227+#define XtREnum "Enum"
228+#define XtRFile "File"
229+#define XtRFloat "Float"
230+#define XtRFont "Font"
231+#define XtRFontStruct "FontStruct"
232+#define XtRFunction "Function"
233+#define XtRGeometry "Geometry"
234+#define XtRImmediate "Immediate"
235+#define XtRInitialState "InitialState"
236+#define XtRInt "Int"
237+#define XtRJustify "Justify"
238+#define XtRLongBoolean "Bool"
239+#define XtRObject "Object"
240+#define XtROrientation "Orientation"
241+#define XtRPixel "Pixel"
242+#define XtRPixmap "Pixmap"
243+#define XtRPointer "Pointer"
244+#define XtRPosition "Position"
245+#define XtRScreen "Screen"
246+#define XtRShort "Short"
247+#define XtRString "String"
248+#define XtRStringArray "StringArray"
249+#define XtRStringTable "StringTable"
250+#define XtRUnsignedChar "UnsignedChar"
251+#define XtRTranslationTable "TranslationTable"
252+#define XtRVisual "Visual"
253+#define XtRWidget "Widget"
254+#define XtRWidgetClass "WidgetClass"
255+#define XtRWidgetList "WidgetList"
256+#define XtRWindow "Window"
257+#define XtEoff "off"
258+#define XtEfalse "false"
259+#define XtEno "no"
260+#define XtEon "on"
261+#define XtEtrue "true"
262+#define XtEyes "yes"
263+#define XtEvertical "vertical"
264+#define XtEhorizontal "horizontal"
265+#define XtEtextRead "read"
266+#define XtEtextAppend "append"
267+#define XtEtextEdit "edit"
268+#define XtExtdefaultbackground "xtdefaultbackground"
269+#define XtExtdefaultforeground "xtdefaultforeground"
270+#define XtExtdefaultfont "xtdefaultfont"
271+#define XtNfontSet "fontSet"
272+#define XtRFontSet "FontSet"
273+#define XtCFontSet "FontSet"
274+#define XtRGravity "Gravity"
275+#define XtNcreateHook "createHook"
276+#define XtNchangeHook "changeHook"
277+#define XtNconfigureHook "configureHook"
278+#define XtNgeometryHook "geometryHook"
279+#define XtNdestroyHook "destroyHook"
280+#define XtNshells "shells"
281+#define XtNnumShells "numShells"
282+#define XtRCommandArgArray "CommandArgArray"
283+#define XtRDirectoryString "DirectoryString"
284+#define XtREnvironmentArray "EnvironmentArray"
285+#define XtRRestartStyle "RestartStyle"
286+#define XtRSmcConn "SmcConn"
287+#define XtHcreate "Xtcreate"
288+#define XtHsetValues "XtsetValues"
289+#define XtHmanageChildren "XtmanageChildren"
290+#define XtHunmanageChildren "XtunmanageChildren"
291+#define XtHmanageSet "XtmanageSet"
292+#define XtHunmanageSet "XtunmanageSet"
293+#define XtHrealizeWidget "XtrealizeWidget"
294+#define XtHunrealizeWidget "XtunrealizeWidget"
295+#define XtHaddCallback "XtaddCallback"
296+#define XtHaddCallbacks "XtaddCallbacks"
297+#define XtHremoveCallback "XtremoveCallback"
298+#define XtHremoveCallbacks "XtremoveCallbacks"
299+#define XtHremoveAllCallbacks "XtremoveAllCallbacks"
300+#define XtHaugmentTranslations "XtaugmentTranslations"
301+#define XtHoverrideTranslations "XtoverrideTranslations"
302+#define XtHuninstallTranslations "XtuninstallTranslations"
303+#define XtHsetKeyboardFocus "XtsetKeyboardFocus"
304+#define XtHsetWMColormapWindows "XtsetWMColormapWindows"
305+#define XtHsetMappedWhenManaged "XtsetMappedWhenManaged"
306+#define XtHmapWidget "XtmapWidget"
307+#define XtHunmapWidget "XtunmapWidget"
308+#define XtHpopup "Xtpopup"
309+#define XtHpopupSpringLoaded "XtpopupSpringLoaded"
310+#define XtHpopdown "Xtpopdown"
311+#define XtHconfigure "Xtconfigure"
312+#define XtHpreGeometry "XtpreGeometry"
313+#define XtHpostGeometry "XtpostGeometry"
314+#define XtHdestroy "Xtdestroy"
315+#else
316+extern _XtStringDefs_h_Const char XtStrings[];
317+#ifndef XtNaccelerators
318+#define XtNaccelerators ((String)&XtStrings[0])
319+#endif
320+#ifndef XtNallowHoriz
321+#define XtNallowHoriz ((String)&XtStrings[13])
322+#endif
323+#ifndef XtNallowVert
324+#define XtNallowVert ((String)&XtStrings[24])
325+#endif
326+#ifndef XtNancestorSensitive
327+#define XtNancestorSensitive ((String)&XtStrings[34])
328+#endif
329+#ifndef XtNbackground
330+#define XtNbackground ((String)&XtStrings[52])
331+#endif
332+#ifndef XtNbackgroundPixmap
333+#define XtNbackgroundPixmap ((String)&XtStrings[63])
334+#endif
335+#ifndef XtNbitmap
336+#define XtNbitmap ((String)&XtStrings[80])
337+#endif
338+#ifndef XtNborderColor
339+#define XtNborderColor ((String)&XtStrings[87])
340+#endif
341+#ifndef XtNborder
342+#define XtNborder ((String)&XtStrings[99])
343+#endif
344+#ifndef XtNborderPixmap
345+#define XtNborderPixmap ((String)&XtStrings[111])
346+#endif
347+#ifndef XtNborderWidth
348+#define XtNborderWidth ((String)&XtStrings[124])
349+#endif
350+#ifndef XtNcallback
351+#define XtNcallback ((String)&XtStrings[136])
352+#endif
353+#ifndef XtNchildren
354+#define XtNchildren ((String)&XtStrings[145])
355+#endif
356+#ifndef XtNcolormap
357+#define XtNcolormap ((String)&XtStrings[154])
358+#endif
359+#ifndef XtNdepth
360+#define XtNdepth ((String)&XtStrings[163])
361+#endif
362+#ifndef XtNdestroyCallback
363+#define XtNdestroyCallback ((String)&XtStrings[169])
364+#endif
365+#ifndef XtNeditType
366+#define XtNeditType ((String)&XtStrings[185])
367+#endif
368+#ifndef XtNfile
369+#define XtNfile ((String)&XtStrings[194])
370+#endif
371+#ifndef XtNfont
372+#define XtNfont ((String)&XtStrings[199])
373+#endif
374+#ifndef XtNforceBars
375+#define XtNforceBars ((String)&XtStrings[204])
376+#endif
377+#ifndef XtNforeground
378+#define XtNforeground ((String)&XtStrings[214])
379+#endif
380+#ifndef XtNfunction
381+#define XtNfunction ((String)&XtStrings[225])
382+#endif
383+#ifndef XtNheight
384+#define XtNheight ((String)&XtStrings[234])
385+#endif
386+#ifndef XtNhighlight
387+#define XtNhighlight ((String)&XtStrings[241])
388+#endif
389+#ifndef XtNhSpace
390+#define XtNhSpace ((String)&XtStrings[251])
391+#endif
392+#ifndef XtNindex
393+#define XtNindex ((String)&XtStrings[258])
394+#endif
395+#ifndef XtNinitialResourcesPersistent
396+#define XtNinitialResourcesPersistent ((String)&XtStrings[264])
397+#endif
398+#ifndef XtNinnerHeight
399+#define XtNinnerHeight ((String)&XtStrings[291])
400+#endif
401+#ifndef XtNinnerWidth
402+#define XtNinnerWidth ((String)&XtStrings[303])
403+#endif
404+#ifndef XtNinnerWindow
405+#define XtNinnerWindow ((String)&XtStrings[314])
406+#endif
407+#ifndef XtNinsertPosition
408+#define XtNinsertPosition ((String)&XtStrings[326])
409+#endif
410+#ifndef XtNinternalHeight
411+#define XtNinternalHeight ((String)&XtStrings[341])
412+#endif
413+#ifndef XtNinternalWidth
414+#define XtNinternalWidth ((String)&XtStrings[356])
415+#endif
416+#ifndef XtNjumpProc
417+#define XtNjumpProc ((String)&XtStrings[370])
418+#endif
419+#ifndef XtNjustify
420+#define XtNjustify ((String)&XtStrings[379])
421+#endif
422+#ifndef XtNknobHeight
423+#define XtNknobHeight ((String)&XtStrings[387])
424+#endif
425+#ifndef XtNknobIndent
426+#define XtNknobIndent ((String)&XtStrings[398])
427+#endif
428+#ifndef XtNknobPixel
429+#define XtNknobPixel ((String)&XtStrings[409])
430+#endif
431+#ifndef XtNknobWidth
432+#define XtNknobWidth ((String)&XtStrings[419])
433+#endif
434+#ifndef XtNlabel
435+#define XtNlabel ((String)&XtStrings[429])
436+#endif
437+#ifndef XtNlength
438+#define XtNlength ((String)&XtStrings[435])
439+#endif
440+#ifndef XtNlowerRight
441+#define XtNlowerRight ((String)&XtStrings[442])
442+#endif
443+#ifndef XtNmappedWhenManaged
444+#define XtNmappedWhenManaged ((String)&XtStrings[453])
445+#endif
446+#ifndef XtNmenuEntry
447+#define XtNmenuEntry ((String)&XtStrings[471])
448+#endif
449+#ifndef XtNname
450+#define XtNname ((String)&XtStrings[481])
451+#endif
452+#ifndef XtNnotify
453+#define XtNnotify ((String)&XtStrings[486])
454+#endif
455+#ifndef XtNnumChildren
456+#define XtNnumChildren ((String)&XtStrings[493])
457+#endif
458+#ifndef XtNorientation
459+#define XtNorientation ((String)&XtStrings[505])
460+#endif
461+#ifndef XtNparameter
462+#define XtNparameter ((String)&XtStrings[517])
463+#endif
464+#ifndef XtNpixmap
465+#define XtNpixmap ((String)&XtStrings[527])
466+#endif
467+#ifndef XtNpopupCallback
468+#define XtNpopupCallback ((String)&XtStrings[534])
469+#endif
470+#ifndef XtNpopdownCallback
471+#define XtNpopdownCallback ((String)&XtStrings[548])
472+#endif
473+#ifndef XtNresize
474+#define XtNresize ((String)&XtStrings[564])
475+#endif
476+#ifndef XtNreverseVideo
477+#define XtNreverseVideo ((String)&XtStrings[571])
478+#endif
479+#ifndef XtNscreen
480+#define XtNscreen ((String)&XtStrings[584])
481+#endif
482+#ifndef XtNscrollProc
483+#define XtNscrollProc ((String)&XtStrings[591])
484+#endif
485+#ifndef XtNscrollDCursor
486+#define XtNscrollDCursor ((String)&XtStrings[602])
487+#endif
488+#ifndef XtNscrollHCursor
489+#define XtNscrollHCursor ((String)&XtStrings[616])
490+#endif
491+#ifndef XtNscrollLCursor
492+#define XtNscrollLCursor ((String)&XtStrings[630])
493+#endif
494+#ifndef XtNscrollRCursor
495+#define XtNscrollRCursor ((String)&XtStrings[644])
496+#endif
497+#ifndef XtNscrollUCursor
498+#define XtNscrollUCursor ((String)&XtStrings[658])
499+#endif
500+#ifndef XtNscrollVCursor
501+#define XtNscrollVCursor ((String)&XtStrings[672])
502+#endif
503+#ifndef XtNselection
504+#define XtNselection ((String)&XtStrings[686])
505+#endif
506+#ifndef XtNselectionArray
507+#define XtNselectionArray ((String)&XtStrings[696])
508+#endif
509+#ifndef XtNsensitive
510+#define XtNsensitive ((String)&XtStrings[711])
511+#endif
512+#ifndef XtNshown
513+#define XtNshown ((String)&XtStrings[721])
514+#endif
515+#ifndef XtNspace
516+#define XtNspace ((String)&XtStrings[727])
517+#endif
518+#ifndef XtNstring
519+#define XtNstring ((String)&XtStrings[733])
520+#endif
521+#ifndef XtNtextOptions
522+#define XtNtextOptions ((String)&XtStrings[740])
523+#endif
524+#ifndef XtNtextSink
525+#define XtNtextSink ((String)&XtStrings[752])
526+#endif
527+#ifndef XtNtextSource
528+#define XtNtextSource ((String)&XtStrings[761])
529+#endif
530+#ifndef XtNthickness
531+#define XtNthickness ((String)&XtStrings[772])
532+#endif
533+#ifndef XtNthumb
534+#define XtNthumb ((String)&XtStrings[782])
535+#endif
536+#ifndef XtNthumbProc
537+#define XtNthumbProc ((String)&XtStrings[788])
538+#endif
539+#ifndef XtNtop
540+#define XtNtop ((String)&XtStrings[798])
541+#endif
542+#ifndef XtNtranslations
543+#define XtNtranslations ((String)&XtStrings[802])
544+#endif
545+#ifndef XtNunrealizeCallback
546+#define XtNunrealizeCallback ((String)&XtStrings[815])
547+#endif
548+#ifndef XtNupdate
549+#define XtNupdate ((String)&XtStrings[833])
550+#endif
551+#ifndef XtNuseBottom
552+#define XtNuseBottom ((String)&XtStrings[840])
553+#endif
554+#ifndef XtNuseRight
555+#define XtNuseRight ((String)&XtStrings[850])
556+#endif
557+#ifndef XtNvalue
558+#define XtNvalue ((String)&XtStrings[859])
559+#endif
560+#ifndef XtNvSpace
561+#define XtNvSpace ((String)&XtStrings[865])
562+#endif
563+#ifndef XtNwidth
564+#define XtNwidth ((String)&XtStrings[872])
565+#endif
566+#ifndef XtNwindow
567+#define XtNwindow ((String)&XtStrings[878])
568+#endif
569+#ifndef XtNx
570+#define XtNx ((String)&XtStrings[885])
571+#endif
572+#ifndef XtNy
573+#define XtNy ((String)&XtStrings[887])
574+#endif
575+#ifndef XtCAccelerators
576+#define XtCAccelerators ((String)&XtStrings[889])
577+#endif
578+#ifndef XtCBackground
579+#define XtCBackground ((String)&XtStrings[902])
580+#endif
581+#ifndef XtCBitmap
582+#define XtCBitmap ((String)&XtStrings[913])
583+#endif
584+#ifndef XtCBoolean
585+#define XtCBoolean ((String)&XtStrings[920])
586+#endif
587+#ifndef XtCBorderColor
588+#define XtCBorderColor ((String)&XtStrings[928])
589+#endif
590+#ifndef XtCBorderWidth
591+#define XtCBorderWidth ((String)&XtStrings[940])
592+#endif
593+#ifndef XtCCallback
594+#define XtCCallback ((String)&XtStrings[952])
595+#endif
596+#ifndef XtCColormap
597+#define XtCColormap ((String)&XtStrings[961])
598+#endif
599+#ifndef XtCColor
600+#define XtCColor ((String)&XtStrings[970])
601+#endif
602+#ifndef XtCCursor
603+#define XtCCursor ((String)&XtStrings[976])
604+#endif
605+#ifndef XtCDepth
606+#define XtCDepth ((String)&XtStrings[983])
607+#endif
608+#ifndef XtCEditType
609+#define XtCEditType ((String)&XtStrings[989])
610+#endif
611+#ifndef XtCEventBindings
612+#define XtCEventBindings ((String)&XtStrings[998])
613+#endif
614+#ifndef XtCFile
615+#define XtCFile ((String)&XtStrings[1012])
616+#endif
617+#ifndef XtCFont
618+#define XtCFont ((String)&XtStrings[1017])
619+#endif
620+#ifndef XtCForeground
621+#define XtCForeground ((String)&XtStrings[1022])
622+#endif
623+#ifndef XtCFraction
624+#define XtCFraction ((String)&XtStrings[1033])
625+#endif
626+#ifndef XtCFunction
627+#define XtCFunction ((String)&XtStrings[1042])
628+#endif
629+#ifndef XtCHeight
630+#define XtCHeight ((String)&XtStrings[1051])
631+#endif
632+#ifndef XtCHSpace
633+#define XtCHSpace ((String)&XtStrings[1058])
634+#endif
635+#ifndef XtCIndex
636+#define XtCIndex ((String)&XtStrings[1065])
637+#endif
638+#ifndef XtCInitialResourcesPersistent
639+#define XtCInitialResourcesPersistent ((String)&XtStrings[1071])
640+#endif
641+#ifndef XtCInsertPosition
642+#define XtCInsertPosition ((String)&XtStrings[1098])
643+#endif
644+#ifndef XtCInterval
645+#define XtCInterval ((String)&XtStrings[1113])
646+#endif
647+#ifndef XtCJustify
648+#define XtCJustify ((String)&XtStrings[1122])
649+#endif
650+#ifndef XtCKnobIndent
651+#define XtCKnobIndent ((String)&XtStrings[1130])
652+#endif
653+#ifndef XtCKnobPixel
654+#define XtCKnobPixel ((String)&XtStrings[1141])
655+#endif
656+#ifndef XtCLabel
657+#define XtCLabel ((String)&XtStrings[1151])
658+#endif
659+#ifndef XtCLength
660+#define XtCLength ((String)&XtStrings[1157])
661+#endif
662+#ifndef XtCMappedWhenManaged
663+#define XtCMappedWhenManaged ((String)&XtStrings[1164])
664+#endif
665+#ifndef XtCMargin
666+#define XtCMargin ((String)&XtStrings[1182])
667+#endif
668+#ifndef XtCMenuEntry
669+#define XtCMenuEntry ((String)&XtStrings[1189])
670+#endif
671+#ifndef XtCNotify
672+#define XtCNotify ((String)&XtStrings[1199])
673+#endif
674+#ifndef XtCOrientation
675+#define XtCOrientation ((String)&XtStrings[1206])
676+#endif
677+#ifndef XtCParameter
678+#define XtCParameter ((String)&XtStrings[1218])
679+#endif
680+#ifndef XtCPixmap
681+#define XtCPixmap ((String)&XtStrings[1228])
682+#endif
683+#ifndef XtCPosition
684+#define XtCPosition ((String)&XtStrings[1235])
685+#endif
686+#ifndef XtCReadOnly
687+#define XtCReadOnly ((String)&XtStrings[1244])
688+#endif
689+#ifndef XtCResize
690+#define XtCResize ((String)&XtStrings[1253])
691+#endif
692+#ifndef XtCReverseVideo
693+#define XtCReverseVideo ((String)&XtStrings[1260])
694+#endif
695+#ifndef XtCScreen
696+#define XtCScreen ((String)&XtStrings[1273])
697+#endif
698+#ifndef XtCScrollProc
699+#define XtCScrollProc ((String)&XtStrings[1280])
700+#endif
701+#ifndef XtCScrollDCursor
702+#define XtCScrollDCursor ((String)&XtStrings[1291])
703+#endif
704+#ifndef XtCScrollHCursor
705+#define XtCScrollHCursor ((String)&XtStrings[1305])
706+#endif
707+#ifndef XtCScrollLCursor
708+#define XtCScrollLCursor ((String)&XtStrings[1319])
709+#endif
710+#ifndef XtCScrollRCursor
711+#define XtCScrollRCursor ((String)&XtStrings[1333])
712+#endif
713+#ifndef XtCScrollUCursor
714+#define XtCScrollUCursor ((String)&XtStrings[1347])
715+#endif
716+#ifndef XtCScrollVCursor
717+#define XtCScrollVCursor ((String)&XtStrings[1361])
718+#endif
719+#ifndef XtCSelection
720+#define XtCSelection ((String)&XtStrings[1375])
721+#endif
722+#ifndef XtCSensitive
723+#define XtCSensitive ((String)&XtStrings[1385])
724+#endif
725+#ifndef XtCSelectionArray
726+#define XtCSelectionArray ((String)&XtStrings[1395])
727+#endif
728+#ifndef XtCSpace
729+#define XtCSpace ((String)&XtStrings[1410])
730+#endif
731+#ifndef XtCString
732+#define XtCString ((String)&XtStrings[1416])
733+#endif
734+#ifndef XtCTextOptions
735+#define XtCTextOptions ((String)&XtStrings[1423])
736+#endif
737+#ifndef XtCTextPosition
738+#define XtCTextPosition ((String)&XtStrings[1435])
739+#endif
740+#ifndef XtCTextSink
741+#define XtCTextSink ((String)&XtStrings[1448])
742+#endif
743+#ifndef XtCTextSource
744+#define XtCTextSource ((String)&XtStrings[1457])
745+#endif
746+#ifndef XtCThickness
747+#define XtCThickness ((String)&XtStrings[1468])
748+#endif
749+#ifndef XtCThumb
750+#define XtCThumb ((String)&XtStrings[1478])
751+#endif
752+#ifndef XtCTranslations
753+#define XtCTranslations ((String)&XtStrings[1484])
754+#endif
755+#ifndef XtCValue
756+#define XtCValue ((String)&XtStrings[1497])
757+#endif
758+#ifndef XtCVSpace
759+#define XtCVSpace ((String)&XtStrings[1503])
760+#endif
761+#ifndef XtCWidth
762+#define XtCWidth ((String)&XtStrings[1510])
763+#endif
764+#ifndef XtCWindow
765+#define XtCWindow ((String)&XtStrings[1516])
766+#endif
767+#ifndef XtCX
768+#define XtCX ((String)&XtStrings[1523])
769+#endif
770+#ifndef XtCY
771+#define XtCY ((String)&XtStrings[1525])
772+#endif
773+#ifndef XtRAcceleratorTable
774+#define XtRAcceleratorTable ((String)&XtStrings[1527])
775+#endif
776+#ifndef XtRAtom
777+#define XtRAtom ((String)&XtStrings[1544])
778+#endif
779+#ifndef XtRBitmap
780+#define XtRBitmap ((String)&XtStrings[1549])
781+#endif
782+#ifndef XtRBool
783+#define XtRBool ((String)&XtStrings[1556])
784+#endif
785+#ifndef XtRBoolean
786+#define XtRBoolean ((String)&XtStrings[1561])
787+#endif
788+#ifndef XtRCallback
789+#define XtRCallback ((String)&XtStrings[1569])
790+#endif
791+#ifndef XtRCallProc
792+#define XtRCallProc ((String)&XtStrings[1578])
793+#endif
794+#ifndef XtRCardinal
795+#define XtRCardinal ((String)&XtStrings[1587])
796+#endif
797+#ifndef XtRColor
798+#define XtRColor ((String)&XtStrings[1596])
799+#endif
800+#ifndef XtRColormap
801+#define XtRColormap ((String)&XtStrings[1602])
802+#endif
803+#ifndef XtRCursor
804+#define XtRCursor ((String)&XtStrings[1611])
805+#endif
806+#ifndef XtRDimension
807+#define XtRDimension ((String)&XtStrings[1618])
808+#endif
809+#ifndef XtRDisplay
810+#define XtRDisplay ((String)&XtStrings[1628])
811+#endif
812+#ifndef XtREditMode
813+#define XtREditMode ((String)&XtStrings[1636])
814+#endif
815+#ifndef XtREnum
816+#define XtREnum ((String)&XtStrings[1645])
817+#endif
818+#ifndef XtRFile
819+#define XtRFile ((String)&XtStrings[1650])
820+#endif
821+#ifndef XtRFloat
822+#define XtRFloat ((String)&XtStrings[1655])
823+#endif
824+#ifndef XtRFont
825+#define XtRFont ((String)&XtStrings[1661])
826+#endif
827+#ifndef XtRFontStruct
828+#define XtRFontStruct ((String)&XtStrings[1666])
829+#endif
830+#ifndef XtRFunction
831+#define XtRFunction ((String)&XtStrings[1677])
832+#endif
833+#ifndef XtRGeometry
834+#define XtRGeometry ((String)&XtStrings[1686])
835+#endif
836+#ifndef XtRImmediate
837+#define XtRImmediate ((String)&XtStrings[1695])
838+#endif
839+#ifndef XtRInitialState
840+#define XtRInitialState ((String)&XtStrings[1705])
841+#endif
842+#ifndef XtRInt
843+#define XtRInt ((String)&XtStrings[1718])
844+#endif
845+#ifndef XtRJustify
846+#define XtRJustify ((String)&XtStrings[1722])
847+#endif
848+#ifndef XtRLongBoolean
849+#define XtRLongBoolean ((String)&XtStrings[1730])
850+#endif
851+#ifndef XtRObject
852+#define XtRObject ((String)&XtStrings[1735])
853+#endif
854+#ifndef XtROrientation
855+#define XtROrientation ((String)&XtStrings[1742])
856+#endif
857+#ifndef XtRPixel
858+#define XtRPixel ((String)&XtStrings[1754])
859+#endif
860+#ifndef XtRPixmap
861+#define XtRPixmap ((String)&XtStrings[1760])
862+#endif
863+#ifndef XtRPointer
864+#define XtRPointer ((String)&XtStrings[1767])
865+#endif
866+#ifndef XtRPosition
867+#define XtRPosition ((String)&XtStrings[1775])
868+#endif
869+#ifndef XtRScreen
870+#define XtRScreen ((String)&XtStrings[1784])
871+#endif
872+#ifndef XtRShort
873+#define XtRShort ((String)&XtStrings[1791])
874+#endif
875+#ifndef XtRString
876+#define XtRString ((String)&XtStrings[1797])
877+#endif
878+#ifndef XtRStringArray
879+#define XtRStringArray ((String)&XtStrings[1804])
880+#endif
881+#ifndef XtRStringTable
882+#define XtRStringTable ((String)&XtStrings[1816])
883+#endif
884+#ifndef XtRUnsignedChar
885+#define XtRUnsignedChar ((String)&XtStrings[1828])
886+#endif
887+#ifndef XtRTranslationTable
888+#define XtRTranslationTable ((String)&XtStrings[1841])
889+#endif
890+#ifndef XtRVisual
891+#define XtRVisual ((String)&XtStrings[1858])
892+#endif
893+#ifndef XtRWidget
894+#define XtRWidget ((String)&XtStrings[1865])
895+#endif
896+#ifndef XtRWidgetClass
897+#define XtRWidgetClass ((String)&XtStrings[1872])
898+#endif
899+#ifndef XtRWidgetList
900+#define XtRWidgetList ((String)&XtStrings[1884])
901+#endif
902+#ifndef XtRWindow
903+#define XtRWindow ((String)&XtStrings[1895])
904+#endif
905+#ifndef XtEoff
906+#define XtEoff ((String)&XtStrings[1902])
907+#endif
908+#ifndef XtEfalse
909+#define XtEfalse ((String)&XtStrings[1906])
910+#endif
911+#ifndef XtEno
912+#define XtEno ((String)&XtStrings[1912])
913+#endif
914+#ifndef XtEon
915+#define XtEon ((String)&XtStrings[1915])
916+#endif
917+#ifndef XtEtrue
918+#define XtEtrue ((String)&XtStrings[1918])
919+#endif
920+#ifndef XtEyes
921+#define XtEyes ((String)&XtStrings[1923])
922+#endif
923+#ifndef XtEvertical
924+#define XtEvertical ((String)&XtStrings[1927])
925+#endif
926+#ifndef XtEhorizontal
927+#define XtEhorizontal ((String)&XtStrings[1936])
928+#endif
929+#ifndef XtEtextRead
930+#define XtEtextRead ((String)&XtStrings[1947])
931+#endif
932+#ifndef XtEtextAppend
933+#define XtEtextAppend ((String)&XtStrings[1952])
934+#endif
935+#ifndef XtEtextEdit
936+#define XtEtextEdit ((String)&XtStrings[1959])
937+#endif
938+#ifndef XtExtdefaultbackground
939+#define XtExtdefaultbackground ((String)&XtStrings[1964])
940+#endif
941+#ifndef XtExtdefaultforeground
942+#define XtExtdefaultforeground ((String)&XtStrings[1984])
943+#endif
944+#ifndef XtExtdefaultfont
945+#define XtExtdefaultfont ((String)&XtStrings[2004])
946+#endif
947+#ifndef XtNfontSet
948+#define XtNfontSet ((String)&XtStrings[2018])
949+#endif
950+#ifndef XtRFontSet
951+#define XtRFontSet ((String)&XtStrings[2026])
952+#endif
953+#ifndef XtCFontSet
954+#define XtCFontSet ((String)&XtStrings[2034])
955+#endif
956+#ifndef XtRGravity
957+#define XtRGravity ((String)&XtStrings[2042])
958+#endif
959+#ifndef XtNcreateHook
960+#define XtNcreateHook ((String)&XtStrings[2050])
961+#endif
962+#ifndef XtNchangeHook
963+#define XtNchangeHook ((String)&XtStrings[2061])
964+#endif
965+#ifndef XtNconfigureHook
966+#define XtNconfigureHook ((String)&XtStrings[2072])
967+#endif
968+#ifndef XtNgeometryHook
969+#define XtNgeometryHook ((String)&XtStrings[2086])
970+#endif
971+#ifndef XtNdestroyHook
972+#define XtNdestroyHook ((String)&XtStrings[2099])
973+#endif
974+#ifndef XtNshells
975+#define XtNshells ((String)&XtStrings[2111])
976+#endif
977+#ifndef XtNnumShells
978+#define XtNnumShells ((String)&XtStrings[2118])
979+#endif
980+#ifndef XtRCommandArgArray
981+#define XtRCommandArgArray ((String)&XtStrings[2128])
982+#endif
983+#ifndef XtRDirectoryString
984+#define XtRDirectoryString ((String)&XtStrings[2144])
985+#endif
986+#ifndef XtREnvironmentArray
987+#define XtREnvironmentArray ((String)&XtStrings[2160])
988+#endif
989+#ifndef XtRRestartStyle
990+#define XtRRestartStyle ((String)&XtStrings[2177])
991+#endif
992+#ifndef XtRSmcConn
993+#define XtRSmcConn ((String)&XtStrings[2190])
994+#endif
995+#ifndef XtHcreate
996+#define XtHcreate ((String)&XtStrings[2198])
997+#endif
998+#ifndef XtHsetValues
999+#define XtHsetValues ((String)&XtStrings[2207])
1000+#endif
1001+#ifndef XtHmanageChildren
1002+#define XtHmanageChildren ((String)&XtStrings[2219])
1003+#endif
1004+#ifndef XtHunmanageChildren
1005+#define XtHunmanageChildren ((String)&XtStrings[2236])
1006+#endif
1007+#ifndef XtHmanageSet
1008+#define XtHmanageSet ((String)&XtStrings[2255])
1009+#endif
1010+#ifndef XtHunmanageSet
1011+#define XtHunmanageSet ((String)&XtStrings[2267])
1012+#endif
1013+#ifndef XtHrealizeWidget
1014+#define XtHrealizeWidget ((String)&XtStrings[2281])
1015+#endif
1016+#ifndef XtHunrealizeWidget
1017+#define XtHunrealizeWidget ((String)&XtStrings[2297])
1018+#endif
1019+#ifndef XtHaddCallback
1020+#define XtHaddCallback ((String)&XtStrings[2315])
1021+#endif
1022+#ifndef XtHaddCallbacks
1023+#define XtHaddCallbacks ((String)&XtStrings[2329])
1024+#endif
1025+#ifndef XtHremoveCallback
1026+#define XtHremoveCallback ((String)&XtStrings[2344])
1027+#endif
1028+#ifndef XtHremoveCallbacks
1029+#define XtHremoveCallbacks ((String)&XtStrings[2361])
1030+#endif
1031+#ifndef XtHremoveAllCallbacks
1032+#define XtHremoveAllCallbacks ((String)&XtStrings[2379])
1033+#endif
1034+#ifndef XtHaugmentTranslations
1035+#define XtHaugmentTranslations ((String)&XtStrings[2400])
1036+#endif
1037+#ifndef XtHoverrideTranslations
1038+#define XtHoverrideTranslations ((String)&XtStrings[2422])
1039+#endif
1040+#ifndef XtHuninstallTranslations
1041+#define XtHuninstallTranslations ((String)&XtStrings[2445])
1042+#endif
1043+#ifndef XtHsetKeyboardFocus
1044+#define XtHsetKeyboardFocus ((String)&XtStrings[2469])
1045+#endif
1046+#ifndef XtHsetWMColormapWindows
1047+#define XtHsetWMColormapWindows ((String)&XtStrings[2488])
1048+#endif
1049+#ifndef XtHsetMappedWhenManaged
1050+#define XtHsetMappedWhenManaged ((String)&XtStrings[2511])
1051+#endif
1052+#ifndef XtHmapWidget
1053+#define XtHmapWidget ((String)&XtStrings[2534])
1054+#endif
1055+#ifndef XtHunmapWidget
1056+#define XtHunmapWidget ((String)&XtStrings[2546])
1057+#endif
1058+#ifndef XtHpopup
1059+#define XtHpopup ((String)&XtStrings[2560])
1060+#endif
1061+#ifndef XtHpopupSpringLoaded
1062+#define XtHpopupSpringLoaded ((String)&XtStrings[2568])
1063+#endif
1064+#ifndef XtHpopdown
1065+#define XtHpopdown ((String)&XtStrings[2588])
1066+#endif
1067+#ifndef XtHconfigure
1068+#define XtHconfigure ((String)&XtStrings[2598])
1069+#endif
1070+#ifndef XtHpreGeometry
1071+#define XtHpreGeometry ((String)&XtStrings[2610])
1072+#endif
1073+#ifndef XtHpostGeometry
1074+#define XtHpostGeometry ((String)&XtStrings[2624])
1075+#endif
1076+#ifndef XtHdestroy
1077+#define XtHdestroy ((String)&XtStrings[2639])
1078+#endif
1079+#endif /* XTSTRINGDEFINES */
1080+
1081+#ifndef XTSTRINGDEFINES
1082+#undef _XtStringDefs_h_Const
1083+#endif
1084+
1085+#endif /* _XtStringDefs_h_ */
@@ -0,0 +1,106 @@
1+/*
2+ * Copyright (c) 1991, Oracle and/or its affiliates.
3+ *
4+ * Permission is hereby granted, free of charge, to any person obtaining a
5+ * copy of this software and associated documentation files (the "Software"),
6+ * to deal in the Software without restriction, including without limitation
7+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+ * and/or sell copies of the Software, and to permit persons to whom the
9+ * Software is furnished to do so, subject to the following conditions:
10+ *
11+ * The above copyright notice and this permission notice (including the next
12+ * paragraph) shall be included in all copies or substantial portions of the
13+ * Software.
14+ *
15+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21+ * DEALINGS IN THE SOFTWARE.
22+ */
23+/************************************************************
24+
25+Copyright 1991, 1998 The Open Group
26+
27+Permission to use, copy, modify, distribute, and sell this software and its
28+documentation for any purpose is hereby granted without fee, provided that
29+the above copyright notice appear in all copies and that both that
30+copyright notice and this permission notice appear in supporting
31+documentation.
32+
33+The above copyright notice and this permission notice shall be included in
34+all copies or substantial portions of the Software.
35+
36+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
40+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
41+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
42+
43+Except as contained in this notice, the name of The Open Group shall not be
44+used in advertising or otherwise to promote the sale, use or other dealings
45+in this Software without prior written authorization from The Open Group.
46+
47+***********************************************************/
48+
49+/*
50+ * Floating Accent
51+ */
52+
53+#define SunXK_FA_Grave 0x1005ff00
54+#define SunXK_FA_Circum 0x1005ff01
55+#define SunXK_FA_Tilde 0x1005ff02
56+#define SunXK_FA_Acute 0x1005ff03
57+#define SunXK_FA_Diaeresis 0x1005ff04
58+#define SunXK_FA_Cedilla 0x1005ff05
59+
60+/*
61+ * Miscellaneous Functions
62+ */
63+
64+#define SunXK_F36 0x1005ff10 /* Labeled F11 */
65+#define SunXK_F37 0x1005ff11 /* Labeled F12 */
66+
67+#define SunXK_Sys_Req 0x1005ff60
68+#define SunXK_Print_Screen 0x0000ff61 /* Same as XK_Print */
69+
70+/*
71+ * International & Multi-Key Character Composition
72+ */
73+
74+#define SunXK_Compose 0x0000ff20 /* Same as XK_Multi_key */
75+#define SunXK_AltGraph 0x0000ff7e /* Same as XK_Mode_switch */
76+
77+/*
78+ * Cursor Control
79+ */
80+
81+#define SunXK_PageUp 0x0000ff55 /* Same as XK_Prior */
82+#define SunXK_PageDown 0x0000ff56 /* Same as XK_Next */
83+
84+/*
85+ * Open Look Functions
86+ */
87+
88+#define SunXK_Undo 0x0000ff65 /* Same as XK_Undo */
89+#define SunXK_Again 0x0000ff66 /* Same as XK_Redo */
90+#define SunXK_Find 0x0000ff68 /* Same as XK_Find */
91+#define SunXK_Stop 0x0000ff69 /* Same as XK_Cancel */
92+#define SunXK_Props 0x1005ff70
93+#define SunXK_Front 0x1005ff71
94+#define SunXK_Copy 0x1005ff72
95+#define SunXK_Open 0x1005ff73
96+#define SunXK_Paste 0x1005ff74
97+#define SunXK_Cut 0x1005ff75
98+
99+#define SunXK_PowerSwitch 0x1005ff76
100+#define SunXK_AudioLowerVolume 0x1005ff77
101+#define SunXK_AudioMute 0x1005ff78
102+#define SunXK_AudioRaiseVolume 0x1005ff79
103+#define SunXK_VideoDegauss 0x1005ff7a
104+#define SunXK_VideoLowerBrightness 0x1005ff7b
105+#define SunXK_VideoRaiseBrightness 0x1005ff7c
106+#define SunXK_PowerSwitchShift 0x1005ff7d
@@ -0,0 +1,129 @@
1+/************************************************************
2+
3+Copyright (c) 1993, Oracle and/or its affiliates.
4+
5+Permission is hereby granted, free of charge, to any person obtaining a
6+copy of this software and associated documentation files (the "Software"),
7+to deal in the Software without restriction, including without limitation
8+the rights to use, copy, modify, merge, publish, distribute, sublicense,
9+and/or sell copies of the Software, and to permit persons to whom the
10+Software is furnished to do so, subject to the following conditions:
11+
12+The above copyright notice and this permission notice (including the next
13+paragraph) shall be included in all copies or substantial portions of the
14+Software.
15+
16+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22+DEALINGS IN THE SOFTWARE.
23+
24+********************************************************/
25+
26+/*
27+
28+Copyright 1994, 1998 The Open Group
29+
30+Permission to use, copy, modify, distribute, and sell this software and its
31+documentation for any purpose is hereby granted without fee, provided that
32+the above copyright notice appear in all copies and that both that
33+copyright notice and this permission notice appear in supporting
34+documentation.
35+
36+The above copyright notice and this permission notice shall be included in
37+all copies or substantial portions of the Software.
38+
39+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
43+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
44+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45+
46+Except as contained in this notice, the name of The Open Group shall not be
47+used in advertising or otherwise to promote the sale, use or other dealings
48+in this Software without prior written authorization from The Open Group.
49+
50+*/
51+/* $XFree86: xc/lib/Xt/ThreadsI.h,v 3.5 2001/12/14 19:56:31 dawes Exp $ */
52+
53+#ifndef _XtThreadsI_h
54+#define _XtThreadsI_h
55+
56+#include <X11/XlibConf.h>
57+
58+#ifdef XTHREADS
59+
60+typedef struct _LockRec *LockPtr;
61+
62+typedef void (*ThreadAppProc)(
63+ XtAppContext /* app */
64+);
65+
66+typedef void (*ThreadAppYieldLockProc)(
67+ XtAppContext, /* app */
68+ Boolean*, /* push_thread */
69+ Boolean*, /* pushed_thread */
70+ int* /* level */
71+);
72+
73+typedef void (*ThreadAppRestoreLockProc)(
74+ XtAppContext /* app */,
75+ int, /* level */
76+ Boolean* /* pushed_thread */
77+);
78+
79+_XFUNCPROTOBEGIN
80+
81+extern void (*_XtProcessLock)(
82+ void
83+);
84+
85+extern void (*_XtProcessUnlock)(
86+ void
87+);
88+
89+extern void (*_XtInitAppLock)(
90+ XtAppContext /* app */
91+);
92+
93+_XFUNCPROTOEND
94+
95+#define INIT_APP_LOCK(app) if(_XtInitAppLock) (*_XtInitAppLock)(app)
96+#define FREE_APP_LOCK(app) if(app && app->free_lock)(*app->free_lock)(app)
97+
98+#define LOCK_PROCESS if(_XtProcessLock)(*_XtProcessLock)()
99+#define UNLOCK_PROCESS if(_XtProcessUnlock)(*_XtProcessUnlock)()
100+#define LOCK_APP(app) if(app && app->lock)(*app->lock)(app)
101+#define UNLOCK_APP(app) if(app && app->unlock)(*app->unlock)(app)
102+
103+#define YIELD_APP_LOCK(app,push,pushed,level)\
104+ if(app && app->yield_lock) (*app->yield_lock)(app,push,pushed,level)
105+#define RESTORE_APP_LOCK(app,level,pushed)\
106+ if(app && app->restore_lock) (*app->restore_lock)(app,level,pushed)
107+
108+#define WIDGET_TO_APPCON(w) \
109+ XtAppContext app = (w && _XtProcessLock ? \
110+ XtWidgetToApplicationContext(w) : NULL)
111+
112+#define DPY_TO_APPCON(d) \
113+ XtAppContext app = (_XtProcessLock ? XtDisplayToApplicationContext(d): NULL)
114+
115+#else /* defined(XTHREADS) */
116+
117+#define LOCK_PROCESS
118+#define UNLOCK_PROCESS
119+#define LOCK_APP(app)
120+#define UNLOCK_APP(app)
121+
122+#define INIT_APP_LOCK(app)
123+#define FREE_APP_LOCK(app)
124+
125+#define WIDGET_TO_APPCON(w)
126+#define DPY_TO_APPCON(d)
127+
128+#endif /* !defined(XTHREADS) */
129+#endif /* _XtThreadsI_h */
@@ -0,0 +1,606 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * TranslateI.h - Header file private to translation management
50+ *
51+ * Author: Gabe Beged-Dov, HP
52+ *
53+ * Former Author: Charles Haynes
54+ * Digital Equipment Corporation
55+ * Western Research Laboratory
56+ * Date: Sat Aug 29 1987
57+ */
58+
59+/*#define REFCNT_TRANSLATIONS*/
60+#define CACHE_TRANSLATIONS
61+
62+#define TM_NO_MATCH (-2)
63+
64+#define _XtRStateTablePair "_XtStateTablePair"
65+
66+typedef unsigned char TMByteCard;
67+typedef unsigned short TMShortCard;
68+typedef unsigned long TMLongCard;
69+typedef short TMShortInt;
70+
71+typedef struct _TMTypeMatchRec *TMTypeMatch;
72+typedef struct _TMModifierMatchRec *TMModifierMatch;
73+typedef struct _TMEventRec *TMEventPtr;
74+
75+typedef Boolean (*MatchProc)(TMTypeMatch typeMatch,
76+ TMModifierMatch modMatch,
77+ TMEventPtr eventSeq);
78+
79+typedef struct _ModToKeysymTable {
80+ Modifiers mask;
81+ int count;
82+ int idx;
83+} ModToKeysymTable;
84+
85+typedef struct _LateBindings {
86+ unsigned int knot:1;
87+ unsigned int pair:1;
88+ unsigned short ref_count; /* garbage collection */
89+ KeySym keysym;
90+} LateBindings, *LateBindingsPtr;
91+
92+typedef short ModifierMask;
93+
94+typedef struct _ActionsRec *ActionPtr;
95+typedef struct _ActionsRec {
96+ int idx; /* index into quarkTable to find proc */
97+ String *params; /* pointer to array of params */
98+ Cardinal num_params; /* number of params */
99+ ActionPtr next; /* next action to perform */
100+} ActionRec;
101+
102+typedef struct _XtStateRec *StatePtr;
103+typedef struct _XtStateRec {
104+ unsigned int isCycleStart:1;
105+ unsigned int isCycleEnd:1;
106+ TMShortCard typeIndex;
107+ TMShortCard modIndex;
108+ ActionPtr actions; /* rhs list of actions to perform */
109+ StatePtr nextLevel;
110+}StateRec;
111+
112+
113+#define XtTableReplace 0
114+#define XtTableAugment 1
115+#define XtTableOverride 2
116+#define XtTableUnmerge 3
117+
118+typedef unsigned int _XtTranslateOp;
119+
120+/*
121+ * New Definitions
122+ */
123+typedef struct _TMModifierMatchRec{
124+ TMLongCard modifiers;
125+ TMLongCard modifierMask;
126+ LateBindingsPtr lateModifiers;
127+ Boolean standard;
128+}TMModifierMatchRec;
129+
130+typedef struct _TMTypeMatchRec{
131+ TMLongCard eventType;
132+ TMLongCard eventCode;
133+ TMLongCard eventCodeMask;
134+ MatchProc matchEvent;
135+}TMTypeMatchRec;
136+
137+typedef struct _TMBranchHeadRec {
138+ unsigned int isSimple:1;
139+ unsigned int hasActions:1;
140+ unsigned int hasCycles:1;
141+ unsigned int more:13;
142+ TMShortCard typeIndex;
143+ TMShortCard modIndex;
144+}TMBranchHeadRec, *TMBranchHead;
145+
146+/* NOTE: elements of this structure must match those of
147+ * TMComplexStateTreeRec and TMParseStateTreeRec.
148+ */
149+typedef struct _TMSimpleStateTreeRec{
150+ unsigned int isSimple:1;
151+ unsigned int isAccelerator:1;
152+ unsigned int mappingNotifyInterest:1;
153+ unsigned int refCount:13;
154+ TMShortCard numBranchHeads;
155+ TMShortCard numQuarks; /* # of entries in quarkTbl */
156+ TMShortCard unused; /* to ensure same alignment */
157+ TMBranchHeadRec *branchHeadTbl;
158+ XrmQuark *quarkTbl; /* table of quarkified rhs*/
159+}TMSimpleStateTreeRec, *TMSimpleStateTree;
160+
161+/* NOTE: elements of this structure must match those of
162+ * TMSimpleStateTreeRec and TMParseStateTreeRec.
163+ */
164+typedef struct _TMComplexStateTreeRec{
165+ unsigned int isSimple:1;
166+ unsigned int isAccelerator:1;
167+ unsigned int mappingNotifyInterest:1;
168+ unsigned int refCount:13;
169+ TMShortCard numBranchHeads;
170+ TMShortCard numQuarks; /* # of entries in quarkTbl */
171+ TMShortCard numComplexBranchHeads;
172+ TMBranchHeadRec *branchHeadTbl;
173+ XrmQuark *quarkTbl; /* table of quarkified rhs*/
174+ StatePtr *complexBranchHeadTbl;
175+}TMComplexStateTreeRec, *TMComplexStateTree;
176+
177+/* NOTE: elements of this structure must match those of
178+ * TMSimpleStateTreeRec and TMComplexStateTreeRec.
179+ */
180+typedef struct _TMParseStateTreeRec{
181+ unsigned int isSimple:1;
182+ unsigned int isAccelerator:1;
183+ unsigned int mappingNotifyInterest:1;
184+ unsigned int isStackQuarks:1;
185+ unsigned int isStackBranchHeads:1;
186+ unsigned int isStackComplexBranchHeads:1;
187+ unsigned int unused:10; /* to ensure correct alignment */
188+ TMShortCard numBranchHeads;
189+ TMShortCard numQuarks; /* # of entries in quarkTbl */
190+ TMShortCard numComplexBranchHeads;
191+ TMBranchHeadRec *branchHeadTbl;
192+ XrmQuark *quarkTbl; /* table of quarkified rhs*/
193+ StatePtr *complexBranchHeadTbl;
194+ TMShortCard branchHeadTblSize;
195+ TMShortCard quarkTblSize; /*total size of quarkTbl */
196+ TMShortCard complexBranchHeadTblSize;
197+ StatePtr head;
198+}TMParseStateTreeRec, *TMParseStateTree;
199+
200+typedef union _TMStateTreeRec{
201+ TMSimpleStateTreeRec simple;
202+ TMParseStateTreeRec parse;
203+ TMComplexStateTreeRec complex;
204+}*TMStateTree, **TMStateTreePtr, **TMStateTreeList;
205+
206+typedef struct _TMSimpleBindProcsRec {
207+ XtActionProc *procs;
208+}TMSimpleBindProcsRec, *TMSimpleBindProcs;
209+
210+typedef struct _TMComplexBindProcsRec {
211+ Widget widget; /*widgetID to pass to action Proc*/
212+ XtTranslations aXlations;
213+ XtActionProc *procs;
214+}TMComplexBindProcsRec, *TMComplexBindProcs;
215+
216+typedef struct _TMSimpleBindDataRec {
217+ unsigned int isComplex:1; /* must be first */
218+ TMSimpleBindProcsRec bindTbl[1]; /* variable length */
219+}TMSimpleBindDataRec, *TMSimpleBindData;
220+
221+typedef struct _TMComplexBindDataRec {
222+ unsigned int isComplex:1; /* must be first */
223+ struct _ATranslationData *accel_context; /* for GetValues */
224+ TMComplexBindProcsRec bindTbl[1]; /* variable length */
225+}TMComplexBindDataRec, *TMComplexBindData;
226+
227+typedef union _TMBindDataRec{
228+ TMSimpleBindDataRec simple;
229+ TMComplexBindDataRec complex;
230+}*TMBindData;
231+
232+typedef struct _TranslationData{
233+ unsigned char hasBindings; /* must be first */
234+ unsigned char operation; /*replace,augment,override*/
235+ TMShortCard numStateTrees;
236+ struct _TranslationData *composers[2];
237+ EventMask eventMask;
238+ TMStateTree stateTreeTbl[1]; /* variable length */
239+}TranslationData;
240+
241+/*
242+ * ATranslations is returned by GetValues for translations that contain
243+ * accelerators. The TM can differentiate between this and TranslationData
244+ * (that don't have a bindTbl) by looking at the first field (hasBindings)
245+ * of either structure. All ATranslationData structures associated with a
246+ * widget are chained off the BindData record of the widget.
247+ */
248+typedef struct _ATranslationData{
249+ unsigned char hasBindings; /* must be first */
250+ unsigned char operation;
251+ struct _TranslationData *xlations; /* actual translations */
252+ struct _ATranslationData *next; /* chain the contexts together */
253+ TMComplexBindProcsRec bindTbl[1]; /* accelerator bindings */
254+}ATranslationData, *ATranslations;
255+
256+typedef struct _TMConvertRec {
257+ XtTranslations old; /* table to merge into */
258+ XtTranslations new; /* table to merge from */
259+} TMConvertRec;
260+
261+#define _XtEventTimerEventType ((TMLongCard)~0L)
262+#define KeysymModMask (1L<<27) /* private to TM */
263+#define AnyButtonMask (1L<<28) /* private to TM */
264+
265+typedef struct _EventRec {
266+ TMLongCard modifiers;
267+ TMLongCard modifierMask;
268+ LateBindingsPtr lateModifiers;
269+ TMLongCard eventType;
270+ TMLongCard eventCode;
271+ TMLongCard eventCodeMask;
272+ MatchProc matchEvent;
273+ Boolean standard;
274+} Event;
275+
276+typedef struct _EventSeqRec *EventSeqPtr;
277+typedef struct _EventSeqRec {
278+ Event event; /* X event description */
279+ StatePtr state; /* private to state table builder */
280+ EventSeqPtr next; /* next event on line */
281+ ActionPtr actions; /* r.h.s. list of actions to perform */
282+} EventSeqRec;
283+
284+typedef EventSeqRec EventRec;
285+typedef EventSeqPtr EventPtr;
286+
287+typedef struct _TMEventRec {
288+ XEvent *xev;
289+ Event event;
290+}TMEventRec;
291+
292+typedef struct _ActionHookRec {
293+ struct _ActionHookRec* next; /* must remain first */
294+ XtAppContext app;
295+ XtActionHookProc proc;
296+ XtPointer closure;
297+} ActionHookRec, *ActionHook;
298+
299+/* choose a number between 2 and 8 */
300+#define TMKEYCACHELOG2 6
301+#define TMKEYCACHESIZE (1<<TMKEYCACHELOG2)
302+
303+typedef struct _KeyCacheRec {
304+ unsigned char modifiers_return[256]; /* constant per KeyCode, key proc */
305+ KeyCode keycode[TMKEYCACHESIZE];
306+ unsigned char modifiers[TMKEYCACHESIZE];
307+ KeySym keysym[TMKEYCACHESIZE];
308+} TMKeyCache;
309+
310+typedef struct _TMKeyContextRec {
311+ XEvent *event;
312+ unsigned long serial;
313+ KeySym keysym;
314+ Modifiers modifiers;
315+ TMKeyCache keycache; /* keep this last, to keep offsets to others small */
316+} TMKeyContextRec, *TMKeyContext;
317+
318+typedef struct _TMGlobalRec{
319+ TMTypeMatchRec **typeMatchSegmentTbl;
320+ TMShortCard numTypeMatches;
321+ TMShortCard numTypeMatchSegments;
322+ TMShortCard typeMatchSegmentTblSize;
323+ TMModifierMatchRec **modMatchSegmentTbl;
324+ TMShortCard numModMatches;
325+ TMShortCard numModMatchSegments;
326+ TMShortCard modMatchSegmentTblSize;
327+ Boolean newMatchSemantics;
328+#ifdef TRACE_TM
329+ XtTranslations *tmTbl;
330+ TMShortCard numTms;
331+ TMShortCard tmTblSize;
332+ struct _TMBindCacheRec **bindCacheTbl;
333+ TMShortCard numBindCache;
334+ TMShortCard bindCacheTblSize;
335+ TMShortCard numLateBindings;
336+ TMShortCard numBranchHeads;
337+ TMShortCard numComplexStates;
338+ TMShortCard numComplexActions;
339+#endif /* TRACE_TM */
340+}TMGlobalRec;
341+
342+_XFUNCPROTOBEGIN
343+
344+extern TMGlobalRec _XtGlobalTM;
345+
346+#define TM_MOD_SEGMENT_SIZE 16
347+#define TM_TYPE_SEGMENT_SIZE 16
348+
349+#define TMGetTypeMatch(idx) \
350+ ((TMTypeMatch) \
351+ &((_XtGlobalTM.typeMatchSegmentTbl[((idx) >> 4)])[(idx) & 15]))
352+#define TMGetModifierMatch(idx) \
353+ ((TMModifierMatch) \
354+ &((_XtGlobalTM.modMatchSegmentTbl[(idx) >> 4])[(idx) & 15]))
355+
356+/* Useful Access Macros */
357+#define TMNewMatchSemantics() (_XtGlobalTM.newMatchSemantics)
358+#define TMBranchMore(branch) (branch->more)
359+#define TMComplexBranchHead(tree, br) \
360+ (((TMComplexStateTree)tree)->complexBranchHeadTbl[TMBranchMore(br)])
361+
362+#define TMGetComplexBindEntry(bindData, idx) \
363+ ((TMComplexBindProcs)&(((TMComplexBindData)bindData)->bindTbl[idx]))
364+
365+#define TMGetSimpleBindEntry(bindData, idx) \
366+ ((TMSimpleBindProcs)&(((TMSimpleBindData)bindData)->bindTbl[idx]))
367+
368+
369+#define _InitializeKeysymTables(dpy, pd) \
370+ if (pd->keysyms == NULL) \
371+ _XtBuildKeysymTables(dpy, pd)
372+
373+/*
374+ * Internal Functions
375+ */
376+
377+extern void _XtPopup(
378+ Widget /* widget */,
379+ XtGrabKind /* grab_kind */,
380+ _XtBoolean /* spring_loaded */
381+);
382+
383+extern _XtString _XtPrintXlations(
384+ Widget /* w */,
385+ XtTranslations /* xlations */,
386+ Widget /* accelWidget */,
387+ _XtBoolean /* includeRHS */
388+);
389+
390+extern void _XtRegisterGrabs(
391+ Widget /* widget */
392+);
393+
394+extern XtPointer _XtInitializeActionData(
395+ struct _XtActionsRec * /* actions */,
396+ Cardinal /* count */,
397+ _XtBoolean /* inPlace */
398+);
399+
400+extern void _XtAddEventSeqToStateTree(
401+ EventSeqPtr /* eventSeq */,
402+ TMParseStateTree /* stateTree */
403+);
404+
405+extern Boolean _XtMatchUsingStandardMods(
406+ TMTypeMatch /* typeMatch */,
407+ TMModifierMatch /* modMatch */,
408+ TMEventPtr /* eventSeq */
409+);
410+
411+extern Boolean _XtMatchUsingDontCareMods(
412+ TMTypeMatch /* typeMatch */,
413+ TMModifierMatch /* modMatch */,
414+ TMEventPtr /* eventSeq */
415+);
416+
417+extern Boolean _XtRegularMatch(
418+ TMTypeMatch /* typeMatch */,
419+ TMModifierMatch /* modMatch */,
420+ TMEventPtr /* eventSeq */
421+);
422+
423+extern Boolean _XtMatchAtom(
424+ TMTypeMatch /* typeMatch */,
425+ TMModifierMatch /* modMatch */,
426+ TMEventPtr /* eventSeq */
427+);
428+
429+extern void _XtTranslateEvent(
430+ Widget /* widget */,
431+ XEvent* /* event */
432+);
433+
434+#include "CallbackI.h"
435+#include "EventI.h"
436+#include "HookObjI.h"
437+#include "PassivGraI.h"
438+#include "ThreadsI.h"
439+#include "InitialI.h"
440+#include "ResourceI.h"
441+#include "StringDefs.h"
442+
443+extern void _XtBuildKeysymTables(Display *dpy, XtPerDisplay pd);
444+
445+#ifndef NO_MIT_HACKS
446+extern void _XtDisplayTranslations(
447+ Widget /* widget */,
448+ XEvent* /* event */,
449+ String* /* params */,
450+ Cardinal* /* num_params */
451+);
452+
453+extern void _XtDisplayAccelerators(
454+ Widget /* widget */,
455+ XEvent* /* event */,
456+ String* /* params */,
457+ Cardinal* /* num_params */
458+);
459+
460+extern void _XtDisplayInstalledAccelerators(
461+ Widget /* widget */,
462+ XEvent* /* event */,
463+ String* /* params */,
464+ Cardinal* /* num_params */
465+);
466+#endif /* ifndef NO_MIT_HACKS */
467+
468+extern void _XtPopupInitialize(
469+ XtAppContext /* app_context */
470+);
471+
472+extern void _XtBindActions(
473+ Widget /* widget */,
474+ XtTM /* tm_rec */
475+);
476+
477+extern Boolean _XtComputeLateBindings(
478+ Display* /* dpy */,
479+ LateBindingsPtr /* lateModifiers */,
480+ Modifiers* /* computed */,
481+ Modifiers* /* computedMask */
482+);
483+
484+extern XtTranslations _XtCreateXlations(
485+ TMStateTree * /* stateTrees */,
486+ TMShortCard /* numStateTrees */,
487+ XtTranslations /* first */,
488+ XtTranslations /* second */
489+);
490+
491+extern Boolean _XtCvtMergeTranslations(
492+ Display* /* dpy */,
493+ XrmValuePtr /* args */,
494+ Cardinal* /* num_args */,
495+ XrmValuePtr /* from */,
496+ XrmValuePtr /* to */,
497+ XtPointer* /* closure_ret */
498+);
499+
500+void _XtRemoveStateTreeByIndex(
501+ XtTranslations /* xlations */,
502+ TMShortCard /* i */);
503+
504+void _XtFreeTranslations(
505+ XtAppContext /* app */,
506+ XrmValuePtr /* toVal */,
507+ XtPointer /* closure */,
508+ XrmValuePtr /* args */,
509+ Cardinal* /* num_args */
510+);
511+
512+extern TMShortCard _XtGetModifierIndex(
513+ Event* /* event */
514+);
515+
516+extern TMShortCard _XtGetQuarkIndex(
517+ TMParseStateTree /* stateTreePtr */,
518+ XrmQuark /* quark */
519+);
520+
521+extern XtTranslations _XtGetTranslationValue(
522+ Widget /* widget */
523+);
524+
525+extern TMShortCard _XtGetTypeIndex(
526+ Event* /* event */
527+);
528+
529+extern void _XtGrabInitialize(
530+ XtAppContext /* app */
531+);
532+
533+extern void _XtInstallTranslations(
534+ Widget /* widget */
535+);
536+
537+extern void _XtRemoveTranslations(
538+ Widget /* widget */
539+);
540+
541+extern void _XtDestroyTMData(
542+ Widget /* widget */
543+);
544+
545+extern void _XtMergeTranslations(
546+ Widget /* widget */,
547+ XtTranslations /* newXlations */,
548+ _XtTranslateOp /* operation */
549+);
550+
551+extern void _XtActionInitialize(
552+ XtAppContext /* app */
553+);
554+
555+extern TMStateTree _XtParseTreeToStateTree(
556+ TMParseStateTree /* parseTree */
557+);
558+
559+extern String _XtPrintActions(
560+ ActionRec* /* actions */,
561+ XrmQuark* /* quarkTbl */
562+);
563+
564+extern String _XtPrintState(
565+ TMStateTree /* stateTree */,
566+ TMBranchHead /* branchHead */);
567+
568+extern String _XtPrintEventSeq(
569+ EventSeqPtr /* eventSeq */,
570+ Display* /* dpy */
571+);
572+
573+typedef Boolean (*_XtTraversalProc)(
574+ StatePtr /* state */,
575+ XtPointer /* data */
576+);
577+
578+extern void _XtTraverseStateTree(
579+ TMStateTree /* tree */,
580+ _XtTraversalProc /* func */,
581+ XtPointer /* data */
582+);
583+
584+extern void _XtTranslateInitialize(
585+ void
586+);
587+
588+extern void _XtAddTMConverters(
589+ ConverterTable /* table */
590+);
591+
592+extern void _XtUnbindActions(
593+ Widget /* widget */,
594+ XtTranslations /* xlations */,
595+ TMBindData /* bindData */
596+);
597+
598+extern void _XtUnmergeTranslations(
599+ Widget /* widget */,
600+ XtTranslations /* xlations */
601+);
602+
603+/* TMKey.c */
604+extern void _XtAllocTMContext(XtPerDisplay pd);
605+
606+_XFUNCPROTOEND
@@ -0,0 +1,66 @@
1+/*
2+
3+Copyright 1985, 1986, 1987, 1988, 1989, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+*/
26+
27+#ifndef _VarargsI_h_
28+#define _VarargsI_h_
29+
30+#include <stdarg.h>
31+
32+/* private routines */
33+
34+_XFUNCPROTOBEGIN
35+
36+extern void _XtCountVaList(
37+ va_list /*var*/, int* /*total_count*/, int* /*typed_count*/
38+);
39+
40+extern void _XtVaToArgList(
41+ Widget /*widget*/, va_list /*var*/, int /*max_count*/, ArgList* /*args_return*/, Cardinal* /*num_args_return*/
42+);
43+
44+extern void _XtVaToTypedArgList(
45+ va_list /*var*/, int /*count*/, XtTypedArgList* /*args_return*/, Cardinal* /*num_args_return*/
46+);
47+
48+extern XtTypedArgList _XtVaCreateTypedArgList(
49+ va_list /*var*/, int /*count*/
50+);
51+
52+extern void _XtFreeArgList(
53+ ArgList /*args*/, int /*total_count*/, int /*typed_count*/
54+);
55+
56+extern void _XtGetApplicationResources(
57+ Widget /*w*/, XtPointer /*base*/, XtResourceList /*resources*/, Cardinal /*num_resources*/, ArgList /*args*/, Cardinal /*num_args*/, XtTypedArgList /*typed_args*/, Cardinal /*num_typed_args*/
58+);
59+
60+extern void _XtGetSubresources(
61+ 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*/
62+);
63+
64+_XFUNCPROTOEND
65+
66+#endif /* _VarargsI_h_ */
@@ -0,0 +1,70 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XtVendor_h
49+#define _XtVendor_h
50+
51+#include <X11/Intrinsic.h>
52+
53+/***********************************************************************
54+ *
55+ * VendorShell Widget
56+ *
57+ ***********************************************************************/
58+
59+/* Class record constants */
60+
61+typedef struct _VendorShellClassRec *VendorShellWidgetClass;
62+
63+_XFUNCPROTOBEGIN
64+
65+externalref WidgetClass vendorShellWidgetClass;
66+
67+_XFUNCPROTOEND
68+
69+#endif /* _XtVendor_h */
70+/* DON'T ADD STUFF AFTER THIS #endif */
@@ -0,0 +1,102 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * VendorP.h - Private definitions for VendorShell widget
50+ *
51+ * Author: Paul Asente
52+ * Digital Equipment Corporation
53+ * Western Software Laboratory
54+ * Date: Thu Dec 3, 1987
55+ */
56+
57+/***********************************************************************
58+ *
59+ * VendorShell Widget Private Data
60+ *
61+ ***********************************************************************/
62+
63+#ifndef _XtVendorPrivate_h
64+#define _XtVendorPrivate_h
65+
66+#include <X11/Vendor.h>
67+
68+/* New fields for the VendorShell widget class record */
69+
70+_XFUNCPROTOBEGIN
71+
72+typedef struct {
73+ XtPointer extension; /* pointer to extension record */
74+} VendorShellClassPart;
75+
76+typedef struct _VendorShellClassRec {
77+ CoreClassPart core_class;
78+ CompositeClassPart composite_class;
79+ ShellClassPart shell_class;
80+ WMShellClassPart wm_shell_class;
81+ VendorShellClassPart vendor_shell_class;
82+} VendorShellClassRec;
83+
84+externalref VendorShellClassRec vendorShellClassRec;
85+
86+/* New fields for the vendor shell widget. */
87+
88+typedef struct {
89+ int vendor_specific;
90+} VendorShellPart;
91+
92+typedef struct {
93+ CorePart core;
94+ CompositePart composite;
95+ ShellPart shell;
96+ WMShellPart wm;
97+ VendorShellPart vendor;
98+} VendorShellRec, *VendorShellWidget;
99+
100+_XFUNCPROTOEND
101+
102+#endif /* _XtVendorPrivate_h */
@@ -0,0 +1,717 @@
1+/* Definitions for the X window system likely to be used by applications */
2+
3+#ifndef X_H
4+#define X_H
5+
6+/***********************************************************
7+
8+Copyright 1987, 1998 The Open Group
9+
10+Permission to use, copy, modify, distribute, and sell this software and its
11+documentation for any purpose is hereby granted without fee, provided that
12+the above copyright notice appear in all copies and that both that
13+copyright notice and this permission notice appear in supporting
14+documentation.
15+
16+The above copyright notice and this permission notice shall be included in
17+all copies or substantial portions of the Software.
18+
19+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25+
26+Except as contained in this notice, the name of The Open Group shall not be
27+used in advertising or otherwise to promote the sale, use or other dealings
28+in this Software without prior written authorization from The Open Group.
29+
30+
31+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
32+
33+ All Rights Reserved
34+
35+Permission to use, copy, modify, and distribute this software and its
36+documentation for any purpose and without fee is hereby granted,
37+provided that the above copyright notice appear in all copies and that
38+both that copyright notice and this permission notice appear in
39+supporting documentation, and that the name of Digital not be
40+used in advertising or publicity pertaining to distribution of the
41+software without specific, written prior permission.
42+
43+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
44+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
45+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
46+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
47+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
48+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
49+SOFTWARE.
50+
51+******************************************************************/
52+
53+#define X_PROTOCOL 11 /* current protocol version */
54+#define X_PROTOCOL_REVISION 0 /* current minor version */
55+
56+/* Resources */
57+
58+/*
59+ * _XSERVER64 must ONLY be defined when compiling X server sources on
60+ * systems where unsigned long is not 32 bits, must NOT be used in
61+ * client or library code.
62+ */
63+#ifndef _XSERVER64
64+# ifndef _XTYPEDEF_XID
65+# define _XTYPEDEF_XID
66+typedef unsigned long XID;
67+# endif
68+# ifndef _XTYPEDEF_MASK
69+# define _XTYPEDEF_MASK
70+typedef unsigned long Mask;
71+# endif
72+# ifndef _XTYPEDEF_ATOM
73+# define _XTYPEDEF_ATOM
74+typedef unsigned long Atom; /* Also in Xdefs.h */
75+# endif
76+typedef unsigned long VisualID;
77+typedef unsigned long Time;
78+#else
79+# include <X11/Xmd.h>
80+# ifndef _XTYPEDEF_XID
81+# define _XTYPEDEF_XID
82+typedef CARD32 XID;
83+# endif
84+# ifndef _XTYPEDEF_MASK
85+# define _XTYPEDEF_MASK
86+typedef CARD32 Mask;
87+# endif
88+# ifndef _XTYPEDEF_ATOM
89+# define _XTYPEDEF_ATOM
90+typedef CARD32 Atom;
91+# endif
92+typedef CARD32 VisualID;
93+typedef CARD32 Time;
94+#endif
95+
96+typedef XID Window;
97+typedef XID Drawable;
98+#ifndef _XTYPEDEF_FONT
99+# define _XTYPEDEF_FONT
100+typedef XID Font;
101+#endif
102+typedef XID Pixmap;
103+typedef XID Cursor;
104+typedef XID Colormap;
105+typedef XID GContext;
106+typedef XID KeySym;
107+
108+typedef unsigned char KeyCode;
109+
110+/*****************************************************************
111+ * RESERVED RESOURCE AND CONSTANT DEFINITIONS
112+ *****************************************************************/
113+
114+#ifndef None
115+#define None 0L /* universal null resource or null atom */
116+#endif
117+
118+#define ParentRelative 1L /* background pixmap in CreateWindow
119+ and ChangeWindowAttributes */
120+
121+#define CopyFromParent 0L /* border pixmap in CreateWindow
122+ and ChangeWindowAttributes
123+ special VisualID and special window
124+ class passed to CreateWindow */
125+
126+#define PointerWindow 0L /* destination window in SendEvent */
127+#define InputFocus 1L /* destination window in SendEvent */
128+
129+#define PointerRoot 1L /* focus window in SetInputFocus */
130+
131+#define AnyPropertyType 0L /* special Atom, passed to GetProperty */
132+
133+#define AnyKey 0L /* special Key Code, passed to GrabKey */
134+
135+#define AnyButton 0L /* special Button Code, passed to GrabButton */
136+
137+#define AllTemporary 0L /* special Resource ID passed to KillClient */
138+
139+#define CurrentTime 0L /* special Time */
140+
141+#define NoSymbol 0L /* special KeySym */
142+
143+/*****************************************************************
144+ * EVENT DEFINITIONS
145+ *****************************************************************/
146+
147+/* Input Event Masks. Used as event-mask window attribute and as arguments
148+ to Grab requests. Not to be confused with event names. */
149+
150+#define NoEventMask 0L
151+#define KeyPressMask (1L<<0)
152+#define KeyReleaseMask (1L<<1)
153+#define ButtonPressMask (1L<<2)
154+#define ButtonReleaseMask (1L<<3)
155+#define EnterWindowMask (1L<<4)
156+#define LeaveWindowMask (1L<<5)
157+#define PointerMotionMask (1L<<6)
158+#define PointerMotionHintMask (1L<<7)
159+#define Button1MotionMask (1L<<8)
160+#define Button2MotionMask (1L<<9)
161+#define Button3MotionMask (1L<<10)
162+#define Button4MotionMask (1L<<11)
163+#define Button5MotionMask (1L<<12)
164+#define ButtonMotionMask (1L<<13)
165+#define KeymapStateMask (1L<<14)
166+#define ExposureMask (1L<<15)
167+#define VisibilityChangeMask (1L<<16)
168+#define StructureNotifyMask (1L<<17)
169+#define ResizeRedirectMask (1L<<18)
170+#define SubstructureNotifyMask (1L<<19)
171+#define SubstructureRedirectMask (1L<<20)
172+#define FocusChangeMask (1L<<21)
173+#define PropertyChangeMask (1L<<22)
174+#define ColormapChangeMask (1L<<23)
175+#define OwnerGrabButtonMask (1L<<24)
176+
177+/* Event names. Used in "type" field in XEvent structures. Not to be
178+confused with event masks above. They start from 2 because 0 and 1
179+are reserved in the protocol for errors and replies. */
180+
181+#define KeyPress 2
182+#define KeyRelease 3
183+#define ButtonPress 4
184+#define ButtonRelease 5
185+#define MotionNotify 6
186+#define EnterNotify 7
187+#define LeaveNotify 8
188+#define FocusIn 9
189+#define FocusOut 10
190+#define KeymapNotify 11
191+#define Expose 12
192+#define GraphicsExpose 13
193+#define NoExpose 14
194+#define VisibilityNotify 15
195+#define CreateNotify 16
196+#define DestroyNotify 17
197+#define UnmapNotify 18
198+#define MapNotify 19
199+#define MapRequest 20
200+#define ReparentNotify 21
201+#define ConfigureNotify 22
202+#define ConfigureRequest 23
203+#define GravityNotify 24
204+#define ResizeRequest 25
205+#define CirculateNotify 26
206+#define CirculateRequest 27
207+#define PropertyNotify 28
208+#define SelectionClear 29
209+#define SelectionRequest 30
210+#define SelectionNotify 31
211+#define ColormapNotify 32
212+#define ClientMessage 33
213+#define MappingNotify 34
214+#define GenericEvent 35
215+#define LASTEvent 36 /* must be bigger than any event # */
216+
217+
218+/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
219+ state in various key-, mouse-, and button-related events. */
220+
221+#define ShiftMask (1<<0)
222+#define LockMask (1<<1)
223+#define ControlMask (1<<2)
224+#define Mod1Mask (1<<3)
225+#define Mod2Mask (1<<4)
226+#define Mod3Mask (1<<5)
227+#define Mod4Mask (1<<6)
228+#define Mod5Mask (1<<7)
229+
230+/* modifier names. Used to build a SetModifierMapping request or
231+ to read a GetModifierMapping request. These correspond to the
232+ masks defined above. */
233+#define ShiftMapIndex 0
234+#define LockMapIndex 1
235+#define ControlMapIndex 2
236+#define Mod1MapIndex 3
237+#define Mod2MapIndex 4
238+#define Mod3MapIndex 5
239+#define Mod4MapIndex 6
240+#define Mod5MapIndex 7
241+
242+
243+/* button masks. Used in same manner as Key masks above. Not to be confused
244+ with button names below. */
245+
246+#define Button1Mask (1<<8)
247+#define Button2Mask (1<<9)
248+#define Button3Mask (1<<10)
249+#define Button4Mask (1<<11)
250+#define Button5Mask (1<<12)
251+
252+#define AnyModifier (1<<15) /* used in GrabButton, GrabKey */
253+
254+
255+/* button names. Used as arguments to GrabButton and as detail in ButtonPress
256+ and ButtonRelease events. Not to be confused with button masks above.
257+ Note that 0 is already defined above as "AnyButton". */
258+
259+#define Button1 1
260+#define Button2 2
261+#define Button3 3
262+#define Button4 4
263+#define Button5 5
264+
265+/* Notify modes */
266+
267+#define NotifyNormal 0
268+#define NotifyGrab 1
269+#define NotifyUngrab 2
270+#define NotifyWhileGrabbed 3
271+
272+#define NotifyHint 1 /* for MotionNotify events */
273+
274+/* Notify detail */
275+
276+#define NotifyAncestor 0
277+#define NotifyVirtual 1
278+#define NotifyInferior 2
279+#define NotifyNonlinear 3
280+#define NotifyNonlinearVirtual 4
281+#define NotifyPointer 5
282+#define NotifyPointerRoot 6
283+#define NotifyDetailNone 7
284+
285+/* Visibility notify */
286+
287+#define VisibilityUnobscured 0
288+#define VisibilityPartiallyObscured 1
289+#define VisibilityFullyObscured 2
290+
291+/* Circulation request */
292+
293+#define PlaceOnTop 0
294+#define PlaceOnBottom 1
295+
296+/* protocol families */
297+
298+#define FamilyInternet 0 /* IPv4 */
299+#define FamilyDECnet 1
300+#define FamilyChaos 2
301+#define FamilyInternet6 6 /* IPv6 */
302+
303+/* authentication families not tied to a specific protocol */
304+#define FamilyServerInterpreted 5
305+
306+/* Property notification */
307+
308+#define PropertyNewValue 0
309+#define PropertyDelete 1
310+
311+/* Color Map notification */
312+
313+#define ColormapUninstalled 0
314+#define ColormapInstalled 1
315+
316+/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */
317+
318+#define GrabModeSync 0
319+#define GrabModeAsync 1
320+
321+/* GrabPointer, GrabKeyboard reply status */
322+
323+#define GrabSuccess 0
324+#define AlreadyGrabbed 1
325+#define GrabInvalidTime 2
326+#define GrabNotViewable 3
327+#define GrabFrozen 4
328+
329+/* AllowEvents modes */
330+
331+#define AsyncPointer 0
332+#define SyncPointer 1
333+#define ReplayPointer 2
334+#define AsyncKeyboard 3
335+#define SyncKeyboard 4
336+#define ReplayKeyboard 5
337+#define AsyncBoth 6
338+#define SyncBoth 7
339+
340+/* Used in SetInputFocus, GetInputFocus */
341+
342+#define RevertToNone (int)None
343+#define RevertToPointerRoot (int)PointerRoot
344+#define RevertToParent 2
345+
346+/*****************************************************************
347+ * ERROR CODES
348+ *****************************************************************/
349+
350+#define Success 0 /* everything's okay */
351+#define BadRequest 1 /* bad request code */
352+#define BadValue 2 /* int parameter out of range */
353+#define BadWindow 3 /* parameter not a Window */
354+#define BadPixmap 4 /* parameter not a Pixmap */
355+#define BadAtom 5 /* parameter not an Atom */
356+#define BadCursor 6 /* parameter not a Cursor */
357+#define BadFont 7 /* parameter not a Font */
358+#define BadMatch 8 /* parameter mismatch */
359+#define BadDrawable 9 /* parameter not a Pixmap or Window */
360+#define BadAccess 10 /* depending on context:
361+ - key/button already grabbed
362+ - attempt to free an illegal
363+ cmap entry
364+ - attempt to store into a read-only
365+ color map entry.
366+ - attempt to modify the access control
367+ list from other than the local host.
368+ */
369+#define BadAlloc 11 /* insufficient resources */
370+#define BadColor 12 /* no such colormap */
371+#define BadGC 13 /* parameter not a GC */
372+#define BadIDChoice 14 /* choice not in range or already used */
373+#define BadName 15 /* font or color name doesn't exist */
374+#define BadLength 16 /* Request length incorrect */
375+#define BadImplementation 17 /* server is defective */
376+
377+#define FirstExtensionError 128
378+#define LastExtensionError 255
379+
380+/*****************************************************************
381+ * WINDOW DEFINITIONS
382+ *****************************************************************/
383+
384+/* Window classes used by CreateWindow */
385+/* Note that CopyFromParent is already defined as 0 above */
386+
387+#define InputOutput 1
388+#define InputOnly 2
389+
390+/* Window attributes for CreateWindow and ChangeWindowAttributes */
391+
392+#define CWBackPixmap (1L<<0)
393+#define CWBackPixel (1L<<1)
394+#define CWBorderPixmap (1L<<2)
395+#define CWBorderPixel (1L<<3)
396+#define CWBitGravity (1L<<4)
397+#define CWWinGravity (1L<<5)
398+#define CWBackingStore (1L<<6)
399+#define CWBackingPlanes (1L<<7)
400+#define CWBackingPixel (1L<<8)
401+#define CWOverrideRedirect (1L<<9)
402+#define CWSaveUnder (1L<<10)
403+#define CWEventMask (1L<<11)
404+#define CWDontPropagate (1L<<12)
405+#define CWColormap (1L<<13)
406+#define CWCursor (1L<<14)
407+
408+/* ConfigureWindow structure */
409+
410+#define CWX (1<<0)
411+#define CWY (1<<1)
412+#define CWWidth (1<<2)
413+#define CWHeight (1<<3)
414+#define CWBorderWidth (1<<4)
415+#define CWSibling (1<<5)
416+#define CWStackMode (1<<6)
417+
418+
419+/* Bit Gravity */
420+
421+#define ForgetGravity 0
422+#define NorthWestGravity 1
423+#define NorthGravity 2
424+#define NorthEastGravity 3
425+#define WestGravity 4
426+#define CenterGravity 5
427+#define EastGravity 6
428+#define SouthWestGravity 7
429+#define SouthGravity 8
430+#define SouthEastGravity 9
431+#define StaticGravity 10
432+
433+/* Window gravity + bit gravity above */
434+
435+#define UnmapGravity 0
436+
437+/* Used in CreateWindow for backing-store hint */
438+
439+#define NotUseful 0
440+#define WhenMapped 1
441+#define Always 2
442+
443+/* Used in GetWindowAttributes reply */
444+
445+#define IsUnmapped 0
446+#define IsUnviewable 1
447+#define IsViewable 2
448+
449+/* Used in ChangeSaveSet */
450+
451+#define SetModeInsert 0
452+#define SetModeDelete 1
453+
454+/* Used in ChangeCloseDownMode */
455+
456+#define DestroyAll 0
457+#define RetainPermanent 1
458+#define RetainTemporary 2
459+
460+/* Window stacking method (in configureWindow) */
461+
462+#define Above 0
463+#define Below 1
464+#define TopIf 2
465+#define BottomIf 3
466+#define Opposite 4
467+
468+/* Circulation direction */
469+
470+#define RaiseLowest 0
471+#define LowerHighest 1
472+
473+/* Property modes */
474+
475+#define PropModeReplace 0
476+#define PropModePrepend 1
477+#define PropModeAppend 2
478+
479+/*****************************************************************
480+ * GRAPHICS DEFINITIONS
481+ *****************************************************************/
482+
483+/* graphics functions, as in GC.alu */
484+
485+#define GXclear 0x0 /* 0 */
486+#define GXand 0x1 /* src AND dst */
487+#define GXandReverse 0x2 /* src AND NOT dst */
488+#define GXcopy 0x3 /* src */
489+#define GXandInverted 0x4 /* NOT src AND dst */
490+#define GXnoop 0x5 /* dst */
491+#define GXxor 0x6 /* src XOR dst */
492+#define GXor 0x7 /* src OR dst */
493+#define GXnor 0x8 /* NOT src AND NOT dst */
494+#define GXequiv 0x9 /* NOT src XOR dst */
495+#define GXinvert 0xa /* NOT dst */
496+#define GXorReverse 0xb /* src OR NOT dst */
497+#define GXcopyInverted 0xc /* NOT src */
498+#define GXorInverted 0xd /* NOT src OR dst */
499+#define GXnand 0xe /* NOT src OR NOT dst */
500+#define GXset 0xf /* 1 */
501+
502+/* LineStyle */
503+
504+#define LineSolid 0
505+#define LineOnOffDash 1
506+#define LineDoubleDash 2
507+
508+/* capStyle */
509+
510+#define CapNotLast 0
511+#define CapButt 1
512+#define CapRound 2
513+#define CapProjecting 3
514+
515+/* joinStyle */
516+
517+#define JoinMiter 0
518+#define JoinRound 1
519+#define JoinBevel 2
520+
521+/* fillStyle */
522+
523+#define FillSolid 0
524+#define FillTiled 1
525+#define FillStippled 2
526+#define FillOpaqueStippled 3
527+
528+/* fillRule */
529+
530+#define EvenOddRule 0
531+#define WindingRule 1
532+
533+/* subwindow mode */
534+
535+#define ClipByChildren 0
536+#define IncludeInferiors 1
537+
538+/* SetClipRectangles ordering */
539+
540+#define Unsorted 0
541+#define YSorted 1
542+#define YXSorted 2
543+#define YXBanded 3
544+
545+/* CoordinateMode for drawing routines */
546+
547+#define CoordModeOrigin 0 /* relative to the origin */
548+#define CoordModePrevious 1 /* relative to previous point */
549+
550+/* Polygon shapes */
551+
552+#define Complex 0 /* paths may intersect */
553+#define Nonconvex 1 /* no paths intersect, but not convex */
554+#define Convex 2 /* wholly convex */
555+
556+/* Arc modes for PolyFillArc */
557+
558+#define ArcChord 0 /* join endpoints of arc */
559+#define ArcPieSlice 1 /* join endpoints to center of arc */
560+
561+/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
562+ GC.stateChanges */
563+
564+#define GCFunction (1L<<0)
565+#define GCPlaneMask (1L<<1)
566+#define GCForeground (1L<<2)
567+#define GCBackground (1L<<3)
568+#define GCLineWidth (1L<<4)
569+#define GCLineStyle (1L<<5)
570+#define GCCapStyle (1L<<6)
571+#define GCJoinStyle (1L<<7)
572+#define GCFillStyle (1L<<8)
573+#define GCFillRule (1L<<9)
574+#define GCTile (1L<<10)
575+#define GCStipple (1L<<11)
576+#define GCTileStipXOrigin (1L<<12)
577+#define GCTileStipYOrigin (1L<<13)
578+#define GCFont (1L<<14)
579+#define GCSubwindowMode (1L<<15)
580+#define GCGraphicsExposures (1L<<16)
581+#define GCClipXOrigin (1L<<17)
582+#define GCClipYOrigin (1L<<18)
583+#define GCClipMask (1L<<19)
584+#define GCDashOffset (1L<<20)
585+#define GCDashList (1L<<21)
586+#define GCArcMode (1L<<22)
587+
588+#define GCLastBit 22
589+/*****************************************************************
590+ * FONTS
591+ *****************************************************************/
592+
593+/* used in QueryFont -- draw direction */
594+
595+#define FontLeftToRight 0
596+#define FontRightToLeft 1
597+
598+#define FontChange 255
599+
600+/*****************************************************************
601+ * IMAGING
602+ *****************************************************************/
603+
604+/* ImageFormat -- PutImage, GetImage */
605+
606+#define XYBitmap 0 /* depth 1, XYFormat */
607+#define XYPixmap 1 /* depth == drawable depth */
608+#define ZPixmap 2 /* depth == drawable depth */
609+
610+/*****************************************************************
611+ * COLOR MAP STUFF
612+ *****************************************************************/
613+
614+/* For CreateColormap */
615+
616+#define AllocNone 0 /* create map with no entries */
617+#define AllocAll 1 /* allocate entire map writeable */
618+
619+
620+/* Flags used in StoreNamedColor, StoreColors */
621+
622+#define DoRed (1<<0)
623+#define DoGreen (1<<1)
624+#define DoBlue (1<<2)
625+
626+/*****************************************************************
627+ * CURSOR STUFF
628+ *****************************************************************/
629+
630+/* QueryBestSize Class */
631+
632+#define CursorShape 0 /* largest size that can be displayed */
633+#define TileShape 1 /* size tiled fastest */
634+#define StippleShape 2 /* size stippled fastest */
635+
636+/*****************************************************************
637+ * KEYBOARD/POINTER STUFF
638+ *****************************************************************/
639+
640+#define AutoRepeatModeOff 0
641+#define AutoRepeatModeOn 1
642+#define AutoRepeatModeDefault 2
643+
644+#define LedModeOff 0
645+#define LedModeOn 1
646+
647+/* masks for ChangeKeyboardControl */
648+
649+#define KBKeyClickPercent (1L<<0)
650+#define KBBellPercent (1L<<1)
651+#define KBBellPitch (1L<<2)
652+#define KBBellDuration (1L<<3)
653+#define KBLed (1L<<4)
654+#define KBLedMode (1L<<5)
655+#define KBKey (1L<<6)
656+#define KBAutoRepeatMode (1L<<7)
657+
658+#define MappingSuccess 0
659+#define MappingBusy 1
660+#define MappingFailed 2
661+
662+#define MappingModifier 0
663+#define MappingKeyboard 1
664+#define MappingPointer 2
665+
666+/*****************************************************************
667+ * SCREEN SAVER STUFF
668+ *****************************************************************/
669+
670+#define DontPreferBlanking 0
671+#define PreferBlanking 1
672+#define DefaultBlanking 2
673+
674+#define DisableScreenSaver 0
675+#define DisableScreenInterval 0
676+
677+#define DontAllowExposures 0
678+#define AllowExposures 1
679+#define DefaultExposures 2
680+
681+/* for ForceScreenSaver */
682+
683+#define ScreenSaverReset 0
684+#define ScreenSaverActive 1
685+
686+/*****************************************************************
687+ * HOSTS AND CONNECTIONS
688+ *****************************************************************/
689+
690+/* for ChangeHosts */
691+
692+#define HostInsert 0
693+#define HostDelete 1
694+
695+/* for ChangeAccessControl */
696+
697+#define EnableAccess 1
698+#define DisableAccess 0
699+
700+/* Display classes used in opening the connection
701+ * Note that the statically allocated ones are even numbered and the
702+ * dynamically changeable ones are odd numbered */
703+
704+#define StaticGray 0
705+#define GrayScale 1
706+#define StaticColor 2
707+#define PseudoColor 3
708+#define TrueColor 4
709+#define DirectColor 5
710+
711+
712+/* Byte order used in imageByteOrder and bitmapBitOrder */
713+
714+#define LSBFirst 0
715+#define MSBFirst 1
716+
717+#endif /* X_H */
@@ -0,0 +1,655 @@
1+/*
2+ * XFree86 vendor specific keysyms.
3+ *
4+ * The XFree86 keysym range is 0x10080001 - 0x1008ffff.
5+ *
6+ * The XF86 set of keysyms is a catch-all set of defines for keysyms found
7+ * on various multimedia keyboards. Originally specific to XFree86 they have
8+ * been been adopted over time and are considered a "standard" part of X
9+ * keysym definitions.
10+ * XFree86 never properly commented these keysyms, so we have done our
11+ * best to explain the semantic meaning of these keys.
12+ *
13+ * XFree86 has removed their mail archives of the period, that might have
14+ * shed more light on some of these definitions. Until/unless we resurrect
15+ * these archives, these are from memory and usage.
16+ */
17+
18+/*
19+ * ModeLock
20+ *
21+ * This one is old, and not really used any more since XKB offers this
22+ * functionality.
23+ */
24+
25+#define XF86XK_ModeLock 0x1008ff01 /* Mode Switch Lock */
26+
27+/* Backlight controls. */
28+#define XF86XK_MonBrightnessUp 0x1008ff02 /* Monitor/panel brightness */
29+#define XF86XK_MonBrightnessDown 0x1008ff03 /* Monitor/panel brightness */
30+#define XF86XK_KbdLightOnOff 0x1008ff04 /* Keyboards may be lit */
31+#define XF86XK_KbdBrightnessUp 0x1008ff05 /* Keyboards may be lit */
32+#define XF86XK_KbdBrightnessDown 0x1008ff06 /* Keyboards may be lit */
33+#define XF86XK_MonBrightnessCycle 0x1008ff07 /* Monitor/panel brightness */
34+
35+/*
36+ * Keys found on some "Internet" keyboards.
37+ */
38+#define XF86XK_Standby 0x1008ff10 /* System into standby mode */
39+#define XF86XK_AudioLowerVolume 0x1008ff11 /* Volume control down */
40+#define XF86XK_AudioMute 0x1008ff12 /* Mute sound from the system */
41+#define XF86XK_AudioRaiseVolume 0x1008ff13 /* Volume control up */
42+#define XF86XK_AudioPlay 0x1008ff14 /* Start playing of audio > */
43+#define XF86XK_AudioStop 0x1008ff15 /* Stop playing audio */
44+#define XF86XK_AudioPrev 0x1008ff16 /* Previous track */
45+#define XF86XK_AudioNext 0x1008ff17 /* Next track */
46+#define XF86XK_HomePage 0x1008ff18 /* Display user's home page */
47+#define XF86XK_Mail 0x1008ff19 /* Invoke user's mail program */
48+#define XF86XK_Start 0x1008ff1a /* Start application */
49+#define XF86XK_Search 0x1008ff1b /* Search */
50+#define XF86XK_AudioRecord 0x1008ff1c /* Record audio application */
51+
52+/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */
53+#define XF86XK_Calculator 0x1008ff1d /* Invoke calculator program */
54+#define XF86XK_Memo 0x1008ff1e /* Invoke Memo taking program */
55+#define XF86XK_ToDoList 0x1008ff1f /* Invoke To Do List program */
56+#define XF86XK_Calendar 0x1008ff20 /* Invoke Calendar program */
57+#define XF86XK_PowerDown 0x1008ff21 /* Deep sleep the system */
58+#define XF86XK_ContrastAdjust 0x1008ff22 /* Adjust screen contrast */
59+#define XF86XK_RockerUp 0x1008ff23 /* Rocker switches exist up */
60+#define XF86XK_RockerDown 0x1008ff24 /* and down */
61+#define XF86XK_RockerEnter 0x1008ff25 /* and let you press them */
62+
63+/* Some more "Internet" keyboard symbols */
64+#define XF86XK_Back 0x1008ff26 /* Like back on a browser */
65+#define XF86XK_Forward 0x1008ff27 /* Like forward on a browser */
66+#define XF86XK_Stop 0x1008ff28 /* Stop current operation */
67+#define XF86XK_Refresh 0x1008ff29 /* Refresh the page */
68+#define XF86XK_PowerOff 0x1008ff2a /* Power off system entirely */
69+#define XF86XK_WakeUp 0x1008ff2b /* Wake up system from sleep */
70+#define XF86XK_Eject 0x1008ff2c /* Eject device (e.g. DVD) */
71+#define XF86XK_ScreenSaver 0x1008ff2d /* Invoke screensaver */
72+#define XF86XK_WWW 0x1008ff2e /* Invoke web browser */
73+#define XF86XK_Sleep 0x1008ff2f /* Put system to sleep */
74+#define XF86XK_Favorites 0x1008ff30 /* Show favorite locations */
75+#define XF86XK_AudioPause 0x1008ff31 /* Pause audio playing */
76+#define XF86XK_AudioMedia 0x1008ff32 /* Launch media collection app */
77+#define XF86XK_MyComputer 0x1008ff33 /* Display "My Computer" window */
78+#define XF86XK_VendorHome 0x1008ff34 /* Display vendor home web site */
79+#define XF86XK_LightBulb 0x1008ff35 /* Light bulb keys exist */
80+#define XF86XK_Shop 0x1008ff36 /* Display shopping web site */
81+#define XF86XK_History 0x1008ff37 /* Show history of web surfing */
82+#define XF86XK_OpenURL 0x1008ff38 /* Open selected URL */
83+#define XF86XK_AddFavorite 0x1008ff39 /* Add URL to favorites list */
84+#define XF86XK_HotLinks 0x1008ff3a /* Show "hot" links */
85+#define XF86XK_BrightnessAdjust 0x1008ff3b /* Invoke brightness adj. UI */
86+#define XF86XK_Finance 0x1008ff3c /* Display financial site */
87+#define XF86XK_Community 0x1008ff3d /* Display user's community */
88+#define XF86XK_AudioRewind 0x1008ff3e /* "rewind" audio track */
89+#define XF86XK_BackForward 0x1008ff3f /* ??? */
90+#define XF86XK_Launch0 0x1008ff40 /* Launch Application */
91+#define XF86XK_Launch1 0x1008ff41 /* Launch Application */
92+#define XF86XK_Launch2 0x1008ff42 /* Launch Application */
93+#define XF86XK_Launch3 0x1008ff43 /* Launch Application */
94+#define XF86XK_Launch4 0x1008ff44 /* Launch Application */
95+#define XF86XK_Launch5 0x1008ff45 /* Launch Application */
96+#define XF86XK_Launch6 0x1008ff46 /* Launch Application */
97+#define XF86XK_Launch7 0x1008ff47 /* Launch Application */
98+#define XF86XK_Launch8 0x1008ff48 /* Launch Application */
99+#define XF86XK_Launch9 0x1008ff49 /* Launch Application */
100+#define XF86XK_LaunchA 0x1008ff4a /* Launch Application */
101+#define XF86XK_LaunchB 0x1008ff4b /* Launch Application */
102+#define XF86XK_LaunchC 0x1008ff4c /* Launch Application */
103+#define XF86XK_LaunchD 0x1008ff4d /* Launch Application */
104+#define XF86XK_LaunchE 0x1008ff4e /* Launch Application */
105+#define XF86XK_LaunchF 0x1008ff4f /* Launch Application */
106+
107+#define XF86XK_ApplicationLeft 0x1008ff50 /* switch to application, left */
108+#define XF86XK_ApplicationRight 0x1008ff51 /* switch to application, right*/
109+#define XF86XK_Book 0x1008ff52 /* Launch bookreader */
110+#define XF86XK_CD 0x1008ff53 /* Launch CD/DVD player */
111+#define XF86XK_MediaSelectCD 0x1008ff53 /* Alias for XF86XK_CD */
112+#define XF86XK_Calculater 0x1008ff54 /* Launch Calculater */
113+#define XF86XK_Clear 0x1008ff55 /* Clear window, screen */
114+#define XF86XK_Close 0x1008ff56 /* Close window */
115+#define XF86XK_Copy 0x1008ff57 /* Copy selection */
116+#define XF86XK_Cut 0x1008ff58 /* Cut selection */
117+#define XF86XK_Display 0x1008ff59 /* Output switch key */
118+#define XF86XK_DOS 0x1008ff5a /* Launch DOS (emulation) */
119+#define XF86XK_Documents 0x1008ff5b /* Open documents window */
120+#define XF86XK_Excel 0x1008ff5c /* Launch spread sheet */
121+#define XF86XK_Explorer 0x1008ff5d /* Launch file explorer */
122+#define XF86XK_Game 0x1008ff5e /* Launch game */
123+#define XF86XK_Go 0x1008ff5f /* Go to URL */
124+#define XF86XK_iTouch 0x1008ff60 /* Logitech iTouch- don't use */
125+#define XF86XK_LogOff 0x1008ff61 /* Log off system */
126+#define XF86XK_Market 0x1008ff62 /* ?? */
127+#define XF86XK_Meeting 0x1008ff63 /* enter meeting in calendar */
128+#define XF86XK_MenuKB 0x1008ff65 /* distinguish keyboard from PB */
129+#define XF86XK_MenuPB 0x1008ff66 /* distinguish PB from keyboard */
130+#define XF86XK_MySites 0x1008ff67 /* Favourites */
131+#define XF86XK_New 0x1008ff68 /* New (folder, document... */
132+#define XF86XK_News 0x1008ff69 /* News */
133+#define XF86XK_OfficeHome 0x1008ff6a /* Office home (old Staroffice)*/
134+#define XF86XK_Open 0x1008ff6b /* Open */
135+#define XF86XK_Option 0x1008ff6c /* ?? */
136+#define XF86XK_Paste 0x1008ff6d /* Paste */
137+#define XF86XK_Phone 0x1008ff6e /* Launch phone; dial number */
138+#define XF86XK_Q 0x1008ff70 /* Compaq's Q - don't use */
139+#define XF86XK_Reply 0x1008ff72 /* Reply e.g., mail */
140+#define XF86XK_Reload 0x1008ff73 /* Reload web page, file, etc. */
141+#define XF86XK_RotateWindows 0x1008ff74 /* Rotate windows e.g. xrandr */
142+#define XF86XK_RotationPB 0x1008ff75 /* don't use */
143+#define XF86XK_RotationKB 0x1008ff76 /* don't use */
144+#define XF86XK_Save 0x1008ff77 /* Save (file, document, state */
145+#define XF86XK_ScrollUp 0x1008ff78 /* Scroll window/contents up */
146+#define XF86XK_ScrollDown 0x1008ff79 /* Scrool window/contentd down */
147+#define XF86XK_ScrollClick 0x1008ff7a /* Use XKB mousekeys instead */
148+#define XF86XK_Send 0x1008ff7b /* Send mail, file, object */
149+#define XF86XK_Spell 0x1008ff7c /* Spell checker */
150+#define XF86XK_SplitScreen 0x1008ff7d /* Split window or screen */
151+#define XF86XK_Support 0x1008ff7e /* Get support (??) */
152+#define XF86XK_TaskPane 0x1008ff7f /* Show tasks */
153+#define XF86XK_Terminal 0x1008ff80 /* Launch terminal emulator */
154+#define XF86XK_Tools 0x1008ff81 /* toolbox of desktop/app. */
155+#define XF86XK_Travel 0x1008ff82 /* ?? */
156+#define XF86XK_UserPB 0x1008ff84 /* ?? */
157+#define XF86XK_User1KB 0x1008ff85 /* ?? */
158+#define XF86XK_User2KB 0x1008ff86 /* ?? */
159+#define XF86XK_Video 0x1008ff87 /* Launch video player */
160+#define XF86XK_WheelButton 0x1008ff88 /* button from a mouse wheel */
161+#define XF86XK_Word 0x1008ff89 /* Launch word processor */
162+#define XF86XK_Xfer 0x1008ff8a
163+#define XF86XK_ZoomIn 0x1008ff8b /* zoom in view, map, etc. */
164+#define XF86XK_ZoomOut 0x1008ff8c /* zoom out view, map, etc. */
165+
166+#define XF86XK_Away 0x1008ff8d /* mark yourself as away */
167+#define XF86XK_Messenger 0x1008ff8e /* as in instant messaging */
168+#define XF86XK_WebCam 0x1008ff8f /* Launch web camera app. */
169+#define XF86XK_MailForward 0x1008ff90 /* Forward in mail */
170+#define XF86XK_Pictures 0x1008ff91 /* Show pictures */
171+#define XF86XK_Music 0x1008ff92 /* Launch music application */
172+
173+#define XF86XK_Battery 0x1008ff93 /* Display battery information */
174+#define XF86XK_Bluetooth 0x1008ff94 /* Enable/disable Bluetooth */
175+#define XF86XK_WLAN 0x1008ff95 /* Enable/disable WLAN */
176+#define XF86XK_UWB 0x1008ff96 /* Enable/disable UWB */
177+
178+#define XF86XK_AudioForward 0x1008ff97 /* fast-forward audio track */
179+#define XF86XK_AudioRepeat 0x1008ff98 /* toggle repeat mode */
180+#define XF86XK_AudioRandomPlay 0x1008ff99 /* toggle shuffle mode */
181+#define XF86XK_Subtitle 0x1008ff9a /* cycle through subtitle */
182+#define XF86XK_AudioCycleTrack 0x1008ff9b /* cycle through audio tracks */
183+#define XF86XK_CycleAngle 0x1008ff9c /* cycle through angles */
184+#define XF86XK_FrameBack 0x1008ff9d /* video: go one frame back */
185+#define XF86XK_FrameForward 0x1008ff9e /* video: go one frame forward */
186+#define XF86XK_Time 0x1008ff9f /* display, or shows an entry for time seeking */
187+#define XF86XK_Select 0x1008ffa0 /* Select button on joypads and remotes */
188+#define XF86XK_View 0x1008ffa1 /* Show a view options/properties */
189+#define XF86XK_TopMenu 0x1008ffa2 /* Go to a top-level menu in a video */
190+
191+#define XF86XK_Red 0x1008ffa3 /* Red button */
192+#define XF86XK_Green 0x1008ffa4 /* Green button */
193+#define XF86XK_Yellow 0x1008ffa5 /* Yellow button */
194+#define XF86XK_Blue 0x1008ffa6 /* Blue button */
195+
196+#define XF86XK_Suspend 0x1008ffa7 /* Sleep to RAM */
197+#define XF86XK_Hibernate 0x1008ffa8 /* Sleep to disk */
198+#define XF86XK_TouchpadToggle 0x1008ffa9 /* Toggle between touchpad/trackstick */
199+#define XF86XK_TouchpadOn 0x1008ffb0 /* The touchpad got switched on */
200+#define XF86XK_TouchpadOff 0x1008ffb1 /* The touchpad got switched off */
201+
202+#define XF86XK_AudioMicMute 0x1008ffb2 /* Mute the Mic from the system */
203+
204+#define XF86XK_Keyboard 0x1008ffb3 /* User defined keyboard related action */
205+
206+#define XF86XK_WWAN 0x1008ffb4 /* Toggle WWAN (LTE, UMTS, etc.) radio */
207+#define XF86XK_RFKill 0x1008ffb5 /* Toggle radios on/off */
208+
209+#define XF86XK_AudioPreset 0x1008ffb6 /* Select equalizer preset, e.g. theatre-mode */
210+
211+#define XF86XK_RotationLockToggle 0x1008ffb7 /* Toggle screen rotation lock on/off */
212+
213+#define XF86XK_FullScreen 0x1008ffb8 /* Toggle fullscreen */
214+
215+/* Keys for special action keys (hot keys) */
216+/* Virtual terminals on some operating systems */
217+#define XF86XK_Switch_VT_1 0x1008fe01
218+#define XF86XK_Switch_VT_2 0x1008fe02
219+#define XF86XK_Switch_VT_3 0x1008fe03
220+#define XF86XK_Switch_VT_4 0x1008fe04
221+#define XF86XK_Switch_VT_5 0x1008fe05
222+#define XF86XK_Switch_VT_6 0x1008fe06
223+#define XF86XK_Switch_VT_7 0x1008fe07
224+#define XF86XK_Switch_VT_8 0x1008fe08
225+#define XF86XK_Switch_VT_9 0x1008fe09
226+#define XF86XK_Switch_VT_10 0x1008fe0a
227+#define XF86XK_Switch_VT_11 0x1008fe0b
228+#define XF86XK_Switch_VT_12 0x1008fe0c
229+
230+#define XF86XK_Ungrab 0x1008fe20 /* force ungrab */
231+#define XF86XK_ClearGrab 0x1008fe21 /* kill application with grab */
232+#define XF86XK_Next_VMode 0x1008fe22 /* next video mode available */
233+#define XF86XK_Prev_VMode 0x1008fe23 /* prev. video mode available */
234+#define XF86XK_LogWindowTree 0x1008fe24 /* print window tree to log */
235+#define XF86XK_LogGrabInfo 0x1008fe25 /* print all active grabs to log */
236+
237+
238+/*
239+ * Reserved range for evdev symbols: 0x10081000-0x10081FFF
240+ *
241+ * Key symbols within this range are intended for a 1:1 mapping to the
242+ * Linux kernel input-event-codes.h file:
243+ * - Keysym value: `_EVDEVK(kernel value)`
244+ * - Keysym name: it must be prefixed by `XF86XK_`. The recommended *default*
245+ * name uses the following pattern: `XF86XK_CamelCaseKernelName`. CamelCasing
246+ * is done with a human control as last authority, e.g. see VOD instead of Vod
247+ * for the Video on Demand key. In case that the kernel key name is too
248+ * ambiguous, it is recommended to create a more explicit name with the
249+ * following guidelines:
250+ * 1. Names should be mnemonic.
251+ * 2. Names should avoid acronyms, unless sufficiently common and documented
252+ * in a comment.
253+ * 3. Names should identify a function.
254+ * 4. Keysyms share a common namespace, so keys with a generic name should
255+ * denote a generic function, otherwise it should be renamed to add context.
256+ * E.g. `KEY_OK` has the associated keysym `XF86XK_OK`, while `KEY_TITLE`
257+ * (used to open a menu to select a chapter of a media) is associated to
258+ * the keysym `XF86XK_MediaTitleMenu` to avoid ambiguity.
259+ * 5. Keysyms should support designing *portable* applications, therefore
260+ * their names should be self-explaining to facilitate finding them and
261+ * to avoid misuse.
262+ * 6. The “HID usage tables for USB” can be used if there is an unambiguous
263+ * mapping. See:
264+ * - Reference document: https://usb.org/document-library/hid-usage-tables-16
265+ * - Mapping in the Linux source file: `drivers/hid/hid-input.c` as of 2025-07
266+ *
267+ * For example, the kernel
268+ * #define KEY_MACRO_RECORD_START 0x2b0
269+ * effectively ends up as:
270+ * #define XF86XK_MacroRecordStart 0x100812b0
271+ *
272+ * For historical reasons, some keysyms within the reserved range will be
273+ * missing, most notably all "normal" keys that are mapped through default
274+ * XKB layouts (e.g. KEY_Q).
275+ *
276+ * The format for #defines is strict:
277+ *
278+ * #define XF86XK_Foo<spaces…>_EVDEVK(0xABC)<spaces…> |* kver KEY_FOO *|
279+ * #define XF86XK_Foo<spaces…>_EVDEVK(0xABC)<spaces…> |* Alias for XF86XK_Bar *|
280+ * #define XF86XK_Foo<spaces…>_EVDEVK(0xABC)<spaces…> |* Deprecated alias for XF86XK_Bar *|
281+ *
282+ * Where
283+ * - alignment by spaces
284+ * - the _EVDEVK macro must be used
285+ * - the hex code must be in uppercase hex
286+ * - the kernel version (kver) is in the form v5.10
287+ * - kver and key name are within a slash-star comment (a pipe is used in
288+ * this example for technical reasons)
289+ * These #defines are parsed by scripts. Do not stray from the given format.
290+ *
291+ * Where the evdev keycode is mapped to a different symbol, please add a
292+ * comment line starting with Use: but otherwise the same format, e.g.
293+ * Use: XF86XK_RotationLockToggle _EVDEVK(0x231) v4.16 KEY_ROTATE_LOCK_TOGGLE
294+ *
295+ */
296+#define _EVDEVK(_v) (0x10081000 + _v)
297+/* Use: XF86XK_Eject _EVDEVK(0x0a2) KEY_EJECTCLOSECD */
298+/* Use: XF86XK_AudioNext _EVDEVK(0x0a3) KEY_NEXTSONG */
299+#define XF86XK_MediaPlayPause _EVDEVK(0x0a4) /* KEY_PLAYPAUSE */
300+/* Use: XF86XK_AudioPrev _EVDEVK(0x0a5) KEY_PREVIOUSSONG */
301+/* NOTE: Currently no use case for CD-specific keysyms */
302+/* Use: XF86XK_AudioStop _EVDEVK(0x0a6) KEY_STOPCD */
303+/* Use: XF86XK_AudioRecord _EVDEVK(0x0a7) KEY_RECORD */
304+/* Use: XF86XK_AudioRewind _EVDEVK(0x0a8) KEY_REWIND */
305+/* Use: XF86XK_Phone _EVDEVK(0x0a9) KEY_PHONE */
306+/* TODO: unclear function _EVDEVK(0x0aa) KEY_ISO */
307+/* TODO: unclear function _EVDEVK(0x0ab) KEY_CONFIG */
308+/* Use: XF86XK_HomePage _EVDEVK(0x0ac) KEY_HOMEPAGE */
309+/* Use: XF86XK_Refresh _EVDEVK(0x0ad) KEY_REFRESH */
310+#define XF86XK_Exit _EVDEVK(0x0ae) /* KEY_EXIT */
311+/* TODO: unclear function _EVDEVK(0x0af) KEY_MOVE */
312+/* TODO: unclear function _EVDEVK(0x0b0) KEY_EDIT */
313+/* Use: XF86XK_ScrollUp _EVDEVK(0x0b1) KEY_SCROLLUP */
314+/* Use: XF86XK_ScrollDown _EVDEVK(0x0b2) KEY_SCROLLDOWN */
315+/* NOTE: Unless there are special actions bound to the keys KEY_KPLEFTPAREN and
316+ * KEY_KPRIGHTPAREN, there is no reason to introduce keypad-specific keysyms */
317+/* Use: XK_parenleft _EVDEVK(0x0b3) KEY_KPLEFTPAREN */
318+/* Use: XK_parenright _EVDEVK(0x0b4) KEY_KPRIGHTPAREN */
319+/* Use: XF86XK_New _EVDEVK(0x0b5) v2.6.14 KEY_NEW */
320+/* Use: XK_Redo _EVDEVK(0x0b6) v2.6.14 KEY_REDO */
321+/* Use: XK_F13 _EVDEVK(0x0b7) KEY_F13 */
322+/* Use: XK_F14 _EVDEVK(0x0b8) KEY_F14 */
323+/* Use: XK_F15 _EVDEVK(0x0b9) KEY_F15 */
324+/* Use: XK_F16 _EVDEVK(0x0ba) KEY_F16 */
325+/* Use: XK_F17 _EVDEVK(0x0bb) KEY_F17 */
326+/* Use: XK_F18 _EVDEVK(0x0bc) KEY_F18 */
327+/* Use: XK_F19 _EVDEVK(0x0bd) KEY_F19 */
328+/* Use: XK_F20 _EVDEVK(0x0be) KEY_F20 */
329+/* Use: XK_F21 _EVDEVK(0x0bf) KEY_F21 */
330+/* Use: XK_F22 _EVDEVK(0x0c0) KEY_F22 */
331+/* Use: XK_F23 _EVDEVK(0x0c1) KEY_F23 */
332+/* Use: XK_F24 _EVDEVK(0x0c2) KEY_F24 */
333+/* NOTE: Currently no use case for CD-specific keysyms */
334+/* Use: XF86XK_AudioPlay _EVDEVK(0x0c8) KEY_PLAYCD */
335+/* Use: XF86XK_AudioPause _EVDEVK(0x0c9) KEY_PAUSECD */
336+/* Use: XF86XK_Launch3 _EVDEVK(0x0ca) KEY_PROG3 */
337+/* Use: XF86XK_Launch4 _EVDEVK(0x0cb) KEY_PROG4 */
338+/* NOTE: KEY_DASHBOARD has been mapped to LaunchB in xkeyboard-config since 2011 */
339+/* Use: XF86XK_LaunchB _EVDEVK(0x0cc) v2.6.28 KEY_DASHBOARD */
340+/* Use: XF86XK_Suspend _EVDEVK(0x0cd) KEY_SUSPEND */
341+/* Use: XF86XK_Close _EVDEVK(0x0ce) KEY_CLOSE */
342+/* Use: XF86XK_AudioPlay _EVDEVK(0x0cf) KEY_PLAY */
343+/* Use: XF86XK_AudioForward _EVDEVK(0x0d0) KEY_FASTFORWARD */
344+#define XF86XK_AudioBassBoost _EVDEVK(0x0d1) /* KEY_BASSBOOST */
345+/* Use: XK_Print _EVDEVK(0x0d2) KEY_PRINT */
346+/* NOTE: The following keys seem specific to some HP keyboards such as SK-2565 USB */
347+/* TODO: unclear HP-specific function? _EVDEVK(0x0d3) KEY_HP */
348+/* Use: XF86XK_WebCam _EVDEVK(0x0d4) KEY_CAMERA */
349+/* TODO: unclear HP-specific function? _EVDEVK(0x0d5) KEY_SOUND */
350+/* TODO: unclear HP-specific function? _EVDEVK(0x0d6) KEY_QUESTION */
351+/* Use: XF86XK_Mail _EVDEVK(0x0d7) KEY_EMAIL */
352+/* Use: XF86XK_Messenger _EVDEVK(0x0d8) KEY_CHAT */
353+/* Use: XF86XK_Search _EVDEVK(0x0d9) KEY_SEARCH */
354+/* TODO: unclear HP-specific function? _EVDEVK(0x0da) KEY_CONNECT */
355+/* Use: XF86XK_Finance _EVDEVK(0x0db) KEY_FINANCE */
356+#define XF86XK_Sport _EVDEVK(0x0dc) /* KEY_SPORT */
357+/* Use: XF86XK_Shop _EVDEVK(0x0dd) KEY_SHOP */
358+/* TODO: unclear function _EVDEVK(0x0de) KEY_ALTERASE */
359+/* Use: XK_Cancel _EVDEVK(0x0df) KEY_CANCEL */
360+/* Use: XF86XK_MonBrightnessDown _EVDEVK(0x0e0) KEY_BRIGHTNESSDOWN */
361+/* Use: XF86XK_MonBrightnessUp _EVDEVK(0x0e1) KEY_BRIGHTNESSUP */
362+/* Use: XF86XK_AudioMedia _EVDEVK(0x0e2) KEY_MEDIA */
363+/* Use: XF86XK_Display _EVDEVK(0x0e3) v2.6.12 KEY_SWITCHVIDEOMODE */
364+/* Use: XF86XK_KbdLightOnOff _EVDEVK(0x0e4) v2.6.12 KEY_KBDILLUMTOGGLE */
365+/* Use: XF86XK_KbdBrightnessDown _EVDEVK(0x0e5) v2.6.12 KEY_KBDILLUMDOWN */
366+/* Use: XF86XK_KbdBrightnessUp _EVDEVK(0x0e6) v2.6.12 KEY_KBDILLUMUP */
367+/* Use: XF86XK_Send _EVDEVK(0x0e7) v2.6.14 KEY_SEND */
368+/* Use: XF86XK_Reply _EVDEVK(0x0e8) v2.6.14 KEY_REPLY */
369+/* Use: XF86XK_MailForward _EVDEVK(0x0e9) v2.6.14 KEY_FORWARDMAIL */
370+/* Use: XF86XK_Save _EVDEVK(0x0ea) v2.6.14 KEY_SAVE */
371+/* Use: XF86XK_Documents _EVDEVK(0x0eb) v2.6.14 KEY_DOCUMENTS */
372+/* Use: XF86XK_Battery _EVDEVK(0x0ec) v2.6.17 KEY_BATTERY */
373+/* Use: XF86XK_Bluetooth _EVDEVK(0x0ed) v2.6.19 KEY_BLUETOOTH */
374+/* Use: XF86XK_WLAN _EVDEVK(0x0ee) v2.6.19 KEY_WLAN */
375+/* Use: XF86XK_UWB _EVDEVK(0x0ef) v2.6.24 KEY_UWB */
376+/* Use: NoSymbol _EVDEVK(0x0f0) KEY_UNKNOWN */
377+/* Use: XF86XK_Next_VMode _EVDEVK(0x0f1) v2.6.23 KEY_VIDEO_NEXT */
378+/* Use: XF86XK_Prev_VMode _EVDEVK(0x0f2) v2.6.23 KEY_VIDEO_PREV */
379+/* Use: XF86XK_MonBrightnessCycle _EVDEVK(0x0f3) v2.6.23 KEY_BRIGHTNESS_CYCLE */
380+#define XF86XK_BrightnessAuto _EVDEVK(0x0f4) /* Deprecated alias for XF86XK_MonBrightnessAuto */
381+#define XF86XK_MonBrightnessAuto _EVDEVK(0x0f4) /* v3.16 KEY_BRIGHTNESS_AUTO */
382+#define XF86XK_DisplayOff _EVDEVK(0x0f5) /* v2.6.23 KEY_DISPLAY_OFF */
383+/* Use: XF86XK_WWAN _EVDEVK(0x0f6) v3.13 KEY_WWAN */
384+/* Use: XF86XK_RFKill _EVDEVK(0x0f7) v2.6.33 KEY_RFKILL */
385+/* Use: XF86XK_AudioMicMute _EVDEVK(0x0f8) v3.1 KEY_MICMUTE */
386+#define XF86XK_OK _EVDEVK(0x160) /* v2.5.26 KEY_OK */
387+/* Use: XF86XK_Select _EVDEVK(0x161) v2.5.26 KEY_SELECT */
388+#define XF86XK_GoTo _EVDEVK(0x162) /* v2.5.26 KEY_GOTO */
389+/* Use: XF86XK_Clear _EVDEVK(0x163) v2.5.26 KEY_CLEAR */
390+/* TODO: Unclear function _EVDEVK(0x164) v2.5.26 KEY_POWER2 */
391+/* Use: XF86XK_Option _EVDEVK(0x165) v2.5.26 KEY_OPTION */
392+#define XF86XK_Info _EVDEVK(0x166) /* v2.5.26 KEY_INFO */
393+/* Use: XF86XK_Time _EVDEVK(0x167) v2.5.26 KEY_TIME */
394+#define XF86XK_VendorLogo _EVDEVK(0x168) /* v2.5.26 KEY_VENDOR */
395+/* TODO: unclear function _EVDEVK(0x169) v2.5.26 KEY_ARCHIVE */
396+#define XF86XK_MediaSelectProgramGuide _EVDEVK(0x16a) /* v2.5.26 KEY_PROGRAM */
397+/* Use: XF86XK_NextFavorite _EVDEVK(0x16b) v2.5.26 KEY_CHANNEL */
398+/* Use: XF86XK_Favorites _EVDEVK(0x16c) v2.5.26 KEY_FAVORITES */
399+/* Use: XF86XK_MediaSelectProgramGuide _EVDEVK(0x16d) v2.5.26 KEY_EPG */
400+#define XF86XK_MediaSelectHome _EVDEVK(0x16e) /* v2.5.26 KEY_PVR */
401+/* TODO: Multimedia Home Platform _EVDEVK(0x16f) v2.5.26 KEY_MHP */
402+#define XF86XK_MediaLanguageMenu _EVDEVK(0x170) /* v2.5.26 KEY_LANGUAGE */
403+#define XF86XK_MediaTitleMenu _EVDEVK(0x171) /* v2.5.26 KEY_TITLE */
404+/* Use: XF86XK_Subtitle _EVDEVK(0x172) v2.5.26 KEY_SUBTITLE */
405+/* Use: XF86XK_CycleAngle _EVDEVK(0x173) v2.5.26 KEY_ANGLE */
406+/* Use: XF86XK_FullScreen _EVDEVK(0x174) v5.1 KEY_FULL_SCREEN */
407+#define XF86XK_AudioChannelMode _EVDEVK(0x175) /* v2.5.26 KEY_MODE */
408+/* Use: XF86XK_Keyboard _EVDEVK(0x176) v2.5.26 KEY_KEYBOARD */
409+#define XF86XK_AspectRatio _EVDEVK(0x177) /* v5.1 KEY_ASPECT_RATIO */
410+#define XF86XK_MediaSelectPC _EVDEVK(0x178) /* v2.5.26 KEY_PC */
411+#define XF86XK_MediaSelectTV _EVDEVK(0x179) /* v2.5.26 KEY_TV */
412+#define XF86XK_MediaSelectCable _EVDEVK(0x17a) /* v2.5.26 KEY_TV2 */
413+#define XF86XK_MediaSelectVCR _EVDEVK(0x17b) /* v2.5.26 KEY_VCR */
414+#define XF86XK_MediaSelectVCRPlus _EVDEVK(0x17c) /* v2.5.26 KEY_VCR2 */
415+#define XF86XK_MediaSelectSatellite _EVDEVK(0x17d) /* v2.5.26 KEY_SAT */
416+/* TODO: unclear media selector _EVDEVK(0x17e) v2.5.26 KEY_SAT2 */
417+/* Use: XF86XK_MediaSelectCD _EVDEVK(0x17f) v2.5.26 KEY_CD */
418+#define XF86XK_MediaSelectTape _EVDEVK(0x180) /* v2.5.26 KEY_TAPE */
419+#define XF86XK_MediaSelectRadio _EVDEVK(0x181) /* v2.5.26 KEY_RADIO */
420+#define XF86XK_MediaSelectTuner _EVDEVK(0x182) /* v2.5.26 KEY_TUNER */
421+#define XF86XK_MediaPlayer _EVDEVK(0x183) /* v2.5.26 KEY_PLAYER */
422+#define XF86XK_MediaSelectTeletext _EVDEVK(0x184) /* v2.5.26 KEY_TEXT */
423+#define XF86XK_DVD _EVDEVK(0x185) /* v2.5.26 KEY_DVD */
424+#define XF86XK_MediaSelectDVD _EVDEVK(0x185) /* Alias for XF86XK_DVD */
425+#define XF86XK_MediaSelectAuxiliary _EVDEVK(0x186) /* v2.5.26 KEY_AUX */
426+/* TODO: unclear media selector _EVDEVK(0x187) v2.5.26 KEY_MP3 */
427+#define XF86XK_Audio _EVDEVK(0x188) /* v2.5.26 KEY_AUDIO */
428+/* Use: XF86XK_Video _EVDEVK(0x189) v2.5.26 KEY_VIDEO */
429+/* TODO: unclear function _EVDEVK(0x18a) v2.5.26 KEY_DIRECTORY */
430+/* TODO: unclear function _EVDEVK(0x18b) v2.5.26 KEY_LIST */
431+/* Use: XF86XK_Memo _EVDEVK(0x18c) v2.5.26 KEY_MEMO */
432+/* Use: XF86XK_Calendar _EVDEVK(0x18d) v2.5.26 KEY_CALENDAR */
433+/* Use: XF86XK_Red _EVDEVK(0x18e) v2.5.26 KEY_RED */
434+/* Use: XF86XK_Green _EVDEVK(0x18f) v2.5.26 KEY_GREEN */
435+/* Use: XF86XK_Yellow _EVDEVK(0x190) v2.5.26 KEY_YELLOW */
436+/* Use: XF86XK_Blue _EVDEVK(0x191) v2.5.26 KEY_BLUE */
437+#define XF86XK_ChannelUp _EVDEVK(0x192) /* v2.5.26 KEY_CHANNELUP */
438+#define XF86XK_ChannelDown _EVDEVK(0x193) /* v2.5.26 KEY_CHANNELDOWN */
439+/* TODO: unclear function _EVDEVK(0x194) v2.5.26 KEY_FIRST */
440+/* TODO: unclear function _EVDEVK(0x195) v2.5.26 KEY_LAST */
441+/* TODO: unclear function _EVDEVK(0x196) v2.5.26 KEY_AB */
442+/* TODO: unclear function _EVDEVK(0x197) v2.5.26 KEY_NEXT */
443+/* TODO: unclear function _EVDEVK(0x198) v2.5.26 KEY_RESTART */
444+#define XF86XK_MediaPlaySlow _EVDEVK(0x199) /* v2.5.26 KEY_SLOW */
445+/* Use: XF86XK_AudioRandomPlay _EVDEVK(0x19a) v2.5.26 KEY_SHUFFLE */
446+#define XF86XK_Break _EVDEVK(0x19b) /* v2.5.26 KEY_BREAK */
447+/* TODO: unclear function _EVDEVK(0x19c) v2.5.26 KEY_PREVIOUS */
448+#define XF86XK_NumberEntryMode _EVDEVK(0x19d) /* v2.5.26 KEY_DIGITS */
449+/* TODO: unclear function _EVDEVK(0x19e) v2.5.26 KEY_TEEN */
450+/* TODO: unclear function (Twenties?) _EVDEVK(0x19f) v2.5.26 KEY_TWEN */
451+#define XF86XK_VideoPhone _EVDEVK(0x1a0) /* v2.6.20 KEY_VIDEOPHONE */
452+/* Use: XF86XK_Game _EVDEVK(0x1a1) v2.6.20 KEY_GAMES */
453+/* Use: XF86XK_ZoomIn _EVDEVK(0x1a2) v2.6.20 KEY_ZOOMIN */
454+/* Use: XF86XK_ZoomOut _EVDEVK(0x1a3) v2.6.20 KEY_ZOOMOUT */
455+#define XF86XK_ZoomReset _EVDEVK(0x1a4) /* v2.6.20 KEY_ZOOMRESET */
456+/* Use: XF86XK_Word _EVDEVK(0x1a5) v2.6.20 KEY_WORDPROCESSOR */
457+#define XF86XK_Editor _EVDEVK(0x1a6) /* v2.6.20 KEY_EDITOR */
458+/* Use: XF86XK_Excel _EVDEVK(0x1a7) v2.6.20 KEY_SPREADSHEET */
459+#define XF86XK_GraphicsEditor _EVDEVK(0x1a8) /* v2.6.20 KEY_GRAPHICSEDITOR */
460+#define XF86XK_Presentation _EVDEVK(0x1a9) /* v2.6.20 KEY_PRESENTATION */
461+#define XF86XK_Database _EVDEVK(0x1aa) /* v2.6.20 KEY_DATABASE */
462+/* Use: XF86XK_News _EVDEVK(0x1ab) v2.6.20 KEY_NEWS */
463+#define XF86XK_Voicemail _EVDEVK(0x1ac) /* v2.6.20 KEY_VOICEMAIL */
464+#define XF86XK_Addressbook _EVDEVK(0x1ad) /* v2.6.20 KEY_ADDRESSBOOK */
465+/* Use: XF86XK_Messenger _EVDEVK(0x1ae) v2.6.20 KEY_MESSENGER */
466+#define XF86XK_DisplayToggle _EVDEVK(0x1af) /* v2.6.20 KEY_DISPLAYTOGGLE */
467+#define XF86XK_SpellCheck _EVDEVK(0x1b0) /* v2.6.24 KEY_SPELLCHECK */
468+/* Use: XF86XK_LogOff _EVDEVK(0x1b1) v2.6.24 KEY_LOGOFF */
469+/* Use: XK_dollar _EVDEVK(0x1b2) v2.6.24 KEY_DOLLAR */
470+/* Use: XK_EuroSign _EVDEVK(0x1b3) v2.6.24 KEY_EURO */
471+/* Use: XF86XK_FrameBack _EVDEVK(0x1b4) v2.6.24 KEY_FRAMEBACK */
472+/* Use: XF86XK_FrameForward _EVDEVK(0x1b5) v2.6.24 KEY_FRAMEFORWARD */
473+#define XF86XK_ContextMenu _EVDEVK(0x1b6) /* v2.6.24 KEY_CONTEXT_MENU */
474+#define XF86XK_MediaRepeat _EVDEVK(0x1b7) /* v2.6.26 KEY_MEDIA_REPEAT */
475+#define XF86XK_10ChannelsUp _EVDEVK(0x1b8) /* v2.6.38 KEY_10CHANNELSUP */
476+#define XF86XK_10ChannelsDown _EVDEVK(0x1b9) /* v2.6.38 KEY_10CHANNELSDOWN */
477+#define XF86XK_Images _EVDEVK(0x1ba) /* v2.6.39 KEY_IMAGES */
478+#define XF86XK_NotificationCenter _EVDEVK(0x1bc) /* v5.10 KEY_NOTIFICATION_CENTER */
479+#define XF86XK_PickupPhone _EVDEVK(0x1bd) /* v5.10 KEY_PICKUP_PHONE */
480+#define XF86XK_HangupPhone _EVDEVK(0x1be) /* v5.10 KEY_HANGUP_PHONE */
481+#define XF86XK_LinkPhone _EVDEVK(0x1bf) /* v6.14 KEY_LINK_PHONE */
482+/* NOTE: The following seem to be legacy terminal keys. Ignored due to lack of use cases */
483+/* TODO: XF86XK_DeleteToEndOfLine? _EVDEVK(0x1c0) KEY_DEL_EOL */
484+/* TODO: XF86XK_DeleteToEndOfScreen? _EVDEVK(0x1c1) KEY_DEL_EOS */
485+/* TODO: XF86XK_InsertLine? _EVDEVK(0x1c2) KEY_INS_LINE */
486+/* TODO: XF86XK_DeleteLine? _EVDEVK(0x1c3) KEY_DEL_LINE */
487+#define XF86XK_Fn _EVDEVK(0x1d0) /* KEY_FN */
488+#define XF86XK_Fn_Esc _EVDEVK(0x1d1) /* KEY_FN_ESC */
489+#define XF86XK_Fn_F1 _EVDEVK(0x1d2) /* KEY_FN_F1 */
490+#define XF86XK_Fn_F2 _EVDEVK(0x1d3) /* KEY_FN_F2 */
491+#define XF86XK_Fn_F3 _EVDEVK(0x1d4) /* KEY_FN_F3 */
492+#define XF86XK_Fn_F4 _EVDEVK(0x1d5) /* KEY_FN_F4 */
493+#define XF86XK_Fn_F5 _EVDEVK(0x1d6) /* KEY_FN_F5 */
494+#define XF86XK_Fn_F6 _EVDEVK(0x1d7) /* KEY_FN_F6 */
495+#define XF86XK_Fn_F7 _EVDEVK(0x1d8) /* KEY_FN_F7 */
496+#define XF86XK_Fn_F8 _EVDEVK(0x1d9) /* KEY_FN_F8 */
497+#define XF86XK_Fn_F9 _EVDEVK(0x1da) /* KEY_FN_F9 */
498+#define XF86XK_Fn_F10 _EVDEVK(0x1db) /* KEY_FN_F10 */
499+#define XF86XK_Fn_F11 _EVDEVK(0x1dc) /* KEY_FN_F11 */
500+#define XF86XK_Fn_F12 _EVDEVK(0x1dd) /* KEY_FN_F12 */
501+#define XF86XK_Fn_1 _EVDEVK(0x1de) /* KEY_FN_1 */
502+#define XF86XK_Fn_2 _EVDEVK(0x1df) /* KEY_FN_2 */
503+#define XF86XK_Fn_D _EVDEVK(0x1e0) /* KEY_FN_D */
504+#define XF86XK_Fn_E _EVDEVK(0x1e1) /* KEY_FN_E */
505+#define XF86XK_Fn_F _EVDEVK(0x1e2) /* KEY_FN_F */
506+#define XF86XK_Fn_S _EVDEVK(0x1e3) /* KEY_FN_S */
507+#define XF86XK_Fn_B _EVDEVK(0x1e4) /* KEY_FN_B */
508+#define XF86XK_FnRightShift _EVDEVK(0x1e5) /* v5.10 KEY_FN_RIGHT_SHIFT */
509+/* Use: XK_braille_dot_1 _EVDEVK(0x1f1) v2.6.17 KEY_BRL_DOT1 */
510+/* Use: XK_braille_dot_2 _EVDEVK(0x1f2) v2.6.17 KEY_BRL_DOT2 */
511+/* Use: XK_braille_dot_3 _EVDEVK(0x1f3) v2.6.17 KEY_BRL_DOT3 */
512+/* Use: XK_braille_dot_4 _EVDEVK(0x1f4) v2.6.17 KEY_BRL_DOT4 */
513+/* Use: XK_braille_dot_5 _EVDEVK(0x1f5) v2.6.17 KEY_BRL_DOT5 */
514+/* Use: XK_braille_dot_6 _EVDEVK(0x1f6) v2.6.17 KEY_BRL_DOT6 */
515+/* Use: XK_braille_dot_7 _EVDEVK(0x1f7) v2.6.17 KEY_BRL_DOT7 */
516+/* Use: XK_braille_dot_8 _EVDEVK(0x1f8) v2.6.17 KEY_BRL_DOT8 */
517+/* Use: XK_braille_dot_9 _EVDEVK(0x1f9) v2.6.23 KEY_BRL_DOT9 */
518+/* Use: XK_braille_dot_1 _EVDEVK(0x1fa) v2.6.23 KEY_BRL_DOT10 */
519+#define XF86XK_Numeric0 _EVDEVK(0x200) /* v2.6.28 KEY_NUMERIC_0 */
520+#define XF86XK_Numeric1 _EVDEVK(0x201) /* v2.6.28 KEY_NUMERIC_1 */
521+#define XF86XK_Numeric2 _EVDEVK(0x202) /* v2.6.28 KEY_NUMERIC_2 */
522+#define XF86XK_Numeric3 _EVDEVK(0x203) /* v2.6.28 KEY_NUMERIC_3 */
523+#define XF86XK_Numeric4 _EVDEVK(0x204) /* v2.6.28 KEY_NUMERIC_4 */
524+#define XF86XK_Numeric5 _EVDEVK(0x205) /* v2.6.28 KEY_NUMERIC_5 */
525+#define XF86XK_Numeric6 _EVDEVK(0x206) /* v2.6.28 KEY_NUMERIC_6 */
526+#define XF86XK_Numeric7 _EVDEVK(0x207) /* v2.6.28 KEY_NUMERIC_7 */
527+#define XF86XK_Numeric8 _EVDEVK(0x208) /* v2.6.28 KEY_NUMERIC_8 */
528+#define XF86XK_Numeric9 _EVDEVK(0x209) /* v2.6.28 KEY_NUMERIC_9 */
529+#define XF86XK_NumericStar _EVDEVK(0x20a) /* v2.6.28 KEY_NUMERIC_STAR */
530+#define XF86XK_NumericPound _EVDEVK(0x20b) /* v2.6.28 KEY_NUMERIC_POUND */
531+#define XF86XK_NumericA _EVDEVK(0x20c) /* v4.1 KEY_NUMERIC_A */
532+#define XF86XK_NumericB _EVDEVK(0x20d) /* v4.1 KEY_NUMERIC_B */
533+#define XF86XK_NumericC _EVDEVK(0x20e) /* v4.1 KEY_NUMERIC_C */
534+#define XF86XK_NumericD _EVDEVK(0x20f) /* v4.1 KEY_NUMERIC_D */
535+#define XF86XK_CameraFocus _EVDEVK(0x210) /* v2.6.33 KEY_CAMERA_FOCUS */
536+#define XF86XK_WPSButton _EVDEVK(0x211) /* v2.6.34 KEY_WPS_BUTTON */
537+/* Use: XF86XK_TouchpadToggle _EVDEVK(0x212) v2.6.37 KEY_TOUCHPAD_TOGGLE */
538+/* Use: XF86XK_TouchpadOn _EVDEVK(0x213) v2.6.37 KEY_TOUCHPAD_ON */
539+/* Use: XF86XK_TouchpadOff _EVDEVK(0x214) v2.6.37 KEY_TOUCHPAD_OFF */
540+#define XF86XK_CameraZoomIn _EVDEVK(0x215) /* v2.6.39 KEY_CAMERA_ZOOMIN */
541+#define XF86XK_CameraZoomOut _EVDEVK(0x216) /* v2.6.39 KEY_CAMERA_ZOOMOUT */
542+#define XF86XK_CameraUp _EVDEVK(0x217) /* v2.6.39 KEY_CAMERA_UP */
543+#define XF86XK_CameraDown _EVDEVK(0x218) /* v2.6.39 KEY_CAMERA_DOWN */
544+#define XF86XK_CameraLeft _EVDEVK(0x219) /* v2.6.39 KEY_CAMERA_LEFT */
545+#define XF86XK_CameraRight _EVDEVK(0x21a) /* v2.6.39 KEY_CAMERA_RIGHT */
546+#define XF86XK_AttendantOn _EVDEVK(0x21b) /* v3.10 KEY_ATTENDANT_ON */
547+#define XF86XK_AttendantOff _EVDEVK(0x21c) /* v3.10 KEY_ATTENDANT_OFF */
548+#define XF86XK_AttendantToggle _EVDEVK(0x21d) /* v3.10 KEY_ATTENDANT_TOGGLE */
549+#define XF86XK_LightsToggle _EVDEVK(0x21e) /* v3.10 KEY_LIGHTS_TOGGLE */
550+#define XF86XK_ALSToggle _EVDEVK(0x230) /* v3.13 KEY_ALS_TOGGLE */
551+/* Use: XF86XK_RotationLockToggle _EVDEVK(0x231) v4.16 KEY_ROTATE_LOCK_TOGGLE */
552+#define XF86XK_RefreshRateToggle _EVDEVK(0x232) /* v6.9 KEY_REFRESH_RATE_TOGGLE */
553+#define XF86XK_Buttonconfig _EVDEVK(0x240) /* v3.16 KEY_BUTTONCONFIG */
554+#define XF86XK_Taskmanager _EVDEVK(0x241) /* v3.16 KEY_TASKMANAGER */
555+#define XF86XK_Journal _EVDEVK(0x242) /* v3.16 KEY_JOURNAL */
556+#define XF86XK_ControlPanel _EVDEVK(0x243) /* v3.16 KEY_CONTROLPANEL */
557+#define XF86XK_AppSelect _EVDEVK(0x244) /* v3.16 KEY_APPSELECT */
558+#define XF86XK_Screensaver _EVDEVK(0x245) /* v3.16 KEY_SCREENSAVER */
559+#define XF86XK_VoiceCommand _EVDEVK(0x246) /* v3.16 KEY_VOICECOMMAND */
560+#define XF86XK_Assistant _EVDEVK(0x247) /* v4.13 KEY_ASSISTANT */
561+/* Use: XK_ISO_Next_Group _EVDEVK(0x248) v5.2 KEY_KBD_LAYOUT_NEXT */
562+#define XF86XK_EmojiPicker _EVDEVK(0x249) /* v5.13 KEY_EMOJI_PICKER */
563+#define XF86XK_Dictate _EVDEVK(0x24a) /* v5.17 KEY_DICTATE */
564+#define XF86XK_CameraAccessEnable _EVDEVK(0x24b) /* v6.2 KEY_CAMERA_ACCESS_ENABLE */
565+#define XF86XK_CameraAccessDisable _EVDEVK(0x24c) /* v6.2 KEY_CAMERA_ACCESS_DISABLE */
566+#define XF86XK_CameraAccessToggle _EVDEVK(0x24d) /* v6.2 KEY_CAMERA_ACCESS_TOGGLE */
567+#define XF86XK_Accessibility _EVDEVK(0x24e) /* v6.10 KEY_ACCESSIBILITY */
568+#define XF86XK_DoNotDisturb _EVDEVK(0x24f) /* v6.10 KEY_DO_NOT_DISTURB */
569+#define XF86XK_BrightnessMin _EVDEVK(0x250) /* v3.16 KEY_BRIGHTNESS_MIN */
570+#define XF86XK_BrightnessMax _EVDEVK(0x251) /* v3.16 KEY_BRIGHTNESS_MAX */
571+#define XF86XK_KbdInputAssistPrev _EVDEVK(0x260) /* v3.18 KEY_KBDINPUTASSIST_PREV */
572+#define XF86XK_KbdInputAssistNext _EVDEVK(0x261) /* v3.18 KEY_KBDINPUTASSIST_NEXT */
573+#define XF86XK_KbdInputAssistPrevgroup _EVDEVK(0x262) /* v3.18 KEY_KBDINPUTASSIST_PREVGROUP */
574+#define XF86XK_KbdInputAssistNextgroup _EVDEVK(0x263) /* v3.18 KEY_KBDINPUTASSIST_NEXTGROUP */
575+#define XF86XK_KbdInputAssistAccept _EVDEVK(0x264) /* v3.18 KEY_KBDINPUTASSIST_ACCEPT */
576+#define XF86XK_KbdInputAssistCancel _EVDEVK(0x265) /* v3.18 KEY_KBDINPUTASSIST_CANCEL */
577+#define XF86XK_RightUp _EVDEVK(0x266) /* v4.7 KEY_RIGHT_UP */
578+#define XF86XK_RightDown _EVDEVK(0x267) /* v4.7 KEY_RIGHT_DOWN */
579+#define XF86XK_LeftUp _EVDEVK(0x268) /* v4.7 KEY_LEFT_UP */
580+#define XF86XK_LeftDown _EVDEVK(0x269) /* v4.7 KEY_LEFT_DOWN */
581+#define XF86XK_RootMenu _EVDEVK(0x26a) /* v4.7 KEY_ROOT_MENU */
582+#define XF86XK_MediaTopMenu _EVDEVK(0x26b) /* v4.7 KEY_MEDIA_TOP_MENU */
583+#define XF86XK_Numeric11 _EVDEVK(0x26c) /* v4.7 KEY_NUMERIC_11 */
584+#define XF86XK_Numeric12 _EVDEVK(0x26d) /* v4.7 KEY_NUMERIC_12 */
585+#define XF86XK_AudioDesc _EVDEVK(0x26e) /* v4.7 KEY_AUDIO_DESC */
586+#define XF86XK_3DMode _EVDEVK(0x26f) /* v4.7 KEY_3D_MODE */
587+#define XF86XK_NextFavorite _EVDEVK(0x270) /* v4.7 KEY_NEXT_FAVORITE */
588+#define XF86XK_StopRecord _EVDEVK(0x271) /* v4.7 KEY_STOP_RECORD */
589+#define XF86XK_PauseRecord _EVDEVK(0x272) /* v4.7 KEY_PAUSE_RECORD */
590+#define XF86XK_VOD _EVDEVK(0x273) /* v4.7 KEY_VOD */
591+#define XF86XK_Unmute _EVDEVK(0x274) /* v4.7 KEY_UNMUTE */
592+#define XF86XK_FastReverse _EVDEVK(0x275) /* v4.7 KEY_FASTREVERSE */
593+#define XF86XK_SlowReverse _EVDEVK(0x276) /* v4.7 KEY_SLOWREVERSE */
594+#define XF86XK_Data _EVDEVK(0x277) /* v4.7 KEY_DATA */
595+#define XF86XK_OnScreenKeyboard _EVDEVK(0x278) /* v4.12 KEY_ONSCREEN_KEYBOARD */
596+#define XF86XK_PrivacyScreenToggle _EVDEVK(0x279) /* v5.5 KEY_PRIVACY_SCREEN_TOGGLE */
597+#define XF86XK_SelectiveScreenshot _EVDEVK(0x27a) /* v5.6 KEY_SELECTIVE_SCREENSHOT */
598+#define XF86XK_NextElement _EVDEVK(0x27b) /* v5.18 KEY_NEXT_ELEMENT */
599+#define XF86XK_PreviousElement _EVDEVK(0x27c) /* v5.18 KEY_PREVIOUS_ELEMENT */
600+#define XF86XK_AutopilotEngageToggle _EVDEVK(0x27d) /* v5.18 KEY_AUTOPILOT_ENGAGE_TOGGLE */
601+#define XF86XK_MarkWaypoint _EVDEVK(0x27e) /* v5.18 KEY_MARK_WAYPOINT */
602+#define XF86XK_Sos _EVDEVK(0x27f) /* v5.18 KEY_SOS */
603+#define XF86XK_NavChart _EVDEVK(0x280) /* v5.18 KEY_NAV_CHART */
604+#define XF86XK_FishingChart _EVDEVK(0x281) /* v5.18 KEY_FISHING_CHART */
605+#define XF86XK_SingleRangeRadar _EVDEVK(0x282) /* v5.18 KEY_SINGLE_RANGE_RADAR */
606+#define XF86XK_DualRangeRadar _EVDEVK(0x283) /* v5.18 KEY_DUAL_RANGE_RADAR */
607+#define XF86XK_RadarOverlay _EVDEVK(0x284) /* v5.18 KEY_RADAR_OVERLAY */
608+#define XF86XK_TraditionalSonar _EVDEVK(0x285) /* v5.18 KEY_TRADITIONAL_SONAR */
609+#define XF86XK_ClearvuSonar _EVDEVK(0x286) /* v5.18 KEY_CLEARVU_SONAR */
610+#define XF86XK_SidevuSonar _EVDEVK(0x287) /* v5.18 KEY_SIDEVU_SONAR */
611+#define XF86XK_NavInfo _EVDEVK(0x288) /* v5.18 KEY_NAV_INFO */
612+/* Use: XF86XK_BrightnessAdjust _EVDEVK(0x289) v5.18 KEY_BRIGHTNESS_MENU */
613+#define XF86XK_Macro1 _EVDEVK(0x290) /* v5.5 KEY_MACRO1 */
614+#define XF86XK_Macro2 _EVDEVK(0x291) /* v5.5 KEY_MACRO2 */
615+#define XF86XK_Macro3 _EVDEVK(0x292) /* v5.5 KEY_MACRO3 */
616+#define XF86XK_Macro4 _EVDEVK(0x293) /* v5.5 KEY_MACRO4 */
617+#define XF86XK_Macro5 _EVDEVK(0x294) /* v5.5 KEY_MACRO5 */
618+#define XF86XK_Macro6 _EVDEVK(0x295) /* v5.5 KEY_MACRO6 */
619+#define XF86XK_Macro7 _EVDEVK(0x296) /* v5.5 KEY_MACRO7 */
620+#define XF86XK_Macro8 _EVDEVK(0x297) /* v5.5 KEY_MACRO8 */
621+#define XF86XK_Macro9 _EVDEVK(0x298) /* v5.5 KEY_MACRO9 */
622+#define XF86XK_Macro10 _EVDEVK(0x299) /* v5.5 KEY_MACRO10 */
623+#define XF86XK_Macro11 _EVDEVK(0x29a) /* v5.5 KEY_MACRO11 */
624+#define XF86XK_Macro12 _EVDEVK(0x29b) /* v5.5 KEY_MACRO12 */
625+#define XF86XK_Macro13 _EVDEVK(0x29c) /* v5.5 KEY_MACRO13 */
626+#define XF86XK_Macro14 _EVDEVK(0x29d) /* v5.5 KEY_MACRO14 */
627+#define XF86XK_Macro15 _EVDEVK(0x29e) /* v5.5 KEY_MACRO15 */
628+#define XF86XK_Macro16 _EVDEVK(0x29f) /* v5.5 KEY_MACRO16 */
629+#define XF86XK_Macro17 _EVDEVK(0x2a0) /* v5.5 KEY_MACRO17 */
630+#define XF86XK_Macro18 _EVDEVK(0x2a1) /* v5.5 KEY_MACRO18 */
631+#define XF86XK_Macro19 _EVDEVK(0x2a2) /* v5.5 KEY_MACRO19 */
632+#define XF86XK_Macro20 _EVDEVK(0x2a3) /* v5.5 KEY_MACRO20 */
633+#define XF86XK_Macro21 _EVDEVK(0x2a4) /* v5.5 KEY_MACRO21 */
634+#define XF86XK_Macro22 _EVDEVK(0x2a5) /* v5.5 KEY_MACRO22 */
635+#define XF86XK_Macro23 _EVDEVK(0x2a6) /* v5.5 KEY_MACRO23 */
636+#define XF86XK_Macro24 _EVDEVK(0x2a7) /* v5.5 KEY_MACRO24 */
637+#define XF86XK_Macro25 _EVDEVK(0x2a8) /* v5.5 KEY_MACRO25 */
638+#define XF86XK_Macro26 _EVDEVK(0x2a9) /* v5.5 KEY_MACRO26 */
639+#define XF86XK_Macro27 _EVDEVK(0x2aa) /* v5.5 KEY_MACRO27 */
640+#define XF86XK_Macro28 _EVDEVK(0x2ab) /* v5.5 KEY_MACRO28 */
641+#define XF86XK_Macro29 _EVDEVK(0x2ac) /* v5.5 KEY_MACRO29 */
642+#define XF86XK_Macro30 _EVDEVK(0x2ad) /* v5.5 KEY_MACRO30 */
643+#define XF86XK_MacroRecordStart _EVDEVK(0x2b0) /* v5.5 KEY_MACRO_RECORD_START */
644+#define XF86XK_MacroRecordStop _EVDEVK(0x2b1) /* v5.5 KEY_MACRO_RECORD_STOP */
645+#define XF86XK_MacroPresetCycle _EVDEVK(0x2b2) /* v5.5 KEY_MACRO_PRESET_CYCLE */
646+#define XF86XK_MacroPreset1 _EVDEVK(0x2b3) /* v5.5 KEY_MACRO_PRESET1 */
647+#define XF86XK_MacroPreset2 _EVDEVK(0x2b4) /* v5.5 KEY_MACRO_PRESET2 */
648+#define XF86XK_MacroPreset3 _EVDEVK(0x2b5) /* v5.5 KEY_MACRO_PRESET3 */
649+#define XF86XK_KbdLcdMenu1 _EVDEVK(0x2b8) /* v5.5 KEY_KBD_LCD_MENU1 */
650+#define XF86XK_KbdLcdMenu2 _EVDEVK(0x2b9) /* v5.5 KEY_KBD_LCD_MENU2 */
651+#define XF86XK_KbdLcdMenu3 _EVDEVK(0x2ba) /* v5.5 KEY_KBD_LCD_MENU3 */
652+#define XF86XK_KbdLcdMenu4 _EVDEVK(0x2bb) /* v5.5 KEY_KBD_LCD_MENU4 */
653+#define XF86XK_KbdLcdMenu5 _EVDEVK(0x2bc) /* v5.5 KEY_KBD_LCD_MENU5 */
654+#define XF86XK_PerformanceMode _EVDEVK(0x2bd) /* v6.17 KEY_PERFORMANCE */
655+#undef _EVDEVK
@@ -0,0 +1,1149 @@
1+/************************************************************
2+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
3+
4+Permission to use, copy, modify, and distribute this
5+software and its documentation for any purpose and without
6+fee is hereby granted, provided that the above copyright
7+notice appear in all copies and that both that copyright
8+notice and this permission notice appear in supporting
9+documentation, and that the name of Silicon Graphics not be
10+used in advertising or publicity pertaining to distribution
11+of the software without specific prior written permission.
12+Silicon Graphics makes no representation about the suitability
13+of this software for any purpose. It is provided "as is"
14+without any express or implied warranty.
15+
16+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
17+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
19+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
20+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
22+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
23+THE USE OR PERFORMANCE OF THIS SOFTWARE.
24+
25+********************************************************/
26+
27+#ifndef _X11_XKBLIB_H_
28+#define _X11_XKBLIB_H_
29+
30+#include <X11/Xlib.h>
31+#include <X11/extensions/XKBstr.h>
32+
33+typedef struct _XkbAnyEvent {
34+ int type; /* XkbAnyEvent */
35+ unsigned long serial; /* # of last req processed by server */
36+ Bool send_event; /* is this from a SendEvent request? */
37+ Display * display; /* Display the event was read from */
38+ Time time; /* milliseconds */
39+ int xkb_type; /* XKB event minor code */
40+ unsigned int device; /* device ID */
41+} XkbAnyEvent;
42+
43+typedef struct _XkbNewKeyboardNotify {
44+ int type; /* XkbAnyEvent */
45+ unsigned long serial; /* of last req processed by server */
46+ Bool send_event; /* is this from a SendEvent request? */
47+ Display * display; /* Display the event was read from */
48+ Time time; /* milliseconds */
49+ int xkb_type; /* XkbNewKeyboardNotify */
50+ int device; /* device ID */
51+ int old_device; /* device ID of previous keyboard */
52+ int min_key_code; /* minimum key code */
53+ int max_key_code; /* maximum key code */
54+ int old_min_key_code;/* min key code of previous kbd */
55+ int old_max_key_code;/* max key code of previous kbd */
56+ unsigned int changed; /* changed aspects of the keyboard */
57+ char req_major; /* major and minor opcode of req */
58+ char req_minor; /* that caused change, if applicable */
59+} XkbNewKeyboardNotifyEvent;
60+
61+typedef struct _XkbMapNotifyEvent {
62+ int type; /* XkbAnyEvent */
63+ unsigned long serial; /* of last req processed by server */
64+ Bool send_event; /* is this from a SendEvent request */
65+ Display * display; /* Display the event was read from */
66+ Time time; /* milliseconds */
67+ int xkb_type; /* XkbMapNotify */
68+ int device; /* device ID */
69+ unsigned int changed; /* fields which have been changed */
70+ unsigned int flags; /* reserved */
71+ int first_type; /* first changed key type */
72+ int num_types; /* number of changed key types */
73+ KeyCode min_key_code;
74+ KeyCode max_key_code;
75+ KeyCode first_key_sym;
76+ KeyCode first_key_act;
77+ KeyCode first_key_behavior;
78+ KeyCode first_key_explicit;
79+ KeyCode first_modmap_key;
80+ KeyCode first_vmodmap_key;
81+ int num_key_syms;
82+ int num_key_acts;
83+ int num_key_behaviors;
84+ int num_key_explicit;
85+ int num_modmap_keys;
86+ int num_vmodmap_keys;
87+ unsigned int vmods; /* mask of changed virtual mods */
88+} XkbMapNotifyEvent;
89+
90+typedef struct _XkbStateNotifyEvent {
91+ int type; /* XkbAnyEvent */
92+ unsigned long serial; /* # of last req processed by server */
93+ Bool send_event; /* is this from a SendEvent request? */
94+ Display * display; /* Display the event was read from */
95+ Time time; /* milliseconds */
96+ int xkb_type; /* XkbStateNotify */
97+ int device; /* device ID */
98+ unsigned int changed; /* mask of changed state components */
99+ int group; /* keyboard group */
100+ int base_group; /* base keyboard group */
101+ int latched_group; /* latched keyboard group */
102+ int locked_group; /* locked keyboard group */
103+ unsigned int mods; /* modifier state */
104+ unsigned int base_mods; /* base modifier state */
105+ unsigned int latched_mods; /* latched modifiers */
106+ unsigned int locked_mods; /* locked modifiers */
107+ int compat_state; /* compatibility state */
108+ unsigned char grab_mods; /* mods used for grabs */
109+ unsigned char compat_grab_mods;/* grab mods for non-XKB clients */
110+ unsigned char lookup_mods; /* mods sent to clients */
111+ unsigned char compat_lookup_mods; /* mods sent to non-XKB clients */
112+ int ptr_buttons; /* pointer button state */
113+ KeyCode keycode; /* keycode that caused the change */
114+ char event_type; /* KeyPress or KeyRelease */
115+ char req_major; /* Major opcode of request */
116+ char req_minor; /* Minor opcode of request */
117+} XkbStateNotifyEvent;
118+
119+typedef struct _XkbControlsNotify {
120+ int type; /* XkbAnyEvent */
121+ unsigned long serial; /* of last req processed by server */
122+ Bool send_event; /* is this from a SendEvent request? */
123+ Display * display; /* Display the event was read from */
124+ Time time; /* milliseconds */
125+ int xkb_type; /* XkbControlsNotify */
126+ int device; /* device ID */
127+ unsigned int changed_ctrls; /* controls with changed sub-values */
128+ unsigned int enabled_ctrls; /* controls currently enabled */
129+ unsigned int enabled_ctrl_changes;/* controls just {en,dis}abled */
130+ int num_groups; /* total groups on keyboard */
131+ KeyCode keycode; /* key that caused change or 0 */
132+ char event_type; /* type of event that caused change */
133+ char req_major; /* if keycode==0, major and minor */
134+ char req_minor; /* opcode of req that caused change */
135+} XkbControlsNotifyEvent;
136+
137+typedef struct _XkbIndicatorNotify {
138+ int type; /* XkbAnyEvent */
139+ unsigned long serial; /* of last req processed by server */
140+ Bool send_event; /* is this from a SendEvent request? */
141+ Display * display; /* Display the event was read from */
142+ Time time; /* milliseconds */
143+ int xkb_type; /* XkbIndicatorNotify */
144+ int device; /* device ID */
145+ unsigned int changed; /* indicators with new state or map */
146+ unsigned int state; /* current state of all indicators */
147+} XkbIndicatorNotifyEvent;
148+
149+typedef struct _XkbNamesNotify {
150+ int type; /* XkbAnyEvent */
151+ unsigned long serial; /* of last req processed by server */
152+ Bool send_event; /* is this from a SendEvent request? */
153+ Display * display; /* Display the event was read from */
154+ Time time; /* milliseconds */
155+ int xkb_type; /* XkbNamesNotify */
156+ int device; /* device ID */
157+ unsigned int changed; /* names that have changed */
158+ int first_type; /* first key type with new name */
159+ int num_types; /* number of key types with new names */
160+ int first_lvl; /* first key type new new level names */
161+ int num_lvls; /* # of key types w/new level names */
162+ int num_aliases; /* total number of key aliases*/
163+ int num_radio_groups;/* total number of radio groups */
164+ unsigned int changed_vmods; /* virtual modifiers with new names */
165+ unsigned int changed_groups; /* groups with new names */
166+ unsigned int changed_indicators;/* indicators with new names */
167+ int first_key; /* first key with new name */
168+ int num_keys; /* number of keys with new names */
169+} XkbNamesNotifyEvent;
170+
171+typedef struct _XkbCompatMapNotify {
172+ int type; /* XkbAnyEvent */
173+ unsigned long serial; /* of last req processed by server */
174+ Bool send_event; /* is this from a SendEvent request? */
175+ Display * display; /* Display the event was read from */
176+ Time time; /* milliseconds */
177+ int xkb_type; /* XkbCompatMapNotify */
178+ int device; /* device ID */
179+ unsigned int changed_groups; /* groups with new compat maps */
180+ int first_si; /* first new symbol interp */
181+ int num_si; /* number of new symbol interps */
182+ int num_total_si; /* total # of symbol interps */
183+} XkbCompatMapNotifyEvent;
184+
185+typedef struct _XkbBellNotify {
186+ int type; /* XkbAnyEvent */
187+ unsigned long serial; /* of last req processed by server */
188+ Bool send_event; /* is this from a SendEvent request? */
189+ Display * display; /* Display the event was read from */
190+ Time time; /* milliseconds */
191+ int xkb_type; /* XkbBellNotify */
192+ int device; /* device ID */
193+ int percent; /* requested volume as a % of maximum */
194+ int pitch; /* requested pitch in Hz */
195+ int duration; /* requested duration in useconds */
196+ int bell_class; /* (input extension) feedback class */
197+ int bell_id; /* (input extension) ID of feedback */
198+ Atom name; /* "name" of requested bell */
199+ Window window; /* window associated with event */
200+ Bool event_only; /* "event only" requested */
201+} XkbBellNotifyEvent;
202+
203+typedef struct _XkbActionMessage {
204+ int type; /* XkbAnyEvent */
205+ unsigned long serial; /* of last req processed by server */
206+ Bool send_event; /* is this from a SendEvent request? */
207+ Display * display; /* Display the event was read from */
208+ Time time; /* milliseconds */
209+ int xkb_type; /* XkbActionMessage */
210+ int device; /* device ID */
211+ KeyCode keycode; /* key that generated the event */
212+ Bool press; /* true if act caused by key press */
213+ Bool key_event_follows;/* true if key event also generated */
214+ int group; /* effective group */
215+ unsigned int mods; /* effective mods */
216+ char message[XkbActionMessageLength+1];
217+ /* message -- leave space for NUL */
218+} XkbActionMessageEvent;
219+
220+typedef struct _XkbAccessXNotify {
221+ int type; /* XkbAnyEvent */
222+ unsigned long serial; /* of last req processed by server */
223+ Bool send_event; /* is this from a SendEvent request? */
224+ Display * display; /* Display the event was read from */
225+ Time time; /* milliseconds */
226+ int xkb_type; /* XkbAccessXNotify */
227+ int device; /* device ID */
228+ int detail; /* XkbAXN_* */
229+ int keycode; /* key of event */
230+ int sk_delay; /* current slow keys delay */
231+ int debounce_delay; /* current debounce delay */
232+} XkbAccessXNotifyEvent;
233+
234+typedef struct _XkbExtensionDeviceNotify {
235+ int type; /* XkbAnyEvent */
236+ unsigned long serial; /* of last req processed by server */
237+ Bool send_event; /* is this from a SendEvent request? */
238+ Display * display; /* Display the event was read from */
239+ Time time; /* milliseconds */
240+ int xkb_type; /* XkbExtensionDeviceNotify */
241+ int device; /* device ID */
242+ unsigned int reason; /* reason for the event */
243+ unsigned int supported; /* mask of supported features */
244+ unsigned int unsupported; /* mask of unsupported features */
245+ /* that some app tried to use */
246+ int first_btn; /* first button that changed */
247+ int num_btns; /* range of buttons changed */
248+ unsigned int leds_defined; /* indicators with names or maps */
249+ unsigned int led_state; /* current state of the indicators */
250+ int led_class; /* feedback class for led changes */
251+ int led_id; /* feedback id for led changes */
252+} XkbExtensionDeviceNotifyEvent;
253+
254+typedef union _XkbEvent {
255+ int type;
256+ XkbAnyEvent any;
257+ XkbNewKeyboardNotifyEvent new_kbd;
258+ XkbMapNotifyEvent map;
259+ XkbStateNotifyEvent state;
260+ XkbControlsNotifyEvent ctrls;
261+ XkbIndicatorNotifyEvent indicators;
262+ XkbNamesNotifyEvent names;
263+ XkbCompatMapNotifyEvent compat;
264+ XkbBellNotifyEvent bell;
265+ XkbActionMessageEvent message;
266+ XkbAccessXNotifyEvent accessx;
267+ XkbExtensionDeviceNotifyEvent device;
268+ XEvent core;
269+} XkbEvent;
270+
271+typedef struct _XkbKbdDpyState XkbKbdDpyStateRec,*XkbKbdDpyStatePtr;
272+
273+ /* XkbOpenDisplay error codes */
274+#define XkbOD_Success 0
275+#define XkbOD_BadLibraryVersion 1
276+#define XkbOD_ConnectionRefused 2
277+#define XkbOD_NonXkbServer 3
278+#define XkbOD_BadServerVersion 4
279+
280+ /* Values for XlibFlags */
281+#define XkbLC_ForceLatin1Lookup (1<<0)
282+#define XkbLC_ConsumeLookupMods (1<<1)
283+#define XkbLC_AlwaysConsumeShiftAndLock (1<<2)
284+#define XkbLC_IgnoreNewKeyboards (1<<3)
285+#define XkbLC_ControlFallback (1<<4)
286+#define XkbLC_ConsumeKeysOnComposeFail (1<<29)
287+#define XkbLC_ComposeLED (1<<30)
288+#define XkbLC_BeepOnComposeFail (1<<31)
289+
290+#define XkbLC_AllComposeControls (0xc0000000)
291+#define XkbLC_AllControls (0xc000001f)
292+
293+_XFUNCPROTOBEGIN
294+
295+extern Bool XkbIgnoreExtension(
296+ Bool /* ignore */
297+);
298+
299+extern Display *XkbOpenDisplay(
300+ _Xconst char * /* name */,
301+ int * /* ev_rtrn */,
302+ int * /* err_rtrn */,
303+ int * /* major_rtrn */,
304+ int * /* minor_rtrn */,
305+ int * /* reason */
306+);
307+
308+extern Bool XkbQueryExtension(
309+ Display * /* dpy */,
310+ int * /* opcodeReturn */,
311+ int * /* eventBaseReturn */,
312+ int * /* errorBaseReturn */,
313+ int * /* majorRtrn */,
314+ int * /* minorRtrn */
315+);
316+
317+extern Bool XkbUseExtension(
318+ Display * /* dpy */,
319+ int * /* major_rtrn */,
320+ int * /* minor_rtrn */
321+);
322+
323+extern Bool XkbLibraryVersion(
324+ int * /* libMajorRtrn */,
325+ int * /* libMinorRtrn */
326+);
327+
328+extern unsigned int XkbSetXlibControls(
329+ Display* /* dpy */,
330+ unsigned int /* affect */,
331+ unsigned int /* values */
332+);
333+
334+extern unsigned int XkbGetXlibControls(
335+ Display* /* dpy */
336+);
337+
338+extern unsigned int XkbXlibControlsImplemented(void);
339+
340+typedef Atom (*XkbInternAtomFunc)(
341+ Display * /* dpy */,
342+ _Xconst char * /* name */,
343+ Bool /* only_if_exists */
344+);
345+
346+typedef char * (*XkbGetAtomNameFunc)(
347+ Display * /* dpy */,
348+ Atom /* atom */
349+);
350+
351+extern void XkbSetAtomFuncs(
352+ XkbInternAtomFunc /* getAtom */,
353+ XkbGetAtomNameFunc /* getName */
354+);
355+
356+extern KeySym XkbKeycodeToKeysym(
357+ Display * /* dpy */,
358+#if NeedWidePrototypes
359+ unsigned int /* kc */,
360+#else
361+ KeyCode /* kc */,
362+#endif
363+ int /* group */,
364+ int /* level */
365+);
366+
367+extern unsigned int XkbKeysymToModifiers(
368+ Display * /* dpy */,
369+ KeySym /* ks */
370+);
371+
372+extern Bool XkbLookupKeySym(
373+ Display * /* dpy */,
374+ KeyCode /* keycode */,
375+ unsigned int /* modifiers */,
376+ unsigned int * /* modifiers_return */,
377+ KeySym * /* keysym_return */
378+);
379+
380+extern int XkbLookupKeyBinding(
381+ Display * /* dpy */,
382+ KeySym /* sym_rtrn */,
383+ unsigned int /* mods */,
384+ char * /* buffer */,
385+ int /* nbytes */,
386+ int * /* extra_rtrn */
387+);
388+
389+extern Bool XkbTranslateKeyCode(
390+ XkbDescPtr /* xkb */,
391+ KeyCode /* keycode */,
392+ unsigned int /* modifiers */,
393+ unsigned int * /* modifiers_return */,
394+ KeySym * /* keysym_return */
395+);
396+
397+extern int XkbTranslateKeySym(
398+ Display * /* dpy */,
399+ KeySym * /* sym_return */,
400+ unsigned int /* modifiers */,
401+ char * /* buffer */,
402+ int /* nbytes */,
403+ int * /* extra_rtrn */
404+);
405+
406+extern Bool XkbSetAutoRepeatRate(
407+ Display * /* dpy */,
408+ unsigned int /* deviceSpec */,
409+ unsigned int /* delay */,
410+ unsigned int /* interval */
411+);
412+
413+extern Bool XkbGetAutoRepeatRate(
414+ Display * /* dpy */,
415+ unsigned int /* deviceSpec */,
416+ unsigned int * /* delayRtrn */,
417+ unsigned int * /* intervalRtrn */
418+);
419+
420+extern Bool XkbChangeEnabledControls(
421+ Display * /* dpy */,
422+ unsigned int /* deviceSpec */,
423+ unsigned int /* affect */,
424+ unsigned int /* values */
425+);
426+
427+extern Bool XkbDeviceBell(
428+ Display * /* dpy */,
429+ Window /* win */,
430+ int /* deviceSpec */,
431+ int /* bellClass */,
432+ int /* bellID */,
433+ int /* percent */,
434+ Atom /* name */
435+);
436+
437+extern Bool XkbForceDeviceBell(
438+ Display * /* dpy */,
439+ int /* deviceSpec */,
440+ int /* bellClass */,
441+ int /* bellID */,
442+ int /* percent */
443+);
444+
445+extern Bool XkbDeviceBellEvent(
446+ Display * /* dpy */,
447+ Window /* win */,
448+ int /* deviceSpec */,
449+ int /* bellClass */,
450+ int /* bellID */,
451+ int /* percent */,
452+ Atom /* name */
453+);
454+
455+extern Bool XkbBell(
456+ Display * /* dpy */,
457+ Window /* win */,
458+ int /* percent */,
459+ Atom /* name */
460+);
461+
462+extern Bool XkbForceBell(
463+ Display * /* dpy */,
464+ int /* percent */
465+);
466+
467+extern Bool XkbBellEvent(
468+ Display * /* dpy */,
469+ Window /* win */,
470+ int /* percent */,
471+ Atom /* name */
472+);
473+
474+extern Bool XkbSelectEvents(
475+ Display * /* dpy */,
476+ unsigned int /* deviceID */,
477+ unsigned int /* affect */,
478+ unsigned int /* values */
479+);
480+
481+extern Bool XkbSelectEventDetails(
482+ Display * /* dpy */,
483+ unsigned int /* deviceID */,
484+ unsigned int /* eventType */,
485+ unsigned long /* affect */,
486+ unsigned long /* details */
487+);
488+
489+extern void XkbNoteMapChanges(
490+ XkbMapChangesPtr /* old */,
491+ XkbMapNotifyEvent * /* new */,
492+ unsigned int /* wanted */
493+);
494+
495+extern void XkbNoteNameChanges(
496+ XkbNameChangesPtr /* old */,
497+ XkbNamesNotifyEvent * /* new */,
498+ unsigned int /* wanted */
499+);
500+
501+extern Status XkbGetIndicatorState(
502+ Display * /* dpy */,
503+ unsigned int /* deviceSpec */,
504+ unsigned int * /* pStateRtrn */
505+);
506+
507+extern Status XkbGetDeviceIndicatorState(
508+ Display * /* dpy */,
509+ unsigned int /* deviceSpec */,
510+ unsigned int /* ledClass */,
511+ unsigned int /* ledID */,
512+ unsigned int * /* pStateRtrn */
513+);
514+
515+extern Status XkbGetIndicatorMap(
516+ Display * /* dpy */,
517+ unsigned long /* which */,
518+ XkbDescPtr /* desc */
519+);
520+
521+extern Bool XkbSetIndicatorMap(
522+ Display * /* dpy */,
523+ unsigned long /* which */,
524+ XkbDescPtr /* desc */
525+);
526+
527+#define XkbNoteIndicatorMapChanges(o,n,w) \
528+ ((o)->map_changes|=((n)->map_changes&(w)))
529+#define XkbNoteIndicatorStateChanges(o,n,w)\
530+ ((o)->state_changes|=((n)->state_changes&(w)))
531+#define XkbGetIndicatorMapChanges(d,x,c) \
532+ (XkbGetIndicatorMap((d),(c)->map_changes,x))
533+#define XkbChangeIndicatorMaps(d,x,c) \
534+ (XkbSetIndicatorMap((d),(c)->map_changes,x))
535+
536+extern Bool XkbGetNamedIndicator(
537+ Display * /* dpy */,
538+ Atom /* name */,
539+ int * /* pNdxRtrn */,
540+ Bool * /* pStateRtrn */,
541+ XkbIndicatorMapPtr /* pMapRtrn */,
542+ Bool * /* pRealRtrn */
543+);
544+
545+extern Bool XkbGetNamedDeviceIndicator(
546+ Display * /* dpy */,
547+ unsigned int /* deviceSpec */,
548+ unsigned int /* ledClass */,
549+ unsigned int /* ledID */,
550+ Atom /* name */,
551+ int * /* pNdxRtrn */,
552+ Bool * /* pStateRtrn */,
553+ XkbIndicatorMapPtr /* pMapRtrn */,
554+ Bool * /* pRealRtrn */
555+);
556+
557+extern Bool XkbSetNamedIndicator(
558+ Display * /* dpy */,
559+ Atom /* name */,
560+ Bool /* changeState */,
561+ Bool /* state */,
562+ Bool /* createNewMap */,
563+ XkbIndicatorMapPtr /* pMap */
564+);
565+
566+extern Bool XkbSetNamedDeviceIndicator(
567+ Display * /* dpy */,
568+ unsigned int /* deviceSpec */,
569+ unsigned int /* ledClass */,
570+ unsigned int /* ledID */,
571+ Atom /* name */,
572+ Bool /* changeState */,
573+ Bool /* state */,
574+ Bool /* createNewMap */,
575+ XkbIndicatorMapPtr /* pMap */
576+);
577+
578+extern Bool XkbLockModifiers(
579+ Display * /* dpy */,
580+ unsigned int /* deviceSpec */,
581+ unsigned int /* affect */,
582+ unsigned int /* values */
583+);
584+
585+extern Bool XkbLatchModifiers(
586+ Display * /* dpy */,
587+ unsigned int /* deviceSpec */,
588+ unsigned int /* affect */,
589+ unsigned int /* values */
590+);
591+
592+extern Bool XkbLockGroup(
593+ Display * /* dpy */,
594+ unsigned int /* deviceSpec */,
595+ unsigned int /* group */
596+);
597+
598+extern Bool XkbLatchGroup(
599+ Display * /* dpy */,
600+ unsigned int /* deviceSpec */,
601+ unsigned int /* group */
602+);
603+
604+extern Bool XkbSetServerInternalMods(
605+ Display * /* dpy */,
606+ unsigned int /* deviceSpec */,
607+ unsigned int /* affectReal */,
608+ unsigned int /* realValues */,
609+ unsigned int /* affectVirtual */,
610+ unsigned int /* virtualValues */
611+);
612+
613+extern Bool XkbSetIgnoreLockMods(
614+ Display * /* dpy */,
615+ unsigned int /* deviceSpec */,
616+ unsigned int /* affectReal */,
617+ unsigned int /* realValues */,
618+ unsigned int /* affectVirtual */,
619+ unsigned int /* virtualValues */
620+);
621+
622+
623+extern Bool XkbVirtualModsToReal(
624+ XkbDescPtr /* xkb */,
625+ unsigned int /* virtual_mask */,
626+ unsigned int * /* mask_rtrn */
627+);
628+
629+extern Bool XkbComputeEffectiveMap(
630+ XkbDescPtr /* xkb */,
631+ XkbKeyTypePtr /* type */,
632+ unsigned char * /* map_rtrn */
633+);
634+
635+extern Status XkbInitCanonicalKeyTypes(
636+ XkbDescPtr /* xkb */,
637+ unsigned int /* which */,
638+ int /* keypadVMod */
639+);
640+
641+extern XkbDescPtr XkbAllocKeyboard(
642+ void
643+);
644+
645+extern void XkbFreeKeyboard(
646+ XkbDescPtr /* xkb */,
647+ unsigned int /* which */,
648+ Bool /* freeDesc */
649+);
650+
651+extern Status XkbAllocClientMap(
652+ XkbDescPtr /* xkb */,
653+ unsigned int /* which */,
654+ unsigned int /* nTypes */
655+);
656+
657+extern Status XkbAllocServerMap(
658+ XkbDescPtr /* xkb */,
659+ unsigned int /* which */,
660+ unsigned int /* nActions */
661+);
662+
663+extern void XkbFreeClientMap(
664+ XkbDescPtr /* xkb */,
665+ unsigned int /* what */,
666+ Bool /* freeMap */
667+);
668+
669+extern void XkbFreeServerMap(
670+ XkbDescPtr /* xkb */,
671+ unsigned int /* what */,
672+ Bool /* freeMap */
673+);
674+
675+extern XkbKeyTypePtr XkbAddKeyType(
676+ XkbDescPtr /* xkb */,
677+ Atom /* name */,
678+ int /* map_count */,
679+ Bool /* want_preserve */,
680+ int /* num_lvls */
681+);
682+
683+extern Status XkbAllocIndicatorMaps(
684+ XkbDescPtr /* xkb */
685+);
686+
687+extern void XkbFreeIndicatorMaps(
688+ XkbDescPtr /* xkb */
689+);
690+
691+extern XkbDescPtr XkbGetMap(
692+ Display * /* dpy */,
693+ unsigned int /* which */,
694+ unsigned int /* deviceSpec */
695+);
696+
697+extern Status XkbGetUpdatedMap(
698+ Display * /* dpy */,
699+ unsigned int /* which */,
700+ XkbDescPtr /* desc */
701+);
702+
703+extern Status XkbGetMapChanges(
704+ Display * /* dpy */,
705+ XkbDescPtr /* xkb */,
706+ XkbMapChangesPtr /* changes */
707+);
708+
709+
710+extern Status XkbRefreshKeyboardMapping(
711+ XkbMapNotifyEvent * /* event */
712+);
713+
714+extern Status XkbGetKeyTypes(
715+ Display * /* dpy */,
716+ unsigned int /* first */,
717+ unsigned int /* num */,
718+ XkbDescPtr /* xkb */
719+);
720+
721+extern Status XkbGetKeySyms(
722+ Display * /* dpy */,
723+ unsigned int /* first */,
724+ unsigned int /* num */,
725+ XkbDescPtr /* xkb */
726+);
727+
728+extern Status XkbGetKeyActions(
729+ Display * /* dpy */,
730+ unsigned int /* first */,
731+ unsigned int /* num */,
732+ XkbDescPtr /* xkb */
733+);
734+
735+extern Status XkbGetKeyBehaviors(
736+ Display * /* dpy */,
737+ unsigned int /* firstKey */,
738+ unsigned int /* nKeys */,
739+ XkbDescPtr /* desc */
740+);
741+
742+extern Status XkbGetVirtualMods(
743+ Display * /* dpy */,
744+ unsigned int /* which */,
745+ XkbDescPtr /* desc */
746+);
747+
748+extern Status XkbGetKeyExplicitComponents(
749+ Display * /* dpy */,
750+ unsigned int /* firstKey */,
751+ unsigned int /* nKeys */,
752+ XkbDescPtr /* desc */
753+);
754+
755+extern Status XkbGetKeyModifierMap(
756+ Display * /* dpy */,
757+ unsigned int /* firstKey */,
758+ unsigned int /* nKeys */,
759+ XkbDescPtr /* desc */
760+);
761+
762+extern Status XkbGetKeyVirtualModMap(
763+ Display * /* dpy */,
764+ unsigned int /* first */,
765+ unsigned int /* num */,
766+ XkbDescPtr /* xkb */
767+);
768+
769+extern Status XkbAllocControls(
770+ XkbDescPtr /* xkb */,
771+ unsigned int /* which*/
772+);
773+
774+extern void XkbFreeControls(
775+ XkbDescPtr /* xkb */,
776+ unsigned int /* which */,
777+ Bool /* freeMap */
778+);
779+
780+extern Status XkbGetControls(
781+ Display * /* dpy */,
782+ unsigned long /* which */,
783+ XkbDescPtr /* desc */
784+);
785+
786+extern Bool XkbSetControls(
787+ Display * /* dpy */,
788+ unsigned long /* which */,
789+ XkbDescPtr /* desc */
790+);
791+
792+extern void XkbNoteControlsChanges(
793+ XkbControlsChangesPtr /* old */,
794+ XkbControlsNotifyEvent * /* new */,
795+ unsigned int /* wanted */
796+);
797+
798+#define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x)
799+#define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x)
800+
801+extern Status XkbAllocCompatMap(
802+ XkbDescPtr /* xkb */,
803+ unsigned int /* which */,
804+ unsigned int /* nInterpret */
805+);
806+
807+extern void XkbFreeCompatMap(
808+ XkbDescPtr /* xkb */,
809+ unsigned int /* which */,
810+ Bool /* freeMap */
811+);
812+
813+extern Status XkbGetCompatMap(
814+ Display * /* dpy */,
815+ unsigned int /* which */,
816+ XkbDescPtr /* xkb */
817+);
818+
819+extern Bool XkbSetCompatMap(
820+ Display * /* dpy */,
821+ unsigned int /* which */,
822+ XkbDescPtr /* xkb */,
823+ Bool /* updateActions */
824+);
825+
826+extern XkbSymInterpretPtr XkbAddSymInterpret(
827+ XkbDescPtr /* xkb */,
828+ XkbSymInterpretPtr /* si */,
829+ Bool /* updateMap */,
830+ XkbChangesPtr /* changes */
831+);
832+
833+extern Status XkbAllocNames(
834+ XkbDescPtr /* xkb */,
835+ unsigned int /* which */,
836+ int /* nTotalRG */,
837+ int /* nTotalAliases */
838+);
839+
840+extern Status XkbGetNames(
841+ Display * /* dpy */,
842+ unsigned int /* which */,
843+ XkbDescPtr /* desc */
844+);
845+
846+extern Bool XkbSetNames(
847+ Display * /* dpy */,
848+ unsigned int /* which */,
849+ unsigned int /* firstType */,
850+ unsigned int /* nTypes */,
851+ XkbDescPtr /* desc */
852+);
853+
854+extern Bool XkbChangeNames(
855+ Display * /* dpy */,
856+ XkbDescPtr /* xkb */,
857+ XkbNameChangesPtr /* changes */
858+);
859+
860+extern void XkbFreeNames(
861+ XkbDescPtr /* xkb */,
862+ unsigned int /* which */,
863+ Bool /* freeMap */
864+);
865+
866+
867+extern Status XkbGetState(
868+ Display * /* dpy */,
869+ unsigned int /* deviceSpec */,
870+ XkbStatePtr /* rtrnState */
871+);
872+
873+extern Bool XkbSetMap(
874+ Display * /* dpy */,
875+ unsigned int /* which */,
876+ XkbDescPtr /* desc */
877+);
878+
879+extern Bool XkbChangeMap(
880+ Display* /* dpy */,
881+ XkbDescPtr /* desc */,
882+ XkbMapChangesPtr /* changes */
883+);
884+
885+extern Bool XkbSetDetectableAutoRepeat(
886+ Display * /* dpy */,
887+ Bool /* detectable */,
888+ Bool * /* supported */
889+);
890+
891+extern Bool XkbGetDetectableAutoRepeat(
892+ Display * /* dpy */,
893+ Bool * /* supported */
894+);
895+
896+extern Bool XkbSetAutoResetControls(
897+ Display * /* dpy */,
898+ unsigned int /* changes */,
899+ unsigned int * /* auto_ctrls */,
900+ unsigned int * /* auto_values */
901+);
902+
903+extern Bool XkbGetAutoResetControls(
904+ Display * /* dpy */,
905+ unsigned int * /* auto_ctrls */,
906+ unsigned int * /* auto_ctrl_values */
907+);
908+
909+extern Bool XkbSetPerClientControls(
910+ Display * /* dpy */,
911+ unsigned int /* change */,
912+ unsigned int * /* values */
913+);
914+
915+extern Bool XkbGetPerClientControls(
916+ Display * /* dpy */,
917+ unsigned int * /* ctrls */
918+);
919+
920+extern Status XkbCopyKeyType(
921+ XkbKeyTypePtr /* from */,
922+ XkbKeyTypePtr /* into */
923+);
924+
925+extern Status XkbCopyKeyTypes(
926+ XkbKeyTypePtr /* from */,
927+ XkbKeyTypePtr /* into */,
928+ int /* num_types */
929+);
930+
931+extern Status XkbResizeKeyType(
932+ XkbDescPtr /* xkb */,
933+ int /* type_ndx */,
934+ int /* map_count */,
935+ Bool /* want_preserve */,
936+ int /* new_num_lvls */
937+);
938+
939+extern KeySym *XkbResizeKeySyms(
940+ XkbDescPtr /* desc */,
941+ int /* forKey */,
942+ int /* symsNeeded */
943+);
944+
945+extern XkbAction *XkbResizeKeyActions(
946+ XkbDescPtr /* desc */,
947+ int /* forKey */,
948+ int /* actsNeeded */
949+);
950+
951+extern Status XkbChangeTypesOfKey(
952+ XkbDescPtr /* xkb */,
953+ int /* key */,
954+ int /* num_groups */,
955+ unsigned int /* groups */,
956+ int * /* newTypes */,
957+ XkbMapChangesPtr /* pChanges */
958+);
959+
960+extern Status XkbChangeKeycodeRange(
961+ XkbDescPtr /* xkb */,
962+ int /* minKC */,
963+ int /* maxKC */,
964+ XkbChangesPtr /* changes */
965+);
966+
967+/***====================================================================***/
968+
969+extern XkbComponentListPtr XkbListComponents(
970+ Display * /* dpy */,
971+ unsigned int /* deviceSpec */,
972+ XkbComponentNamesPtr /* ptrns */,
973+ int * /* max_inout */
974+);
975+
976+extern void XkbFreeComponentList(
977+ XkbComponentListPtr /* list */
978+);
979+
980+extern XkbDescPtr XkbGetKeyboard(
981+ Display * /* dpy */,
982+ unsigned int /* which */,
983+ unsigned int /* deviceSpec */
984+);
985+
986+extern XkbDescPtr XkbGetKeyboardByName(
987+ Display * /* dpy */,
988+ unsigned int /* deviceSpec */,
989+ XkbComponentNamesPtr /* names */,
990+ unsigned int /* want */,
991+ unsigned int /* need */,
992+ Bool /* load */
993+);
994+
995+/***====================================================================***/
996+
997+extern int XkbKeyTypesForCoreSymbols( /* returns # of groups */
998+ XkbDescPtr /* xkb */, /* keyboard device */
999+ int /* map_width */, /* width of core KeySym array */
1000+ KeySym * /* core_syms */, /* always mapWidth symbols */
1001+ unsigned int /* protected */, /* explicit key types */
1002+ int * /* types_inout */, /* always four type indices */
1003+ KeySym * /* xkb_syms_rtrn */ /* must have enough space */
1004+);
1005+
1006+extern Bool XkbApplyCompatMapToKey( /* False only on error */
1007+ XkbDescPtr /* xkb */, /* keymap to be edited */
1008+ KeyCode /* key */, /* key to be updated */
1009+ XkbChangesPtr /* changes */ /* resulting changes to map */
1010+);
1011+
1012+extern Bool XkbUpdateMapFromCore( /* False only on error */
1013+ XkbDescPtr /* xkb */, /* XKB keyboard to be edited */
1014+ KeyCode /* first_key */, /* first changed key */
1015+ int /* num_keys */, /* number of changed keys */
1016+ int /* map_width */, /* width of core keymap */
1017+ KeySym * /* core_keysyms */, /* symbols from core keymap */
1018+ XkbChangesPtr /* changes */ /* resulting changes */
1019+);
1020+
1021+/***====================================================================***/
1022+
1023+extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo(
1024+ XkbDeviceInfoPtr /* devi */,
1025+ unsigned int /* ledClass */,
1026+ unsigned int /* ledId */
1027+);
1028+
1029+extern Status XkbResizeDeviceButtonActions(
1030+ XkbDeviceInfoPtr /* devi */,
1031+ unsigned int /* newTotal */
1032+);
1033+
1034+extern XkbDeviceInfoPtr XkbAllocDeviceInfo(
1035+ unsigned int /* deviceSpec */,
1036+ unsigned int /* nButtons */,
1037+ unsigned int /* szLeds */
1038+);
1039+
1040+extern void XkbFreeDeviceInfo(
1041+ XkbDeviceInfoPtr /* devi */,
1042+ unsigned int /* which */,
1043+ Bool /* freeDevI */
1044+);
1045+
1046+extern void XkbNoteDeviceChanges(
1047+ XkbDeviceChangesPtr /* old */,
1048+ XkbExtensionDeviceNotifyEvent * /* new */,
1049+ unsigned int /* wanted */
1050+);
1051+
1052+extern XkbDeviceInfoPtr XkbGetDeviceInfo(
1053+ Display * /* dpy */,
1054+ unsigned int /* which */,
1055+ unsigned int /* deviceSpec */,
1056+ unsigned int /* ledClass */,
1057+ unsigned int /* ledID */
1058+);
1059+
1060+extern Status XkbGetDeviceInfoChanges(
1061+ Display * /* dpy */,
1062+ XkbDeviceInfoPtr /* devi */,
1063+ XkbDeviceChangesPtr /* changes */
1064+);
1065+
1066+extern Status XkbGetDeviceButtonActions(
1067+ Display * /* dpy */,
1068+ XkbDeviceInfoPtr /* devi */,
1069+ Bool /* all */,
1070+ unsigned int /* first */,
1071+ unsigned int /* nBtns */
1072+);
1073+
1074+extern Status XkbGetDeviceLedInfo(
1075+ Display * /* dpy */,
1076+ XkbDeviceInfoPtr /* devi */,
1077+ unsigned int /* ledClass (class, XIDflt, XIAll) */,
1078+ unsigned int /* ledId (id, XIDflt, XIAll) */,
1079+ unsigned int /* which (XkbXI_Indicator{Names,Map}Mask */
1080+);
1081+
1082+extern Bool XkbSetDeviceInfo(
1083+ Display * /* dpy */,
1084+ unsigned int /* which */,
1085+ XkbDeviceInfoPtr /* devi */
1086+);
1087+
1088+extern Bool XkbChangeDeviceInfo(
1089+ Display* /* dpy */,
1090+ XkbDeviceInfoPtr /* desc */,
1091+ XkbDeviceChangesPtr /* changes */
1092+);
1093+
1094+extern Bool XkbSetDeviceLedInfo(
1095+ Display * /* dpy */,
1096+ XkbDeviceInfoPtr /* devi */,
1097+ unsigned int /* ledClass */,
1098+ unsigned int /* ledID */,
1099+ unsigned int /* which */
1100+);
1101+
1102+extern Bool XkbSetDeviceButtonActions(
1103+ Display * /* dpy */,
1104+ XkbDeviceInfoPtr /* devi */,
1105+ unsigned int /* first */,
1106+ unsigned int /* nBtns */
1107+);
1108+
1109+/***====================================================================***/
1110+
1111+extern char XkbToControl(
1112+ char /* c */
1113+);
1114+
1115+/***====================================================================***/
1116+
1117+extern Bool XkbSetDebuggingFlags(
1118+ Display * /* dpy */,
1119+ unsigned int /* mask */,
1120+ unsigned int /* flags */,
1121+ char * /* msg */,
1122+ unsigned int /* ctrls_mask */,
1123+ unsigned int /* ctrls */,
1124+ unsigned int * /* rtrn_flags */,
1125+ unsigned int * /* rtrn_ctrls */
1126+);
1127+
1128+extern Bool XkbApplyVirtualModChanges(
1129+ XkbDescPtr /* xkb */,
1130+ unsigned int /* changed */,
1131+ XkbChangesPtr /* changes */
1132+);
1133+
1134+extern Bool XkbUpdateActionVirtualMods(
1135+ XkbDescPtr /* xkb */,
1136+ XkbAction * /* act */,
1137+ unsigned int /* changed */
1138+);
1139+
1140+extern void XkbUpdateKeyTypeVirtualMods(
1141+ XkbDescPtr /* xkb */,
1142+ XkbKeyTypePtr /* type */,
1143+ unsigned int /* changed */,
1144+ XkbChangesPtr /* changes */
1145+);
1146+
1147+_XFUNCPROTOEND
1148+
1149+#endif /* _X11_XKBLIB_H_ */
@@ -0,0 +1,113 @@
1+/*
2+
3+Copyright 1985, 1986, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+*/
26+
27+/*
28+ * XWDFile.h MIT Project Athena, X Window system window raster
29+ * image dumper, dump file format header file.
30+ *
31+ * Author: Tony Della Fera, DEC
32+ * 27-Jun-85
33+ *
34+ * Modifier: William F. Wyatt, SAO
35+ * 18-Nov-86 - version 6 for saving/restoring color maps
36+ */
37+
38+#ifndef XWDFILE_H
39+#define XWDFILE_H
40+
41+#include <X11/Xmd.h>
42+
43+#define XWD_FILE_VERSION 7
44+#define sz_XWDheader 100
45+#define sz_XWDColor 12
46+
47+typedef CARD32 xwdval; /* for old broken programs */
48+
49+/* Values in the file are most significant byte first. */
50+
51+typedef struct _xwd_file_header {
52+ /* header_size = SIZEOF(XWDheader) + length of null-terminated
53+ * window name. */
54+ CARD32 header_size;
55+
56+ CARD32 file_version; /* = XWD_FILE_VERSION above */
57+ CARD32 pixmap_format; /* ZPixmap or XYPixmap */
58+ CARD32 pixmap_depth; /* Pixmap depth */
59+ CARD32 pixmap_width; /* Pixmap width */
60+ CARD32 pixmap_height; /* Pixmap height */
61+ CARD32 xoffset; /* Bitmap x offset, normally 0 */
62+ CARD32 byte_order; /* of image data: MSBFirst, LSBFirst */
63+
64+ /* bitmap_unit applies to bitmaps (depth 1 format XY) only.
65+ * It is the number of bits that each scanline is padded to. */
66+ CARD32 bitmap_unit;
67+
68+ CARD32 bitmap_bit_order; /* bitmaps only: MSBFirst, LSBFirst */
69+
70+ /* bitmap_pad applies to pixmaps (non-bitmaps) only.
71+ * It is the number of bits that each scanline is padded to. */
72+ CARD32 bitmap_pad;
73+
74+ CARD32 bits_per_pixel; /* Bits per pixel */
75+
76+ /* bytes_per_line is pixmap_width padded to bitmap_unit (bitmaps)
77+ * or bitmap_pad (pixmaps). It is the delta (in bytes) to get
78+ * to the same x position on an adjacent row. */
79+ CARD32 bytes_per_line;
80+ CARD32 visual_class; /* Class of colormap */
81+ CARD32 red_mask; /* Z red mask */
82+ CARD32 green_mask; /* Z green mask */
83+ CARD32 blue_mask; /* Z blue mask */
84+ CARD32 bits_per_rgb; /* Log2 of distinct color values */
85+ CARD32 colormap_entries; /* Number of entries in colormap; not used? */
86+ CARD32 ncolors; /* Number of XWDColor structures */
87+ CARD32 window_width; /* Window width */
88+ CARD32 window_height; /* Window height */
89+ CARD32 window_x; /* Window upper left X coordinate */
90+ CARD32 window_y; /* Window upper left Y coordinate */
91+ CARD32 window_bdrwidth; /* Window border width */
92+} XWDFileHeader;
93+
94+/* Null-terminated window name follows the above structure. */
95+
96+/* Next comes XWDColor structures, at offset XWDFileHeader.header_size in
97+ * the file. XWDFileHeader.ncolors tells how many XWDColor structures
98+ * there are.
99+ */
100+
101+typedef struct {
102+ CARD32 pixel;
103+ CARD16 red;
104+ CARD16 green;
105+ CARD16 blue;
106+ CARD8 flags;
107+ CARD8 pad;
108+} XWDColor;
109+
110+/* Last comes the image data in the format described by XWDFileHeader. */
111+
112+#endif /* XWDFILE_H */
113+
@@ -0,0 +1,121 @@
1+/*
2+
3+Copyright 1995, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be
12+included in all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the name of The Open Group shall
23+not be used in advertising or otherwise to promote the sale, use or
24+other dealings in this Software without prior written authorization
25+from The Open Group.
26+
27+*/
28+/*
29+ * The purpose of this header is to define the macros ALLOCATE_LOCAL and
30+ * DEALLOCATE_LOCAL appropriately for the platform being compiled on.
31+ * These macros are used to make fast, function-local memory allocations.
32+ * Their characteristics are as follows:
33+ *
34+ * void *ALLOCATE_LOCAL(size_t size)
35+ * Returns a pointer to size bytes of memory, or NULL if the allocation
36+ * failed. The memory must be freed with DEALLOCATE_LOCAL before the
37+ * function that made the allocation returns. You should not ask for
38+ * large blocks of memory with this function, since on many platforms
39+ * the memory comes from the stack, which may have limited size.
40+ *
41+ * void DEALLOCATE_LOCAL(void *)
42+ * Frees the memory allocated by ALLOCATE_LOCAL. Omission of this
43+ * step may be harmless on some platforms, but will result in
44+ * memory leaks or worse on others.
45+ *
46+ * Before including this file, you should define two macros,
47+ * ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK, that have the
48+ * same characteristics as ALLOCATE_LOCAL and DEALLOCATE_LOCAL. The
49+ * header uses the fallbacks if it doesn't know a "better" way to define
50+ * ALLOCATE_LOCAL and DEALLOCATE_LOCAL. Typical usage would be:
51+ *
52+ * #define ALLOCATE_LOCAL_FALLBACK(_size) malloc(_size)
53+ * #define DEALLOCATE_LOCAL_FALLBACK(_ptr) free(_ptr)
54+ * #include "Xalloca.h"
55+ */
56+
57+#ifndef XALLOCA_H
58+#define XALLOCA_H 1
59+
60+#ifndef INCLUDE_ALLOCA_H
61+/* Need to add more here to match Imake *.cf's */
62+# if defined(HAVE_ALLOCA_H) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
63+# define INCLUDE_ALLOCA_H
64+# endif
65+#endif
66+
67+#ifdef INCLUDE_ALLOCA_H
68+# include <alloca.h>
69+#endif
70+
71+#ifndef NO_ALLOCA
72+/*
73+ * os-dependent definition of local allocation and deallocation
74+ * If you want something other than (DE)ALLOCATE_LOCAL_FALLBACK
75+ * for ALLOCATE/DEALLOCATE_LOCAL then you add that in here.
76+ */
77+
78+
79+# ifdef __GNUC__
80+# ifndef alloca
81+# define alloca __builtin_alloca
82+# endif /* !alloca */
83+# define ALLOCATE_LOCAL(size) alloca((size_t)(size))
84+# else /* ! __GNUC__ */
85+
86+/*
87+ * warning: old mips alloca (pre 2.10) is unusable, new one is built in
88+ * Test is easy, the new one is named __builtin_alloca and comes
89+ * from alloca.h which #defines alloca.
90+ */
91+# if defined(__sun) || defined(alloca)
92+/*
93+ * Some System V boxes extract alloca.o from /lib/libPW.a; if you
94+ * decide that you don't want to use alloca, you might want to fix it here.
95+ */
96+/* alloca might be a macro taking one arg (hi, Sun!), so give it one. */
97+# if !defined(__cplusplus)
98+# define __Xnullarg /* as nothing */
99+ extern void *alloca(__Xnullarg);
100+# endif
101+# define ALLOCATE_LOCAL(size) alloca((size_t)(size))
102+# endif /* who does alloca */
103+# endif /* __GNUC__ */
104+
105+#endif /* NO_ALLOCA */
106+
107+#if !defined(ALLOCATE_LOCAL)
108+# if defined(ALLOCATE_LOCAL_FALLBACK) && defined(DEALLOCATE_LOCAL_FALLBACK)
109+# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK(_size)
110+# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK(_ptr)
111+# else /* no fallbacks supplied; error */
112+# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined!
113+# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined!
114+# endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */
115+#else
116+# if !defined(DEALLOCATE_LOCAL)
117+# define DEALLOCATE_LOCAL(_ptr) do {} while(0)
118+# endif
119+#endif /* defined(ALLOCATE_LOCAL) */
120+
121+#endif /* XALLOCA_H */
@@ -0,0 +1,94 @@
1+#ifndef _XARCH_H_
2+# define _XARCH_H_
3+
4+/*
5+ * Copyright 1997 Metro Link Incorporated
6+ *
7+ * All Rights Reserved
8+ *
9+ * Permission to use, copy, modify, distribute, and sell this software and its
10+ * documentation for any purpose is hereby granted without fee, provided that
11+ * the above copyright notice appear in all copies and that both that
12+ * copyright notice and this permission notice appear in supporting
13+ * documentation, and that the names of the above listed copyright holder(s)
14+ * not be used in advertising or publicity pertaining to distribution of
15+ * the software without specific, written prior permission. The above listed
16+ * copyright holder(s) make(s) no representations about the suitability of
17+ * this software for any purpose. It is provided "as is" without express or
18+ * implied warranty.
19+ *
20+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD
21+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
22+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
23+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
24+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
25+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
26+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
27+ */
28+
29+
30+/*
31+ * Determine the machine's byte order.
32+ */
33+
34+/* See if it is set in the imake config first */
35+# ifdef X_BYTE_ORDER
36+
37+# define X_BIG_ENDIAN 4321
38+# define X_LITTLE_ENDIAN 1234
39+
40+# else
41+
42+# if defined(SVR4) || defined(__SVR4)
43+# include <sys/types.h>
44+# include <sys/byteorder.h>
45+# elif defined(CSRG_BASED)
46+# if defined(__NetBSD__) || defined(__OpenBSD__)
47+# include <sys/types.h>
48+# endif
49+# include <machine/endian.h>
50+# elif defined(linux)
51+# if defined __STRICT_ANSI__
52+# undef __STRICT_ANSI__
53+# include <endian.h>
54+# define __STRICT_ANSI__
55+# else
56+# include <endian.h>
57+# endif
58+/* 'endian.h' might have been included before 'Xarch.h' */
59+# if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN)
60+# define LITTLE_ENDIAN __LITTLE_ENDIAN
61+# endif
62+# if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN)
63+# define BIG_ENDIAN __BIG_ENDIAN
64+# endif
65+# if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN)
66+# define PDP_ENDIAN __PDP_ENDIAN
67+# endif
68+# if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
69+# define BYTE_ORDER __BYTE_ORDER
70+# endif
71+# endif
72+
73+# ifndef BYTE_ORDER
74+# define LITTLE_ENDIAN 1234
75+# define BIG_ENDIAN 4321
76+
77+# if defined(__sun) && defined(__SVR4)
78+# include <sys/isa_defs.h>
79+# ifdef _LITTLE_ENDIAN
80+# define BYTE_ORDER LITTLE_ENDIAN
81+# endif
82+# ifdef _BIG_ENDIAN
83+# define BYTE_ORDER BIG_ENDIAN
84+# endif
85+# endif /* sun */
86+# endif /* BYTE_ORDER */
87+
88+# define X_BYTE_ORDER BYTE_ORDER
89+# define X_BIG_ENDIAN BIG_ENDIAN
90+# define X_LITTLE_ENDIAN LITTLE_ENDIAN
91+
92+# endif /* not in imake config */
93+
94+#endif /* _XARCH_H_ */
@@ -0,0 +1,79 @@
1+#ifndef XATOM_H
2+#define XATOM_H 1
3+
4+/* THIS IS A GENERATED FILE
5+ *
6+ * Do not change! Changing this file implies a protocol change!
7+ */
8+
9+#define XA_PRIMARY ((Atom) 1)
10+#define XA_SECONDARY ((Atom) 2)
11+#define XA_ARC ((Atom) 3)
12+#define XA_ATOM ((Atom) 4)
13+#define XA_BITMAP ((Atom) 5)
14+#define XA_CARDINAL ((Atom) 6)
15+#define XA_COLORMAP ((Atom) 7)
16+#define XA_CURSOR ((Atom) 8)
17+#define XA_CUT_BUFFER0 ((Atom) 9)
18+#define XA_CUT_BUFFER1 ((Atom) 10)
19+#define XA_CUT_BUFFER2 ((Atom) 11)
20+#define XA_CUT_BUFFER3 ((Atom) 12)
21+#define XA_CUT_BUFFER4 ((Atom) 13)
22+#define XA_CUT_BUFFER5 ((Atom) 14)
23+#define XA_CUT_BUFFER6 ((Atom) 15)
24+#define XA_CUT_BUFFER7 ((Atom) 16)
25+#define XA_DRAWABLE ((Atom) 17)
26+#define XA_FONT ((Atom) 18)
27+#define XA_INTEGER ((Atom) 19)
28+#define XA_PIXMAP ((Atom) 20)
29+#define XA_POINT ((Atom) 21)
30+#define XA_RECTANGLE ((Atom) 22)
31+#define XA_RESOURCE_MANAGER ((Atom) 23)
32+#define XA_RGB_COLOR_MAP ((Atom) 24)
33+#define XA_RGB_BEST_MAP ((Atom) 25)
34+#define XA_RGB_BLUE_MAP ((Atom) 26)
35+#define XA_RGB_DEFAULT_MAP ((Atom) 27)
36+#define XA_RGB_GRAY_MAP ((Atom) 28)
37+#define XA_RGB_GREEN_MAP ((Atom) 29)
38+#define XA_RGB_RED_MAP ((Atom) 30)
39+#define XA_STRING ((Atom) 31)
40+#define XA_VISUALID ((Atom) 32)
41+#define XA_WINDOW ((Atom) 33)
42+#define XA_WM_COMMAND ((Atom) 34)
43+#define XA_WM_HINTS ((Atom) 35)
44+#define XA_WM_CLIENT_MACHINE ((Atom) 36)
45+#define XA_WM_ICON_NAME ((Atom) 37)
46+#define XA_WM_ICON_SIZE ((Atom) 38)
47+#define XA_WM_NAME ((Atom) 39)
48+#define XA_WM_NORMAL_HINTS ((Atom) 40)
49+#define XA_WM_SIZE_HINTS ((Atom) 41)
50+#define XA_WM_ZOOM_HINTS ((Atom) 42)
51+#define XA_MIN_SPACE ((Atom) 43)
52+#define XA_NORM_SPACE ((Atom) 44)
53+#define XA_MAX_SPACE ((Atom) 45)
54+#define XA_END_SPACE ((Atom) 46)
55+#define XA_SUPERSCRIPT_X ((Atom) 47)
56+#define XA_SUPERSCRIPT_Y ((Atom) 48)
57+#define XA_SUBSCRIPT_X ((Atom) 49)
58+#define XA_SUBSCRIPT_Y ((Atom) 50)
59+#define XA_UNDERLINE_POSITION ((Atom) 51)
60+#define XA_UNDERLINE_THICKNESS ((Atom) 52)
61+#define XA_STRIKEOUT_ASCENT ((Atom) 53)
62+#define XA_STRIKEOUT_DESCENT ((Atom) 54)
63+#define XA_ITALIC_ANGLE ((Atom) 55)
64+#define XA_X_HEIGHT ((Atom) 56)
65+#define XA_QUAD_WIDTH ((Atom) 57)
66+#define XA_WEIGHT ((Atom) 58)
67+#define XA_POINT_SIZE ((Atom) 59)
68+#define XA_RESOLUTION ((Atom) 60)
69+#define XA_COPYRIGHT ((Atom) 61)
70+#define XA_NOTICE ((Atom) 62)
71+#define XA_FONT_NAME ((Atom) 63)
72+#define XA_FAMILY_NAME ((Atom) 64)
73+#define XA_FULL_NAME ((Atom) 65)
74+#define XA_CAP_HEIGHT ((Atom) 66)
75+#define XA_WM_CLASS ((Atom) 67)
76+#define XA_WM_TRANSIENT_FOR ((Atom) 68)
77+
78+#define XA_LAST_PREDEFINED ((Atom) 68)
79+#endif /* XATOM_H */
@@ -0,0 +1,181 @@
1+/*
2+
3+Copyright 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+*/
26+
27+#ifndef _Xauth_h
28+#define _Xauth_h
29+
30+/* struct xauth is full of implicit padding to properly align the pointers
31+ after the length fields. We can't clean that up without breaking ABI,
32+ so tell clang not to bother complaining about it. */
33+#ifdef __clang__
34+#pragma clang diagnostic push
35+#pragma clang diagnostic ignored "-Wpadded"
36+#endif
37+
38+typedef struct xauth {
39+ unsigned short family;
40+ unsigned short address_length;
41+ char *address;
42+ unsigned short number_length;
43+ char *number;
44+ unsigned short name_length;
45+ char *name;
46+ unsigned short data_length;
47+ char *data;
48+} Xauth;
49+
50+#ifdef __clang__
51+#pragma clang diagnostic pop
52+#endif
53+
54+#ifndef _XAUTH_STRUCT_ONLY
55+
56+# include <X11/Xfuncproto.h>
57+# include <X11/Xfuncs.h>
58+
59+# include <stdio.h>
60+
61+# define FamilyLocal (256) /* not part of X standard (i.e. X.h) */
62+# define FamilyWild (65535)
63+# define FamilyNetname (254) /* not part of X standard */
64+# define FamilyKrb5Principal (253) /* Kerberos 5 principal name */
65+# define FamilyLocalHost (252) /* for local non-net authentication */
66+
67+
68+_XFUNCPROTOBEGIN
69+
70+#ifndef __has_attribute
71+# define __has_attribute(x) 0 /* Compatibility with older compilers */
72+#endif
73+
74+#if __has_attribute(access)
75+# define XAU_ACCESS_ATTRIBUTE(X) __attribute__((access X))
76+#else
77+# define XAU_ACCESS_ATTRIBUTE(X)
78+#endif
79+
80+#if __has_attribute(malloc)
81+# if defined(__clang__) || (defined(__GNUC__) && __GNUC__ < 11)
82+/* Clang or gcc do not support the optional deallocator argument */
83+# define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc))
84+# else
85+# define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc X))
86+# endif
87+#else
88+# define XAU_MALLOC_ATTRIBUTE(X)
89+#endif
90+
91+char *XauFileName(void);
92+
93+void XauDisposeAuth(
94+Xauth* /* auth */
95+);
96+
97+XAU_MALLOC_ATTRIBUTE((XauDisposeAuth, 1))
98+Xauth *XauReadAuth(
99+FILE* /* auth_file */
100+);
101+
102+XAU_ACCESS_ATTRIBUTE((read_only, 1)) /* file_name */
103+int XauLockAuth(
104+_Xconst char* /* file_name */,
105+int /* retries */,
106+int /* timeout */,
107+long /* dead */
108+);
109+
110+XAU_ACCESS_ATTRIBUTE((read_only, 1)) /* file_name */
111+int XauUnlockAuth(
112+_Xconst char* /* file_name */
113+);
114+
115+XAU_ACCESS_ATTRIBUTE((read_only, 2)) /* auth */
116+int XauWriteAuth(
117+FILE* /* auth_file */,
118+Xauth* /* auth */
119+);
120+
121+XAU_ACCESS_ATTRIBUTE((read_only, 3, 2)) /* address */
122+XAU_ACCESS_ATTRIBUTE((read_only, 5, 4)) /* number */
123+XAU_ACCESS_ATTRIBUTE((read_only, 7, 6)) /* name */
124+Xauth *XauGetAuthByAddr(
125+#if NeedWidePrototypes
126+unsigned int /* family */,
127+unsigned int /* address_length */,
128+#else
129+unsigned short /* family */,
130+unsigned short /* address_length */,
131+#endif
132+_Xconst char* /* address */,
133+#if NeedWidePrototypes
134+unsigned int /* number_length */,
135+#else
136+unsigned short /* number_length */,
137+#endif
138+_Xconst char* /* number */,
139+#if NeedWidePrototypes
140+unsigned int /* name_length */,
141+#else
142+unsigned short /* name_length */,
143+#endif
144+_Xconst char* /* name */
145+);
146+
147+XAU_ACCESS_ATTRIBUTE((read_only, 3, 2)) /* address */
148+XAU_ACCESS_ATTRIBUTE((read_only, 5, 4)) /* number */
149+XAU_ACCESS_ATTRIBUTE((read_only, 7, 6)) /* type_names */
150+XAU_ACCESS_ATTRIBUTE((read_only, 8, 6)) /* type_lengths */
151+Xauth *XauGetBestAuthByAddr(
152+#if NeedWidePrototypes
153+unsigned int /* family */,
154+unsigned int /* address_length */,
155+#else
156+unsigned short /* family */,
157+unsigned short /* address_length */,
158+#endif
159+_Xconst char* /* address */,
160+#if NeedWidePrototypes
161+unsigned int /* number_length */,
162+#else
163+unsigned short /* number_length */,
164+#endif
165+_Xconst char* /* number */,
166+int /* types_length */,
167+char** /* type_names */,
168+_Xconst int* /* type_lengths */
169+);
170+
171+_XFUNCPROTOEND
172+
173+/* Return values from XauLockAuth */
174+
175+# define LOCK_SUCCESS 0 /* lock succeeded */
176+# define LOCK_ERROR 1 /* lock unexpectedly failed, check errno */
177+# define LOCK_TIMEOUT 2 /* lock failed, timeouts expired */
178+
179+#endif /* _XAUTH_STRUCT_ONLY */
180+
181+#endif /* _Xauth_h */
@@ -0,0 +1,37 @@
1+/*
2+ *
3+Copyright 1990, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ */
25+
26+#ifndef _XawAllWidgets_h
27+#define _XawAllWidgets_h
28+
29+#include <X11/Xmu/WidgetNode.h>
30+
31+/*
32+ * This file matches the generated AllWidgets.c
33+ */
34+extern XmuWidgetNode XawWidgetArray[];
35+extern int XawWidgetCount;
36+
37+#endif /* _XawAllWidgets_h */
@@ -0,0 +1,77 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawAsciiSink_h
49+#define _XawAsciiSink_h
50+
51+/*
52+ * AsciiSink Object
53+ */
54+
55+#include <X11/Xaw/TextSink.h>
56+
57+/* Resources:
58+
59+ Name Class RepType Default Value
60+ ---- ----- ------- -------------
61+ echo Output Boolean True
62+ displayNonprinting Output Boolean True
63+
64+*/
65+
66+#define XtCOutput "Output"
67+
68+#define XtNdisplayNonprinting "displayNonprinting"
69+#define XtNecho "echo"
70+
71+/* Class record constants */
72+extern WidgetClass asciiSinkObjectClass;
73+
74+typedef struct _AsciiSinkClassRec *AsciiSinkObjectClass;
75+typedef struct _AsciiSinkRec *AsciiSinkObject;
76+
77+#endif /* _XawAsciiSink_h */
@@ -0,0 +1,95 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawAsciiSinkP_h
49+#define _XawAsciiSinkP_h
50+
51+/*
52+ * AsciiSink Object Private Data
53+ */
54+#include <X11/Xaw/TextSinkP.h>
55+#include <X11/Xaw/AsciiSink.h>
56+
57+/* New fields for the AsciiSink object class record */
58+typedef struct _AsciiSinkClassPart {
59+ XtPointer extension;
60+} AsciiSinkClassPart;
61+
62+/* Full class record declaration */
63+typedef struct _AsciiSinkClassRec {
64+ ObjectClassPart object_class;
65+ TextSinkClassPart text_sink_class;
66+ AsciiSinkClassPart ascii_sink_class;
67+} AsciiSinkClassRec;
68+
69+extern AsciiSinkClassRec asciiSinkClassRec;
70+
71+/* New fields for the AsciiSink object record */
72+typedef struct {
73+ /* resources */
74+ XFontStruct *font; /* Font to draw in. */
75+ Boolean echo;
76+ Boolean display_nonprinting;
77+
78+ /* private */
79+ GC normgc, invgc, xorgc;
80+ XawTextPosition cursor_position;
81+ XawTextInsertState laststate;
82+ short cursor_x, cursor_y; /* Cursor Location. */
83+#ifndef OLDXAW
84+ XtPointer pad[4]; /* for future use and keep binary compatibility */
85+#endif
86+} AsciiSinkPart;
87+
88+/* Full instance record declaration */
89+typedef struct _AsciiSinkRec {
90+ ObjectPart object;
91+ TextSinkPart text_sink;
92+ AsciiSinkPart ascii_sink;
93+} AsciiSinkRec;
94+
95+#endif /* _XawAsciiSinkP_h */
@@ -0,0 +1,172 @@
1+/*
2+
3+Copyright 1989, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+*/
26+
27+
28+/*
29+ * AsciiSrc.h - Public Header file for Ascii Text Source.
30+ *
31+ * This is the public header file for the Ascii Text Source.
32+ * It is intended to be used with the Text widget, the simplest way to use
33+ * this text source is to use the AsciiText Object.
34+ *
35+ * Date: June 29, 1989
36+ *
37+ * By: Chris D. Peterson
38+ * MIT X Consortium
39+ * kit@expo.lcs.mit.edu
40+ */
41+
42+
43+#ifndef _XawAsciiSrc_h
44+#define _XawAsciiSrc_h
45+
46+#include <X11/Xaw/TextSrc.h>
47+
48+/* Resources:
49+
50+ Name Class RepType Default Value
51+ ---- ----- ------- -------------
52+ dataCompression DataCompression Boolean True
53+ length Length int (internal)
54+ pieceSize PieceSize int BUFSIZ
55+ string String String NULL
56+ type Type XawAsciiType XawAsciiString
57+ useStringInPlace UseStringInPlace Boolean False
58+
59+*/
60+
61+extern WidgetClass asciiSrcObjectClass;
62+
63+typedef struct _AsciiSrcClassRec *AsciiSrcObjectClass;
64+typedef struct _AsciiSrcRec *AsciiSrcObject;
65+
66+#define AsciiSourceObjectClass AsciiSrcObjectClass
67+#define AsciiSourceObject AsciiSrcObject
68+
69+/*
70+ * Resource Definitions
71+ */
72+#define XtCDataCompression "DataCompression"
73+#define XtCPieceSize "PieceSize"
74+#define XtCType "Type"
75+#define XtCUseStringInPlace "UseStringInPlace"
76+
77+#define XtNdataCompression "dataCompression"
78+#define XtNpieceSize "pieceSize"
79+#define XtNtype "type"
80+#define XtNuseStringInPlace "useStringInPlace"
81+
82+#define XtRAsciiType "AsciiType"
83+
84+#define XtEstring "string"
85+#define XtEfile "file"
86+
87+typedef enum {
88+ XawAsciiFile,
89+ XawAsciiString
90+} XawAsciiType;
91+
92+/*
93+ * Public routines
94+ */
95+
96+_XFUNCPROTOBEGIN
97+
98+/*
99+ * Function:
100+ * XawAsciiSourceFreeString
101+ *
102+ * Parameters:
103+ * w - AsciiSrc object
104+ *
105+ * Description:
106+ * Frees the string returned by a get values call
107+ * on the string when the source is of type string.
108+ */
109+void XawAsciiSourceFreeString
110+(
111+ Widget w
112+ );
113+
114+/*
115+ * Function:
116+ * XawAsciiSave
117+ *
118+ * Arguments:
119+ * w - asciiSrc Object.
120+ *
121+ * Description:
122+ * Saves all the pieces into a file or string as required.
123+ *
124+ * Returns:
125+ * True if the save was successful
126+ */
127+Bool XawAsciiSave
128+(
129+ Widget w
130+ );
131+
132+/*
133+ * Function:
134+ * XawAsciiSaveAsFile
135+ *
136+ * Parameters:
137+ * w - asciiSrc object
138+ * name - name of the file to save this file into
139+ *
140+ * Description:
141+ * Save the current buffer as a file.
142+ *
143+ * Returns:
144+ * True if the save was successful
145+ */
146+Bool XawAsciiSaveAsFile
147+(
148+ Widget w,
149+ _Xconst char *name
150+ );
151+
152+/*
153+ * Function:
154+ * XawAsciiSourceChanged
155+ *
156+ * Parameters:
157+ * w - asciiSource object
158+ *
159+ * Description:
160+ * Returns true if the source has changed since last saved.
161+ *
162+ * Returns:
163+ * a Boolean (see description)
164+ */
165+Bool XawAsciiSourceChanged
166+(
167+ Widget w
168+ );
169+
170+_XFUNCPROTOEND
171+
172+#endif /* _XawAsciiSrc_h */
@@ -0,0 +1,139 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * AsciiSrcP.h - Private Header for Ascii Text Source.
50+ *
51+ * This is the private header file for the Ascii Text Source.
52+ * It is intended to be used with the Text widget, the simplest way to use
53+ * this text source is to use the AsciiText Object.
54+ *
55+ * Date: June 29, 1989
56+ *
57+ * By: Chris D. Peterson
58+ * MIT X Consortium
59+ * kit@expo.lcs.mit.edu
60+ */
61+
62+#ifndef _XawAsciiSrcP_h
63+#define _XawAsciiSrcP_h
64+
65+#include <X11/Xaw/TextSrcP.h>
66+#include <X11/Xaw/AsciiSrc.h>
67+
68+#ifdef L_tmpnam
69+#define TMPSIZ L_tmpnam
70+#else
71+#ifdef PATH_MAX
72+#define TMPSIZ PATH_MAX
73+#else
74+#define TMPSIZ 1024 /* bytes to allocate for tmpnam */
75+#endif
76+#endif
77+
78+typedef struct _Piece { /* Piece of the text file of BUFSIZ allocated
79+ characters */
80+ char *text; /* The text in this buffer */
81+ XawTextPosition used; /* The number of characters of this buffer
82+ that have been used */
83+ struct _Piece *prev, *next; /* linked list pointers */
84+} Piece;
85+
86+typedef struct _AsciiSrcClassPart {
87+ XtPointer extension;
88+} AsciiSrcClassPart;
89+
90+/* Full class record */
91+typedef struct _AsciiSrcClassRec {
92+ ObjectClassPart object_class;
93+ TextSrcClassPart text_src_class;
94+ AsciiSrcClassPart ascii_src_class;
95+} AsciiSrcClassRec;
96+
97+extern AsciiSrcClassRec asciiSrcClassRec;
98+
99+/* New fields for the AsciiSrc object */
100+typedef struct _AsciiSrcPart {
101+ /* resources */
102+ char *string; /* either the string, or the
103+ file name, depending upon the type */
104+ XawAsciiType type; /* either string or disk */
105+ XawTextPosition piece_size; /* Size of text buffer for each piece */
106+ Boolean data_compression; /* compress to minimum memory automatically
107+ on save? */
108+#ifdef OLDXAW
109+ XtCallbackList callback;
110+#endif
111+ Boolean use_string_in_place;/* Use the string passed in place */
112+ int ascii_length; /* length field for ascii string emulation */
113+
114+#ifdef ASCII_DISK
115+ String filename; /* name of file for Compatibility */
116+#endif /* ASCII_DISK */
117+
118+ /* private */
119+ Boolean is_tempfile; /* Is this a temporary file? */
120+#ifdef OLDXAW
121+ Boolean changes;
122+#endif
123+ Boolean allocated_string; /* Have I allocated the
124+ string in ascii_src->string? */
125+ XawTextPosition length; /* length of file */
126+ Piece *first_piece; /* first piece of the text */
127+#ifndef OLDXAW
128+ XtPointer pad[4]; /* for future use and keep binary compatibility */
129+#endif
130+} AsciiSrcPart;
131+
132+/* instance record */
133+typedef struct _AsciiSrcRec {
134+ ObjectPart object;
135+ TextSrcPart text_src;
136+ AsciiSrcPart ascii_src;
137+} AsciiSrcRec;
138+
139+#endif /* _XawAsciiSrcP_h */
@@ -0,0 +1,123 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * AsciiText.h - Public header file for AsciiText Widget
50+ *
51+ * This Widget is intended to be used as a simple front end to the
52+ * text widget with an ascii source and ascii sink attached to it
53+ *
54+ * Date: June 29, 1989
55+ *
56+ * By: Chris D. Peterson
57+ * MIT X Consortium
58+ * kit@expo.lcs.mit.edu
59+ */
60+#ifndef _AsciiText_h
61+#define _AsciiText_h
62+
63+#include <X11/Xaw/Text.h>
64+#include <X11/Xaw/AsciiSrc.h>
65+#include <X11/Xaw/MultiSrc.h>
66+
67+/* Resources:
68+
69+ Name Class RepType Default Value
70+ ---- ----- ------- -------------
71+ autoFill AutoFill Boolean False
72+ background Background Pixel XtDefaultBackground
73+ border BorderColor Pixel XtDefaultForeground
74+ borderWidth BorderWidth Dimension 1
75+ bottomMargin Margin Position 2
76+ cursor Cursor Cursor xterm
77+ destroyCallback Callback Pointer NULL
78+ displayCaret Output Boolean True
79+ displayPosition TextPosition int 0
80+ editType EditType XawTextEditType XawtextRead
81+ font Font XFontStruct* Fixed
82+ foreground Foreground Pixel Black
83+ height Height Dimension font height
84+ insertPosition TextPosition int 0
85+ international International Boolean false
86+ leftMargin Margin Position 2
87+ mappedWhenManaged MappedWhenManaged Boolean True
88+ resize Resize XawTextResizeMode XawtextResizeNever
89+ rightMargin Margin Position 4
90+ scrollHorizontal Scroll XawTextScrollMode XawtextScrollNever
91+ scrollVertical Scroll XawTextScrollMode XawtextScrollNever
92+ selectTypes SelectTypes Pointer pos/word/line/par/all
93+ selection Selection Pointer (empty selection)
94+ sensitive Sensitive Boolean True
95+ sink TextSink Widget (none)
96+ source TextSource Widget (none)
97+ string String String NULL
98+ topMargin Margin Position 2
99+ width Width Dimension 100
100+ wrap Wrap XawTextWrapMode XawtextWrapNever
101+ x Position Position 0
102+ y Position Position 0
103+
104+ (see also *Src.h and *Sink.h)
105+*/
106+
107+typedef struct _AsciiTextClassRec *AsciiTextWidgetClass;
108+typedef struct _AsciiRec *AsciiWidget;
109+
110+extern WidgetClass asciiTextWidgetClass;
111+
112+/*
113+ * Disk and String Emulation Info
114+ */
115+#ifdef ASCII_STRING
116+extern WidgetClass asciiStringWidgetClass;
117+#endif
118+
119+#ifdef ASCII_DISK
120+extern WidgetClass asciiDiskWidgetClass;
121+#endif
122+
123+#endif /* _AsciiText_h */
@@ -0,0 +1,164 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * AsciiText.c - Private header file for AsciiText Widget.
50+ *
51+ * This Widget is intended to be used as a simple front end to the
52+ * text widget with an ascii source and ascii sink attached to it.
53+ *
54+ * Date: June 29, 1989
55+ *
56+ * By: Chris D. Peterson
57+ * MIT X Consortium
58+ * kit@expo.lcs.mit.edu
59+ */
60+
61+#ifndef _AsciiTextP_h
62+#define _AsciiTextP_h
63+
64+#include <X11/Xaw/TextP.h>
65+#include <X11/Xaw/AsciiText.h>
66+#include <X11/Xaw/AsciiSrc.h>
67+#include <X11/Xaw/MultiSrc.h>
68+
69+typedef struct {
70+ XtPointer extension;
71+} AsciiClassPart;
72+
73+typedef struct _AsciiTextClassRec {
74+ CoreClassPart core_class;
75+ SimpleClassPart simple_class;
76+ TextClassPart text_class;
77+ AsciiClassPart ascii_class;
78+} AsciiTextClassRec;
79+
80+extern AsciiTextClassRec asciiTextClassRec;
81+
82+typedef struct {
83+ int resource;
84+#ifndef OLDXAW
85+ XtPointer pad[4]; /* for future use and keep binary compatibility */
86+#endif
87+} AsciiPart;
88+
89+typedef struct _AsciiRec {
90+ CorePart core;
91+ SimplePart simple;
92+ TextPart text;
93+ AsciiPart ascii;
94+} AsciiRec;
95+
96+/*
97+ * Ascii String Emulation widget
98+ */
99+#ifdef ASCII_STRING
100+typedef struct {
101+ XtPointer extension;
102+} AsciiStringClassPart;
103+
104+typedef struct _AsciiStringClassRec {
105+ CoreClassPart core_class;
106+ SimpleClassPart simple_class;
107+ TextClassPart text_class;
108+ AsciiClassPart ascii_class;
109+ AsciiStringClassPart string_class;
110+} AsciiStringClassRec;
111+
112+extern AsciiStringClassRec asciiStringClassRec;
113+
114+typedef struct {
115+ int resource;
116+#ifndef OLDXAW
117+ XtPointer pad[4]; /* for future use and keep binary compatibility */
118+#endif
119+} AsciiStringPart;
120+
121+typedef struct _AsciiStringRec {
122+ CorePart core;
123+ SimplePart simple;
124+ TextPart text;
125+ AsciiPart ascii;
126+ AsciiStringPart ascii_str;
127+} AsciiStringRec;
128+#endif /* ASCII_STRING */
129+
130+#ifdef ASCII_DISK
131+/*
132+ * Ascii Disk Emulation widget
133+ */
134+typedef struct {
135+ XtPointer extension;
136+} AsciiDiskClassPart;
137+
138+typedef struct _AsciiDiskClassRec {
139+ CoreClassPart core_class;
140+ SimpleClassPart simple_class;
141+ TextClassPart text_class;
142+ AsciiClassPart ascii_class;
143+ AsciiDiskClassPart disk_class;
144+} AsciiDiskClassRec;
145+
146+extern AsciiDiskClassRec asciiDiskClassRec;
147+
148+typedef struct {
149+ char resource;
150+#ifndef OLDXAW
151+ XtPointer pad[4]; /* for future use and keep binary compatibility */
152+#endif
153+} AsciiDiskPart;
154+
155+typedef struct _AsciiDiskRec {
156+ CorePart core;
157+ SimplePart simple;
158+ TextPart text;
159+ AsciiPart ascii;
160+ AsciiDiskPart ascii_disk;
161+} AsciiDiskRec;
162+#endif /* ASCII_DISK */
163+
164+#endif /* _AsciiTextP_h */
@@ -0,0 +1,102 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawBox_h
49+#define _XawBox_h
50+
51+#include <X11/Xmu/Converters.h>
52+
53+/*
54+ * Box Widget (subclass of CompositeClass)
55+ */
56+
57+/* Resources:
58+
59+ Name Class RepType Default Value
60+ ---- ----- ------- -------------
61+ background Background Pixel XtDefaultBackground
62+ border BorderColor Pixel XtDefaultForeground
63+ borderWidth BorderWidth Dimension 1
64+ destroyCallback Callback Pointer NULL
65+ displayList DisplayList XawDisplayList* NULL
66+ hSpace HSpace Dimension 4
67+ height Height Dimension 0
68+ mappedWhenManaged MappedWhenManaged Boolean True
69+ orientation Orientation XtOrientation vertical
70+ vSpace VSpace Dimension 4
71+ width Width Dimension 0
72+ x Position Position 0
73+ y Position Position 0
74+
75+*/
76+
77+#ifndef _XtStringDefs_h_
78+#define XtNhSpace "hSpace"
79+#define XtNvSpace "vSpace"
80+#endif
81+
82+#ifndef OLDXAW
83+#ifndef XawNdisplayList
84+#define XawNdisplayList "displayList"
85+#endif
86+
87+#ifndef XawCDisplayList
88+#define XawCDisplayList "DisplayList"
89+#endif
90+
91+#ifndef XawRDisplayList
92+#define XawRDisplayList "XawDisplayList"
93+#endif
94+#endif /* OLDXAW */
95+
96+/* Class record constants */
97+extern WidgetClass boxWidgetClass;
98+
99+typedef struct _BoxClassRec *BoxWidgetClass;
100+typedef struct _BoxRec *BoxWidget;
101+
102+#endif /* _XawBox_h */
@@ -0,0 +1,97 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawBoxP_h
49+#define _XawBoxP_h
50+
51+/*
52+ * Box Widget Private Data
53+ */
54+#include <X11/Xaw/Box.h>
55+#include <X11/Xmu/Converters.h>
56+#include <X11/Xaw/XawInit.h>
57+
58+/* New fields for the Box widget class record */
59+typedef struct {
60+ XtPointer extension;
61+} BoxClassPart;
62+
63+/* Full class record declaration */
64+typedef struct _BoxClassRec {
65+ CoreClassPart core_class;
66+ CompositeClassPart composite_class;
67+ BoxClassPart box_class;
68+} BoxClassRec;
69+
70+extern BoxClassRec boxClassRec;
71+
72+/* New fields for the Box widget record */
73+typedef struct {
74+ /* resources */
75+ Dimension h_space, v_space;
76+ XtOrientation orientation;
77+
78+ /* private state */
79+ Dimension preferred_width, preferred_height;
80+ Dimension last_query_width, last_query_height;
81+ XtGeometryMask last_query_mode;
82+#ifndef OLDXAW
83+ XawDisplayList *display_list;
84+ XtPointer pad[4]; /* for future use and keep binary compatibility */
85+#endif
86+} BoxPart;
87+
88+/*
89+ * Full instance record declaration
90+ */
91+typedef struct _BoxRec {
92+ CorePart core;
93+ CompositePart composite;
94+ BoxPart box;
95+} BoxRec;
96+
97+#endif /* _XawBoxP_h */
@@ -0,0 +1,42 @@
1+/*
2+
3+Copyright 1985, 1986, 1987, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+*/
26+
27+#ifndef _Cardinals_h
28+#define _Cardinals_h
29+
30+#define ZERO ((Cardinal)0)
31+#define ONE ((Cardinal)1)
32+#define TWO ((Cardinal)2)
33+#define THREE ((Cardinal)3)
34+#define FOUR ((Cardinal)4)
35+#define FIVE ((Cardinal)5)
36+#define SIX ((Cardinal)6)
37+#define SEVEN ((Cardinal)7)
38+#define EIGHT ((Cardinal)8)
39+#define NINE ((Cardinal)9)
40+#define TEN ((Cardinal)10)
41+
42+#endif /* _Cardinals_h */
@@ -0,0 +1,116 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawCommand_h
49+#define _XawCommand_h
50+
51+#include <X11/Xaw/Label.h>
52+
53+/* Command widget resources:
54+
55+ Name Class RepType Default Value
56+ ---- ----- ------- -------------
57+ accelerators Accelerators AcceleratorTable NULL
58+ ancestorSensitive AncestorSensitive Boolean True
59+ background Background Pixel XtDefaultBackground
60+ backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap
61+ bitmap Pixmap Pixmap None
62+ borderColor BorderColor Pixel XtDefaultForeground
63+ borderPixmap Pixmap Pixmap XtUnspecifiedPixmap
64+ borderWidth BorderWidth Dimension 1
65+ callback Callback XtCallbackList NULL
66+ colormap Colormap Colormap parent's colormap
67+ cornerRoundPercent CornerRoundPercent Dimension 25
68+ cursor Cursor Cursor None
69+ cursorName Cursor String NULL
70+ depth Depth int parent's depth
71+ destroyCallback Callback XtCallbackList NULL
72+ displayList DisplayList XawDisplayList* NULL
73+ encoding Encoding UnsignedChar XawTextEncoding8bit
74+ font Font XFontStruct* XtDefaultFont
75+ foreground Foreground Pixel XtDefaultForeground
76+ height Height Dimension text height
77+ highlightThickness Thickness Dimension 0 if shaped, else 2
78+ insensitiveBorder Insensitive Pixmap Gray
79+ internalHeight Height Dimension 2
80+ internalWidth Width Dimension 4
81+ justify Justify XtJustify XtJustifyCenter
82+ label Label String NULL
83+ leftBitmap LeftBitmap Pixmap None
84+ mappedWhenManaged MappedWhenManaged Boolean True
85+ pointerColor Foreground Pixel XtDefaultForeground
86+ pointerColorBackground Background Pixel XtDefaultBackground
87+ resize Resize Boolean True
88+ screen Screen Screen parent's Screen
89+ sensitive Sensitive Boolean True
90+ shapeStyle ShapeStyle ShapeStyle Rectangle
91+ translations Translations TranslationTable see doc or source
92+ width Width Dimension text width
93+ x Position Position 0
94+ y Position Position 0
95+
96+*/
97+
98+#define XtNhighlightThickness "highlightThickness"
99+
100+#define XtNshapeStyle "shapeStyle"
101+#define XtCShapeStyle "ShapeStyle"
102+#define XtRShapeStyle "ShapeStyle"
103+#define XtNcornerRoundPercent "cornerRoundPercent"
104+#define XtCCornerRoundPercent "CornerRoundPercent"
105+
106+#define XawShapeRectangle XmuShapeRectangle
107+#define XawShapeOval XmuShapeOval
108+#define XawShapeEllipse XmuShapeEllipse
109+#define XawShapeRoundedRectangle XmuShapeRoundedRectangle
110+
111+extern WidgetClass commandWidgetClass;
112+
113+typedef struct _CommandClassRec *CommandWidgetClass;
114+typedef struct _CommandRec *CommandWidget;
115+
116+#endif /* _XawCommand_h */
@@ -0,0 +1,111 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawCommandP_h
49+#define _XawCommandP_h
50+
51+/*
52+ * Command Widget Private Data
53+ */
54+#include <X11/Xaw/Command.h>
55+#include <X11/Xaw/LabelP.h>
56+
57+typedef enum {
58+ HighlightNone, /* Do not highlight */
59+ HighlightWhenUnset, /* Highlight only when unset, this is
60+ to preserve current command widget
61+ functionality */
62+ HighlightAlways /* Always highlight, lets the toggle widget
63+ and other subclasses do the right thing */
64+} XtCommandHighlight;
65+
66+/* New fields for the Command widget class record */
67+typedef struct _CommandClass {
68+ XtPointer extension;
69+} CommandClassPart;
70+
71+/* Full class record declaration */
72+typedef struct _CommandClassRec {
73+ CoreClassPart core_class;
74+ SimpleClassPart simple_class;
75+ LabelClassPart label_class;
76+ CommandClassPart command_class;
77+} CommandClassRec;
78+
79+extern CommandClassRec commandClassRec;
80+
81+/* New fields for the Command widget record */
82+typedef struct {
83+ /* resources */
84+ Dimension highlight_thickness;
85+ XtCallbackList callbacks;
86+
87+ /* private state */
88+ Pixmap gray_pixmap;
89+ GC normal_GC;
90+ GC inverse_GC;
91+ Boolean set;
92+ XtCommandHighlight highlighted;
93+
94+ /* more resources */
95+ int shape_style;
96+ Dimension corner_round;
97+
98+#ifndef OLDXAW
99+ XtPointer pad[4]; /* for future use and keep binary compatibility */
100+#endif
101+} CommandPart;
102+
103+/* Full widget declaration */
104+typedef struct _CommandRec {
105+ CorePart core;
106+ SimplePart simple;
107+ LabelPart label;
108+ CommandPart command;
109+} CommandRec;
110+
111+#endif /* _XawCommandP_h */
@@ -0,0 +1,98 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawDialog_h
49+#define _XawDialog_h
50+
51+#include <X11/Xaw/Form.h>
52+
53+/* Resources:
54+
55+ Name Class RepType Default Value
56+ ---- ----- ------- -------------
57+ background Background Pixel XtDefaultBackground
58+ borderColor BorderColor Pixel XtDefaultForeground
59+ borderWidth BorderWidth Dimension 1
60+ destroyCallback Callback Pointer NULL
61+ height Height Dimension computed at create
62+ icon Icon Pixmap 0
63+ label Label String NULL
64+ mappedWhenManaged MappedWhenManaged Boolean True
65+ sensitive Sensitive Boolean True
66+ value Value String NULL
67+ width Width Dimension computed at create
68+ x Position Position 0
69+ y Position Position 0
70+
71+*/
72+
73+#define XtCIcon "Icon"
74+#define XtNicon "icon"
75+
76+typedef struct _DialogClassRec *DialogWidgetClass;
77+typedef struct _DialogRec *DialogWidget;
78+
79+extern WidgetClass dialogWidgetClass;
80+
81+_XFUNCPROTOBEGIN
82+
83+void XawDialogAddButton
84+(
85+ Widget dialog,
86+ _Xconst char *name,
87+ XtCallbackProc function,
88+ XtPointer client_data
89+ );
90+
91+char *XawDialogGetValueString
92+(
93+ Widget w
94+);
95+
96+_XFUNCPROTOEND
97+
98+#endif /* _XawDialog_h */
@@ -0,0 +1,100 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _DialogP_h
49+#define _DialogP_h
50+
51+#include <X11/Xaw/Dialog.h>
52+#include <X11/Xaw/FormP.h>
53+
54+typedef struct {
55+ XtPointer extension;
56+} DialogClassPart;
57+
58+typedef struct _DialogClassRec {
59+ CoreClassPart core_class;
60+ CompositeClassPart composite_class;
61+ ConstraintClassPart constraint_class;
62+ FormClassPart form_class;
63+ DialogClassPart dialog_class;
64+} DialogClassRec;
65+
66+extern DialogClassRec dialogClassRec;
67+
68+typedef struct _DialogPart {
69+ /* resources */
70+ String label; /* description of the dialog */
71+ String value; /* for the user response */
72+ Pixmap icon; /* icon bitmap */
73+
74+ /* private */
75+ Widget iconW; /* widget to display the icon */
76+ Widget labelW; /* widget to display description */
77+ Widget valueW; /* user response TextWidget */
78+#ifndef OLDXAW
79+ XtPointer pad[4]; /* for future use and keep binary compatibility */
80+#endif
81+} DialogPart;
82+
83+typedef struct _DialogRec {
84+ CorePart core;
85+ CompositePart composite;
86+ ConstraintPart constraint;
87+ FormPart form;
88+ DialogPart dialog;
89+} DialogRec;
90+
91+typedef struct {
92+ XtPointer extension;
93+} DialogConstraintsPart;
94+
95+typedef struct _DialogConstraintsRec {
96+ FormConstraintsPart form;
97+ DialogConstraintsPart dialog;
98+} DialogConstraintsRec, *DialogConstraints;
99+
100+#endif /* _DialogP_h */
@@ -0,0 +1,167 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawForm_h
49+#define _XawForm_h
50+
51+#include <X11/Intrinsic.h>
52+
53+/* Resources:
54+
55+ Name Class RepType Default Value
56+ ---- ----- ------- -------------
57+ background Background Pixel XtDefaultBackground
58+ border BorderColor Pixel XtDefaultForeground
59+ borderWidth BorderWidth Dimension 1
60+ defaultDistance Thickness int 4
61+ destroyCallback Callback Pointer NULL
62+ displayList DisplayList XawDisplayList* NULL
63+ height Height Dimension computed at realize
64+ mappedWhenManaged MappedWhenManaged Boolean True
65+ sensitive Sensitive Boolean True
66+ width Width Dimension computed at realize
67+ x Position Position 0
68+ y Position Position 0
69+
70+*/
71+
72+/* Constraint parameters:
73+
74+ Name Class RepType Default Value
75+ ---- ----- ------- -------------
76+ bottom Edge XtEdgeType XtRubber
77+ fromHoriz Widget Widget (left edge of form)
78+ fromVert Widget Widget (top of form)
79+ horizDistance Thickness int defaultDistance
80+ left Edge XtEdgeType XtRubber
81+ resizable Boolean Boolean False
82+ right Edge XtEdgeType XtRubber
83+ top Edge XtEdgeType XtRubber
84+ vertDistance Thickness int defaultDistance
85+
86+*/
87+
88+
89+#ifndef _XtStringDefs_h_
90+#define XtNtop "top"
91+#define XtRWidget "Widget"
92+#endif
93+
94+#define XtNdefaultDistance "defaultDistance"
95+#define XtNbottom "bottom"
96+#define XtNleft "left"
97+#define XtNright "right"
98+#define XtNfromHoriz "fromHoriz"
99+#define XtNfromVert "fromVert"
100+#define XtNhorizDistance "horizDistance"
101+#define XtNvertDistance "vertDistance"
102+#define XtNresizable "resizable"
103+
104+#define XtCEdge "Edge"
105+#define XtCWidget "Widget"
106+
107+typedef enum {
108+ XawChainTop, /* Keep this edge a constant distance from
109+ the top of the form */
110+ XawChainBottom, /* Keep this edge a constant distance from
111+ the bottom of the form */
112+ XawChainLeft, /* Keep this edge a constant distance from
113+ the left of the form */
114+ XawChainRight, /* Keep this edge a constant distance from
115+ the right of the form */
116+ XawRubber /* Keep this edge a proportional distance
117+ from the edges of the form */
118+} XawEdgeType;
119+
120+#define XtEdgeType XawEdgeType
121+
122+#define XtChainTop XawChainTop
123+#define XtChainBottom XawChainBottom
124+#define XtChainLeft XawChainLeft
125+#define XtChainRight XawChainRight
126+#define XtRubber XawRubber
127+
128+#define XtEchainLeft "chainLeft"
129+#define XtEchainRight "chainRight"
130+#define XtEchainTop "chainTop"
131+#define XtEchainBottom "chainBottom"
132+#define XtErubber "rubber"
133+
134+#ifndef OLDXAW
135+#ifndef XawNdisplayList
136+#define XawNdisplayList "displayList"
137+#endif
138+
139+#ifndef XawCDisplayList
140+#define XawCDisplayList "DisplayList"
141+#endif
142+
143+#ifndef XawRDisplayList
144+#define XawRDisplayList "XawDisplayList"
145+#endif
146+#endif
147+
148+typedef struct _FormClassRec *FormWidgetClass;
149+typedef struct _FormRec *FormWidget;
150+
151+extern WidgetClass formWidgetClass;
152+
153+_XFUNCPROTOBEGIN
154+
155+void XawFormDoLayout
156+(
157+ Widget w,
158+#if NeedWidePrototypes
159+ Bool do_layout
160+#else
161+ Boolean do_layout
162+#endif
163+ );
164+
165+_XFUNCPROTOEND
166+
167+#endif /* _XawForm_h */
@@ -0,0 +1,139 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/* Form widget private definitions */
49+
50+#ifndef _XawFormP_h
51+#define _XawFormP_h
52+
53+#include <X11/Xfuncproto.h>
54+
55+#include <X11/Xaw/Form.h>
56+#include <X11/Xaw/XawInit.h>
57+
58+_XFUNCPROTOBEGIN
59+
60+#define XtREdgeType "EdgeType"
61+
62+typedef enum {
63+ LayoutPending,
64+ LayoutInProgress,
65+ LayoutDone
66+} LayoutState;
67+
68+#define XtInheritLayout \
69+((Boolean (*)(FormWidget, unsigned int, unsigned int, Bool))_XtInherit)
70+
71+typedef struct {
72+ Boolean(*layout)(FormWidget, unsigned int, unsigned int, Bool);
73+#ifndef OLDXAW
74+ XtPointer extension;
75+#endif
76+} FormClassPart;
77+
78+typedef struct _FormClassRec {
79+ CoreClassPart core_class;
80+ CompositeClassPart composite_class;
81+ ConstraintClassPart constraint_class;
82+ FormClassPart form_class;
83+} FormClassRec;
84+
85+extern FormClassRec formClassRec;
86+
87+typedef struct _FormPart {
88+ /* resources */
89+ int default_spacing; /* default distance between children */
90+
91+ /* private */
92+ Dimension old_width, old_height; /* reference value for *_virtual */
93+ int no_refigure; /* no re-layout while > 0 */
94+ Boolean needs_relayout; /* next time no_refigure == 0 */
95+ Boolean resize_in_layout; /* should layout() do geom request? */
96+ Dimension preferred_width, preferred_height; /* cached from layout */
97+ Boolean resize_is_no_op; /* Causes resize to take not action */
98+#ifndef OLDXAW
99+ XawDisplayList *display_list;
100+ XtPointer pad[4]; /* for future use and keep binary compatibility */
101+#endif
102+} FormPart;
103+
104+typedef struct _FormRec {
105+ CorePart core;
106+ CompositePart composite;
107+ ConstraintPart constraint;
108+ FormPart form;
109+} FormRec;
110+
111+typedef struct _FormConstraintsPart {
112+ /* resources */
113+ XtEdgeType top, bottom, left, right;/* where to drag edge on resize */
114+ int dx; /* desired horiz offset */
115+ int dy; /* desired vertical offset */
116+ Widget horiz_base; /* measure dx from here if non-null */
117+ Widget vert_base; /* measure dy from here if non-null */
118+ Boolean allow_resize; /* True if child may request resize */
119+
120+ /* private */
121+ short virtual_width, virtual_height;
122+ Position new_x, new_y;
123+ LayoutState layout_state; /* temporary layout state */
124+ Boolean deferred_resize;/* was resized while no_refigure is set */
125+#ifndef OLDXAW
126+ short virtual_x, virtual_y;
127+ XtPointer pad[2]; /* leave some space for further optimizations
128+ * in the form widget geometry
129+ */
130+#endif
131+} FormConstraintsPart;
132+
133+typedef struct _FormConstraintsRec {
134+ FormConstraintsPart form;
135+} FormConstraintsRec, *FormConstraints;
136+
137+_XFUNCPROTOEND
138+
139+#endif /* _XawFormP_h */
@@ -0,0 +1,96 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * Grip.h - Public Definitions for Grip widget (used by VPane Widget)
50+ *
51+ */
52+
53+#ifndef _XawGrip_h
54+#define _XawGrip_h
55+
56+#include <X11/Xaw/Simple.h>
57+
58+/* Resources:
59+
60+ Name Class RepType Default Value
61+ ---- ----- ------- -------------
62+ foreground Foreground Pixel XtDefaultForeground
63+ border BorderColor Pixel XtDefaultForeground
64+ borderWidth BorderWidth Dimension 0
65+ callback Callback Pointer GripAction
66+ cursor Cursor Cursor None
67+ cursorName Cursor String NULL
68+ destroyCallback Callback Pointer NULL
69+ height Height Dimension 8
70+ mappedWhenManaged MappedWhenManaged Boolean True
71+ pointerColor Foreground Pixel XtDefaultForeground
72+ pointerColorBackground Background Pixel XtDefaultBackground
73+ sensitive Sensitive Boolean True
74+ width Width Dimension 8
75+ x Position Position 0
76+ y Position Position 0
77+
78+*/
79+
80+#define XtNgripTranslations "gripTranslations"
81+
82+typedef struct _XawGripCallData {
83+ XEvent *event; /* the event causing the GripAction */
84+ String *params; /* the TranslationTable params */
85+ Cardinal num_params; /* count of params */
86+} XawGripCallDataRec, *XawGripCallData,
87+ GripCallDataRec, *GripCallData; /* supported for R4 compatibility */
88+
89+/* Class Record Constant */
90+
91+extern WidgetClass gripWidgetClass;
92+
93+typedef struct _GripClassRec *GripWidgetClass;
94+typedef struct _GripRec *GripWidget;
95+
96+#endif /* _XawGrip_h */
@@ -0,0 +1,85 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawGripP_h
49+#define _XawGripP_h
50+
51+#include <X11/Xaw/Grip.h>
52+#include <X11/Xaw/SimpleP.h>
53+
54+#define DEFAULT_GRIP_SIZE 8
55+
56+/* New fields for the Grip widget class */
57+typedef struct {
58+ XtPointer extension;
59+} GripClassPart;
60+
61+/* Full Class record */
62+typedef struct _GripClassRec {
63+ CoreClassPart core_class;
64+ SimpleClassPart simple_class;
65+ GripClassPart grip_class;
66+} GripClassRec;
67+
68+extern GripClassRec gripClassRec;
69+
70+/* New fields for the Grip widget */
71+typedef struct {
72+ XtCallbackList grip_action;
73+#ifndef OLDXAW
74+ XtPointer pad[4]; /* for future use and keep binary compatibility */
75+#endif
76+} GripPart;
77+
78+/* Full instance record */
79+typedef struct _GripRec {
80+ CorePart core;
81+ SimplePart simple;
82+ GripPart grip;
83+} GripRec;
84+
85+#endif /* _XawGripP_h */
@@ -0,0 +1,132 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawLabel_h
49+#define _XawLabel_h
50+
51+/*
52+ * Label Widget
53+ */
54+
55+#include <X11/Xaw/Simple.h>
56+
57+/* Resources:
58+
59+ Name Class RepType Default Value
60+ ---- ----- ------- -------------
61+ background Background Pixel XtDefaultBackground
62+ bitmap Pixmap Pixmap None
63+ border BorderColor Pixel XtDefaultForeground
64+ borderWidth BorderWidth Dimension 1
65+ cursor Cursor Cursor None
66+ cursorName Cursor String NULL
67+ destroyCallback Callback XtCallbackList NULL
68+ encoding Encoding UnsignedChar XawTextEncoding8bit
69+ font Font XFontStruct* XtDefaultFont
70+ foreground Foreground Pixel XtDefaultForeground
71+ height Height Dimension text height
72+ insensitiveBorder Insensitive Pixmap Gray
73+ internalHeight Height Dimension 2
74+ internalWidth Width Dimension 4
75+ justify Justify XtJustify XtJustifyCenter
76+ label Label String NULL
77+ leftBitmap LeftBitmap Pixmap None
78+ mappedWhenManaged MappedWhenManaged Boolean True
79+ pointerColor Foreground Pixel XtDefaultForeground
80+ pointerColorBackground Background Pixel XtDefaultBackground
81+ resize Resize Boolean True
82+ sensitive Sensitive Boolean True
83+ width Width Dimension text width
84+ x Position Position 0
85+ y Position Position 0
86+
87+*/
88+
89+#define XawTextEncoding8bit 0
90+#define XawTextEncodingChar2b 1
91+
92+#define XtNleftBitmap "leftBitmap"
93+#define XtCLeftBitmap "LeftBitmap"
94+#define XtNencoding "encoding"
95+#define XtCEncoding "Encoding"
96+
97+#ifndef XtNfontSet
98+#define XtNfontSet "fontSet"
99+#endif
100+
101+#ifndef XtCFontSet
102+#define XtCFontSet "FontSet"
103+#endif
104+
105+#ifndef _XtStringDefs_h_
106+#define XtNbitmap "bitmap"
107+#define XtNforeground "foreground"
108+#define XtNlabel "label"
109+#define XtNfont "font"
110+#define XtNinternalWidth "internalWidth"
111+#define XtNinternalHeight "internalHeight"
112+#define XtNresize "resize"
113+#define XtCResize "Resize"
114+#define XtCBitmap "Bitmap"
115+#endif
116+
117+#ifndef XtNlabelX
118+#define XtNlabelX "labelX"
119+#endif
120+
121+#ifndef XtNlabelY
122+#define XtNlabelY "labelY"
123+#endif
124+
125+/* Class record constants */
126+
127+extern WidgetClass labelWidgetClass;
128+
129+typedef struct _LabelClassRec *LabelWidgetClass;
130+typedef struct _LabelRec *LabelWidget;
131+
132+#endif /* _XawLabel_h */
@@ -0,0 +1,115 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _XawLabelP_h
49+#define _XawLabelP_h
50+
51+/*
52+ * Label Widget Private Data
53+ */
54+#include <X11/Xaw/Label.h>
55+#include <X11/Xaw/SimpleP.h>
56+
57+/* New fields for the Label widget class record */
58+typedef struct {
59+ XtPointer extension;
60+} LabelClassPart;
61+
62+/* Full class record declaration */
63+typedef struct _LabelClassRec {
64+ CoreClassPart core_class;
65+ SimpleClassPart simple_class;
66+ LabelClassPart label_class;
67+} LabelClassRec;
68+
69+extern LabelClassRec labelClassRec;
70+
71+/* New fields for the Label widget record */
72+typedef struct {
73+ /* resources */
74+ Pixel foreground;
75+ XFontStruct *font;
76+ XFontSet fontset;
77+ char *label;
78+ XtJustify justify;
79+ Dimension internal_width;
80+ Dimension internal_height;
81+ Pixmap pixmap;
82+ Boolean resize;
83+ unsigned char encoding;
84+ Pixmap left_bitmap;
85+
86+ /* private state */
87+ GC normal_GC;
88+ GC gray_GC;
89+ Pixmap stipple;
90+ Position label_x;
91+ Position label_y;
92+ Dimension label_width;
93+ Dimension label_height;
94+ Dimension label_len;
95+ int lbm_y; /* where in label */
96+ unsigned int lbm_width, lbm_height; /* size of pixmap */
97+#ifndef OLDXAW
98+ XtPointer pad[4]; /* for future use and keep binary compatibility */
99+#endif
100+} LabelPart;
101+
102+/*
103+ * Full instance record declaration
104+ */
105+typedef struct _LabelRec {
106+ CorePart core;
107+ SimplePart simple;
108+ LabelPart label;
109+} LabelRec;
110+
111+#define LEFT_OFFSET(lw) ((lw)->label.left_bitmap \
112+ ? (lw)->label.lbm_width + (lw)->label.internal_width \
113+ : 0)
114+
115+#endif /* _XawLabelP_h */
@@ -0,0 +1,234 @@
1+/*
2+Copyright 1989, 1994, 1998 The Open Group
3+
4+Permission to use, copy, modify, distribute, and sell this software and its
5+documentation for any purpose is hereby granted without fee, provided that
6+the above copyright notice appear in all copies and that both that
7+copyright notice and this permission notice appear in supporting
8+documentation.
9+
10+The above copyright notice and this permission notice shall be included in
11+all copies or substantial portions of the Software.
12+
13+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19+
20+Except as contained in this notice, the name of The Open Group shall not be
21+used in advertising or otherwise to promote the sale, use or other dealings
22+in this Software without prior written authorization from The Open Group.
23+*/
24+
25+/* This is the List widget, it is useful to display a list, without the
26+ * overhead of having a widget for each item in the list. It allows
27+ * the user to select an item in a list and notifies the application through
28+ * a callback function.
29+ *
30+ * Created: 8/13/88
31+ * By: Chris D. Peterson
32+ * MIT X Consortium
33+ */
34+
35+#ifndef _XawList_h
36+#define _XawList_h
37+
38+#include <X11/Xaw/Simple.h>
39+
40+/* Resources:
41+
42+ Name Class RepType Default Value
43+ ---- ----- ------- -------------
44+ background Background Pixel XtDefaultBackground
45+ borderColor BorderColor Pixel XtDefaultForeground
46+ borderWidth BorderWidth Dimension 1
47+ callback Callback XtCallbackList NULL **6
48+ columnSpacing Spacing Dimension 6
49+ cursor Cursor Cursor left_ptr
50+ cursorName Cursor String NULL
51+ defaultColumns Columns int 2 **5
52+ destroyCallback Callback Pointer NULL
53+ font Font XFontStruct* XtDefaultFont
54+ forceColumns Columns Boolean False **5
55+ foreground Foreground Pixel XtDefaultForeground
56+ height Height Dimension 0 **1
57+ insensitiveBorder Insensitive Pixmap Gray
58+ internalHeight Height Dimension 2
59+ internalWidth Width Dimension 4
60+ list List String* NULL **2
61+ longest Longest int 0 **3 **4
62+ mappedWhenManaged MappedWhenManaged Boolean True
63+ numberStrings NumberStrings int 0 **4
64+ pasteBuffer Boolean Boolean False
65+ pointerColor Foreground Pixel XtDefaultForeground
66+ pointerColorBackground Background Pixel XtDefaultBackground
67+ rowSpacing Spacing Dimension 4
68+ sensitive Sensitive Boolean True
69+ verticalList Boolean Boolean False
70+ width Width Dimension 0 **1
71+ x Position Position 0
72+ y Position Position 0
73+
74+ **1 - If the Width or Height of the list widget is zero (0) then the value
75+ is set to the minimum size necessary to fit the entire list.
76+
77+ If both Width and Height are zero then they are adjusted to fit the
78+ entire list that is created width the number of default columns
79+ specified in the defaultColumns resource.
80+
81+ **2 - This is an array of strings the specify elements of the list.
82+ This resource must be specified.
83+ (What good is a list widget without a list?? :-)
84+
85+ **3 - Longest is the length of the widest string in pixels.
86+
87+ **4 - If either of these values are zero (0) then the list widget calculates
88+ the correct value.
89+
90+ (This allows you to make startup faster if you already have
91+ this information calculated)
92+
93+ NOTE: If the numberStrings value is zero the list must
94+ be NULL terminated.
95+
96+ **5 - By setting the List.Columns resource you can force the application to
97+ have a given number of columns.
98+
99+ **6 - This returns the name and index of the item selected in an
100+ XawListReturnStruct that is pointed to by the client_data
101+ in the CallbackProc.
102+
103+*/
104+
105+/*
106+ * Value returned when there are no highlighted objects
107+ */
108+#define XAW_LIST_NONE -1
109+
110+#define XtCList "List"
111+#define XtCSpacing "Spacing"
112+#define XtCColumns "Columns"
113+#define XtCLongest "Longest"
114+#define XtCNumberStrings "NumberStrings"
115+
116+#define XtNcursor "cursor"
117+#define XtNcolumnSpacing "columnSpacing"
118+#define XtNdefaultColumns "defaultColumns"
119+#define XtNforceColumns "forceColumns"
120+#define XtNlist "list"
121+#define XtNlongest "longest"
122+#define XtNnumberStrings "numberStrings"
123+#define XtNpasteBuffer "pasteBuffer"
124+#define XtNrowSpacing "rowSpacing"
125+#define XtNverticalList "verticalList"
126+#define XtNshowCurrent "showCurrent"
127+
128+#ifndef XtNfontSet
129+#define XtNfontSet "fontSet"
130+#endif
131+
132+#ifndef XtCFontSet
133+#define XtCFontSet "FontSet"
134+#endif
135+
136+extern WidgetClass listWidgetClass;
137+
138+typedef struct _ListClassRec *ListWidgetClass;
139+typedef struct _ListRec *ListWidget;
140+
141+/* list return structure */
142+typedef struct _XawListReturnStruct {
143+ String string;
144+ int list_index;
145+} XawListReturnStruct;
146+
147+_XFUNCPROTOBEGIN
148+
149+/*
150+ * Function:
151+ * XawListChange
152+ *
153+ * Parameters:
154+ * w - list widget
155+ * list - new list
156+ * nitems - number of items in the list
157+ * longest - length (in Pixels) of the longest element in the list
158+ * resize - if True the the list widget will try to resize itself
159+ *
160+ * Description:
161+ * Changes the list being used and shown.
162+ *
163+ * Note:
164+ * If nitems of longest are <= 0 then they will be calculated
165+ * If nitems is <= 0 then the list needs to be NULL terminated
166+ */
167+void XawListChange
168+(
169+ Widget w,
170+ String *list,
171+ int nitems,
172+ int longest,
173+#if NeedWidePrototypes
174+ int resize
175+#else
176+ Boolean resize
177+#endif
178+ );
179+
180+/*
181+ * Function:
182+ * XawListUnhighlight
183+ *
184+ * Parameters:
185+ * w - list widget
186+ *
187+ * Description:
188+ * Unlights the current highlighted element.
189+ */
190+void XawListUnhighlight
191+(
192+ Widget w
193+ );
194+
195+/*
196+ * Function:
197+ * XawListHighlight
198+ *
199+ * Parameters:
200+ * w - list widget
201+ * item - item to highlight
202+ *
203+ * Description:
204+ * Highlights the given item.
205+ */
206+void XawListHighlight
207+(
208+ Widget w,
209+ int item
210+ );
211+
212+
213+/*
214+ * Function:
215+ * XawListShowCurrent
216+ *
217+ * Paraneters:
218+ * w - list widget
219+ *
220+ * Description:
221+ * Returns the currently highlighted object.
222+ *
223+ * Returns:
224+ * The info about the currently highlighted object
225+ */
226+
227+XawListReturnStruct *XawListShowCurrent
228+(
229+ Widget w
230+ );
231+
232+_XFUNCPROTOEND
233+
234+#endif /* _XawList_h */
@@ -0,0 +1,115 @@
1+/*
2+Copyright 1989, 1994, 1998 The Open Group
3+
4+Permission to use, copy, modify, distribute, and sell this software and its
5+documentation for any purpose is hereby granted without fee, provided that
6+the above copyright notice appear in all copies and that both that
7+copyright notice and this permission notice appear in supporting
8+documentation.
9+
10+The above copyright notice and this permission notice shall be included in
11+all copies or substantial portions of the Software.
12+
13+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19+
20+Except as contained in this notice, the name of The Open Group shall not be
21+used in advertising or otherwise to promote the sale, use or other dealings
22+in this Software without prior written authorization from The Open Group.
23+*/
24+
25+
26+/*
27+ * This is a List widget. It allows the user to select an item in a list and
28+ * notifies the application through a callback function.
29+ *
30+ * Created: 8/13/88
31+ * By: Chris D. Peterson
32+ * MIT - Project Athena
33+ */
34+
35+#ifndef _XawListP_h
36+#define _XawListP_h
37+
38+/*
39+ * List Widget Private Data
40+ */
41+#include <X11/Xaw/SimpleP.h>
42+#include <X11/Xaw/List.h>
43+
44+#define NO_HIGHLIGHT XAW_LIST_NONE
45+#define OUT_OF_RANGE -1
46+#define OKAY 0
47+
48+/* New fields for the List widget class */
49+typedef struct {
50+ XtPointer extension;
51+} ListClassPart;
52+
53+/* Full class record */
54+typedef struct _ListClassRec {
55+ CoreClassPart core_class;
56+ SimpleClassPart simple_class;
57+ ListClassPart list_class;
58+} ListClassRec;
59+
60+extern ListClassRec listClassRec;
61+
62+/* New fields for the List widget */
63+typedef struct {
64+ /* resources */
65+ Pixel foreground;
66+ Dimension internal_width; /* if not 3d, user sets directly */
67+ Dimension internal_height;
68+ Dimension column_space; /* half of *_space is add on
69+ top/bot/left of */
70+ Dimension row_space; /* each item's text bounding box
71+ half added to longest for right */
72+ int default_cols;
73+ Boolean force_cols;
74+ Boolean paste;
75+ Boolean vertical_cols;
76+ int longest; /* in pixels */
77+ int nitems;
78+ XFontStruct *font;
79+ XFontSet fontset; /* Sheeran, Omron KK, 93/03/05 */
80+ String *list; /* for i18n, always in multibyte
81+ format */
82+ XtCallbackList callback;
83+
84+ /* private */
85+ int is_highlighted; /* set to the item currently
86+ highlighted */
87+ int highlight; /* set to the item that should be
88+ highlighted */
89+ int col_width; /* width of each column */
90+ int row_height; /* height of each row */
91+ int nrows; /* number of rows in the list */
92+ int ncols; /* number of columns in the list */
93+ GC normgc;
94+ GC revgc;
95+ GC graygc;
96+ int freedoms; /* flags for resizing height
97+ and width */
98+#ifndef OLDXAW
99+ int selected;
100+ Boolean show_current;
101+ char pad1[(sizeof(XtPointer) - sizeof(Boolean)) +
102+ (sizeof(XtPointer) - sizeof(int))];
103+ XtPointer pad2[2]; /* for future use and keep binary compatibility */
104+#endif
105+} ListPart;
106+
107+
108+/* Full instance record */
109+typedef struct _ListRec {
110+ CorePart core;
111+ SimplePart simple;
112+ ListPart list;
113+} ListRec;
114+
115+#endif /* _XawListP_h */
@@ -0,0 +1,79 @@
1+/*
2+ *
3+Copyright 1989,1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ */
25+
26+/*
27+ * MenuButtonP.h - Private Header file for MenuButton widget.
28+ *
29+ * This is the private header file for the Athena MenuButton widget.
30+ * It is intended to provide an easy method of activating pulldown menus.
31+ *
32+ * Date: May 2, 1989
33+ *
34+ * By: Chris D. Peterson
35+ * MIT X Consortium
36+ * kit@expo.lcs.mit.edu
37+ */
38+
39+#ifndef _XawMenuButtonP_h
40+#define _XawMenuButtonP_h
41+
42+#include <X11/Xaw/MenuButton.h>
43+#include <X11/Xaw/CommandP.h>
44+
45+/* New fields for the MenuButton widget class */
46+typedef struct _MenuButtonClass {
47+ XtPointer extension;
48+} MenuButtonClassPart;
49+
50+/* class record declaration */
51+typedef struct _MenuButtonClassRec {
52+ CoreClassPart core_class;
53+ SimpleClassPart simple_class;
54+ LabelClassPart label_class;
55+ CommandClassPart command_class;
56+ MenuButtonClassPart menuButton_class;
57+} MenuButtonClassRec;
58+
59+extern MenuButtonClassRec menuButtonClassRec;
60+
61+/* New fields for the MenuButton widget */
62+typedef struct {
63+ /* resources */
64+ char * menu_name;
65+#ifndef OLDXAW
66+ XtPointer pad[4]; /* for future use and keep binary compatibility */
67+#endif
68+} MenuButtonPart;
69+
70+/* widget declaration */
71+typedef struct _MenuButtonRec {
72+ CorePart core;
73+ SimplePart simple;
74+ LabelPart label;
75+ CommandPart command;
76+ MenuButtonPart menu_button;
77+} MenuButtonRec;
78+
79+#endif /* _XawMenuButtonP_h */
@@ -0,0 +1,89 @@
1+/*
2+ *
3+Copyright 1989, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ */
25+
26+/***********************************************************************
27+ *
28+ * MenuButton Widget
29+ *
30+ ***********************************************************************/
31+
32+/*
33+ * MenuButton.h - Public Header file for MenuButton widget.
34+ *
35+ * This is the public header file for the Athena MenuButton widget.
36+ * It is intended to provide an easy method of activating pulldown menus.
37+ *
38+ * Date: May 2, 1989
39+ *
40+ * By: Chris D. Peterson
41+ * MIT X Consortium
42+ * kit@expo.lcs.mit.edu
43+ */
44+
45+#ifndef _XawMenuButton_h
46+#define _XawMenuButton_h
47+
48+#include <X11/Xaw/Command.h>
49+
50+/* Resources:
51+
52+ Name Class RepType Default Value
53+ ---- ----- ------- -------------
54+ background Background Pixel XtDefaultBackground
55+ bitmap Pixmap Pixmap None
56+ border BorderColor Pixel XtDefaultForeground
57+ borderWidth BorderWidth Dimension 1
58+ callback Callback Pointer NULL
59+ cursor Cursor Cursor None
60+ destroyCallback Callback Pointer NULL
61+ displayList DisplayList XawDisplayList* NULL
62+ font Font XFontStruct* XtDefaultFont
63+ foreground Foreground Pixel XtDefaultForeground
64+ height Height Dimension text height
65+ highlightThickness Thickness Dimension 2
66+ insensitiveBorder Insensitive Pixmap Gray
67+ internalHeight Height Dimension 2
68+ internalWidth Width Dimension 4
69+ justify Justify XtJustify XtJustifyCenter
70+ label Label String NULL
71+ mappedWhenManaged MappedWhenManaged Boolean True
72+ menuName MenuName String "menu"
73+ resize Resize Boolean True
74+ sensitive Sensitive Boolean True
75+ width Width Dimension text width
76+ x Position Position 0
77+ y Position Position 0
78+
79+*/
80+
81+#define XtNmenuName "menuName"
82+#define XtCMenuName "MenuName"
83+
84+extern WidgetClass menuButtonWidgetClass;
85+
86+typedef struct _MenuButtonClassRec *MenuButtonWidgetClass;
87+typedef struct _MenuButtonRec *MenuButtonWidget;
88+
89+#endif /* _XawMenuButton_h */
@@ -0,0 +1,110 @@
1+/*
2+ * Copyright 1991 by OMRON Corporation
3+ *
4+ * Permission to use, copy, modify, distribute, and sell this software and its
5+ * documentation for any purpose is hereby granted without fee, provided that
6+ * the above copyright notice appear in all copies and that both that
7+ * copyright notice and this permission notice appear in supporting
8+ * documentation, and that the name OMRON is not be used in
9+ * advertising or publicity pertaining to distribution of the software without
10+ * specific, written prior permission. OMRON makes no representations
11+ * about the suitability of this software for any purpose. It is provided
12+ * "as is" without express or implied warranty.
13+ *
14+ * OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16+ * EVENT SHALL OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19+ * TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20+ * PERFORMANCE OF THIS SOFTWARE.
21+ *
22+ * Author: Li Yuhong OMRON Corporation
23+ */
24+
25+/***********************************************************
26+
27+Copyright 1987, 1988, 1994, 1998 The Open Group
28+
29+Permission to use, copy, modify, distribute, and sell this software and its
30+documentation for any purpose is hereby granted without fee, provided that
31+the above copyright notice appear in all copies and that both that
32+copyright notice and this permission notice appear in supporting
33+documentation.
34+
35+The above copyright notice and this permission notice shall be included in
36+all copies or substantial portions of the Software.
37+
38+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
42+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
43+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44+
45+Except as contained in this notice, the name of The Open Group shall not be
46+used in advertising or otherwise to promote the sale, use or other dealings
47+in this Software without prior written authorization from The Open Group.
48+
49+
50+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
51+
52+ All Rights Reserved
53+
54+Permission to use, copy, modify, and distribute this software and its
55+documentation for any purpose and without fee is hereby granted,
56+provided that the above copyright notice appear in all copies and that
57+both that copyright notice and this permission notice appear in
58+supporting documentation, and that the name of Digital not be
59+used in advertising or publicity pertaining to distribution of the
60+software without specific, written prior permission.
61+
62+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
63+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
64+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
65+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
66+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
67+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
68+SOFTWARE.
69+
70+******************************************************************/
71+
72+#ifndef _XawMultiSink_h
73+#define _XawMultiSink_h
74+
75+/*
76+ * MultiSink Object
77+ */
78+
79+#include <X11/Xaw/TextSink.h>
80+
81+/* Resources:
82+
83+ Name Class RepType Default Value
84+ ---- ----- ------- -------------
85+ echo Output Boolean True
86+ displayNonprinting Output Boolean True
87+ fontSet FontSet XFontSet XtDefaultFontSet
88+
89+*/
90+
91+#define XtCOutput "Output"
92+
93+#define XtNdisplayNonprinting "displayNonprinting"
94+#define XtNecho "echo"
95+
96+#ifndef XtNfontSet /*Sheeran, Omron KK, 93/03/04*/
97+#define XtNfontSet "fontSet"
98+#endif
99+
100+#ifndef XtCFontSet /*Sheeran, Omron KK, 93/03/04*/
101+#define XtCFontSet "FontSet"
102+#endif
103+
104+/* Class record constants */
105+extern WidgetClass multiSinkObjectClass;
106+
107+typedef struct _MultiSinkClassRec *MultiSinkObjectClass;
108+typedef struct _MultiSinkRec *MultiSinkObject;
109+
110+#endif /* _XawMultiSink_h */
@@ -0,0 +1,138 @@
1+/*
2+ * Copyright 1991 by OMRON Corporation
3+ *
4+ * Permission to use, copy, modify, distribute, and sell this software and its
5+ * documentation for any purpose is hereby granted without fee, provided that
6+ * the above copyright notice appear in all copies and that both that
7+ * copyright notice and this permission notice appear in supporting
8+ * documentation, and that the name OMRON not be used in
9+ * advertising or publicity pertaining to distribution of the software without
10+ * specific, written prior permission. OMRON make no representations
11+ * about the suitability of this software for any purpose. It is provided
12+ * "as is" without express or implied warranty.
13+ *
14+ * OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16+ * EVENT SHALL OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19+ * TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20+ * PERFORMANCE OF THIS SOFTWARE.
21+ *
22+ * Author: Li Yuhong OMRON Corporation
23+ */
24+
25+
26+/***********************************************************
27+
28+Copyright 1987, 1988, 1994, 1998 The Open Group
29+
30+Permission to use, copy, modify, distribute, and sell this software and its
31+documentation for any purpose is hereby granted without fee, provided that
32+the above copyright notice appear in all copies and that both that
33+copyright notice and this permission notice appear in supporting
34+documentation.
35+
36+The above copyright notice and this permission notice shall be included in
37+all copies or substantial portions of the Software.
38+
39+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
43+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
44+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45+
46+Except as contained in this notice, the name of The Open Group shall not be
47+used in advertising or otherwise to promote the sale, use or other dealings
48+in this Software without prior written authorization from The Open Group.
49+
50+
51+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
52+
53+ All Rights Reserved
54+
55+Permission to use, copy, modify, and distribute this software and its
56+documentation for any purpose and without fee is hereby granted,
57+provided that the above copyright notice appear in all copies and that
58+both that copyright notice and this permission notice appear in
59+supporting documentation, and that the name of Digital not be
60+used in advertising or publicity pertaining to distribution of the
61+software without specific, written prior permission.
62+
63+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
64+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
65+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
66+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
67+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
68+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
69+SOFTWARE.
70+
71+******************************************************************/
72+
73+#ifndef _XawMultiSinkP_h
74+#define _XawMultiSinkP_h
75+
76+#include <X11/Xfuncproto.h>
77+
78+/*
79+ * MultiSink Object Private Data
80+ */
81+#include <X11/Xaw/TextSinkP.h>
82+#include <X11/Xaw/MultiSink.h>
83+
84+/* new fields for the MultiSink object class */
85+typedef struct _MultiSinkClassPart {
86+ XtPointer extension;
87+} MultiSinkClassPart;
88+
89+/* Full class record declaration */
90+typedef struct _MultiSinkClassRec {
91+ ObjectClassPart object_class;
92+ TextSinkClassPart text_sink_class;
93+ MultiSinkClassPart multi_sink_class;
94+} MultiSinkClassRec;
95+
96+extern MultiSinkClassRec multiSinkClassRec;
97+
98+/* New fields for the MultiSink object record */
99+typedef struct {
100+ /* resources */
101+ Boolean echo;
102+ Boolean display_nonprinting;
103+
104+ /* private */
105+ GC normgc, invgc, xorgc;
106+ XawTextPosition cursor_position;
107+ XawTextInsertState laststate;
108+ short cursor_x, cursor_y; /* Cursor Location */
109+ XFontSet fontset; /* font set to draw */
110+#ifndef OLDXAW
111+ XtPointer pad[4]; /* for future use and keep binary compatibility */
112+#endif
113+} MultiSinkPart;
114+
115+/* Full instance record declaration */
116+typedef struct _MultiSinkRec {
117+ ObjectPart object;
118+ TextSinkPart text_sink;
119+ MultiSinkPart multi_sink;
120+} MultiSinkRec;
121+
122+/*
123+ * Semi-private functions
124+ * for use by other Xaw modules only
125+ */
126+_XFUNCPROTOBEGIN
127+
128+void _XawMultiSinkPosToXY
129+(
130+ Widget w,
131+ XawTextPosition pos,
132+ Position *x,
133+ Position *y
134+);
135+
136+_XFUNCPROTOEND
137+
138+#endif /* _XawMultiSinkP_h */
@@ -0,0 +1,130 @@
1+/*
2+ * Copyright 1991 by OMRON Corporation
3+ *
4+ * Permission to use, copy, modify, distribute, and sell this software and its
5+ * documentation for any purpose is hereby granted without fee, provided that
6+ * the above copyright notice appear in all copies and that both that
7+ * copyright notice and this permission notice appear in supporting
8+ * documentation, and that the name OMRON not be used in
9+ * advertising or publicity pertaining to distribution of the software without
10+ * specific, written prior permission. OMRON makes no representations
11+ * about the suitability of this software for any purpose. It is provided
12+ * "as is" without express or implied warranty.
13+ *
14+ * OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16+ * EVENT SHALL OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19+ * TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20+ * PERFORMANCE OF THIS SOFTWARE.
21+ *
22+ * Author: Li Yuhong OMRON Corporation
23+ */
24+
25+/*
26+
27+Copyright 1989, 1991, 1994, 1998 The Open Group
28+
29+Permission to use, copy, modify, distribute, and sell this software and its
30+documentation for any purpose is hereby granted without fee, provided that
31+the above copyright notice appear in all copies and that both that
32+copyright notice and this permission notice appear in supporting
33+documentation.
34+
35+The above copyright notice and this permission notice shall be included in
36+all copies or substantial portions of the Software.
37+
38+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
42+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
43+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44+
45+Except as contained in this notice, the name of The Open Group shall not be
46+used in advertising or otherwise to promote the sale, use or other dealings
47+in this Software without prior written authorization from The Open Group.
48+
49+*/
50+
51+/*
52+ * This file was modified from AsciiSrc.h.
53+ *
54+ * By Li Yuhong, Sept. 18, 1990
55+ */
56+
57+#ifndef _XawMultiSrc_h
58+#define _XawMultiSrc_h
59+
60+#include <X11/Xaw/TextSrc.h>
61+
62+/* Resources:
63+
64+ Name Class RepType Default Value
65+ ---- ----- ------- -------------
66+ dataCompression DataCompression Boolean True
67+ length Length int (internal)
68+ pieceSize PieceSize int BUFSIZ
69+ string String String NULL
70+ type Type XawAsciiType XawAsciiString
71+ useStringInPlace UseStringInPlace Boolean False
72+
73+*/
74+
75+extern WidgetClass multiSrcObjectClass;
76+
77+typedef struct _MultiSrcClassRec *MultiSrcObjectClass;
78+typedef struct _MultiSrcRec *MultiSrcObject;
79+
80+#define MultiSourceObjectClass MultiSrcObjectClass
81+#define MultiSourceObject MultiSrcObject
82+
83+#define XtCDataCompression "DataCompression"
84+#define XtCPieceSize "PieceSize"
85+#define XtCType "Type"
86+#define XtCUseStringInPlace "UseStringInPlace"
87+
88+#define XtNdataCompression "dataCompression"
89+#define XtNpieceSize "pieceSize"
90+#define XtNtype "type"
91+#define XtNuseStringInPlace "useStringInPlace"
92+
93+#define XtRMultiType "MultiType"
94+
95+#define XtEstring "string"
96+#define XtEfile "file"
97+
98+/************************************************************
99+ *
100+ * THESE ROUTINES ARE NOT PUBLIC: Source should call
101+ *
102+ * the AsciiSrc API which currently forwards requests here.
103+ *
104+ * future versions (like there's going to be an R7 Xaw!) may
105+ *
106+ * eliminate this file or at least these functions entirely.
107+ *
108+ ************************************************************/
109+
110+_XFUNCPROTOBEGIN
111+
112+void XawMultiSourceFreeString
113+(
114+ Widget w
115+ );
116+
117+Bool _XawMultiSave
118+(
119+ Widget w
120+);
121+
122+Bool _XawMultiSaveAsFile
123+(
124+ Widget w,
125+ _Xconst char *name
126+ );
127+
128+_XFUNCPROTOEND
129+
130+#endif /* _XawMultiSrc_h */
@@ -0,0 +1,179 @@
1+/*
2+ * Copyright 1991 by OMRON Corporation
3+ *
4+ * Permission to use, copy, modify, distribute, and sell this software and its
5+ * documentation for any purpose is hereby granted without fee, provided that
6+ * the above copyright notice appear in all copies and that both that
7+ * copyright notice and this permission notice appear in supporting
8+ * documentation, and that the name OMRON not be used in
9+ * advertising or publicity pertaining to distribution of the software without
10+ * specific, written prior permission. OMRON make no representations
11+ * about the suitability of this software for any purpose. It is provided
12+ * "as is" without express or implied warranty.
13+ *
14+ * OMRON DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16+ * EVENT SHALL OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19+ * TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20+ * PERFORMANCE OF THIS SOFTWARE.
21+ *
22+ * Author: Li Yuhong OMRON Corporation
23+ */
24+
25+
26+/***********************************************************
27+
28+Copyright 1987, 1988, 1991, 1994, 1998 The Open Group
29+
30+Permission to use, copy, modify, distribute, and sell this software and its
31+documentation for any purpose is hereby granted without fee, provided that
32+the above copyright notice appear in all copies and that both that
33+copyright notice and this permission notice appear in supporting
34+documentation.
35+
36+The above copyright notice and this permission notice shall be included in
37+all copies or substantial portions of the Software.
38+
39+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
43+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
44+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45+
46+Except as contained in this notice, the name of The Open Group shall not be
47+used in advertising or otherwise to promote the sale, use or other dealings
48+in this Software without prior written authorization from The Open Group.
49+
50+
51+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
52+
53+ All Rights Reserved
54+
55+Permission to use, copy, modify, and distribute this software and its
56+documentation for any purpose and without fee is hereby granted,
57+provided that the above copyright notice appear in all copies and that
58+both that copyright notice and this permission notice appear in
59+supporting documentation, and that the name of Digital not be
60+used in advertising or publicity pertaining to distribution of the
61+software without specific, written prior permission.
62+
63+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
64+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
65+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
66+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
67+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
68+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
69+SOFTWARE.
70+
71+******************************************************************/
72+
73+/*
74+ * MultiSrcP.h - Private Header for Multi Text Source.
75+ *
76+ * This is the private header file for the Multi Text Source.
77+ * It is intended to be used with the Text widget, the simplest way to use
78+ * this text source is to use the MultiText Object.
79+ *
80+ * Date: June 29, 1989
81+ *
82+ * By: Chris D. Peterson
83+ * MIT X Consortium
84+ * kit@expo.lcs.mit.edu
85+ */
86+
87+/*
88+ * This file was changed from AsciiSrcP.h.
89+ *
90+ * By Li Yuhong, Sept. 18, 1990
91+ */
92+
93+#ifndef _XawMultiSrcP_h
94+#define _XawMultiSrcP_h
95+
96+#include <X11/Xfuncproto.h>
97+#include <X11/Xaw/TextSrcP.h>
98+#include <X11/Xaw/MultiSrc.h>
99+
100+#ifdef L_tmpnam
101+#define TMPSIZ L_tmpnam
102+#else
103+#ifdef PATH_MAX
104+#define TMPSIZ PATH_MAX
105+#else
106+#define TMPSIZ 1024 /* bytes to allocate for tmpnam */
107+#endif
108+#endif
109+
110+typedef struct _MultiPiece { /* Piece of the text file of BUFSIZ allocated
111+ characters */
112+ wchar_t* text; /* The text in this buffer */
113+ XawTextPosition used; /* The number of characters of this buffer
114+ that have been used */
115+ struct _MultiPiece *prev, *next; /* linked list pointers */
116+} MultiPiece;
117+
118+/* New fields for the MultiSrc object class */
119+typedef struct _MultiSrcClassPart {
120+ XtPointer extension;
121+} MultiSrcClassPart;
122+
123+/* Full class record */
124+typedef struct _MultiSrcClassRec {
125+ ObjectClassPart object_class;
126+ TextSrcClassPart text_src_class;
127+ MultiSrcClassPart multi_src_class;
128+} MultiSrcClassRec;
129+
130+extern MultiSrcClassRec multiSrcClassRec;
131+
132+/* New fields for the MultiSrc object */
133+typedef struct _MultiSrcPart {
134+ /* resources */
135+ XIC ic; /* for X Input Method */
136+ XtPointer string; /* either the string, or the file name, depend-
137+ ing upon the `type'. ALWAYS IN MB FORMAT */
138+ XawAsciiType type; /* either string or disk */
139+ XawTextPosition piece_size; /* Size of text buffer for each piece */
140+ Boolean data_compression; /* compress to minimum memory automatically
141+ on save? */
142+#ifdef OLDXAW
143+ XtCallbackList callback;
144+#endif
145+ Boolean use_string_in_place;/* Use the string passed in place */
146+ int multi_length; /* length field for multi string emulation */
147+
148+ /* private */
149+
150+ Boolean is_tempfile; /* Is this a temporary file? */
151+#ifdef OLDXAW
152+ Boolean changes;
153+#endif
154+ Boolean allocated_string; /* Have I allocated the
155+ string in multi_src->string? */
156+ XawTextPosition length; /* length of file - IN CHARACTERS, NOT BYTES */
157+ MultiPiece *first_piece; /* first piece of the text */
158+#ifndef OLDXAW
159+ XtPointer pad[4]; /* for future use and keep binary compatibility */
160+#endif
161+} MultiSrcPart;
162+
163+/* Full instance record */
164+typedef struct _MultiSrcRec {
165+ ObjectPart object;
166+ TextSrcPart text_src;
167+ MultiSrcPart multi_src;
168+} MultiSrcRec;
169+
170+_XFUNCPROTOBEGIN
171+
172+void _XawMultiSourceFreeString
173+(
174+ Widget w
175+ );
176+
177+_XFUNCPROTOEND
178+
179+#endif /* _XawMultiSrcP_h */
@@ -0,0 +1,258 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * Paned.h - Paned Composite Widget's public header file.
50+ *
51+ * Updated and significantly modifided from the Athena VPaned Widget.
52+ *
53+ * Date: March 1, 1989
54+ *
55+ * By: Chris D. Peterson
56+ * MIT X Consortium
57+ * kit@expo.lcs.mit.edu
58+ */
59+
60+#ifndef _XawPaned_h
61+#define _XawPaned_h
62+
63+#include <X11/Intrinsic.h>
64+#include <X11/Xmu/Converters.h>
65+
66+/* RESOURCES:
67+
68+ Name Class RepType Default Value
69+ ---- ----- ------- -------------
70+ background Background Pixel XtDefaultBackground
71+ betweenCursor Cursor Cursor **
72+ border BorderColor Pixel XtDefaultForeground
73+ borderWidth BorderWidth Dimension 1
74+ cursor Cursor Cursor None
75+ destroyCallback Callback Pointer NULL
76+ height Height Dimension 0
77+ gripIndent GripIndent Position 16
78+ gripCursor Cursor Cursor **
79+ horizontalGripCursol Cursor Cursor sb_h_double_arrow
80+ horizontalBetweencursor Cursor Cursor sb_up_arrow
81+ internalBorderColor BorderColor Pixel XtDefaultForeground
82+ internalBorderWidth BorderWidth Position 1
83+ leftCursor Cursor Cursor sb_left_arrow
84+ lowerCursor Cursor Cursor sb_down_arrow
85+ mappedWhenManaged MappedWhenManaged Boolean True
86+ orientation Orientation XtOrientation XtorientVertical
87+ refigureMode Boolean Boolean On
88+ rightCursor Cursor Cursor sb_right_arrow
89+ sensitive Sensitive Boolean True
90+ upperCursor Cursor Cursor sb_up_arrow
91+ verticalBetweenCursor Cursor Cursor sb_left_arrow
92+ verticalGripCursor Cursor Cursor sb_v_double_arrow
93+ width Width Dimension 0
94+ x Position Position 0
95+ y Position Position 0
96+
97+** These resources now are set to the vertical or horizontal cursor
98+ depending upon orientation, by default. If a value is specified here
99+ then that cursor will be used regardless of orientation.
100+
101+
102+CONSTRAINT RESOURCES:
103+
104+ Name Class RepType Default Value
105+ ---- ----- ------- -------------
106+ allowResize Boolean Boolean False
107+ max Max Dimension unlimited
108+ min Min Dimension Grip Size
109+ preferredPaneSize PreferredPaneSize Dimension PANED_ASK_CHILD
110+ resizeToPreferred Boolean Boolean False
111+ showGrip ShowGrip Boolean True
112+ skipAdjust Boolean Boolean False
113+
114+*/
115+
116+#define PANED_ASK_CHILD 0
117+#define PANED_GRIP_SIZE 0
118+
119+#define XtNallowResize "allowResize"
120+#define XtNbetweenCursor "betweenCursor"
121+#define XtNverticalBetweenCursor "verticalBetweenCursor"
122+#define XtNhorizontalBetweenCursor "horizontalBetweenCursor"
123+#define XtNgripCursor "gripCursor"
124+#define XtNgripIndent "gripIndent"
125+#define XtNhorizontalGripCursor "horizontalGripCursor"
126+#define XtNinternalBorderColor "internalBorderColor"
127+#define XtNinternalBorderWidth "internalBorderWidth"
128+#define XtNleftCursor "leftCursor"
129+#define XtNlowerCursor "lowerCursor"
130+#define XtNrefigureMode "refigureMode"
131+#define XtNposition "position"
132+#define XtNmin "min"
133+#define XtNmax "max"
134+#define XtNpreferredPaneSize "preferredPaneSize"
135+#define XtNresizeToPreferred "resizeToPreferred"
136+#define XtNrightCursor "rightCursor"
137+#define XtNshowGrip "showGrip"
138+#define XtNskipAdjust "skipAdjust"
139+#define XtNupperCursor "upperCursor"
140+#define XtNverticalGripCursor "verticalGripCursor"
141+
142+#define XtCGripIndent "GripIndent"
143+#define XtCMin "Min"
144+#define XtCMax "Max"
145+#define XtCPreferredPaneSize "PreferredPaneSize"
146+#define XtCShowGrip "ShowGrip"
147+
148+/* Class record constant */
149+extern WidgetClass panedWidgetClass;
150+
151+typedef struct _PanedClassRec *PanedWidgetClass;
152+typedef struct _PanedRec *PanedWidget;
153+
154+/*
155+ * Public Procedures
156+ */
157+
158+_XFUNCPROTOBEGIN
159+
160+/*
161+ * Function:
162+ * XawPanedSetMinMax
163+ *
164+ * Parameters:
165+ * widget - widget that is a child of the Paned widget
166+ * min - new min and max size for the pane
167+ * max - ""
168+ *
169+ * Description:
170+ * Sets the min and max size for a pane.
171+ */
172+void XawPanedSetMinMax
173+(
174+ Widget w,
175+ int min,
176+ int max
177+ );
178+
179+/*
180+ * Function:
181+ * XawPanedGetMinMax
182+ *
183+ * Parameters:
184+ * widget - widget that is a child of the Paned widget
185+ * min - return the current min and max size for the pane
186+ * max - ""
187+ *
188+ * Description:
189+ * Gets the min and max size for a pane.
190+ */
191+void XawPanedGetMinMax
192+(
193+ Widget w,
194+ int *min_return,
195+ int *max_return
196+ );
197+
198+/*
199+ * Function:
200+ * XawPanedSetRefigureMode
201+ *
202+ * Parameters:
203+ * w - paned widget
204+ * mode - if False then inhibit refigure
205+ *
206+ * Description:
207+ * Allows a flag to be set the will inhibit the paned widgets
208+ * relayout routine.
209+ */
210+void XawPanedSetRefigureMode
211+(
212+ Widget w,
213+#if NeedWidePrototypes
214+ int mode
215+#else
216+ Boolean mode
217+#endif
218+ );
219+
220+/*
221+ * Function:
222+ * XawPanedGetNumSub
223+ *
224+ * Parameters:
225+ * w - paned widget
226+ *
227+ * Returns:
228+ * Number of panes in the paned widget.
229+ */
230+int XawPanedGetNumSub
231+(
232+ Widget w
233+ );
234+
235+/*
236+ * Function:
237+ * XawPanedAllowResize
238+ *
239+ * Parameters:
240+ * widget - child of the paned widget
241+ *
242+ * Description:
243+ * Allows a flag to be set that determines if the paned widget will
244+ * allow geometry requests from this child
245+ */
246+void XawPanedAllowResize
247+(
248+ Widget w,
249+#if NeedWidePrototypes
250+ int allow_resize
251+#else
252+ Boolean allow_resize
253+#endif
254+ );
255+
256+_XFUNCPROTOEND
257+
258+#endif /* _XawPaned_h */
@@ -0,0 +1,176 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+/*
49+ * Updated and significantly modified from the Athena VPaned Widget.
50+ *
51+ * Date: March 1, 1989
52+ *
53+ * By: Chris D. Peterson
54+ * MIT X Consortium
55+ * kit@expo.lcs.mit.edu
56+ */
57+
58+#ifndef _XawPanedP_h
59+#define _XawPanedP_h
60+
61+#include <X11/Xaw/Paned.h>
62+
63+/* New fields for the Paned widget class record */
64+typedef struct _PanedClassPart {
65+ XtPointer extension;
66+} PanedClassPart;
67+
68+/* Full Class record declaration */
69+typedef struct _PanedClassRec {
70+ CoreClassPart core_class;
71+ CompositeClassPart composite_class;
72+ ConstraintClassPart constraint_class;
73+ PanedClassPart paned_class;
74+} PanedClassRec;
75+
76+extern PanedClassRec panedClassRec;
77+
78+/* Paned constraint record */
79+typedef struct _PanedConstraintsPart {
80+ /* Resources */
81+ Dimension min; /* Minimum height */
82+ Dimension max; /* Maximum height */
83+ Boolean allow_resize; /* True if child resize requests are ok */
84+ Boolean show_grip; /* True if child will have grip below it,
85+ when it is not the bottom pane */
86+ Boolean skip_adjust; /* True if child's height should not be
87+ changed without explicit user action */
88+ int position; /* position location in Paned (relative to
89+ other children) ** NIY ** */
90+ Dimension preferred_size; /* The Preferred size of the pane.
91+ If this is zero then ask child for size*/
92+ Boolean resize_to_pref; /* resize this pane to its preferred size
93+ on a resize or change managed after
94+ realize */
95+
96+ /* Private state */
97+ Position delta; /* Desired Location */
98+ Position olddelta; /* The last value of dy */
99+ Boolean paned_adjusted_me; /* Has the vpaned adjusted this widget w/o
100+ user interaction to make things fit? */
101+ Dimension wp_size; /* widget's preferred size */
102+ int size; /* the size the widget will actually get */
103+ Widget grip; /* The grip for this child */
104+} PanedConstraintsPart, *Pane;
105+
106+typedef struct _PanedConstraintsRec {
107+ PanedConstraintsPart paned;
108+} PanedConstraintsRec, *PanedConstraints;
109+
110+/*
111+ * The Pane Stack Structure
112+ */
113+typedef struct _PaneStack {
114+ struct _PaneStack *next; /* The next element on the stack */
115+ Pane pane; /* The pane in this element on the stack */
116+ int start_size; /* The size of this element when it
117+ was pushed onto the stack */
118+} PaneStack;
119+
120+/* New Fields for the Paned widget record */
121+typedef struct {
122+ /* resources */
123+ Position grip_indent; /* Location of grips (offset
124+ from right margin) */
125+ Boolean refiguremode; /* Whether to refigure changes
126+ right now */
127+ XtTranslations grip_translations; /* grip translation table */
128+ Pixel internal_bp; /* color of internal borders */
129+ Dimension internal_bw; /* internal border width */
130+ XtOrientation orientation; /* Orientation of paned widget */
131+
132+ Cursor cursor; /* Cursor for paned window */
133+ Cursor grip_cursor; /* inactive grip cursor */
134+ Cursor v_grip_cursor; /* inactive vert grip cursor */
135+ Cursor h_grip_cursor; /* inactive horiz grip cursor */
136+ Cursor adjust_this_cursor; /* active grip cursor: T */
137+ Cursor v_adjust_this_cursor; /* active vert grip cursor: T */
138+ Cursor h_adjust_this_cursor; /* active horiz grip cursor: T */
139+
140+ /* vertical */
141+ Cursor adjust_upper_cursor; /* active grip cursor: U */
142+ Cursor adjust_lower_cursor; /* active grip cursor: D */
143+
144+ /* horizontal */
145+ Cursor adjust_left_cursor; /* active grip cursor: U */
146+ Cursor adjust_right_cursor; /* active grip cursor: D */
147+
148+ /* private */
149+ Boolean recursively_called; /* for ChangeManaged */
150+ Boolean resize_children_to_pref; /* override constrain resources
151+ and resize all children to
152+ preferred size */
153+ int start_loc; /* mouse origin when adjusting */
154+ Widget whichadd; /* Which pane to add changes to */
155+ Widget whichsub; /* Which pane to sub changes from */
156+ GC normgc; /* GC to use when drawing borders */
157+ GC invgc; /* GC to use when erasing borders */
158+ GC flipgc; /* GC to use when animating borders */
159+ int num_panes; /* count of managed panes */
160+ PaneStack *stack; /* The pane stack for this widget */
161+#ifndef OLDXAW
162+ XtPointer pad[4]; /* for future use and keep binary compatibility */
163+#endif
164+} PanedPart;
165+
166+/*
167+ * Full instance record declaration
168+ */
169+typedef struct _PanedRec {
170+ CorePart core;
171+ CompositePart composite;
172+ ConstraintPart constraint;
173+ PanedPart paned;
174+} PanedRec;
175+
176+#endif /* _XawPanedP_h */
@@ -0,0 +1,105 @@
1+/*
2+ *
3+Copyright 1989, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ * Author: Jim Fulton, MIT X Consortium
26+ */
27+
28+#ifndef _XawPanner_h
29+#define _XawPanner_h
30+
31+#include <X11/Intrinsic.h>
32+#include <X11/Xaw/Reports.h>
33+
34+/*****************************************************************************
35+ *
36+ * Panner Widget (subclass of Simple)
37+ *
38+ * This widget is used to represent navigation in a 2d coordinate system
39+ *
40+ * Resources:
41+ *
42+ * Name Class Type Default
43+ * ---- ----- ---- -------
44+ *
45+ * allowOff AllowOff Boolean FALSE
46+ * background Background Pixel XtDefaultBackground
47+ * backgroundStipple BackgroundStipple String NULL
48+ * canvasWidth CanvasWidth Dimension 0
49+ * canvasHeight CanvasHeight Dimension 0
50+ * defaultScale DefaultScale Dimension 8 percent
51+ * foreground Foreground Pixel XtDefaultBackground
52+ * internalSpace InternalSpace Dimension 4
53+ * lineWidth LineWidth Dimension 0
54+ * reportCallback ReportCallback XtCallbackList NULL
55+ * resize Resize Boolean TRUE
56+ * rubberBand RubberBand Boolean FALSE
57+ * shadowColor ShadowColor Pixel XtDefaultForeground
58+ * shadowThickness ShadowThickness Dimension 2
59+ * sliderX SliderX Position 0
60+ * sliderY SliderY Position 0
61+ * sliderWidth SliderWidth Dimension 0
62+ * sliderHeight SliderHeight Dimension 0
63+ *
64+ *****************************************************************************/
65+
66+#ifndef _XtStringDefs_h_
67+#define XtNresize "resize"
68+#define XtCResize "Resize"
69+#endif
70+
71+#define XtNallowOff "allowOff"
72+#define XtCAllowOff "AllowOff"
73+#define XtNbackgroundStipple "backgroundStipple"
74+#define XtCBackgroundStipple "BackgroundStipple"
75+#define XtNdefaultScale "defaultScale"
76+#define XtCDefaultScale "DefaultScale"
77+#define XtNcanvasWidth "canvasWidth"
78+#define XtCCanvasWidth "CanvasWidth"
79+#define XtNcanvasHeight "canvasHeight"
80+#define XtCCanvasHeight "CanvasHeight"
81+#define XtNinternalSpace "internalSpace"
82+#define XtCInternalSpace "InternalSpace"
83+#define XtNlineWidth "lineWidth"
84+#define XtCLineWidth "LineWidth"
85+#define XtNrubberBand "rubberBand"
86+#define XtCRubberBand "RubberBand"
87+#define XtNshadowThickness "shadowThickness"
88+#define XtCShadowThickness "ShadowThickness"
89+#define XtNshadowColor "shadowColor"
90+#define XtCShadowColor "ShadowColor"
91+#define XtNsliderX "sliderX"
92+#define XtCSliderX "SliderX"
93+#define XtNsliderY "sliderY"
94+#define XtCSliderY "SliderY"
95+#define XtNsliderWidth "sliderWidth"
96+#define XtCSliderWidth "SliderWidth"
97+#define XtNsliderHeight "sliderHeight"
98+#define XtCSliderHeight "SliderHeight"
99+
100+extern WidgetClass pannerWidgetClass;
101+
102+typedef struct _PannerClassRec *PannerWidgetClass;
103+typedef struct _PannerRec *PannerWidget;
104+
105+#endif /* _XawPanner_h */
@@ -0,0 +1,106 @@
1+/*
2+ *
3+Copyright 1989, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ * Author: Jim Fulton, MIT X Consortium
26+ */
27+
28+#ifndef _XawPannerP_h
29+#define _XawPannerP_h
30+
31+#include <X11/Xaw/Panner.h>
32+#include <X11/Xaw/SimpleP.h>
33+
34+/* new fields in widget class */
35+typedef struct {
36+ XtPointer extension;
37+} PannerClassPart;
38+
39+/* Panner widget class */
40+typedef struct _PannerClassRec {
41+ CoreClassPart core_class;
42+ SimpleClassPart simple_class;
43+ PannerClassPart panner_class;
44+} PannerClassRec;
45+
46+/* new fields in widget */
47+typedef struct {
48+ /* resources */
49+ XtCallbackList report_callbacks; /* callback/Callback */
50+ Boolean allow_off; /* allowOff/AllowOff */
51+ Boolean resize_to_pref; /* resizeToPreferred/Boolean */
52+ Pixel foreground; /* foreground/Foreground */
53+ Pixel shadow_color; /* shadowColor/ShadowColor */
54+ Dimension shadow_thickness; /* shadowThickness/ShadowThickness */
55+ Dimension default_scale; /* defaultScale/DefaultScale */
56+ Dimension line_width; /* lineWidth/LineWidth */
57+ Dimension canvas_width; /* canvasWidth/CanvasWidth */
58+ Dimension canvas_height; /* canvasHeight/CanvasHeight */
59+ Position slider_x; /* sliderX/SliderX */
60+ Position slider_y; /* sliderY/SliderY */
61+ Dimension slider_width; /* sliderWidth/SliderWidth */
62+ Dimension slider_height; /* sliderHeight/SliderHeight */
63+ Dimension internal_border; /* internalBorderWidth/BorderWidth */
64+ String stipple_name; /* backgroundStipple/BackgroundStipple
65+ */
66+ /* private */
67+ GC slider_gc; /* background of slider */
68+ GC shadow_gc; /* edge of slider and shadow */
69+ GC xor_gc; /* for doing XOR tmp graphics */
70+ double haspect, vaspect; /* aspect ratio of core to canvas */
71+ Boolean rubber_band; /* true = rubber band, false = move */
72+ struct {
73+ Boolean doing; /* tmp graphics in progress */
74+ Boolean showing; /* true if tmp graphics displayed */
75+ Position startx, starty; /* initial position of slider */
76+ Position dx, dy; /* offset loc for tmp graphics */
77+ Position x, y; /* location for tmp graphics */
78+ } tmp;
79+ Position knob_x, knob_y; /* real upper left of knob in canvas */
80+ Dimension knob_width, knob_height; /* real size of knob in canvas */
81+ Boolean shadow_valid; /* true if rects are valid */
82+ XRectangle shadow_rects[2]; /* location of shadows */
83+ Position last_x, last_y; /* previous location of knob */
84+#ifndef OLDXAW
85+ XtPointer pad[4]; /* for future use and keep binary compatibility */
86+#endif
87+} PannerPart;
88+
89+typedef struct _PannerRec {
90+ CorePart core;
91+ SimplePart simple;
92+ PannerPart panner;
93+} PannerRec;
94+
95+#define PANNER_HSCALE(pw,val) ((pw)->panner.haspect * ((double)(val)))
96+#define PANNER_VSCALE(pw,val) ((pw)->panner.vaspect * ((double)(val)))
97+
98+#define PANNER_DSCALE(pw,val) (Dimension) \
99+((((unsigned long)(val)) * (unsigned long)pw->panner.default_scale) / 100L)
100+
101+#define PANNER_DEFAULT_SCALE 8 /* percent */
102+#define PANNER_OUTOFRANGE -30000
103+
104+extern PannerClassRec pannerClassRec;
105+
106+#endif /* _XawPannerP_h */
@@ -0,0 +1,61 @@
1+/*
2+ *
3+Copyright 1990, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ * Author: Jim Fulton, MIT X Consortium
26+ */
27+
28+#ifndef _XawPorthole_h
29+#define _XawPorthole_h
30+
31+#include <X11/Intrinsic.h>
32+#include <X11/Xaw/Reports.h>
33+
34+/*****************************************************************************
35+ *
36+ * Porthole Widget (subclass of Composite)
37+ *
38+ * This widget is similar to a viewport without scrollbars. Child movement
39+ * is done by external panners or scrollbars.
40+ *
41+ * Parameters:
42+ *
43+ * Name Class Type Default
44+ * ---- ----- ---- -------
45+ *
46+ * background Background Pixel XtDefaultBackground
47+ * border BorderColor Pixel XtDefaultForeground
48+ * borderWidth BorderWidth Dimension 1
49+ * height Height Dimension 0
50+ * reportCallback ReportCallback Pointer NULL
51+ * width Width Dimension 0
52+ * x Position Position 0
53+ * y Position Position 0
54+ *
55+ *****************************************************************************/
56+
57+extern WidgetClass portholeWidgetClass;
58+typedef struct _PortholeClassRec *PortholeWidgetClass;
59+typedef struct _PortholeRec *PortholeWidget;
60+
61+#endif /* _XawPorthole_h */
@@ -0,0 +1,62 @@
1+/*
2+ *
3+Copyright 1990, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ * Author: Jim Fulton, MIT X Consortium
26+ */
27+
28+#ifndef _XawPortholeP_h
29+#define _XawPortholeP_h
30+
31+#include <X11/Xaw/Porthole.h>
32+
33+/* new fields in widget class */
34+typedef struct {
35+ XtPointer extension;
36+} PortholeClassPart;
37+
38+/* widget class */
39+typedef struct _PortholeClassRec {
40+ CoreClassPart core_class;
41+ CompositeClassPart composite_class;
42+ PortholeClassPart porthole_class;
43+} PortholeClassRec;
44+
45+/* new fields in widget */
46+typedef struct {
47+ /* resources */
48+ XtCallbackList report_callbacks; /* callback/Callback */
49+#ifndef OLDXAW
50+ XtPointer pad[4]; /* for future use and keep binary compatibility */
51+#endif
52+} PortholePart;
53+
54+typedef struct _PortholeRec {
55+ CorePart core;
56+ CompositePart composite;
57+ PortholePart porthole;
58+} PortholeRec;
59+
60+extern PortholeClassRec portholeClassRec;
61+
62+#endif /* _XawPortholeP_h */
@@ -0,0 +1,73 @@
1+/*
2+ *
3+Copyright 1989, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ * Author: Jim Fulton, MIT X Consortium
26+ */
27+
28+#ifndef _XawRepeater_h
29+#define _XawRepeater_h
30+
31+#include <X11/Xaw/Command.h>
32+
33+/*****************************************************************************
34+ *
35+ * Repeater Widget (subclass of Command)
36+ *
37+ * This widget is a push button that repeatedly fires when held down
38+ *
39+ * Parameters:
40+ *
41+ * Name Class Type Default
42+ * ---- ----- ---- -------
43+ *
44+ * decay Decay int 5 milliseconds
45+ * flash Boolean Boolean FALSE
46+ * initialDelay Delay int 200 milliseconds
47+ * minimumDelay MinimumDelay int 10 milliseconds
48+ * repeatDelay Delay int 50 milliseconds
49+ * startCallback StartCallback XtCallbackList NULL
50+ * stopCallback StopCallback XtCallbackList NULL
51+ *
52+ *****************************************************************************/
53+
54+#define XtNdecay "decay"
55+#define XtCDecay "Decay"
56+#define XtNinitialDelay "initialDelay"
57+#define XtCDelay "Delay"
58+#define XtNminimumDelay "minimumDelay"
59+#define XtCMinimumDelay "MinimumDelay"
60+#define XtNrepeatDelay "repeatDelay"
61+#define XtNflash "flash"
62+#define XtNstartCallback "startCallback"
63+#define XtCStartCallback "StartCallback"
64+#define XtNstopCallback "stopCallback"
65+#define XtCStopCallback "StopCallback"
66+
67+
68+extern WidgetClass repeaterWidgetClass;
69+
70+typedef struct _RepeaterClassRec *RepeaterWidgetClass;
71+typedef struct _RepeaterRec *RepeaterWidget;
72+
73+#endif /* _XawRepeater_h */
@@ -0,0 +1,82 @@
1+/*
2+ *
3+Copyright 1989, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ * Author: Jim Fulton, MIT X Consortium
26+ */
27+
28+#ifndef _XawRepeaterP_h
29+#define _XawRepeaterP_h
30+
31+#include <X11/Xaw/CommandP.h>
32+#include <X11/Xaw/Repeater.h>
33+
34+/* new fields in widget class */
35+typedef struct {
36+ XtPointer extension;
37+} RepeaterClassPart;
38+
39+/* repeater widget class */
40+typedef struct _RepeaterClassRec {
41+ CoreClassPart core_class;
42+ SimpleClassPart simple_class;
43+ LabelClassPart label_class;
44+ CommandClassPart command_class;
45+ RepeaterClassPart repeater_class;
46+} RepeaterClassRec;
47+
48+typedef struct {
49+ /* resources */
50+ int initial_delay; /* initialDelay/Delay */
51+ int repeat_delay; /* repeatDelay/Delay */
52+ int minimum_delay; /* minimumDelay/MinimumDelay */
53+ int decay; /* decay to minimum delay */
54+ Boolean flash; /* flash/Boolean */
55+ XtCallbackList start_callbacks; /* startCallback/StartCallback */
56+ XtCallbackList stop_callbacks; /* stopCallback/StopCallback */
57+
58+ /* private */
59+ int next_delay; /* next amount for timer */
60+ XtIntervalId timer; /* timer that will fire */
61+#ifndef OLDXAW
62+ XtPointer pad[4]; /* for future use and keep binary compatibility */
63+#endif
64+} RepeaterPart;
65+
66+typedef struct _RepeaterRec {
67+ CorePart core;
68+ SimplePart simple;
69+ LabelPart label;
70+ CommandPart command;
71+ RepeaterPart repeater;
72+} RepeaterRec;
73+
74+ /* milliseconds */
75+#define REP_DEF_DECAY 5
76+#define REP_DEF_INITIAL_DELAY 200
77+#define REP_DEF_MINIMUM_DELAY 10
78+#define REP_DEF_REPEAT_DELAY 50
79+
80+extern RepeaterClassRec repeaterClassRec;
81+
82+#endif /* _XawRepeaterP_h */
@@ -0,0 +1,55 @@
1+/*
2+ *
3+Copyright 1990, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ */
25+
26+#ifndef _Xaw_Reports_h
27+#define _Xaw_Reports_h
28+
29+#include <X11/Intrinsic.h>
30+
31+/*
32+ * XawPannerReport - this structure is used by the reportCallback of the
33+ * Panner, Porthole, Viewport, and Scrollbar widgets to report its position.
34+ * All fields must be filled in, although the changed field may be used as
35+ * a hint as to which fields have been altered since the last report.
36+ */
37+typedef struct {
38+ unsigned int changed; /* mask, see below */
39+ Position slider_x, slider_y; /* location of slider within outer */
40+ Dimension slider_width, slider_height; /* size of slider */
41+ Dimension canvas_width, canvas_height; /* size of canvas */
42+} XawPannerReport;
43+
44+#define XawPRSliderX (1 << 0)
45+#define XawPRSliderY (1 << 1)
46+#define XawPRSliderWidth (1 << 2)
47+#define XawPRSliderHeight (1 << 3)
48+#define XawPRCanvasWidth (1 << 4)
49+#define XawPRCanvasHeight (1 << 5)
50+#define XawPRAll (63) /* union of above */
51+
52+#define XtNreportCallback "reportCallback"
53+#define XtCReportCallback "reportCallback"
54+
55+#endif /* _Xaw_Reports_h */
@@ -0,0 +1,133 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _Scrollbar_h
49+#define _Scrollbar_h
50+
51+/*
52+ * Scrollbar Widget
53+ */
54+
55+#include <X11/Xmu/Converters.h>
56+#include <X11/Xfuncproto.h>
57+
58+/* Scrollbar resources:
59+
60+ Name Class RepType Default Value
61+ ---- ----- ------- -------------
62+ accelerators Accelerators AcceleratorTable NULL
63+ ancestorSensitive AncestorSensitive Boolean True
64+ background Background Pixel XtDefaultBackground
65+ backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap
66+ borderColor BorderColor Pixel XtDefaultForeground
67+ borderPixmap Pixmap Pixmap XtUnspecifiedPixmap
68+ borderWidth BorderWidth Dimension 1
69+ colormap Colormap Colormap parent's colormap
70+ cursor Cursor Cursor None
71+ cursorName Cursor String NULL
72+ depth Depth int parent's depth
73+ destroyCallback Callback XtCallbackList NULL
74+ foreground Foreground Pixel XtDefaultForeground
75+ height Height Dimension length or thickness
76+ insensitiveBorder Insensitive Pixmap GreyPixmap
77+ jumpProc Callback XtCallbackList NULL
78+ length Length Dimension 1
79+ mappedWhenManaged MappedWhenManaged Boolean True
80+ minimumThumb MinimumThumb Dimension 7
81+ orientation Orientation XtOrientation XtorientVertical
82+ pointerColor Foreground Pixel XtDefaultForeground
83+ pointerColorBackground Background Pixel XtDefaultBackground
84+ screen Screen Screen parent's screen
85+ scrollDCursor Cursor Cursor XC_sb_down_arrow
86+ scrollHCursor Cursor Cursor XC_sb_h_double_arrow
87+ scrollLCursor Cursor Cursor XC_sb_left_arrow
88+ scrollProc Callback XtCallbackList NULL
89+ scrollRCursor Cursor Cursor XC_sb_right_arrow
90+ scrollUCursor Cursor Cursor XC_sb_up_arrow
91+ scrollVCursor Cursor Cursor XC_sb_v_double_arrow
92+ sensitive Sensitive Boolean True
93+ shown Shown Float 0.0
94+ thickness Thickness Dimension 14
95+ thumb Thumb Bitmap GreyPixmap
96+ thumbProc Callback XtCallbackList NULL
97+ topOfThumb TopOfThumb Float 0.0
98+ translations Translations TranslationTable see source or doc
99+ width Width Dimension thickness or length
100+ x Position Position 0
101+ y Position Position 0
102+
103+*/
104+
105+#define XtCMinimumThumb "MinimumThumb"
106+#define XtCShown "Shown"
107+#define XtCTopOfThumb "TopOfThumb"
108+
109+#define XtNminimumThumb "minimumThumb"
110+#define XtNtopOfThumb "topOfThumb"
111+
112+typedef struct _ScrollbarRec *ScrollbarWidget;
113+typedef struct _ScrollbarClassRec *ScrollbarWidgetClass;
114+
115+extern WidgetClass scrollbarWidgetClass;
116+
117+_XFUNCPROTOBEGIN
118+
119+void XawScrollbarSetThumb
120+(
121+ Widget scrollbar,
122+#if NeedWidePrototypes
123+ double top,
124+ double shown
125+#else
126+ float top,
127+ float shown
128+#endif
129+ );
130+
131+_XFUNCPROTOEND
132+
133+#endif /* _Scrollbar_h */
@@ -0,0 +1,103 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _ScrollbarP_h
49+#define _ScrollbarP_h
50+
51+#include <X11/Xaw/Scrollbar.h>
52+#include <X11/Xaw/SimpleP.h>
53+
54+typedef struct {
55+ /* resources */
56+ Pixel foreground; /* thumb foreground color */
57+ XtOrientation orientation; /* horizontal or vertical */
58+ XtCallbackList scrollProc; /* proportional scroll */
59+ XtCallbackList thumbProc; /* jump (to position) scroll */
60+ XtCallbackList jumpProc; /* same as thumbProc but pass data by ref */
61+ Pixmap thumb; /* thumb pixmap */
62+ Cursor upCursor; /* scroll up cursor */
63+ Cursor downCursor; /* scroll down cursor */
64+ Cursor leftCursor; /* scroll left cursor */
65+ Cursor rightCursor; /* scroll right cursor */
66+ Cursor verCursor; /* scroll vertical cursor */
67+ Cursor horCursor; /* scroll horizontal cursor */
68+ float top;
69+ float shown;
70+ Dimension length; /* either height or width */
71+ Dimension thickness; /* either width or height */
72+ Dimension min_thumb; /* minimum size for the thumb */
73+
74+ /* private */
75+ Cursor inactiveCursor; /* The normal cursor for scrollbar */
76+ char direction; /* a scroll has started; which direction */
77+ GC gc; /* a (shared) gc */
78+ Position topLoc; /* Pixel that corresponds to top */
79+ Dimension shownLength; /* Num pixels corresponding to shown */
80+#ifndef OLDXAW
81+ XtPointer pad[4]; /* for future use and keep binary compatibility */
82+#endif
83+} ScrollbarPart;
84+
85+typedef struct _ScrollbarRec {
86+ CorePart core;
87+ SimplePart simple;
88+ ScrollbarPart scrollbar;
89+} ScrollbarRec;
90+
91+typedef struct {
92+ XtPointer extension;
93+} ScrollbarClassPart;
94+
95+typedef struct _ScrollbarClassRec {
96+ CoreClassPart core_class;
97+ SimpleClassPart simple_class;
98+ ScrollbarClassPart scrollbar_class;
99+} ScrollbarClassRec;
100+
101+extern ScrollbarClassRec scrollbarClassRec;
102+
103+#endif /* _ScrollbarP_h */
@@ -0,0 +1,113 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _Simple_h
49+#define _Simple_h
50+
51+#include <X11/Xmu/Converters.h>
52+
53+/* Resources:
54+
55+ Name Class RepType Default Value
56+ ---- ----- ------- -------------
57+ background Background Pixel XtDefaultBackground
58+ border BorderColor Pixel XtDefaultForeground
59+ borderWidth BorderWidth Dimension 1
60+ cursor Cursor Cursor None
61+ cursorName Cursor String NULL
62+ destroyCallback Callback Pointer NULL
63+ displayList DisplayList XawDisplayList* NULL
64+ height Height Dimension 0
65+ insensitiveBorder Insensitive Pixmap Gray
66+ mappedWhenManaged MappedWhenManaged Boolean True
67+ pointerColor Foreground Pixel XtDefaultForeground
68+ pointerColorBackground Background Pixel XtDefaultBackground
69+ sensitive Sensitive Boolean True
70+ tip Tip String NULL
71+ width Width Dimension 0
72+ x Position Position 0
73+ y Position Position 0
74+
75+*/
76+
77+#define XtNcursor "cursor"
78+#define XtNcursorName "cursorName"
79+#define XtNinsensitiveBorder "insensitiveBorder"
80+
81+#define XtCInsensitive "Insensitive"
82+
83+#ifndef XtCInternational
84+#define XtCInternational "International"
85+#endif
86+
87+#ifndef XtNinternational
88+#define XtNinternational "international"
89+#endif
90+
91+#ifndef OLDXAW
92+#ifndef XawNdisplayList
93+#define XawNdisplayList "displayList"
94+#endif
95+
96+#ifndef XawCDisplayList
97+#define XawCDisplayList "DisplayList"
98+#endif
99+
100+#ifndef XawRDisplayList
101+#define XawRDisplayList "XawDisplayList"
102+#endif
103+
104+#define XtNtip "tip"
105+#define XtCTip "Tip"
106+#endif /* OLDXAW */
107+
108+typedef struct _SimpleClassRec *SimpleWidgetClass;
109+typedef struct _SimpleRec *SimpleWidget;
110+
111+extern WidgetClass simpleWidgetClass;
112+
113+#endif /* _Simple_h */
@@ -0,0 +1,99 @@
1+/*
2+ *
3+Copyright 1989, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ */
26+
27+/*
28+ * SimpleMenuP.h - Private Header file for SimpleMenu widget.
29+ *
30+ * Date: April 3, 1989
31+ *
32+ * By: Chris D. Peterson
33+ * MIT X Consortium
34+ * kit@expo.lcs.mit.edu
35+ */
36+
37+#ifndef _SimpleMenuP_h
38+#define _SimpleMenuP_h
39+
40+#include <X11/Xaw/SimpleMenu.h>
41+#include <X11/Xaw/SmeP.h>
42+#include <X11/ShellP.h>
43+#include <X11/Xaw/XawInit.h>
44+
45+typedef struct {
46+ XtPointer extension; /* For future needs */
47+} SimpleMenuClassPart;
48+
49+typedef struct _SimpleMenuClassRec {
50+ CoreClassPart core_class;
51+ CompositeClassPart composite_class;
52+ ShellClassPart shell_class;
53+ OverrideShellClassPart override_shell_class;
54+ SimpleMenuClassPart simpleMenu_class;
55+} SimpleMenuClassRec;
56+
57+extern SimpleMenuClassRec simpleMenuClassRec;
58+
59+typedef struct _SimpleMenuPart {
60+ /* resources */
61+ String label_string; /* The string for the label or NULL */
62+ SmeObject label; /* If label_string is non-NULL then this is
63+ the label widget */
64+ WidgetClass label_class; /* Widget Class of the menu label object */
65+ Dimension top_margin; /* Top and bottom margins */
66+ Dimension bottom_margin;
67+ Dimension row_height; /* height of each row (menu entry) */
68+ Cursor cursor; /* The menu's cursor */
69+ SmeObject popup_entry; /* The entry to position the cursor on for
70+ when using XawPositionSimpleMenu */
71+ Boolean menu_on_screen; /* Force the menus to be fully on the screen*/
72+ int backing_store; /* What type of backing store to use */
73+
74+ /* private */
75+ Boolean recursive_set_values; /* contain a possible infinite loop */
76+ Boolean menu_width; /* If true then force width to remain
77+ core.width */
78+ Boolean menu_height; /* Just like menu_width, but for height */
79+ SmeObject entry_set; /* The entry that is currently set or
80+ highlighted */
81+#ifndef OLDXAW
82+ Dimension left_margin;
83+ Dimension right_margin;
84+ XawDisplayList *display_list;
85+ Widget sub_menu;
86+ unsigned char state;
87+ XtPointer pad[4]; /* for future use and keep binary compatibility */
88+#endif
89+} SimpleMenuPart;
90+
91+typedef struct _SimpleMenuRec {
92+ CorePart core;
93+ CompositePart composite;
94+ ShellPart shell;
95+ OverrideShellPart override;
96+ SimpleMenuPart simple_menu;
97+} SimpleMenuRec;
98+
99+#endif /* _SimpleMenuP_h */
@@ -0,0 +1,171 @@
1+/*
2+ *
3+Copyright 1989, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ * Author: Chris D. Peterson, MIT X Consortium
26+ */
27+
28+/*
29+ * SimpleMenu.h - Public Header file for SimpleMenu widget.
30+ *
31+ * This is the public header file for the Athena SimpleMenu widget.
32+ * It is intended to provide one pane pulldown and popup menus within
33+ * the framework of the X Toolkit. As the name implies it is a first and
34+ * by no means complete implementation of menu code. It does not attempt to
35+ * fill the needs of all applications, but does allow a resource oriented
36+ * interface to menus.
37+ *
38+ * Date: April 3, 1989
39+ *
40+ * By: Chris D. Peterson
41+ * MIT X Consortium
42+ * kit@expo.lcs.mit.edu
43+ */
44+
45+#ifndef _SimpleMenu_h
46+#define _SimpleMenu_h
47+
48+#include <X11/Shell.h>
49+#include <X11/Xmu/Converters.h>
50+
51+/*
52+ * SimpleMenu widget
53+ */
54+
55+/* Resources:
56+
57+ Name Class RepType Default Value
58+ ---- ----- ------- -------------
59+ background Background Pixel XtDefaultBackground
60+ backgroundPixmap BackgroundPixmap Pixmap None
61+ borderColor BorderColor Pixel XtDefaultForeground
62+ borderPixmap BorderPixmap Pixmap None
63+ borderWidth BorderWidth Dimension 1
64+ bottomMargin VerticalMargins Dimension VerticalSpace
65+ columnWidth ColumnWidth Dimension Width of widest text
66+ cursor Cursor Cursor None
67+ destroyCallback Callback Pointer NULL
68+ displayList DisplayList XawDisplayList* NULL
69+ height Height Dimension 0
70+ label Label String NULL (No label)
71+ labelClass LabelClass Pointer smeBSBObjectClass
72+ leftMargin HorizontalMargins Dimension 0
73+ mappedWhenManaged MappedWhenManaged Boolean True
74+ rightMargin HorizontalMargins Dimension 0
75+ rowHeight RowHeight Dimension Height of Font
76+ sensitive Sensitive Boolean True
77+ topMargin VerticalMargins Dimension VerticalSpace
78+ width Width Dimension 0
79+ x Position Position 0
80+ y Position Position 0
81+
82+*/
83+
84+typedef struct _SimpleMenuClassRec* SimpleMenuWidgetClass;
85+typedef struct _SimpleMenuRec* SimpleMenuWidget;
86+
87+extern WidgetClass simpleMenuWidgetClass;
88+
89+#define XtNcursor "cursor"
90+#define XtNbottomMargin "bottomMargin"
91+#define XtNcolumnWidth "columnWidth"
92+#define XtNlabelClass "labelClass"
93+#define XtNmenuOnScreen "menuOnScreen"
94+#define XtNpopupOnEntry "popupOnEntry"
95+#define XtNrowHeight "rowHeight"
96+#define XtNtopMargin "topMargin"
97+#define XtNleftMargin "leftMargin"
98+#define XtNrightMargin "rightMargin"
99+
100+#define XtCColumnWidth "ColumnWidth"
101+#define XtCLabelClass "LabelClass"
102+#define XtCMenuOnScreen "MenuOnScreen"
103+#define XtCPopupOnEntry "PopupOnEntry"
104+#define XtCRowHeight "RowHeight"
105+
106+#define XtCVerticalMargins "VerticalMargins"
107+
108+#ifndef OLDXAW
109+#define XtCHorizontalMargins "HorizontalMargins"
110+#define XawNdisplayList "displayList"
111+#define XawCDisplayList "DisplayList"
112+#define XawRDisplayList "XawDisplayList"
113+#endif
114+
115+/*
116+ * Public Functions
117+ */
118+
119+_XFUNCPROTOBEGIN
120+
121+/*
122+ * Function:
123+ * XawSimpleMenuAddGlobalActions
124+ *
125+ * Parameters:
126+ * app_con - appcontext
127+ *
128+ * Description:
129+ * Adds the global actions to the simple menu widget.
130+ */
131+void XawSimpleMenuAddGlobalActions
132+(
133+ XtAppContext app_con
134+ );
135+
136+/*
137+ * Function:
138+ * XawSimpleMenuGetActiveEntry
139+ *
140+ * Parameters:
141+ * w - smw widget
142+ *
143+ * Description:
144+ * Gets the currently active (set) entry.
145+ *
146+ * Returns:
147+ * The currently set entry or NULL if none is set
148+ */
149+Widget XawSimpleMenuGetActiveEntry
150+(
151+ Widget w
152+ );
153+
154+/*
155+ * Function:
156+ * XawSimpleMenuClearActiveEntry
157+ *
158+ * Parameters:
159+ * w - smw widget
160+ *
161+ * Description:
162+ * Unsets the currently active (set) entry.
163+ */
164+void XawSimpleMenuClearActiveEntry
165+(
166+ Widget w
167+);
168+
169+_XFUNCPROTOEND
170+
171+#endif /* _SimpleMenu_h */
@@ -0,0 +1,98 @@
1+/***********************************************************
2+
3+Copyright 1987, 1988, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+
25+
26+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27+
28+ All Rights Reserved
29+
30+Permission to use, copy, modify, and distribute this software and its
31+documentation for any purpose and without fee is hereby granted,
32+provided that the above copyright notice appear in all copies and that
33+both that copyright notice and this permission notice appear in
34+supporting documentation, and that the name of Digital not be
35+used in advertising or publicity pertaining to distribution of the
36+software without specific, written prior permission.
37+
38+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44+SOFTWARE.
45+
46+******************************************************************/
47+
48+#ifndef _SimpleP_h
49+#define _SimpleP_h
50+
51+#include <X11/Xfuncproto.h>
52+
53+#include <X11/Xaw/Simple.h>
54+
55+_XFUNCPROTOBEGIN
56+
57+#include <X11/Xaw/XawInit.h>
58+
59+typedef struct {
60+ Bool (*change_sensitive)(Widget);
61+#ifndef OLDXAW
62+ XtPointer extension;
63+#endif
64+} SimpleClassPart;
65+
66+#define XtInheritChangeSensitive ((Bool (*)(Widget))_XtInherit)
67+
68+typedef struct _SimpleClassRec {
69+ CoreClassPart core_class;
70+ SimpleClassPart simple_class;
71+} SimpleClassRec;
72+
73+extern SimpleClassRec simpleClassRec;
74+
75+typedef struct {
76+ /* resources */
77+ Cursor cursor;
78+ Pixmap insensitive_border;
79+ String cursor_name; /* cursor specified by name */
80+ Pixel pointer_fg, pointer_bg; /* Pointer colors */
81+ Boolean international;
82+
83+ /* private */
84+#ifndef OLDXAW
85+ XawDisplayList *display_list;
86+ String tip;
87+ XtPointer pad[3]; /* for future use and keep binary compatibility */
88+#endif
89+} SimplePart;
90+
91+typedef struct _SimpleRec {
92+ CorePart core;
93+ SimplePart simple;
94+} SimpleRec;
95+
96+_XFUNCPROTOEND
97+
98+#endif /* _SimpleP_h */
@@ -0,0 +1,71 @@
1+/*
2+ *
3+Copyright 1989, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ */
25+
26+/*
27+ * This is the public header file for the Athena Sme object.
28+ * It is intended to be used with the simple menu widget.
29+ *
30+ * Date: April 3, 1989
31+ *
32+ * By: Chris D. Peterson
33+ * MIT X Consortium
34+ * kit@expo.lcs.mit.edu
35+ */
36+
37+#ifndef _Sme_h
38+#define _Sme_h
39+
40+#include <X11/Intrinsic.h>
41+#include <X11/RectObj.h>
42+
43+/* Resources:
44+
45+ Name Class RepType Default Value
46+ ---- ----- ------- -------------
47+ callback Callback Pointer NULL
48+ destroyCallback Callback Pointer NULL
49+ height Height Dimension 0
50+ sensitive Sensitive Boolean True
51+ width Width Dimension 0
52+ x Position Position 0
53+ y Position Position 0
54+
55+*/
56+
57+#ifndef XtCInternational
58+#define XtCInternational "International"
59+#endif
60+
61+#ifndef XtNinternational
62+#define XtNinternational "international"
63+#endif
64+
65+
66+typedef struct _SmeClassRec *SmeObjectClass;
67+typedef struct _SmeRec *SmeObject;
68+
69+extern WidgetClass smeObjectClass;
70+
71+#endif /* _Sme_h */
@@ -0,0 +1,96 @@
1+/*
2+ *
3+Copyright 1989, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ */
25+
26+/*
27+ * SmeBSB.h - Public Header file for SmeBSB object.
28+ *
29+ * This is the public header file for the Athena BSB Sme object.
30+ * It is intended to be used with the simple menu widget. This object
31+ * provides bitmap - string - bitmap style entries.
32+ *
33+ * Date: April 3, 1989
34+ *
35+ * By: Chris D. Peterson
36+ * MIT X Consortium
37+ * kit@expo.lcs.mit.edu
38+ */
39+
40+#ifndef _SmeBSB_h
41+#define _SmeBSB_h
42+
43+#include <X11/Xmu/Converters.h>
44+#include <X11/Xaw/Sme.h>
45+
46+/* BSB Menu Entry Resources:
47+
48+ Name Class RepType Default Value
49+ ---- ----- ------- -------------
50+ callback Callback Callback NULL
51+ destroyCallback Callback Pointer NULL
52+ font Font XFontStruct * XtDefaultFont
53+ foreground Foreground Pixel XtDefaultForeground
54+ height Height Dimension 0
55+ label Label String Name of entry
56+ leftBitmap LeftBitmap Pixmap None
57+ leftMargin HorizontalMargins Dimension 4
58+ menuName MenuName String NULL
59+ rightBitmap RightBitmap Pixmap None
60+ rightMargin HorizontalMargins Dimension 4
61+ sensitive Sensitive Boolean True
62+ vertSpace VertSpace int 25
63+ width Width Dimension 0
64+ x Position Position 0
65+ y Position Position 0
66+
67+*/
68+
69+typedef struct _SmeBSBClassRec *SmeBSBObjectClass;
70+typedef struct _SmeBSBRec *SmeBSBObject;
71+
72+extern WidgetClass smeBSBObjectClass;
73+
74+#define XtNleftBitmap "leftBitmap"
75+#define XtNleftMargin "leftMargin"
76+#define XtNrightBitmap "rightBitmap"
77+#define XtNrightMargin "rightMargin"
78+#define XtNvertSpace "vertSpace"
79+
80+#define XtNmenuName "menuName"
81+#define XtCMenuName "MenuName"
82+
83+#ifndef XtNfontSet
84+#define XtNfontSet "fontSet"
85+#endif
86+
87+#ifndef XtCFontSet
88+#define XtCFontSet "FontSet"
89+#endif
90+
91+#define XtCLeftBitmap "LeftBitmap"
92+#define XtCHorizontalMargins "HorizontalMargins"
93+#define XtCRightBitmap "RightBitmap"
94+#define XtCVertSpace "VertSpace"
95+
96+#endif /* _SmeBSB_h */
@@ -0,0 +1,92 @@
1+/*
2+ *
3+Copyright 1989, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ * Author: Chris D. Peterson, MIT X Consortium
26+ */
27+
28+#ifndef _XawSmeBSBP_h
29+#define _XawSmeBSBP_h
30+
31+/*
32+ * Sme Object Private Data
33+ */
34+#include <X11/Xaw/SmeP.h>
35+#include <X11/Xaw/SmeBSB.h>
36+
37+typedef struct _SmeBSBClassPart {
38+ XtPointer extension;
39+} SmeBSBClassPart;
40+
41+/* Full class record declaration */
42+typedef struct _SmeBSBClassRec {
43+ RectObjClassPart rect_class;
44+ SmeClassPart sme_class;
45+ SmeBSBClassPart sme_bsb_class;
46+} SmeBSBClassRec;
47+
48+extern SmeBSBClassRec smeBSBClassRec;
49+
50+/* New fields for the Sme Object record */
51+typedef struct {
52+ /* resources */
53+ String label; /* The entry label */
54+ int vert_space; /* extra vert space to leave, as a
55+ percentage of the font height of
56+ the label */
57+ Pixmap left_bitmap, right_bitmap; /* bitmaps to show */
58+ Dimension left_margin, right_margin;/* left and right margins */
59+ Pixel foreground; /* foreground color */
60+ XFontStruct *font; /* The font to show label in */
61+ XFontSet fontset; /* or fontset */
62+ XtJustify justify; /* Justification for the label. */
63+
64+ /* private */
65+ Boolean set_values_area_cleared; /* do we need to unhighlight? */
66+ GC norm_gc; /* normal color gc */
67+ GC rev_gc; /* reverse color gc */
68+ GC norm_gray_gc; /* Normal color (grayed out) gc */
69+ GC invert_gc; /* gc for flipping colors */
70+ Dimension left_bitmap_width; /* size of each bitmap */
71+ Dimension left_bitmap_height;
72+ Dimension right_bitmap_width;
73+ Dimension right_bitmap_height;
74+
75+#ifndef OLDXAW
76+ /* new resources */
77+ char * menu_name; /* name of nested sub menu or NULL */
78+ XtPointer pad[4]; /* for future use and keep binary compatibility */
79+#endif
80+} SmeBSBPart;
81+
82+/*
83+ * Full instance record declaration
84+ */
85+typedef struct _SmeBSBRec {
86+ ObjectPart object;
87+ RectObjPart rectangle;
88+ SmePart sme;
89+ SmeBSBPart sme_bsb;
90+} SmeBSBRec;
91+
92+#endif /* _XawSmeBSBP_h */
@@ -0,0 +1,69 @@
1+/*
2+ *
3+Copyright 1989, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ */
26+
27+/*
28+ * This is the public header file for the Athena SmeLine object.
29+ * It is intended to be used with the simple menu widget.
30+ *
31+ * Date: April 3, 1989
32+ *
33+ * By: Chris D. Peterson
34+ * MIT X Consortium
35+ * kit@expo.lcs.mit.edu
36+ */
37+
38+#ifndef _SmeLine_h
39+#define _SmeLine_h
40+
41+#include <X11/Xaw/Sme.h>
42+#include <X11/Xmu/Converters.h>
43+
44+/* Resources:
45+
46+ Name Class RepType Default Value
47+ ---- ----- ------- -------------
48+ callback Callback Pointer NULL
49+ destroyCallback Callback Pointer NULL
50+ height Height Dimension 0
51+ sensitive Sensitive Boolean True
52+ width Width Dimension 0
53+ x Position Position 0
54+ y Position Position 0
55+
56+*/
57+
58+#define XtCLineWidth "LineWidth"
59+#define XtCStipple "Stipple"
60+
61+#define XtNlineWidth "lineWidth"
62+#define XtNstipple "stipple"
63+
64+typedef struct _SmeLineClassRec *SmeLineObjectClass;
65+typedef struct _SmeLineRec *SmeLineObject;
66+
67+extern WidgetClass smeLineObjectClass;
68+
69+#endif /* _SmeLine_h */
@@ -0,0 +1,73 @@
1+/*
2+ *
3+Copyright 1989, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ *
25+ * Author: Chris D. Peterson, MIT X Consortium
26+ */
27+
28+#ifndef _XawSmeLineP_h
29+#define _XawSmeLineP_h
30+
31+/*
32+ * SmeLine Widget Private Data
33+ */
34+#include <X11/Xaw/SmeP.h>
35+#include <X11/Xaw/SmeLine.h>
36+
37+/* New fields for the SmeLine widget class */
38+typedef struct _SmeLineClassPart {
39+ XtPointer extension;
40+} SmeLineClassPart;
41+
42+/* Full class record */
43+typedef struct _SmeLineClassRec {
44+ RectObjClassPart rect_class;
45+ SmeClassPart sme_class;
46+ SmeLineClassPart sme_line_class;
47+} SmeLineClassRec;
48+
49+extern SmeLineClassRec smeLineClassRec;
50+
51+/* New fields for the SmeLine widget */
52+typedef struct {
53+ /* resources */
54+ Pixel foreground; /* Foreground color */
55+ Pixmap stipple; /* Line Stipple */
56+ Dimension line_width; /* Width of the line */
57+
58+ /* private */
59+ GC gc; /* Graphics context for drawing line */
60+#ifndef OLDXAW
61+ XtPointer pad[4]; /* for future use and keep binary compatibility */
62+#endif
63+} SmeLinePart;
64+
65+/* Full instance record */
66+typedef struct _SmeLineRec {
67+ ObjectPart object;
68+ RectObjPart rectangle;
69+ SmePart sme;
70+ SmeLinePart sme_line;
71+} SmeLineRec;
72+
73+#endif /* _XawSmeLineP_h */

長いので途中までです

@@ -0,0 +1,88 @@
1+/*
2+ *
3+Copyright 1989, 1994, 1998 The Open Group
4+
5+Permission to use, copy, modify, distribute, and sell this software and its
6+documentation for any purpose is hereby granted without fee, provided that
7+the above copyright notice appear in all copies and that both that
8+copyright notice and this permission notice appear in supporting
9+documentation.
10+
11+The above copyright notice and this permission notice shall be included in
12+all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+Except as contained in this notice, the name of The Open Group shall not be
22+used in advertising or otherwise to promote the sale, use or other dealings
23+in this Software without prior written authorization from The Open Group.
24+ */
25+
26+/*
27+ * This is the private header file for the Athena Sme object.
28+ * This object is intended to be used with the simple menu widget.
29+ *
30+ * Date: April 3, 1989
31+ *
32+ * By: Chris D. Peterson
33+ * MIT X Consortium
34+ * kit@expo.lcs.mit.edu
35+ */
36+
37+#ifndef _XawSmeP_h
38+#define _XawSmeP_h
39+
40+/*
41+ * Sme Widget Private Data
42+ */
43+#include <X11/Xfuncproto.h>
44+
45+#include <X11/Xaw/Sme.h>
46+
47+_XFUNCPROTOBEGIN
48+
49+/* New fields for the Sme widget class */
50+typedef struct _SmeClassPart {
51+ XtWidgetProc highlight;
52+ XtWidgetProc unhighlight;
53+ XtWidgetProc notify;
54+ XtPointer extension;
55+} SmeClassPart;
56+
57+/* Full class record */
58+typedef struct _SmeClassRec {
59+ RectObjClassPart rect_class;
60+ SmeClassPart sme_class;
61+} SmeClassRec;
62+
63+extern SmeClassRec smeClassRec;
64+
65+/* New fields for the Sme widget */
66+typedef struct {
67+ /* resources */
68+ XtCallbackList callbacks;
69+ Boolean international;
70+#ifndef OLDXAW
71+ XtPointer pad[4]; /* for future use and keep binary compatibility */
72+#endif
73+} SmePart;
74+
75+/* Full instance record */
76+typedef struct _SmeRec {
77+ ObjectPart object;
78+ RectObjPart rectangle;
79+ SmePart sme;
80+} SmeRec;
81+
82+#define XtInheritHighlight ((XtWidgetProc)_XtInherit)
83+#define XtInheritUnhighlight XtInheritHighlight
84+#define XtInheritNotify XtInheritHighlight
85+
86+_XFUNCPROTOEND
87+
88+#endif /* _XawSmeP_h */

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません

差分が多過ぎるので表示しません