~ubuntu-branches/ubuntu/intrepid/libgtkada2/intrepid

« back to all changes in this revision

Viewing changes to src/gtk-tree_model_filter.adb

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-08-11 09:46:51 UTC
  • mfrom: (6.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20080811094651-9mjd6acwa98ffw5c
Tags: 2.12.0-2ubuntu1
Add lpia to supported architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
-----------------------------------------------------------------------
2
2
--              GtkAda - Ada95 binding for Gtk+/Gnome                --
3
3
--                                                                   --
 
4
--                 Copyright (C) 2006-2008, AdaCore                  --
4
5
--                                                                   --
5
6
-- This library is free software; you can redistribute it and/or     --
6
7
-- modify it under the terms of the GNU General Public               --
26
26
with Gtk.Tree_Model;   use Gtk.Tree_Model;
27
27
with System;           use System;
28
28
 
 
29
with Glib.Type_Conversion_Hooks;
 
30
 
29
31
package body Gtk.Tree_Model_Filter is
30
32
 
 
33
   package Type_Conversion is new Glib.Type_Conversion_Hooks.Hook_Registrator
 
34
     (Get_Type'Access, Gtk_Tree_Model_Filter_Record);
 
35
   pragma Warnings (Off, Type_Conversion);
 
36
 
31
37
   type Gtk_Tree_Iter_Access is access all Gtk_Tree_Iter;
32
38
   function To_Iter is new Ada.Unchecked_Conversion
33
39
     (System.Address, Gtk_Tree_Iter_Access);
206
212
     (Filter  : access Gtk_Tree_Model_Filter_Record;
207
213
      Func    : Gtk_Tree_Model_Filter_Visible_Func)
208
214
   is
 
215
      function To_Address is new Ada.Unchecked_Conversion
 
216
        (Gtk_Tree_Model_Filter_Visible_Func, System.Address);
209
217
      procedure Internal
210
218
        (Filter  : System.Address;
211
219
         Func    : System.Address;
212
 
         Data    : Gtk_Tree_Model_Filter_Visible_Func;
 
220
         Data    : System.Address;
213
221
         Destroy : System.Address := System.Null_Address);
214
222
      pragma Import (C, Internal, "gtk_tree_model_filter_set_visible_func");
215
223
   begin
216
 
      Internal (Get_Object (Filter), Visible_Func_Wrapper'Address, Func);
 
224
      Internal
 
225
        (Get_Object (Filter), Visible_Func_Wrapper'Address, To_Address (Func));
217
226
   end Set_Visible_Func;
218
227
 
219
228
   -------------------
325
334
      Types     : Glib.GType_Array;
326
335
      Func      : Gtk_Tree_Model_Filter_Modify_Func)
327
336
   is
 
337
      function To_Address is new Ada.Unchecked_Conversion
 
338
        (Gtk_Tree_Model_Filter_Modify_Func, System.Address);
328
339
      procedure Internal
329
340
        (Filter    : System.Address;
330
341
         N_Columns : Gint;
331
342
         Types     : System.Address;
332
343
         Func      : System.Address;
333
 
         Data      : Gtk_Tree_Model_Filter_Modify_Func;
 
344
         Data      : System.Address;
334
345
         Destroy   : System.Address := System.Null_Address);
335
346
      pragma Import (C, Internal, "gtk_tree_model_filter_set_modify_func");
336
347
   begin
337
348
      Internal (Get_Object (Filter), Types'Length, Types (Types'First)'Address,
338
 
                Modify_Func_Wrapper'Address, Func);
 
349
                Modify_Func_Wrapper'Address, To_Address (Func));
339
350
   end Set_Modify_Func;
340
351
 
341
352
   ------------------