[gtk+/gi-annotations: 23/31] Update GI annotations in 'Printing'



commit b2d0b3172d17cf21d12186ad18ababb75a2022f3
Author: Pavel Holejsovsky <pholejs src gnome org>
Date:   Sat Jan 15 17:36:29 2011 +0100

    Update GI annotations in 'Printing'
    
    'Printing' group from GTK+ manual is: GtkPrintOperation,
    GtkPrintContext, GtkPrintSettings, GtkPageSetup, GtkPaperSize,
    GtkPrinter, GtkPrintJob, GtkPrintUnixDialog, GtkPageSetupUnixDialog.

 docs/reference/gtk/tmpl/gtkprintoperation.sgml |    9 +++------
 gtk/Makefile.am                                |    1 +
 gtk/gtkpagesetup.c                             |    6 +++---
 gtk/gtkpagesetupunixdialog.c                   |    4 ++--
 gtk/gtkprintcontext.c                          |   10 +++++-----
 gtk/gtkprinter.c                               |   10 +++++-----
 gtk/gtkprinter.h                               |    2 +-
 gtk/gtkprintjob.c                              |   15 +++++++++------
 gtk/gtkprintoperation-unix.c                   |    5 +++--
 gtk/gtkprintoperation.c                        |    6 +++---
 gtk/gtkprintoperation.h                        |   11 +++++++++++
 gtk/gtkprintsettings.c                         |   15 ++++++++-------
 gtk/gtkprintunixdialog.c                       |    4 ++--
 13 files changed, 56 insertions(+), 42 deletions(-)
---
diff --git a/docs/reference/gtk/tmpl/gtkprintoperation.sgml b/docs/reference/gtk/tmpl/gtkprintoperation.sgml
index 00cc328..0b04460 100644
--- a/docs/reference/gtk/tmpl/gtkprintoperation.sgml
+++ b/docs/reference/gtk/tmpl/gtkprintoperation.sgml
@@ -630,14 +630,11 @@ The #GQuark used for #GtkPrintError errors.
 
 <!-- ##### USER_FUNCTION GtkPageSetupDoneFunc ##### -->
 <para>
-The type of function that is passed to gtk_print_run_page_setup_dialog_async().
-This function will be called when the page setup dialog is dismissed, and
-also serves as destroy notify for @data.
+
 </para>
 
- page_setup: the #GtkPageSetup that has been
- data: user data that has been passed to 
-       gtk_print_run_page_setup_dialog_async().
+ page_setup:
+ data:
 
 
 <!-- ##### FUNCTION gtk_print_run_page_setup_dialog_async ##### -->
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 0073917..31b34f6 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -965,6 +965,7 @@ if HAVE_INTROSPECTION
 introspection_files = \
     $(filter-out %private.h gtktextlayout.h, $(gtkinclude_HEADERS)) \
     $(gtk_base_c_sources) \
+    gtkprintoperation-unix.c \
     gtktypebuiltins.h \
     gtktypebuiltins.c
 
diff --git a/gtk/gtkpagesetup.c b/gtk/gtkpagesetup.c
index a00177e..0ba69d3 100644
--- a/gtk/gtkpagesetup.c
+++ b/gtk/gtkpagesetup.c
@@ -526,7 +526,7 @@ gtk_page_setup_get_page_height (GtkPageSetup *setup,
 /**
  * gtk_page_setup_load_file:
  * @setup: a #GtkPageSetup
- * @file_name: the filename to read the page setup from
+ * @file_name: (type filename): the filename to read the page setup from
  * @error: (allow-none): return location for an error, or %NULL
  *
  * Reads the page setup from the file @file_name.
@@ -560,7 +560,7 @@ gtk_page_setup_load_file (GtkPageSetup *setup,
 
 /**
  * gtk_page_setup_new_from_file:
- * @file_name: the filename to read the page setup from
+ * @file_name: (type filename): the filename to read the page setup from
  * @error: (allow-none): return location for an error, or %NULL
  * 
  * Reads the page setup from the file @file_name. Returns a 
@@ -730,7 +730,7 @@ gtk_page_setup_new_from_key_file (GKeyFile     *key_file,
 /**
  * gtk_page_setup_to_file:
  * @setup: a #GtkPageSetup
- * @file_name: the file to save to
+ * @file_name: (type filename): the file to save to
  * @error: (allow-none): return location for errors, or %NULL
  * 
  * This function saves the information from @setup to @file_name.
diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c
index ed1190d..0a4e141 100644
--- a/gtk/gtkpagesetupunixdialog.c
+++ b/gtk/gtkpagesetupunixdialog.c
@@ -1099,7 +1099,7 @@ gtk_page_setup_unix_dialog_set_page_setup (GtkPageSetupUnixDialog *dialog,
  * 
  * Gets the currently selected page setup from the dialog. 
  * 
- * Returns: the current page setup 
+ * Returns: (transfer none): the current page setup 
  *
  * Since: 2.10
  **/
@@ -1196,7 +1196,7 @@ gtk_page_setup_unix_dialog_set_print_settings (GtkPageSetupUnixDialog *dialog,
  * 
  * Gets the current print settings from the dialog.
  * 
- * Returns: the current print settings
+ * Returns: (transfer none): the current print settings
  *
  * Since: 2.10
  **/
diff --git a/gtk/gtkprintcontext.c b/gtk/gtkprintcontext.c
index c512869..d37278c 100644
--- a/gtk/gtkprintcontext.c
+++ b/gtk/gtkprintcontext.c
@@ -253,7 +253,7 @@ _gtk_print_context_set_page_setup (GtkPrintContext *context,
  * Obtains the cairo context that is associated with the
  * #GtkPrintContext.
  *
- * Return value: the cairo context of @context
+ * Return value: (transfer none): the cairo context of @context
  *
  * Since: 2.10
  */
@@ -383,10 +383,10 @@ gtk_print_context_get_dpi_y (GtkPrintContext *context)
 /**
  * gtk_print_context_get_hard_margins:
  * @context: a #GtkPrintContext
- * @top: top hardware printer margin
- * @bottom: bottom hardware printer margin
- * @left: left hardware printer margin
- * @right: right hardware printer margin
+ * @top: (out): top hardware printer margin
+ * @bottom: (out): bottom hardware printer margin
+ * @left: (out): left hardware printer margin
+ * @right: (out): right hardware printer margin
  *
  * Obtains the hardware printer margins of the #GtkPrintContext, in units.
  *
diff --git a/gtk/gtkprinter.c b/gtk/gtkprinter.c
index 4d5112b..95df2f0 100644
--- a/gtk/gtkprinter.c
+++ b/gtk/gtkprinter.c
@@ -414,7 +414,7 @@ gtk_printer_new (const gchar     *name,
  * 
  * Returns the backend of the printer.
  * 
- * Return value: the backend of @printer
+ * Return value: (transfer none): the backend of @printer
  * 
  * Since: 2.10
  */
@@ -994,10 +994,10 @@ gtk_printer_get_default_page_size (GtkPrinter *printer)
 /**
  * gtk_printer_get_hard_margins:
  * @printer: a #GtkPrinter
- * @top: a location to store the top margin in
- * @bottom: a location to store the bottom margin in
- * @left: a location to store the left margin in
- * @right: a location to store the right margin in
+ * @top: (out): a location to store the top margin in
+ * @bottom: (out): a location to store the bottom margin in
+ * @left: (out): a location to store the left margin in
+ * @right: (out): a location to store the right margin in
  *
  * Retrieve the hard margins of @printer, i.e. the margins that define
  * the area at the borders of the paper that the printer cannot print to.
diff --git a/gtk/gtkprinter.h b/gtk/gtkprinter.h
index ba7506a..f2c18c1 100644
--- a/gtk/gtkprinter.h
+++ b/gtk/gtkprinter.h
@@ -124,7 +124,7 @@ gboolean                 gtk_printer_get_hard_margins      (GtkPrinter       *pr
 /**
  * GtkPrinterFunc:
  * @printer: a #GtkPrinter
- * @data: user data passed to gtk_enumerate_printers()
+ * @data: (closure): user data passed to gtk_enumerate_printers()
  *
  * The type of function passed to gtk_enumerate_printers().
  * Note that you need to ref @printer, if you want to keep
diff --git a/gtk/gtkprintjob.c b/gtk/gtkprintjob.c
index d37e122..634e6b4 100644
--- a/gtk/gtkprintjob.c
+++ b/gtk/gtkprintjob.c
@@ -336,7 +336,7 @@ gtk_print_job_new (const gchar      *title,
  * 
  * Gets the #GtkPrintSettings of the print job.
  * 
- * Return value: the settings of @job
+ * Return value: (transfer none): the settings of @job
  *
  * Since: 2.10
  */
@@ -354,7 +354,7 @@ gtk_print_job_get_settings (GtkPrintJob *job)
  * 
  * Gets the #GtkPrinter of the print job.
  * 
- * Return value: the printer of @job
+ * Return value: (transfer none): the printer of @job
  *
  * Since: 2.10
  */
@@ -422,7 +422,7 @@ gtk_print_job_set_status (GtkPrintJob   *job,
 /**
  * gtk_print_job_set_source_file:
  * @job: a #GtkPrintJob
- * @filename: the file to be printed
+ * @filename: (type filename): the file to be printed
  * @error: return location for errors
  * 
  * Make the #GtkPrintJob send an existing document to the 
@@ -471,7 +471,7 @@ gtk_print_job_set_source_file (GtkPrintJob *job,
  * Gets a cairo surface onto which the pages of
  * the print job should be rendered.
  * 
- * Return value: the cairo surface of @job
+ * Return value: (transfer none): the cairo surface of @job
  *
  * Since: 2.10
  **/
@@ -749,7 +749,8 @@ gtk_print_job_set_pages (GtkPrintJob   *job,
  *
  * Gets the page ranges for this job.
  *
- * Returns: a pointer to an array of #GtkPageRange structs
+ * Returns: (array length=n_ranges) (transfer none): a pointer to an
+ * array of #GtkPageRange structs
  *
  * Since: 3.0
  */
@@ -764,7 +765,9 @@ gtk_print_job_get_page_ranges (GtkPrintJob *job,
 /**
  * gtk_print_job_set_page_ranges:
  * @job: a #GtkPrintJob
- * @ranges: pointer to an array of #GtkPageRange structs
+
+ * @ranges: (array length=n_ranges): pointer to an array of
+ *          #GtkPageRange structs
  * @n_ranges: the length of the @ranges array
  *
  * Sets the page ranges for this job.
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c
index 2431371..e220e59 100644
--- a/gtk/gtkprintoperation-unix.c
+++ b/gtk/gtkprintoperation-unix.c
@@ -964,7 +964,7 @@ get_page_setup_dialog (GtkWindow        *parent,
  * setup dialog. See gtk_print_run_page_setup_dialog_async() if this is 
  * a problem.
  * 
- * Return value: a new #GtkPageSetup
+ * Return value: (transfer full): a new #GtkPageSetup
  *
  * Since: 2.10
  */
@@ -999,7 +999,8 @@ gtk_print_run_page_setup_dialog (GtkWindow        *parent,
  * @parent: (allow-none): transient parent, or %NULL
  * @page_setup: (allow-none): an existing #GtkPageSetup, or %NULL
  * @settings: a #GtkPrintSettings
- * @done_cb: a function to call when the user saves the modified page setup
+ * @done_cb: (scope async): a function to call when the user saves
+ *           the modified page setup
  * @data: user data to pass to @done_cb
  * 
  * Runs a page setup dialog, letting the user modify the values from @page_setup. 
diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c
index 96425ed..15eadf1 100644
--- a/gtk/gtkprintoperation.c
+++ b/gtk/gtkprintoperation.c
@@ -892,8 +892,8 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
    * signal is emitted on the operation. Then you can read out any 
    * information you need from the widgets.
    *
-   * Returns: A custom widget that gets embedded in the print dialog,
-   *          or %NULL
+   * Returns: (transfer none): A custom widget that gets embedded in
+   *          the print dialog, or %NULL
    *
    * Since: 2.10
    */
@@ -1891,7 +1891,7 @@ gtk_print_operation_set_custom_tab_label (GtkPrintOperation  *op,
 /**
  * gtk_print_operation_set_export_filename:
  * @op: a #GtkPrintOperation
- * @filename: the filename for the exported file
+ * @filename: (type filename): the filename for the exported file
  * 
  * Sets up the #GtkPrintOperation to generate a file instead
  * of showing the print dialog. The indended use of this function
diff --git a/gtk/gtkprintoperation.h b/gtk/gtkprintoperation.h
index bba15cc..5c2b216 100644
--- a/gtk/gtkprintoperation.h
+++ b/gtk/gtkprintoperation.h
@@ -196,6 +196,17 @@ GtkPageSetup           *gtk_print_run_page_setup_dialog            (GtkWindow
 								    GtkPageSetup       *page_setup,
 								    GtkPrintSettings   *settings);
 
+/**
+ * GtkPageSetupDoneFunc:
+ * @page_setup: the #GtkPageSetup that has been
+ * @data: (closure): user data that has been passed to 
+ *        gtk_print_run_page_setup_dialog_async().
+ *
+ * The type of function that is passed to
+ * gtk_print_run_page_setup_dialog_async().  This function will be
+ * called when the page setup dialog is dismissed, and also serves as
+ * destroy notify for @data.
+ */
 typedef void  (* GtkPageSetupDoneFunc) (GtkPageSetup *page_setup,
 					gpointer      data);
 
diff --git a/gtk/gtkprintsettings.c b/gtk/gtkprintsettings.c
index 7507bd7..64c8e51 100644
--- a/gtk/gtkprintsettings.c
+++ b/gtk/gtkprintsettings.c
@@ -1409,12 +1409,13 @@ gtk_print_settings_set_print_pages (GtkPrintSettings *settings,
 /**
  * gtk_print_settings_get_page_ranges:
  * @settings: a #GtkPrintSettings
- * @num_ranges: return location for the length of the returned array
+ * @num_ranges: (out): return location for the length of the returned array
  *
  * Gets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.
  *
- * Return value: (transfer full): an array of #GtkPageRange<!-- -->s.
- *     Use g_free() to free the array when it is no longer needed.
+ * Return value: (array length=num_ranges) (transfer full): an array
+ *     of #GtkPageRange<!-- -->s.  Use g_free() to free the array when
+ *     it is no longer needed.
  *
  * Since: 2.10
  */
@@ -1471,7 +1472,7 @@ gtk_print_settings_get_page_ranges (GtkPrintSettings *settings,
 /**
  * gtk_print_settings_set_page_ranges:
  * @settings: a #GtkPrintSettings
- * @page_ranges: an array of #GtkPageRange<!-- -->s
+ * @page_ranges: (array length=num_ranges): an array of #GtkPageRange<!-- -->s
  * @num_ranges: the length of @page_ranges
  * 
  * Sets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.
@@ -1676,7 +1677,7 @@ gtk_print_settings_set_output_bin (GtkPrintSettings *settings,
 /**
  * gtk_print_settings_load_file:
  * @settings: a #GtkPrintSettings
- * @file_name: the filename to read the settings from
+ * @file_name: (type filename): the filename to read the settings from
  * @error: (allow-none): return location for errors, or %NULL
  *
  * Reads the print settings from @file_name. If the file could not be loaded
@@ -1711,7 +1712,7 @@ gtk_print_settings_load_file (GtkPrintSettings *settings,
 
 /**
  * gtk_print_settings_new_from_file:
- * @file_name: the filename to read the settings from
+ * @file_name: (type filename): the filename to read the settings from
  * @error: (allow-none): return location for errors, or %NULL
  * 
  * Reads the print settings from @file_name. Returns a new #GtkPrintSettings
@@ -1836,7 +1837,7 @@ gtk_print_settings_new_from_key_file (GKeyFile     *key_file,
 /**
  * gtk_print_settings_to_file:
  * @settings: a #GtkPrintSettings
- * @file_name: the file to save to
+ * @file_name: (type filename): the file to save to
  * @error: (allow-none): return location for errors, or %NULL
  * 
  * This function saves the print settings from @settings to @file_name. If the
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index d4d1211..d555c1b 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -3884,7 +3884,7 @@ gtk_print_unix_dialog_new (const gchar *title,
  *
  * Gets the currently selected printer.
  *
- * Returns: the currently selected printer
+ * Returns: (transfer none): the currently selected printer
  *
  * Since: 2.10
  */
@@ -3933,7 +3933,7 @@ gtk_print_unix_dialog_set_page_setup (GtkPrintUnixDialog *dialog,
  *
  * Gets the page setup that is used by the #GtkPrintUnixDialog.
  *
- * Returns: the page setup of @dialog.
+ * Returns: (transfer none): the page setup of @dialog.
  *
  * Since: 2.10
  */



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