// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "app.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
END_EVENT_TABLE()
#ifdef __WXDEBUG__
+extern "C"
+{
typedef int (*XErrorHandlerFunc)(Display *, XErrorEvent *);
+}
- XErrorHandlerFunc gs_pfnXErrorHandler = 0;
+XErrorHandlerFunc gs_pfnXErrorHandler = 0;
- static int wxXErrorHandler(Display *dpy, XErrorEvent *xevent)
- {
- // just forward to the default handler for now
- return gs_pfnXErrorHandler(dpy, xevent);
- }
+extern "C"
+{
+
+static int wxXErrorHandler(Display *dpy, XErrorEvent *xevent)
+{
+ // just forward to the default handler for now
+ return gs_pfnXErrorHandler(dpy, xevent);
+}
+
+}
#endif // __WXDEBUG__
-bool wxApp::Initialize(int& argc, wxChar **argv)
+bool wxApp::Initialize(int& argcOrig, wxChar **argvOrig)
{
- if ( !wxAppBase::Initialize(argc, argv) )
+ if ( !wxAppBase::Initialize(argcOrig, argvOrig) )
return false;
wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
}
static char *fallbackResources[] = {
- "*menuBar.marginHeight: 0",
- "*menuBar.shadowThickness: 1",
- "*background: #c0c0c0",
- "*foreground: black",
+ // better defaults for CDE under Irix
+ //
+ // TODO: do something similar for the other systems, the hardcoded defaults
+ // below are ugly
+#ifdef __SGI__
+ wxMOTIF_STR("*sgiMode: True"),
+ wxMOTIF_STR("*useSchemes: all"),
+#else // !__SGI__
+ wxMOTIF_STR("*menuBar.marginHeight: 0"),
+ wxMOTIF_STR("*menuBar.shadowThickness: 1"),
+ wxMOTIF_STR("*background: #c0c0c0"),
+ wxMOTIF_STR("*foreground: black"),
+#endif // __SGI__/!__SGI__
NULL
};
// Add general resize proc
XtActionsRec rec;
- rec.string = "resize";
+ rec.string = wxMOTIF_STR("resize");
rec.proc = (XtActionProc)wxWidgetResizeProc;
XtAppAddActions((XtAppContext) wxTheApp->m_appContext, &rec, 1);