[gtk/filename-annotations] Add type annotations for filename arguments




commit 938bfff3dd8d38443ca8bcbaf5e8bd8419b34584
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 12 11:12:06 2021 -0400

    Add type annotations for filename arguments
    
    Add missing "(type filename)" annotations for string
    arguments that are filenames.
    
    Fixes: #633

 gdk/gdktexture.c      | 2 +-
 gsk/gskrendernode.c   | 2 +-
 gtk/gtkbookmarklist.c | 4 ++--
 gtk/gtkbuilder.c      | 6 +++---
 gtk/gtkfilechooser.c  | 2 +-
 gtk/gtkmediafile.c    | 4 ++--
 gtk/gtkpicture.c      | 2 +-
 gtk/gtkvideo.c        | 2 +-
 8 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/gdk/gdktexture.c b/gdk/gdktexture.c
index 0332fca146..7ac4f1bb53 100644
--- a/gdk/gdktexture.c
+++ b/gdk/gdktexture.c
@@ -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.
  *
diff --git a/gsk/gskrendernode.c b/gsk/gskrendernode.c
index 7c442a760b..24678978b8 100644
--- a/gsk/gskrendernode.c
+++ b/gsk/gskrendernode.c
@@ -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()
diff --git a/gtk/gtkbookmarklist.c b/gtk/gtkbookmarklist.c
index 08bd5f1bb5..c947b25a4f 100644
--- a/gtk/gtkbookmarklist.c
+++ b/gtk/gtkbookmarklist.c
@@ -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.
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index dd867fc367..ba31a8820c 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -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.
  *
diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c
index 44931a54dc..c472e115db 100644
--- a/gtk/gtkfilechooser.c
+++ b/gtk/gtkfilechooser.c
@@ -459,7 +459,7 @@ gtk_file_chooser_get_files (GtkFileChooser *chooser)
  * the file’s base name will also appear in the dialog’s file name entry.
  *
  * If the file name isn’t 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.
diff --git a/gtk/gtkmediafile.c b/gtk/gtkmediafile.c
index 079e1b367d..96e8c84731 100644
--- a/gtk/gtkmediafile.c
+++ b/gtk/gtkmediafile.c
@@ -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.
  *
diff --git a/gtk/gtkpicture.c b/gtk/gtkpicture.c
index 194d2fc98a..7694888c68 100644
--- a/gtk/gtkpicture.c
+++ b/gtk/gtkpicture.c
@@ -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.
  *
diff --git a/gtk/gtkvideo.c b/gtk/gtkvideo.c
index 2343a3aba9..85b13fe9a9 100644
--- a/gtk/gtkvideo.c
+++ b/gtk/gtkvideo.c
@@ -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.
  *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]