~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

« back to all changes in this revision

Viewing changes to docs/reference/gtk/html/GtkPrintContext.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-06-11 12:19:30 UTC
  • mfrom: (1.11.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 175.
  • Revision ID: james.westby@ubuntu.com-20100611121930-n4pklvkoqdsg12vm
Tags: 2.21.2-1
* New upstream development release:
  + debian/rules,
    debian/libgtk2.0-0.symbols:
    - Update for new API symbols.
  + debian/patches/070_mandatory-relibtoolize.patch:
    - Regenerated for the new version.
  + debian/control.in:
    - Update GLib (build-) dependency to >= 2.25.8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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>);
66
66
</pre>
67
67
</div>
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
73
73
</pre>
74
74
</div>
86
86
::request-page-setup and ::draw-page signals on the <a class="link" href="gtk-High-level-Printing-API.html#GtkPrintOperation"><span class="type">GtkPrintOperation</span></a>.
87
87
</p>
88
88
<div class="example">
89
 
<a name="id1197656"></a><p class="title"><b>Example 47. Using GtkPrintContext in a ::draw-page callback</b></p>
 
89
<a name="id1063788"></a><p class="title"><b>Example 47. Using GtkPrintContext in a ::draw-page callback</b></p>
90
90
<div class="example-contents">
91
91
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
92
92
    <tbody>
132
132
39
133
133
40</pre></td>
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>
174
174
      </tr>
175
175
    </tbody>
287
287
<hr>
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>
291
291
<p>
292
292
Obtains the width of the <a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a>, in pixels.
293
293
</p>
312
312
<hr>
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>
316
316
<p>
317
317
Obtains the height of the <a class="link" href="GtkPrintContext.html" title="GtkPrintContext"><span class="type">GtkPrintContext</span></a>, in pixels.
318
318
</p>
337
337
<hr>
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>
341
341
<p>
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.
363
363
<hr>
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>
367
367
<p>
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.
469
469
<hr>
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>
477
477
<p>
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.
479
479
</p>
507
507
</tr>
508
508
<tr>
509
509
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
510
 
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the hard margins were retrieved
 
510
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the hard margins were retrieved
511
511
 
512
512
</td>
513
513
</tr>