📄 atkstreamablecontent.xml
字号:
<refentry id="AtkStreamableContent"><refmeta><refentrytitle role="top_of_page" id="AtkStreamableContent.top_of_page">AtkStreamableContent</refentrytitle><manvolnum>3</manvolnum><refmiscinfo>ATK Library</refmiscinfo></refmeta><refnamediv><refname>AtkStreamableContent</refname><refpurpose>The ATK interface which provides access to streamable content.</refpurpose><!--[<xref linkend="desc" endterm="desc.title"/>]--></refnamediv><refsynopsisdiv id="AtkStreamableContent.synopsis" role="synopsis"><title role="synopsis.title">Synopsis</title><synopsis> <link linkend="AtkStreamableContent-struct">AtkStreamableContent</link>;<link linkend="gint">gint</link> <link linkend="atk-streamable-content-get-n-mime-types">atk_streamable_content_get_n_mime_types</link> (<link linkend="AtkStreamableContent">AtkStreamableContent</link> *streamable);const <link linkend="gchar">gchar</link>* <link linkend="atk-streamable-content-get-mime-type">atk_streamable_content_get_mime_type</link> (<link linkend="AtkStreamableContent">AtkStreamableContent</link> *streamable, <link linkend="gint">gint</link> i);<link linkend="GIOChannel">GIOChannel</link>* <link linkend="atk-streamable-content-get-stream">atk_streamable_content_get_stream</link> (<link linkend="AtkStreamableContent">AtkStreamableContent</link> *streamable, const <link linkend="gchar">gchar</link> *mime_type);<link linkend="gchar">gchar</link>* <link linkend="atk-streamable-content-get-uri">atk_streamable_content_get_uri</link> (<link linkend="AtkStreamableContent">AtkStreamableContent</link> *streamable, const <link linkend="gchar">gchar</link> *mime_type);</synopsis></refsynopsisdiv><refsect1 id="AtkStreamableContent.object-hierarchy" role="object_hierarchy"><title role="object_hierarchy.title">Object Hierarchy</title><synopsis> <link linkend="GInterface">GInterface</link> +----AtkStreamableContent</synopsis></refsect1><refsect1 id="AtkStreamableContent.description" role="desc"><title role="desc.title">Description</title><para>An interface whereby an object allows its backing content to be streamed toclients. Typical implementors would be images or icons, HTML content, ormultimedia display/rendering widgets.</para><para>Negotiation of content type is allowed. Clients may examine the backing dataand transform, convert, or parse the content in order to present it in an alternate form to end-users.</para><para>The AtkStreamableContent interface is particularly useful for saving,printing, or post-processing entire documents, or for persisting alternateviews of a document. If document content itself is being serialized,stored, or converted, then use of the AtkStreamableContent interface can helpaddress performance issues. Unlike most ATK interfaces,this interface is not strongly tied to the current user-agent view of thea particular document, but may in some cases give access to the underlying model data.</para></refsect1><refsect1 id="AtkStreamableContent.details" role="details"><title role="details.title">Details</title><refsect2 id="AtkStreamableContent-struct" role="struct"><title>AtkStreamableContent</title><indexterm zone="AtkStreamableContent-struct"><primary>AtkStreamableContent</primary></indexterm><programlisting>typedef struct _AtkStreamableContent AtkStreamableContent;</programlisting><para>The AtkStreamableContent structure does not contain any fields.</para></refsect2><refsect2 id="atk-streamable-content-get-n-mime-types" role="function"><title>atk_streamable_content_get_n_mime_types ()</title><indexterm zone="atk-streamable-content-get-n-mime-types"><primary>atk_streamable_content_get_n_mime_types</primary></indexterm><programlisting><link linkend="gint">gint</link> atk_streamable_content_get_n_mime_types (<link linkend="AtkStreamableContent">AtkStreamableContent</link> *streamable);</programlisting><para>Gets the number of mime types supported by this object.</para><para></para><variablelist role="params"><varlistentry><term><parameter>streamable</parameter> :</term><listitem><simpara> a GObject instance that implements AtkStreamableContentIface</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a gint which is the number of mime types supported by the object.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="atk-streamable-content-get-mime-type" role="function"><title>atk_streamable_content_get_mime_type ()</title><indexterm zone="atk-streamable-content-get-mime-type"><primary>atk_streamable_content_get_mime_type</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* atk_streamable_content_get_mime_type (<link linkend="AtkStreamableContent">AtkStreamableContent</link> *streamable, <link linkend="gint">gint</link> i);</programlisting><para>Gets the character string of the specified mime type. The first mimetype is at position 0, the second at position 1, and so on.</para><para></para><variablelist role="params"><varlistentry><term><parameter>streamable</parameter> :</term><listitem><simpara> a GObject instance that implements AtkStreamableContent</simpara></listitem></varlistentry><varlistentry><term><parameter>i</parameter> :</term><listitem><simpara> a gint representing the position of the mime type starting from 0</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>: a gchar* representing the specified mime type; the callershould not free the character string.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="atk-streamable-content-get-stream" role="function"><title>atk_streamable_content_get_stream ()</title><indexterm zone="atk-streamable-content-get-stream"><primary>atk_streamable_content_get_stream</primary></indexterm><programlisting><link linkend="GIOChannel">GIOChannel</link>* atk_streamable_content_get_stream (<link linkend="AtkStreamableContent">AtkStreamableContent</link> *streamable, const <link linkend="gchar">gchar</link> *mime_type);</programlisting><para>Gets the content in the specified mime type.</para><para></para><variablelist role="params"><varlistentry><term><parameter>streamable</parameter> :</term><listitem><simpara> a GObject instance that implements AtkStreamableContentIface</simpara></listitem></varlistentry><varlistentry><term><parameter>mime_type</parameter> :</term><listitem><simpara> a gchar* representing the mime type</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A <link linkend="GIOChannel"><type>GIOChannel</type></link> which contains the content in the specified mimetype.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="atk-streamable-content-get-uri" role="function" condition="since:ATK 1.12"><title>atk_streamable_content_get_uri ()</title><indexterm zone="atk-streamable-content-get-uri" role="ATK 1.12"><primary>atk_streamable_content_get_uri</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* atk_streamable_content_get_uri (<link linkend="AtkStreamableContent">AtkStreamableContent</link> *streamable, const <link linkend="gchar">gchar</link> *mime_type);</programlisting><para>Get a string representing a URI in IETF standard format(see http://www.ietf.org/rfc/rfc2396.txt) from which the object's contentmay be streamed in the specified mime-type, if one is available.If mime_type is NULL, the URI for the default (and possibly only) mime-type isreturned. </para><para>Note that it is possible for get_uri to return NULL but forget_stream to work nonetheless, since not all GIOChannels connect to URIs.</para><para></para><variablelist role="params"><varlistentry><term><parameter>streamable</parameter> :</term><listitem><simpara> a GObject instance that implements AtkStreamableContentIface</simpara></listitem></varlistentry><varlistentry><term><parameter>mime_type</parameter> :</term><listitem><simpara> a gchar* representing the mime type, or NULL to request a URI for the default mime type.</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns a string representing a URI, or NULL if no corresponding URIcan be constructed.</simpara></listitem></varlistentry></variablelist><para role="since">Since ATK 1.12</para></refsect2></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -