49
49
<em class="parameter"><code><span class="type">double</span> dpi_x</code></em>,
50
50
<em class="parameter"><code><span class="type">double</span> dpi_y</code></em>);
51
51
<a class="link" href="GtkPageSetup.html" title="GtkPageSetup"><span class="returnvalue">GtkPageSetup</span></a> * <a class="link" href="GtkPrintContext.html#gtk-print-context-get-page-setup" title="gtk_print_context_get_page_setup ()">gtk_print_context_get_page_setup</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
52
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="GtkPrintContext.html#gtk-print-context-get-width" title="gtk_print_context_get_width ()">gtk_print_context_get_width</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
53
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="GtkPrintContext.html#gtk-print-context-get-height" title="gtk_print_context_get_height ()">gtk_print_context_get_height</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
54
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="GtkPrintContext.html#gtk-print-context-get-dpi-x" title="gtk_print_context_get_dpi_x ()">gtk_print_context_get_dpi_x</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
55
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="GtkPrintContext.html#gtk-print-context-get-dpi-y" title="gtk_print_context_get_dpi_y ()">gtk_print_context_get_dpi_y</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
52
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="GtkPrintContext.html#gtk-print-context-get-width" title="gtk_print_context_get_width ()">gtk_print_context_get_width</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
53
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="GtkPrintContext.html#gtk-print-context-get-height" title="gtk_print_context_get_height ()">gtk_print_context_get_height</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
54
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="GtkPrintContext.html#gtk-print-context-get-dpi-x" title="gtk_print_context_get_dpi_x ()">gtk_print_context_get_dpi_x</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
55
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="GtkPrintContext.html#gtk-print-context-get-dpi-y" title="gtk_print_context_get_dpi_y ()">gtk_print_context_get_dpi_y</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
56
56
<a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontMap"><span class="returnvalue">PangoFontMap</span></a> * <a class="link" href="GtkPrintContext.html#gtk-print-context-get-pango-fontmap" title="gtk_print_context_get_pango_fontmap ()">gtk_print_context_get_pango_fontmap</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
57
57
<a href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"><span class="returnvalue">PangoContext</span></a> * <a class="link" href="GtkPrintContext.html#gtk-print-context-create-pango-context" title="gtk_print_context_create_pango_context ()">gtk_print_context_create_pango_context</a>
58
58
(<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
59
59
<a href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout"><span class="returnvalue">PangoLayout</span></a> * <a class="link" href="GtkPrintContext.html#gtk-print-context-create-pango-layout" title="gtk_print_context_create_pango_layout ()">gtk_print_context_create_pango_layout</a>
60
60
(<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);
61
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkPrintContext.html#gtk-print-context-get-hard-margins" title="gtk_print_context_get_hard_margins ()">gtk_print_context_get_hard_margins</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>,
62
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *top</code></em>,
63
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *bottom</code></em>,
64
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *left</code></em>,
65
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *right</code></em>);
61
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkPrintContext.html#gtk-print-context-get-hard-margins" title="gtk_print_context_get_hard_margins ()">gtk_print_context_get_hard_margins</a> (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>,
62
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *top</code></em>,
63
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *bottom</code></em>,
64
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *left</code></em>,
65
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *right</code></em>);
68
68
<div class="refsect1" title="Object Hierarchy">
69
69
<a name="GtkPrintContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
70
70
<pre class="synopsis">
71
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
71
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
72
72
+----GtkPrintContext
134
134
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
135
<span class="function">draw_page</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="gtk-High-level-Printing-API.html#GtkPrintOperation">GtkPrintOperation</a> </span><span class="symbol">*</span><span class="normal">operation</span><span class="symbol">,</span>
136
<span class="normal"> <a href="GtkPrintContext.html">GtkPrintContext</a> </span><span class="symbol">*</span><span class="normal">context</span><span class="symbol">,</span>
137
<span class="normal"> </span><span class="type">int</span><span class="normal"> page_nr</span><span class="symbol">)</span>
135
<span class="function">draw_page</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GtkPrintOperation</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">operation</span><span class="symbol">,</span>
136
<span class="normal"> </span><span class="usertype">GtkPrintContext</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">context</span><span class="symbol">,</span>
137
<span class="normal"> </span><span class="type">int</span><span class="normal"> page_nr</span><span class="symbol">)</span>
138
138
<span class="cbracket">{</span>
139
<span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t">cairo_t</a> </span><span class="symbol">*</span><span class="normal">cr</span><span class="symbol">;</span>
140
<span class="normal"> <a href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout">PangoLayout</a> </span><span class="symbol">*</span><span class="normal">layout</span><span class="symbol">;</span>
141
<span class="normal"> <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> </span><span class="symbol">*</span><span class="normal">desc</span><span class="symbol">;</span>
139
<span class="normal"> </span><span class="usertype">cairo_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">cr</span><span class="symbol">;</span>
140
<span class="normal"> </span><span class="usertype">PangoLayout</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">layout</span><span class="symbol">;</span>
141
<span class="normal"> </span><span class="usertype">PangoFontDescription</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">desc</span><span class="symbol">;</span>
142
142
<span class="normal"> cr </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkPrintContext.html#gtk-print-context-get-cairo-context">gtk_print_context_get_cairo_context</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">context</span><span class="symbol">);</span>
143
143
<span class="normal"> </span><span class="comment">/* Draw a red rectangle, as wide as the paper (inside the margins) */</span>
144
144
<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-set-source-rgb">cairo_set_source_rgb</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1.0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
169
169
<span class="normal"> </span><span class="comment">/* Font Fill */</span>
170
170
<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-set-source-rgb">cairo_set_source_rgb</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1.0</span><span class="symbol">);</span>
171
171
<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-fill">cairo_fill</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
172
<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">layout</span><span class="symbol">);</span>
172
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">layout</span><span class="symbol">);</span>
173
173
<span class="cbracket">}</span></pre></td>
288
288
<div class="refsect2" title="gtk_print_context_get_width ()">
289
289
<a name="gtk-print-context-get-width"></a><h3>gtk_print_context_get_width ()</h3>
290
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> gtk_print_context_get_width (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);</pre>
290
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> gtk_print_context_get_width (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);</pre>
292
292
Obtains the width of the <a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a>, in pixels.
313
313
<div class="refsect2" title="gtk_print_context_get_height ()">
314
314
<a name="gtk-print-context-get-height"></a><h3>gtk_print_context_get_height ()</h3>
315
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> gtk_print_context_get_height (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);</pre>
315
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> gtk_print_context_get_height (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);</pre>
317
317
Obtains the height of the <a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a>, in pixels.
338
338
<div class="refsect2" title="gtk_print_context_get_dpi_x ()">
339
339
<a name="gtk-print-context-get-dpi-x"></a><h3>gtk_print_context_get_dpi_x ()</h3>
340
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> gtk_print_context_get_dpi_x (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);</pre>
340
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> gtk_print_context_get_dpi_x (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);</pre>
342
342
Obtains the horizontal resolution of the <a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a>,
343
343
in dots per inch.
364
364
<div class="refsect2" title="gtk_print_context_get_dpi_y ()">
365
365
<a name="gtk-print-context-get-dpi-y"></a><h3>gtk_print_context_get_dpi_y ()</h3>
366
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> gtk_print_context_get_dpi_y (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);</pre>
366
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> gtk_print_context_get_dpi_y (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>);</pre>
368
368
Obtains the vertical resolution of the <a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a>,
369
369
in dots per inch.
470
470
<div class="refsect2" title="gtk_print_context_get_hard_margins ()">
471
471
<a name="gtk-print-context-get-hard-margins"></a><h3>gtk_print_context_get_hard_margins ()</h3>
472
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_print_context_get_hard_margins (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>,
473
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *top</code></em>,
474
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *bottom</code></em>,
475
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *left</code></em>,
476
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *right</code></em>);</pre>
472
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_print_context_get_hard_margins (<em class="parameter"><code><a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a> *context</code></em>,
473
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *top</code></em>,
474
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *bottom</code></em>,
475
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *left</code></em>,
476
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *right</code></em>);</pre>
478
478
Obtains the hardware printer margins of the <a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a>, in units.