From: Lukáš Tyrychtr Date: Tue, 22 Nov 2022 14:17:30 +0000 (+0100) Subject: a11y: Rename GtkAccessible.get_parent X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~8^2~9^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6100258ba2001212e5e27f4c396bd18bc9c40d72;p=gtk4.git a11y: Rename GtkAccessible.get_parent Avoid a collision when the type implementing the GtkAccessible interface already has a `get_parent()` method—like GtkWidget. --- diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c index e2988252de..82f88627fa 100644 --- a/gtk/a11y/gtkatspicontext.c +++ b/gtk/a11y/gtkatspicontext.c @@ -366,7 +366,7 @@ get_index_in (GtkAccessible *parent, static int get_index_in_parent (GtkAccessible *accessible) { - GtkAccessible *parent = gtk_accessible_get_parent (accessible); + GtkAccessible *parent = gtk_accessible_get_accessible_parent (accessible); return get_index_in(parent, accessible); } @@ -402,7 +402,7 @@ get_parent_context_ref (GtkAccessible *accessible) { GVariant *res = NULL; - GtkAccessible *parent = gtk_accessible_get_parent (accessible); + GtkAccessible *parent = gtk_accessible_get_accessible_parent (accessible); if (parent == NULL) { @@ -873,7 +873,7 @@ gtk_at_spi_context_state_change (GtkATContext *ctx, } else { - parent = gtk_accessible_get_parent (accessible); + parent = gtk_accessible_get_accessible_parent (accessible); context = gtk_accessible_get_at_context (parent); gtk_at_context_child_changed (context, change, accessible); @@ -1123,7 +1123,7 @@ gtk_at_spi_context_child_change (GtkATContext *ctx, if (child_context == NULL) return; - if (gtk_accessible_get_parent (child) != accessible) + if (gtk_accessible_get_accessible_parent (child) != accessible) { idx = 0; } diff --git a/gtk/gtkaccessible.c b/gtk/gtkaccessible.c index 848d9a0bd9..b9101a79d3 100644 --- a/gtk/gtkaccessible.c +++ b/gtk/gtkaccessible.c @@ -40,7 +40,7 @@ * * Every accessible implementation is part of a tree of accessible objects. * Normally, this tree corresponds to the widget tree, but can be customized - * by reimplementing the [vfunc@Gtk.Accessible.get_parent] + * by reimplementing the [vfunc@Gtk.Accessible.get_accessible_parent] * and [vfunc@Gtk.Accessible.get_child_at_index] virtual functions. * Note that you can not create a top-level accessible object as of now, * which means that you must always have a parent accessible object. @@ -98,7 +98,7 @@ gtk_accessible_get_at_context (GtkAccessible *self) } /* - * gtk_accessible_get_parent: + * gtk_accessible_get_accessible_parent: * @self: a `GtkAccessible` * * Retrieves the parent `GtkAccessible` for the given `GtkAccessible`. @@ -106,11 +106,11 @@ gtk_accessible_get_at_context (GtkAccessible *self) * Returns: (transfer none): the parent `GtkAccessible`, which can not be %NULL */ GtkAccessible * -gtk_accessible_get_parent (GtkAccessible *self) +gtk_accessible_get_accessible_parent (GtkAccessible *self) { g_return_val_if_fail (GTK_IS_ACCESSIBLE (self), NULL); - return GTK_ACCESSIBLE_GET_IFACE (self)->get_parent (self); + return GTK_ACCESSIBLE_GET_IFACE (self)->get_accessible_parent (self); } @@ -755,7 +755,7 @@ gtk_accessible_platform_changed (GtkAccessible *self, /* propagate changes up from ignored widgets */ if (gtk_accessible_get_accessible_role (self) == GTK_ACCESSIBLE_ROLE_NONE) - context = gtk_accessible_get_at_context (gtk_accessible_get_parent (self)); + context = gtk_accessible_get_at_context (gtk_accessible_get_accessible_parent (self)); if (context == NULL) return; @@ -900,7 +900,7 @@ gtk_accessible_update_children (GtkAccessible *self, /* propagate changes up from ignored widgets */ if (gtk_accessible_get_accessible_role (self) == GTK_ACCESSIBLE_ROLE_NONE) - context = gtk_accessible_get_at_context (gtk_accessible_get_parent (self)); + context = gtk_accessible_get_at_context (gtk_accessible_get_accessible_parent (self)); if (context == NULL) return; diff --git a/gtk/gtkaccessible.h b/gtk/gtkaccessible.h index 6b30107c06..a557d49fec 100644 --- a/gtk/gtkaccessible.h +++ b/gtk/gtkaccessible.h @@ -96,14 +96,14 @@ struct _GtkAccessibleInterface GtkAccessiblePlatformState state); /** - * GtkAccessibleInterface::get_parent: + * GtkAccessibleInterface::get_accessible_parent: * @self: a `GtkAccessible` * * Returns the parent `GtkAccessible` of @self. * Be sure not to return %NULL, as a top-level `GtkAccessible` which is not a * top-level window is not supported. */ - GtkAccessible * (* get_parent) (GtkAccessible *self); + GtkAccessible * (* get_accessible_parent) (GtkAccessible *self); /** * GtkaccessibleInterface::get_child_at_index: @@ -139,7 +139,7 @@ gboolean gtk_accessible_get_platform_state (GtkAccessible *s GtkAccessiblePlatformState state); GDK_AVAILABLE_IN_4_10 -GtkAccessible * gtk_accessible_get_parent(GtkAccessible *self); +GtkAccessible * gtk_accessible_get_accessible_parent(GtkAccessible *self); GDK_AVAILABLE_IN_4_10 GtkAccessible * gtk_accessible_get_child_at_index(GtkAccessible *self, guint idx); diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 3e99575d29..fa47587b1b 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -257,7 +257,7 @@ gtk_stack_page_accessible_get_platform_state (GtkAccessible *self, } static GtkAccessible * -gtk_stack_page_accessible_get_parent (GtkAccessible *accessible) +gtk_stack_page_accessible_get_accessible_parent (GtkAccessible *accessible) { GtkStackPage *page = GTK_STACK_PAGE (accessible); @@ -298,7 +298,7 @@ gtk_stack_page_accessible_init (GtkAccessibleInterface *iface) { iface->get_at_context = gtk_stack_page_accessible_get_at_context; iface->get_platform_state = gtk_stack_page_accessible_get_platform_state; - iface->get_parent = gtk_stack_page_accessible_get_parent; + iface->get_accessible_parent = gtk_stack_page_accessible_get_accessible_parent; iface->get_child_at_index = gtk_stack_page_accessible_get_child_at_index; iface->get_bounds = gtk_stack_page_accessible_get_bounds; } diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 5694974a35..ed56005039 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -8466,7 +8466,7 @@ gtk_widget_accessible_get_platform_state (GtkAccessible *self, } static GtkAccessible * -gtk_widget_accessible_get_parent (GtkAccessible *self) +gtk_widget_accessible_get_accessible_parent (GtkAccessible *self) { return GTK_ACCESSIBLE (gtk_widget_get_parent (GTK_WIDGET (self))); } @@ -8525,7 +8525,7 @@ gtk_widget_accessible_interface_init (GtkAccessibleInterface *iface) { iface->get_at_context = gtk_widget_accessible_get_at_context; iface->get_platform_state = gtk_widget_accessible_get_platform_state; - iface->get_parent = gtk_widget_accessible_get_parent; + iface->get_accessible_parent = gtk_widget_accessible_get_accessible_parent; iface->get_child_at_index = gtk_widget_accessible_get_child_at_index; iface->get_bounds = gtk_widget_accessible_get_bounds; }