]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/helpers.cpp
the #ifdef around BROWSEINFO.lpszTitle assignment is bogus; should be c_str() everywhere
[wxWidgets.git] / wxPython / src / helpers.cpp
index dc4666b41da73063ecf6dd9fc419d3ba1d6bc95e..3ae90233116cf6c83bc779e37c9ed96a9f8d6289 100644 (file)
@@ -28,7 +28,9 @@
 #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
 
@@ -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