I've no idea here...
[gtkD.git] / src / atk / StreamableContent.d
blobe4896220ccc3713f86944f0792f6c421cbd36a15
1 /*
2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = AtkStreamableContent.html
26 * outPack = atk
27 * outFile = StreamableContent
28 * strct = AtkStreamableContent
29 * realStrct=
30 * ctorStrct=
31 * clss = StreamableContent
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - atk_streamable_content_
40 * omit structs:
41 * omit prefixes:
42 * omit code:
43 * imports:
44 * - glib.IOChannel
45 * - glib.Str
46 * structWrap:
47 * - GIOChannel* -> IOChannel
48 * local aliases:
51 module atk.StreamableContent;
53 private import atk.atktypes;
55 private import lib.atk;
57 private import glib.IOChannel;
58 private import glib.Str;
60 /**
61 * Description
62 * An interface whereby an object allows its backing content to be streamed to
63 * clients. Typical implementors would be images or icons, HTML content, or
64 * multimedia display/rendering widgets.
65 * Negotiation of content type is allowed. Clients may examine the backing data
66 * and transform, convert, or parse the content in order to present it in an alternate form to end-users.
67 * The AtkStreamableContent interface is particularly useful for saving,
68 * printing, or post-processing entire documents, or for persisting alternate
69 * views of a document. If document content itself is being serialized,
70 * stored, or converted, then use of the AtkStreamableContent interface can help
71 * address performance issues. Unlike most ATK interfaces,
72 * this interface is not strongly tied to the current user-agent view of the
73 * a particular document, but may in some cases give access to the underlying model data.
75 public class StreamableContent
78 /** the main Gtk struct */
79 protected AtkStreamableContent* atkStreamableContent;
82 public AtkStreamableContent* getStreamableContentStruct()
84 return atkStreamableContent;
88 /** the main Gtk struct as a void* */
89 protected void* getStruct()
91 return cast(void*)atkStreamableContent;
94 /**
95 * Sets our main struct and passes it to the parent class
97 public this (AtkStreamableContent* atkStreamableContent)
99 this.atkStreamableContent = atkStreamableContent;
107 * Gets the number of mime types supported by this object.
108 * streamable:
109 * a GObject instance that implements AtkStreamableContentIface
110 * Returns:
111 * a gint which is the number of mime types supported by the object.
113 public int getNMimeTypes()
115 // gint atk_streamable_content_get_n_mime_types (AtkStreamableContent *streamable);
116 return atk_streamable_content_get_n_mime_types(atkStreamableContent);
120 * Gets the character string of the specified mime type. The first mime
121 * type is at position 0, the second at position 1, and so on.
122 * streamable:
123 * a GObject instance that implements AtkStreamableContent
124 * i:
125 * a gint representing the position of the mime type starting from 0
126 * Returns:
127 * : a gchar* representing the specified mime type; the caller
128 * should not free the character string.
130 public char[] getMimeType(int i)
132 // const gchar* atk_streamable_content_get_mime_type (AtkStreamableContent *streamable, gint i);
133 return Str.toString(atk_streamable_content_get_mime_type(atkStreamableContent, i) );
137 * Gets the content in the specified mime type.
138 * streamable:
139 * a GObject instance that implements AtkStreamableContentIface
140 * mime_type:
141 * a gchar* representing the mime type
142 * Returns:
143 * A GIOChannel which contains the content in the specified mime
144 * type.
146 public IOChannel getStream(char[] mimeType)
148 // GIOChannel* atk_streamable_content_get_stream (AtkStreamableContent *streamable, const gchar *mime_type);
149 return new IOChannel( atk_streamable_content_get_stream(atkStreamableContent, Str.toStringz(mimeType)) );
153 * Get a string representing a URI in IETF standard format
154 * (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content
155 * may be streamed in the specified mime-type, if one is available.
156 * If mime_type is NULL, the URI for the default (and possibly only) mime-type is
157 * returned.
158 * Note that it is possible for get_uri to return NULL but for
159 * get_stream to work nonetheless, since not all GIOChannels connect to URIs.
160 * streamable:
161 * a GObject instance that implements AtkStreamableContentIface
162 * mime_type:
163 * a gchar* representing the mime type, or NULL to request a URI
164 * for the default mime type.
165 * Returns:
166 * Returns a string representing a URI, or NULL if no corresponding URI
167 * can be constructed.
168 * Since ATK 1.12
170 public char[] getUri(char[] mimeType)
172 // gchar* atk_streamable_content_get_uri (AtkStreamableContent *streamable, const gchar *mime_type);
173 return Str.toString(atk_streamable_content_get_uri(atkStreamableContent, Str.toStringz(mimeType)) );