    {-# LINE 2 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
    -- -*-haskell-*-
    -- GIMP Toolkit (GTK) Widget MenuShell
    --
    -- Author : Axel Simon
    --
    -- Created: 21 May 2001
    --
    -- Copyright (C) 1999-2005 Axel Simon
    --
    -- 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)
    --
    -- A base class for menu objects
    --
    module Graphics.UI.Gtk.MenuComboToolbar.MenuShell (
    -- * Detail
    --
    -- | A 'MenuShell' is the abstract base class used to derive the 'Menu' and
    -- 'MenuBar' subclasses.
    --
    -- A 'MenuShell' is a container of 'MenuItem' objects arranged in a list
    -- which can be navigated, selected, and activated by the user to perform
    -- application functions. A 'MenuItem' can have a submenu associated with it,
    -- allowing for nested hierarchical menus.

    -- * Class Hierarchy
    -- |
    -- @
    -- | 'GObject'
    -- | +----'Object'
    -- | +----'Widget'
    -- | +----'Container'
    -- | +----MenuShell
    -- | +----'MenuBar'
    -- | +----'Menu'
    -- @

    -- * Types
      MenuShell,
      MenuShellClass,
      castToMenuShell, gTypeMenuShell,
      toMenuShell,

    -- * Methods
      menuShellAppend,
      menuShellPrepend,
      menuShellInsert,
      menuShellDeactivate,
      menuShellActivateItem,
      menuShellSelectItem,
      menuShellDeselect,

      menuShellSelectFirst,

      menuShellCancel,

      menuShellSetTakeFocus,
      menuShellGetTakeFocus,

    -- * Attributes

      menuShellTakeFocus,

    -- * Signals
      onActivateCurrent,
      afterActivateCurrent,
      onCancel,
      afterCancel,
      onDeactivated,
      afterDeactivated,
      MenuDirectionType(..),
      onMoveCurrent,
      afterMoveCurrent,
      onSelectionDone,
      afterSelectionDone
      ) where

    import Control.Monad (liftM)

    import System.Glib.FFI
    import System.Glib.Attributes
    import Graphics.UI.Gtk.Types
    {-# LINE 100 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
    import Graphics.UI.Gtk.Signals
    {-# LINE 101 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
    import Graphics.UI.Gtk.General.Enums (MenuDirectionType(..))

    {-# LINE 104 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}

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

    -- | Adds a new 'MenuItem' to the end of the menu shell's item list.
    --
    menuShellAppend :: (MenuShellClass self, MenuItemClass child) => self
     -> child -- ^ @child@ - The 'MenuItem' to add.
     -> IO ()
    menuShellAppend :: forall self child.
    (MenuShellClass self, MenuItemClass child) =>
    self -> child -> IO ()
    menuShellAppend self
    self child
    child =
      (\(MenuShell ForeignPtr MenuShell
    arg1) (Widget ForeignPtr Widget
    arg2) -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Widget
    arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Widget
    argPtr2 ->Ptr MenuShell -> Ptr Widget -> IO ()
    gtk_menu_shell_append Ptr MenuShell
    argPtr1 Ptr Widget
    argPtr2)
    {-# LINE 115 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)
        (child -> Widget
    forall o. WidgetClass o => o -> Widget
    toWidget child
    child)

    -- | Adds a new 'MenuItem' to the beginning of the menu shell's item list.
    --
    menuShellPrepend :: (MenuShellClass self, MenuItemClass child) => self
     -> child -- ^ @child@ - The 'MenuItem' to add.
     -> IO ()
    menuShellPrepend :: forall self child.
    (MenuShellClass self, MenuItemClass child) =>
    self -> child -> IO ()
    menuShellPrepend self
    self child
    child =
      (\(MenuShell ForeignPtr MenuShell
    arg1) (Widget ForeignPtr Widget
    arg2) -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Widget
    arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Widget
    argPtr2 ->Ptr MenuShell -> Ptr Widget -> IO ()
    gtk_menu_shell_prepend Ptr MenuShell
    argPtr1 Ptr Widget
    argPtr2)
    {-# LINE 125 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)
        (child -> Widget
    forall o. WidgetClass o => o -> Widget
    toWidget child
    child)

    -- | Adds a new 'MenuItem' to the menu shell's item list at the position
    -- indicated by @position@.
    --
    menuShellInsert :: (MenuShellClass self, MenuItemClass child) => self
     -> child -- ^ @child@ - The 'MenuItem' to add.
     -> Int -- ^ @position@ - The position in the item list where @child@ is
              -- added. Positions are numbered from 0 to n-1.
     -> IO ()
    menuShellInsert :: forall self child.
    (MenuShellClass self, MenuItemClass child) =>
    self -> child -> Int -> IO ()
    menuShellInsert self
    self child
    child Int
    position =
      (\(MenuShell ForeignPtr MenuShell
    arg1) (Widget ForeignPtr Widget
    arg2) CInt
    arg3 -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Widget
    arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Widget
    argPtr2 ->Ptr MenuShell -> Ptr Widget -> CInt -> IO ()
    gtk_menu_shell_insert Ptr MenuShell
    argPtr1 Ptr Widget
    argPtr2 CInt
    arg3)
    {-# LINE 138 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)
        (child -> Widget
    forall o. WidgetClass o => o -> Widget
    toWidget child
    child)
        (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    position)

    -- | Deactivates the menu shell. Typically this results in the menu shell
    -- being erased from the screen.
    --
    menuShellDeactivate :: MenuShellClass self => self -> IO ()
    menuShellDeactivate :: forall self. MenuShellClass self => self -> IO ()
    menuShellDeactivate self
    self =
      (\(MenuShell ForeignPtr MenuShell
    arg1) -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->Ptr MenuShell -> IO ()
    gtk_menu_shell_deactivate Ptr MenuShell
    argPtr1)
    {-# LINE 148 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)

    -- | Activates the menu item within the menu shell. If the menu was deactivated
    -- and @forceDeactivate@ is set, the previously deactivated menu is reactivated.
    --
    menuShellActivateItem :: (MenuShellClass self, MenuItemClass menuItem) => self
     -> menuItem -- ^ @menuItem@ - The 'MenuItem' to activate.
     -> Bool -- ^ @forceDeactivate@ - If @True@, force the deactivation of the
                 -- menu shell after the menu item is activated.
     -> IO ()
    menuShellActivateItem :: forall self menuItem.
    (MenuShellClass self, MenuItemClass menuItem) =>
    self -> menuItem -> Bool -> IO ()
    menuShellActivateItem self
    self menuItem
    menuItem Bool
    forceDeactivate =
      (\(MenuShell ForeignPtr MenuShell
    arg1) (Widget ForeignPtr Widget
    arg2) CInt
    arg3 -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Widget
    arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Widget
    argPtr2 ->Ptr MenuShell -> Ptr Widget -> CInt -> IO ()
    gtk_menu_shell_activate_item Ptr MenuShell
    argPtr1 Ptr Widget
    argPtr2 CInt
    arg3)
    {-# LINE 160 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)
        (menuItem -> Widget
    forall o. WidgetClass o => o -> Widget
    toWidget menuItem
    menuItem)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    forceDeactivate)

    -- | Selects the menu item from the menu shell.
    --
    menuShellSelectItem :: (MenuShellClass self, MenuItemClass menuItem) => self
     -> menuItem -- ^ @menuItem@ - The 'MenuItem' to select.
     -> IO ()
    menuShellSelectItem :: forall self child.
    (MenuShellClass self, MenuItemClass child) =>
    self -> child -> IO ()
    menuShellSelectItem self
    self menuItem
    menuItem =
      (\(MenuShell ForeignPtr MenuShell
    arg1) (Widget ForeignPtr Widget
    arg2) -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Widget
    arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Widget
    argPtr2 ->Ptr MenuShell -> Ptr Widget -> IO ()
    gtk_menu_shell_select_item Ptr MenuShell
    argPtr1 Ptr Widget
    argPtr2)
    {-# LINE 171 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)
        (menuItem -> Widget
    forall o. WidgetClass o => o -> Widget
    toWidget menuItem
    menuItem)

    -- | Deselects the currently selected item from the menu shell, if any.
    --
    menuShellDeselect :: MenuShellClass self => self -> IO ()
    menuShellDeselect :: forall self. MenuShellClass self => self -> IO ()
    menuShellDeselect self
    self =
      (\(MenuShell ForeignPtr MenuShell
    arg1) -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->Ptr MenuShell -> IO ()
    gtk_menu_shell_deselect Ptr MenuShell
    argPtr1)
    {-# LINE 179 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)

    -- | Select the first visible or selectable child of the menu shell; don't
    -- select tearoff items unless the only item is a tearoff item.
    --
    -- * Available since Gtk+ version 2.2
    --
    menuShellSelectFirst :: MenuShellClass self => self
     -> Bool -- ^ @searchSensitive@ - if @True@, search for the first selectable
              -- menu item, otherwise select nothing if the first item isn't
              -- sensitive. This should be @False@ if the menu is being popped up
              -- initially.
     -> IO ()
    menuShellSelectFirst :: forall self. MenuShellClass self => self -> Bool -> IO ()
    menuShellSelectFirst self
    self Bool
    searchSensitive =
      (\(MenuShell ForeignPtr MenuShell
    arg1) CInt
    arg2 -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->Ptr MenuShell -> CInt -> IO ()
    gtk_menu_shell_select_first Ptr MenuShell
    argPtr1 CInt
    arg2)
    {-# LINE 195 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    searchSensitive)

    -- | Cancels the selection within the menu shell.
    --
    -- * Available since Gtk+ version 2.4
    --
    menuShellCancel :: MenuShellClass self => self -> IO ()
    menuShellCancel :: forall self. MenuShellClass self => self -> IO ()
    menuShellCancel self
    self =
      (\(MenuShell ForeignPtr MenuShell
    arg1) -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->Ptr MenuShell -> IO ()
    gtk_menu_shell_cancel Ptr MenuShell
    argPtr1)
    {-# LINE 207 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)

    -- | If @takeFocus@ is @True@ (the default) the menu shell will take the
    -- keyboard focus so that it will receive all keyboard events which is needed
    -- to enable keyboard navigation in menus.
    --
    -- Setting @takeFocus@ to @False@ is useful only for special applications
    -- like virtual keyboard implementations which should not take keyboard focus.
    --
    -- The @takeFocus@ state of a menu or menu bar is automatically propagated
    -- to submenus whenever a submenu is popped up, so you don't have to worry
    -- about recursively setting it for your entire menu hierarchy. Only when
    -- programmatically picking a submenu and popping it up manually, the
    -- @takeFocus@ property of the submenu needs to be set explicitly.
    --
    -- Note that setting it to @False@ has side-effects:
    --
    -- If the focus is in some other app, it keeps the focus and keynav in the
    -- menu doesn't work. Consequently, keynav on the menu will only work if the
    -- focus is on some toplevel owned by the onscreen keyboard.
    --
    -- To avoid confusing the user, menus with @takeFocus@ set to @False@ should
    -- not display mnemonics or accelerators, since it cannot be guaranteed that
    -- they will work.
    --
    -- * Available since Gtk+ version 2.8
    --
    menuShellSetTakeFocus :: MenuShellClass self => self
     -> Bool -- ^ @takeFocus@ - @True@ if the menu shell should take the keyboard
              -- focus on popup.
     -> IO ()
    menuShellSetTakeFocus :: forall self. MenuShellClass self => self -> Bool -> IO ()
    menuShellSetTakeFocus self
    self Bool
    takeFocus =
      (\(MenuShell ForeignPtr MenuShell
    arg1) CInt
    arg2 -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO ()) -> IO ())
    -> (Ptr MenuShell -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->Ptr MenuShell -> CInt -> IO ()
    gtk_menu_shell_set_take_focus Ptr MenuShell
    argPtr1 CInt
    arg2)
    {-# LINE 242 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    takeFocus)

    -- | Returns @True@ if the menu shell will take the keyboard focus on popup.
    --
    -- * Available since Gtk+ version 2.8
    --
    menuShellGetTakeFocus :: MenuShellClass self => self
     -> IO Bool -- ^ returns @True@ if the menu shell will take the keyboard focus
                -- on popup.
    menuShellGetTakeFocus :: forall self. MenuShellClass self => self -> IO Bool
    menuShellGetTakeFocus self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(MenuShell ForeignPtr MenuShell
    arg1) -> ForeignPtr MenuShell -> (Ptr MenuShell -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr MenuShell
    arg1 ((Ptr MenuShell -> IO CInt) -> IO CInt)
    -> (Ptr MenuShell -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr MenuShell
    argPtr1 ->Ptr MenuShell -> IO CInt
    gtk_menu_shell_get_take_focus Ptr MenuShell
    argPtr1)
    {-# LINE 255 "./Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs" #-}
        (toMenuShell self)

    --------------------
    -- Attributes

    -- | A boolean that determines whether the menu and its submenus grab the
    -- keyboard focus. See 'menuShellSetTakeFocus' and 'menuShellGetTakeFocus'.
    --
    -- Default value: @True@
    --
    menuShellTakeFocus :: MenuShellClass self => Attr self Bool
    menuShellTakeFocus :: forall self. MenuShellClass self => Attr self Bool
    menuShellTakeFocus = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. MenuShellClass self => self -> IO Bool
    menuShellGetTakeFocus
      self -> Bool -> IO ()
    forall self. MenuShellClass self => self -> Bool -> IO ()
    menuShellSetTakeFocus

    --------------------
    -- Signals

    -- | This signal is called if an item is
    -- activated. The boolean flag @hide@ is True whenever the menu will
    -- behidden after this action.
    --
    onActivateCurrent, afterActivateCurrent :: MenuShellClass self => self
     -> (Bool -> IO ())
     -> IO (ConnectId self)
    onActivateCurrent :: forall self.
    MenuShellClass self =>
    self -> (Bool -> IO ()) -> IO (ConnectId self)
    onActivateCurrent = SignalName
    -> Bool -> self -> (Bool -> IO ()) -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    SignalName -> Bool -> obj -> (Bool -> IO ()) -> IO (ConnectId obj)
    connect_BOOL__NONE SignalName
    "activate-current" Bool
    False
    afterActivateCurrent :: forall self.
    MenuShellClass self =>
    self -> (Bool -> IO ()) -> IO (ConnectId self)
    afterActivateCurrent = SignalName
    -> Bool -> self -> (Bool -> IO ()) -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    SignalName -> Bool -> obj -> (Bool -> IO ()) -> IO (ConnectId obj)
    connect_BOOL__NONE SignalName
    "activate-current" Bool
    True

    -- | This signal will be emitted when a selection is
    -- aborted and thus does not lead to an activation. This is in contrast to the
    -- @selection@ done signal which is always emitted.
    --
    onCancel, afterCancel :: MenuShellClass self => self
     -> IO ()
     -> IO (ConnectId self)
    onCancel :: forall self.
    MenuShellClass self =>
    self -> IO () -> IO (ConnectId self)
    onCancel = SignalName -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    SignalName -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE SignalName
    "cancel" Bool
    False
    afterCancel :: forall self.
    MenuShellClass self =>
    self -> IO () -> IO (ConnectId self)
    afterCancel = SignalName -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    SignalName -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE SignalName
    "cancel" Bool
    True

    -- | This signal is sent whenever the menu shell
    -- is deactivated (hidden).
    --
    onDeactivated, afterDeactivated :: MenuShellClass self => self
     -> IO ()
     -> IO (ConnectId self)
    onDeactivated :: forall self.
    MenuShellClass self =>
    self -> IO () -> IO (ConnectId self)
    onDeactivated = SignalName -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    SignalName -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE SignalName
    "deactivate" Bool
    False
    afterDeactivated :: forall self.
    MenuShellClass self =>
    self -> IO () -> IO (ConnectId self)
    afterDeactivated = SignalName -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    SignalName -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE SignalName
    "deactivate" Bool
    True

    -- | This signal is emitted for each move the
    -- cursor makes.
    --
    onMoveCurrent, afterMoveCurrent :: MenuShellClass self => self
     -> (MenuDirectionType -> IO ())
     -> IO (ConnectId self)
    onMoveCurrent :: forall self.
    MenuShellClass self =>
    self -> (MenuDirectionType -> IO ()) -> IO (ConnectId self)
    onMoveCurrent = SignalName
    -> Bool
    -> self
    -> (MenuDirectionType -> IO ())
    -> IO (ConnectId self)
    forall a obj.
    (Enum a, GObjectClass obj) =>
    SignalName -> Bool -> obj -> (a -> IO ()) -> IO (ConnectId obj)
    connect_ENUM__NONE SignalName
    "move-current" Bool
    False
    afterMoveCurrent :: forall self.
    MenuShellClass self =>
    self -> (MenuDirectionType -> IO ()) -> IO (ConnectId self)
    afterMoveCurrent = SignalName
    -> Bool
    -> self
    -> (MenuDirectionType -> IO ())
    -> IO (ConnectId self)
    forall a obj.
    (Enum a, GObjectClass obj) =>
    SignalName -> Bool -> obj -> (a -> IO ()) -> IO (ConnectId obj)
    connect_ENUM__NONE SignalName
    "move-current" Bool
    True

    -- | This signal is emitted when the user
    -- finished using the menu. Note that this signal is emitted even if no menu
    -- item was activated.
    --
    onSelectionDone, afterSelectionDone :: MenuShellClass self => self
     -> IO ()
     -> IO (ConnectId self)
    onSelectionDone :: forall self.
    MenuShellClass self =>
    self -> IO () -> IO (ConnectId self)
    onSelectionDone = SignalName -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    SignalName -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE SignalName
    "selection-done" Bool
    False
    afterSelectionDone :: forall self.
    MenuShellClass self =>
    self -> IO () -> IO (ConnectId self)
    afterSelectionDone = SignalName -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    SignalName -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE SignalName
    "selection-done" Bool
    True

    foreign import ccall safe "gtk_menu_shell_append"
      gtk_menu_shell_append :: ((Ptr MenuShell) -> ((Ptr Widget) -> (IO ())))

    foreign import ccall safe "gtk_menu_shell_prepend"
      gtk_menu_shell_prepend :: ((Ptr MenuShell) -> ((Ptr Widget) -> (IO ())))

    foreign import ccall safe "gtk_menu_shell_insert"
      gtk_menu_shell_insert :: ((Ptr MenuShell) -> ((Ptr Widget) -> (CInt -> (IO ()))))

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

    foreign import ccall safe "gtk_menu_shell_activate_item"
      gtk_menu_shell_activate_item :: ((Ptr MenuShell) -> ((Ptr Widget) -> (CInt -> (IO ()))))

    foreign import ccall safe "gtk_menu_shell_select_item"
      gtk_menu_shell_select_item :: ((Ptr MenuShell) -> ((Ptr Widget) -> (IO ())))

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

    foreign import ccall safe "gtk_menu_shell_select_first"
      gtk_menu_shell_select_first :: ((Ptr MenuShell) -> (CInt -> (IO ())))

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

    foreign import ccall safe "gtk_menu_shell_set_take_focus"
      gtk_menu_shell_set_take_focus :: ((Ptr MenuShell) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_menu_shell_get_take_focus"
      gtk_menu_shell_get_take_focus :: ((Ptr MenuShell) -> (IO CInt))