#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
#include <wx/gtk/win_gtk.h>
-#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 <locale.h>
#endif
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;
}
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);
}
-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