summaryrefslogtreecommitdiff
path: root/docs/reference/pygtk-atkstreamablecontent.xml
blob: 6026df546c7037a2170cab3373bcaa5a2bcd6b57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-atkstreamablecontent">

  <refnamediv>
    <refname>atk.StreamableContent</refname>
      <refpurpose>the ATK interface which provides access to streamable
      content.  </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>atk.StreamableContent</classname></ooclass>
      <ooclass><classname>gobject.GInterface</classname></ooclass>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstreamablecontent--get-n-mime-types">get_n_mime_types</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstreamablecontent--get-mime-type">get_mime_type</link></methodname>
        <methodparam><parameter role="keyword">i</parameter></methodparam>
      </methodsynopsis>
<!-- NOT IMPLEMENTED
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstreamablecontent- -get-stream">get_stream</link></methodname>
        <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
      </methodsynopsis>
END -->
</classsynopsis>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>An interface whereby an object allows its backing content to be
    streamed to clients. Typical implementors would be images or icons, HTML
    content, or multimedia display/rendering widgets.</para>

    <para>Negotiation of content type is allowed. Clients may examine the
    backing data and transform, convert, or parse the content in order to
    present it in an alternate form to end-users.</para>

    <para>The <link
    linkend="class-atkstreamablecontent"><classname>atk.StreamableContent</classname></link>
    interface is particularly useful for saving, printing, or
    post-processing entire documents, or for persisting alternate views of a
    document. If document content itself is being serialized, stored, or
    converted, then use of the <link
    linkend="class-atkstreamablecontent"><classname>atk.StreamableContent</classname></link>
    interface can help address performance issues. Unlike most ATK
    interfaces, this interface is not strongly tied to the current
    user-agent view of the a particular document, but may in some cases give
    access to the underlying model data.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-atkstreamablecontent--get-n-mime-types">
      <title>atk.StreamableContent.get_n_mime_types</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_n_mime_types</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>an integer which is the number of mime types
          supported by the object.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Gets the number of mime types supported by this object.</para>

    </refsect2>

    <refsect2 id="method-atkstreamablecontent--get-mime-type">
      <title>atk.StreamableContent.get_mime_type</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_mime_type</methodname>
        <methodparam><parameter role="keyword">i</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">i</parameter>&nbsp;:</term>
          <listitem><simpara>an index representing the position of the mime
          type starting from 0</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>: a string* representing the specified mime
          type.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Gets the character string of the specified mime type. The first
      mime type is at position 0, the second at position 1, and so
      on.</para>

    </refsect2>

<!-- NOT IMPLEMENTED
    <refsect2 id="method-atkstreamablecontent- -get-stream">
      <title>atk.StreamableContent.get_stream</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_stream</methodname>
        <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">mime_type</parameter>&nbsp;:</term>
          <listitem><simpara>a string representing the mime
          type</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>A <literal>GIOChannel</literal> which contains the content in the specified mime
type.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Gets the content in the specified mime type.</para>

    </refsect2>
END -->

  </refsect1>

</refentry>