summaryrefslogtreecommitdiff
path: root/packages/gtk2/src/pango/pango-context.inc
blob: d7e92d399f4b8994279dc69af359342342a81fc9 (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
// included by pango.pp
{$IFDEF read_interface_types}

{$ENDIF}

//------------------------------------------------------------------------------

{$IFDEF read_interface_functions}

{ Sort of like a GC - application set information about how
   to handle scripts
  }
{ PangoContext typedefed in pango-fontmap.h  }

function PANGO_TYPE_CONTEXT : GType;
function PANGO_CONTEXT(anObject : pointer) : PPangoContext;
function PANGO_CONTEXT_CLASS(klass : pointer) : PPangoContextClass;
function PANGO_IS_CONTEXT(anObject : pointer) : boolean;
function PANGO_IS_CONTEXT_CLASS(klass : pointer) : boolean;
function PANGO_CONTEXT_GET_CLASS(obj : PPangoContext) : PPangoContextClass;

{ The PangoContext and PangoContextClass structs are private; if you
   need to create a subclass of these, mail otaylor@redhat.com
  }
function pango_context_get_type:GType; cdecl; external pangolib;
{$ifdef PANGO_ENABLE_BACKEND}

function pango_context_new:PPangoContext; cdecl; external pangolib;
procedure pango_context_set_font_map(context:PPangoContext; font_map:PPangoFontMap); cdecl; external pangolib;
{$endif}
{ PANGO_ENABLE_BACKEND  }

procedure pango_context_list_families(context:PPangoContext; families:PPPPangoFontFamily; n_families:Plongint); cdecl; external pangolib;
function pango_context_load_font(context:PPangoContext; desc:PPangoFontDescription):PPangoFont; cdecl; external pangolib;
function pango_context_load_fontset(context:PPangoContext; desc:PPangoFontDescription; language:PPangoLanguage):PPangoFontset; cdecl; external pangolib;
function pango_context_get_metrics(context:PPangoContext; desc:PPangoFontDescription; language:PPangoLanguage):PPangoFontMetrics; cdecl; external pangolib;
procedure pango_context_set_font_description(context:PPangoContext; desc:PPangoFontDescription); cdecl; external pangolib;
function pango_context_get_font_description(context:PPangoContext):PPangoFontDescription; cdecl; external pangolib;
function pango_context_get_language(context:PPangoContext):PPangoLanguage; cdecl; external pangolib;
procedure pango_context_set_language(context:PPangoContext; language:PPangoLanguage); cdecl; external pangolib;
procedure pango_context_set_base_dir(context:PPangoContext; direction:TPangoDirection); cdecl; external pangolib;
function pango_context_get_base_dir(context:PPangoContext):TPangoDirection; cdecl; external pangolib;

{ Break a string of Unicode characters into segments with
   consistent shaping/language engine and bidrectional level.
   Returns a GList of PangoItem's
  }
function pango_itemize(context:PPangoContext; text:Pchar; start_index:longint; length:longint; attrs:PPangoAttrList;
           cached_iter:PPangoAttrIterator):PGList; cdecl; external pangolib;
{$endif read_interface_functions}

//------------------------------------------------------------------------------

{$IFDEF read_implementation}

function PANGO_TYPE_CONTEXT : GType;
begin
  PANGO_TYPE_CONTEXT:=pango_context_get_type;
end;

function PANGO_CONTEXT(anObject : pointer) : PPangoContext;
begin
  PANGO_CONTEXT:=PPangoContext(G_TYPE_CHECK_INSTANCE_CAST(anObject,
                                                          PANGO_TYPE_CONTEXT));
end;

function PANGO_CONTEXT_CLASS(klass : pointer) : PPangoContextClass;
begin
  PANGO_CONTEXT_CLASS:=PPangoContextClass(G_TYPE_CHECK_CLASS_CAST(klass,
                                          PANGO_TYPE_CONTEXT));
end;

function PANGO_IS_CONTEXT(anObject : pointer) : boolean;
begin
  PANGO_IS_CONTEXT:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,PANGO_TYPE_CONTEXT);
end;

function PANGO_IS_CONTEXT_CLASS(klass : pointer) : boolean;
begin
  PANGO_IS_CONTEXT_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,PANGO_TYPE_CONTEXT);
end;

function PANGO_CONTEXT_GET_CLASS(obj : PPangoContext) : PPangoContextClass;
begin
  PANGO_CONTEXT_GET_CLASS:=PPangoContextClass(G_TYPE_INSTANCE_GET_CLASS(obj,
                                              PANGO_TYPE_CONTEXT));
end;
{$ENDIF read_implementation}