2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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
27 * outFile = StreamableContent
28 * strct = AtkStreamableContent
31 * clss = StreamableContent
39 * - atk_streamable_content_
47 * - GIOChannel* -> IOChannel
52 module atk
.StreamableContent
;
58 import tango
.io
.Stdout
; // use the tango loging?
62 private import gtkc
.atktypes
;
64 private import gtkc
.atk
;
67 private import glib
.IOChannel
;
68 private import glib
.Str
;
75 * An interface whereby an object allows its backing content to be streamed to
76 * clients. Typical implementors would be images or icons, HTML content, or
77 * multimedia display/rendering widgets.
78 * Negotiation of content type is allowed. Clients may examine the backing data
79 * and transform, convert, or parse the content in order to present it in an alternate form to end-users.
80 * The AtkStreamableContent interface is particularly useful for saving,
81 * printing, or post-processing entire documents, or for persisting alternate
82 * views of a document. If document content itself is being serialized,
83 * stored, or converted, then use of the AtkStreamableContent interface can help
84 * address performance issues. Unlike most ATK interfaces,
85 * this interface is not strongly tied to the current user-agent view of the
86 * a particular document, but may in some cases give access to the underlying model data.
88 public class StreamableContent
91 /** the main Gtk struct */
92 protected AtkStreamableContent
* atkStreamableContent
;
95 public AtkStreamableContent
* getStreamableContentStruct()
97 return atkStreamableContent
;
101 /** the main Gtk struct as a void* */
102 protected void* getStruct()
104 return cast(void*)atkStreamableContent
;
108 * Sets our main struct and passes it to the parent class
110 public this (AtkStreamableContent
* atkStreamableContent
)
114 if ( atkStreamableContent
is null )
119 Stdout("struct atkStreamableContent is null on constructor").newline
;
123 printf("struct atkStreamableContent is null on constructor");
130 assert(atkStreamableContent
!is null, "struct atkStreamableContent is null on constructor");
132 this.atkStreamableContent
= atkStreamableContent
;
140 * Gets the number of mime types supported by this object.
142 * a GObject instance that implements AtkStreamableContentIface
144 * a gint which is the number of mime types supported by the object.
146 public int getNMimeTypes()
148 // gint atk_streamable_content_get_n_mime_types (AtkStreamableContent *streamable);
149 return atk_streamable_content_get_n_mime_types(atkStreamableContent
);
153 * Gets the character string of the specified mime type. The first mime
154 * type is at position 0, the second at position 1, and so on.
156 * a GObject instance that implements AtkStreamableContent
158 * a gint representing the position of the mime type starting from 0
160 * : a gchar* representing the specified mime type; the caller
161 * should not free the character string.
163 public char[] getMimeType(int i
)
165 // const gchar* atk_streamable_content_get_mime_type (AtkStreamableContent *streamable, gint i);
166 return Str
.toString(atk_streamable_content_get_mime_type(atkStreamableContent
, i
) );
170 * Gets the content in the specified mime type.
172 * a GObject instance that implements AtkStreamableContentIface
174 * a gchar* representing the mime type
176 * A GIOChannel which contains the content in the specified mime
179 public IOChannel
getStream(char[] mimeType
)
181 // GIOChannel* atk_streamable_content_get_stream (AtkStreamableContent *streamable, const gchar *mime_type);
182 return new IOChannel( atk_streamable_content_get_stream(atkStreamableContent
, Str
.toStringz(mimeType
)) );
186 * Get a string representing a URI in IETF standard format
187 * (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content
188 * may be streamed in the specified mime-type, if one is available.
189 * If mime_type is NULL, the URI for the default (and possibly only) mime-type is
191 * Note that it is possible for get_uri to return NULL but for
192 * get_stream to work nonetheless, since not all GIOChannels connect to URIs.
194 * a GObject instance that implements AtkStreamableContentIface
196 * a gchar* representing the mime type, or NULL to request a URI
197 * for the default mime type.
199 * Returns a string representing a URI, or NULL if no corresponding URI
200 * can be constructed.
203 public char[] getUri(char[] mimeType
)
205 // gchar* atk_streamable_content_get_uri (AtkStreamableContent *streamable, const gchar *mime_type);
206 return Str
.toString(atk_streamable_content_get_uri(atkStreamableContent
, Str
.toStringz(mimeType
)) );