{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.Gtk.Objects.InfoBar
    ( 

-- * Exported types
    InfoBar(..)                             ,
    InfoBarK                                ,
    toInfoBar                               ,
    noInfoBar                               ,


 -- * Methods
-- ** infoBarAddActionWidget
    infoBarAddActionWidget                  ,


-- ** infoBarAddButton
    infoBarAddButton                        ,


-- ** infoBarGetActionArea
    infoBarGetActionArea                    ,


-- ** infoBarGetContentArea
    infoBarGetContentArea                   ,


-- ** infoBarGetMessageType
    infoBarGetMessageType                   ,


-- ** infoBarGetShowCloseButton
    infoBarGetShowCloseButton               ,


-- ** infoBarNew
    infoBarNew                              ,


-- ** infoBarResponse
    infoBarResponse                         ,


-- ** infoBarSetDefaultResponse
    infoBarSetDefaultResponse               ,


-- ** infoBarSetMessageType
    infoBarSetMessageType                   ,


-- ** infoBarSetResponseSensitive
    infoBarSetResponseSensitive             ,


-- ** infoBarSetShowCloseButton
    infoBarSetShowCloseButton               ,




 -- * Properties
-- ** MessageType
    InfoBarMessageTypePropertyInfo          ,
    constructInfoBarMessageType             ,
    getInfoBarMessageType                   ,
    setInfoBarMessageType                   ,


-- ** ShowCloseButton
    InfoBarShowCloseButtonPropertyInfo      ,
    constructInfoBarShowCloseButton         ,
    getInfoBarShowCloseButton               ,
    setInfoBarShowCloseButton               ,




 -- * Signals
-- ** Close
    InfoBarCloseCallback                    ,
    InfoBarCloseCallbackC                   ,
    InfoBarCloseSignalInfo                  ,
    afterInfoBarClose                       ,
    infoBarCloseCallbackWrapper             ,
    infoBarCloseClosure                     ,
    mkInfoBarCloseCallback                  ,
    noInfoBarCloseCallback                  ,
    onInfoBarClose                          ,


-- ** Response
    InfoBarResponseCallback                 ,
    InfoBarResponseCallbackC                ,
    InfoBarResponseSignalInfo               ,
    afterInfoBarResponse                    ,
    infoBarResponseCallbackWrapper          ,
    infoBarResponseClosure                  ,
    mkInfoBarResponseCallback               ,
    noInfoBarResponseCallback               ,
    onInfoBarResponse                       ,




    ) where

import Prelude ()
import Data.GI.Base.ShortPrelude

import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map

import GI.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.Atk as Atk
import qualified GI.GObject as GObject

newtype InfoBar = InfoBar (ForeignPtr InfoBar)
foreign import ccall "gtk_info_bar_get_type"
    c_gtk_info_bar_get_type :: IO GType

type instance ParentTypes InfoBar = InfoBarParentTypes
type InfoBarParentTypes = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject InfoBar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_info_bar_get_type
    

class GObject o => InfoBarK o
instance (GObject o, IsDescendantOf InfoBar o) => InfoBarK o

toInfoBar :: InfoBarK o => o -> IO InfoBar
toInfoBar = unsafeCastTo InfoBar

noInfoBar :: Maybe InfoBar
noInfoBar = Nothing

-- signal InfoBar::close
type InfoBarCloseCallback =
    IO ()

noInfoBarCloseCallback :: Maybe InfoBarCloseCallback
noInfoBarCloseCallback = Nothing

type InfoBarCloseCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkInfoBarCloseCallback :: InfoBarCloseCallbackC -> IO (FunPtr InfoBarCloseCallbackC)

infoBarCloseClosure :: InfoBarCloseCallback -> IO Closure
infoBarCloseClosure cb = newCClosure =<< mkInfoBarCloseCallback wrapped
    where wrapped = infoBarCloseCallbackWrapper cb

infoBarCloseCallbackWrapper ::
    InfoBarCloseCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
infoBarCloseCallbackWrapper _cb _ _ = do
    _cb 

onInfoBarClose :: (GObject a, MonadIO m) => a -> InfoBarCloseCallback -> m SignalHandlerId
onInfoBarClose obj cb = liftIO $ connectInfoBarClose obj cb SignalConnectBefore
afterInfoBarClose :: (GObject a, MonadIO m) => a -> InfoBarCloseCallback -> m SignalHandlerId
afterInfoBarClose obj cb = connectInfoBarClose obj cb SignalConnectAfter

connectInfoBarClose :: (GObject a, MonadIO m) =>
                       a -> InfoBarCloseCallback -> SignalConnectMode -> m SignalHandlerId
connectInfoBarClose obj cb after = liftIO $ do
    cb' <- mkInfoBarCloseCallback (infoBarCloseCallbackWrapper cb)
    connectSignalFunPtr obj "close" cb' after

-- signal InfoBar::response
type InfoBarResponseCallback =
    Int32 ->
    IO ()

noInfoBarResponseCallback :: Maybe InfoBarResponseCallback
noInfoBarResponseCallback = Nothing

type InfoBarResponseCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkInfoBarResponseCallback :: InfoBarResponseCallbackC -> IO (FunPtr InfoBarResponseCallbackC)

infoBarResponseClosure :: InfoBarResponseCallback -> IO Closure
infoBarResponseClosure cb = newCClosure =<< mkInfoBarResponseCallback wrapped
    where wrapped = infoBarResponseCallbackWrapper cb

infoBarResponseCallbackWrapper ::
    InfoBarResponseCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO ()
infoBarResponseCallbackWrapper _cb _ response_id _ = do
    _cb  response_id

onInfoBarResponse :: (GObject a, MonadIO m) => a -> InfoBarResponseCallback -> m SignalHandlerId
onInfoBarResponse obj cb = liftIO $ connectInfoBarResponse obj cb SignalConnectBefore
afterInfoBarResponse :: (GObject a, MonadIO m) => a -> InfoBarResponseCallback -> m SignalHandlerId
afterInfoBarResponse obj cb = connectInfoBarResponse obj cb SignalConnectAfter

connectInfoBarResponse :: (GObject a, MonadIO m) =>
                          a -> InfoBarResponseCallback -> SignalConnectMode -> m SignalHandlerId
connectInfoBarResponse obj cb after = liftIO $ do
    cb' <- mkInfoBarResponseCallback (infoBarResponseCallbackWrapper cb)
    connectSignalFunPtr obj "response" cb' after

-- VVV Prop "message-type"
   -- Type: TInterface "Gtk" "MessageType"
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]

getInfoBarMessageType :: (MonadIO m, InfoBarK o) => o -> m MessageType
getInfoBarMessageType obj = liftIO $ getObjectPropertyEnum obj "message-type"

setInfoBarMessageType :: (MonadIO m, InfoBarK o) => o -> MessageType -> m ()
setInfoBarMessageType obj val = liftIO $ setObjectPropertyEnum obj "message-type" val

constructInfoBarMessageType :: MessageType -> IO ([Char], GValue)
constructInfoBarMessageType val = constructObjectPropertyEnum "message-type" val

data InfoBarMessageTypePropertyInfo
instance AttrInfo InfoBarMessageTypePropertyInfo where
    type AttrAllowedOps InfoBarMessageTypePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint InfoBarMessageTypePropertyInfo = (~) MessageType
    type AttrBaseTypeConstraint InfoBarMessageTypePropertyInfo = InfoBarK
    type AttrGetType InfoBarMessageTypePropertyInfo = MessageType
    type AttrLabel InfoBarMessageTypePropertyInfo = "InfoBar::message-type"
    attrGet _ = getInfoBarMessageType
    attrSet _ = setInfoBarMessageType
    attrConstruct _ = constructInfoBarMessageType

-- VVV Prop "show-close-button"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]

getInfoBarShowCloseButton :: (MonadIO m, InfoBarK o) => o -> m Bool
getInfoBarShowCloseButton obj = liftIO $ getObjectPropertyBool obj "show-close-button"

setInfoBarShowCloseButton :: (MonadIO m, InfoBarK o) => o -> Bool -> m ()
setInfoBarShowCloseButton obj val = liftIO $ setObjectPropertyBool obj "show-close-button" val

constructInfoBarShowCloseButton :: Bool -> IO ([Char], GValue)
constructInfoBarShowCloseButton val = constructObjectPropertyBool "show-close-button" val

data InfoBarShowCloseButtonPropertyInfo
instance AttrInfo InfoBarShowCloseButtonPropertyInfo where
    type AttrAllowedOps InfoBarShowCloseButtonPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint InfoBarShowCloseButtonPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint InfoBarShowCloseButtonPropertyInfo = InfoBarK
    type AttrGetType InfoBarShowCloseButtonPropertyInfo = Bool
    type AttrLabel InfoBarShowCloseButtonPropertyInfo = "InfoBar::show-close-button"
    attrGet _ = getInfoBarShowCloseButton
    attrSet _ = setInfoBarShowCloseButton
    attrConstruct _ = constructInfoBarShowCloseButton

type instance AttributeList InfoBar = InfoBarAttributeList
type InfoBarAttributeList = ('[ '("app-paintable", WidgetAppPaintablePropertyInfo), '("baseline-position", BoxBaselinePositionPropertyInfo), '("border-width", ContainerBorderWidthPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("child", ContainerChildPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("homogeneous", BoxHomogeneousPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("message-type", InfoBarMessageTypePropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("orientation", OrientableOrientationPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("resize-mode", ContainerResizeModePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("show-close-button", InfoBarShowCloseButtonPropertyInfo), '("spacing", BoxSpacingPropertyInfo), '("style", WidgetStylePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo)] :: [(Symbol, *)])

data InfoBarCloseSignalInfo
instance SignalInfo InfoBarCloseSignalInfo where
    type HaskellCallbackType InfoBarCloseSignalInfo = InfoBarCloseCallback
    connectSignal _ = connectInfoBarClose

data InfoBarResponseSignalInfo
instance SignalInfo InfoBarResponseSignalInfo where
    type HaskellCallbackType InfoBarResponseSignalInfo = InfoBarResponseCallback
    connectSignal _ = connectInfoBarResponse

type instance SignalList InfoBar = InfoBarSignalList
type InfoBarSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("add", ContainerAddSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("check-resize", ContainerCheckResizeSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("close", InfoBarCloseSignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("remove", ContainerRemoveSignalInfo), '("response", InfoBarResponseSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("set-focus-child", ContainerSetFocusChildSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method InfoBar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "InfoBar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_new" gtk_info_bar_new :: 
    IO (Ptr InfoBar)


infoBarNew ::
    (MonadIO m) =>
    m InfoBar
infoBarNew  = liftIO $ do
    result <- gtk_info_bar_new
    checkUnexpectedReturnNULL "gtk_info_bar_new" result
    result' <- (newObject InfoBar) result
    return result'

-- method InfoBar::add_action_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_add_action_widget" gtk_info_bar_add_action_widget :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- response_id : TBasicType TInt32
    IO ()


infoBarAddActionWidget ::
    (MonadIO m, InfoBarK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- response_id
    m ()
infoBarAddActionWidget _obj child response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_info_bar_add_action_widget _obj' child' response_id
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method InfoBar::add_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Button"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_add_button" gtk_info_bar_add_button :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    CString ->                              -- button_text : TBasicType TUTF8
    Int32 ->                                -- response_id : TBasicType TInt32
    IO (Ptr Button)


infoBarAddButton ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- button_text
    Int32 ->                                -- response_id
    m Button
infoBarAddButton _obj button_text response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    button_text' <- textToCString button_text
    result <- gtk_info_bar_add_button _obj' button_text' response_id
    checkUnexpectedReturnNULL "gtk_info_bar_add_button" result
    result' <- (newObject Button) result
    touchManagedPtr _obj
    freeMem button_text'
    return result'

-- method InfoBar::get_action_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_get_action_area" gtk_info_bar_get_action_area :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    IO (Ptr Widget)


infoBarGetActionArea ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    m Widget
infoBarGetActionArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_info_bar_get_action_area _obj'
    checkUnexpectedReturnNULL "gtk_info_bar_get_action_area" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method InfoBar::get_content_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_get_content_area" gtk_info_bar_get_content_area :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    IO (Ptr Widget)


infoBarGetContentArea ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    m Widget
infoBarGetContentArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_info_bar_get_content_area _obj'
    checkUnexpectedReturnNULL "gtk_info_bar_get_content_area" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method InfoBar::get_message_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "MessageType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_get_message_type" gtk_info_bar_get_message_type :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    IO CUInt


infoBarGetMessageType ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    m MessageType
infoBarGetMessageType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_info_bar_get_message_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method InfoBar::get_show_close_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_get_show_close_button" gtk_info_bar_get_show_close_button :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    IO CInt


infoBarGetShowCloseButton ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    m Bool
infoBarGetShowCloseButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_info_bar_get_show_close_button _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method InfoBar::response
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_response" gtk_info_bar_response :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    Int32 ->                                -- response_id : TBasicType TInt32
    IO ()


infoBarResponse ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- response_id
    m ()
infoBarResponse _obj response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_info_bar_response _obj' response_id
    touchManagedPtr _obj
    return ()

-- method InfoBar::set_default_response
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_set_default_response" gtk_info_bar_set_default_response :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    Int32 ->                                -- response_id : TBasicType TInt32
    IO ()


infoBarSetDefaultResponse ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- response_id
    m ()
infoBarSetDefaultResponse _obj response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_info_bar_set_default_response _obj' response_id
    touchManagedPtr _obj
    return ()

-- method InfoBar::set_message_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "message_type", argType = TInterface "Gtk" "MessageType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "message_type", argType = TInterface "Gtk" "MessageType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_set_message_type" gtk_info_bar_set_message_type :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    CUInt ->                                -- message_type : TInterface "Gtk" "MessageType"
    IO ()


infoBarSetMessageType ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    MessageType ->                          -- message_type
    m ()
infoBarSetMessageType _obj message_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let message_type' = (fromIntegral . fromEnum) message_type
    gtk_info_bar_set_message_type _obj' message_type'
    touchManagedPtr _obj
    return ()

-- method InfoBar::set_response_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_set_response_sensitive" gtk_info_bar_set_response_sensitive :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    Int32 ->                                -- response_id : TBasicType TInt32
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


infoBarSetResponseSensitive ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- response_id
    Bool ->                                 -- setting
    m ()
infoBarSetResponseSensitive _obj response_id setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_info_bar_set_response_sensitive _obj' response_id setting'
    touchManagedPtr _obj
    return ()

-- method InfoBar::set_show_close_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_set_show_close_button" gtk_info_bar_set_show_close_button :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


infoBarSetShowCloseButton ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
infoBarSetShowCloseButton _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_info_bar_set_show_close_button _obj' setting'
    touchManagedPtr _obj
    return ()