[file-roller/wip/jtojnar/gir-cleanups: 1/2] gir: Add missing introspection annotations




commit 6373667dd53605bfdbe4bd11baa458f8d4672797
Author: Jan Tojnar <jtojnar gmail com>
Date:   Wed Aug 17 20:15:22 2022 +0200

    gir: Add missing introspection annotations
    
    At least those g-ir-generate warns about.

 src/fr-application.h          |   5 ++
 src/fr-archive.h              |  70 +++++++++++++++++++++-
 src/fr-command.h              |   5 ++
 src/fr-file-data.h            |   5 ++
 src/fr-file-selector-dialog.h |  27 ++++++++-
 src/fr-new-archive-dialog.h   |  12 +++-
 src/fr-window.c               |   5 +-
 src/fr-window.h               | 133 ++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 257 insertions(+), 5 deletions(-)
---
diff --git a/src/fr-application.h b/src/fr-application.h
index 4e1f0d39..5cbee481 100644
--- a/src/fr-application.h
+++ b/src/fr-application.h
@@ -28,6 +28,11 @@
 G_DECLARE_FINAL_TYPE (FrApplication, fr_application, FR, APPLICATION, GtkApplication)
 
 GtkApplication * fr_application_new           (void);
+
+/**
+ * fr_application_get_settings:
+ * Returns: (transfer none)
+ */
 GSettings *      fr_application_get_settings  (FrApplication *app,
                                               const char    *schema);
 
diff --git a/src/fr-archive.h b/src/fr-archive.h
index 4823e924..342b0217 100644
--- a/src/fr-archive.h
+++ b/src/fr-archive.h
@@ -345,9 +345,19 @@ struct _FrArchiveClass {
 };
 
 GType         fr_archive_get_type                (void);
+
+/**
+ * fr_archive_get_file:
+ * Returns: (transfer none)
+ */
 GFile *       fr_archive_get_file                (FrArchive           *archive);
 gboolean      fr_archive_is_capable_of           (FrArchive           *archive,
                                                  FrArchiveCaps        capabilities);
+
+/**
+ * fr_archive_get_supported_types:
+ * Returns: (transfer none)
+ */
 const char ** fr_archive_get_supported_types     (FrArchive           *archive);
 void          fr_archive_update_capabilities     (FrArchive           *archive);
 FrArchiveCap  fr_archive_get_capabilities        (FrArchive           *archive,
@@ -360,12 +370,22 @@ const char *  fr_archive_get_packages            (FrArchive           *archive,
                                                  const char          *mime_type);
 void          fr_archive_set_stoppable           (FrArchive           *archive,
                                                  gboolean             stoppable);
+
+/**
+ * fr_archive_create:
+ * Returns: (transfer full)
+ */
 FrArchive *   fr_archive_create                  (GFile               *file,
                                                  const char          *mime_type);
 void          fr_archive_open                    (GFile               *file,
                                                  GCancellable        *cancellable,
                                                  GAsyncReadyCallback  callback,
                                                  gpointer             user_data);
+
+/**
+ * fr_archive_open_finish:
+ * Returns: (transfer full)
+ */
 FrArchive *   fr_archive_open_finish             (GFile               *file,
                                                  GAsyncResult        *result,
                                                  GError             **error);
@@ -377,8 +397,13 @@ void          fr_archive_list                    (FrArchive           *archive,
 gboolean      fr_archive_operation_finish        (FrArchive           *archive,
                                                  GAsyncResult        *result,
                                                  GError             **error);
+
+/**
+ * fr_archive_add_files:
+ * @file_list: (element-type GFile)
+ */
 void          fr_archive_add_files               (FrArchive           *archive,
-                                                 GList               *file_list, /* GFile list */
+                                                 GList               *file_list,
                                                  GFile               *base_dir,
                                                  const char          *dest_dir,
                                                  gboolean             update,
@@ -390,8 +415,13 @@ void          fr_archive_add_files               (FrArchive           *archive,
                                                  GCancellable        *cancellable,
                                                  GAsyncReadyCallback  callback,
                                                  gpointer             user_data);
+
+/**
+ * fr_archive_add_files_with_filter:
+ * @file_list: (element-type GFile)
+ */
 void          fr_archive_add_files_with_filter   (FrArchive           *archive,
-                                                 GList               *file_list, /* GFile list */
+                                                 GList               *file_list,
                                                  GFile               *base_dir,
                                                  const char          *include_files,
                                                  const char          *exclude_files,
@@ -406,12 +436,22 @@ void          fr_archive_add_files_with_filter   (FrArchive           *archive,
                                                  GCancellable        *cancellable,
                                                  GAsyncReadyCallback  callback,
                                                  gpointer             user_data);
+
+/**
+ * fr_archive_remove:
+ * @file_list: (element-type GFile)
+ */
 void          fr_archive_remove                  (FrArchive           *archive,
                                                  GList               *file_list,
                                                  FrCompression        compression,
                                                  GCancellable        *cancellable,
                                                  GAsyncReadyCallback  callback,
                                                  gpointer             user_data);
+
+/**
+ * fr_archive_extract:
+ * @file_list: (element-type GFile)
+ */
 void          fr_archive_extract                 (FrArchive           *archive,
                                                  GList               *file_list,
                                                  GFile               *destination,
@@ -434,6 +474,11 @@ gboolean      fr_archive_extract_here            (FrArchive           *archive,
 void          fr_archive_set_last_extraction_destination
                                                 (FrArchive           *archive,
                                                  GFile               *folder);
+
+/**
+ * fr_archive_get_last_extraction_destination:
+ * Returns: (transfer none)
+ */
 GFile *       fr_archive_get_last_extraction_destination
                                                 (FrArchive           *archive);
 void          fr_archive_test                    (FrArchive           *archive,
@@ -441,6 +486,11 @@ void          fr_archive_test                    (FrArchive           *archive,
                                                  GCancellable        *cancellable,
                                                  GAsyncReadyCallback  callback,
                                                  gpointer             user_data);
+
+/**
+ * fr_archive_rename:
+ * @file_list: (element-type GFile)
+ */
 void          fr_archive_rename                  (FrArchive           *archive,
                                                  GList               *file_list,
                                                  const char          *old_name,
@@ -452,6 +502,11 @@ void          fr_archive_rename                  (FrArchive           *archive,
                                                  GCancellable        *cancellable,
                                                  GAsyncReadyCallback  callback,
                                                  gpointer             user_data);
+
+/**
+ * fr_archive_paste_clipboard:
+ * @files: (element-type GFile)
+ */
 void          fr_archive_paste_clipboard         (FrArchive           *archive,
                                                  GFile               *file,
                                                  char                *password,
@@ -466,6 +521,11 @@ void          fr_archive_paste_clipboard         (FrArchive           *archive,
                                                  GCancellable        *cancellable,
                                                  GAsyncReadyCallback  callback,
                                                  gpointer             user_data);
+
+/**
+ * fr_archive_add_dropped_items:
+ * @item_list: (element-type GFile)
+ */
 void          fr_archive_add_dropped_items       (FrArchive           *archive,
                                                  GList               *item_list,
                                                  const char          *dest_dir,
@@ -476,6 +536,12 @@ void          fr_archive_add_dropped_items       (FrArchive           *archive,
                                                  GCancellable        *cancellable,
                                                  GAsyncReadyCallback  callback,
                                                  gpointer             user_data);
+
+/**
+ * fr_archive_update_open_files:
+ * @file_list: (element-type GFile)
+ * @dir_list: (element-type GFile)
+ */
 void          fr_archive_update_open_files       (FrArchive           *archive,
                                                  GList               *file_list,
                                                  GList               *dir_list,
diff --git a/src/fr-command.h b/src/fr-command.h
index 0e6403c2..35a65fb5 100644
--- a/src/fr-command.h
+++ b/src/fr-command.h
@@ -82,6 +82,11 @@ struct _FrCommandClass {
 };
 
 GType    fr_command_get_type         (void);
+
+/**
+ * fr_command_get_last_output:
+ * Returns: (element-type guint8*) (transfer none): List of raw stderr (or stdout, if stderr is not present) 
lines of the last execution of the command, in their original encoding.
+ */
 GList *  fr_command_get_last_output  (FrCommand *command);
 
 #endif /* FR_COMMAND_H */
diff --git a/src/fr-file-data.h b/src/fr-file-data.h
index 60505ff6..d2c5362b 100644
--- a/src/fr-file-data.h
+++ b/src/fr-file-data.h
@@ -63,6 +63,11 @@ void fr_file_data_update_content_type (FrFileData *fdata);
 gboolean fr_file_data_is_dir (FrFileData *fdata);
 void fr_file_data_set_list_name (FrFileData *fdata, const char *value);
 int fr_file_data_compare_by_path (gconstpointer a, gconstpointer b);
+
+/**
+ * fr_find_path_in_file_data_array:
+ * @array: (element-type FrFileData)
+ */
 int fr_find_path_in_file_data_array (GPtrArray *array, const char *path);
 
 #endif /* FR_FILE_DATA_H */
diff --git a/src/fr-file-selector-dialog.h b/src/fr-file-selector-dialog.h
index b6472cc8..971b2fa0 100644
--- a/src/fr-file-selector-dialog.h
+++ b/src/fr-file-selector-dialog.h
@@ -30,13 +30,38 @@ GtkWidget *     fr_file_selector_dialog_new                 (const char
                                                             GtkWindow              *parent);
 void            fr_file_selector_dialog_set_extra_widget    (FrFileSelectorDialog   *dialog,
                                                             GtkWidget              *extra_widget);
+
+/**
+ * fr_file_selector_dialog_get_extra_widget:
+ * Returns: (transfer none)
+ */
 GtkWidget *     fr_file_selector_dialog_get_extra_widget    (FrFileSelectorDialog   *dialog);
 void            fr_file_selector_dialog_set_current_folder  (FrFileSelectorDialog   *dialog,
                                                             GFile                  *folder);
+
+/**
+ * fr_file_selector_dialog_get_current_folder:
+ * Returns: (transfer full)
+ */
 GFile *         fr_file_selector_dialog_get_current_folder  (FrFileSelectorDialog   *dialog);
+
+/**
+ * fr_file_selector_dialog_set_selected_files:
+ * @files: (element-type GFile)
+ */
 void            fr_file_selector_dialog_set_selected_files  (FrFileSelectorDialog   *dialog,
-                                                            GList                  *files /* GFile list */);
+                                                            GList                  *files);
+
+/**
+ * fr_file_selector_dialog_get_selected_files:
+ * Returns: (element-type GFile) (transfer full)
+ */
 GList *         fr_file_selector_dialog_get_selected_files  (FrFileSelectorDialog   *dialog);
+
+/**
+ * fr_file_selector_dialog_get_action_map:
+ * Returns: (transfer none)
+ */
 GSimpleActionGroup *fr_file_selector_dialog_get_action_map (FrFileSelectorDialog   *dialog);
 
 #endif /* FR_FILE_SELECTOR_DIALOG_H */
diff --git a/src/fr-new-archive-dialog.h b/src/fr-new-archive-dialog.h
index 56031083..270c51fc 100644
--- a/src/fr-new-archive-dialog.h
+++ b/src/fr-new-archive-dialog.h
@@ -38,8 +38,18 @@ GtkWidget *     fr_new_archive_dialog_new                 (const char          *
                                                           GFile               *folder,
                                                           const char          *default_name,
                                                           GFile               *original_file);
+
+/**
+ * fr_new_archive_dialog_set_files_to_add:
+ * @file_list: (element-type GFile)
+ */
 void           fr_new_archive_dialog_set_files_to_add    (FrNewArchiveDialog  *dialog,
-                                                          GList               *file_list /* GFile list */);
+                                                          GList               *file_list);
+
+/**
+ * fr_new_archive_dialog_get_file:
+ * Returns: (transfer full)
+ */
 GFile *         fr_new_archive_dialog_get_file            (FrNewArchiveDialog  *dialog,
                                                           const char         **mime_type);
 const char *    fr_new_archive_dialog_get_password        (FrNewArchiveDialog  *dialog);
diff --git a/src/fr-window.c b/src/fr-window.c
index b18fb53f..66d93429 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -3320,7 +3320,10 @@ _archive_operation_started (FrWindow *window,
 
 #undef DEBUG_GET_DIR_LIST_FROM_PATH
 
-
+/**
+ * get_dir_list_from_path:
+ * Returns: (element-type filename) (transfer full)
+ */
 static GList *
 get_dir_list_from_path (FrWindow *window,
                        char     *path)
diff --git a/src/fr-window.h b/src/fr-window.h
index 859b8f5a..d441d31e 100644
--- a/src/fr-window.h
+++ b/src/fr-window.h
@@ -92,18 +92,43 @@ gboolean        fr_window_present_dialog_if_created    (FrWindow      *window,
 gboolean        fr_window_archive_new                  (FrWindow      *window,
                                                        GFile         *file,
                                                        const char    *mime_type);
+
+/**
+ * fr_window_archive_open:
+ * Returns: (transfer none)
+ */
 FrWindow *      fr_window_archive_open                 (FrWindow      *window,
                                                        GFile         *file,
                                                        GtkWindow     *parent);
 void            fr_window_archive_close                (FrWindow      *window);
+
+/**
+ * fr_window_get_archive_file:
+ * Returns: (transfer none)
+ */
 GFile *         fr_window_get_archive_file             (FrWindow      *window);
+
+/**
+ * fr_window_get_archive_file_for_paste:
+ * Returns: (transfer none)
+ */
 GFile *         fr_window_get_archive_file_for_paste   (FrWindow      *window);
 gboolean        fr_window_archive_is_present           (FrWindow      *window);
 void            fr_window_archive_reload               (FrWindow      *window);
+
+/**
+ * fr_window_archive_add_files:
+ * @file_list: (element-type GFile)
+ */
 void            fr_window_archive_add_files            (FrWindow      *window,
                                                        GList         *file_list, /* GFile list */
                                                        GFile         *base_dir,
                                                        gboolean       update);
+
+/**
+ * fr_window_archive_add_with_filter:
+ * @files: (element-type GFile)
+ */
 void            fr_window_archive_add_with_filter      (FrWindow      *window,
                                                        GList         *files, /* GFile list */
                                                        GFile         *base_dir,
@@ -113,10 +138,25 @@ void            fr_window_archive_add_with_filter      (FrWindow      *window,
                                                        const char    *dest_dir,
                                                        gboolean       update,
                                                        gboolean       follow_links);
+
+/**
+ * fr_window_archive_add_dropped_items:
+ * @file_list: (element-type GFile)
+ */
 void            fr_window_archive_add_dropped_items    (FrWindow      *window,
                                                        GList         *file_list);
+
+/**
+ * fr_window_archive_remove:
+ * @file_list: (element-type GFile)
+ */
 void            fr_window_archive_remove               (FrWindow      *window,
                                                        GList         *file_list);
+
+/**
+ * fr_window_archive_extract:
+ * @file_list: (element-type GFile)
+ */
 void            fr_window_archive_extract              (FrWindow      *window,
                                                        GList         *file_list,
                                                        GFile         *destination,
@@ -171,22 +211,52 @@ void            fr_window_set_list_mode                (FrWindow      *window,
 
 /**/
 
+/**
+ * fr_window_get_file_list_selection:
+ * Returns: (element-type filename) (transfer full)
+ */
 GList *         fr_window_get_file_list_selection      (FrWindow    *window,
                                                        gboolean     recursive,
                                                        gboolean     include_dirs,
                                                        gboolean    *has_dirs);
+
+/**
+ * fr_window_get_file_list_from_path_list:
+ * @path_list: (element-type GtkTreeRowReference)
+ * Returns: (element-type filename) (transfer full)
+ */
 GList *         fr_window_get_file_list_from_path_list (FrWindow    *window,
                                                        GList       *path_list,
                                                        gboolean    *has_dirs);
+
+/**
+ * fr_window_get_file_list_pattern:
+ * Returns: (element-type filename) (transfer full)
+ */
 GList *         fr_window_get_file_list_pattern        (FrWindow    *window,
                                                        const char  *pattern);
 int             fr_window_get_n_selected_files         (FrWindow    *window);
+
+/**
+ * fr_window_get_folder_tree_selection:
+ * Returns: (element-type filename) (transfer full)
+ */
 GList *         fr_window_get_folder_tree_selection    (FrWindow    *window,
                                                        gboolean     recursive,
                                                        gboolean    *has_dirs);
+
+/**
+ * fr_window_get_selection:
+ * Returns: (element-type filename) (transfer full)
+ */
 GList *         fr_window_get_selection                (FrWindow    *window,
                                                        gboolean     from_sidebar,
                                                        char       **return_base_dir);
+
+/**
+ * fr_window_get_list_store:
+ * Returns: (transfer none)
+ */
 GtkTreeModel *  fr_window_get_list_store               (FrWindow    *window);
 void            fr_window_find                         (FrWindow    *window,
                                                        gboolean     active);
@@ -218,15 +288,35 @@ gboolean        fr_window_create_archive_and_continue  (FrWindow   *window,
 void            fr_window_action_save_as               (FrWindow   *window);
 void            fr_window_view_last_output             (FrWindow   *window,
                                                        const char *title);
+
+/**
+ * fr_window_open_files:
+ * @file_list: (element-type GFile)
+ */
 void            fr_window_open_files                   (FrWindow   *window,
                                                        GList      *file_list,
                                                        gboolean    ask_application);
+
+/**
+ * fr_window_open_files_with_command:
+ * @file_list: (element-type GFile)
+ */
 void            fr_window_open_files_with_command      (FrWindow   *window,
                                                        GList      *file_list,
                                                        char       *command);
+
+/**
+ * fr_window_open_files_with_application:
+ * @file_list: (element-type GFile)
+ */
 void            fr_window_open_files_with_application  (FrWindow   *window,
                                                        GList      *file_list,
                                                        GAppInfo   *app);
+
+/**
+ * fr_window_update_files:
+ * @file_list: (element-type GFile)
+ */
 gboolean        fr_window_update_files                 (FrWindow   *window,
                                                        GList      *file_list);
 void            fr_window_update_history_list          (FrWindow   *window);
@@ -235,12 +325,27 @@ void            fr_window_set_default_dir              (FrWindow   *window,
                                                        gboolean    freeze);
 void            fr_window_set_open_default_dir         (FrWindow   *window,
                                                        GFile      *default_dir);
+
+/**
+ * fr_window_get_open_default_dir:
+ * Returns: (transfer none)
+ */
 GFile *         fr_window_get_open_default_dir         (FrWindow   *window);
 void            fr_window_set_add_default_dir          (FrWindow   *window,
                                                        GFile      *default_dir);
+
+/**
+ * fr_window_get_add_default_dir:
+ * Returns: (transfer none)
+ */
 GFile *         fr_window_get_add_default_dir          (FrWindow   *window);
 void            fr_window_set_extract_default_dir      (FrWindow   *window,
                                                        GFile      *default_dir);
+
+/**
+ * fr_window_get_extract_default_dir:
+ * Returns: (transfer none)
+ */
 GFile *         fr_window_get_extract_default_dir      (FrWindow   *window);
 void            fr_window_set_folders_visibility       (FrWindow   *window,
                                                        gboolean    value);
@@ -249,6 +354,10 @@ void            fr_window_use_progress_dialog          (FrWindow   *window,
 
 /* batch mode procedures. */
 
+/**
+ * fr_window_set_current_action:
+ * @free_func: (scope async) (allow-none): Function used to free the data when the action is removed.
+ */
 void            fr_window_set_current_action          (FrWindow      *window,
                                                        FrBatchActionType
                                                                       action,
@@ -260,11 +369,21 @@ void            fr_window_restart_current_action       (FrWindow      *window);
 void            fr_window_batch_new                    (FrWindow      *window,
                                                        const char    *title);
 const char *    fr_window_batch_get_title              (FrWindow      *window);
+
+/**
+ * fr_window_batch_append_action:
+ * @free_func: (scope async) (allow-none): Function used to free the data when the action is removed.
+ */
 void            fr_window_batch_append_action          (FrWindow      *window,
                                                        FrBatchActionType
                                                                       action,
                                                        void          *data,
                                                        GFreeFunc      free_func);
+
+/**
+ * fr_window_batch_replace_current_action:
+ * @free_func: (scope async) (allow-none): Function used to free the data when the action is removed.
+ */
 void            fr_window_batch_replace_current_action (FrWindow      *window,
                                                        FrBatchActionType
                                                                       action,
@@ -287,6 +406,11 @@ void            fr_window_batch__extract               (FrWindow      *window,
 void            fr_window_batch__extract_here          (FrWindow      *window,
                                                        GFile         *archive,
                                                        gboolean       ask_to_open_destination);
+
+/**
+ * fr_window_batch__add_files:
+ * @file_list: (element-type GFile)
+ */
 void            fr_window_batch__add_files             (FrWindow      *window,
                                                        GFile         *archive,
                                                        GList         *file_list);
@@ -296,6 +420,10 @@ void            fr_window_set_notify                   (FrWindow      *window,
 
 /**/
 
+/**
+ * fr_window_file_list_drag_data_get:
+ * @path_list: (element-type GtkTreeRowReference)
+ */
 gboolean        fr_window_file_list_drag_data_get      (FrWindow         *window,
                                                        GdkDragContext   *context,
                                                        GtkSelectionData *selection_data,
@@ -303,6 +431,11 @@ gboolean        fr_window_file_list_drag_data_get      (FrWindow         *window
 void            fr_window_update_dialog_closed         (FrWindow         *window);
 void           fr_window_dnd_extraction_finished      (FrWindow         *window,
                                                        gboolean          error);
+
+/**
+ * fr_window_extract_archive_and_continue:
+ * @file_list: (element-type GFile)
+ */
 void            fr_window_extract_archive_and_continue (FrWindow   *window,
                                                        GList      *file_list,
                                                        GFile      *destination,


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