From 30eaa2c3ccc3926f242cfd436c7061c6eac3fc6e Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval Date: Sat, 25 May 2024 18:10:07 +0200 Subject: [PATCH] gtk: Add missing return annotations --- gtk/gtkaccelgroup.c | 2 ++ gtk/gtkeditable.c | 2 ++ gtk/gtkeventcontrollerkey.c | 2 ++ gtk/gtkpaned.c | 12 ++++++++++++ gtk/gtkscrolledwindow.c | 2 ++ gtk/gtktext.c | 4 ++++ gtk/gtktextview.c | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index 181433aa25..112ec9a996 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -505,6 +505,8 @@ out: * * If the parse operation fails, @accelerator_key and @accelerator_mods will * be set to 0 (zero). + * + * Returns: whether parsing succeeded */ gboolean gtk_accelerator_parse (const char *accelerator, diff --git a/gtk/gtkeditable.c b/gtk/gtkeditable.c index cf71f1c58e..bf195bb5f4 100644 --- a/gtk/gtkeditable.c +++ b/gtk/gtkeditable.c @@ -1231,6 +1231,8 @@ gtk_editable_delegate_get_property (GObject *object, * delegate the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role, or you can * change your tree to allow this function to work. * + * Returns: the accessible platform state of the delegate + * * Since: 4.10 */ gboolean diff --git a/gtk/gtkeventcontrollerkey.c b/gtk/gtkeventcontrollerkey.c index 0ca3ac29bc..4f9097e8e2 100644 --- a/gtk/gtkeventcontrollerkey.c +++ b/gtk/gtkeventcontrollerkey.c @@ -237,6 +237,8 @@ gtk_event_controller_key_class_init (GtkEventControllerKeyClass *klass) * pointer buttons. * * Emitted whenever the state of modifier keys and pointer buttons change. + * + * Returns: whether to ignore modifiers */ signals[MODIFIERS] = g_signal_new (I_("modifiers"), diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 5c30aad390..0169d2aa85 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -558,6 +558,8 @@ gtk_paned_class_init (GtkPanedClass *class) * This is a [keybinding signal](class.SignalAction.html). * * The default binding is F6. + * + * Returns: whether the behavior was cycled */ signals [CYCLE_CHILD_FOCUS] = g_signal_new (I_("cycle-child-focus"), @@ -582,6 +584,8 @@ gtk_paned_class_init (GtkPanedClass *class) * This is a [keybinding signal](class.SignalAction.html). * * The default binding is Tab. + * + * Return: whether handle focus was toggled */ signals [TOGGLE_HANDLE_FOCUS] = g_signal_new (I_("toggle-handle-focus"), @@ -603,6 +607,8 @@ gtk_paned_class_init (GtkPanedClass *class) * Emitted to move the handle with key bindings. * * This is a [keybinding signal](class.SignalAction.html). + * + * Returns: whether the handle was moved */ signals[MOVE_HANDLE] = g_signal_new (I_("move-handle"), @@ -628,6 +634,8 @@ gtk_paned_class_init (GtkPanedClass *class) * This is a [keybinding signal](class.SignalAction.html). * * The default binding for this signal is F8. + * + * Returns: whether the behavior was cycled */ signals [CYCLE_HANDLE_FOCUS] = g_signal_new (I_("cycle-handle-focus"), @@ -653,6 +661,8 @@ gtk_paned_class_init (GtkPanedClass *class) * * The default binding for this signal is Return or * Space. + * + * Returns: whether the position was accepted */ signals [ACCEPT_POSITION] = g_signal_new (I_("accept-position"), @@ -679,6 +689,8 @@ gtk_paned_class_init (GtkPanedClass *class) * This is a [keybinding signal](class.SignalAction.html). * * The default binding for this signal is Escape. + * + * Returns: whether the position was canceled */ signals [CANCEL_POSITION] = g_signal_new (I_("cancel-position"), diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index c4fca8033a..b5249205b1 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -776,6 +776,8 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class) * * The horizontal or vertical adjustment is updated which triggers a * signal that the scrolled window’s child may listen to and scroll itself. + * + * Returns: whether the scroll happened */ signals[SCROLL_CHILD] = g_signal_new (I_("scroll-child"), diff --git a/gtk/gtktext.c b/gtk/gtktext.c index fae3547fea..599ccbb99f 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -6876,6 +6876,8 @@ gtk_text_set_input_purpose (GtkText *self, * @self: a `GtkText` * * Gets the input purpose of the `GtkText`. + * + * Returns: the input purpose */ GtkInputPurpose gtk_text_get_input_purpose (GtkText *self) @@ -6925,6 +6927,8 @@ gtk_text_set_input_hints (GtkText *self, * @self: a `GtkText` * * Gets the input hints of the `GtkText`. + * + * Returns: the input hints */ GtkInputHints gtk_text_get_input_hints (GtkText *self) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 5a2110ff65..10f7b693c6 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -10058,6 +10058,8 @@ gtk_text_view_set_input_purpose (GtkTextView *text_view, * @text_view: a `GtkTextView` * * Gets the `input-purpose` of the `GtkTextView`. + * + * Returns: the input purpose */ GtkInputPurpose gtk_text_view_get_input_purpose (GtkTextView *text_view) @@ -10106,6 +10108,8 @@ gtk_text_view_set_input_hints (GtkTextView *text_view, * @text_view: a `GtkTextView` * * Gets the `input-hints` of the `GtkTextView`. + * + * Returns: the input hints */ GtkInputHints gtk_text_view_get_input_hints (GtkTextView *text_view)