]> git.saurik.com Git - wxWidgets.git/commitdiff
use proper signature for callback function
authorPaul Cornett <paulcor@bullseye.com>
Wed, 30 Sep 2009 15:39:21 +0000 (15:39 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Wed, 30 Sep 2009 15:39:21 +0000 (15:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/evtloop.cpp

index e05af19f5d0f8b45db00d19e1e42af57eb60f2b6..386e6e24f4900e2b0cc46d549c72e11fa343ce80 100644 (file)
@@ -133,7 +133,8 @@ int wxGUIEventLoop::DispatchTimeout(unsigned long timeout)
 // YieldFor
 //-----------------------------------------------------------------------------
 
-static void wxgtk_main_do_event(GdkEvent *event, wxGUIEventLoop* evtloop)
+extern "C" {
+static void wxgtk_main_do_event(GdkEvent* event, void* data)
 {
     // categorize the GDK event according to wxEventCategory.
     // See http://library.gnome.org/devel/gdk/unstable/gdk-Events.html#GdkEventType
@@ -210,6 +211,8 @@ static void wxgtk_main_do_event(GdkEvent *event, wxGUIEventLoop* evtloop)
         break;
     }
 
+    wxGUIEventLoop* evtloop = static_cast<wxGUIEventLoop*>(data);
+
     // is this event allowed now?
     if (evtloop->IsEventAllowedInsideYield(cat))
         gtk_main_do_event(event);         // process it now
@@ -217,6 +220,7 @@ static void wxgtk_main_do_event(GdkEvent *event, wxGUIEventLoop* evtloop)
         evtloop->StoreGdkEventForLaterProcessing(gdk_event_copy(event));
             // process it later (but make a copy; the caller will free the event pointer)
 }
+}
 
 bool wxGUIEventLoop::YieldFor(long eventsToProcess)
 {
@@ -245,7 +249,7 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
     //       and then call gtk_main_do_event()!
     //       In particular in this way we also process input from sources like
     //       GIOChannels (this is needed for e.g. wxGUIAppTraits::WaitForChild).
-    gdk_event_handler_set ((GdkEventFunc)wxgtk_main_do_event, this, NULL);
+    gdk_event_handler_set(wxgtk_main_do_event, this, NULL);
     while (Pending())   // avoid false positives from our idle source
         gtk_main_iteration();
     gdk_event_handler_set ((GdkEventFunc)gtk_main_do_event, NULL, NULL);