3
{$IFDEF read_forward_definitions}
4
{$ENDIF read_forward_definitions}
6
//------------------------------------------------------------------------------
8
{$IFDEF read_interface_types}
9
{ Get the number of mime types supported by this anObject }
10
{ Gets the specified mime type supported by this anObject.
11
The mime types are 0-based so the first mime type is
12
at index 0, the second at index 1 and so on.
14
This assumes that the strings for the mime types are stored in the
15
AtkStreamableContent. Alternatively the could be removed
16
and the caller would be responsible for calling g_free() on the
20
Is one possible implementation for this method that it constructs the
21
content appropriate for the mime type and then creates a temporary
22
file containing the content, opens the file and then calls
23
g_io_channel_unix_new_fd().
25
PAtkStreamableContentIface = ^TAtkStreamableContentIface;
26
TAtkStreamableContentIface = record
27
parent : TGTypeInterface;
28
get_n_mime_types : function (streamable:PAtkStreamableContent):gint; cdecl;
29
get_mime_type : function (streamable:PAtkStreamableContent; i:gint):Pgchar; cdecl;
30
get_stream : function (streamable:PAtkStreamableContent; mime_type:Pgchar):PGIOChannel; cdecl;
37
{$ENDIF read_interface_types}
39
//------------------------------------------------------------------------------
41
{$IFDEF read_interface_rest}
42
function ATK_TYPE_STREAMABLE_CONTENT : GType;
43
function ATK_IS_STREAMABLE_CONTENT(obj: pointer) : boolean;
44
function ATK_STREAMABLE_CONTENT(obj: pointer) : PAtkStreamableContent;
45
function ATK_STREAMABLE_CONTENT_GET_IFACE(obj: pointer) : PAtkStreamableContentIface;
48
function atk_streamable_content_get_type:GType; cdecl; external atklib;
49
function atk_streamable_content_get_n_mime_types(streamable:PAtkStreamableContent):gint; cdecl; external atklib;
50
function atk_streamable_content_get_mime_type(streamable:PAtkStreamableContent; i:gint):Pgchar; cdecl; external atklib;
51
function atk_streamable_content_get_stream(streamable:PAtkStreamableContent; mime_type:Pgchar):PGIOChannel; cdecl; external atklib;
52
{$ENDIF read_interface_rest}
54
//------------------------------------------------------------------------------
56
{$IFDEF read_implementation}
57
function ATK_TYPE_STREAMABLE_CONTENT : GType;
59
ATK_TYPE_STREAMABLE_CONTENT:=atk_streamable_content_get_type;
62
function ATK_IS_STREAMABLE_CONTENT(obj: pointer) : boolean;
64
ATK_IS_STREAMABLE_CONTENT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_STREAMABLE_CONTENT);
67
function ATK_STREAMABLE_CONTENT(obj: pointer) : PAtkStreamableContent;
69
ATK_STREAMABLE_CONTENT:=PAtkStreamableContent(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_STREAMABLE_CONTENT));
72
function ATK_STREAMABLE_CONTENT_GET_IFACE(obj: pointer) : PAtkStreamableContentIface;
74
ATK_STREAMABLE_CONTENT_GET_IFACE:=PAtkStreamableContentIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_STREAMABLE_CONTENT));
77
{$ENDIF read_implementation}