00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2019 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 #ifndef _SO_QT_DEF_ 00025 #define _SO_QT_DEF_ 00026 00027 #include <Inventor/helpers/SbGlContextHelper.h> 00028 00029 // avoid conflict with declaration made in X headers 00030 //#if defined (Bool) 00031 //#undef Bool 00032 //#endif 00033 00034 #if !defined(Widget) 00035 00036 #if defined(SoWidget) 00037 # undef SoWidget 00038 #endif 00039 00040 #define SoWidget QWidget* 00041 00042 // Defined for compatibility purpose 00043 // We disbale this when internally compiling OivSuite 00044 #ifndef LIBRARYBUILD 00045 # define Widget QWidget* 00046 #endif 00047 00048 #endif 00049 00050 00051 // 00052 // WIN32 00053 // 00054 #ifdef _WIN32 00055 00056 // Redefine X data types in _WIN32 terms 00057 #define XColor UINT 00058 #define Boolean BOOLEAN 00059 #define Colormap UINT 00060 typedef SbGlContextHelper::Display Display; 00061 #define XVisualInfo PIXELFORMATDESCRIPTOR 00062 #define WindowQt HWND 00063 #define GLXContext HGLRC 00064 #define Hdc HDC 00065 00066 // Event types 00067 #define XEvent MSG 00068 00069 // Redefine Xt and Motif data types in _WIN32 terms 00070 #define XtPointer PVOID 00071 #define XtEventHandler FARPROC 00072 #define XtAppContext UINT 00073 00074 #include "tchar.h" 00075 00076 // XVisualInfo corresponds to PIXELFORMATDESCRIPTOR rather than 00077 // "pixel format" because under Windows, pixel formats are per 00078 // drawable rather than per display (like visuals under X). In 00079 // other words, under Windows we can't get the description of a 00080 // pixel format unless we have a valid device context and that 00081 // is often inconvenient. 00082 // 00083 // Note that PIXELFORMATDESCRIPTOR also takes the place of GLX's 00084 // "attribList" (which it is conceptually closer to). 00085 00086 #define XVisualInfo PIXELFORMATDESCRIPTOR 00087 00088 // 00089 // APPLE 00090 // 00091 #elif defined __APPLE__ 00092 00093 #ifndef BOOLEAN_TYPE_EXISTS 00094 typedef unsigned char Boolean; 00095 #define BOOLEAN_TYPE_EXISTS 00096 #endif 00097 00098 #undef Display 00099 typedef int Display; 00100 #define XColor UINT 00101 typedef WId WindowQt; 00102 typedef WId Window; 00103 00104 // Event types 00105 #define XEvent void* 00106 00107 // Redefine Xt and Motif data types in _WIN32 terms 00108 #define XtPointer void* 00109 #define XtEventHandler void* 00110 #define XtAppContext void* 00111 00112 // 00113 // UNIX 00114 // 00115 #else 00116 00117 #define WindowQt Window 00118 typedef void* XtPointer; 00119 typedef char Boolean; 00120 typedef union _XEvent XEvent; 00121 typedef void (*XtEventHandler) (struct _WidgetRec*, void*, XEvent*, Boolean*); 00122 typedef struct _XtAppStruct* XtAppContext; 00123 00124 // we use XColorPointer typedef to avoid X header dependency in puvlic API headers 00125 // XColorPointer is equivalent to XColor* 00126 typedef void* XColorPointer; 00127 00128 #endif 00129 00130 #endif //_SO_QT_DEF_ 00131 00132 00133