use proper signature for callback function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -133,7 +133,8 @@ int wxGUIEventLoop::DispatchTimeout(unsigned long timeout)
|
|||||||
// YieldFor
|
// 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.
|
// categorize the GDK event according to wxEventCategory.
|
||||||
// See http://library.gnome.org/devel/gdk/unstable/gdk-Events.html#GdkEventType
|
// 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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxGUIEventLoop* evtloop = static_cast<wxGUIEventLoop*>(data);
|
||||||
|
|
||||||
// is this event allowed now?
|
// is this event allowed now?
|
||||||
if (evtloop->IsEventAllowedInsideYield(cat))
|
if (evtloop->IsEventAllowedInsideYield(cat))
|
||||||
gtk_main_do_event(event); // process it now
|
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));
|
evtloop->StoreGdkEventForLaterProcessing(gdk_event_copy(event));
|
||||||
// process it later (but make a copy; the caller will free the event pointer)
|
// process it later (but make a copy; the caller will free the event pointer)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool wxGUIEventLoop::YieldFor(long eventsToProcess)
|
bool wxGUIEventLoop::YieldFor(long eventsToProcess)
|
||||||
{
|
{
|
||||||
@@ -245,7 +249,7 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
|
|||||||
// and then call gtk_main_do_event()!
|
// and then call gtk_main_do_event()!
|
||||||
// In particular in this way we also process input from sources like
|
// In particular in this way we also process input from sources like
|
||||||
// GIOChannels (this is needed for e.g. wxGUIAppTraits::WaitForChild).
|
// 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
|
while (Pending()) // avoid false positives from our idle source
|
||||||
gtk_main_iteration();
|
gtk_main_iteration();
|
||||||
gdk_event_handler_set ((GdkEventFunc)gtk_main_do_event, NULL, NULL);
|
gdk_event_handler_set ((GdkEventFunc)gtk_main_do_event, NULL, NULL);
|
||||||
|
Reference in New Issue
Block a user