blob: cac332e3172e80aeca99ce1344ef0ef84cca6120 (
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
// included by gtk2.pas
{$IFDEF read_forward_definitions}
{$ENDIF read_forward_definitions}
//------------------------------------------------------------------------------
{$IFDEF read_interface_types}
{ GTK_DISABLE_DEPRECATED }
TGtkModuleInitFunc = procedure (argc:Pgint; argv:PPPgchar); cdecl;
TGtkKeySnoopFunc = function (grab_widget:PGtkWidget; event:PGdkEventKey; func_data:gpointer):gint; cdecl;
{$ENDIF read_interface_types}
//------------------------------------------------------------------------------
{$IFDEF read_interface_rest}
{ Priorities for redrawing and resizing }
const
GTK_PRIORITY_RESIZE = G_PRIORITY_HIGH_IDLE + 10;
{$ifndef GTK_DISABLE_DEPRECATED}
{ Use GDK_PRIORITY_REDRAW }
const
GTK_PRIORITY_REDRAW = G_PRIORITY_HIGH_IDLE + 20;
{ Deprecated. Use G_PRIORITY #define's instead
}
GTK_PRIORITY_HIGH = G_PRIORITY_HIGH;
GTK_PRIORITY_INTERNAL = GTK_PRIORITY_REDRAW;
GTK_PRIORITY_DEFAULT = G_PRIORITY_DEFAULT_IDLE;
GTK_PRIORITY_LOW = G_PRIORITY_LOW;
{$endif}
{$IFNDEF KYLIX}
{ Gtk version. }
var
{$IFDEF WIN32}
gtk_major_version : guint;external gtklib name 'gtk_major_version';
gtk_minor_version : guint;external gtklib name 'gtk_minor_version';
gtk_micro_version : guint;external gtklib name 'gtk_micro_version';
gtk_binary_age : guint;external gtklib name 'gtk_binary_age';
gtk_interface_age : guint;external gtklib name 'gtk_interface_type';
{$ELSE}
gtk_major_version : guint;cvar;external;
gtk_minor_version : guint;cvar;external;
gtk_micro_version : guint;cvar;external;
gtk_binary_age : guint;cvar;external;
gtk_interface_age : guint;cvar;external;
{$ENDIF}
{$ENDIF}
function gtk_check_version(required_major:guint; required_minor:guint; required_micro:guint):Pgchar; cdecl; external gtklib;
{$ifndef G_PLATFORM_WIN32}
{ Initialization, exit, mainloop and miscellaneous routines }
procedure gtk_init(argc:Plongint; argv:PPPchar); cdecl; external gtklib;
function gtk_init_check(argc:Plongint; argv:PPPchar):gboolean; cdecl; external gtklib;
{$else}
{ Variants that are used to check for correct struct packing
when building GTK+-using code. }
procedure gtk_init_abi_check(argc:Plongint; argv:PPPchar; num_checks:longint; sizeof_GtkWindow:Tsize_t; sizeof_GtkBox:Tsize_t); cdecl; external gtklib;
function gtk_init_check_abi_check(argc:Plongint; argv:PPPchar; num_checks:longint; sizeof_GtkWindow:Tsize_t; sizeof_GtkBox:Tsize_t):gboolean; cdecl; external gtklib;
procedure gtk_init(argc: Plongint; argv : PPPchar);
function gtk_init_check(argc: Plongint; argv : PPPchar) : gboolean;
{$endif G_PLATFORM_WIN32}
{$ifndef GTK_DISABLE_DEPRECATED}
procedure gtk_exit(error_code:gint); cdecl; external gtklib;
{$endif}
{ GTK_DISABLE_DEPRECATED }
procedure gtk_disable_setlocale; cdecl; external gtklib;
function gtk_set_locale:Pgchar; cdecl; external gtklib;
function gtk_get_default_language:PPangoLanguage; cdecl; external gtklib;
function gtk_events_pending:gint; cdecl; external gtklib;
{ The following is the event func GTK+ registers with GDK
we expose it mainly to allow filtering of events between
GDK and GTK+.
}
procedure gtk_main_do_event(event:PGdkEvent); cdecl; external gtklib;
procedure gtk_main; cdecl; external gtklib;
function gtk_main_level:guint; cdecl; external gtklib;
procedure gtk_main_quit; cdecl; external gtklib;
function gtk_main_iteration:gboolean; cdecl; external gtklib;
{ gtk_main_iteration() calls gtk_main_iteration_do(TRUE) }
function gtk_main_iteration_do(blocking:gboolean):gboolean; cdecl; external gtklib;
function gtk_true:gboolean; cdecl; external gtklib;
function gtk_false:gboolean; cdecl; external gtklib;
procedure gtk_grab_add(widget:PGtkWidget); cdecl; external gtklib;
function gtk_grab_get_current:PGtkWidget; cdecl; external gtklib;
procedure gtk_grab_remove(widget:PGtkWidget); cdecl; external gtklib;
procedure gtk_init_add(_function:TGtkFunction; data:gpointer); cdecl; external gtklib;
procedure gtk_quit_add_destroy(main_level:guint; anObject:PGtkObject); cdecl; external gtklib;
function gtk_quit_add(main_level:guint; _function:TGtkFunction; data:gpointer):guint; cdecl; external gtklib;
function gtk_quit_add_full(main_level:guint; _function:TGtkFunction; marshal:TGtkCallbackMarshal; data:gpointer; destroy:TGtkDestroyNotify):guint; cdecl; external gtklib;
procedure gtk_quit_remove(quit_handler_id:guint); cdecl; external gtklib;
procedure gtk_quit_remove_by_data(data:gpointer); cdecl; external gtklib;
function gtk_timeout_add(interval:guint32; _function:TGtkFunction; data:gpointer):guint; cdecl; external gtklib;
function gtk_timeout_add_full(interval:guint32; _function:TGtkFunction; marshal:TGtkCallbackMarshal; data:gpointer; destroy:TGtkDestroyNotify):guint; cdecl; external gtklib;
procedure gtk_timeout_remove(timeout_handler_id:guint); cdecl; external gtklib;
function gtk_idle_add(_function:TGtkFunction; data:gpointer):guint; cdecl; external gtklib;
function gtk_idle_add_priority(priority:gint; _function:TGtkFunction; data:gpointer):guint; cdecl; external gtklib;
function gtk_idle_add_full(priority:gint; _function:TGtkFunction; marshal:TGtkCallbackMarshal; data:gpointer; destroy:TGtkDestroyNotify):guint; cdecl; external gtklib;
procedure gtk_idle_remove(idle_handler_id:guint); cdecl; external gtklib;
procedure gtk_idle_remove_by_data(data:gpointer); cdecl; external gtklib;
function gtk_input_add_full(source:gint; condition:TGdkInputCondition; _function:TGdkInputFunction; marshal:TGtkCallbackMarshal; data:gpointer;
destroy:TGtkDestroyNotify):guint; cdecl; external gtklib;
procedure gtk_input_remove(input_handler_id:guint); cdecl; external gtklib;
function gtk_key_snooper_install(snooper:TGtkKeySnoopFunc; func_data:gpointer):guint; cdecl; external gtklib;
procedure gtk_key_snooper_remove(snooper_handler_id:guint); cdecl; external gtklib;
function gtk_get_current_event:PGdkEvent; cdecl; external gtklib;
function gtk_get_current_event_time:guint32; cdecl; external gtklib;
function gtk_get_current_event_state(state:PGdkModifierType):gboolean; cdecl; external gtklib;
function gtk_get_event_widget(event:PGdkEvent):PGtkWidget; cdecl; external gtklib;
{ Private routines internal to GTK+ }
procedure gtk_propagate_event(widget:PGtkWidget; event:PGdkEvent); cdecl; external gtklib;
function _gtk_boolean_handled_accumulator(ihint:PGSignalInvocationHint; return_accu:PGValue; handler_return:PGValue; dummy:gpointer):gboolean; cdecl; external gtklib;
function _gtk_find_module(name:Pgchar; _type:Pgchar):Pgchar; cdecl; external gtklib;
function _gtk_get_module_path(_type:Pgchar):PPgchar; cdecl; external gtklib;
{$ENDIF read_interface_rest}
//------------------------------------------------------------------------------
{$IFDEF read_implementation}
{$ifdef G_PLATFORM_WIN32}
procedure gtk_init(argc: Plongint; argv : PPPchar);
begin
gtk_init_abi_check(argc,argv,2,sizeof(TGtkWindow),sizeof(TGtkBox));
end;
function gtk_init_check(argc: Plongint; argv : PPPchar) : gboolean;
begin
gtk_init_check:=gtk_init_check_abi_check(argc,argv,2,sizeof(TGtkWindow),sizeof(TGtkBox));
end;
{$endif G_PLATFORM_WIN32}
{$ENDIF read_implementation}
// included by gtk2.pas
|