diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-10-19 12:36:54 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-10-19 12:36:54 -0400 |
commit | 3918dd4643fe184669ce474807dc25652da5a807 (patch) | |
tree | f15211551dc80807fcdf6a13a46f377aad782994 | |
parent | 2359510b1f21de48784c3c4bc1f0c77d77c697f1 (diff) | |
download | gtk+-3918dd4643fe184669ce474807dc25652da5a807.tar.gz |
Add gtk_editable_get_delegate
We need access to the delegate in the a11y layer,
so we might as well make this function public.
-rw-r--r-- | docs/reference/gtk/gtk4-sections.txt | 1 | ||||
-rw-r--r-- | gtk/gtkeditable.c | 15 | ||||
-rw-r--r-- | gtk/gtkeditable.h | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index bf33adde32..a0e123947b 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -971,6 +971,7 @@ gtk_editable_get_enable_undo gtk_editable_set_enable_undo <SUBSECTION> gtk_editable_install_properties +gtk_editable_get_delegate gtk_editable_init_delegate gtk_editable_finish_delegate gtk_editable_delegate_set_property diff --git a/gtk/gtkeditable.c b/gtk/gtkeditable.c index af0325f80f..eae161c542 100644 --- a/gtk/gtkeditable.c +++ b/gtk/gtkeditable.c @@ -942,6 +942,21 @@ delegate_notify (GObject *object, } /** + * gtk_editable_get_delegate: + * @editable: a #GtkEditable + * + * Gets the #GtkEditable that @editable is delegating its + * implementation to. Typically, the delegate is a #GtkText widget. + * + * Returns: (nullable) (transfer none): the delegate #GtkEditable + */ +GtkEditable * +gtk_editable_get_delegate (GtkEditable *editable) +{ + return get_delegate (editable); +} + +/** * gtk_editable_init_delegate: * @editable: a #GtkEditable * diff --git a/gtk/gtkeditable.h b/gtk/gtkeditable.h index 2e3f886f56..4ca68e44a7 100644 --- a/gtk/gtkeditable.h +++ b/gtk/gtkeditable.h @@ -162,6 +162,8 @@ GDK_AVAILABLE_IN_ALL guint gtk_editable_install_properties (GObjectClass *object_class, guint first_prop); GDK_AVAILABLE_IN_ALL +GtkEditable *gtk_editable_get_delegate (GtkEditable *editable); +GDK_AVAILABLE_IN_ALL void gtk_editable_init_delegate (GtkEditable *editable); GDK_AVAILABLE_IN_ALL void gtk_editable_finish_delegate (GtkEditable *editable); |