X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4519a2d9113d2ea6c17d3cee54a6e0ed354521f8..f07962f933088c85ae0776cd2e4aec4579d31ffa:/wxPython/src/helpers.cpp diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index dc4666b41d..3ae9023311 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -28,7 +28,9 @@ #include #include #include -#define GetXWindow(wxwin) GDK_WINDOW_XWINDOW((wxwin)->m_widget->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 #endif @@ -1385,8 +1387,8 @@ PyObject* wxPyCBInputStream::getMethod(PyObject* py, char* name) { size_t wxPyCBInputStream::GetSize() const { wxPyCBInputStream* self = (wxPyCBInputStream*)this; // cast off const if (m_seek && m_tell) { - off_t temp = self->OnSysTell(); - off_t ret = self->OnSysSeek(0, wxFromEnd); + wxFileOffset temp = self->OnSysTell(); + wxFileOffset ret = self->OnSysSeek(0, wxFromEnd); self->OnSysSeek(temp, wxFromStart); return ret; } @@ -1426,10 +1428,10 @@ size_t wxPyCBInputStream::OnSysWrite(const void *buffer, size_t bufsize) { return 0; } -off_t wxPyCBInputStream::OnSysSeek(off_t off, wxSeekMode mode) { +wxFileOffset wxPyCBInputStream::OnSysSeek(wxFileOffset off, wxSeekMode mode) { bool blocked = wxPyBeginBlockThreads(); -#ifdef _LARGE_FILES - // off_t is a 64-bit value... +#if defined( __WINCE__) || defined(_LARGE_FILES) || wxHAS_HUGE_FILES + // wxFileOffset is a 64-bit value... PyObject* arglist = Py_BuildValue("(Li)", off, mode); #else PyObject* arglist = Py_BuildValue("(ii)", off, mode); @@ -1442,14 +1444,14 @@ off_t wxPyCBInputStream::OnSysSeek(off_t off, wxSeekMode mode) { } -off_t wxPyCBInputStream::OnSysTell() const { +wxFileOffset wxPyCBInputStream::OnSysTell() const { bool blocked = wxPyBeginBlockThreads(); PyObject* arglist = Py_BuildValue("()"); PyObject* result = PyEval_CallObject(m_tell, arglist); Py_DECREF(arglist); - off_t o = 0; + wxFileOffset o = 0; if (result != NULL) { -#ifdef _LARGE_FILES +#if defined( __WINCE__) || defined(_LARGE_FILES) || wxHAS_HUGE_FILES if (PyLong_Check(result)) o = PyLong_AsLongLong(result); else