Browse Source

Fix X11 compile and interrogate issues

rdb 10 years ago
parent
commit
a745184f25
1 changed files with 17 additions and 9 deletions
  1. 17 9
      panda/src/display/get_x11.h

+ 17 - 9
panda/src/display/get_x11.h

@@ -17,7 +17,7 @@
 
 
 #include "pandabase.h"
 #include "pandabase.h"
 
 
-#ifdef HAVE_X11 
+#ifdef HAVE_X11
 // This header file is designed to help work around some of the
 // This header file is designed to help work around some of the
 // namespace spamming that X11 causes, by renaming the symbols that
 // namespace spamming that X11 causes, by renaming the symbols that
 // X11 declares that are known to conflict with other library names
 // X11 declares that are known to conflict with other library names
@@ -30,14 +30,21 @@
 #ifdef CPPPARSER
 #ifdef CPPPARSER
 // A simple hack so interrogate can get all of the necessary
 // A simple hack so interrogate can get all of the necessary
 // typenames.
 // typenames.
-typedef int X11_Display;
-typedef int X11_Window;
-typedef int X11_Cursor;
-typedef int XErrorEvent;
-typedef int XVisualInfo;
-typedef int Atom;
-typedef int XIM;
-typedef int XIC;
+typedef struct _XDisplay X11_Display;
+typedef unsigned int XID;
+typedef unsigned int Atom;
+typedef unsigned int Cardinal;
+typedef XID Colormap;
+typedef XID X11_Window;
+typedef XID X11_Cursor;
+typedef struct _XIM *XIM;
+typedef struct _XIC *XIC;
+struct XErrorEvent;
+struct XVisualInfo;
+#define Bool int
+#define Status int
+#define True 1
+#define False 0
 #else
 #else
 
 
 #include "pre_x11_include.h"
 #include "pre_x11_include.h"
@@ -45,6 +52,7 @@ typedef int XIC;
 #include <X11/Xutil.h>
 #include <X11/Xutil.h>
 #include <X11/keysym.h>
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
 #include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
 
 
 #ifdef HAVE_XRANDR
 #ifdef HAVE_XRANDR
 #include <X11/extensions/Xrandr.h>
 #include <X11/extensions/Xrandr.h>