1
// included by gtk2.pas
3
{$IFDEF read_forward_definitions}
4
{$ENDIF read_forward_definitions}
6
//------------------------------------------------------------------------------
8
{$IFDEF read_interface_types}
9
PGtkSpinButtonUpdatePolicy = ^TGtkSpinButtonUpdatePolicy;
10
TGtkSpinButtonUpdatePolicy = (
15
PGtkSpinType = ^TGtkSpinType;
17
GTK_SPIN_STEP_FORWARD,
18
GTK_SPIN_STEP_BACKWARD,
19
GTK_SPIN_PAGE_FORWARD,
20
GTK_SPIN_PAGE_BACKWARD,
26
{ valid: GTK_ARROW_UP=0, GTK_ARROW_DOWN=1 or 2=NONE/BOTH }
27
PGtkSpinButton = ^TGtkSpinButton;
28
TGtkSpinButton = record
30
adjustment : PGtkAdjustment;
35
update_policy : TGtkSpinButtonUpdatePolicy;
39
{ Action signals for keybindings, do not connect to these }
40
{ Padding for future expansion }
41
PGtkSpinButtonClass = ^TGtkSpinButtonClass;
42
TGtkSpinButtonClass = record
43
parent_class : TGtkEntryClass;
44
input : function (spin_button:PGtkSpinButton; new_value:Pgdouble):gint; cdecl;
45
output : function (spin_button:PGtkSpinButton):gint; cdecl;
46
value_changed : procedure (spin_button:PGtkSpinButton); cdecl;
47
change_value : procedure (spin_button:PGtkSpinButton; scroll:TGtkScrollType); cdecl;
48
_gtk_reserved1 : procedure ; cdecl;
49
_gtk_reserved2 : procedure ; cdecl;
50
_gtk_reserved3 : procedure ; cdecl;
51
_gtk_reserved4 : procedure ; cdecl;
54
{$ENDIF read_interface_types}
56
//------------------------------------------------------------------------------
58
{$IFDEF read_interface_rest}
60
GTK_INPUT_ERROR = -(1);
62
bm_TGtkSpinButton_in_child = $3;
63
bp_TGtkSpinButton_in_child = 0;
64
bm_TGtkSpinButton_click_child = $C;
65
bp_TGtkSpinButton_click_child = 2;
66
bm_TGtkSpinButton_button = $30;
67
bp_TGtkSpinButton_button = 4;
68
bm_TGtkSpinButton_need_timer = $40;
69
bp_TGtkSpinButton_need_timer = 6;
70
bm_TGtkSpinButton_timer_calls = $380;
71
bp_TGtkSpinButton_timer_calls = 7;
72
bm_TGtkSpinButton_digits = $FFC00;
73
bp_TGtkSpinButton_digits = 10;
74
bm_TGtkSpinButton_numeric = $100000;
75
bp_TGtkSpinButton_numeric = 20;
76
bm_TGtkSpinButton_wrap = $200000;
77
bp_TGtkSpinButton_wrap = 21;
78
bm_TGtkSpinButton_snap_to_ticks = $400000;
79
bp_TGtkSpinButton_snap_to_ticks = 22;
82
function GTK_TYPE_SPIN_BUTTON : GType;
83
function GTK_SPIN_BUTTON(obj: pointer) : PGtkSpinButton;
84
function GTK_SPIN_BUTTON_CLASS(klass: pointer) : PGtkSpinButtonClass;
85
function GTK_IS_SPIN_BUTTON(obj: pointer) : boolean;
86
function GTK_IS_SPIN_BUTTON_CLASS(klass: pointer) : boolean;
87
function GTK_SPIN_BUTTON_GET_CLASS(obj: pointer) : PGtkSpinButtonClass;
90
function in_child(var a : TGtkSpinButton) : guint; overload;
91
procedure set_in_child(var a : TGtkSpinButton; __in_child : guint); overload;
92
function click_child(var a : TGtkSpinButton) : guint; overload;
93
procedure set_click_child(var a : TGtkSpinButton; __click_child : guint); overload;
94
function button(var a : TGtkSpinButton) : guint; overload;
95
procedure set_button(var a : TGtkSpinButton; __button : guint); overload;
96
function need_timer(var a : TGtkSpinButton) : guint; overload;
97
procedure set_need_timer(var a : TGtkSpinButton; __need_timer : guint); overload;
98
function timer_calls(var a : TGtkSpinButton) : guint;
99
procedure set_timer_calls(var a : TGtkSpinButton; __timer_calls : guint);
100
function digits(var a : TGtkSpinButton) : guint;
101
procedure set_digits(var a : TGtkSpinButton; __digits : guint);
102
function numeric(var a : TGtkSpinButton) : guint;
103
procedure set_numeric(var a : TGtkSpinButton; __numeric : guint);
104
function wrap(var a : TGtkSpinButton) : guint; overload;
105
procedure set_wrap(var a : TGtkSpinButton; __wrap : guint); overload;
106
function snap_to_ticks(var a : TGtkSpinButton) : guint;
107
procedure set_snap_to_ticks(var a : TGtkSpinButton; __snap_to_ticks : guint);
109
function gtk_spin_button_get_type:TGtkType; cdecl; external gtklib;
110
procedure gtk_spin_button_configure(spin_button:PGtkSpinButton; adjustment:PGtkAdjustment; climb_rate:gdouble; digits:guint); cdecl; external gtklib;
111
function gtk_spin_button_new(adjustment:PGtkAdjustment; climb_rate:gdouble; digits:guint):PGtkWidget; cdecl; external gtklib;
112
function gtk_spin_button_new_with_range(min:gdouble; max:gdouble; step:gdouble):PGtkWidget; cdecl; external gtklib;
113
procedure gtk_spin_button_set_adjustment(spin_button:PGtkSpinButton; adjustment:PGtkAdjustment); cdecl; external gtklib;
114
function gtk_spin_button_get_adjustment(spin_button:PGtkSpinButton):PGtkAdjustment; cdecl; external gtklib;
115
procedure gtk_spin_button_set_digits(spin_button:PGtkSpinButton; digits:guint); cdecl; external gtklib;
116
function gtk_spin_button_get_digits(spin_button:PGtkSpinButton):guint; cdecl; external gtklib;
117
procedure gtk_spin_button_set_increments(spin_button:PGtkSpinButton; step:gdouble; page:gdouble); cdecl; external gtklib;
118
procedure gtk_spin_button_get_increments(spin_button:PGtkSpinButton; step:Pgdouble; page:Pgdouble); cdecl; external gtklib;
119
procedure gtk_spin_button_set_range(spin_button:PGtkSpinButton; min:gdouble; max:gdouble); cdecl; external gtklib;
120
procedure gtk_spin_button_get_range(spin_button:PGtkSpinButton; min:Pgdouble; max:Pgdouble); cdecl; external gtklib;
121
function gtk_spin_button_get_value(spin_button:PGtkSpinButton):gdouble; cdecl; external gtklib;
122
function gtk_spin_button_get_value_as_int(spin_button:PGtkSpinButton):gint; cdecl; external gtklib;
123
procedure gtk_spin_button_set_value(spin_button:PGtkSpinButton; value:gdouble); cdecl; external gtklib;
124
procedure gtk_spin_button_set_update_policy(spin_button:PGtkSpinButton; policy:TGtkSpinButtonUpdatePolicy); cdecl; external gtklib;
125
function gtk_spin_button_get_update_policy(spin_button:PGtkSpinButton):TGtkSpinButtonUpdatePolicy; cdecl; external gtklib;
126
procedure gtk_spin_button_set_numeric(spin_button:PGtkSpinButton; numeric:gboolean); cdecl; external gtklib;
127
function gtk_spin_button_get_numeric(spin_button:PGtkSpinButton):gboolean; cdecl; external gtklib;
128
procedure gtk_spin_button_spin(spin_button:PGtkSpinButton; direction:TGtkSpinType; increment:gdouble); cdecl; external gtklib;
129
procedure gtk_spin_button_set_wrap(spin_button:PGtkSpinButton; wrap:gboolean); cdecl; external gtklib;
130
function gtk_spin_button_get_wrap(spin_button:PGtkSpinButton):gboolean; cdecl; external gtklib;
131
procedure gtk_spin_button_set_snap_to_ticks(spin_button:PGtkSpinButton; snap_to_ticks:gboolean); cdecl; external gtklib;
132
function gtk_spin_button_get_snap_to_ticks(spin_button:PGtkSpinButton):gboolean; cdecl; external gtklib;
133
procedure gtk_spin_button_update(spin_button:PGtkSpinButton); cdecl; external gtklib;
135
{$ifndef GTK_DISABLE_DEPRECATED}
136
function gtk_spin_button_get_value_as_float(spin_button:PGtkSpinButton):gdouble;
139
{$ENDIF read_interface_rest}
141
//------------------------------------------------------------------------------
143
{$IFDEF read_implementation}
144
function GTK_TYPE_SPIN_BUTTON : GType;
146
GTK_TYPE_SPIN_BUTTON:=gtk_spin_button_get_type;
149
function GTK_SPIN_BUTTON(obj: pointer) : PGtkSpinButton;
151
GTK_SPIN_BUTTON:=PGtkSpinButton(GTK_CHECK_CAST(obj,GTK_TYPE_SPIN_BUTTON));
154
function GTK_SPIN_BUTTON_CLASS(klass: pointer) : PGtkSpinButtonClass;
156
GTK_SPIN_BUTTON_CLASS:=PGtkSpinButtonClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SPIN_BUTTON));
159
function GTK_IS_SPIN_BUTTON(obj: pointer) : boolean;
161
GTK_IS_SPIN_BUTTON:=GTK_CHECK_TYPE(obj,GTK_TYPE_SPIN_BUTTON);
164
function GTK_IS_SPIN_BUTTON_CLASS(klass: pointer) : boolean;
166
GTK_IS_SPIN_BUTTON_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SPIN_BUTTON);
169
function GTK_SPIN_BUTTON_GET_CLASS(obj: pointer) : PGtkSpinButtonClass;
171
GTK_SPIN_BUTTON_GET_CLASS:=PGtkSpinButtonClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SPIN_BUTTON));
174
function in_child(var a : TGtkSpinButton) : guint;
176
in_child:=(a.flag0 and bm_TGtkSpinButton_in_child) shr bp_TGtkSpinButton_in_child;
179
procedure set_in_child(var a : TGtkSpinButton; __in_child : guint);
181
a.flag0:=a.flag0 or ((__in_child shl bp_TGtkSpinButton_in_child) and bm_TGtkSpinButton_in_child);
184
function click_child(var a : TGtkSpinButton) : guint;
186
click_child:=(a.flag0 and bm_TGtkSpinButton_click_child) shr bp_TGtkSpinButton_click_child;
189
procedure set_click_child(var a : TGtkSpinButton; __click_child : guint);
191
a.flag0:=a.flag0 or ((__click_child shl bp_TGtkSpinButton_click_child) and bm_TGtkSpinButton_click_child);
194
function button(var a : TGtkSpinButton) : guint;
196
button:=(a.flag0 and bm_TGtkSpinButton_button) shr bp_TGtkSpinButton_button;
199
procedure set_button(var a : TGtkSpinButton; __button : guint);
201
a.flag0:=a.flag0 or ((__button shl bp_TGtkSpinButton_button) and bm_TGtkSpinButton_button);
204
function need_timer(var a : TGtkSpinButton) : guint;
206
need_timer:=(a.flag0 and bm_TGtkSpinButton_need_timer) shr bp_TGtkSpinButton_need_timer;
209
procedure set_need_timer(var a : TGtkSpinButton; __need_timer : guint);
211
a.flag0:=a.flag0 or ((__need_timer shl bp_TGtkSpinButton_need_timer) and bm_TGtkSpinButton_need_timer);
214
function timer_calls(var a : TGtkSpinButton) : guint;
216
timer_calls:=(a.flag0 and bm_TGtkSpinButton_timer_calls) shr bp_TGtkSpinButton_timer_calls;
219
procedure set_timer_calls(var a : TGtkSpinButton; __timer_calls : guint);
221
a.flag0:=a.flag0 or ((__timer_calls shl bp_TGtkSpinButton_timer_calls) and bm_TGtkSpinButton_timer_calls);
224
function digits(var a : TGtkSpinButton) : guint;
226
digits:=(a.flag0 and bm_TGtkSpinButton_digits) shr bp_TGtkSpinButton_digits;
229
procedure set_digits(var a : TGtkSpinButton; __digits : guint);
231
a.flag0:=a.flag0 or ((__digits shl bp_TGtkSpinButton_digits) and bm_TGtkSpinButton_digits);
234
function numeric(var a : TGtkSpinButton) : guint;
236
numeric:=(a.flag0 and bm_TGtkSpinButton_numeric) shr bp_TGtkSpinButton_numeric;
239
procedure set_numeric(var a : TGtkSpinButton; __numeric : guint);
241
a.flag0:=a.flag0 or ((__numeric shl bp_TGtkSpinButton_numeric) and bm_TGtkSpinButton_numeric);
244
function wrap(var a : TGtkSpinButton) : guint;
246
wrap:=(a.flag0 and bm_TGtkSpinButton_wrap) shr bp_TGtkSpinButton_wrap;
249
procedure set_wrap(var a : TGtkSpinButton; __wrap : guint);
251
a.flag0:=a.flag0 or ((__wrap shl bp_TGtkSpinButton_wrap) and bm_TGtkSpinButton_wrap);
254
function snap_to_ticks(var a : TGtkSpinButton) : guint;
256
snap_to_ticks:=(a.flag0 and bm_TGtkSpinButton_snap_to_ticks) shr bp_TGtkSpinButton_snap_to_ticks;
259
procedure set_snap_to_ticks(var a : TGtkSpinButton; __snap_to_ticks : guint);
261
a.flag0:=a.flag0 or ((__snap_to_ticks shl bp_TGtkSpinButton_snap_to_ticks) and bm_TGtkSpinButton_snap_to_ticks);
264
{$ifndef GTK_DISABLE_DEPRECATED}
265
function gtk_spin_button_get_value_as_float(spin_button:PGtkSpinButton):gdouble;
267
gtk_spin_button_get_value_as_float:=gtk_spin_button_get_value(spin_button);
271
{$ENDIF read_implementation}
272
// included by gtk2.pas