Merge branch 'bilelmoussaoui/g-i' into 'main'

g-i: add a couple of missing nullable annotations

See merge request GNOME/gtk!4470
This commit is contained in:
Matthias Clasen 2022-02-11 17:33:05 +00:00
commit d2a2591d28
8 changed files with 17 additions and 15 deletions

View File

@ -2858,7 +2858,7 @@ gtk_cell_area_activate (GtkCellArea *area,
/**
* gtk_cell_area_set_focus_cell:
* @area: a `GtkCellArea`
* @renderer: the `GtkCellRenderer` to give focus to
* @renderer: (nullable): the `GtkCellRenderer` to give focus to
*
* Explicitly sets the currently focused cell to @renderer.
*
@ -2903,7 +2903,7 @@ gtk_cell_area_set_focus_cell (GtkCellArea *area,
*
* Retrieves the currently focused cell for @area
*
* Returns: (transfer none): the currently focused cell in @area.
* Returns: (transfer none) (nullable): the currently focused cell in @area.
*/
GtkCellRenderer *
gtk_cell_area_get_focus_cell (GtkCellArea *area)
@ -3211,7 +3211,7 @@ gtk_cell_area_set_edit_widget (GtkCellArea *area,
* Gets the `GtkCellRenderer` in @area that is currently
* being edited.
*
* Returns: (transfer none): The currently edited `GtkCellRenderer`
* Returns: (transfer none) (nullable): The currently edited `GtkCellRenderer`
*/
GtkCellRenderer *
gtk_cell_area_get_edited_cell (GtkCellArea *area)
@ -3230,7 +3230,7 @@ gtk_cell_area_get_edited_cell (GtkCellArea *area)
* Gets the `GtkCellEditable` widget currently used
* to edit the currently edited cell.
*
* Returns: (transfer none): The currently active `GtkCellEditable` widget
* Returns: (transfer none) (nullable): The currently active `GtkCellEditable` widget
*/
GtkCellEditable *
gtk_cell_area_get_edit_widget (GtkCellArea *area)

View File

@ -551,6 +551,8 @@ gtk_event_controller_set_propagation_limit (GtkEventController *controller,
* @controller: a `GtkEventController`
*
* Gets the name of @controller.
*
* Returns: (nullable): The controller name
*/
const char *
gtk_event_controller_get_name (GtkEventController *controller)
@ -565,7 +567,7 @@ gtk_event_controller_get_name (GtkEventController *controller)
/**
* gtk_event_controller_set_name: (attributes org.gtk.Method.set_property=name)
* @controller: a `GtkEventController`
* @name: a name for @controller
* @name: (nullable): a name for @controller
*
* Sets a name on the controller that can be used for debugging.
*/

View File

@ -293,7 +293,7 @@ gtk_event_controller_key_new (void)
/**
* gtk_event_controller_key_set_im_context:
* @controller: a `GtkEventControllerKey`
* @im_context: a `GtkIMContext`
* @im_context: (nullable): a `GtkIMContext`
*
* Sets the input method context of the key @controller.
*/
@ -316,7 +316,7 @@ gtk_event_controller_key_set_im_context (GtkEventControllerKey *controller,
*
* Gets the input method context of the key @controller.
*
* Returns: (transfer none): the `GtkIMContext`
* Returns: (transfer none) (nullable): the `GtkIMContext`
**/
GtkIMContext *
gtk_event_controller_key_get_im_context (GtkEventControllerKey *controller)

View File

@ -335,7 +335,7 @@ gtk_file_chooser_set_current_name (GtkFileChooser *chooser,
* This is meant to be used in save dialogs, to get the currently typed
* filename when the file itself does not exist yet.
*
* Returns: The raw text from the file choosers Name entry. Free with
* Returns: (nullable): The raw text from the file choosers Name entry. Free with
* g_free(). Note that this string is not a full pathname or URI; it is
* whatever the contents of the entry are. Note also that this string is
* in UTF-8 encoding, which is not necessarily the systems encoding for
@ -369,7 +369,7 @@ gtk_file_chooser_unselect_all (GtkFileChooser *chooser)
/**
* gtk_file_chooser_set_current_folder:
* @chooser: a `GtkFileChooser`
* @file: the `GFile` for the new folder
* @file: (nullable): the `GFile` for the new folder
* @error: location to store error
*
* Sets the current folder for @chooser from a `GFile`.
@ -395,7 +395,7 @@ gtk_file_chooser_set_current_folder (GtkFileChooser *chooser,
*
* Gets the current folder of @chooser as `GFile`.
*
* Returns: (transfer full): the `GFile` for the current folder.
* Returns: (transfer full) (nullable): the `GFile` for the current folder.
*/
GFile *
gtk_file_chooser_get_current_folder (GtkFileChooser *chooser)

View File

@ -898,7 +898,7 @@ set_active_printer (GtkPageSetupUnixDialog *dialog,
/**
* gtk_page_setup_unix_dialog_set_print_settings:
* @dialog: a `GtkPageSetupUnixDialog`
* @print_settings: a `GtkPrintSettings`
* @print_settings: (nullable): a `GtkPrintSettings`
*
* Sets the `GtkPrintSettings` from which the page setup dialog
* takes its values.
@ -935,7 +935,7 @@ gtk_page_setup_unix_dialog_set_print_settings (GtkPageSetupUnixDialog *dialog,
*
* Gets the current print settings from the dialog.
*
* Returns: (transfer none): the current print settings
* Returns: (transfer none) (nullable): the current print settings
**/
GtkPrintSettings *
gtk_page_setup_unix_dialog_get_print_settings (GtkPageSetupUnixDialog *dialog)

View File

@ -1515,7 +1515,7 @@ gtk_print_operation_set_print_settings (GtkPrintOperation *op,
* [method@Gtk.PrintOperation.set_print_settings] or
* [method@Gtk.PrintOperation.run] have been called.
*
* Returns: (transfer none): the current print settings of @op.
* Returns: (transfer none) (nullable): the current print settings of @op.
**/
GtkPrintSettings *
gtk_print_operation_get_print_settings (GtkPrintOperation *op)

View File

@ -3078,7 +3078,7 @@ gtk_print_unix_dialog_new (const char *title,
*
* Gets the currently selected printer.
*
* Returns: (transfer none): the currently selected printer
* Returns: (transfer none) (nullable): the currently selected printer
*/
GtkPrinter *
gtk_print_unix_dialog_get_selected_printer (GtkPrintUnixDialog *dialog)

View File

@ -478,7 +478,7 @@ gtk_single_selection_new (GListModel *model)
*
* Gets the model that @self is wrapping.
*
* Returns: (transfer none): The model being wrapped
* Returns: (transfer none) (nullable): The model being wrapped
*/
GListModel *
gtk_single_selection_get_model (GtkSingleSelection *self)