38 #include <Inventor/Xt/SoXtBasic.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 Widget init(
const char * appname,
const char * classname =
"SoXt");
85 static Widget init(
int & argc,
char ** argv,
86 const char * appname,
const char * classname =
"SoXt");
87 static void init(Widget toplevelwidget);
89 static void mainLoop(
void);
90 static void exitMainLoop(
void);
91 static void done(
void);
93 static Widget getTopLevelWidget(
void);
94 static Widget getShellWidget(
const Widget w);
96 static void show(Widget
const widget);
97 static void hide(Widget
const widget);
99 static void setWidgetSize(Widget
const widget,
const SbVec2s size);
100 static SbVec2s getWidgetSize(
const Widget widget);
102 static void createSimpleErrorDialog(Widget 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;
204 static SbPList * components;
205 static SbPList * component_callbacks;
206 #endif // __COIN_SOGTK__
214 #define SOXT_ENTER_GL_SECTION() do { SoXt::lockGL(); } while(FALSE)
215 #define SOXT_LEAVE_GL_SECTION() do { SoXt::unlockGL(); } while(FALSE)
The SoXt class takes care of Xt initialization and event dispatching.
Definition: SoXt.h:80
void FatalErrorCB(const SbString errmsg, SoXt::FatalErrors errcode, void *userdata)
Definition: SoXt.h:118
FatalErrors
Definition: SoXt.h:113
ABIType
Definition: SoXt.h:126