    {-# LINE 2 "./Graphics/UI/Gtk/Misc/IMMulticontext.chs" #-}
    -- -*-haskell-*-
    -- GIMP Toolkit (GTK) Widget IMMulticontext
    --
    -- Author : Colin McQuillan
    --
    -- Created: 30 April 2009
    --
    -- Copyright (C) 2009 Colin McQuillan
    --
    -- This library is free software; you can redistribute it and/or
    -- modify it under the terms of the GNU Lesser General Public
    -- License as published by the Free Software Foundation; either
    -- version 2.1 of the License, or (at your option) any later version.
    --
    -- This library is distributed in the hope that it will be useful,
    -- but WITHOUT ANY WARRANTY; without even the implied warranty of
    -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    -- Lesser General Public License for more details.
    --
    -- |
    -- Maintainer : gtk2hs-users@lists.sourceforge.net
    -- Stability : provisional
    -- Portability : portable (depends on GHC)
    --
    -- An input method context supporting multiple, loadable input methods
    --
    module Graphics.UI.Gtk.Misc.IMMulticontext (

    -- * Class Hierarchy
    --
    -- |
    -- @
    -- | 'GObject'
    -- | +----'IMContext'
    -- | +----IMMulticontext
    -- @

    -- * Types
      IMMulticontext,
      IMMulticontextClass,
      castToIMMulticontext, gTypeIMMulticontext,
      toIMMulticontext,

    -- * Constructors
      imMulticontextNew,

    -- * Methods
      imMulticontextAppendMenuitems,
      ) where

    import System.Glib.FFI
    import Graphics.UI.Gtk.Types
    {-# LINE 54 "./Graphics/UI/Gtk/Misc/IMMulticontext.chs" #-}

    {-# LINE 56 "./Graphics/UI/Gtk/Misc/IMMulticontext.chs" #-}

    --------------------
    -- Constructors

    -- | Creates a new 'IMMulticontext'.
    --
    imMulticontextNew :: IO IMContext
    imMulticontextNew :: IO IMContext
    imMulticontextNew =
      (ForeignPtr IMContext -> IMContext, FinalizerPtr IMContext)
    -> IO (Ptr IMContext) -> IO IMContext
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    wrapNewGObject (ForeignPtr IMContext -> IMContext, FinalizerPtr IMContext)
    forall {a}. (ForeignPtr IMContext -> IMContext, FinalizerPtr a)
    mkIMContext (IO (Ptr IMContext) -> IO IMContext)
    -> IO (Ptr IMContext) -> IO IMContext
    forall a b. (a -> b) -> a -> b
    $
      IO (Ptr IMContext)
    gtk_im_multicontext_new
    {-# LINE 66 "./Graphics/UI/Gtk/Misc/IMMulticontext.chs" #-}

    --------------------
    -- Methods

    -- | Add menuitems for various available input methods to a menu; the
    -- menuitems, when selected, will switch the input method for the context and
    -- the global default input method.
    --
    imMulticontextAppendMenuitems :: (IMMulticontextClass self, MenuShellClass menushell) => self
     -> menushell -- ^ @menushell@ - a 'MenuShell'
     -> IO ()
    imMulticontextAppendMenuitems :: forall self menushell.
    (IMMulticontextClass self, MenuShellClass menushell) =>
    self -> menushell -> IO ()
    imMulticontextAppendMenuitems self
    self menushell
    menushell =
      (\(IMMulticontext ForeignPtr IMMulticontext
    arg1) (MenuShell ForeignPtr MenuShell
    arg2) -> ForeignPtr IMMulticontext -> (Ptr IMMulticontext -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr IMMulticontext
    arg1 ((Ptr IMMulticontext -> IO ()) -> IO ())
    -> (Ptr IMMulticontext -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr IMMulticontext
    argPtr1 ->ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg2 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr2 ->Ptr IMMulticontext -> Ptr MenuShell -> IO ()
    gtk_im_multicontext_append_menuitems Ptr IMMulticontext
    argPtr1 Ptr MenuShell
    argPtr2)
    {-# LINE 79 "./Graphics/UI/Gtk/Misc/IMMulticontext.chs" #-}
        (toIMMulticontext self)
        (menushell -> MenuShell
    forall o. MenuShellClass o => o -> MenuShell
    toMenuShell menushell
    menushell)

    foreign import ccall safe "gtk_im_multicontext_new"
      gtk_im_multicontext_new :: (IO (Ptr IMContext))

    foreign import ccall safe "gtk_im_multicontext_append_menuitems"
      gtk_im_multicontext_append_menuitems :: ((Ptr IMMulticontext) -> ((Ptr MenuShell) -> (IO ())))