diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2020-12-04 11:18:09 +0100 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2020-12-07 20:37:29 +0100 |
commit | 40a9baa2dbe8344d58ed5c263a062b78dad7d6c5 (patch) | |
tree | 350a6c680ffe593775394c4df29a07d0995f4b1e | |
parent | 4b2aae99506aec04b8177c205e4c519e5b8be87c (diff) | |
download | gtk+-40a9baa2dbe8344d58ed5c263a062b78dad7d6c5.tar.gz |
gtk/native: Remove gtk_native_check_resize()
This is now handle by the corresponding implemenatations using per
non-gobject-type API.
-rw-r--r-- | docs/reference/gtk/gtk4-sections.txt | 1 | ||||
-rw-r--r-- | gtk/gtkdragicon.c | 6 | ||||
-rw-r--r-- | gtk/gtklayoutmanager.c | 3 | ||||
-rw-r--r-- | gtk/gtknative.c | 23 | ||||
-rw-r--r-- | gtk/gtknative.h | 3 | ||||
-rw-r--r-- | gtk/gtknativeprivate.h | 2 | ||||
-rw-r--r-- | gtk/gtkpopover.c | 6 | ||||
-rw-r--r-- | gtk/gtktexthandle.c | 6 | ||||
-rw-r--r-- | gtk/gtktooltipwindow.c | 8 | ||||
-rw-r--r-- | gtk/gtkwindow.c | 6 |
10 files changed, 3 insertions, 61 deletions
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 8fea2b3c53..909bd1df92 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -6970,7 +6970,6 @@ GtkNative gtk_native_get_for_surface gtk_native_get_surface gtk_native_get_renderer -gtk_native_check_resize gtk_native_get_surface_transform <SUBSECTION Private> diff --git a/gtk/gtkdragicon.c b/gtk/gtkdragicon.c index 79a8875d1c..6f31fd19cc 100644 --- a/gtk/gtkdragicon.c +++ b/gtk/gtkdragicon.c @@ -147,11 +147,6 @@ gtk_drag_icon_move_resize (GtkDragIcon *icon) } static void -gtk_drag_icon_native_check_resize (GtkNative *native) -{ -} - -static void gtk_drag_icon_present (GtkDragIcon *icon) { GtkWidget *widget = GTK_WIDGET (icon); @@ -176,7 +171,6 @@ gtk_drag_icon_native_init (GtkNativeInterface *iface) iface->get_surface = gtk_drag_icon_native_get_surface; iface->get_renderer = gtk_drag_icon_native_get_renderer; iface->get_surface_transform = gtk_drag_icon_native_get_surface_transform; - iface->check_resize = gtk_drag_icon_native_check_resize; iface->layout = gtk_drag_icon_native_layout; } diff --git a/gtk/gtklayoutmanager.c b/gtk/gtklayoutmanager.c index 5ba6d17021..31ce041959 100644 --- a/gtk/gtklayoutmanager.c +++ b/gtk/gtklayoutmanager.c @@ -373,7 +373,8 @@ allocate_native_children (GtkWidget *widget) else if (GTK_IS_TOOLTIP_WINDOW (child)) gtk_tooltip_window_present (GTK_TOOLTIP_WINDOW (child)); else if (GTK_IS_NATIVE (child)) - gtk_native_check_resize (GTK_NATIVE (child)); + g_warning ("Unable to present a to the layout manager unknown auxiliary child surface widget type %s", + G_OBJECT_TYPE_NAME (child)); } } diff --git a/gtk/gtknative.c b/gtk/gtknative.c index 45ad317cbf..00dfd35820 100644 --- a/gtk/gtknative.c +++ b/gtk/gtknative.c @@ -64,11 +64,6 @@ gtk_native_default_get_surface_transform (GtkNative *self, } static void -gtk_native_default_check_resize (GtkNative *self) -{ -} - -static void gtk_native_default_layout (GtkNative *self, int width, int height) @@ -80,7 +75,6 @@ gtk_native_default_init (GtkNativeInterface *iface) { iface->get_renderer = gtk_native_default_get_renderer; iface->get_surface_transform = gtk_native_default_get_surface_transform; - iface->check_resize = gtk_native_default_check_resize; iface->layout = gtk_native_default_layout; quark_gtk_native_private = g_quark_from_static_string ("gtk-native-private"); @@ -226,23 +220,6 @@ gtk_native_get_surface_transform (GtkNative *self, } /** - * gtk_native_check_resize: - * @self: a #GtkNative - * - * Reposition and resize a #GtkNative. - * - * Widgets need to call this function on their attached - * native widgets when they receive a new size allocation. - */ -void -gtk_native_check_resize (GtkNative *self) -{ - g_return_if_fail (GTK_IS_NATIVE (self)); - - GTK_NATIVE_GET_IFACE (self)->check_resize (self); -} - -/** * gtk_native_get_for_surface: * @surface: a #GdkSurface * diff --git a/gtk/gtknative.h b/gtk/gtknative.h index ce2ffcb068..18346f32fa 100644 --- a/gtk/gtknative.h +++ b/gtk/gtknative.h @@ -44,9 +44,6 @@ GDK_AVAILABLE_IN_ALL GtkNative * gtk_native_get_for_surface (GdkSurface *surface); GDK_AVAILABLE_IN_ALL -void gtk_native_check_resize (GtkNative *self); - -GDK_AVAILABLE_IN_ALL GdkSurface *gtk_native_get_surface (GtkNative *self); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtknativeprivate.h b/gtk/gtknativeprivate.h index 1016631661..df9b9ffaa6 100644 --- a/gtk/gtknativeprivate.h +++ b/gtk/gtknativeprivate.h @@ -23,8 +23,6 @@ struct _GtkNativeInterface double *x, double *y); - void (* check_resize) (GtkNative *self); - void (* layout) (GtkNative *self, int width, int height); diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c index 5d923645df..5d8a01266d 100644 --- a/gtk/gtkpopover.c +++ b/gtk/gtkpopover.c @@ -589,11 +589,6 @@ gtk_popover_present (GtkPopover *popover) } static void -gtk_popover_native_check_resize (GtkNative *native) -{ -} - -static void maybe_request_motion_event (GtkPopover *popover) { GtkWidget *widget = GTK_WIDGET (popover); @@ -1884,7 +1879,6 @@ gtk_popover_native_interface_init (GtkNativeInterface *iface) iface->get_surface = gtk_popover_native_get_surface; iface->get_renderer = gtk_popover_native_get_renderer; iface->get_surface_transform = gtk_popover_native_get_surface_transform; - iface->check_resize = gtk_popover_native_check_resize; iface->layout = gtk_popover_native_layout; } diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c index 8d7deddb3e..73bd8d5bcc 100644 --- a/gtk/gtktexthandle.c +++ b/gtk/gtktexthandle.c @@ -164,11 +164,6 @@ gtk_text_handle_present_surface (GtkTextHandle *handle) gdk_popup_layout_unref (layout); } -static void -gtk_text_handle_native_check_resize (GtkNative *native) -{ -} - void gtk_text_handle_present (GtkTextHandle *handle) { @@ -199,7 +194,6 @@ gtk_text_handle_native_interface_init (GtkNativeInterface *iface) iface->get_surface = gtk_text_handle_native_get_surface; iface->get_renderer = gtk_text_handle_native_get_renderer; iface->get_surface_transform = gtk_text_handle_native_get_surface_transform; - iface->check_resize = gtk_text_handle_native_check_resize; iface->layout = gtk_text_handle_native_layout; } diff --git a/gtk/gtktooltipwindow.c b/gtk/gtktooltipwindow.c index a0651e4338..55c6a882d1 100644 --- a/gtk/gtktooltipwindow.c +++ b/gtk/gtktooltipwindow.c @@ -139,11 +139,6 @@ gtk_tooltip_window_relayout (GtkTooltipWindow *window) gdk_popup_layout_unref (layout); } -static void -gtk_tooltip_window_native_check_resize (GtkNative *native) -{ -} - void gtk_tooltip_window_present (GtkTooltipWindow *window) { @@ -179,7 +174,6 @@ gtk_tooltip_window_native_init (GtkNativeInterface *iface) iface->get_surface = gtk_tooltip_window_native_get_surface; iface->get_renderer = gtk_tooltip_window_native_get_renderer; iface->get_surface_transform = gtk_tooltip_window_native_get_surface_transform; - iface->check_resize = gtk_tooltip_window_native_check_resize; iface->layout = gtk_tooltip_window_native_layout; } @@ -358,7 +352,7 @@ gtk_tooltip_window_show (GtkWidget *widget) { _gtk_widget_set_visible_flag (widget, TRUE); gtk_widget_realize (widget); - gtk_tooltip_window_native_check_resize (GTK_NATIVE (widget)); + gtk_tooltip_window_present (GTK_TOOLTIP_WINDOW (widget)); gtk_widget_map (widget); } diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 4940f9f217..70c94ff706 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1871,11 +1871,6 @@ gtk_window_native_get_surface_transform (GtkNative *native, } static void -gtk_window_native_check_resize (GtkNative *native) -{ -} - -static void gtk_window_native_layout (GtkNative *native, int width, int height) @@ -1946,7 +1941,6 @@ gtk_window_native_interface_init (GtkNativeInterface *iface) iface->get_surface = gtk_window_native_get_surface; iface->get_renderer = gtk_window_native_get_renderer; iface->get_surface_transform = gtk_window_native_get_surface_transform; - iface->check_resize = gtk_window_native_check_resize; iface->layout = gtk_window_native_layout; } |