Add an example
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2006-04-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkprintoperation.sgml: Add an example
|
||||
|
||||
2006-04-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkpapersize.sgml:
|
||||
|
||||
@@ -29,18 +29,47 @@ When the user finished the dialog various signals will be emitted on the
|
||||
to catch and render the page on the provided #GtkPrintContext using Cairo.
|
||||
</para>
|
||||
|
||||
<!-- TODO short example here -->
|
||||
<informalexample><programlisting>
|
||||
static GtkPrintSettings *settings = NULL;
|
||||
|
||||
static void
|
||||
do_print (void)
|
||||
{
|
||||
GtkPrintOperation *print;
|
||||
GtkPrintOperationResult res;
|
||||
|
||||
print = gtk_print_operation_new (<!-- -->);
|
||||
|
||||
if (settings != NULL)
|
||||
gtk_print_operation_set_print_settings (print, settings);
|
||||
|
||||
g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), NULL);
|
||||
g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
|
||||
|
||||
res = gtk_print_operation_run (print, GTK_WINDOW (main_window), NULL);
|
||||
|
||||
if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
|
||||
{
|
||||
if (settings != NULL)
|
||||
g_object_unref (settings);
|
||||
settings = g_object_ref (gtk_print_operation_get_print_settings (print));
|
||||
}
|
||||
|
||||
g_object_unref (print);
|
||||
}
|
||||
|
||||
</programlisting></informalexample>
|
||||
|
||||
<para>
|
||||
Printing support was added in GTK+ 2.10.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkPrintContext, #GtkPrintUnixDialog
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
@@ -49,8 +78,48 @@ Printing support was added in GTK+ 2.10.
|
||||
|
||||
</para>
|
||||
|
||||
@parent_instance:
|
||||
@priv:
|
||||
|
||||
<!-- ##### SIGNAL GtkPrintOperation::begin-print ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@printoperation: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkPrintOperation::draw-page ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@printoperation: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### SIGNAL GtkPrintOperation::end-print ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@printoperation: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkPrintOperation::request-page-setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@printoperation: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
|
||||
<!-- ##### SIGNAL GtkPrintOperation::status-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@printoperation: the object which received the signal.
|
||||
|
||||
<!-- ##### ENUM GtkPrintStatus ##### -->
|
||||
<para>
|
||||
@@ -62,7 +131,8 @@ Printing support was added in GTK+ 2.10.
|
||||
@GTK_PRINT_STATUS_GENERATING_DATA:
|
||||
@GTK_PRINT_STATUS_SENDING_DATA:
|
||||
@GTK_PRINT_STATUS_PENDING:
|
||||
@GTK_PRINT_STATUS_PROCESSING:
|
||||
@GTK_PRINT_STATUS_PENDING_ISSUE:
|
||||
@GTK_PRINT_STATUS_PRINTING:
|
||||
@GTK_PRINT_STATUS_FINISHED:
|
||||
@GTK_PRINT_STATUS_FINISHED_ABORTED:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user