1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. pragma Ada_2005; 
  25.  
  26. pragma Warnings (Off, "*is already use-visible*"); 
  27. with Glib;           use Glib; 
  28. with Gtk.IM_Context; use Gtk.IM_Context; 
  29.  
  30. package Gtk.IM_Context_Simple is 
  31.  
  32.    type Gtk_IM_Context_Simple_Record is new Gtk_IM_Context_Record with null record; 
  33.    type Gtk_IM_Context_Simple is access all Gtk_IM_Context_Simple_Record'Class; 
  34.  
  35.    ------------------ 
  36.    -- Constructors -- 
  37.    ------------------ 
  38.  
  39.    procedure Gtk_New (Self : out Gtk_IM_Context_Simple); 
  40.    procedure Initialize 
  41.       (Self : not null access Gtk_IM_Context_Simple_Record'Class); 
  42.    --  Creates a new Gtk.IM_Context_Simple.Gtk_IM_Context_Simple. 
  43.  
  44.    function Gtk_IM_Context_Simple_New return Gtk_IM_Context_Simple; 
  45.    --  Creates a new Gtk.IM_Context_Simple.Gtk_IM_Context_Simple. 
  46.  
  47.    function Get_Type return Glib.GType; 
  48.    pragma Import (C, Get_Type, "gtk_im_context_simple_get_type"); 
  49.  
  50.    ------------- 
  51.    -- Methods -- 
  52.    ------------- 
  53.  
  54.    procedure Add_Table 
  55.       (Self        : not null access Gtk_IM_Context_Simple_Record; 
  56.        Data        : in out Guint16; 
  57.        Max_Seq_Len : Gint; 
  58.        N_Seqs      : Gint); 
  59.    --  Adds an additional table to search to the input context. Each row of 
  60.    --  the table consists of Max_Seq_Len key symbols followed by two Guint16 
  61.    --  interpreted as the high and low words of a gunicode value. Tables are 
  62.    --  searched starting from the last added. 
  63.    --  The table must be sorted in dictionary order on the numeric value of 
  64.    --  the key symbol fields. (Values beyond the length of the sequence should 
  65.    --  be zero.) 
  66.    --  "data": the table 
  67.    --  "max_seq_len": Maximum length of a sequence in the table (cannot be 
  68.    --  greater than GTK_MAX_COMPOSE_LEN) 
  69.    --  "n_seqs": number of sequences in the table 
  70.  
  71. end Gtk.IM_Context_Simple;