~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to packages/extra/gtk2/atk/atkstreamablecontent.inc

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// included by atk.pp
 
2
 
 
3
{$IFDEF read_forward_definitions}
 
4
{$ENDIF read_forward_definitions}
 
5
 
 
6
//------------------------------------------------------------------------------
 
7
 
 
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.
 
13
 
 
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
 
17
   returned value.
 
18
    }
 
19
{
 
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().
 
24
    }
 
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;
 
31
        pad1 : TAtkFunction;
 
32
        pad2 : TAtkFunction;
 
33
        pad3 : TAtkFunction;
 
34
        pad4 : TAtkFunction;
 
35
     end;
 
36
 
 
37
{$ENDIF read_interface_types}
 
38
 
 
39
//------------------------------------------------------------------------------
 
40
 
 
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;
 
46
 
 
47
 
 
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}
 
53
 
 
54
//------------------------------------------------------------------------------
 
55
 
 
56
{$IFDEF read_implementation}
 
57
function ATK_TYPE_STREAMABLE_CONTENT : GType;
 
58
begin
 
59
   ATK_TYPE_STREAMABLE_CONTENT:=atk_streamable_content_get_type;
 
60
end;
 
61
 
 
62
function ATK_IS_STREAMABLE_CONTENT(obj: pointer) : boolean;
 
63
begin
 
64
   ATK_IS_STREAMABLE_CONTENT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_STREAMABLE_CONTENT);
 
65
end;
 
66
 
 
67
function ATK_STREAMABLE_CONTENT(obj: pointer) : PAtkStreamableContent;
 
68
begin
 
69
   ATK_STREAMABLE_CONTENT:=PAtkStreamableContent(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_STREAMABLE_CONTENT));
 
70
end;
 
71
 
 
72
function ATK_STREAMABLE_CONTENT_GET_IFACE(obj: pointer) : PAtkStreamableContentIface;
 
73
begin
 
74
   ATK_STREAMABLE_CONTENT_GET_IFACE:=PAtkStreamableContentIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_STREAMABLE_CONTENT));
 
75
end;
 
76
 
 
77
{$ENDIF read_implementation}
 
78