diff options
author | Alexander Larsson <alexl@redhat.com> | 2018-03-20 12:05:26 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2018-03-20 12:05:26 +0100 |
commit | 9a7e721181ce714ab248429dc1258984b9e10748 (patch) | |
tree | 73d69b5c298d61cc9c045bed3bc7e54dde4aa15c /gtk/gtkwindow.c | |
parent | 890080ebf7a12199d5500fbbf6a0daf06cc2d35f (diff) | |
download | gtk+-9a7e721181ce714ab248429dc1258984b9e10748.tar.gz |
GdkSurface: Rename various functions and variables
This is an automatic rename of various things related
to the window->surface rename.
Public symbols changed by this is:
GDK_MODE_WINDOW
gdk_device_get_window_at_position
gdk_device_get_window_at_position_double
gdk_device_get_last_event_window
gdk_display_get_monitor_at_window
gdk_drag_context_get_source_window
gdk_drag_context_get_dest_window
gdk_drag_context_get_drag_window
gdk_draw_context_get_window
gdk_drawing_context_get_window
gdk_gl_context_get_window
gdk_synthesize_window_state
gdk_surface_get_window_type
gdk_x11_display_set_window_scale
gsk_renderer_new_for_window
gsk_renderer_get_window
gtk_text_view_buffer_to_window_coords
gtk_tree_view_convert_widget_to_bin_window_coords
gtk_tree_view_convert_tree_to_bin_window_coords
The commands that generated this are:
git sed -f g "GDK window" "GDK surface"
git sed -f g window_impl surface_impl
(cd gdk; git sed -f g impl_window impl_surface)
git sed -f g WINDOW_IMPL SURFACE_IMPL
git sed -f g GDK_MODE_WINDOW GDK_MODE_SURFACE
git sed -f g gdk_draw_context_get_window gdk_draw_context_get_surface
git sed -f g gdk_drawing_context_get_window gdk_drawing_context_get_surface
git sed -f g gdk_gl_context_get_window gdk_gl_context_get_surface
git sed -f g gsk_renderer_get_window gsk_renderer_get_surface
git sed -f g gsk_renderer_new_for_window gsk_renderer_new_for_surface
(cd gdk; git sed -f g window_type surface_type)
git sed -f g gdk_surface_get_window_type gdk_surface_get_surface_type
git sed -f g window_at_position surface_at_position
git sed -f g event_window event_surface
git sed -f g window_coord surface_coord
git sed -f g window_state surface_state
git sed -f g window_cursor surface_cursor
git sed -f g window_scale surface_scale
git sed -f g window_events surface_events
git sed -f g monitor_at_window monitor_at_surface
git sed -f g window_under_pointer surface_under_pointer
(cd gdk; git sed -f g for_window for_surface)
git sed -f g window_anchor surface_anchor
git sed -f g WINDOW_IS_TOPLEVEL SURFACE_IS_TOPLEVEL
git sed -f g native_window native_surface
git sed -f g source_window source_surface
git sed -f g dest_window dest_surface
git sed -f g drag_window drag_surface
git sed -f g input_window input_surface
git checkout NEWS* po-properties po docs/reference/gtk/migrating-3to4.xml
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r-- | gtk/gtkwindow.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index ec5ded38f4..5c9ddeb494 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -439,7 +439,7 @@ static gint gtk_window_key_release_event (GtkWidget *widget, GdkEventKey *event); static void gtk_window_focus_in (GtkWidget *widget); static void gtk_window_focus_out (GtkWidget *widget); -static void window_state_changed (GtkWidget *widget); +static void surface_state_changed (GtkWidget *widget); static void gtk_window_remove (GtkContainer *container, GtkWidget *widget); static void gtk_window_check_resize (GtkContainer *container); @@ -525,7 +525,7 @@ static void gtk_window_set_theme_variant (GtkWindow *window); static void gtk_window_do_popup (GtkWindow *window, GdkEventButton *event); static void gtk_window_style_updated (GtkWidget *widget); -static void gtk_window_state_flags_changed (GtkWidget *widget, +static void gtk_surface_state_flags_changed (GtkWidget *widget, GtkStateFlags previous_state); static GSList *toplevel_list = NULL; @@ -813,7 +813,7 @@ gtk_window_class_init (GtkWindowClass *klass) widget_class->focus = gtk_window_focus; widget_class->move_focus = gtk_window_move_focus; widget_class->measure = gtk_window_measure; - widget_class->state_flags_changed = gtk_window_state_flags_changed; + widget_class->state_flags_changed = gtk_surface_state_flags_changed; widget_class->style_updated = gtk_window_style_updated; widget_class->snapshot = gtk_window_snapshot; widget_class->pick = gtk_window_pick; @@ -6357,7 +6357,7 @@ gtk_window_guess_default_size (GtkWindow *window, gdkwindow = _gtk_widget_get_window (widget); if (gdkwindow) - monitor = gdk_display_get_monitor_at_window (display, gdkwindow); + monitor = gdk_display_get_monitor_at_surface (display, gdkwindow); else monitor = gdk_display_get_monitor (display, 0); @@ -6866,12 +6866,12 @@ gtk_window_realize (GtkWidget *widget) } gtk_widget_set_window (widget, gdk_surface); - g_signal_connect_swapped (gdk_surface, "notify::state", G_CALLBACK (window_state_changed), widget); + g_signal_connect_swapped (gdk_surface, "notify::state", G_CALLBACK (surface_state_changed), widget); gtk_widget_register_window (widget, gdk_surface); gtk_widget_set_realized (widget, TRUE); if (priv->renderer == NULL) - priv->renderer = gsk_renderer_new_for_window (gdk_surface); + priv->renderer = gsk_renderer_new_for_surface (gdk_surface); if (priv->transient_parent && _gtk_widget_get_realized (GTK_WIDGET (priv->transient_parent))) @@ -7002,7 +7002,7 @@ gtk_window_unrealize (GtkWidget *widget) g_clear_object (&priv->renderer); g_signal_handlers_disconnect_by_func (_gtk_widget_get_window (widget), - G_CALLBACK (window_state_changed), + G_CALLBACK (surface_state_changed), widget); GTK_WIDGET_CLASS (gtk_window_parent_class)->unrealize (widget); @@ -7281,16 +7281,16 @@ update_edge_constraints (GtkWindow *window, } static void -window_state_changed (GtkWidget *widget) +surface_state_changed (GtkWidget *widget) { GtkWindow *window = GTK_WINDOW (widget); GtkWindowPrivate *priv = window->priv; - GdkSurfaceState new_window_state; + GdkSurfaceState new_surface_state; GdkSurfaceState changed_mask; - new_window_state = gdk_surface_get_state (_gtk_widget_get_window (widget)); - changed_mask = new_window_state ^ priv->state; - priv->state = new_window_state; + new_surface_state = gdk_surface_get_state (_gtk_widget_get_window (widget)); + changed_mask = new_surface_state ^ priv->state; + priv->state = new_surface_state; if (changed_mask & GDK_SURFACE_STATE_FOCUSED) ensure_state_flag_backdrop (widget); @@ -7298,17 +7298,17 @@ window_state_changed (GtkWidget *widget) if (changed_mask & GDK_SURFACE_STATE_FULLSCREEN) { priv->fullscreen = - (new_window_state & GDK_SURFACE_STATE_FULLSCREEN) ? 1 : 0; + (new_surface_state & GDK_SURFACE_STATE_FULLSCREEN) ? 1 : 0; } if (changed_mask & GDK_SURFACE_STATE_MAXIMIZED) { priv->maximized = - (new_window_state & GDK_SURFACE_STATE_MAXIMIZED) ? 1 : 0; + (new_surface_state & GDK_SURFACE_STATE_MAXIMIZED) ? 1 : 0; g_object_notify_by_pspec (G_OBJECT (widget), window_props[PROP_IS_MAXIMIZED]); } - update_edge_constraints (window, new_window_state); + update_edge_constraints (window, new_surface_state); if (changed_mask & (GDK_SURFACE_STATE_FULLSCREEN | GDK_SURFACE_STATE_MAXIMIZED | @@ -7991,7 +7991,7 @@ gtk_window_real_set_focus (GtkWindow *window, } static void -gtk_window_state_flags_changed (GtkWidget *widget, +gtk_surface_state_flags_changed (GtkWidget *widget, GtkStateFlags previous_state) { GtkWindow *window = GTK_WINDOW (widget); @@ -8543,7 +8543,7 @@ gtk_window_compute_configure_request (GtkWindow *window, g_assert (_gtk_widget_get_mapped (parent_widget)); /* established earlier */ gdk_surface = _gtk_widget_get_window (parent_widget); - monitor = gdk_display_get_monitor_at_window (priv->display, gdk_surface); + monitor = gdk_display_get_monitor_at_surface (priv->display, gdk_surface); gdk_surface_get_origin (gdk_surface, &ox, &oy); |