123
-- This function is only used to force the 'with' of this unit. All the
124
-- actual work is done in the elaboration part of this package.
127
---------------------
128
-- Full_Conversion --
129
---------------------
131
function Full_Conversion (Type_Name : String) return GObject is
133
case Type_Name (Type_Name'First + 3) is
135
if Type_Name = "GtkAdjustment" then
136
return new Gtk.Adjustment.Gtk_Adjustment_Record;
137
elsif Type_Name = "GtkAlignment" then
138
return new Gtk.Alignment.Gtk_Alignment_Record;
139
elsif Type_Name = "GtkArrow" then
140
return new Gtk.Arrow.Gtk_Arrow_Record;
141
elsif Type_Name = "GtkAspectFrame" then
142
return new Gtk.Aspect_Frame.Gtk_Aspect_Frame_Record;
145
if Type_Name = "GtkBin" then
146
return new Gtk.Bin.Gtk_Bin_Record;
147
-- elsif Type_Name = "GtkBorderCombo" then
148
-- return new Gtk.Extra.Border_Combo.Gtk_Border_Combo_Record;
149
elsif Type_Name = "GtkBox" then
150
return new Gtk.Box.Gtk_Box_Record;
151
elsif Type_Name = "GtkButtonBox" then
152
return new Gtk.Button_Box.Gtk_Button_Box_Record;
155
if Type_Name = "GtkCalendar" then
156
return new Gtk.Calendar.Gtk_Calendar_Record;
157
elsif Type_Name = "GtkCheckButton" then
158
return new Gtk.Check_Button.Gtk_Check_Button_Record;
159
elsif Type_Name = "GtkCList" then
160
pragma Warnings (Off); -- Gtk.Clist is obsolescent
161
return new Gtk.Clist.Gtk_Clist_Record;
162
pragma Warnings (On);
163
-- elsif Type_Name = "GtkColorCombo" then
164
-- return new Gtk.Extra.Color_Combo.Gtk_Color_Combo_Record;
165
elsif Type_Name = "GtkColorSelection" then
166
return new Gtk.Color_Selection.Gtk_Color_Selection_Record;
167
elsif Type_Name = "GtkColorSelectionDialog" then
169
Gtk.Color_Selection_Dialog.Gtk_Color_Selection_Dialog_Record;
170
elsif Type_Name = "GtkCombo" then
171
pragma Warnings (Off); -- Gtk.Combo is obsolescent
172
return new Gtk.Combo.Gtk_Combo_Record;
173
pragma Warnings (On);
174
-- elsif Type_Name = "GtkComboBox" then
175
-- return new Gtk.Extra.Combo_Box.Gtk_Combo_Box_Record;
176
elsif Type_Name = "GtkContainer" then
177
return new Gtk.Container.Gtk_Container_Record;
178
elsif Type_Name = "GtkCtree" then
179
pragma Warnings (Off); -- Gtk.Ctree is obsolescent
180
return new Gtk.Ctree.Gtk_Ctree_Record;
181
pragma Warnings (On);
182
elsif Type_Name = "GtkCurve" then
183
return new Gtk.Curve.Gtk_Curve_Record;
186
if Type_Name = "GtkDialog" then
187
return new Gtk.Dialog.Gtk_Dialog_Record;
188
elsif Type_Name = "GtkDrawingArea" then
189
return new Gtk.Drawing_Area.Gtk_Drawing_Area_Record;
192
if Type_Name = "GtkEditable" then
193
return new Gtk.Editable.Gtk_Editable_Record;
194
elsif Type_Name = "GtkEventBox" then
195
return new Gtk.Event_Box.Gtk_Event_Box_Record;
196
elsif Type_Name = "GtkEntry" then
197
return new Gtk.GEntry.Gtk_Entry_Record;
200
if Type_Name = "GtkFileSelection" then
201
return new Gtk.File_Selection.Gtk_File_Selection_Record;
202
elsif Type_Name = "GtkFixed" then
203
return new Gtk.Fixed.Gtk_Fixed_Record;
204
-- elsif Type_Name = "GtkFontCombo" then
205
-- return new Gtk.Extra.Font_Combo.Gtk_Font_Combo_Record;
206
elsif Type_Name = "GtkFontSelection" then
207
return new Gtk.Font_Selection.Gtk_Font_Selection_Record;
208
elsif Type_Name = "GtkFontSelectionDialog" then
210
Gtk.Font_Selection_Dialog.Gtk_Font_Selection_Dialog_Record;
211
elsif Type_Name = "GtkFrame" then
212
return new Gtk.Frame.Gtk_Frame_Record;
215
if Type_Name = "GtkGammaCurve" then
216
return new Gtk.Gamma_Curve.Gtk_Gamma_Curve_Record;
219
if Type_Name = "GtkHBox" then
220
return new Gtk.Box.Gtk_Box_Record;
221
elsif Type_Name = "GtkHandleBox" then
222
return new Gtk.Handle_Box.Gtk_Handle_Box_Record;
223
elsif Type_Name = "GtkHButtonBox" then
224
return new Gtk.Hbutton_Box.Gtk_Hbutton_Box_Record;
225
elsif Type_Name = "GtkHPaned" then
226
return new Gtk.Paned.Gtk_Paned_Record;
231
-- if Type_Name = "GtkItemEntry" then
232
-- return new Gtk.Extra.Item_Entry.Gtk_IEntry_Record;
233
elsif Type_Name = "GtkImage" then
234
return new Gtk.Image.Gtk_Image_Record;
235
elsif Type_Name = "GtkInputDialog" then
236
return new Gtk.Input_Dialog.Gtk_Input_Dialog_Record;
237
elsif Type_Name = "GtkInvisible" then
238
return new Gtk.Invisible.Gtk_Invisible_Record;
239
elsif Type_Name = "GtkItemFactory" then
240
pragma Warnings (Off); -- Gtk.Item_Factory is obsolescent
241
return new Gtk.Item_Factory.Gtk_Item_Factory_Record;
242
pragma Warnings (On);
245
if Type_Name = "GtkLayout" then
246
return new Gtk.Layout.Gtk_Layout_Record;
247
elsif Type_Name = "GtkList" then
248
pragma Warnings (Off); -- Gtk_List is obsolescent
249
return new Gtk.List.Gtk_List_Record;
250
pragma Warnings (On);
253
if Type_Name = "GtkMenuShell" then
254
return new Gtk.Menu_Shell.Gtk_Menu_Shell_Record;
255
elsif Type_Name = "GtkMisc" then
256
return new Gtk.Misc.Gtk_Misc_Record;
259
if Type_Name = "GtkNotebook" then
260
return new Gtk.Notebook.Gtk_Notebook_Record;
263
if Type_Name = "GtkObject" then
264
return new Gtk.Object.Gtk_Object_Record;
265
elsif Type_Name = "GtkOptionMenu" then
266
pragma Warnings (Off); -- Gtk.Option_Menu is obsolescent;
267
return new Gtk.Option_Menu.Gtk_Option_Menu_Record;
268
pragma Warnings (On);
271
if Type_Name = "GtkPixmap" then
272
pragma Warnings (Off); -- Gtk_Pixmap is obsolescent
273
return new Gtk.Pixmap.Gtk_Pixmap_Record;
274
pragma Warnings (On);
275
elsif Type_Name = "GtkPlug" then
276
return new Gtk.Plug.Gtk_Plug_Record;
277
-- elsif Type_Name = "GtkPlot" then
278
-- return new Gtk.Extra.Plot.Gtk_Plot_Record;
279
-- elsif Type_Name = "GtkPlotCanvas" then
280
-- return new Gtk.Extra.Plot_Canvas.Gtk_Plot_Canvas_Record;
281
elsif Type_Name = "GtkPreview" then
282
pragma Warnings (Off); -- Gtk_Preview is obsolescent
283
return new Gtk.Preview.Gtk_Preview_Record;
284
pragma Warnings (On);
285
elsif Type_Name = "GtkProgress" then
286
pragma Warnings (Off);
287
return new Gtk.Progress.Gtk_Progress_Record;
288
pragma Warnings (On);
289
-- Gtk.Progress is obsolete
290
elsif Type_Name = "GtkProgressBar" then
291
return new Gtk.Progress_Bar.Gtk_Progress_Bar_Record;
294
if Type_Name = "GtkRadioButton" then
295
return new Gtk.Radio_Button.Gtk_Radio_Button_Record;
296
elsif Type_Name = "GtkRange" then
297
return new Gtk.GRange.Gtk_Range_Record;
298
elsif Type_Name = "GtkRuler" then
299
return new Gtk.Ruler.Gtk_Ruler_Record;
302
if Type_Name = "GtkScale" then
303
return new Gtk.Scale.Gtk_Scale_Record;
304
elsif Type_Name = "GtkScrollbar" then
305
return new Gtk.Scrollbar.Gtk_Scrollbar_Record;
306
elsif Type_Name = "GtkScrolledWindow" then
307
return new Gtk.Scrolled_Window.Gtk_Scrolled_Window_Record;
308
elsif Type_Name = "GtkSeparator" then
309
return new Gtk.Separator.Gtk_Separator_Record;
310
-- elsif Type_Name = "GtkSheet" then
311
-- return new Gtk.Extra.Sheet.Gtk_Sheet_Record;
312
elsif Type_Name = "GtkSocket" then
313
return new Gtk.Socket.Gtk_Socket_Record;
314
elsif Type_Name = "GtkSpinButton" then
315
return new Gtk.Spin_Button.Gtk_Spin_Button_Record;
316
elsif Type_Name = "GtkStatusBar" then
317
return new Gtk.Status_Bar.Gtk_Status_Bar_Record;
320
if Type_Name = "GtkTable" then
321
return new Gtk.Table.Gtk_Table_Record;
322
elsif Type_Name = "GtkText" then
323
pragma Warnings (Off); -- Gtk.Text is obsolescent
324
return new Gtk.Text.Gtk_Text_Record;
325
pragma Warnings (On);
326
elsif Type_Name = "GtkTipsQuery" then
327
pragma Warnings (Off); -- Gtk_Tips_Query is obsolescent
328
return new Gtk.Tips_Query.Gtk_Tips_Query_Record;
329
pragma Warnings (On);
330
elsif Type_Name = "GtkToggleButton" then
331
return new Gtk.Toggle_Button.Gtk_Toggle_Button_Record;
332
elsif Type_Name = "GtkToolbar" then
333
return new Gtk.Toolbar.Gtk_Toolbar_Record;
334
elsif Type_Name = "GtkTooltips" then
335
return new Gtk.Tooltips.Gtk_Tooltips_Record;
338
if Type_Name = "GtkVBox" then
339
return new Gtk.Box.Gtk_Box_Record;
340
elsif Type_Name = "GtkVButtonBox" then
341
return new Gtk.Vbutton_Box.Gtk_Vbutton_Box_Record;
342
elsif Type_Name = "GtkViewport" then
343
return new Gtk.Viewport.Gtk_Viewport_Record;
344
elsif Type_Name = "GtkVPaned" then
345
return new Gtk.Paned.Gtk_Paned_Record;
346
elsif Type_Name = "GtkVScrollbar" then
347
return new Gtk.Scrollbar.Gtk_Scrollbar_Record;
350
if Type_Name = "GtkWidget" then
351
return new Gtk.Widget.Gtk_Widget_Record;
352
elsif Type_Name = "GtkWindow" then
353
return new Gtk.Window.Gtk_Window_Record;
362
Glib.Type_Conversion_Hooks.Add_Hook (Full_Conversion'Access);
363
35
end Gtk.Type_Conversion;