    {-# LINE 2 "./Graphics/UI/Gtk/Layout/Overlay.chs" #-}
    -- -*-haskell-*-
    -- GTK3 Widget Overlay
    --
    -- Author : Vincent Hanquez
    --
    -- Created: 15 May 2014
    --
    -- Copyright (C) 2014 Vincent Hanquez
    -- 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 simple container that can display overlaid widgets
    --
    module Graphics.UI.Gtk.Layout.Overlay (
    -- * Detail
    --
    -- | The Overlay widget is a Bin widget where widgets can be added as overlay of the bin widget.

    -- * Class Hierarchy
    -- |
    -- @
    -- | 'GObject'
    -- | +----'Object'
    -- | +----'Widget'
    -- | +----'Container'
    -- | +----'Bin'
    -- | +----Overlay
    -- @

    -- * Types
      Overlay,
      OverlayClass,
      castToOverlay, gTypeOverlay,
      toOverlay,

    -- * Constructors
      overlayNew,
      overlayAdd
      ) where

    import Control.Monad (liftM)

    import System.Glib.FFI
    import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
    import Graphics.UI.Gtk.Types
    {-# LINE 61 "./Graphics/UI/Gtk/Layout/Overlay.chs" #-}

    {-# LINE 63 "./Graphics/UI/Gtk/Layout/Overlay.chs" #-}

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

    -- | Create a new 'Overlay'
    --
    overlayNew :: IO Overlay
    overlayNew :: IO Overlay
    overlayNew =
      (ForeignPtr Overlay -> Overlay, FinalizerPtr Overlay)
    -> IO (Ptr Overlay) -> IO Overlay
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr Overlay -> Overlay, FinalizerPtr Overlay)
    forall {a}. (ForeignPtr Overlay -> Overlay, FinalizerPtr a)
    mkOverlay (IO (Ptr Overlay) -> IO Overlay) -> IO (Ptr Overlay) -> IO Overlay
    forall a b. (a -> b) -> a -> b
    $
      (Ptr Widget -> Ptr Overlay) -> IO (Ptr Widget) -> IO (Ptr Overlay)
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Ptr Widget -> Ptr Overlay
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr Widget -> Ptr Overlay) (IO (Ptr Widget) -> IO (Ptr Overlay))
    -> IO (Ptr Widget) -> IO (Ptr Overlay)
    forall a b. (a -> b) -> a -> b
    $
      IO (Ptr Widget)
    gtk_overlay_new
    {-# LINE 74 "./Graphics/UI/Gtk/Layout/Overlay.chs" #-}

    overlayAdd :: (OverlayClass self, WidgetClass widget) => self
      -> widget -- ^ @widget@ - a widget to be placed as overlay
      -> IO ()
    overlayAdd :: forall self widget.
    (OverlayClass self, WidgetClass widget) =>
    self -> widget -> IO ()
    overlayAdd self
    self widget
    widget =
      (\(Overlay ForeignPtr Overlay
    arg1) (Widget ForeignPtr Widget
    arg2) -> ForeignPtr Overlay -> (Ptr Overlay -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Overlay
    arg1 ((Ptr Overlay -> IO ()) -> IO ())
    -> (Ptr Overlay -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Overlay
    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 Overlay -> Ptr Widget -> IO ()
    gtk_overlay_add_overlay Ptr Overlay
    argPtr1 Ptr Widget
    argPtr2)
    {-# LINE 80 "./Graphics/UI/Gtk/Layout/Overlay.chs" #-}
        (toOverlay self)
        (widget -> Widget
    forall o. WidgetClass o => o -> Widget
    toWidget widget
    widget)

    foreign import ccall unsafe "gtk_overlay_new"
      gtk_overlay_new :: (IO (Ptr Widget))

    foreign import ccall unsafe "gtk_overlay_add_overlay"
      gtk_overlay_add_overlay :: ((Ptr Overlay) -> ((Ptr Widget) -> (IO ())))