forked from AuroraMiddleware/gtk
gdk: Rename gdk_event_set_user_data
Lets call it what it is, the target. All of this is private api anyway. Update all callers.
This commit is contained in:
parent
8d5f1ae662
commit
c73972f7df
@ -20,8 +20,6 @@ void gdk_surface_thaw_toplevel_updates (GdkSurface *surface);
|
||||
|
||||
gboolean gdk_surface_supports_edge_constraints (GdkSurface *surface);
|
||||
|
||||
GObject * gdk_event_get_user_data (const GdkEvent *event);
|
||||
|
||||
guint32 gdk_display_get_last_seen_time (GdkDisplay *display);
|
||||
|
||||
void gdk_display_set_double_click_time (GdkDisplay *display,
|
||||
|
@ -564,8 +564,8 @@ gdk_event_copy (const GdkEvent *event)
|
||||
g_object_ref (new_event->any.device);
|
||||
if (new_event->any.source_device)
|
||||
g_object_ref (new_event->any.source_device);
|
||||
if (new_event->any.user_data)
|
||||
g_object_ref (new_event->any.user_data);
|
||||
if (new_event->any.target)
|
||||
g_object_ref (new_event->any.target);
|
||||
|
||||
switch ((guint) event->any.type)
|
||||
{
|
||||
@ -675,7 +675,7 @@ gdk_event_finalize (GObject *object)
|
||||
|
||||
g_clear_object (&event->any.device);
|
||||
g_clear_object (&event->any.source_device);
|
||||
g_clear_object (&event->any.user_data);
|
||||
g_clear_object (&event->any.target);
|
||||
|
||||
G_OBJECT_CLASS (gdk_event_parent_class)->finalize (object);
|
||||
}
|
||||
@ -1904,16 +1904,16 @@ gdk_event_get_scancode (GdkEvent *event)
|
||||
}
|
||||
|
||||
void
|
||||
gdk_event_set_user_data (GdkEvent *event,
|
||||
GObject *user_data)
|
||||
gdk_event_set_target (GdkEvent *event,
|
||||
GObject *target)
|
||||
{
|
||||
g_set_object (&event->any.user_data, user_data);
|
||||
g_set_object (&event->any.target, target);
|
||||
}
|
||||
|
||||
GObject *
|
||||
gdk_event_get_user_data (const GdkEvent *event)
|
||||
gdk_event_get_target (const GdkEvent *event)
|
||||
{
|
||||
return event->any.user_data;
|
||||
return event->any.target;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ struct _GdkEventAny
|
||||
GdkDevice *device;
|
||||
GdkDevice *source_device;
|
||||
GdkDisplay *display;
|
||||
GObject *user_data;
|
||||
GObject *target;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -636,8 +636,9 @@ union _GdkEvent
|
||||
GdkEventPadGroupMode pad_group_mode;
|
||||
};
|
||||
|
||||
void gdk_event_set_user_data (GdkEvent *event,
|
||||
GObject *user_data);
|
||||
void gdk_event_set_target (GdkEvent *event,
|
||||
GObject *user_data);
|
||||
GObject * gdk_event_get_target (const GdkEvent *event);
|
||||
|
||||
|
||||
#endif /* __GDK_EVENTS_PRIVATE_H__ */
|
||||
|
@ -1416,7 +1416,7 @@ synth_crossing (GtkWidget *widget,
|
||||
gdouble x, y;
|
||||
|
||||
event = gdk_event_new (enter ? GDK_ENTER_NOTIFY : GDK_LEAVE_NOTIFY);
|
||||
gdk_event_set_user_data (event, G_OBJECT (widget));
|
||||
gdk_event_set_target (event, G_OBJECT (widget));
|
||||
gdk_event_set_device (event, gdk_event_get_device (source));
|
||||
gdk_event_set_source_device (event, gdk_event_get_source_device (source));
|
||||
|
||||
@ -1779,7 +1779,7 @@ gtk_main_do_event (GdkEvent *event)
|
||||
if (!target_widget)
|
||||
goto cleanup;
|
||||
|
||||
gdk_event_set_user_data (event, G_OBJECT (target_widget));
|
||||
gdk_event_set_target (event, G_OBJECT (target_widget));
|
||||
|
||||
window_group = gtk_main_get_window_group (target_widget);
|
||||
device = gdk_event_get_device (event);
|
||||
@ -2398,7 +2398,7 @@ gtk_get_event_widget (const GdkEvent *event)
|
||||
GtkWidget *
|
||||
gtk_get_event_target (const GdkEvent *event)
|
||||
{
|
||||
return GTK_WIDGET (gdk_event_get_user_data (event));
|
||||
return GTK_WIDGET (gdk_event_get_target (event));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user