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__ 69 #include <Inventor/SbBasic.h> 70 #include <Inventor/SbLinear.h> 71 #include <Inventor/SbString.h> 72 #include <Inventor/SoDB.h> 73 #include <Inventor/errors/SoDebugError.h> 81 static Widget init(
const char * appname,
const char * classname =
"SoXt");
82 static Widget init(
int & argc,
char ** argv,
83 const char * appname,
const char * classname =
"SoXt");
84 static void init(Widget toplevelwidget);
86 static void mainLoop(
void);
87 static void exitMainLoop(
void);
88 static void done(
void);
90 static Widget getTopLevelWidget(
void);
91 static Widget getShellWidget(
const Widget w);
93 static void show(Widget
const widget);
94 static void hide(Widget
const widget);
96 static void setWidgetSize(Widget
const widget,
const SbVec2s size);
97 static SbVec2s getWidgetSize(
const Widget widget);
99 static void createSimpleErrorDialog(Widget 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;
201 static SbPList * components;
202 static SbPList * component_callbacks;
203 #endif // __COIN_SOGTK__ 211 #define SOXT_ENTER_GL_SECTION() do { SoXt::lockGL(); } while(FALSE) 212 #define SOXT_LEAVE_GL_SECTION() do { SoXt::unlockGL(); } while(FALSE)
The SoXt class takes care of Xt initialization and event dispatching.
Definition: SoXt.h:77
void FatalErrorCB(const SbString errmsg, SoXt::FatalErrors errcode, void *userdata)
Definition: SoXt.h:115
FatalErrors
Definition: SoXt.h:110
ABIType
Definition: SoXt.h:123