#endif
#ifdef __WXGTK__
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
#include <wx/gtk/win_gtk.h>
+#define GetXWindow(wxwin) GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
+#endif
+
+#ifdef __WXX11__
+#include "wx/x11/privx.h"
+#define GetXWindow(wxwin) ((Window)(wxwin)->GetHandle())
#endif
#ifdef __WXMAC__
// Init the stock objects to a non-NULL value so SWIG doesn't create them as None
wxPy_ReinitStockObjects(1);
+
+ wxInitAllImageHandlers();
}
}
-// Save a reference to the dictionary of the wx.core module, and inject
+// Save a reference to the dictionary of the wx._core module, and inject
// a few more things into it.
PyObject* __wxPySetDictionary(PyObject* /* self */, PyObject* args)
{
PyDict_SetItemString(wxPython_dict, "__wxPyPtrTypeMap", wxPyPtrTypeMap);
// Create an exception object to use for wxASSERTions
- wxPyAssertionError = PyErr_NewException("wx.core.PyAssertionError",
+ wxPyAssertionError = PyErr_NewException("wx._core.PyAssertionError",
PyExc_AssertionError, NULL);
PyDict_SetItemString(wxPython_dict, "PyAssertionError", wxPyAssertionError);
return (long)win->GetHandle();
#endif
- // Find and return the actual X-Window.
-#ifdef __WXGTK__
- if (win->m_wxwindow) {
-#ifdef __WXGTK20__
- return (long) GDK_WINDOW_XWINDOW(GTK_PIZZA(win->m_wxwindow)->bin_window);
-#else
- GdkWindowPrivate* bwin = (GdkWindowPrivate*)GTK_PIZZA(win->m_wxwindow)->bin_window;
- if (bwin) {
- return (long)bwin->xwindow;
- }
-#endif
- }
+#if defined(__WXGTK__) || defined(__WXX11)
+ return (long)GetXWindow(win);
#endif
-
+
#ifdef __WXMAC__
- return (long)MAC_WXHWND(win->MacGetRootWindow());
+ //return (long)MAC_WXHWND(win->MacGetTopLevelWindowRef());
+ return (long)win->GetHandle();
#endif
return 0;