summaryrefslogtreecommitdiffstats
path: root/xlib
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-08-02 15:15:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-08-02 15:15:36 (GMT)
commit41535ba2bc93696827b89e65a4f022ddcb3921a7 (patch)
tree2bb82fe90d87ca147eb46088b36c09712c298099 /xlib
parent9e1c5266c042df7a0f76a8c5cd13094fdfc0e9fc (diff)
downloadtk-41535ba2bc93696827b89e65a4f022ddcb3921a7.zip
tk-41535ba2bc93696827b89e65a4f022ddcb3921a7.tar.gz
tk-41535ba2bc93696827b89e65a4f022ddcb3921a7.tar.bz2
Update Xutil.h and cursorfont.h to latest X11 version
Diffstat (limited to 'xlib')
-rw-r--r--xlib/X11/Xutil.h341
-rw-r--r--xlib/X11/cursorfont.h34
2 files changed, 199 insertions, 176 deletions
diff --git a/xlib/X11/Xutil.h b/xlib/X11/Xutil.h
index bf372fb..28a76fc 100644
--- a/xlib/X11/Xutil.h
+++ b/xlib/X11/Xutil.h
@@ -1,8 +1,30 @@
-/* $XConsortium: Xutil.h,v 11.73 91/07/30 16:21:37 rws Exp $ */
/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
@@ -10,7 +32,7 @@ Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
+supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
@@ -24,10 +46,20 @@ SOFTWARE.
******************************************************************/
-#ifndef _XUTIL_H_
-#define _XUTIL_H_
+#ifndef _X11_XUTIL_H_
+#define _X11_XUTIL_H_
/* You must include <X11/Xlib.h> before including this file */
+#include <X11/Xlib.h>
+#include <X11/keysym.h>
+
+/* The Xlib structs are full of implicit padding to properly align members.
+ We can't clean that up without breaking ABI, so tell clang not to bother
+ complaining about it. */
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpadded"
+#endif
#if defined(MAC_OSX_TK)
# define Region XRegion
@@ -112,6 +144,7 @@ typedef struct {
#define WindowGroupHint (1L << 6)
#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \
IconPositionHint|IconMaskHint|WindowGroupHint)
+#define XUrgencyHint (1L << 8)
/* definitions for initial window state */
#define WithdrawnState 0 /* for windows that are not mapped */
@@ -146,7 +179,9 @@ typedef enum {
XStringStyle, /* STRING */
XCompoundTextStyle, /* COMPOUND_TEXT */
XTextStyle, /* text in owner's encoding (current locale)*/
- XStdICCTextStyle /* STRING, else COMPOUND_TEXT */
+ XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */
+ /* The following is an XFree86 extension, introduced in November 2000 */
+ XUTF8StringStyle /* UTF8_STRING */
} XICCEncodingStyle;
typedef struct {
@@ -160,6 +195,24 @@ typedef struct {
char *res_class;
} XClassHint;
+#ifdef XUTIL_DEFINE_FUNCTIONS
+extern int XDestroyImage(
+ XImage *ximage);
+extern unsigned long XGetPixel(
+ XImage *ximage,
+ int x, int y);
+extern int XPutPixel(
+ XImage *ximage,
+ int x, int y,
+ unsigned long pixel);
+extern XImage *XSubImage(
+ XImage *ximage,
+ int x, int y,
+ unsigned int width, unsigned int height);
+extern int XAddPixel(
+ XImage *ximage,
+ long value);
+#else
/*
* These macros are used to give some sugar to the image routines so that
* naive people are more comfortable with them.
@@ -174,6 +227,7 @@ typedef struct {
((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
#define XAddPixel(ximage, value) \
((*((ximage)->f.add_pixel))((ximage), (value)))
+#endif
/*
* Compose sequence status structure, used in calling XLookupString.
@@ -189,6 +243,9 @@ typedef struct _XComposeStatus {
#define IsKeypadKey(keysym) \
(((unsigned)(keysym) >= XK_KP_Space) && ((unsigned)(keysym) <= XK_KP_Equal))
+#define IsPrivateKeypadKey(keysym) \
+ (((unsigned)(keysym) >= 0x11000000) && ((unsigned)(keysym) <= 0x1100FFFF))
+
#define IsCursorKey(keysym) \
(((unsigned)(keysym) >= XK_Home) && ((unsigned)(keysym) < XK_Select))
@@ -201,10 +258,19 @@ typedef struct _XComposeStatus {
#define IsMiscFunctionKey(keysym) \
(((unsigned)(keysym) >= XK_Select) && ((unsigned)(keysym) <= XK_Break))
+#ifdef XK_XKB_KEYS
+#define IsModifierKey(keysym) \
+ ((((unsigned)(keysym) >= XK_Shift_L) && ((unsigned)(keysym) <= XK_Hyper_R)) \
+ || (((unsigned)(keysym) >= XK_ISO_Lock) && \
+ ((unsigned)(keysym) <= XK_ISO_Level5_Lock)) \
+ || ((unsigned)(keysym) == XK_Mode_switch) \
+ || ((unsigned)(keysym) == XK_Num_Lock))
+#else
#define IsModifierKey(keysym) \
((((unsigned)(keysym) >= XK_Shift_L) && ((unsigned)(keysym) <= XK_Hyper_R)) \
|| ((unsigned)(keysym) == XK_Mode_switch) \
|| ((unsigned)(keysym) == XK_Num_Lock))
+#endif
/*
* opaque reference to Region data type
*/
@@ -302,328 +368,257 @@ _XFUNCPROTOBEGIN
/* The following declarations are alphabetized. */
extern XClassHint *XAllocClassHint (
-#if NeedFunctionPrototypes
void
-#endif
);
extern XIconSize *XAllocIconSize (
-#if NeedFunctionPrototypes
void
-#endif
);
extern XSizeHints *XAllocSizeHints (
-#if NeedFunctionPrototypes
void
-#endif
);
extern XStandardColormap *XAllocStandardColormap (
-#if NeedFunctionPrototypes
void
-#endif
);
extern XWMHints *XAllocWMHints (
-#if NeedFunctionPrototypes
void
-#endif
);
-extern void XClipBox(
-#if NeedFunctionPrototypes
+extern int XClipBox(
Region /* r */,
XRectangle* /* rect_return */
-#endif
);
extern Region XCreateRegion(
-#if NeedFunctionPrototypes
void
-#endif
);
-extern char *XDefaultString(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern const char *XDefaultString (void);
extern int XDeleteContext(
-#if NeedFunctionPrototypes
Display* /* display */,
XID /* rid */,
XContext /* context */
-#endif
);
-extern void XDestroyRegion(
-#if NeedFunctionPrototypes
+extern int XDestroyRegion(
Region /* r */
-#endif
);
-extern Bool XEmptyRegion(
-#if NeedFunctionPrototypes
+extern int XEmptyRegion(
Region /* r */
-#endif
);
-extern Bool XEqualRegion(
-#if NeedFunctionPrototypes
+extern int XEqualRegion(
Region /* r1 */,
Region /* r2 */
-#endif
);
extern int XFindContext(
-#if NeedFunctionPrototypes
Display* /* display */,
XID /* rid */,
XContext /* context */,
XPointer* /* data_return */
-#endif
);
extern Status XGetClassHint(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XClassHint* /* class_hints_return */
-#endif
);
extern Status XGetIconSizes(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XIconSize** /* size_list_return */,
int* /* count_return */
-#endif
);
extern Status XGetNormalHints(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XSizeHints* /* hints_return */
-#endif
);
extern Status XGetRGBColormaps(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XStandardColormap** /* stdcmap_return */,
int* /* count_return */,
Atom /* property */
-#endif
);
extern Status XGetSizeHints(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XSizeHints* /* hints_return */,
Atom /* property */
-#endif
);
extern Status XGetStandardColormap(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XStandardColormap* /* colormap_return */,
Atom /* property */
-#endif
);
extern Status XGetTextProperty(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* window */,
XTextProperty* /* text_prop_return */,
Atom /* property */
-#endif
);
+extern XVisualInfo *XGetVisualInfo(
+ Display* /* display */,
+ long /* vinfo_mask */,
+ XVisualInfo* /* vinfo_template */,
+ int* /* nitems_return */
+);
extern Status XGetWMClientMachine(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop_return */
-#endif
);
extern XWMHints *XGetWMHints(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */
-#endif
);
extern Status XGetWMIconName(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop_return */
-#endif
);
extern Status XGetWMName(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop_return */
-#endif
);
extern Status XGetWMNormalHints(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XSizeHints* /* hints_return */,
long* /* supplied_return */
-#endif
);
extern Status XGetWMSizeHints(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XSizeHints* /* hints_return */,
long* /* supplied_return */,
Atom /* property */
-#endif
);
extern Status XGetZoomHints(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XSizeHints* /* zhints_return */
-#endif
);
-extern void XIntersectRegion(
-#if NeedFunctionPrototypes
+extern int XIntersectRegion(
Region /* sra */,
Region /* srb */,
Region /* dr_return */
-#endif
+);
+
+extern void XConvertCase(
+ KeySym /* sym */,
+ KeySym* /* lower */,
+ KeySym* /* upper */
);
extern int XLookupString(
-#if NeedFunctionPrototypes
XKeyEvent* /* event_struct */,
char* /* buffer_return */,
int /* bytes_buffer */,
KeySym* /* keysym_return */,
XComposeStatus* /* status_in_out */
-#endif
);
extern Status XMatchVisualInfo(
-#if NeedFunctionPrototypes
Display* /* display */,
int /* screen */,
int /* depth */,
int /* class */,
XVisualInfo* /* vinfo_return */
-#endif
);
extern int XOffsetRegion(
-#if NeedFunctionPrototypes
Region /* r */,
int /* dx */,
int /* dy */
-#endif
);
extern Bool XPointInRegion(
-#if NeedFunctionPrototypes
Region /* r */,
int /* x */,
int /* y */
-#endif
);
extern Region XPolygonRegion(
-#if NeedFunctionPrototypes
XPoint* /* points */,
int /* n */,
int /* fill_rule */
-#endif
);
extern int XRectInRegion(
-#if NeedFunctionPrototypes
Region /* r */,
int /* x */,
int /* y */,
unsigned int /* width */,
unsigned int /* height */
-#endif
);
extern int XSaveContext(
-#if NeedFunctionPrototypes
Display* /* display */,
XID /* rid */,
XContext /* context */,
_Xconst char* /* data */
-#endif
);
-extern void XSetClassHint(
-#if NeedFunctionPrototypes
+extern int XSetClassHint(
Display* /* display */,
Window /* w */,
XClassHint* /* class_hints */
-#endif
);
-extern void XSetIconSizes(
-#if NeedFunctionPrototypes
+extern int XSetIconSizes(
Display* /* display */,
Window /* w */,
XIconSize* /* size_list */,
int /* count */
-#endif
);
-extern void XSetNormalHints(
-#if NeedFunctionPrototypes
+extern int XSetNormalHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* hints */
-#endif
);
extern void XSetRGBColormaps(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XStandardColormap* /* stdcmaps */,
int /* count */,
Atom /* property */
-#endif
);
-extern void XSetSizeHints(
-#if NeedFunctionPrototypes
+extern int XSetSizeHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* hints */,
Atom /* property */
-#endif
);
-extern void XSetStandardProperties(
-#if NeedFunctionPrototypes
+extern int XSetStandardProperties(
Display* /* display */,
Window /* w */,
_Xconst char* /* window_name */,
@@ -632,52 +627,46 @@ extern void XSetStandardProperties(
char** /* argv */,
int /* argc */,
XSizeHints* /* hints */
-#endif
);
extern void XSetTextProperty(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop */,
Atom /* property */
-#endif
);
-extern void XSetWMHints(
-#if NeedFunctionPrototypes
+extern void XSetWMClientMachine(
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */
+);
+
+extern int XSetWMHints(
Display* /* display */,
Window /* w */,
XWMHints* /* wm_hints */
-#endif
);
extern void XSetWMIconName(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop */
-#endif
);
extern void XSetWMName(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop */
-#endif
);
extern void XSetWMNormalHints(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XSizeHints* /* hints */
-#endif
);
extern void XSetWMProperties(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XTextProperty* /* window_name */,
@@ -687,11 +676,9 @@ extern void XSetWMProperties(
XSizeHints* /* normal_hints */,
XWMHints* /* wm_hints */,
XClassHint* /* class_hints */
-#endif
);
extern void XmbSetWMProperties(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
_Xconst char* /* window_name */,
@@ -701,129 +688,132 @@ extern void XmbSetWMProperties(
XSizeHints* /* normal_hints */,
XWMHints* /* wm_hints */,
XClassHint* /* class_hints */
-#endif
+);
+
+extern void Xutf8SetWMProperties(
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */,
+ _Xconst char* /* icon_name */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* normal_hints */,
+ XWMHints* /* wm_hints */,
+ XClassHint* /* class_hints */
);
extern void XSetWMSizeHints(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XSizeHints* /* hints */,
Atom /* property */
-#endif
);
-extern void XSetRegion(
-#if NeedFunctionPrototypes
+extern int XSetRegion(
Display* /* display */,
GC /* gc */,
Region /* r */
-#endif
);
extern void XSetStandardColormap(
-#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
XStandardColormap* /* colormap */,
Atom /* property */
-#endif
);
-extern void XSetZoomHints(
-#if NeedFunctionPrototypes
+extern int XSetZoomHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* zhints */
-#endif
);
-extern void XShrinkRegion(
-#if NeedFunctionPrototypes
+extern int XShrinkRegion(
Region /* r */,
int /* dx */,
int /* dy */
-#endif
);
-extern void XSubtractRegion(
-#if NeedFunctionPrototypes
+extern Status XStringListToTextProperty(
+ char** /* list */,
+ int /* count */,
+ XTextProperty* /* text_prop_return */
+);
+
+extern int XSubtractRegion(
Region /* sra */,
Region /* srb */,
Region /* dr_return */
-#endif
);
extern int XmbTextListToTextProperty(
-#if NeedFunctionPrototypes
- Display* /* display */,
- char** /* list */,
- int /* count */,
- XICCEncodingStyle /* style */,
- XTextProperty* /* text_prop_return */
-#endif
+ Display* display,
+ char** list,
+ int count,
+ XICCEncodingStyle style,
+ XTextProperty* text_prop_return
);
extern int XwcTextListToTextProperty(
-#if NeedFunctionPrototypes
- Display* /* display */,
- wchar_t** /* list */,
- int /* count */,
- XICCEncodingStyle /* style */,
- XTextProperty* /* text_prop_return */
-#endif
+ Display* display,
+ wchar_t** list,
+ int count,
+ XICCEncodingStyle style,
+ XTextProperty* text_prop_return
+);
+
+extern int Xutf8TextListToTextProperty(
+ Display* display,
+ char** list,
+ int count,
+ XICCEncodingStyle style,
+ XTextProperty* text_prop_return
);
extern void XwcFreeStringList(
-#if NeedFunctionPrototypes
- wchar_t** /* list */
-#endif
+ wchar_t** list
);
extern Status XTextPropertyToStringList(
-#if NeedFunctionPrototypes
XTextProperty* /* text_prop */,
char*** /* list_return */,
int* /* count_return */
-#endif
);
extern int XmbTextPropertyToTextList(
-#if NeedFunctionPrototypes
- Display* /* display */,
- XTextProperty* /* text_prop */,
- char*** /* list_return */,
- int* /* count_return */
-#endif
+ Display* display,
+ const XTextProperty* text_prop,
+ char*** list_return,
+ int* count_return
);
extern int XwcTextPropertyToTextList(
-#if NeedFunctionPrototypes
- Display* /* display */,
- XTextProperty* /* text_prop */,
- wchar_t*** /* list_return */,
- int* /* count_return */
-#endif
+ Display* display,
+ const XTextProperty* text_prop,
+ wchar_t*** list_return,
+ int* count_return
);
-extern void XUnionRectWithRegion(
-#if NeedFunctionPrototypes
+extern int Xutf8TextPropertyToTextList(
+ Display* display,
+ const XTextProperty* text_prop,
+ char*** list_return,
+ int* count_return
+);
+
+extern int XUnionRectWithRegion(
XRectangle* /* rectangle */,
Region /* src_region */,
Region /* dest_region_return */
-#endif
);
extern int XUnionRegion(
-#if NeedFunctionPrototypes
Region /* sra */,
Region /* srb */,
Region /* dr_return */
-#endif
);
extern int XWMGeometry(
-#if NeedFunctionPrototypes
Display* /* display */,
int /* screen_number */,
_Xconst char* /* user_geometry */,
@@ -835,21 +825,22 @@ extern int XWMGeometry(
int* /* width_return */,
int* /* height_return */,
int* /* gravity_return */
-#endif
);
-extern void XXorRegion(
-#if NeedFunctionPrototypes
+extern int XXorRegion(
Region /* sra */,
Region /* srb */,
Region /* dr_return */
-#endif
);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
_XFUNCPROTOEND
#if defined(MAC_OSX_TK)
# undef Region
#endif
-#endif /* _XUTIL_H_ */
+#endif /* _X11_XUTIL_H_ */
diff --git a/xlib/X11/cursorfont.h b/xlib/X11/cursorfont.h
index 617274f..c69d508 100644
--- a/xlib/X11/cursorfont.h
+++ b/xlib/X11/cursorfont.h
@@ -1,4 +1,34 @@
-/* $XConsortium: cursorfont.h,v 1.2 88/09/06 16:44:27 jim Exp $ */
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef _X11_CURSORFONT_H_
+#define _X11_CURSORFONT_H_
+
#define XC_num_glyphs 154
#define XC_X_cursor 0
#define XC_arrow 2
@@ -77,3 +107,5 @@
#define XC_ur_angle 148
#define XC_watch 150
#define XC_xterm 152
+
+#endif /* _X11_CURSORFONT_H_ */