{-# LINE 2 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
module Graphics.UI.Gtk.Display.InfoBar (
InfoBar,
InfoBarClass,
castToInfoBar,
toInfoBar,
infoBarNew,
infoBarAddActionWidget,
infoBarAddButton,
infoBarSetResponseSensitive,
infoBarSetDefaultResponse,
infoBarEmitResponse,
infoBarGetActionArea,
infoBarGetContentArea,
infoBarMessageType,
infoBarResponse,
infoBarClose,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.Attributes
import System.Glib.Properties
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Windows.MessageDialog (MessageType)
import Graphics.UI.Gtk.Types
{-# LINE 106 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
import Graphics.UI.Gtk.Signals
{-# LINE 107 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
{-# LINE 109 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
infoBarNew :: IO InfoBar
infoBarNew =
makeNewObject mkInfoBar $
liftM (castPtr :: Ptr Widget -> Ptr InfoBar) $
gtk_info_bar_new
{-# LINE 128 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
infoBarAddActionWidget :: (InfoBarClass self, WidgetClass child) => self
-> child
-> Int
-> IO ()
infoBarAddActionWidget self child responseId =
(\(InfoBar arg1) (Widget arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_info_bar_add_action_widget argPtr1 argPtr2 arg3)
{-# LINE 144 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
(toInfoBar self)
(toWidget child)
(fromIntegral responseId)
infoBarAddButton :: (InfoBarClass self, GlibString string) => self
-> string
-> Int
-> IO Button
infoBarAddButton self buttonText responseId =
makeNewObject mkButton $
withUTFString buttonText $ \buttonTextPtr ->
liftM (castPtr :: Ptr Widget -> Ptr Button) $
(\(InfoBar arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_info_bar_add_button argPtr1 arg2 arg3)
{-# LINE 165 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
(toInfoBar self)
buttonTextPtr
(fromIntegral responseId)
infoBarSetResponseSensitive :: InfoBarClass self => self
-> Int
-> Bool
-> IO ()
infoBarSetResponseSensitive self responseId setting =
(\(InfoBar arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_info_bar_set_response_sensitive argPtr1 arg2 arg3)
{-# LINE 181 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
(toInfoBar self)
(fromIntegral responseId)
(fromBool setting)
infoBarSetDefaultResponse :: InfoBarClass self => self
-> Int
-> IO ()
infoBarSetDefaultResponse self responseId =
(\(InfoBar arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_info_bar_set_default_response argPtr1 arg2)
{-# LINE 196 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
(toInfoBar self)
(fromIntegral responseId)
infoBarEmitResponse :: InfoBarClass self => self
-> Int
-> IO ()
infoBarEmitResponse self responseId =
(\(InfoBar arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_info_bar_response argPtr1 arg2)
{-# LINE 208 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
(toInfoBar self)
(fromIntegral responseId)
infoBarGetActionArea :: InfoBarClass self => self
-> IO Widget
infoBarGetActionArea self =
makeNewObject mkWidget $
(\(InfoBar arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_info_bar_get_action_area argPtr1)
{-# LINE 220 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
(toInfoBar self)
infoBarGetContentArea :: InfoBarClass self => self
-> IO Widget
infoBarGetContentArea self =
makeNewObject mkWidget $
(\(InfoBar arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_info_bar_get_content_area argPtr1)
{-# LINE 231 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
(toInfoBar self)
infoBarMessageType :: InfoBarClass self => Attr self MessageType
infoBarMessageType = newAttrFromEnumProperty "message-type"
gtk_message_type_get_type
{-# LINE 249 "./Graphics/UI/Gtk/Display/InfoBar.chs" #-}
infoBarClose :: InfoBarClass self => Signal self (IO ())
infoBarClose = Signal (connect_NONE__NONE "close")
infoBarResponse :: InfoBarClass self => Signal self (Int -> IO ())
infoBarResponse = Signal (connect_INT__NONE "response")
foreign import ccall safe "gtk_info_bar_new"
gtk_info_bar_new :: (IO (Ptr Widget))
foreign import ccall safe "gtk_info_bar_add_action_widget"
gtk_info_bar_add_action_widget :: ((Ptr InfoBar) -> ((Ptr Widget) -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_info_bar_add_button"
gtk_info_bar_add_button :: ((Ptr InfoBar) -> ((Ptr CChar) -> (CInt -> (IO (Ptr Widget)))))
foreign import ccall safe "gtk_info_bar_set_response_sensitive"
gtk_info_bar_set_response_sensitive :: ((Ptr InfoBar) -> (CInt -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_info_bar_set_default_response"
gtk_info_bar_set_default_response :: ((Ptr InfoBar) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_info_bar_response"
gtk_info_bar_response :: ((Ptr InfoBar) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_info_bar_get_action_area"
gtk_info_bar_get_action_area :: ((Ptr InfoBar) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_info_bar_get_content_area"
gtk_info_bar_get_content_area :: ((Ptr InfoBar) -> (IO (Ptr Widget)))
foreign import ccall unsafe "gtk_message_type_get_type"
gtk_message_type_get_type :: CULong