<?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">
]>
<refentry id="gdk4-GdkCairoContext">
<refmeta>
<refentrytitle role="top_of_page" id="gdk4-GdkCairoContext.top_of_page">GdkCairoContext</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GdkCairoContext</refname>
<refpurpose>Cairo draw context</refpurpose>
</refnamediv>

<refsect1 id="gdk4-GdkCairoContext.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="gdk-cairo-context-cairo-create">gdk_cairo_context_cairo_create</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="gdk4-GdkCairoContext.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="GdkCairoContext">GdkCairoContext</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 id="gdk4-GdkCairoContext.includes"><title>Includes</title><synopsis>#include &lt;gdk/gdk.h&gt;
</synopsis></refsect1>

<refsect1 id="gdk4-GdkCairoContext.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GdkCairoContext"><type>GdkCairoContext</type></link> is an object representing the platform-specific
draw context.</para>
<para><link linkend="GdkCairoContexts"><type>GdkCairoContexts</type></link> are created for a <link linkend="GdkDisplay"><type>GdkDisplay</type></link> using
<link linkend="gdk-surface-create-cairo-context"><function>gdk_surface_create_cairo_context()</function></link>, and the context can then be used
to draw on that <link linkend="GdkSurface"><type>GdkSurface</type></link>.</para>

</refsect1>
<refsect1 id="gdk4-GdkCairoContext.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gdk-cairo-context-cairo-create" role="function">
<title>gdk_cairo_context_cairo_create&#160;()</title>
<indexterm zone="gdk-cairo-context-cairo-create"><primary>gdk_cairo_context_cairo_create</primary></indexterm>
<programlisting language="C"><link linkend="cairo-t"><returnvalue>cairo_t</returnvalue></link>&#160;*
gdk_cairo_context_cairo_create (<parameter><link linkend="GdkCairoContext"><type>GdkCairoContext</type></link> *self</parameter>);</programlisting>
<para>Retrieves a Cairo context to be used to draw on the <link linkend="GdkSurface"><type>GdkSurface</type></link>
of <parameter>context</parameter>
. A call to <link linkend="gdk-draw-context-begin-frame"><function>gdk_draw_context_begin_frame()</function></link> with this
<parameter>context</parameter>
 must have been done or this function will return <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para>
<para>The returned context is guaranteed to be valid until
<link linkend="gdk-draw-context-end-frame"><function>gdk_draw_context_end_frame()</function></link> is called.</para>
<refsect3 id="gdk-cairo-context-cairo-create.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkCairoContext"><type>GdkCairoContext</type></link> that is currently drawing</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-cairo-context-cairo-create.returns" role="returns">
<title>Returns</title>
<para>a Cairo context to be used
to draw the contents of the <link linkend="GdkSurface"><type>GdkSurface</type></link>. <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned
when <parameter>context</parameter>
is not drawing. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="gdk4-GdkCairoContext.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GdkCairoContext" role="struct">
<title>GdkCairoContext</title>
<indexterm zone="GdkCairoContext"><primary>GdkCairoContext</primary></indexterm>
<programlisting language="C">typedef struct {
  GdkDrawContext parent_instance;
} GdkCairoContext;
</programlisting>
<para>The GdkCairoContext struct contains only private fields and should not
be accessed directly.</para>
</refsect2>

</refsect1>

</refentry>
