{-# LINE 2 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-}
module Graphics.UI.Gtk.MenuComboToolbar.SeparatorToolItem (
SeparatorToolItem,
SeparatorToolItemClass,
castToSeparatorToolItem, gTypeSeparatorToolItem,
toSeparatorToolItem,
separatorToolItemNew,
separatorToolItemSetDraw,
separatorToolItemGetDraw,
separatorToolItemDraw,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.Attributes
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
{-# LINE 80 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-}
{-# LINE 82 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-}
separatorToolItemNew :: IO SeparatorToolItem
separatorToolItemNew :: IO SeparatorToolItem
separatorToolItemNew =
(ForeignPtr SeparatorToolItem -> SeparatorToolItem,
FinalizerPtr SeparatorToolItem)
-> IO (Ptr SeparatorToolItem) -> IO SeparatorToolItem
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr SeparatorToolItem -> SeparatorToolItem,
FinalizerPtr SeparatorToolItem)
forall {a}.
(ForeignPtr SeparatorToolItem -> SeparatorToolItem, FinalizerPtr a)
mkSeparatorToolItem (IO (Ptr SeparatorToolItem) -> IO SeparatorToolItem)
-> IO (Ptr SeparatorToolItem) -> IO SeparatorToolItem
forall a b. (a -> b) -> a -> b
$
(Ptr ToolItem -> Ptr SeparatorToolItem)
-> IO (Ptr ToolItem) -> IO (Ptr SeparatorToolItem)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Ptr ToolItem -> Ptr SeparatorToolItem
forall a b. Ptr a -> Ptr b
castPtr :: Ptr ToolItem -> Ptr SeparatorToolItem) (IO (Ptr ToolItem) -> IO (Ptr SeparatorToolItem))
-> IO (Ptr ToolItem) -> IO (Ptr SeparatorToolItem)
forall a b. (a -> b) -> a -> b
$
IO (Ptr ToolItem)
gtk_separator_tool_item_new
{-# LINE 94 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-}
separatorToolItemSetDraw :: SeparatorToolItemClass self => self -> Bool -> IO ()
separatorToolItemSetDraw :: forall self. SeparatorToolItemClass self => self -> Bool -> IO ()
separatorToolItemSetDraw self
self Bool
draw =
(\(SeparatorToolItem ForeignPtr SeparatorToolItem
arg1) CInt
arg2 -> ForeignPtr SeparatorToolItem
-> (Ptr SeparatorToolItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr SeparatorToolItem
arg1 ((Ptr SeparatorToolItem -> IO ()) -> IO ())
-> (Ptr SeparatorToolItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr SeparatorToolItem
argPtr1 ->Ptr SeparatorToolItem -> CInt -> IO ()
gtk_separator_tool_item_set_draw Ptr SeparatorToolItem
argPtr1 CInt
arg2)
{-# LINE 106 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-}
(toSeparatorToolItem self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
draw)
separatorToolItemGetDraw :: SeparatorToolItemClass self => self -> IO Bool
separatorToolItemGetDraw :: forall self. SeparatorToolItemClass self => self -> IO Bool
separatorToolItemGetDraw self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(SeparatorToolItem ForeignPtr SeparatorToolItem
arg1) -> ForeignPtr SeparatorToolItem
-> (Ptr SeparatorToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr SeparatorToolItem
arg1 ((Ptr SeparatorToolItem -> IO CInt) -> IO CInt)
-> (Ptr SeparatorToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr SeparatorToolItem
argPtr1 ->Ptr SeparatorToolItem -> IO CInt
gtk_separator_tool_item_get_draw Ptr SeparatorToolItem
argPtr1)
{-# LINE 116 "./Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs" #-}
(toSeparatorToolItem self)
separatorToolItemDraw :: SeparatorToolItemClass self => Attr self Bool
separatorToolItemDraw :: forall self. SeparatorToolItemClass self => Attr self Bool
separatorToolItemDraw = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. SeparatorToolItemClass self => self -> IO Bool
separatorToolItemGetDraw
self -> Bool -> IO ()
forall self. SeparatorToolItemClass self => self -> Bool -> IO ()
separatorToolItemSetDraw
foreign import ccall safe "gtk_separator_tool_item_new"
gtk_separator_tool_item_new :: (IO (Ptr ToolItem))
foreign import ccall safe "gtk_separator_tool_item_set_draw"
gtk_separator_tool_item_set_draw :: ((Ptr SeparatorToolItem) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_separator_tool_item_get_draw"
gtk_separator_tool_item_get_draw :: ((Ptr SeparatorToolItem) -> (IO CInt))