Merge branch 'filename-annotations' into 'master'

Add type annotations for filename arguments

Closes #633

See merge request GNOME/gtk!3665
This commit is contained in:
Matthias Clasen 2021-06-13 11:38:50 +00:00
commit c0f54f899d
8 changed files with 12 additions and 12 deletions

View File

@ -533,7 +533,7 @@ gdk_texture_get_render_data (GdkTexture *self,
/**
* gdk_texture_save_to_png:
* @texture: a `GdkTexture`
* @filename: the filename to store to
* @filename: (type filename): the filename to store to
*
* Store the given @texture to the @filename as a PNG file.
*

View File

@ -562,7 +562,7 @@ gsk_render_node_diff (GskRenderNode *node1,
/**
* gsk_render_node_write_to_file:
* @node: a `GskRenderNode`
* @filename: the file to save it to.
* @filename: (type filename): the file to save it to.
* @error: Return location for a potential error
*
* This function is equivalent to calling gsk_render_node_serialize()

View File

@ -452,7 +452,7 @@ gtk_bookmark_list_set_filename (GtkBookmarkList *self,
* Returns the filename of the bookmark file that
* this list is loading.
*
* Returns: the filename of the .xbel file
* Returns: (type filename): the filename of the .xbel file
*/
const char *
gtk_bookmark_list_get_filename (GtkBookmarkList *self)
@ -464,7 +464,7 @@ gtk_bookmark_list_get_filename (GtkBookmarkList *self)
/**
* gtk_bookmark_list_new:
* @filename: (nullable): The bookmark file to load
* @filename: (type filename) (nullable): The bookmark file to load
* @attributes: (nullable): The attributes to query
*
* Creates a new `GtkBookmarkList` with the given @attributes.

View File

@ -1175,7 +1175,7 @@ gtk_builder_new (void)
/**
* gtk_builder_add_from_file:
* @builder: a `GtkBuilder`
* @filename: the name of the file to parse
* @filename: (type filename): the name of the file to parse
* @error: (nullable): return location for an error
*
* Parses a file containing a UI definition and merges it with
@ -1245,7 +1245,7 @@ gtk_builder_add_from_file (GtkBuilder *builder,
/**
* gtk_builder_add_objects_from_file:
* @builder: a `GtkBuilder`
* @filename: the name of the file to parse
* @filename: (type filename): the name of the file to parse
* @object_ids: (array zero-terminated=1) (element-type utf8): nul-terminated array of objects to build
* @error: (nullable): return location for an error
*
@ -2760,7 +2760,7 @@ gtk_builder_create_closure (GtkBuilder *builder,
/**
* gtk_builder_new_from_file: (constructor)
* @filename: filename of user interface description file
* @filename: (type filename): filename of user interface description file
*
* Parses the UI definition in the file @filename.
*

View File

@ -459,7 +459,7 @@ gtk_file_chooser_get_files (GtkFileChooser *chooser)
* the files base name will also appear in the dialogs file name entry.
*
* If the file name isnt in the current folder of @chooser, then the current
* folder of @chooser will be changed to the folder containing @filename.
* folder of @chooser will be changed to the folder containing @file.
*
* Note that the file must exist, or nothing will be done except
* for the directory change.

View File

@ -270,7 +270,7 @@ gtk_media_file_new (void)
/**
* gtk_media_file_new_for_filename:
* @filename: filename to open
* @filename: (type filename): filename to open
*
* Creates a new media file for the given filename.
*
@ -420,7 +420,7 @@ gtk_media_file_clear (GtkMediaFile *self)
/**
* gtk_media_file_set_filename:
* @self: a `GtkMediaFile`
* @filename: (nullable): name of file to play
* @filename: (type filename) (nullable): name of file to play
*
* Sets the `GtkMediaFile to play the given file.
*

View File

@ -619,7 +619,7 @@ gtk_picture_get_file (GtkPicture *self)
/**
* gtk_picture_set_filename:
* @self: a `GtkPicture`
* @filename: (nullable): the filename to play
* @filename: (type filename) (nullable): the filename to play
*
* Makes @self load and display the given @filename.
*

View File

@ -714,7 +714,7 @@ gtk_video_set_file (GtkVideo *self,
/**
* gtk_video_set_filename:
* @self: a `GtkVideo`
* @filename: (nullable): the filename to play
* @filename: (type filename) (nullable): the filename to play
*
* Makes @self play the given @filename.
*