{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Structs.ToggleActionEntry
(
ToggleActionEntry(..) ,
newZeroToggleActionEntry ,
#if defined(ENABLE_OVERLOADING)
ResolveToggleActionEntryMethod ,
#endif
clearToggleActionEntryAccelerator ,
getToggleActionEntryAccelerator ,
setToggleActionEntryAccelerator ,
#if defined(ENABLE_OVERLOADING)
toggleActionEntry_accelerator ,
#endif
clearToggleActionEntryCallback ,
getToggleActionEntryCallback ,
setToggleActionEntryCallback ,
#if defined(ENABLE_OVERLOADING)
toggleActionEntry_callback ,
#endif
getToggleActionEntryIsActive ,
setToggleActionEntryIsActive ,
#if defined(ENABLE_OVERLOADING)
toggleActionEntry_isActive ,
#endif
clearToggleActionEntryLabel ,
getToggleActionEntryLabel ,
setToggleActionEntryLabel ,
#if defined(ENABLE_OVERLOADING)
toggleActionEntry_label ,
#endif
clearToggleActionEntryName ,
getToggleActionEntryName ,
setToggleActionEntryName ,
#if defined(ENABLE_OVERLOADING)
toggleActionEntry_name ,
#endif
clearToggleActionEntryStockId ,
getToggleActionEntryStockId ,
setToggleActionEntryStockId ,
#if defined(ENABLE_OVERLOADING)
toggleActionEntry_stockId ,
#endif
clearToggleActionEntryTooltip ,
getToggleActionEntryTooltip ,
setToggleActionEntryTooltip ,
#if defined(ENABLE_OVERLOADING)
toggleActionEntry_tooltip ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GObject.Callbacks as GObject.Callbacks
newtype ToggleActionEntry = ToggleActionEntry (SP.ManagedPtr ToggleActionEntry)
deriving (ToggleActionEntry -> ToggleActionEntry -> Bool
(ToggleActionEntry -> ToggleActionEntry -> Bool)
-> (ToggleActionEntry -> ToggleActionEntry -> Bool)
-> Eq ToggleActionEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ToggleActionEntry -> ToggleActionEntry -> Bool
$c/= :: ToggleActionEntry -> ToggleActionEntry -> Bool
== :: ToggleActionEntry -> ToggleActionEntry -> Bool
$c== :: ToggleActionEntry -> ToggleActionEntry -> Bool
Eq)
instance SP.ManagedPtrNewtype ToggleActionEntry where
toManagedPtr :: ToggleActionEntry -> ManagedPtr ToggleActionEntry
toManagedPtr (ToggleActionEntry ManagedPtr ToggleActionEntry
p) = ManagedPtr ToggleActionEntry
p
instance BoxedPtr ToggleActionEntry where
boxedPtrCopy :: ToggleActionEntry -> IO ToggleActionEntry
boxedPtrCopy = \ToggleActionEntry
p -> ToggleActionEntry
-> (Ptr ToggleActionEntry -> IO ToggleActionEntry)
-> IO ToggleActionEntry
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ToggleActionEntry
p (Int -> Ptr ToggleActionEntry -> IO (Ptr ToggleActionEntry)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
56 (Ptr ToggleActionEntry -> IO (Ptr ToggleActionEntry))
-> (Ptr ToggleActionEntry -> IO ToggleActionEntry)
-> Ptr ToggleActionEntry
-> IO ToggleActionEntry
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr ToggleActionEntry -> ToggleActionEntry)
-> Ptr ToggleActionEntry -> IO ToggleActionEntry
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr ToggleActionEntry -> ToggleActionEntry
ToggleActionEntry)
boxedPtrFree :: ToggleActionEntry -> IO ()
boxedPtrFree = \ToggleActionEntry
x -> ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr ToggleActionEntry
x Ptr ToggleActionEntry -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr ToggleActionEntry where
boxedPtrCalloc :: IO (Ptr ToggleActionEntry)
boxedPtrCalloc = Int -> IO (Ptr ToggleActionEntry)
forall a. Int -> IO (Ptr a)
callocBytes Int
56
newZeroToggleActionEntry :: MonadIO m => m ToggleActionEntry
newZeroToggleActionEntry :: forall (m :: * -> *). MonadIO m => m ToggleActionEntry
newZeroToggleActionEntry = IO ToggleActionEntry -> m ToggleActionEntry
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ToggleActionEntry -> m ToggleActionEntry)
-> IO ToggleActionEntry -> m ToggleActionEntry
forall a b. (a -> b) -> a -> b
$ IO (Ptr ToggleActionEntry)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr ToggleActionEntry)
-> (Ptr ToggleActionEntry -> IO ToggleActionEntry)
-> IO ToggleActionEntry
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr ToggleActionEntry -> ToggleActionEntry)
-> Ptr ToggleActionEntry -> IO ToggleActionEntry
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr ToggleActionEntry -> ToggleActionEntry
ToggleActionEntry
instance tag ~ 'AttrSet => Constructible ToggleActionEntry tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr ToggleActionEntry -> ToggleActionEntry)
-> [AttrOp ToggleActionEntry tag] -> m ToggleActionEntry
new ManagedPtr ToggleActionEntry -> ToggleActionEntry
_ [AttrOp ToggleActionEntry tag]
attrs = do
ToggleActionEntry
o <- m ToggleActionEntry
forall (m :: * -> *). MonadIO m => m ToggleActionEntry
newZeroToggleActionEntry
ToggleActionEntry -> [AttrOp ToggleActionEntry 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set ToggleActionEntry
o [AttrOp ToggleActionEntry tag]
[AttrOp ToggleActionEntry 'AttrSet]
attrs
ToggleActionEntry -> m ToggleActionEntry
forall (m :: * -> *) a. Monad m => a -> m a
return ToggleActionEntry
o
getToggleActionEntryName :: MonadIO m => ToggleActionEntry -> m (Maybe T.Text)
getToggleActionEntryName :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> m (Maybe Text)
getToggleActionEntryName ToggleActionEntry
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry
-> (Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CString
Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setToggleActionEntryName :: MonadIO m => ToggleActionEntry -> CString -> m ()
setToggleActionEntryName :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> CString -> m ()
setToggleActionEntryName ToggleActionEntry
s CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CString
val :: CString)
clearToggleActionEntryName :: MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryName :: forall (m :: * -> *). MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryName ToggleActionEntry
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data ToggleActionEntryNameFieldInfo
instance AttrInfo ToggleActionEntryNameFieldInfo where
type AttrBaseTypeConstraint ToggleActionEntryNameFieldInfo = (~) ToggleActionEntry
type AttrAllowedOps ToggleActionEntryNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ToggleActionEntryNameFieldInfo = (~) CString
type AttrTransferTypeConstraint ToggleActionEntryNameFieldInfo = (~)CString
type AttrTransferType ToggleActionEntryNameFieldInfo = CString
type AttrGetType ToggleActionEntryNameFieldInfo = Maybe T.Text
type AttrLabel ToggleActionEntryNameFieldInfo = "name"
type AttrOrigin ToggleActionEntryNameFieldInfo = ToggleActionEntry
attrGet = getToggleActionEntryName
attrSet = setToggleActionEntryName
attrConstruct = undefined
attrClear = clearToggleActionEntryName
attrTransfer _ v = do
return v
toggleActionEntry_name :: AttrLabelProxy "name"
toggleActionEntry_name = AttrLabelProxy
#endif
getToggleActionEntryStockId :: MonadIO m => ToggleActionEntry -> m (Maybe T.Text)
getToggleActionEntryStockId :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> m (Maybe Text)
getToggleActionEntryStockId ToggleActionEntry
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry
-> (Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO CString
Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setToggleActionEntryStockId :: MonadIO m => ToggleActionEntry -> CString -> m ()
setToggleActionEntryStockId :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> CString -> m ()
setToggleActionEntryStockId ToggleActionEntry
s CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
val :: CString)
clearToggleActionEntryStockId :: MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryStockId :: forall (m :: * -> *). MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryStockId ToggleActionEntry
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data ToggleActionEntryStockIdFieldInfo
instance AttrInfo ToggleActionEntryStockIdFieldInfo where
type AttrBaseTypeConstraint ToggleActionEntryStockIdFieldInfo = (~) ToggleActionEntry
type AttrAllowedOps ToggleActionEntryStockIdFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ToggleActionEntryStockIdFieldInfo = (~) CString
type AttrTransferTypeConstraint ToggleActionEntryStockIdFieldInfo = (~)CString
type AttrTransferType ToggleActionEntryStockIdFieldInfo = CString
type AttrGetType ToggleActionEntryStockIdFieldInfo = Maybe T.Text
type AttrLabel ToggleActionEntryStockIdFieldInfo = "stock_id"
type AttrOrigin ToggleActionEntryStockIdFieldInfo = ToggleActionEntry
attrGet = getToggleActionEntryStockId
attrSet = setToggleActionEntryStockId
attrConstruct = undefined
attrClear = clearToggleActionEntryStockId
attrTransfer _ v = do
return v
toggleActionEntry_stockId :: AttrLabelProxy "stockId"
toggleActionEntry_stockId = AttrLabelProxy
#endif
getToggleActionEntryLabel :: MonadIO m => ToggleActionEntry -> m (Maybe T.Text)
getToggleActionEntryLabel :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> m (Maybe Text)
getToggleActionEntryLabel ToggleActionEntry
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry
-> (Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO CString
Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setToggleActionEntryLabel :: MonadIO m => ToggleActionEntry -> CString -> m ()
setToggleActionEntryLabel :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> CString -> m ()
setToggleActionEntryLabel ToggleActionEntry
s CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
val :: CString)
clearToggleActionEntryLabel :: MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryLabel :: forall (m :: * -> *). MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryLabel ToggleActionEntry
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data ToggleActionEntryLabelFieldInfo
instance AttrInfo ToggleActionEntryLabelFieldInfo where
type AttrBaseTypeConstraint ToggleActionEntryLabelFieldInfo = (~) ToggleActionEntry
type AttrAllowedOps ToggleActionEntryLabelFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ToggleActionEntryLabelFieldInfo = (~) CString
type AttrTransferTypeConstraint ToggleActionEntryLabelFieldInfo = (~)CString
type AttrTransferType ToggleActionEntryLabelFieldInfo = CString
type AttrGetType ToggleActionEntryLabelFieldInfo = Maybe T.Text
type AttrLabel ToggleActionEntryLabelFieldInfo = "label"
type AttrOrigin ToggleActionEntryLabelFieldInfo = ToggleActionEntry
attrGet = getToggleActionEntryLabel
attrSet = setToggleActionEntryLabel
attrConstruct = undefined
attrClear = clearToggleActionEntryLabel
attrTransfer _ v = do
return v
toggleActionEntry_label :: AttrLabelProxy "label"
toggleActionEntry_label = AttrLabelProxy
#endif
getToggleActionEntryAccelerator :: MonadIO m => ToggleActionEntry -> m (Maybe T.Text)
getToggleActionEntryAccelerator :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> m (Maybe Text)
getToggleActionEntryAccelerator ToggleActionEntry
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry
-> (Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO CString
Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setToggleActionEntryAccelerator :: MonadIO m => ToggleActionEntry -> CString -> m ()
setToggleActionEntryAccelerator :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> CString -> m ()
setToggleActionEntryAccelerator ToggleActionEntry
s CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (CString
val :: CString)
clearToggleActionEntryAccelerator :: MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryAccelerator :: forall (m :: * -> *). MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryAccelerator ToggleActionEntry
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data ToggleActionEntryAcceleratorFieldInfo
instance AttrInfo ToggleActionEntryAcceleratorFieldInfo where
type AttrBaseTypeConstraint ToggleActionEntryAcceleratorFieldInfo = (~) ToggleActionEntry
type AttrAllowedOps ToggleActionEntryAcceleratorFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ToggleActionEntryAcceleratorFieldInfo = (~) CString
type AttrTransferTypeConstraint ToggleActionEntryAcceleratorFieldInfo = (~)CString
type AttrTransferType ToggleActionEntryAcceleratorFieldInfo = CString
type AttrGetType ToggleActionEntryAcceleratorFieldInfo = Maybe T.Text
type AttrLabel ToggleActionEntryAcceleratorFieldInfo = "accelerator"
type AttrOrigin ToggleActionEntryAcceleratorFieldInfo = ToggleActionEntry
attrGet = getToggleActionEntryAccelerator
attrSet = setToggleActionEntryAccelerator
attrConstruct = undefined
attrClear = clearToggleActionEntryAccelerator
attrTransfer _ v = do
return v
toggleActionEntry_accelerator :: AttrLabelProxy "accelerator"
toggleActionEntry_accelerator = AttrLabelProxy
#endif
getToggleActionEntryTooltip :: MonadIO m => ToggleActionEntry -> m (Maybe T.Text)
getToggleActionEntryTooltip :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> m (Maybe Text)
getToggleActionEntryTooltip ToggleActionEntry
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry
-> (Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr ToggleActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO CString
Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setToggleActionEntryTooltip :: MonadIO m => ToggleActionEntry -> CString -> m ()
setToggleActionEntryTooltip :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> CString -> m ()
setToggleActionEntryTooltip ToggleActionEntry
s CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (CString
val :: CString)
clearToggleActionEntryTooltip :: MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryTooltip :: forall (m :: * -> *). MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryTooltip ToggleActionEntry
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data ToggleActionEntryTooltipFieldInfo
instance AttrInfo ToggleActionEntryTooltipFieldInfo where
type AttrBaseTypeConstraint ToggleActionEntryTooltipFieldInfo = (~) ToggleActionEntry
type AttrAllowedOps ToggleActionEntryTooltipFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ToggleActionEntryTooltipFieldInfo = (~) CString
type AttrTransferTypeConstraint ToggleActionEntryTooltipFieldInfo = (~)CString
type AttrTransferType ToggleActionEntryTooltipFieldInfo = CString
type AttrGetType ToggleActionEntryTooltipFieldInfo = Maybe T.Text
type AttrLabel ToggleActionEntryTooltipFieldInfo = "tooltip"
type AttrOrigin ToggleActionEntryTooltipFieldInfo = ToggleActionEntry
attrGet = getToggleActionEntryTooltip
attrSet = setToggleActionEntryTooltip
attrConstruct = undefined
attrClear = clearToggleActionEntryTooltip
attrTransfer _ v = do
return v
toggleActionEntry_tooltip :: AttrLabelProxy "tooltip"
toggleActionEntry_tooltip = AttrLabelProxy
#endif
getToggleActionEntryCallback :: MonadIO m => ToggleActionEntry -> m (Maybe GObject.Callbacks.Callback)
getToggleActionEntryCallback :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> m (Maybe (IO ()))
getToggleActionEntryCallback ToggleActionEntry
s = IO (Maybe (IO ())) -> m (Maybe (IO ()))
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe (IO ())) -> m (Maybe (IO ())))
-> IO (Maybe (IO ())) -> m (Maybe (IO ()))
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry
-> (Ptr ToggleActionEntry -> IO (Maybe (IO ())))
-> IO (Maybe (IO ()))
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO (Maybe (IO ())))
-> IO (Maybe (IO ())))
-> (Ptr ToggleActionEntry -> IO (Maybe (IO ())))
-> IO (Maybe (IO ()))
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
FunPtr (IO ())
val <- Ptr (FunPtr (IO ())) -> IO (FunPtr (IO ()))
forall a. Storable a => Ptr a -> IO a
peek (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr (FunPtr (IO ()))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) :: IO (FunPtr GObject.Callbacks.C_Callback)
Maybe (IO ())
result <- FunPtr (IO ())
-> (FunPtr (IO ()) -> IO (IO ())) -> IO (Maybe (IO ()))
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr (IO ())
val ((FunPtr (IO ()) -> IO (IO ())) -> IO (Maybe (IO ())))
-> (FunPtr (IO ()) -> IO (IO ())) -> IO (Maybe (IO ()))
forall a b. (a -> b) -> a -> b
$ \FunPtr (IO ())
val' -> do
let val'' :: IO ()
val'' = FunPtr (IO ()) -> IO ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr (IO ()) -> m ()
GObject.Callbacks.dynamic_Callback FunPtr (IO ())
val'
IO () -> IO (IO ())
forall (m :: * -> *) a. Monad m => a -> m a
return IO ()
val''
Maybe (IO ()) -> IO (Maybe (IO ()))
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe (IO ())
result
setToggleActionEntryCallback :: MonadIO m => ToggleActionEntry -> FunPtr GObject.Callbacks.C_Callback -> m ()
setToggleActionEntryCallback :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> FunPtr (IO ()) -> m ()
setToggleActionEntryCallback ToggleActionEntry
s FunPtr (IO ())
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr (FunPtr (IO ())) -> FunPtr (IO ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr (FunPtr (IO ()))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (FunPtr (IO ())
val :: FunPtr GObject.Callbacks.C_Callback)
clearToggleActionEntryCallback :: MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryCallback :: forall (m :: * -> *). MonadIO m => ToggleActionEntry -> m ()
clearToggleActionEntryCallback ToggleActionEntry
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
Ptr (FunPtr (IO ())) -> FunPtr (IO ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr (FunPtr (IO ()))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (FunPtr (IO ())
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GObject.Callbacks.C_Callback)
#if defined(ENABLE_OVERLOADING)
data ToggleActionEntryCallbackFieldInfo
instance AttrInfo ToggleActionEntryCallbackFieldInfo where
type AttrBaseTypeConstraint ToggleActionEntryCallbackFieldInfo = (~) ToggleActionEntry
type AttrAllowedOps ToggleActionEntryCallbackFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ToggleActionEntryCallbackFieldInfo = (~) (FunPtr GObject.Callbacks.C_Callback)
type AttrTransferTypeConstraint ToggleActionEntryCallbackFieldInfo = (~)GObject.Callbacks.Callback
type AttrTransferType ToggleActionEntryCallbackFieldInfo = (FunPtr GObject.Callbacks.C_Callback)
type AttrGetType ToggleActionEntryCallbackFieldInfo = Maybe GObject.Callbacks.Callback
type AttrLabel ToggleActionEntryCallbackFieldInfo = "callback"
type AttrOrigin ToggleActionEntryCallbackFieldInfo = ToggleActionEntry
attrGet = getToggleActionEntryCallback
attrSet = setToggleActionEntryCallback
attrConstruct = undefined
attrClear = clearToggleActionEntryCallback
attrTransfer _ v = do
GObject.Callbacks.mk_Callback (GObject.Callbacks.wrap_Callback Nothing v)
toggleActionEntry_callback :: AttrLabelProxy "callback"
toggleActionEntry_callback = AttrLabelProxy
#endif
getToggleActionEntryIsActive :: MonadIO m => ToggleActionEntry -> m Bool
getToggleActionEntryIsActive :: forall (m :: * -> *). MonadIO m => ToggleActionEntry -> m Bool
getToggleActionEntryIsActive ToggleActionEntry
s = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO Bool) -> IO Bool
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO Bool) -> IO Bool)
-> (Ptr ToggleActionEntry -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
CInt
val <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) :: IO CInt
let val' :: Bool
val' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
val
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
val'
setToggleActionEntryIsActive :: MonadIO m => ToggleActionEntry -> Bool -> m ()
setToggleActionEntryIsActive :: forall (m :: * -> *).
MonadIO m =>
ToggleActionEntry -> Bool -> m ()
setToggleActionEntryIsActive ToggleActionEntry
s Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ToggleActionEntry -> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ToggleActionEntry
s ((Ptr ToggleActionEntry -> IO ()) -> IO ())
-> (Ptr ToggleActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToggleActionEntry
ptr -> do
let val' :: CInt
val' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
val
Ptr CInt -> CInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ToggleActionEntry
ptr Ptr ToggleActionEntry -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) (CInt
val' :: CInt)
#if defined(ENABLE_OVERLOADING)
data ToggleActionEntryIsActiveFieldInfo
instance AttrInfo ToggleActionEntryIsActiveFieldInfo where
type AttrBaseTypeConstraint ToggleActionEntryIsActiveFieldInfo = (~) ToggleActionEntry
type AttrAllowedOps ToggleActionEntryIsActiveFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint ToggleActionEntryIsActiveFieldInfo = (~) Bool
type AttrTransferTypeConstraint ToggleActionEntryIsActiveFieldInfo = (~)Bool
type AttrTransferType ToggleActionEntryIsActiveFieldInfo = Bool
type AttrGetType ToggleActionEntryIsActiveFieldInfo = Bool
type AttrLabel ToggleActionEntryIsActiveFieldInfo = "is_active"
type AttrOrigin ToggleActionEntryIsActiveFieldInfo = ToggleActionEntry
attrGet = getToggleActionEntryIsActive
attrSet = setToggleActionEntryIsActive
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
toggleActionEntry_isActive :: AttrLabelProxy "isActive"
toggleActionEntry_isActive = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ToggleActionEntry
type instance O.AttributeList ToggleActionEntry = ToggleActionEntryAttributeList
type ToggleActionEntryAttributeList = ('[ '("name", ToggleActionEntryNameFieldInfo), '("stockId", ToggleActionEntryStockIdFieldInfo), '("label", ToggleActionEntryLabelFieldInfo), '("accelerator", ToggleActionEntryAcceleratorFieldInfo), '("tooltip", ToggleActionEntryTooltipFieldInfo), '("callback", ToggleActionEntryCallbackFieldInfo), '("isActive", ToggleActionEntryIsActiveFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveToggleActionEntryMethod (t :: Symbol) (o :: *) :: * where
ResolveToggleActionEntryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveToggleActionEntryMethod t ToggleActionEntry, O.OverloadedMethod info ToggleActionEntry p) => OL.IsLabel t (ToggleActionEntry -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveToggleActionEntryMethod t ToggleActionEntry, O.OverloadedMethod info ToggleActionEntry p, R.HasField t ToggleActionEntry p) => R.HasField t ToggleActionEntry p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveToggleActionEntryMethod t ToggleActionEntry, O.OverloadedMethodInfo info ToggleActionEntry) => OL.IsLabel t (O.MethodProxy info ToggleActionEntry) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif