38 #include <Inventor/Win/SoWinBasic.h> 45 #if QT_VERSION >= 0x040000 46 #include <QtCore/QObject> 51 #endif // __COIN_SOQT__ 53 #include <X11/Intrinsic.h> 55 #endif // __COIN_SOXT__ 64 #endif // __COIN_SOGTK__ 67 #endif // __COIN_SOWIN__ 69 #include <Inventor/SbBasic.h> 70 #include <Inventor/SbLinear.h> 71 #include <Inventor/SbString.h> 73 #include <Inventor/errors/SoDebugError.h> 81 static HWND init(
const char * appname,
const char * classname =
"SoWin");
82 static HWND init(
int & argc,
char ** argv,
83 const char * appname,
const char * classname =
"SoWin");
84 static void init(HWND toplevelwidget);
86 static void mainLoop(
void);
87 static void exitMainLoop(
void);
88 static void done(
void);
90 static HWND getTopLevelWidget(
void);
91 static HWND getShellWidget(
const HWND w);
93 static void show(HWND
const widget);
94 static void hide(HWND
const widget);
96 static void setWidgetSize(HWND
const widget,
const SbVec2s size);
97 static SbVec2s getWidgetSize(
const HWND widget);
99 static void createSimpleErrorDialog(HWND widget,
101 const char * string1,
102 const char * string2 = NULL);
104 static void getVersionInfo(
int * major = NULL,
107 static const char * getVersionString(
void);
108 static const char * getVersionToolkitString(
void);
111 UNSPECIFIED_ERROR = 0,
120 static SbBool isDebugLibrary(
void);
121 static SbBool isCompatible(
unsigned int major,
unsigned int minor);
124 static ABIType getABIType(
void);
126 static void lockGL(
void);
127 static void unlockGL(
void);
143 #ifdef __COIN_SOWIN__ 145 static void doIdleTasks(
void);
146 #endif // __COIN_SOWIN__ 150 static void nextEvent(XtAppContext, XEvent *);
151 static Boolean dispatchEvent(XEvent * event);
152 static XtAppContext getAppContext(
void);
153 static Display * getDisplay(
void);
154 static XmString encodeString(
const char *
const str);
155 static char * decodeString(XmString xstring);
156 static void getPopupArgs(Display * display,
int screen,
157 ArgList args,
int * n);
159 static void registerColormapLoad(Widget widget, Widget shell);
160 static void addColormapToShell(Widget widget, Widget shell);
161 static void removeColormapFromShell(Widget widget, Widget shell);
163 static void addExtensionEventHandler(Widget widget,
164 int eventType, XtEventHandler proc,
165 XtPointer clientData);
166 static void removeExtensionEventHandler(Widget widget,
167 int eventType, XtEventHandler proc,
168 XtPointer clientData);
171 static void getExtensionEventHandler(XEvent * event, Widget & widget,
172 XtEventHandler & proc,
173 XtPointer & clientData);
174 #endif // __COIN_SOXT__ 176 #ifdef __COIN_SOGTK__ 178 friend class SoGtkComponent;
179 enum SoGtkComponentAction { CREATION, DESTRUCTION, CHANGE };
180 typedef void SoGtkComponentActionCallback(SoGtkComponent *, SoGtk::SoGtkComponentAction,
void *);
182 static void addComponentActionCallback(SoGtkComponentActionCallback *,
void *);
183 static void removeComponentActionCallback(SoGtkComponentActionCallback *,
void *);
185 static int getComponents(
SbPList & components);
188 static void invokeComponentActionCallbacks(SoGtkComponent * component,
189 SoGtkComponentAction action);
191 static gint componentCreation(SoGtkComponent * component);
192 static gint componentDestruction(SoGtkComponent * component);
193 static gint componentChange(SoGtkComponent * component);
196 static gint timerSensorCB(gpointer data);
197 static gint idleSensorCB(gpointer data);
198 static gint delaySensorCB(gpointer data);
200 static GtkWidget * mainWidget;
202 static SbPList * component_callbacks;
203 #endif // __COIN_SOGTK__ 211 #define SOWIN_ENTER_GL_SECTION() do { SoWin::lockGL(); } while(FALSE) 212 #define SOWIN_LEAVE_GL_SECTION() do { SoWin::unlockGL(); } while(FALSE) The SoWin class takes care of Win initialization and event dispatching.
Definition: SoWin.h:77
FatalErrors
Definition: SoWin.h:110
void FatalErrorCB(const SbString errmsg, SoWin::FatalErrors errcode, void *userdata)
Definition: SoWin.h:115
ABIType
Definition: SoWin.h:123