{-# LINE 2 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
module Graphics.UI.Gtk.MenuComboToolbar.CheckMenuItem (
CheckMenuItem,
CheckMenuItemClass,
castToCheckMenuItem, gTypeCheckMenuItem,
toCheckMenuItem,
checkMenuItemNew,
checkMenuItemNewWithLabel,
checkMenuItemNewWithMnemonic,
checkMenuItemSetActive,
checkMenuItemGetActive,
checkMenuItemEmitToggled,
checkMenuItemSetInconsistent,
checkMenuItemGetInconsistent,
checkMenuItemGetDrawAsRadio,
checkMenuItemSetDrawAsRadio,
checkMenuItemActive,
checkMenuItemInconsistent,
checkMenuItemDrawAsRadio,
checkMenuItemToggled
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.Attributes
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Signals
{-# LINE 92 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
import Graphics.UI.Gtk.Types
{-# LINE 93 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
{-# LINE 95 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
checkMenuItemNew :: IO CheckMenuItem
=
(ForeignPtr CheckMenuItem -> CheckMenuItem,
FinalizerPtr CheckMenuItem)
-> IO (Ptr CheckMenuItem) -> IO CheckMenuItem
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr CheckMenuItem -> CheckMenuItem,
FinalizerPtr CheckMenuItem)
forall {a}.
(ForeignPtr CheckMenuItem -> CheckMenuItem, FinalizerPtr a)
mkCheckMenuItem (IO (Ptr CheckMenuItem) -> IO CheckMenuItem)
-> IO (Ptr CheckMenuItem) -> IO CheckMenuItem
forall a b. (a -> b) -> a -> b
$
(Ptr Widget -> Ptr CheckMenuItem)
-> IO (Ptr Widget) -> IO (Ptr CheckMenuItem)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Ptr Widget -> Ptr CheckMenuItem
forall a b. Ptr a -> Ptr b
castPtr :: Ptr Widget -> Ptr CheckMenuItem) (IO (Ptr Widget) -> IO (Ptr CheckMenuItem))
-> IO (Ptr Widget) -> IO (Ptr CheckMenuItem)
forall a b. (a -> b) -> a -> b
$
IO (Ptr Widget)
gtk_check_menu_item_new
{-# LINE 106 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
checkMenuItemNewWithLabel :: GlibString string
=> string
-> IO CheckMenuItem
string
label =
(ForeignPtr CheckMenuItem -> CheckMenuItem,
FinalizerPtr CheckMenuItem)
-> IO (Ptr CheckMenuItem) -> IO CheckMenuItem
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr CheckMenuItem -> CheckMenuItem,
FinalizerPtr CheckMenuItem)
forall {a}.
(ForeignPtr CheckMenuItem -> CheckMenuItem, FinalizerPtr a)
mkCheckMenuItem (IO (Ptr CheckMenuItem) -> IO CheckMenuItem)
-> IO (Ptr CheckMenuItem) -> IO CheckMenuItem
forall a b. (a -> b) -> a -> b
$
(Ptr Widget -> Ptr CheckMenuItem)
-> IO (Ptr Widget) -> IO (Ptr CheckMenuItem)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Ptr Widget -> Ptr CheckMenuItem
forall a b. Ptr a -> Ptr b
castPtr :: Ptr Widget -> Ptr CheckMenuItem) (IO (Ptr Widget) -> IO (Ptr CheckMenuItem))
-> IO (Ptr Widget) -> IO (Ptr CheckMenuItem)
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
label ((CString -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (CString -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \CString
labelPtr ->
CString -> IO (Ptr Widget)
gtk_check_menu_item_new_with_label
{-# LINE 117 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
labelPtr
checkMenuItemNewWithMnemonic :: GlibString string
=> string
-> IO CheckMenuItem
string
label =
(ForeignPtr CheckMenuItem -> CheckMenuItem,
FinalizerPtr CheckMenuItem)
-> IO (Ptr CheckMenuItem) -> IO CheckMenuItem
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr CheckMenuItem -> CheckMenuItem,
FinalizerPtr CheckMenuItem)
forall {a}.
(ForeignPtr CheckMenuItem -> CheckMenuItem, FinalizerPtr a)
mkCheckMenuItem (IO (Ptr CheckMenuItem) -> IO CheckMenuItem)
-> IO (Ptr CheckMenuItem) -> IO CheckMenuItem
forall a b. (a -> b) -> a -> b
$
(Ptr Widget -> Ptr CheckMenuItem)
-> IO (Ptr Widget) -> IO (Ptr CheckMenuItem)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Ptr Widget -> Ptr CheckMenuItem
forall a b. Ptr a -> Ptr b
castPtr :: Ptr Widget -> Ptr CheckMenuItem) (IO (Ptr Widget) -> IO (Ptr CheckMenuItem))
-> IO (Ptr Widget) -> IO (Ptr CheckMenuItem)
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
label ((CString -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (CString -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \CString
labelPtr ->
CString -> IO (Ptr Widget)
gtk_check_menu_item_new_with_mnemonic
{-# LINE 132 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
labelPtr
checkMenuItemSetActive :: CheckMenuItemClass self => self -> Bool -> IO ()
self
self Bool
isActive =
(\(CheckMenuItem ForeignPtr CheckMenuItem
arg1) CInt
arg2 -> ForeignPtr CheckMenuItem -> (Ptr CheckMenuItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CheckMenuItem
arg1 ((Ptr CheckMenuItem -> IO ()) -> IO ())
-> (Ptr CheckMenuItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr CheckMenuItem
argPtr1 ->Ptr CheckMenuItem -> CInt -> IO ()
gtk_check_menu_item_set_active Ptr CheckMenuItem
argPtr1 CInt
arg2)
{-# LINE 142 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
(toCheckMenuItem self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
isActive)
checkMenuItemGetActive :: CheckMenuItemClass self => self -> IO Bool
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
$
(\(CheckMenuItem ForeignPtr CheckMenuItem
arg1) -> ForeignPtr CheckMenuItem
-> (Ptr CheckMenuItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CheckMenuItem
arg1 ((Ptr CheckMenuItem -> IO CInt) -> IO CInt)
-> (Ptr CheckMenuItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr CheckMenuItem
argPtr1 ->Ptr CheckMenuItem -> IO CInt
gtk_check_menu_item_get_active Ptr CheckMenuItem
argPtr1)
{-# LINE 152 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
(toCheckMenuItem self)
checkMenuItemEmitToggled :: CheckMenuItemClass self => self -> IO ()
self
self =
(\(CheckMenuItem ForeignPtr CheckMenuItem
arg1) -> ForeignPtr CheckMenuItem -> (Ptr CheckMenuItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CheckMenuItem
arg1 ((Ptr CheckMenuItem -> IO ()) -> IO ())
-> (Ptr CheckMenuItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr CheckMenuItem
argPtr1 ->Ptr CheckMenuItem -> IO ()
gtk_check_menu_item_toggled Ptr CheckMenuItem
argPtr1)
{-# LINE 159 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
(toCheckMenuItem self)
checkMenuItemSetInconsistent :: CheckMenuItemClass self => self -> Bool -> IO ()
self
self Bool
setting =
(\(CheckMenuItem ForeignPtr CheckMenuItem
arg1) CInt
arg2 -> ForeignPtr CheckMenuItem -> (Ptr CheckMenuItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CheckMenuItem
arg1 ((Ptr CheckMenuItem -> IO ()) -> IO ())
-> (Ptr CheckMenuItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr CheckMenuItem
argPtr1 ->Ptr CheckMenuItem -> CInt -> IO ()
gtk_check_menu_item_set_inconsistent Ptr CheckMenuItem
argPtr1 CInt
arg2)
{-# LINE 173 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
(toCheckMenuItem self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
setting)
checkMenuItemGetInconsistent :: CheckMenuItemClass self => self -> IO Bool
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
$
(\(CheckMenuItem ForeignPtr CheckMenuItem
arg1) -> ForeignPtr CheckMenuItem
-> (Ptr CheckMenuItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CheckMenuItem
arg1 ((Ptr CheckMenuItem -> IO CInt) -> IO CInt)
-> (Ptr CheckMenuItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr CheckMenuItem
argPtr1 ->Ptr CheckMenuItem -> IO CInt
gtk_check_menu_item_get_inconsistent Ptr CheckMenuItem
argPtr1)
{-# LINE 183 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
(toCheckMenuItem self)
checkMenuItemSetDrawAsRadio :: CheckMenuItemClass self => self -> Bool -> IO ()
self
self Bool
drawAsRadio =
(\(CheckMenuItem ForeignPtr CheckMenuItem
arg1) CInt
arg2 -> ForeignPtr CheckMenuItem -> (Ptr CheckMenuItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CheckMenuItem
arg1 ((Ptr CheckMenuItem -> IO ()) -> IO ())
-> (Ptr CheckMenuItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr CheckMenuItem
argPtr1 ->Ptr CheckMenuItem -> CInt -> IO ()
gtk_check_menu_item_set_draw_as_radio Ptr CheckMenuItem
argPtr1 CInt
arg2)
{-# LINE 193 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
(toCheckMenuItem self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
drawAsRadio)
checkMenuItemGetDrawAsRadio :: CheckMenuItemClass self => self -> IO Bool
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
$
(\(CheckMenuItem ForeignPtr CheckMenuItem
arg1) -> ForeignPtr CheckMenuItem
-> (Ptr CheckMenuItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CheckMenuItem
arg1 ((Ptr CheckMenuItem -> IO CInt) -> IO CInt)
-> (Ptr CheckMenuItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr CheckMenuItem
argPtr1 ->Ptr CheckMenuItem -> IO CInt
gtk_check_menu_item_get_draw_as_radio Ptr CheckMenuItem
argPtr1)
{-# LINE 204 "./Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs" #-}
(toCheckMenuItem self)
checkMenuItemActive :: CheckMenuItemClass self => Attr self Bool
= (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. CheckMenuItemClass self => self -> IO Bool
checkMenuItemGetActive
self -> Bool -> IO ()
forall self. CheckMenuItemClass self => self -> Bool -> IO ()
checkMenuItemSetActive
checkMenuItemInconsistent :: CheckMenuItemClass self => Attr self Bool
= (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. CheckMenuItemClass self => self -> IO Bool
checkMenuItemGetInconsistent
self -> Bool -> IO ()
forall self. CheckMenuItemClass self => self -> Bool -> IO ()
checkMenuItemSetInconsistent
checkMenuItemDrawAsRadio :: CheckMenuItemClass self => Attr self Bool
= (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. CheckMenuItemClass self => self -> IO Bool
checkMenuItemGetDrawAsRadio
self -> Bool -> IO ()
forall self. CheckMenuItemClass self => self -> Bool -> IO ()
checkMenuItemSetDrawAsRadio
checkMenuItemToggled :: CheckMenuItemClass self => Signal self (IO ())
= (Bool -> self -> IO () -> IO (ConnectId self))
-> Signal self (IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (SignalName -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
SignalName -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE SignalName
"toggled")
foreign import ccall unsafe "gtk_check_menu_item_new"
:: (IO (Ptr Widget))
foreign import ccall unsafe "gtk_check_menu_item_new_with_label"
:: ((Ptr CChar) -> (IO (Ptr Widget)))
foreign import ccall unsafe "gtk_check_menu_item_new_with_mnemonic"
:: ((Ptr CChar) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_check_menu_item_set_active"
:: ((Ptr CheckMenuItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_check_menu_item_get_active"
:: ((Ptr CheckMenuItem) -> (IO CInt))
foreign import ccall safe "gtk_check_menu_item_toggled"
:: ((Ptr CheckMenuItem) -> (IO ()))
foreign import ccall safe "gtk_check_menu_item_set_inconsistent"
:: ((Ptr CheckMenuItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_check_menu_item_get_inconsistent"
:: ((Ptr CheckMenuItem) -> (IO CInt))
foreign import ccall safe "gtk_check_menu_item_set_draw_as_radio"
:: ((Ptr CheckMenuItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_check_menu_item_get_draw_as_radio"
:: ((Ptr CheckMenuItem) -> (IO CInt))