Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoQtDef.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2024 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _SO_QT_DEF_
25#define _SO_QT_DEF_
26
27#include <Inventor/helpers/SbGlContextHelper.h>
28
29// avoid conflict with declaration made in X headers
30//#if defined (Bool)
31//#undef Bool
32//#endif
33
34#if !defined(Widget)
35
36#if defined(SoWidget)
37# undef SoWidget
38#endif
39
40#define SoWidget QWidget*
41
42// Defined for compatibility purpose
43// We disbale this when internally compiling OivSuite
44#ifndef LIBRARYBUILD
45# define Widget QWidget*
46#endif
47
48#endif
49
50
51//
52// WIN32
53//
54#ifdef _WIN32
55
56// Redefine X data types in _WIN32 terms
57#define XColor UINT
58#define Boolean BOOLEAN
59#define Colormap UINT
61#define XVisualInfo PIXELFORMATDESCRIPTOR
62#define WindowQt HWND
63#define GLXContext HGLRC
64#define Hdc HDC
65
66// Event types
67#define XEvent MSG
68
69// Redefine Xt and Motif data types in _WIN32 terms
70#define XtPointer PVOID
71#define XtEventHandler FARPROC
72#define XtAppContext UINT
73
74#include "tchar.h"
75
76// XVisualInfo corresponds to PIXELFORMATDESCRIPTOR rather than
77// "pixel format" because under Windows, pixel formats are per
78// drawable rather than per display (like visuals under X). In
79// other words, under Windows we can't get the description of a
80// pixel format unless we have a valid device context and that
81// is often inconvenient.
82//
83// Note that PIXELFORMATDESCRIPTOR also takes the place of GLX's
84// "attribList" (which it is conceptually closer to).
85
86#define XVisualInfo PIXELFORMATDESCRIPTOR
87
88//
89// APPLE
90//
91#elif defined __APPLE__
92
93#ifndef BOOLEAN_TYPE_EXISTS
94typedef unsigned char Boolean;
95#define BOOLEAN_TYPE_EXISTS
96#endif
97
98#undef Display
100typedef int Display;
101#define XColor UINT
103typedef WId WindowQt;
105typedef WId Window;
106
107// Event types
108#define XEvent void*
109
110// Redefine Xt and Motif data types in _WIN32 terms
111#define XtPointer void*
112#define XtEventHandler void*
113#define XtAppContext void*
114
115//
116// UNIX
117//
118#else
119
120#define WindowQt Window
122typedef void* XtPointer;
124typedef char Boolean;
126typedef union _XEvent XEvent;
128typedef void (*XtEventHandler) (struct _WidgetRec*, void*, XEvent*, Boolean*);
130typedef struct _XtAppStruct* XtAppContext;
131
132// we use XColorPointer typedef to avoid X header dependency in public API headers
133// XColorPointer is equivalent to XColor*
135typedef void* XColorPointer;
136
137#endif
138
139#endif //_SO_QT_DEF_
140
141
union _XEvent XEvent
Definition SoQtDef.h:126
char Boolean
Definition SoQtDef.h:124
void * XColorPointer
Definition SoQtDef.h:135
struct _XtAppStruct * XtAppContext
Definition SoQtDef.h:130
void * XtPointer
Definition SoQtDef.h:122
void(* XtEventHandler)(struct _WidgetRec *, void *, XEvent *, Boolean *)
Definition SoQtDef.h:128