summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAlex Nagelkerke <alex_na@outlook.com>2018-01-23 14:18:28 +0100
committerEli Bendersky <eliben@users.noreply.github.com>2018-01-23 05:18:28 -0800
commit1894fd79f7235c4af6d1eb46768451d02ed4a867 (patch)
treebc7c7082d37a74b6f15cab8d86231e45fd3e8c96 /utils
parent216823845b2d123f7d443cf27ee057cd1943f0c1 (diff)
downloadpycparser-1894fd79f7235c4af6d1eb46768451d02ed4a867.tar.gz
Extend Xlib objects in fake includes (#233)
* Extend Xlib objects in fake includes * Move X11 typedefs and defines to X11 subdirectory. Remove unecessarry function declarations header
Diffstat (limited to 'utils')
-rw-r--r--utils/fake_libc_include/X11/Xlib.h2
-rw-r--r--utils/fake_libc_include/X11/_X11_fake_defines.h13
-rw-r--r--utils/fake_libc_include/X11/_X11_fake_typedefs.h38
-rw-r--r--utils/fake_libc_include/_fake_typedefs.h6
4 files changed, 53 insertions, 6 deletions
diff --git a/utils/fake_libc_include/X11/Xlib.h b/utils/fake_libc_include/X11/Xlib.h
index f952c1d..ab7ebb3 100644
--- a/utils/fake_libc_include/X11/Xlib.h
+++ b/utils/fake_libc_include/X11/Xlib.h
@@ -1,2 +1,4 @@
#include "_fake_defines.h"
#include "_fake_typedefs.h"
+#include "_X11_fake_defines.h"
+#include "_X11_fake_typedefs.h"
diff --git a/utils/fake_libc_include/X11/_X11_fake_defines.h b/utils/fake_libc_include/X11/_X11_fake_defines.h
new file mode 100644
index 0000000..1de6f62
--- /dev/null
+++ b/utils/fake_libc_include/X11/_X11_fake_defines.h
@@ -0,0 +1,13 @@
+#ifndef _X11_FAKE_DEFINES_H
+#define _X11_FAKE_DEFINES_H
+
+#define Atom CARD32
+#define Bool int
+#define KeySym CARD32
+#define Pixmap CARD32
+#define Time CARD32
+#define _XFUNCPROTOBEGIN
+#define _XFUNCPROTOEND
+#define _Xconst const
+
+#endif
diff --git a/utils/fake_libc_include/X11/_X11_fake_typedefs.h b/utils/fake_libc_include/X11/_X11_fake_typedefs.h
new file mode 100644
index 0000000..3901142
--- /dev/null
+++ b/utils/fake_libc_include/X11/_X11_fake_typedefs.h
@@ -0,0 +1,38 @@
+#ifndef _X11_FAKE_TYPEDEFS_H
+#define _X11_FAKE_TYPEDEFS_H
+
+typedef char* XPointer;
+typedef unsigned char KeyCode;
+typedef unsigned int CARD32;
+typedef unsigned long VisualID;
+typedef unsigned long XIMResetState;
+typedef unsigned long XID;
+typedef XID Window;
+typedef XID Colormap;
+typedef XID Cursor;
+typedef XID Drawable;
+typedef void* XtPointer;
+typedef XtPointer XtRequestId;
+typedef struct Display Display;
+typedef struct Screen Screen;
+typedef struct Status Status;
+typedef struct Visual Visual;
+typedef struct Widget *Widget;
+typedef struct XColor XColor;
+typedef struct XClassHint XClassHint;
+typedef struct XEvent XEvent;
+typedef struct XFontStruct XFontStruct;
+typedef struct XGCValues XGCValues;
+typedef struct XKeyEvent XKeyEvent;
+typedef struct XKeyPressedEvent XKeyPressedEvent;
+typedef struct XPoint XPoint;
+typedef struct XRectangle XRectangle;
+typedef struct XSelectionRequestEvent XSelectionRequestEvent;
+typedef struct XWindowChanges XWindowChanges;
+typedef struct _XGC _XCG;
+typedef struct _XGC *GC;
+typedef struct _XIC *XIC;
+typedef struct _XIM *XIM;
+typedef struct _XImage XImage;
+
+#endif
diff --git a/utils/fake_libc_include/_fake_typedefs.h b/utils/fake_libc_include/_fake_typedefs.h
index d99c3f5..7ece087 100644
--- a/utils/fake_libc_include/_fake_typedefs.h
+++ b/utils/fake_libc_include/_fake_typedefs.h
@@ -152,12 +152,6 @@ typedef _Bool bool;
typedef int va_list;
-/* Xlib objects */
-typedef struct Display Display;
-typedef unsigned long XID;
-typedef unsigned long VisualID;
-typedef XID Window;
-
/* Mir typedefs */
typedef void* MirEGLNativeWindowType;
typedef void* MirEGLNativeDisplayType;