<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkPrintContext">
<refmeta>
<refentrytitle role="top_of_page" id="GtkPrintContext.top_of_page">GtkPrintContext</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkPrintContext</refname>
<refpurpose>Encapsulates context for drawing pages</refpurpose>
</refnamediv>

<refsect1 id="GtkPrintContext.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="cairo-t"><returnvalue>cairo_t</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-print-context-get-cairo-context">gtk_print_context_get_cairo_context</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-print-context-set-cairo-context">gtk_print_context_set_cairo_context</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkPageSetup"><returnvalue>GtkPageSetup</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-print-context-get-page-setup">gtk_print_context_get_page_setup</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-print-context-get-width">gtk_print_context_get_width</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-print-context-get-height">gtk_print_context_get_height</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-print-context-get-dpi-x">gtk_print_context_get_dpi_x</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-print-context-get-dpi-y">gtk_print_context_get_dpi_y</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoFontMap"><returnvalue>PangoFontMap</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-print-context-get-pango-fontmap">gtk_print_context_get_pango_fontmap</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoContext"><returnvalue>PangoContext</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-print-context-create-pango-context">gtk_print_context_create_pango_context</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoLayout"><returnvalue>PangoLayout</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-print-context-create-pango-layout">gtk_print_context_create_pango_layout</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-print-context-get-hard-margins">gtk_print_context_get_hard_margins</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkPrintContext.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkPrintContext-struct">GtkPrintContext</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkPrintContext.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkPrintContext
</screen>
</refsect1>

<refsect1 id="GtkPrintContext.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkPrintContext.description" role="desc">
<title role="desc.title">Description</title>
<para>A GtkPrintContext encapsulates context information that is required when
drawing pages for printing, such as the cairo context and important
parameters like page size and resolution. It also lets you easily
create <link linkend="PangoLayout"><type>PangoLayout</type></link> and <link linkend="PangoContext"><type>PangoContext</type></link> objects that match the font metrics
of the cairo surface.</para>
<para>GtkPrintContext objects gets passed to the <link linkend="GtkPrintOperation-begin-print"><type>“begin-print”</type></link>,
<link linkend="GtkPrintOperation-end-print"><type>“end-print”</type></link>, <link linkend="GtkPrintOperation-request-page-setup"><type>“request-page-setup”</type></link> and
<link linkend="GtkPrintOperation-draw-page"><type>“draw-page”</type></link> signals on the <link linkend="GtkPrintOperation"><type>GtkPrintOperation</type></link>.</para>
<refsect3><title>Using GtkPrintContext in a <link linkend="GtkPrintOperation-draw-page"><type>“draw-page”</type></link> callback</title><informalexample><programlisting role="example"><![CDATA[
static void
draw_page (GtkPrintOperation *operation,
	   GtkPrintContext   *context,
	   int                page_nr)
{
  cairo_t *cr;
  PangoLayout *layout;
  PangoFontDescription *desc;

  cr = gtk_print_context_get_cairo_context (context);

  // Draw a red rectangle, as wide as the paper (inside the margins)
  cairo_set_source_rgb (cr, 1.0, 0, 0);
  cairo_rectangle (cr, 0, 0, gtk_print_context_get_width (context), 50);

  cairo_fill (cr);

  // Draw some lines
  cairo_move_to (cr, 20, 10);
  cairo_line_to (cr, 40, 20);
  cairo_arc (cr, 60, 60, 20, 0, M_PI);
  cairo_line_to (cr, 80, 20);

  cairo_set_source_rgb (cr, 0, 0, 0);
  cairo_set_line_width (cr, 5);
  cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
  cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);

  cairo_stroke (cr);

  // Draw some text
  layout = gtk_print_context_create_pango_layout (context);
  pango_layout_set_text (layout, "Hello World! Printing is easy", -1);
  desc = pango_font_description_from_string ("sans 28");
  pango_layout_set_font_description (layout, desc);
  pango_font_description_free (desc);

  cairo_move_to (cr, 30, 20);
  pango_cairo_layout_path (cr, layout);

  // Font Outline
  cairo_set_source_rgb (cr, 0.93, 1.0, 0.47);
  cairo_set_line_width (cr, 0.5);
  cairo_stroke_preserve (cr);

  // Font Fill
  cairo_set_source_rgb (cr, 0, 0.0, 1.0);
  cairo_fill (cr);

  g_object_unref (layout);
}
]]></programlisting></informalexample>
<para></para>
<para>Printing support was added in GTK+ 2.10.</para>
</refsect3>

</refsect1>
<refsect1 id="GtkPrintContext.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-print-context-get-cairo-context" role="function">
<title>gtk_print_context_get_cairo_context&#160;()</title>
<indexterm zone="gtk-print-context-get-cairo-context"><primary>gtk_print_context_get_cairo_context</primary></indexterm>
<programlisting language="C"><link linkend="cairo-t"><returnvalue>cairo_t</returnvalue></link>&#160;*
gtk_print_context_get_cairo_context (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>);</programlisting>
<para>Obtains the cairo context that is associated with the
<link linkend="GtkPrintContext"><type>GtkPrintContext</type></link>.</para>
<refsect3 id="gtk-print-context-get-cairo-context.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-print-context-get-cairo-context.returns" role="returns">
<title>Returns</title>
<para>the cairo context of <parameter>context</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-print-context-set-cairo-context" role="function">
<title>gtk_print_context_set_cairo_context&#160;()</title>
<indexterm zone="gtk-print-context-set-cairo-context"><primary>gtk_print_context_set_cairo_context</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_print_context_set_cairo_context (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>,
                                     <parameter><link linkend="cairo-t"><type>cairo_t</type></link> *cr</parameter>,
                                     <parameter><link linkend="double"><type>double</type></link> dpi_x</parameter>,
                                     <parameter><link linkend="double"><type>double</type></link> dpi_y</parameter>);</programlisting>
<para>Sets a new cairo context on a print context. </para>
<para>This function is intended to be used when implementing
an internal print preview, it is not needed for printing,
since GTK+ itself creates a suitable cairo context in that
case.</para>
<refsect3 id="gtk-print-context-set-cairo-context.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cr</para></entry>
<entry role="parameter_description"><para>the cairo context</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dpi_x</para></entry>
<entry role="parameter_description"><para>the horizontal resolution to use with <parameter>cr</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dpi_y</para></entry>
<entry role="parameter_description"><para>the vertical resolution to use with <parameter>cr</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-print-context-get-page-setup" role="function">
<title>gtk_print_context_get_page_setup&#160;()</title>
<indexterm zone="gtk-print-context-get-page-setup"><primary>gtk_print_context_get_page_setup</primary></indexterm>
<programlisting language="C"><link linkend="GtkPageSetup"><returnvalue>GtkPageSetup</returnvalue></link>&#160;*
gtk_print_context_get_page_setup (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>);</programlisting>
<para>Obtains the <link linkend="GtkPageSetup"><type>GtkPageSetup</type></link> that determines the page
dimensions of the <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link>.</para>
<refsect3 id="gtk-print-context-get-page-setup.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-print-context-get-page-setup.returns" role="returns">
<title>Returns</title>
<para>the page setup of <parameter>context</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-print-context-get-width" role="function">
<title>gtk_print_context_get_width&#160;()</title>
<indexterm zone="gtk-print-context-get-width"><primary>gtk_print_context_get_width</primary></indexterm>
<programlisting language="C"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
gtk_print_context_get_width (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>);</programlisting>
<para>Obtains the width of the <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link>, in pixels.</para>
<refsect3 id="gtk-print-context-get-width.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-print-context-get-width.returns" role="returns">
<title>Returns</title>
<para> the width of <parameter>context</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-print-context-get-height" role="function">
<title>gtk_print_context_get_height&#160;()</title>
<indexterm zone="gtk-print-context-get-height"><primary>gtk_print_context_get_height</primary></indexterm>
<programlisting language="C"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
gtk_print_context_get_height (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>);</programlisting>
<para>Obtains the height of the <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link>, in pixels.</para>
<refsect3 id="gtk-print-context-get-height.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-print-context-get-height.returns" role="returns">
<title>Returns</title>
<para> the height of <parameter>context</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-print-context-get-dpi-x" role="function">
<title>gtk_print_context_get_dpi_x&#160;()</title>
<indexterm zone="gtk-print-context-get-dpi-x"><primary>gtk_print_context_get_dpi_x</primary></indexterm>
<programlisting language="C"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
gtk_print_context_get_dpi_x (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>);</programlisting>
<para>Obtains the horizontal resolution of the <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link>,
in dots per inch.</para>
<refsect3 id="gtk-print-context-get-dpi-x.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-print-context-get-dpi-x.returns" role="returns">
<title>Returns</title>
<para> the horizontal resolution of <parameter>context</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-print-context-get-dpi-y" role="function">
<title>gtk_print_context_get_dpi_y&#160;()</title>
<indexterm zone="gtk-print-context-get-dpi-y"><primary>gtk_print_context_get_dpi_y</primary></indexterm>
<programlisting language="C"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
gtk_print_context_get_dpi_y (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>);</programlisting>
<para>Obtains the vertical resolution of the <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link>,
in dots per inch.</para>
<refsect3 id="gtk-print-context-get-dpi-y.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-print-context-get-dpi-y.returns" role="returns">
<title>Returns</title>
<para> the vertical resolution of <parameter>context</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-print-context-get-pango-fontmap" role="function">
<title>gtk_print_context_get_pango_fontmap&#160;()</title>
<indexterm zone="gtk-print-context-get-pango-fontmap"><primary>gtk_print_context_get_pango_fontmap</primary></indexterm>
<programlisting language="C"><link linkend="PangoFontMap"><returnvalue>PangoFontMap</returnvalue></link>&#160;*
gtk_print_context_get_pango_fontmap (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>);</programlisting>
<para>Returns a <link linkend="PangoFontMap"><type>PangoFontMap</type></link> that is suitable for use
with the <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link>.</para>
<refsect3 id="gtk-print-context-get-pango-fontmap.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-print-context-get-pango-fontmap.returns" role="returns">
<title>Returns</title>
<para>the font map of <parameter>context</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-print-context-create-pango-context" role="function">
<title>gtk_print_context_create_pango_context&#160;()</title>
<indexterm zone="gtk-print-context-create-pango-context"><primary>gtk_print_context_create_pango_context</primary></indexterm>
<programlisting language="C"><link linkend="PangoContext"><returnvalue>PangoContext</returnvalue></link>&#160;*
gtk_print_context_create_pango_context
                               (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>);</programlisting>
<para>Creates a new <link linkend="PangoContext"><type>PangoContext</type></link> that can be used with the
<link linkend="GtkPrintContext"><type>GtkPrintContext</type></link>.</para>
<refsect3 id="gtk-print-context-create-pango-context.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-print-context-create-pango-context.returns" role="returns">
<title>Returns</title>
<para>a new Pango context for <parameter>context</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-print-context-create-pango-layout" role="function">
<title>gtk_print_context_create_pango_layout&#160;()</title>
<indexterm zone="gtk-print-context-create-pango-layout"><primary>gtk_print_context_create_pango_layout</primary></indexterm>
<programlisting language="C"><link linkend="PangoLayout"><returnvalue>PangoLayout</returnvalue></link>&#160;*
gtk_print_context_create_pango_layout (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>);</programlisting>
<para>Creates a new <link linkend="PangoLayout"><type>PangoLayout</type></link> that is suitable for use
with the <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link>.</para>
<refsect3 id="gtk-print-context-create-pango-layout.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-print-context-create-pango-layout.returns" role="returns">
<title>Returns</title>
<para>a new Pango layout for <parameter>context</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-print-context-get-hard-margins" role="function">
<title>gtk_print_context_get_hard_margins&#160;()</title>
<indexterm zone="gtk-print-context-get-hard-margins"><primary>gtk_print_context_get_hard_margins</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_print_context_get_hard_margins (<parameter><link linkend="GtkPrintContext"><type>GtkPrintContext</type></link> *context</parameter>,
                                    <parameter><link linkend="gdouble"><type>gdouble</type></link> *top</parameter>,
                                    <parameter><link linkend="gdouble"><type>gdouble</type></link> *bottom</parameter>,
                                    <parameter><link linkend="gdouble"><type>gdouble</type></link> *left</parameter>,
                                    <parameter><link linkend="gdouble"><type>gdouble</type></link> *right</parameter>);</programlisting>
<para>Obtains the hardware printer margins of the <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link>, in units.</para>
<refsect3 id="gtk-print-context-get-hard-margins.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPrintContext"><type>GtkPrintContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>top</para></entry>
<entry role="parameter_description"><para>top hardware printer margin. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>bottom</para></entry>
<entry role="parameter_description"><para>bottom hardware printer margin. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>left</para></entry>
<entry role="parameter_description"><para>left hardware printer margin. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>right</para></entry>
<entry role="parameter_description"><para>right hardware printer margin. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-print-context-get-hard-margins.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the hard margins were retrieved</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkPrintContext.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkPrintContext-struct" role="struct">
<title>GtkPrintContext</title>
<indexterm zone="GtkPrintContext-struct"><primary>GtkPrintContext</primary></indexterm>
<programlisting language="C">typedef struct _GtkPrintContext GtkPrintContext;</programlisting>
</refsect2>

</refsect1>

</refentry>
