#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
#include <wx/gtk/win_gtk.h>
-#define GetXWindow(wxwin) GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window)
+#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
+ GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
+ GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
#include <locale.h>
#endif
wxFileOffset wxPyCBInputStream::OnSysSeek(wxFileOffset off, wxSeekMode mode) {
bool blocked = wxPyBeginBlockThreads();
-#if defined( __WINCE__) || defined(_LARGE_FILES) || defined(__HUGEFILES_SUPPORTED)
+#if defined( __WINCE__) || defined(_LARGE_FILES) || wxHAS_HUGE_FILES
// wxFileOffset is a 64-bit value...
PyObject* arglist = Py_BuildValue("(Li)", off, mode);
#else
Py_DECREF(arglist);
wxFileOffset o = 0;
if (result != NULL) {
-#if defined( __WINCE__) || defined(_LARGE_FILES) || defined(__HUGEFILES_SUPPORTED)
+#if defined( __WINCE__) || defined(_LARGE_FILES) || wxHAS_HUGE_FILES
if (PyLong_Check(result))
o = PyLong_AsLongLong(result);
else