~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/gtk2/pango/pango-types.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// included by pango.pp
 
2
{$IFDEF read_interface_types}
 
3
   PPangoLanguage = ^TPangoLanguage;
 
4
   TPangoLanguage = pointer;
 
5
 
 
6
   { An index of a glyph into a font. Rendering system dependent }
 
7
   PPangoGlyph = ^TPangoGlyph;
 
8
   TPangoGlyph = guint32;
 
9
 
 
10
   { A rectangle. Used to store logical and physical extents of glyphs,
 
11
     runs, strings, etc.
 
12
   }
 
13
   PPangoRectangle = ^TPangoRectangle;
 
14
   TPangoRectangle = record
 
15
        x : longint;
 
16
        y : longint;
 
17
        width : longint;
 
18
        height : longint;
 
19
     end;
 
20
 
 
21
   PPangoDirection = ^TPangoDirection;
 
22
   TPangoDirection = (
 
23
     PANGO_DIRECTION_LTR,
 
24
     PANGO_DIRECTION_RTL,
 
25
     PANGO_DIRECTION_TTB_LTR,
 
26
     PANGO_DIRECTION_TTB_RTL
 
27
   );
 
28
{$ENDIF read_interface_types}
 
29
 
 
30
//------------------------------------------------------------------------------
 
31
 
 
32
{$IFDEF read_interface_functions}
 
33
const
 
34
  PANGO_SCALE = 1024;
 
35
 
 
36
function PANGO_PIXELS(d: integer): integer;
 
37
 
 
38
{ Macros to translate from extents rectangles to ascent/descent/lbearing/rbearing
 
39
  }
 
40
function PANGO_ASCENT(rect : TPangoRectangle) : longint;
 
41
function PANGO_DESCENT(rect : TPangoRectangle) : longint;
 
42
function PANGO_LBEARING(rect : TPangoRectangle) : longint;
 
43
function PANGO_RBEARING(rect : TPangoRectangle) : longint;
 
44
 
 
45
{ Information about a segment of text with a consistent
 
46
   shaping/language engine and bidirectional level
 
47
}
 
48
function PANGO_TYPE_LANGUAGE : GType;
 
49
function pango_language_get_type:GType; cdecl; external pangolib;
 
50
function pango_language_from_string(language:Pchar):PPangoLanguage; cdecl; external pangolib;
 
51
function pango_language_to_string(language : PPangoLanguage) : Pchar;
 
52
 
 
53
function pango_language_matches(language:PPangoLanguage; range_list:Pchar):gboolean; cdecl; external pangolib;
 
54
{$endif read_interface_funtions}
 
55
 
 
56
//------------------------------------------------------------------------------
 
57
 
 
58
{$IFDEF read_implementation}
 
59
function PANGO_ASCENT(rect : TPangoRectangle) : longint;
 
60
begin
 
61
   PANGO_ASCENT:=-(rect.y);
 
62
end;
 
63
 
 
64
function PANGO_DESCENT(rect : TPangoRectangle) : longint;
 
65
begin
 
66
   PANGO_DESCENT:=(rect.y) + (rect.height);
 
67
end;
 
68
 
 
69
function PANGO_LBEARING(rect : TPangoRectangle) : longint;
 
70
begin
 
71
   PANGO_LBEARING:=rect.x;
 
72
end;
 
73
 
 
74
function PANGO_RBEARING(rect : TPangoRectangle) : longint;
 
75
begin
 
76
   PANGO_RBEARING:=(rect.x) + (rect.width);
 
77
end;
 
78
 
 
79
function PANGO_TYPE_LANGUAGE : GType;
 
80
begin
 
81
  PANGO_TYPE_LANGUAGE:=pango_language_get_type;
 
82
end;
 
83
 
 
84
function pango_language_to_string(language : PPangoLanguage) : Pchar;
 
85
begin
 
86
  pango_language_to_string:=Pchar(language);
 
87
end;
 
88
 
 
89
function PANGO_PIXELS(d: integer): integer;
 
90
begin
 
91
  if d>=0 then
 
92
    PANGO_PIXELS:=(d+(PANGO_SCALE div 2)) div PANGO_SCALE
 
93
  else
 
94
    PANGO_PIXELS:=(d-(PANGO_SCALE div 2)) div PANGO_SCALE;
 
95
end;
 
96
{$ENDIF}