<?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-Content-Formats">
<refmeta>
<refentrytitle role="top_of_page" id="gdk4-Content-Formats.top_of_page">Content Formats</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Content Formats</refname>
<refpurpose>Advertising and negotiating of content
exchange formats</refpurpose>
</refnamediv>

<refsect1 id="gdk4-Content-Formats.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">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-intern-mime-type">gdk_intern_mime_type</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-new">gdk_content_formats_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-new-for-gtype">gdk_content_formats_new_for_gtype</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-ref">gdk_content_formats_ref</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="gdk-content-formats-unref">gdk_content_formats_unref</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="gdk-content-formats-print">gdk_content_formats_print</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-to-string">gdk_content_formats_to_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="GType"><returnvalue>GType</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-get-gtypes">gdk_content_formats_get_gtypes</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;* const *
</entry><entry role="function_name"><link linkend="gdk-content-formats-get-mime-types">gdk_content_formats_get_mime_types</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-union">gdk_content_formats_union</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="gdk-content-formats-match">gdk_content_formats_match</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GType"><returnvalue>GType</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-formats-match-gtype">gdk_content_formats_match_gtype</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-match-mime-type">gdk_content_formats_match_mime_type</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="gdk-content-formats-contain-gtype">gdk_content_formats_contain_gtype</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="gdk-content-formats-contain-mime-type">gdk_content_formats_contain_mime_type</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-union-serialize-gtypes">gdk_content_formats_union_serialize_gtypes</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-union-deserialize-gtypes">gdk_content_formats_union_deserialize_gtypes</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-union-serialize-mime-types">gdk_content_formats_union_serialize_mime_types</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-union-deserialize-mime-types">gdk_content_formats_union_deserialize_mime_types</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GdkContentFormatsBuilder"><returnvalue>GdkContentFormatsBuilder</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-builder-new">gdk_content_formats_builder_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-builder-free-to-formats">gdk_content_formats_builder_free_to_formats</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="gdk-content-formats-builder-add-formats">gdk_content_formats_builder_add_formats</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="gdk-content-formats-builder-add-gtype">gdk_content_formats_builder_add_gtype</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="gdk-content-formats-builder-add-mime-type">gdk_content_formats_builder_add_mime_type</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GdkContentFormatsBuilder"><returnvalue>GdkContentFormatsBuilder</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-builder-ref">gdk_content_formats_builder_ref</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="gdk-content-formats-builder-unref">gdk_content_formats_builder_unref</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-formats-builder-to-formats">gdk_content_formats_builder_to_formats</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<anchor id="GdkContentFormats"/><refsect1 id="gdk4-Content-Formats.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="GdkContentFormats-struct">GdkContentFormats</link></entry></row>


<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GdkContentFormatsBuilder">GdkContentFormatsBuilder</link></entry></row>

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

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

<refsect1 id="gdk4-Content-Formats.description" role="desc">
<title role="desc.title">Description</title>
<para>This section describes the <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> structure that is used to
advertise and negotiate the format of content passed between different
widgets, windows or applications using for example the clipboard or
drag'n'drop.</para>
<para>GDK supports content in 2 forms: <link linkend="GType"><type>GType</type></link> and mime type.
Using <link linkend="GTypes"><type>GTypes</type></link> is meant only for in-process content transfers. Mime types
are meant to be used for data passing both in-process and out-of-process.
The details of how data is passed is described in the documentation of
the actual implementations.</para>
<para>A <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> describes a set of possible formats content can be
exchanged in. It is assumed that this set is ordered. <link linkend="GTypes"><type>GTypes</type></link> are more
important than mime types. Order between different <link linkend="GTypes"><type>GTypes</type></link> or mime types
is the order they were added in, most important first. Functions that
care about order, such as <link linkend="gdk-content-formats-union"><function>gdk_content_formats_union()</function></link> will describe in
their documentation how they interpret that order, though in general the
order of the first argument is considered the primary order of the result,
followed by the order of further arguments.</para>
<para>For debugging purposes, the function <link linkend="gdk-content-formats-to-string"><function>gdk_content_formats_to_string()</function></link> exists.
It will print a comma-seperated formats of formats from most important to least
important.</para>
<para><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> is an immutable struct. After creation, you cannot change
the types it represents. Instead, new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> have to be created.
The <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> structure is meant to help in this endeavor.</para>

</refsect1>
<refsect1 id="gdk4-Content-Formats.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gdk-intern-mime-type" role="function">
<title>gdk_intern_mime_type&#160;()</title>
<indexterm zone="gdk-intern-mime-type"><primary>gdk_intern_mime_type</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gdk_intern_mime_type (<parameter>const <link linkend="char"><type>char</type></link> *string</parameter>);</programlisting>
<para>Canonicalizes the given mime type and interns the result.</para>
<para>If <parameter>string</parameter>
 is not a valid mime type, <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned instead.
See RFC 2048 for the syntax if mime types.</para>
<refsect3 id="gdk-intern-mime-type.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>string</para></entry>
<entry role="parameter_description"><para>string of a potential mime type. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-intern-mime-type.returns" role="returns">
<title>Returns</title>
<para> An interned string for the canonicalized mime type
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the string wasn't a valid mime type</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-new" role="function">
<title>gdk_content_formats_new&#160;()</title>
<indexterm zone="gdk-content-formats-new"><primary>gdk_content_formats_new</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_content_formats_new (<parameter>const <link linkend="char"><type>char</type></link> **mime_types</parameter>,
                         <parameter><link linkend="guint"><type>guint</type></link> n_mime_types</parameter>);</programlisting>
<para>Creates a new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> from an array of mime types.</para>
<para>The mime types must be valid and different from each other or the
behavior of the return value is undefined. If you cannot guarantee
this, use <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> instead.</para>
<refsect3 id="gdk-content-formats-new.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>mime_types</para></entry>
<entry role="parameter_description"><para>Pointer to an
array of mime types. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=n_mime_types][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>n_mime_types</para></entry>
<entry role="parameter_description"><para>number of entries in <parameter>mime_types</parameter>
.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-new.returns" role="returns">
<title>Returns</title>
<para>the new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-new-for-gtype" role="function">
<title>gdk_content_formats_new_for_gtype&#160;()</title>
<indexterm zone="gdk-content-formats-new-for-gtype"><primary>gdk_content_formats_new_for_gtype</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_content_formats_new_for_gtype (<parameter><link linkend="GType"><type>GType</type></link> type</parameter>);</programlisting>
<para>Creates a new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> for a given <link linkend="GType"><type>GType</type></link>.</para>
<refsect3 id="gdk-content-formats-new-for-gtype.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>type</para></entry>
<entry role="parameter_description"><para>a $GType</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-new-for-gtype.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-ref" role="function">
<title>gdk_content_formats_ref&#160;()</title>
<indexterm zone="gdk-content-formats-ref"><primary>gdk_content_formats_ref</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_content_formats_ref (<parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>);</programlisting>
<para>Increases the reference count of a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> by one.</para>
<refsect3 id="gdk-content-formats-ref.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-ref.returns" role="returns">
<title>Returns</title>
<para> the passed in <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>.</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-unref" role="function">
<title>gdk_content_formats_unref&#160;()</title>
<indexterm zone="gdk-content-formats-unref"><primary>gdk_content_formats_unref</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_formats_unref (<parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>);</programlisting>
<para>Decreases the reference count of a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> by one.
If the resulting reference count is zero, frees the formats.</para>
<refsect3 id="gdk-content-formats-unref.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-print" role="function">
<title>gdk_content_formats_print&#160;()</title>
<indexterm zone="gdk-content-formats-print"><primary>gdk_content_formats_print</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_formats_print (<parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>,
                           <parameter><link linkend="GString"><type>GString</type></link> *string</parameter>);</programlisting>
<para>Prints the given <parameter>formats</parameter>
 into a string for human consumption.
This is meant for debugging and logging.</para>
<para>The form of the representation may change at any time and is
not guaranteed to stay identical.</para>
<refsect3 id="gdk-content-formats-print.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>string</para></entry>
<entry role="parameter_description"><para>a <link linkend="GString"><type>GString</type></link> to print into</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-to-string" role="function">
<title>gdk_content_formats_to_string&#160;()</title>
<indexterm zone="gdk-content-formats-to-string"><primary>gdk_content_formats_to_string</primary></indexterm>
<programlisting language="C"><link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gdk_content_formats_to_string (<parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>);</programlisting>
<para>Prints the given <parameter>formats</parameter>
 into a human-readable string.
This is a small wrapper around <link linkend="gdk-content-formats-print"><function>gdk_content_formats_print()</function></link> to help
when debugging.</para>
<refsect3 id="gdk-content-formats-to-string.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-to-string.returns" role="returns">
<title>Returns</title>
<para>a new string. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-get-gtypes" role="function">
<title>gdk_content_formats_get_gtypes&#160;()</title>
<indexterm zone="gdk-content-formats-get-gtypes"><primary>gdk_content_formats_get_gtypes</primary></indexterm>
<programlisting language="C">const <link linkend="GType"><returnvalue>GType</returnvalue></link>&#160;*
gdk_content_formats_get_gtypes (<parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>,
                                <parameter><link linkend="gsize"><type>gsize</type></link> *n_gtypes</parameter>);</programlisting>
<para>Gets the <link linkend="GTypes"><type>GTypes</type></link> included in <parameter>formats</parameter>
. Note that <parameter>formats</parameter>
 may not
contain any <link linkend="GTypes"><type>GTypes</type></link>, in particular when they are empty. In that
case <link linkend="NULL:CAPS"><literal>NULL</literal></link> will be returned.</para>
<refsect3 id="gdk-content-formats-get-gtypes.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>n_gtypes</para></entry>
<entry role="parameter_description"><para>optional pointer to take the
number of <link linkend="GTypes"><type>GTypes</type></link> contained in the return value. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>optional</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-get-gtypes.returns" role="returns">
<title>Returns</title>
<para><link linkend="G-TYPE-INVALID:CAPS"><literal>G_TYPE_INVALID</literal></link>-terminated array of types included in <parameter>formats</parameter>
or
<link linkend="NULL:CAPS"><literal>NULL</literal></link> if none. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>nullable</acronym>][<acronym>array</acronym> length=n_gtypes]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-get-mime-types" role="function">
<title>gdk_content_formats_get_mime_types&#160;()</title>
<indexterm zone="gdk-content-formats-get-mime-types"><primary>gdk_content_formats_get_mime_types</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;* const *
gdk_content_formats_get_mime_types (<parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>,
                                    <parameter><link linkend="gsize"><type>gsize</type></link> *n_mime_types</parameter>);</programlisting>
<para>Gets the mime types included in <parameter>formats</parameter>
. Note that <parameter>formats</parameter>
 may not
contain any mime types, in particular when they are empty. In that
case <link linkend="NULL:CAPS"><literal>NULL</literal></link> will be returned.</para>
<refsect3 id="gdk-content-formats-get-mime-types.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>n_mime_types</para></entry>
<entry role="parameter_description"><para>optional pointer to take the
number of mime types contained in the return value. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-get-mime-types.returns" role="returns">
<title>Returns</title>
<para><link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated array of
interned strings of mime types included in <parameter>formats</parameter>
or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
if none. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-union" role="function">
<title>gdk_content_formats_union&#160;()</title>
<indexterm zone="gdk-content-formats-union"><primary>gdk_content_formats_union</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_content_formats_union (<parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *first</parameter>,
                           <parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *second</parameter>);</programlisting>
<para>Append all missing types from <parameter>second</parameter>
 to <parameter>first</parameter>
, in the order
they had in <parameter>second</parameter>
.</para>
<refsect3 id="gdk-content-formats-union.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>first</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> to merge into. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>second</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> to merge from. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-union.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-match" role="function">
<title>gdk_content_formats_match&#160;()</title>
<indexterm zone="gdk-content-formats-match"><primary>gdk_content_formats_match</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_content_formats_match (<parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *first</parameter>,
                           <parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *second</parameter>);</programlisting>
<para>Checks if <parameter>first</parameter>
 and <parameter>second</parameter>
 have any matching formats.</para>
<refsect3 id="gdk-content-formats-match.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>first</para></entry>
<entry role="parameter_description"><para>the primary <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> to intersect</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>second</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> to intersect with</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-match.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if a matching format was found.</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-match-gtype" role="function">
<title>gdk_content_formats_match_gtype&#160;()</title>
<indexterm zone="gdk-content-formats-match-gtype"><primary>gdk_content_formats_match_gtype</primary></indexterm>
<programlisting language="C"><link linkend="GType"><returnvalue>GType</returnvalue></link>
gdk_content_formats_match_gtype (<parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *first</parameter>,
                                 <parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *second</parameter>);</programlisting>
<para>Finds the first <link linkend="GType"><type>GType</type></link> from <parameter>first</parameter>
 that is also contained
in <parameter>second</parameter>
. If no matching <link linkend="GType"><type>GType</type></link> is found, <link linkend="G-TYPE-INVALID:CAPS"><literal>G_TYPE_INVALID</literal></link>
is returned.</para>
<refsect3 id="gdk-content-formats-match-gtype.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>first</para></entry>
<entry role="parameter_description"><para>the primary <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> to intersect</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>second</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> to intersect with</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-match-gtype.returns" role="returns">
<title>Returns</title>
<para> The first common <link linkend="GType"><type>GType</type></link> or <link linkend="G-TYPE-INVALID:CAPS"><literal>G_TYPE_INVALID</literal></link> if none.</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-match-mime-type" role="function">
<title>gdk_content_formats_match_mime_type&#160;()</title>
<indexterm zone="gdk-content-formats-match-mime-type"><primary>gdk_content_formats_match_mime_type</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gdk_content_formats_match_mime_type (<parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *first</parameter>,
                                     <parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *second</parameter>);</programlisting>
<para>Finds the first mime type from <parameter>first</parameter>
 that is also contained
in <parameter>second</parameter>
. If no matching mime type is found, <link linkend="NULL:CAPS"><literal>NULL</literal></link> is
returned.</para>
<refsect3 id="gdk-content-formats-match-mime-type.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>first</para></entry>
<entry role="parameter_description"><para>the primary <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> to intersect</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>second</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> to intersect with</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-match-mime-type.returns" role="returns">
<title>Returns</title>
<para> The first common mime type or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if none.</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-contain-gtype" role="function">
<title>gdk_content_formats_contain_gtype&#160;()</title>
<indexterm zone="gdk-content-formats-contain-gtype"><primary>gdk_content_formats_contain_gtype</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_content_formats_contain_gtype (<parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>,
                                   <parameter><link linkend="GType"><type>GType</type></link> type</parameter>);</programlisting>
<para>Checks if a given <link linkend="GType"><type>GType</type></link> is part of the given <parameter>formats</parameter>
.</para>
<refsect3 id="gdk-content-formats-contain-gtype.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>type</para></entry>
<entry role="parameter_description"><para>the <link linkend="GType"><type>GType</type></link> to search for</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-contain-gtype.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <link linkend="GType"><type>GType</type></link> was found</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-contain-mime-type" role="function">
<title>gdk_content_formats_contain_mime_type&#160;()</title>
<indexterm zone="gdk-content-formats-contain-mime-type"><primary>gdk_content_formats_contain_mime_type</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_content_formats_contain_mime_type (<parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>,
                                       <parameter>const <link linkend="char"><type>char</type></link> *mime_type</parameter>);</programlisting>
<para>Checks if a given mime type is part of the given <parameter>formats</parameter>
.</para>
<refsect3 id="gdk-content-formats-contain-mime-type.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mime_type</para></entry>
<entry role="parameter_description"><para>the mime type to search for</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-contain-mime-type.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the mime_type was found</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-union-serialize-gtypes" role="function">
<title>gdk_content_formats_union_serialize_gtypes&#160;()</title>
<indexterm zone="gdk-content-formats-union-serialize-gtypes"><primary>gdk_content_formats_union_serialize_gtypes</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_content_formats_union_serialize_gtypes
                               (<parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>);</programlisting>
<para>Add GTypes for the mime types in <parameter>formats</parameter>
 for which serializers are
registered.</para>
<para>Return: a new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para>
<refsect3 id="gdk-content-formats-union-serialize-gtypes.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-union-deserialize-gtypes" role="function">
<title>gdk_content_formats_union_deserialize_gtypes&#160;()</title>
<indexterm zone="gdk-content-formats-union-deserialize-gtypes"><primary>gdk_content_formats_union_deserialize_gtypes</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_content_formats_union_deserialize_gtypes
                               (<parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>);</programlisting>
<para>Add GTypes for mime types in <parameter>formats</parameter>
 for which deserializers are
registered.</para>
<para>Return: a new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para>
<refsect3 id="gdk-content-formats-union-deserialize-gtypes.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-union-serialize-mime-types" role="function">
<title>gdk_content_formats_union_serialize_mime_types&#160;()</title>
<indexterm zone="gdk-content-formats-union-serialize-mime-types"><primary>gdk_content_formats_union_serialize_mime_types</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_content_formats_union_serialize_mime_types
                               (<parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>);</programlisting>
<para>Add mime types for GTypes in <parameter>formats</parameter>
 for which serializers are
registered.</para>
<para>Return: a new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para>
<refsect3 id="gdk-content-formats-union-serialize-mime-types.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-union-deserialize-mime-types" role="function">
<title>gdk_content_formats_union_deserialize_mime_types&#160;()</title>
<indexterm zone="gdk-content-formats-union-deserialize-mime-types"><primary>gdk_content_formats_union_deserialize_mime_types</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_content_formats_union_deserialize_mime_types
                               (<parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>);</programlisting>
<para>Add mime types for GTypes in <parameter>formats</parameter>
 for which deserializers are
registered.</para>
<para>Return: a new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link></para>
<refsect3 id="gdk-content-formats-union-deserialize-mime-types.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>formats</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-builder-new" role="function">
<title>gdk_content_formats_builder_new&#160;()</title>
<indexterm zone="gdk-content-formats-builder-new"><primary>gdk_content_formats_builder_new</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormatsBuilder"><returnvalue>GdkContentFormatsBuilder</returnvalue></link>&#160;*
gdk_content_formats_builder_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Create a new <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> object. The resulting builder
would create an empty <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>. Use addition functions to add
types to it.</para>
<refsect3 id="gdk-content-formats-builder-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-builder-free-to-formats" role="function">
<title>gdk_content_formats_builder_free_to_formats&#160;()</title>
<indexterm zone="gdk-content-formats-builder-free-to-formats"><primary>gdk_content_formats_builder_free_to_formats</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_content_formats_builder_free_to_formats
                               (<parameter><link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> *builder</parameter>);</programlisting>
<para>Creates a new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> from the current state of the
given <parameter>builder</parameter>
, and frees the <parameter>builder</parameter>
 instance.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-content-formats-builder-free-to-formats.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>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-builder-free-to-formats.returns" role="returns">
<title>Returns</title>
<para>the newly created <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>
with all the formats added to <parameter>builder</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-builder-add-formats" role="function">
<title>gdk_content_formats_builder_add_formats&#160;()</title>
<indexterm zone="gdk-content-formats-builder-add-formats"><primary>gdk_content_formats_builder_add_formats</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_formats_builder_add_formats
                               (<parameter><link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> *builder</parameter>,
                                <parameter>const <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>);</programlisting>
<para>Appends all formats from <parameter>formats</parameter>
 to <parameter>builder</parameter>
, skipping those that
already exist.</para>
<refsect3 id="gdk-content-formats-builder-add-formats.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>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>formats</para></entry>
<entry role="parameter_description"><para>the formats to add</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-builder-add-gtype" role="function">
<title>gdk_content_formats_builder_add_gtype&#160;()</title>
<indexterm zone="gdk-content-formats-builder-add-gtype"><primary>gdk_content_formats_builder_add_gtype</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_formats_builder_add_gtype (<parameter><link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> *builder</parameter>,
                                       <parameter><link linkend="GType"><type>GType</type></link> type</parameter>);</programlisting>
<para>Appends <parameter>gtype</parameter>
 to <parameter>builder</parameter>
 if it has not already been added.</para>
<refsect3 id="gdk-content-formats-builder-add-gtype.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>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>type</para></entry>
<entry role="parameter_description"><para>a <link linkend="GType"><type>GType</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-builder-add-mime-type" role="function">
<title>gdk_content_formats_builder_add_mime_type&#160;()</title>
<indexterm zone="gdk-content-formats-builder-add-mime-type"><primary>gdk_content_formats_builder_add_mime_type</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_formats_builder_add_mime_type
                               (<parameter><link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> *builder</parameter>,
                                <parameter>const <link linkend="char"><type>char</type></link> *mime_type</parameter>);</programlisting>
<para>Appends <parameter>mime_type</parameter>
 to <parameter>builder</parameter>
 if it has not already been added.</para>
<refsect3 id="gdk-content-formats-builder-add-mime-type.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>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mime_type</para></entry>
<entry role="parameter_description"><para>a mime type</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-builder-ref" role="function">
<title>gdk_content_formats_builder_ref&#160;()</title>
<indexterm zone="gdk-content-formats-builder-ref"><primary>gdk_content_formats_builder_ref</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormatsBuilder"><returnvalue>GdkContentFormatsBuilder</returnvalue></link>&#160;*
gdk_content_formats_builder_ref (<parameter><link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> *builder</parameter>);</programlisting>
<para>Acquires a reference on the given <parameter>builder</parameter>
.</para>
<para>This function is intended primarily for bindings. <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> objects
should not be kept around.</para>
<refsect3 id="gdk-content-formats-builder-ref.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>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-builder-ref.returns" role="returns">
<title>Returns</title>
<para>the given <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> with
its reference count increased. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-builder-unref" role="function">
<title>gdk_content_formats_builder_unref&#160;()</title>
<indexterm zone="gdk-content-formats-builder-unref"><primary>gdk_content_formats_builder_unref</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_formats_builder_unref (<parameter><link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> *builder</parameter>);</programlisting>
<para>Releases a reference on the given <parameter>builder</parameter>
.</para>
<refsect3 id="gdk-content-formats-builder-unref.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>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-formats-builder-to-formats" role="function">
<title>gdk_content_formats_builder_to_formats&#160;()</title>
<indexterm zone="gdk-content-formats-builder-to-formats"><primary>gdk_content_formats_builder_to_formats</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_content_formats_builder_to_formats
                               (<parameter><link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> *builder</parameter>);</programlisting>
<para>Creates a new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> from the given <parameter>builder</parameter>
.</para>
<para>The given <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> is reset once this function returns;
you cannot call this function multiple times on the same <parameter>builder</parameter>
 instance.</para>
<para>This function is intended primarily for bindings. C code should use
<link linkend="gdk-content-formats-builder-free-to-formats"><function>gdk_content_formats_builder_free_to_formats()</function></link>.</para>
<refsect3 id="gdk-content-formats-builder-to-formats.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>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-formats-builder-to-formats.returns" role="returns">
<title>Returns</title>
<para>the newly created <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>
with all the formats added to <parameter>builder</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="gdk4-Content-Formats.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GdkContentFormats-struct" role="struct">
<title>GdkContentFormats</title>
<indexterm zone="GdkContentFormats-struct"><primary>GdkContentFormats</primary></indexterm>
<programlisting language="C">typedef struct _GdkContentFormats GdkContentFormats;</programlisting>
<para>A <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> struct is a reference counted struct
and should be treated as opaque.</para>
</refsect2>
<refsect2 id="GdkContentFormatsBuilder" role="struct">
<title>GdkContentFormatsBuilder</title>
<indexterm zone="GdkContentFormatsBuilder"><primary>GdkContentFormatsBuilder</primary></indexterm>
<programlisting language="C">typedef struct _GdkContentFormatsBuilder GdkContentFormatsBuilder;</programlisting>
<para>A <link linkend="GdkContentFormatsBuilder"><type>GdkContentFormatsBuilder</type></link> struct is an opaque struct. It is meant to
not be kept around and only be used to create new <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>
objects.</para>
</refsect2>

</refsect1>
<refsect1 id="gdk4-Content-Formats.see-also">
<title>See Also</title>
<para><link linkend="GdkDrag"><type>GdkDrag</type></link>, <link linkend="GdkDrop"><type>GdkDrop</type></link>, <link linkend="GdkClipboard"><type>GdkClipboard</type></link>, <link linkend="GdkContentProvider"><type>GdkContentProvider</type></link></para>

</refsect1>

</refentry>
