Make the gdk/win32 event debug printing function non-static

Make print_event() extern and rename it to _gdk_win32_print_event() so
it can be used from all gdk/win32 source files.
This commit is contained in:
Tor Lillqvist 2009-11-15 03:45:15 +02:00 committed by Tristan Van Berkom
parent e70ef71c3a
commit 750fa5398e
2 changed files with 11 additions and 8 deletions

View File

@ -259,7 +259,7 @@ inner_window_procedure (HWND hwnd,
else else
{ {
/* Otherwise call DefWindowProcW(). */ /* Otherwise call DefWindowProcW(). */
GDK_NOTE (EVENTLOOP, g_print (" DefWindowProcW")); GDK_NOTE (EVENTS, g_print (" DefWindowProcW"));
return DefWindowProcW (hwnd, message, wparam, lparam); return DefWindowProcW (hwnd, message, wparam, lparam);
} }
} }
@ -774,8 +774,8 @@ print_event_state (guint state)
#undef CASE #undef CASE
} }
static void void
print_event (const GdkEvent *event) _gdk_win32_print_event (const GdkEvent *event)
{ {
gchar *escaped, *kvname; gchar *escaped, *kvname;
gchar *selection_name, *target_name, *property_name; gchar *selection_name, *target_name, *property_name;
@ -991,11 +991,12 @@ append_event (GdkEvent *event)
fixup_event (event); fixup_event (event);
#if 1 #if 1
link = _gdk_event_queue_append (_gdk_display, event); link = _gdk_event_queue_append (_gdk_display, event);
GDK_NOTE (EVENTS, _gdk_win32_print_event (event));
/* event morphing, the passed in may not be valid afterwards */ /* event morphing, the passed in may not be valid afterwards */
_gdk_windowing_got_event (_gdk_display, link, event, 0); _gdk_windowing_got_event (_gdk_display, link, event, 0);
#else #else
_gdk_event_queue_append (_gdk_display, event); _gdk_event_queue_append (_gdk_display, event);
GDK_NOTE (EVENTS, print_event (event)); GDK_NOTE (EVENTS, _gdk_win32_print_event (event));
#endif #endif
} }
@ -1108,7 +1109,7 @@ apply_event_filters (GdkWindow *window,
{ {
((GdkEventPrivate *)event)->flags &= ~GDK_EVENT_PENDING; ((GdkEventPrivate *)event)->flags &= ~GDK_EVENT_PENDING;
fixup_event (event); fixup_event (event);
GDK_NOTE (EVENTS, print_event (event)); GDK_NOTE (EVENTS, _gdk_win32_print_event (event));
} }
return result; return result;
} }
@ -1981,7 +1982,7 @@ gdk_event_translate (MSG *msg,
case GDK_FILTER_TRANSLATE: case GDK_FILTER_TRANSLATE:
((GdkEventPrivate *)event)->flags &= ~GDK_EVENT_PENDING; ((GdkEventPrivate *)event)->flags &= ~GDK_EVENT_PENDING;
GDK_NOTE (EVENTS, print_event (event)); GDK_NOTE (EVENTS, _gdk_win32_print_event (event));
return_val = TRUE; return_val = TRUE;
goto done; goto done;
@ -1995,7 +1996,7 @@ gdk_event_translate (MSG *msg,
event->client.data.l[0] = msg->lParam; event->client.data.l[0] = msg->lParam;
for (i = 1; i < 5; i++) for (i = 1; i < 5; i++)
event->client.data.l[i] = 0; event->client.data.l[i] = 0;
GDK_NOTE (EVENTS, print_event (event)); GDK_NOTE (EVENTS, _gdk_win32_print_event (event));
return_val = TRUE; return_val = TRUE;
goto done; goto done;
} }
@ -3156,7 +3157,7 @@ gdk_event_translate (MSG *msg,
fixup_event (event); fixup_event (event);
GDK_NOTE (EVENTS, g_print (" (calling gdk_event_func)")); GDK_NOTE (EVENTS, g_print (" (calling gdk_event_func)"));
GDK_NOTE (EVENTS, print_event (event)); GDK_NOTE (EVENTS, _gdk_win32_print_event (event));
(*_gdk_event_func) (event, _gdk_event_data); (*_gdk_event_func) (event, _gdk_event_data);
gdk_event_free (event); gdk_event_free (event);

View File

@ -345,6 +345,8 @@ gchar *_gdk_win32_rect_to_string (const RECT *rect);
gchar *_gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect); gchar *_gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect);
gchar *_gdk_win32_gdkregion_to_string (const GdkRegion *box); gchar *_gdk_win32_gdkregion_to_string (const GdkRegion *box);
void _gdk_win32_print_event (const GdkEvent *event);
#endif #endif
gchar *_gdk_win32_last_error_string (void); gchar *_gdk_win32_last_error_string (void);