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__ 70 #endif // __COIN_SOWX__ 72 #include <Inventor/SbBasic.h> 73 #include <Inventor/SbLinear.h> 74 #include <Inventor/SbString.h> 75 #include <Inventor/SoDB.h> 76 #include <Inventor/errors/SoDebugError.h> 84 static HWND init(
const char * appname,
const char * classname =
"SoWin");
85 static HWND init(
int & argc,
char ** argv,
86 const char * appname,
const char * classname =
"SoWin");
87 static void init(HWND toplevelwidget);
89 static void mainLoop(
void);
90 static void exitMainLoop(
void);
91 static void done(
void);
93 static HWND getTopLevelWidget(
void);
94 static HWND getShellWidget(
const HWND w);
96 static void show(HWND
const widget);
97 static void hide(HWND
const widget);
99 static void setWidgetSize(HWND
const widget,
const SbVec2s size);
100 static SbVec2s getWidgetSize(
const HWND widget);
102 static void createSimpleErrorDialog(HWND widget,
104 const char * string1,
105 const char * string2 = NULL);
107 static void getVersionInfo(
int * major = NULL,
110 static const char * getVersionString(
void);
111 static const char * getVersionToolkitString(
void);
114 UNSPECIFIED_ERROR = 0,
123 static SbBool isDebugLibrary(
void);
124 static SbBool isCompatible(
unsigned int major,
unsigned int minor);
127 static ABIType getABIType(
void);
129 static void lockGL(
void);
130 static void unlockGL(
void);
146 #ifdef __COIN_SOWIN__ 148 static void doIdleTasks(
void);
149 #endif // __COIN_SOWIN__ 153 static void nextEvent(XtAppContext, XEvent *);
154 static Boolean dispatchEvent(XEvent * event);
155 static XtAppContext getAppContext(
void);
156 static Display * getDisplay(
void);
157 static XmString encodeString(
const char *
const str);
158 static char * decodeString(XmString xstring);
159 static void getPopupArgs(Display * display,
int screen,
160 ArgList args,
int * n);
162 static void registerColormapLoad(Widget widget, Widget shell);
163 static void addColormapToShell(Widget widget, Widget shell);
164 static void removeColormapFromShell(Widget widget, Widget shell);
166 static void addExtensionEventHandler(Widget widget,
167 int eventType, XtEventHandler proc,
168 XtPointer clientData);
169 static void removeExtensionEventHandler(Widget widget,
170 int eventType, XtEventHandler proc,
171 XtPointer clientData);
174 static void getExtensionEventHandler(XEvent * event, Widget & widget,
175 XtEventHandler & proc,
176 XtPointer & clientData);
177 #endif // __COIN_SOXT__ 179 #ifdef __COIN_SOGTK__ 181 friend class SoGtkComponent;
182 enum SoGtkComponentAction { CREATION, DESTRUCTION, CHANGE };
183 typedef void SoGtkComponentActionCallback(SoGtkComponent *, SoGtk::SoGtkComponentAction,
void *);
185 static void addComponentActionCallback(SoGtkComponentActionCallback *,
void *);
186 static void removeComponentActionCallback(SoGtkComponentActionCallback *,
void *);
188 static int getComponents(
SbPList & components);
191 static void invokeComponentActionCallbacks(SoGtkComponent * component,
192 SoGtkComponentAction action);
194 static gint componentCreation(SoGtkComponent * component);
195 static gint componentDestruction(SoGtkComponent * component);
196 static gint componentChange(SoGtkComponent * component);
199 static gint timerSensorCB(gpointer data);
200 static gint idleSensorCB(gpointer data);
201 static gint delaySensorCB(gpointer data);
203 static GtkWidget * mainWidget;
205 static SbPList * component_callbacks;
206 #endif // __COIN_SOGTK__ 214 #define SOWIN_ENTER_GL_SECTION() do { SoWin::lockGL(); } while(FALSE) 215 #define SOWIN_LEAVE_GL_SECTION() do { SoWin::unlockGL(); } while(FALSE) The SoWin class takes care of Win initialization and event dispatching.
Definition: SoWin.h:80
FatalErrors
Definition: SoWin.h:113
void FatalErrorCB(const SbString errmsg, SoWin::FatalErrors errcode, void *userdata)
Definition: SoWin.h:118
ABIType
Definition: SoWin.h:126