~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/packages/gtk2/src/gtk+/gtk/gtkspinbutton.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// included by gtk2.pas
 
2
 
 
3
{$IFDEF read_forward_definitions}
 
4
{$ENDIF read_forward_definitions}
 
5
 
 
6
//------------------------------------------------------------------------------
 
7
 
 
8
{$IFDEF read_interface_types}
 
9
   PGtkSpinButtonUpdatePolicy = ^TGtkSpinButtonUpdatePolicy;
 
10
   TGtkSpinButtonUpdatePolicy = (
 
11
     GTK_UPDATE_ALWAYS,
 
12
     GTK_UPDATE_IF_VALID
 
13
   );
 
14
 
 
15
   PGtkSpinType = ^TGtkSpinType;
 
16
   TGtkSpinType = (
 
17
     GTK_SPIN_STEP_FORWARD,
 
18
     GTK_SPIN_STEP_BACKWARD,
 
19
     GTK_SPIN_PAGE_FORWARD,
 
20
     GTK_SPIN_PAGE_BACKWARD,
 
21
     GTK_SPIN_HOME,
 
22
     GTK_SPIN_END,
 
23
     GTK_SPIN_USER_DEFINED
 
24
   );
 
25
 
 
26
{ valid: GTK_ARROW_UP=0, GTK_ARROW_DOWN=1 or 2=NONE/BOTH  }
 
27
   PGtkSpinButton = ^TGtkSpinButton;
 
28
   TGtkSpinButton = record
 
29
        entry : TGtkEntry;
 
30
        adjustment : PGtkAdjustment;
 
31
        panel : PGdkWindow;
 
32
        timer : guint32;
 
33
        climb_rate : gdouble;
 
34
        timer_step : gdouble;
 
35
        update_policy : TGtkSpinButtonUpdatePolicy;
 
36
        flag0 : longint;
 
37
     end;
 
38
 
 
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;
 
52
     end;
 
53
 
 
54
{$ENDIF read_interface_types}
 
55
 
 
56
//------------------------------------------------------------------------------
 
57
 
 
58
{$IFDEF read_interface_rest}
 
59
const
 
60
   GTK_INPUT_ERROR = -(1);
 
61
 
 
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;
 
80
 
 
81
 
 
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;
 
88
 
 
89
 
 
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);
 
108
 
 
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;
 
134
 
 
135
{$ifndef GTK_DISABLE_DEPRECATED}
 
136
function gtk_spin_button_get_value_as_float(spin_button:PGtkSpinButton):gdouble;
 
137
{$endif}
 
138
 
 
139
{$ENDIF read_interface_rest}
 
140
 
 
141
//------------------------------------------------------------------------------
 
142
 
 
143
{$IFDEF read_implementation}
 
144
function GTK_TYPE_SPIN_BUTTON : GType;
 
145
begin
 
146
   GTK_TYPE_SPIN_BUTTON:=gtk_spin_button_get_type;
 
147
end;
 
148
 
 
149
function GTK_SPIN_BUTTON(obj: pointer) : PGtkSpinButton;
 
150
begin
 
151
   GTK_SPIN_BUTTON:=PGtkSpinButton(GTK_CHECK_CAST(obj,GTK_TYPE_SPIN_BUTTON));
 
152
end;
 
153
 
 
154
function GTK_SPIN_BUTTON_CLASS(klass: pointer) : PGtkSpinButtonClass;
 
155
begin
 
156
   GTK_SPIN_BUTTON_CLASS:=PGtkSpinButtonClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SPIN_BUTTON));
 
157
end;
 
158
 
 
159
function GTK_IS_SPIN_BUTTON(obj: pointer) : boolean;
 
160
begin
 
161
   GTK_IS_SPIN_BUTTON:=GTK_CHECK_TYPE(obj,GTK_TYPE_SPIN_BUTTON);
 
162
end;
 
163
 
 
164
function GTK_IS_SPIN_BUTTON_CLASS(klass: pointer) : boolean;
 
165
begin
 
166
   GTK_IS_SPIN_BUTTON_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SPIN_BUTTON);
 
167
end;
 
168
 
 
169
function GTK_SPIN_BUTTON_GET_CLASS(obj: pointer) : PGtkSpinButtonClass;
 
170
begin
 
171
   GTK_SPIN_BUTTON_GET_CLASS:=PGtkSpinButtonClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SPIN_BUTTON));
 
172
end;
 
173
 
 
174
function in_child(var a : TGtkSpinButton) : guint;
 
175
begin
 
176
   in_child:=(a.flag0 and bm_TGtkSpinButton_in_child) shr bp_TGtkSpinButton_in_child;
 
177
end;
 
178
 
 
179
procedure set_in_child(var a : TGtkSpinButton; __in_child : guint);
 
180
begin
 
181
   a.flag0:=a.flag0 or ((__in_child shl bp_TGtkSpinButton_in_child) and bm_TGtkSpinButton_in_child);
 
182
end;
 
183
 
 
184
function click_child(var a : TGtkSpinButton) : guint;
 
185
begin
 
186
   click_child:=(a.flag0 and bm_TGtkSpinButton_click_child) shr bp_TGtkSpinButton_click_child;
 
187
end;
 
188
 
 
189
procedure set_click_child(var a : TGtkSpinButton; __click_child : guint);
 
190
begin
 
191
   a.flag0:=a.flag0 or ((__click_child shl bp_TGtkSpinButton_click_child) and bm_TGtkSpinButton_click_child);
 
192
end;
 
193
 
 
194
function button(var a : TGtkSpinButton) : guint;
 
195
begin
 
196
   button:=(a.flag0 and bm_TGtkSpinButton_button) shr bp_TGtkSpinButton_button;
 
197
end;
 
198
 
 
199
procedure set_button(var a : TGtkSpinButton; __button : guint);
 
200
begin
 
201
   a.flag0:=a.flag0 or ((__button shl bp_TGtkSpinButton_button) and bm_TGtkSpinButton_button);
 
202
end;
 
203
 
 
204
function need_timer(var a : TGtkSpinButton) : guint;
 
205
begin
 
206
   need_timer:=(a.flag0 and bm_TGtkSpinButton_need_timer) shr bp_TGtkSpinButton_need_timer;
 
207
end;
 
208
 
 
209
procedure set_need_timer(var a : TGtkSpinButton; __need_timer : guint);
 
210
begin
 
211
   a.flag0:=a.flag0 or ((__need_timer shl bp_TGtkSpinButton_need_timer) and bm_TGtkSpinButton_need_timer);
 
212
end;
 
213
 
 
214
function timer_calls(var a : TGtkSpinButton) : guint;
 
215
begin
 
216
   timer_calls:=(a.flag0 and bm_TGtkSpinButton_timer_calls) shr bp_TGtkSpinButton_timer_calls;
 
217
end;
 
218
 
 
219
procedure set_timer_calls(var a : TGtkSpinButton; __timer_calls : guint);
 
220
begin
 
221
   a.flag0:=a.flag0 or ((__timer_calls shl bp_TGtkSpinButton_timer_calls) and bm_TGtkSpinButton_timer_calls);
 
222
end;
 
223
 
 
224
function digits(var a : TGtkSpinButton) : guint;
 
225
begin
 
226
   digits:=(a.flag0 and bm_TGtkSpinButton_digits) shr bp_TGtkSpinButton_digits;
 
227
end;
 
228
 
 
229
procedure set_digits(var a : TGtkSpinButton; __digits : guint);
 
230
begin
 
231
   a.flag0:=a.flag0 or ((__digits shl bp_TGtkSpinButton_digits) and bm_TGtkSpinButton_digits);
 
232
end;
 
233
 
 
234
function numeric(var a : TGtkSpinButton) : guint;
 
235
begin
 
236
   numeric:=(a.flag0 and bm_TGtkSpinButton_numeric) shr bp_TGtkSpinButton_numeric;
 
237
end;
 
238
 
 
239
procedure set_numeric(var a : TGtkSpinButton; __numeric : guint);
 
240
begin
 
241
   a.flag0:=a.flag0 or ((__numeric shl bp_TGtkSpinButton_numeric) and bm_TGtkSpinButton_numeric);
 
242
end;
 
243
 
 
244
function wrap(var a : TGtkSpinButton) : guint;
 
245
begin
 
246
   wrap:=(a.flag0 and bm_TGtkSpinButton_wrap) shr bp_TGtkSpinButton_wrap;
 
247
end;
 
248
 
 
249
procedure set_wrap(var a : TGtkSpinButton; __wrap : guint);
 
250
begin
 
251
   a.flag0:=a.flag0 or ((__wrap shl bp_TGtkSpinButton_wrap) and bm_TGtkSpinButton_wrap);
 
252
end;
 
253
 
 
254
function snap_to_ticks(var a : TGtkSpinButton) : guint;
 
255
begin
 
256
   snap_to_ticks:=(a.flag0 and bm_TGtkSpinButton_snap_to_ticks) shr bp_TGtkSpinButton_snap_to_ticks;
 
257
end;
 
258
 
 
259
procedure set_snap_to_ticks(var a : TGtkSpinButton; __snap_to_ticks : guint);
 
260
begin
 
261
   a.flag0:=a.flag0 or ((__snap_to_ticks shl bp_TGtkSpinButton_snap_to_ticks) and bm_TGtkSpinButton_snap_to_ticks);
 
262
end;
 
263
 
 
264
{$ifndef GTK_DISABLE_DEPRECATED}
 
265
function gtk_spin_button_get_value_as_float(spin_button:PGtkSpinButton):gdouble;
 
266
begin
 
267
   gtk_spin_button_get_value_as_float:=gtk_spin_button_get_value(spin_button);
 
268
end;
 
269
{$endif}
 
270
 
 
271
{$ENDIF read_implementation}
 
272
// included by gtk2.pas
 
273