    {-# LINE 2 "./Graphics/UI/Gtk/Misc/Accessible.chs" #-}
    -- -*-haskell-*-
    -- GIMP Toolkit (GTK) Widget accessible
    --
    -- Author : Andy Stewart
    --
    -- Created: 23 Oct 2010
    --
    -- Copyright (C) 2010 Andy Stewart
    --
    -- 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 'Object' representing an adjustable bounded value
    --
    module Graphics.UI.Gtk.Misc.Accessible (
    -- * Detail
    --
    -- | Accessible accessibility support for widgets.
    --

    -- * Class Hierarchy
    -- |
    -- @
    -- | 'GObject'
    -- | +----'AtkObject'
    -- | +----Accessible
    -- @

    -- * Types
      Accessible,
      AccessibleClass,
      castToAccessible, gTypeAccessible,
      toAccessible,

    -- * Methods
      accessibleGetWidget,
      accessibleSetWidget

    ) where

    import System.Glib.FFI
    import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
    import Graphics.UI.Gtk.Types
    {-# LINE 60 "./Graphics/UI/Gtk/Misc/Accessible.chs" #-}

    {-# LINE 62 "./Graphics/UI/Gtk/Misc/Accessible.chs" #-}

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

    -- | Gets the 'Widget' corresponding to the 'Accessible'.
    --
    -- * Available since Gtk+ version 2.22
    --
    accessibleGetWidget :: AccessibleClass self => self
                        -> IO (Maybe Widget) -- ^ returns the 'Widget' corresponding to the 'Accessible', or 'Nothing'.
    accessibleGetWidget :: forall self. AccessibleClass self => self -> IO (Maybe Widget)
    accessibleGetWidget self
    self =
      (IO (Ptr Widget) -> IO Widget)
    -> IO (Ptr Widget) -> IO (Maybe Widget)
    forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
    maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
    -> IO (Ptr Widget) -> IO Widget
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
    forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
    mkWidget) (IO (Ptr Widget) -> IO (Maybe Widget))
    -> IO (Ptr Widget) -> IO (Maybe Widget)
    forall a b. (a -> b) -> a -> b
    $
      (\(Accessible ForeignPtr Accessible
    arg1) -> ForeignPtr Accessible
    -> (Ptr Accessible -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Accessible
    arg1 ((Ptr Accessible -> IO (Ptr Widget)) -> IO (Ptr Widget))
    -> (Ptr Accessible -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a b. (a -> b) -> a -> b
    $ \Ptr Accessible
    argPtr1 ->Ptr Accessible -> IO (Ptr Widget)
    gtk_accessible_get_widget Ptr Accessible
    argPtr1)
    {-# LINE 75 "./Graphics/UI/Gtk/Misc/Accessible.chs" #-}
        (toAccessible self)

    -- | Sets the 'Widget' corresponding to the 'Accessible'.
    --
    -- * Available since Gtk+ version 2.22
    --
    accessibleSetWidget :: (AccessibleClass self, WidgetClass widget)
                          => self -- ^ @accessible@ a 'Accessible'
                          -> widget -- ^ @widget@ a 'Widget'
                          -> IO ()
    accessibleSetWidget :: forall self widget.
    (AccessibleClass self, WidgetClass widget) =>
    self -> widget -> IO ()
    accessibleSetWidget self
    self widget
    widget =
      (\(Accessible ForeignPtr Accessible
    arg1) (Widget ForeignPtr Widget
    arg2) -> ForeignPtr Accessible -> (Ptr Accessible -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Accessible
    arg1 ((Ptr Accessible -> IO ()) -> IO ())
    -> (Ptr Accessible -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Accessible
    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 Accessible -> Ptr Widget -> IO ()
    gtk_accessible_set_widget Ptr Accessible
    argPtr1 Ptr Widget
    argPtr2)
    {-# LINE 87 "./Graphics/UI/Gtk/Misc/Accessible.chs" #-}
         (toAccessible self)
         (widget -> Widget
    forall o. WidgetClass o => o -> Widget
    toWidget widget
    widget)

    foreign import ccall safe "gtk_accessible_get_widget"
      gtk_accessible_get_widget :: ((Ptr Accessible) -> (IO (Ptr Widget)))

    foreign import ccall safe "gtk_accessible_set_widget"
      gtk_accessible_set_widget :: ((Ptr Accessible) -> ((Ptr Widget) -> (IO ())))