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);
148 static void doIdleTasks(
void);
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);
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;