38 #include <Inventor/Qt/SoQtBasic.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 QWidget* init(
const char * appname,
const char * classname =
"SoQt");
82 static QWidget* init(
int & argc,
char ** argv,
83 const char * appname,
const char * classname =
"SoQt");
84 static void init(QWidget* toplevelwidget);
86 static void mainLoop(
void);
87 static void exitMainLoop(
void);
88 static void done(
void);
90 static QWidget* getTopLevelWidget(
void);
91 static QWidget* getShellWidget(
const QWidget* w);
93 static void show(QWidget*
const widget);
94 static void hide(QWidget*
const widget);
96 static void setWidgetSize(QWidget*
const widget,
const SbVec2s size);
97 static SbVec2s getWidgetSize(
const QWidget* widget);
99 static void createSimpleErrorDialog(QWidget* 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 SOQT_ENTER_GL_SECTION() do { SoQt::lockGL(); } while(FALSE) 212 #define SOQT_LEAVE_GL_SECTION() do { SoQt::unlockGL(); } while(FALSE) The SoQt class takes care of Qt initialization and event dispatching.
Definition: SoQt.h:77
ABIType
Definition: SoQt.h:123
FatalErrors
Definition: SoQt.h:110
void FatalErrorCB(const SbString errmsg, SoQt::FatalErrors errcode, void *userdata)
Definition: SoQt.h:115