summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/gtk2/src/gtkhtml/gtkhtml.pas
blob: af6df2d57fbedf04fd7e8c15928b9027b85755be (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
  Copyright (C) 2000 CodeFactory AB
  Copyright (C) 2000 Jonas Borgström <jonas@codefactory.se>
  Copyright (C) 2000 Anders Carlsson <andersca@codefactory.se>

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public
  License as published by the Free Software Foundation; either
  version 2 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Library General Public License for more details.

  You should have received a copy of the GNU Library General Public License
  along with this library; see the file COPYING.LIB.  If not, write to
  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.
}
{
  !!!!! Maybe wrong for kylix !!!!!
}
unit gtkhtml;

{$H+}
{$IFDEF FPC}
  {$mode objfpc}
{$ENDIF}
{$IFDEF VER140}
  {$DEFINE KYLIX}
{$ENDIF}

interface

uses
  gtk2, glib2, atk, pango, gdk2pixbuf, gdk2;

const
// OS dependent defines
// !!!!! Maybe wrong for platforms other than linux !!!!!
{$ifdef windows}
  {$DEFINE GTK_WINDOWING_WIN32}
  gtkhtmllib = 'libgtkhtml-win32-2.0-0.dll';
  {$IFDEF FPC}
    {$ifndef NO_SMART_LINK}
      {$smartlink on}
    {$endif}
  {$ENDIF}
{$else}
  {$ifdef linux}
  gtkhtmllib = '';
  {$else}
  gtkhtmllib = 'libgtkhtml-2.so';
  {$endif}
{$endif}

const
  DOM_UNSPECIFIED_EVENT_TYPE_ERR = 0;
  DOM_INDEX_SIZE_ERR = 1;
  DOM_DOMSTRING_SIZE_ERR = 2;
  DOM_HIERARCHY_REQUEST_ERR = 3;
  DOM_WRONG_DOCUMENT_ERR = 4;
  DOM_INVALID_CHARACTER_ERR = 5;
  DOM_NO_DATA_ALLOWED_ERR = 6;
  DOM_NO_MODIFICATION_ALLOWED_ERR = 7;
  DOM_NOT_FOUND_ERR = 8;
  DOM_NOT_SUPPORTED_ERR = 9;
  DOM_INUSE_ATTRIBUTE_ERR = 10;
  DOM_INVALID_STATE_ERR = 11;
  DOM_SYNTAX_ERR = 12;
  DOM_INVALID_MODIFICATION_ERR = 13;
  DOM_NAMESPACE_ERR = 14;
  DOM_INVALID_ACCESS_ERR = 15;
  DOM_NO_EXCEPTION = 255;

  DOM_ELEMENT_NODE = 1;
  DOM_ATTRIBUTE_NODE = 2;
  DOM_TEXT_NODE = 3;
  DOM_CDATA_SECTION_NODE = 4;
  DOM_ENTITY_REFERENCE_NODE = 5;
  DOM_ENTITY_NODE = 6;
  DOM_PROCESSING_INSTRUCTION_NODE = 7;
  DOM_COMMENT_NODE = 8;
  DOM_DOCUMENT_NODE = 9;
  DOM_DOCUMENT_TYPE_NODE = 10;
  DOM_DOCUMENT_FRAGMENT_NODE = 11;
  DOM_NOTATION_NODE = 12;

  bm__HtmlFontSpecification_weight = $F;
  bp__HtmlFontSpecification_weight = 0;
  bm__HtmlFontSpecification_style = $30;
  bp__HtmlFontSpecification_style = 4;
  bm__HtmlFontSpecification_variant = $C0;
  bp__HtmlFontSpecification_variant = 6;
  bm__HtmlFontSpecification_stretch = $F00;
  bp__HtmlFontSpecification_stretch = 8;
  bm__HtmlFontSpecification_decoration = $7000;
  bp__HtmlFontSpecification_decoration = 12;

type
  {$DEFINE read_forward_definitions}
  {$include gtkhtmlincludes.inc}
  {$UNDEF read_forward_definitions}

  {$DEFINE read_interface_types}
  {$include gtkhtmlincludes.inc}
  {$UNDEF read_interface_types}

  {$DEFINE read_interface_rest}
  {$include gtkhtmlincludes.inc}
  {$UNDEF read_interface_rest}

implementation

// call implementation parts of header files
{$DEFINE read_implementation}
{$include gtkhtmlincludes.inc}
{$UNDEF read_implementation}

end.//unit gtkhtml