module Graphics.UI.Gtk.MenuComboToolbar.RadioToolButton (
RadioToolButton,
RadioToolButtonClass,
castToRadioToolButton, gTypeRadioToolButton,
toRadioToolButton,
radioToolButtonNew,
radioToolButtonNewFromStock,
radioToolButtonNewFromWidget,
radioToolButtonNewWithStockFromWidget,
radioToolButtonGetGroup,
radioToolButtonSetGroup,
radioToolButtonGroup,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.GList
import System.Glib.Attributes
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
import Graphics.UI.Gtk.General.StockItems
radioToolButtonNew :: IO RadioToolButton
radioToolButtonNew =
makeNewObject mkRadioToolButton $
liftM (castPtr :: Ptr ToolItem -> Ptr RadioToolButton) $
gtk_radio_tool_button_new
nullPtr
radioToolButtonNewFromStock ::
StockId
-> IO RadioToolButton
radioToolButtonNewFromStock stockId =
makeNewObject mkRadioToolButton $
liftM (castPtr :: Ptr ToolItem -> Ptr RadioToolButton) $
withUTFString stockId $ \stockIdPtr ->
gtk_radio_tool_button_new_from_stock
nullPtr
stockIdPtr
radioToolButtonNewFromWidget :: RadioToolButtonClass groupMember =>
groupMember
-> IO RadioToolButton
radioToolButtonNewFromWidget group =
makeNewObject mkRadioToolButton $
liftM (castPtr :: Ptr ToolItem -> Ptr RadioToolButton) $
(\(RadioToolButton arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_radio_tool_button_new_from_widget argPtr1)
(toRadioToolButton group)
radioToolButtonNewWithStockFromWidget :: RadioToolButtonClass groupMember =>
groupMember
-> StockId
-> IO RadioToolButton
radioToolButtonNewWithStockFromWidget group stockId =
makeNewObject mkRadioToolButton $
liftM (castPtr :: Ptr ToolItem -> Ptr RadioToolButton) $
withUTFString stockId $ \stockIdPtr ->
(\(RadioToolButton arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_radio_tool_button_new_with_stock_from_widget argPtr1 arg2)
(toRadioToolButton group)
stockIdPtr
radioToolButtonGetGroup :: RadioToolButtonClass self => self
-> IO [RadioToolButton]
radioToolButtonGetGroup self =
(\(RadioToolButton arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_radio_tool_button_get_group argPtr1)
(toRadioToolButton self)
>>= readGSList
>>= mapM (\elemPtr -> makeNewObject mkRadioToolButton (return elemPtr))
radioToolButtonSetGroup :: RadioToolButtonClass self => self
-> RadioToolButton
-> IO ()
radioToolButtonSetGroup self group =
(\(RadioToolButton arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_radio_tool_button_get_group argPtr1) group >>= \groupGSList ->
(\(RadioToolButton arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_radio_tool_button_set_group argPtr1 arg2)
(toRadioToolButton self)
groupGSList
radioToolButtonGroup :: RadioToolButtonClass self => ReadWriteAttr self [RadioToolButton] RadioToolButton
radioToolButtonGroup = newAttr
radioToolButtonGetGroup
radioToolButtonSetGroup
foreign import ccall safe "gtk_radio_tool_button_new"
gtk_radio_tool_button_new :: ((Ptr ()) -> (IO (Ptr ToolItem)))
foreign import ccall safe "gtk_radio_tool_button_new_from_stock"
gtk_radio_tool_button_new_from_stock :: ((Ptr ()) -> ((Ptr CChar) -> (IO (Ptr ToolItem))))
foreign import ccall safe "gtk_radio_tool_button_new_from_widget"
gtk_radio_tool_button_new_from_widget :: ((Ptr RadioToolButton) -> (IO (Ptr ToolItem)))
foreign import ccall safe "gtk_radio_tool_button_new_with_stock_from_widget"
gtk_radio_tool_button_new_with_stock_from_widget :: ((Ptr RadioToolButton) -> ((Ptr CChar) -> (IO (Ptr ToolItem))))
foreign import ccall unsafe "gtk_radio_tool_button_get_group"
gtk_radio_tool_button_get_group :: ((Ptr RadioToolButton) -> (IO (Ptr ())))
foreign import ccall safe "gtk_radio_tool_button_set_group"
gtk_radio_tool_button_set_group :: ((Ptr RadioToolButton) -> ((Ptr ()) -> (IO ())))