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. with Gtk.Menu_Shell; use Gtk.Menu_Shell; 
  30.  
  31. package Gtk.IM_Multi_Context is 
  32.  
  33.    type Gtk_IM_Multi_Context_Record is new Gtk_IM_Context_Record with null record; 
  34.    type Gtk_IM_Multi_Context is access all Gtk_IM_Multi_Context_Record'Class; 
  35.  
  36.    ------------------ 
  37.    -- Constructors -- 
  38.    ------------------ 
  39.  
  40.    procedure Gtk_New (Self : out Gtk_IM_Multi_Context); 
  41.    procedure Initialize 
  42.       (Self : not null access Gtk_IM_Multi_Context_Record'Class); 
  43.    --  Creates a new Gtk.IM_Multi_Context.Gtk_IM_Multi_Context. 
  44.  
  45.    function Gtk_IM_Multi_Context_New return Gtk_IM_Multi_Context; 
  46.    --  Creates a new Gtk.IM_Multi_Context.Gtk_IM_Multi_Context. 
  47.  
  48.    function Get_Type return Glib.GType; 
  49.    pragma Import (C, Get_Type, "gtk_im_multicontext_get_type"); 
  50.  
  51.    ------------- 
  52.    -- Methods -- 
  53.    ------------- 
  54.  
  55.    procedure Append_Menuitems 
  56.       (Self      : not null access Gtk_IM_Multi_Context_Record; 
  57.        Menushell : not null access Gtk.Menu_Shell.Gtk_Menu_Shell_Record'Class); 
  58.    --  Add menuitems for various available input methods to a menu; the 
  59.    --  menuitems, when selected, will switch the input method for the context 
  60.    --  and the global default input method. 
  61.    --  "menushell": a Gtk.Menu_Shell.Gtk_Menu_Shell 
  62.  
  63.    function Get_Context_Id 
  64.       (Self : not null access Gtk_IM_Multi_Context_Record) 
  65.        return UTF8_String; 
  66.    --  Gets the id of the currently active slave of the Context. 
  67.    --  Since: gtk+ 2.16 
  68.  
  69.    procedure Set_Context_Id 
  70.       (Self       : not null access Gtk_IM_Multi_Context_Record; 
  71.        Context_Id : UTF8_String); 
  72.    --  Sets the context id for Context. 
  73.    --  This causes the currently active slave of Context to be replaced by the 
  74.    --  slave corresponding to the new context id. 
  75.    --  Since: gtk+ 2.16 
  76.    --  "context_id": the id to use 
  77.  
  78. end Gtk.IM_Multi_Context;