<refentry id="gdk-Pango-Interaction">
<refmeta>
<refentrytitle>Pango Interaction</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Pango Interaction</refname><refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gdk/gdk.h&gt;


<link linkend="PangoContext">PangoContext</link>* <link linkend="gdk-pango-context-get">gdk_pango_context_get</link>         (void);
void        <link linkend="gdk-pango-context-set-colormap">gdk_pango_context_set_colormap</link>  (<link linkend="PangoContext">PangoContext</link> *context,
                                             <link linkend="GdkColormap">GdkColormap</link> *colormap);
struct      <link linkend="GdkPangoAttrEmbossed">GdkPangoAttrEmbossed</link>;
struct      <link linkend="GdkPangoAttrStipple">GdkPangoAttrStipple</link>;
<link linkend="PangoAttribute">PangoAttribute</link>* <link linkend="gdk-pango-attr-embossed-new">gdk_pango_attr_embossed_new</link> (<link linkend="gboolean">gboolean</link> embossed);
<link linkend="PangoAttribute">PangoAttribute</link>* <link linkend="gdk-pango-attr-stipple-new">gdk_pango_attr_stipple_new</link>  (<link linkend="GdkBitmap">GdkBitmap</link> *stipple);
<link linkend="GdkRegion">GdkRegion</link>*  <link linkend="gdk-pango-layout-get-clip-region">gdk_pango_layout_get_clip_region</link>
                                            (<link linkend="PangoLayout">PangoLayout</link> *layout,
                                             <link linkend="gint">gint</link> x_origin,
                                             <link linkend="gint">gint</link> y_origin,
                                             <link linkend="gint">gint</link> *index_ranges,
                                             <link linkend="gint">gint</link> n_ranges);
<link linkend="GdkRegion">GdkRegion</link>*  <link linkend="gdk-pango-layout-line-get-clip-region">gdk_pango_layout_line_get_clip_region</link>
                                            (<link linkend="PangoLayoutLine">PangoLayoutLine</link> *line,
                                             <link linkend="gint">gint</link> x_origin,
                                             <link linkend="gint">gint</link> y_origin,
                                             <link linkend="gint">gint</link> *index_ranges,
                                             <link linkend="gint">gint</link> n_ranges);
</synopsis>
</refsynopsisdiv>





<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gdk-pango-context-get">gdk_pango_context_get ()</title>
<programlisting><link linkend="PangoContext">PangoContext</link>* gdk_pango_context_get         (void);</programlisting>
<para>
Creates a <link linkend="PangoContext">PangoContext</link> for the default GDK display.
</para>
<para>
The context must be freed when you're finished with it.
</para>
<para>
When using GTK+, normally you should use <link linkend="gtk-widget-get-pango-context">gtk_widget_get_pango_context</link>()
instead of this function, to get the appropriate context for
the widget you intend to render text onto.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a new <link linkend="PangoContext">PangoContext</link> for the default display
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pango-context-set-colormap">gdk_pango_context_set_colormap ()</title>
<programlisting>void        gdk_pango_context_set_colormap  (<link linkend="PangoContext">PangoContext</link> *context,
                                             <link linkend="GdkColormap">GdkColormap</link> *colormap);</programlisting>
<para>
Sets the colormap to be used for drawing with <parameter>context</parameter>.
If you obtained your context from <link linkend="gtk-widget-get-pango-context">gtk_widget_get_pango_context</link>() or
<link linkend="gtk-widget-create-pango-context">gtk_widget_create_pango_context</link>(), the colormap will already be set
to the colormap for the widget, so you shouldn't need this
function.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>context</parameter>&nbsp;:</entry>
<entry> a <link linkend="PangoContext">PangoContext</link>
</entry></row>
<row><entry align="right"><parameter>colormap</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdkColormap">GdkColormap</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="GdkPangoAttrEmbossed">struct GdkPangoAttrEmbossed</title>
<programlisting>struct GdkPangoAttrEmbossed
{
  PangoAttribute attr;
  gboolean embossed;
};
</programlisting>
<para>
A Pango text attribute containing a embossed bitmap to be used when
rendering the text.
</para><informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row>
<entry><link linkend="PangoAttribute">PangoAttribute</link> <structfield>attr</structfield></entry>
<entry>the <link linkend="PangoAttribute">PangoAttribute</link>.
</entry>
</row>
<row>
<entry><link linkend="gboolean">gboolean</link> <structfield>embossed</structfield></entry>
<entry>the embossed bitmap.

</entry>
</row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="GdkPangoAttrStipple">struct GdkPangoAttrStipple</title>
<programlisting>struct GdkPangoAttrStipple
{
  PangoAttribute attr;
  GdkBitmap *stipple;
};
</programlisting>
<para>
A Pango text attribute containing a stipple bitmap to be used when
rendering the text.
</para><informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row>
<entry><link linkend="PangoAttribute">PangoAttribute</link> <structfield>attr</structfield></entry>
<entry>the <link linkend="PangoAttribute">PangoAttribute</link>.
</entry>
</row>
<row>
<entry><link linkend="GdkBitmap">GdkBitmap</link> *<structfield>stipple</structfield></entry>
<entry>the stipple bitmap.

</entry>
</row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pango-attr-embossed-new">gdk_pango_attr_embossed_new ()</title>
<programlisting><link linkend="PangoAttribute">PangoAttribute</link>* gdk_pango_attr_embossed_new (<link linkend="gboolean">gboolean</link> embossed);</programlisting>
<para>
Creates a new attribute containing a embossed bitmap to be used when
rendering the text.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>embossed</parameter>&nbsp;:</entry>
<entry> a bitmap to be set as embossed
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> new <link linkend="PangoAttribute">PangoAttribute</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pango-attr-stipple-new">gdk_pango_attr_stipple_new ()</title>
<programlisting><link linkend="PangoAttribute">PangoAttribute</link>* gdk_pango_attr_stipple_new  (<link linkend="GdkBitmap">GdkBitmap</link> *stipple);</programlisting>
<para>
Creates a new attribute containing a stipple bitmap to be used when
rendering the text.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>stipple</parameter>&nbsp;:</entry>
<entry> a bitmap to be set as stipple
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> new <link linkend="PangoAttribute">PangoAttribute</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pango-layout-get-clip-region">gdk_pango_layout_get_clip_region ()</title>
<programlisting><link linkend="GdkRegion">GdkRegion</link>*  gdk_pango_layout_get_clip_region
                                            (<link linkend="PangoLayout">PangoLayout</link> *layout,
                                             <link linkend="gint">gint</link> x_origin,
                                             <link linkend="gint">gint</link> y_origin,
                                             <link linkend="gint">gint</link> *index_ranges,
                                             <link linkend="gint">gint</link> n_ranges);</programlisting>
<para>
Obtains a clip region which contains the areas where the given ranges
of text would be drawn. <parameter>x_origin</parameter> and <parameter>y_origin</parameter> are the same position
you would pass to <link linkend="gdk-draw-layout-line">gdk_draw_layout_line</link>(). <parameter>index_ranges</parameter> should contain
ranges of bytes in the layout's text.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>layout</parameter>&nbsp;:</entry>
<entry> a <link linkend="PangoLayout">PangoLayout</link> 
</entry></row>
<row><entry align="right"><parameter>x_origin</parameter>&nbsp;:</entry>
<entry> X pixel where you intend to draw the layout with this clip
</entry></row>
<row><entry align="right"><parameter>y_origin</parameter>&nbsp;:</entry>
<entry> Y pixel where you intend to draw the layout with this clip
</entry></row>
<row><entry align="right"><parameter>index_ranges</parameter>&nbsp;:</entry>
<entry> array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
</entry></row>
<row><entry align="right"><parameter>n_ranges</parameter>&nbsp;:</entry>
<entry> number of ranges in <parameter>index_ranges</parameter>, i.e. half the size of <parameter>index_ranges</parameter>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a clip region containing the given ranges
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pango-layout-line-get-clip-region">gdk_pango_layout_line_get_clip_region ()</title>
<programlisting><link linkend="GdkRegion">GdkRegion</link>*  gdk_pango_layout_line_get_clip_region
                                            (<link linkend="PangoLayoutLine">PangoLayoutLine</link> *line,
                                             <link linkend="gint">gint</link> x_origin,
                                             <link linkend="gint">gint</link> y_origin,
                                             <link linkend="gint">gint</link> *index_ranges,
                                             <link linkend="gint">gint</link> n_ranges);</programlisting>
<para>
Obtains a clip region which contains the areas where the given
ranges of text would be drawn. <parameter>x_origin</parameter> and <parameter>y_origin</parameter> are the same
position you would pass to <link linkend="gdk-draw-layout-line">gdk_draw_layout_line</link>(). <parameter>index_ranges</parameter>
should contain ranges of bytes in the layout's text. The clip
region will include space to the left or right of the line (to the
layout bounding box) if you have indexes above or below the indexes
contained inside the line. This is to draw the selection all the way
to the side of the layout. However, the clip region is in line coordinates,
not layout coordinates.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>line</parameter>&nbsp;:</entry>
<entry> a <link linkend="PangoLayoutLine">PangoLayoutLine</link> 
</entry></row>
<row><entry align="right"><parameter>x_origin</parameter>&nbsp;:</entry>
<entry> X pixel where you intend to draw the layout line with this clip
</entry></row>
<row><entry align="right"><parameter>y_origin</parameter>&nbsp;:</entry>
<entry> baseline pixel where you intend to draw the layout line with this clip
</entry></row>
<row><entry align="right"><parameter>index_ranges</parameter>&nbsp;:</entry>
<entry> array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
</entry></row>
<row><entry align="right"><parameter>n_ranges</parameter>&nbsp;:</entry>
<entry> number of ranges in <parameter>index_ranges</parameter>, i.e. half the size of <parameter>index_ranges</parameter>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a clip region containing the given ranges
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>




</refentry>
