{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Structs.ActionEntry
(
ActionEntry(..) ,
newZeroActionEntry ,
#if defined(ENABLE_OVERLOADING)
ResolveActionEntryMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
actionEntry_accelerator ,
#endif
clearActionEntryAccelerator ,
getActionEntryAccelerator ,
setActionEntryAccelerator ,
#if defined(ENABLE_OVERLOADING)
actionEntry_callback ,
#endif
clearActionEntryCallback ,
getActionEntryCallback ,
setActionEntryCallback ,
#if defined(ENABLE_OVERLOADING)
actionEntry_label ,
#endif
clearActionEntryLabel ,
getActionEntryLabel ,
setActionEntryLabel ,
#if defined(ENABLE_OVERLOADING)
actionEntry_name ,
#endif
clearActionEntryName ,
getActionEntryName ,
setActionEntryName ,
#if defined(ENABLE_OVERLOADING)
actionEntry_stockId ,
#endif
clearActionEntryStockId ,
getActionEntryStockId ,
setActionEntryStockId ,
#if defined(ENABLE_OVERLOADING)
actionEntry_tooltip ,
#endif
clearActionEntryTooltip ,
getActionEntryTooltip ,
setActionEntryTooltip ,
) 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.GHashTable as B.GHT
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.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 ActionEntry = ActionEntry (SP.ManagedPtr ActionEntry)
deriving (ActionEntry -> ActionEntry -> Bool
(ActionEntry -> ActionEntry -> Bool)
-> (ActionEntry -> ActionEntry -> Bool) -> Eq ActionEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ActionEntry -> ActionEntry -> Bool
== :: ActionEntry -> ActionEntry -> Bool
$c/= :: ActionEntry -> ActionEntry -> Bool
/= :: ActionEntry -> ActionEntry -> Bool
Eq)
instance SP.ManagedPtrNewtype ActionEntry where
toManagedPtr :: ActionEntry -> ManagedPtr ActionEntry
toManagedPtr (ActionEntry ManagedPtr ActionEntry
p) = ManagedPtr ActionEntry
p
instance BoxedPtr ActionEntry where
boxedPtrCopy :: ActionEntry -> IO ActionEntry
boxedPtrCopy = \ActionEntry
p -> ActionEntry
-> (Ptr ActionEntry -> IO ActionEntry) -> IO ActionEntry
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ActionEntry
p (Int -> Ptr ActionEntry -> IO (Ptr ActionEntry)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
48 (Ptr ActionEntry -> IO (Ptr ActionEntry))
-> (Ptr ActionEntry -> IO ActionEntry)
-> Ptr ActionEntry
-> IO ActionEntry
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr ActionEntry -> ActionEntry)
-> Ptr ActionEntry -> IO ActionEntry
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr ActionEntry -> ActionEntry
ActionEntry)
boxedPtrFree :: ActionEntry -> IO ()
boxedPtrFree = \ActionEntry
x -> ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr ActionEntry
x Ptr ActionEntry -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr ActionEntry where
boxedPtrCalloc :: IO (Ptr ActionEntry)
boxedPtrCalloc = Int -> IO (Ptr ActionEntry)
forall a. Int -> IO (Ptr a)
callocBytes Int
48
newZeroActionEntry :: MonadIO m => m ActionEntry
newZeroActionEntry :: forall (m :: * -> *). MonadIO m => m ActionEntry
newZeroActionEntry = IO ActionEntry -> m ActionEntry
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ActionEntry -> m ActionEntry)
-> IO ActionEntry -> m ActionEntry
forall a b. (a -> b) -> a -> b
$ IO (Ptr ActionEntry)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr ActionEntry)
-> (Ptr ActionEntry -> IO ActionEntry) -> IO ActionEntry
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr ActionEntry -> ActionEntry)
-> Ptr ActionEntry -> IO ActionEntry
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr ActionEntry -> ActionEntry
ActionEntry
instance tag ~ 'AttrSet => Constructible ActionEntry tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr ActionEntry -> ActionEntry)
-> [AttrOp ActionEntry tag] -> m ActionEntry
new ManagedPtr ActionEntry -> ActionEntry
_ [AttrOp ActionEntry tag]
attrs = do
ActionEntry
o <- m ActionEntry
forall (m :: * -> *). MonadIO m => m ActionEntry
newZeroActionEntry
ActionEntry -> [AttrOp ActionEntry 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set ActionEntry
o [AttrOp ActionEntry tag]
[AttrOp ActionEntry 'AttrSet]
attrs
ActionEntry -> m ActionEntry
forall a. a -> m a
forall (m :: * -> *) a. Monad m => a -> m a
return ActionEntry
o
getActionEntryName :: MonadIO m => ActionEntry -> m (Maybe T.Text)
getActionEntryName :: forall (m :: * -> *). MonadIO m => ActionEntry -> m (Maybe Text)
getActionEntryName ActionEntry
s = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
$ ActionEntry
-> (Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setActionEntryName :: MonadIO m => ActionEntry -> CString -> m ()
setActionEntryName :: forall (m :: * -> *). MonadIO m => ActionEntry -> CString -> m ()
setActionEntryName ActionEntry
s CString
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CString
val :: CString)
clearActionEntryName :: MonadIO m => ActionEntry -> m ()
clearActionEntryName :: forall (m :: * -> *). MonadIO m => ActionEntry -> m ()
clearActionEntryName ActionEntry
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 ActionEntryNameFieldInfo
instance AttrInfo ActionEntryNameFieldInfo where
type AttrBaseTypeConstraint ActionEntryNameFieldInfo = (~) ActionEntry
type AttrAllowedOps ActionEntryNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ActionEntryNameFieldInfo = (~) CString
type AttrTransferTypeConstraint ActionEntryNameFieldInfo = (~)CString
type AttrTransferType ActionEntryNameFieldInfo = CString
type AttrGetType ActionEntryNameFieldInfo = Maybe T.Text
type AttrLabel ActionEntryNameFieldInfo = "name"
type AttrOrigin ActionEntryNameFieldInfo = ActionEntry
attrGet = getActionEntryName
attrSet = setActionEntryName
attrConstruct = undefined
attrClear = clearActionEntryName
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.ActionEntry.name"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-ActionEntry.html#g:attr:name"
})
actionEntry_name :: AttrLabelProxy "name"
actionEntry_name = AttrLabelProxy
#endif
getActionEntryStockId :: MonadIO m => ActionEntry -> m (Maybe T.Text)
getActionEntryStockId :: forall (m :: * -> *). MonadIO m => ActionEntry -> m (Maybe Text)
getActionEntryStockId ActionEntry
s = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
$ ActionEntry
-> (Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setActionEntryStockId :: MonadIO m => ActionEntry -> CString -> m ()
setActionEntryStockId :: forall (m :: * -> *). MonadIO m => ActionEntry -> CString -> m ()
setActionEntryStockId ActionEntry
s CString
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
val :: CString)
clearActionEntryStockId :: MonadIO m => ActionEntry -> m ()
clearActionEntryStockId :: forall (m :: * -> *). MonadIO m => ActionEntry -> m ()
clearActionEntryStockId ActionEntry
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 ActionEntryStockIdFieldInfo
instance AttrInfo ActionEntryStockIdFieldInfo where
type AttrBaseTypeConstraint ActionEntryStockIdFieldInfo = (~) ActionEntry
type AttrAllowedOps ActionEntryStockIdFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ActionEntryStockIdFieldInfo = (~) CString
type AttrTransferTypeConstraint ActionEntryStockIdFieldInfo = (~)CString
type AttrTransferType ActionEntryStockIdFieldInfo = CString
type AttrGetType ActionEntryStockIdFieldInfo = Maybe T.Text
type AttrLabel ActionEntryStockIdFieldInfo = "stock_id"
type AttrOrigin ActionEntryStockIdFieldInfo = ActionEntry
attrGet = getActionEntryStockId
attrSet = setActionEntryStockId
attrConstruct = undefined
attrClear = clearActionEntryStockId
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.ActionEntry.stockId"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-ActionEntry.html#g:attr:stockId"
})
actionEntry_stockId :: AttrLabelProxy "stockId"
actionEntry_stockId = AttrLabelProxy
#endif
getActionEntryLabel :: MonadIO m => ActionEntry -> m (Maybe T.Text)
getActionEntryLabel :: forall (m :: * -> *). MonadIO m => ActionEntry -> m (Maybe Text)
getActionEntryLabel ActionEntry
s = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
$ ActionEntry
-> (Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setActionEntryLabel :: MonadIO m => ActionEntry -> CString -> m ()
setActionEntryLabel :: forall (m :: * -> *). MonadIO m => ActionEntry -> CString -> m ()
setActionEntryLabel ActionEntry
s CString
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
val :: CString)
clearActionEntryLabel :: MonadIO m => ActionEntry -> m ()
clearActionEntryLabel :: forall (m :: * -> *). MonadIO m => ActionEntry -> m ()
clearActionEntryLabel ActionEntry
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 ActionEntryLabelFieldInfo
instance AttrInfo ActionEntryLabelFieldInfo where
type AttrBaseTypeConstraint ActionEntryLabelFieldInfo = (~) ActionEntry
type AttrAllowedOps ActionEntryLabelFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ActionEntryLabelFieldInfo = (~) CString
type AttrTransferTypeConstraint ActionEntryLabelFieldInfo = (~)CString
type AttrTransferType ActionEntryLabelFieldInfo = CString
type AttrGetType ActionEntryLabelFieldInfo = Maybe T.Text
type AttrLabel ActionEntryLabelFieldInfo = "label"
type AttrOrigin ActionEntryLabelFieldInfo = ActionEntry
attrGet = getActionEntryLabel
attrSet = setActionEntryLabel
attrConstruct = undefined
attrClear = clearActionEntryLabel
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.ActionEntry.label"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-ActionEntry.html#g:attr:label"
})
actionEntry_label :: AttrLabelProxy "label"
actionEntry_label = AttrLabelProxy
#endif
getActionEntryAccelerator :: MonadIO m => ActionEntry -> m (Maybe T.Text)
getActionEntryAccelerator :: forall (m :: * -> *). MonadIO m => ActionEntry -> m (Maybe Text)
getActionEntryAccelerator ActionEntry
s = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
$ ActionEntry
-> (Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setActionEntryAccelerator :: MonadIO m => ActionEntry -> CString -> m ()
setActionEntryAccelerator :: forall (m :: * -> *). MonadIO m => ActionEntry -> CString -> m ()
setActionEntryAccelerator ActionEntry
s CString
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (CString
val :: CString)
clearActionEntryAccelerator :: MonadIO m => ActionEntry -> m ()
clearActionEntryAccelerator :: forall (m :: * -> *). MonadIO m => ActionEntry -> m ()
clearActionEntryAccelerator ActionEntry
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 ActionEntryAcceleratorFieldInfo
instance AttrInfo ActionEntryAcceleratorFieldInfo where
type AttrBaseTypeConstraint ActionEntryAcceleratorFieldInfo = (~) ActionEntry
type AttrAllowedOps ActionEntryAcceleratorFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ActionEntryAcceleratorFieldInfo = (~) CString
type AttrTransferTypeConstraint ActionEntryAcceleratorFieldInfo = (~)CString
type AttrTransferType ActionEntryAcceleratorFieldInfo = CString
type AttrGetType ActionEntryAcceleratorFieldInfo = Maybe T.Text
type AttrLabel ActionEntryAcceleratorFieldInfo = "accelerator"
type AttrOrigin ActionEntryAcceleratorFieldInfo = ActionEntry
attrGet = getActionEntryAccelerator
attrSet = setActionEntryAccelerator
attrConstruct = undefined
attrClear = clearActionEntryAccelerator
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.ActionEntry.accelerator"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-ActionEntry.html#g:attr:accelerator"
})
actionEntry_accelerator :: AttrLabelProxy "accelerator"
actionEntry_accelerator = AttrLabelProxy
#endif
getActionEntryTooltip :: MonadIO m => ActionEntry -> m (Maybe T.Text)
getActionEntryTooltip :: forall (m :: * -> *). MonadIO m => ActionEntry -> m (Maybe Text)
getActionEntryTooltip ActionEntry
s = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
$ ActionEntry
-> (Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr ActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setActionEntryTooltip :: MonadIO m => ActionEntry -> CString -> m ()
setActionEntryTooltip :: forall (m :: * -> *). MonadIO m => ActionEntry -> CString -> m ()
setActionEntryTooltip ActionEntry
s CString
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (CString
val :: CString)
clearActionEntryTooltip :: MonadIO m => ActionEntry -> m ()
clearActionEntryTooltip :: forall (m :: * -> *). MonadIO m => ActionEntry -> m ()
clearActionEntryTooltip ActionEntry
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 ActionEntryTooltipFieldInfo
instance AttrInfo ActionEntryTooltipFieldInfo where
type AttrBaseTypeConstraint ActionEntryTooltipFieldInfo = (~) ActionEntry
type AttrAllowedOps ActionEntryTooltipFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ActionEntryTooltipFieldInfo = (~) CString
type AttrTransferTypeConstraint ActionEntryTooltipFieldInfo = (~)CString
type AttrTransferType ActionEntryTooltipFieldInfo = CString
type AttrGetType ActionEntryTooltipFieldInfo = Maybe T.Text
type AttrLabel ActionEntryTooltipFieldInfo = "tooltip"
type AttrOrigin ActionEntryTooltipFieldInfo = ActionEntry
attrGet = getActionEntryTooltip
attrSet = setActionEntryTooltip
attrConstruct = undefined
attrClear = clearActionEntryTooltip
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.ActionEntry.tooltip"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-ActionEntry.html#g:attr:tooltip"
})
actionEntry_tooltip :: AttrLabelProxy "tooltip"
actionEntry_tooltip = AttrLabelProxy
#endif
getActionEntryCallback :: MonadIO m => ActionEntry -> m (Maybe GObject.Callbacks.Callback)
getActionEntryCallback :: forall (m :: * -> *). MonadIO m => ActionEntry -> m (Maybe (IO ()))
getActionEntryCallback ActionEntry
s = IO (Maybe (IO ())) -> m (Maybe (IO ()))
forall a. IO a -> m a
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
$ ActionEntry
-> (Ptr ActionEntry -> IO (Maybe (IO ()))) -> IO (Maybe (IO ()))
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO (Maybe (IO ()))) -> IO (Maybe (IO ())))
-> (Ptr ActionEntry -> IO (Maybe (IO ()))) -> IO (Maybe (IO ()))
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
FunPtr (IO ())
val <- Ptr (FunPtr (IO ())) -> IO (FunPtr (IO ()))
forall a. Storable a => Ptr a -> IO a
peek (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return IO ()
val''
Maybe (IO ()) -> IO (Maybe (IO ()))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe (IO ())
result
setActionEntryCallback :: MonadIO m => ActionEntry -> FunPtr GObject.Callbacks.C_Callback -> m ()
setActionEntryCallback :: forall (m :: * -> *).
MonadIO m =>
ActionEntry -> FunPtr (IO ()) -> m ()
setActionEntryCallback ActionEntry
s FunPtr (IO ())
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr (FunPtr (IO ())) -> FunPtr (IO ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> Int -> Ptr (FunPtr (IO ()))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (FunPtr (IO ())
val :: FunPtr GObject.Callbacks.C_Callback)
clearActionEntryCallback :: MonadIO m => ActionEntry -> m ()
clearActionEntryCallback :: forall (m :: * -> *). MonadIO m => ActionEntry -> m ()
clearActionEntryCallback ActionEntry
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ ActionEntry -> (Ptr ActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr ActionEntry
s ((Ptr ActionEntry -> IO ()) -> IO ())
-> (Ptr ActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ActionEntry
ptr -> do
Ptr (FunPtr (IO ())) -> FunPtr (IO ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ActionEntry
ptr Ptr ActionEntry -> 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 ActionEntryCallbackFieldInfo
instance AttrInfo ActionEntryCallbackFieldInfo where
type AttrBaseTypeConstraint ActionEntryCallbackFieldInfo = (~) ActionEntry
type AttrAllowedOps ActionEntryCallbackFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ActionEntryCallbackFieldInfo = (~) (FunPtr GObject.Callbacks.C_Callback)
type AttrTransferTypeConstraint ActionEntryCallbackFieldInfo = (~)GObject.Callbacks.Callback
type AttrTransferType ActionEntryCallbackFieldInfo = (FunPtr GObject.Callbacks.C_Callback)
type AttrGetType ActionEntryCallbackFieldInfo = Maybe GObject.Callbacks.Callback
type AttrLabel ActionEntryCallbackFieldInfo = "callback"
type AttrOrigin ActionEntryCallbackFieldInfo = ActionEntry
attrGet = getActionEntryCallback
attrSet = setActionEntryCallback
attrConstruct = undefined
attrClear = clearActionEntryCallback
attrTransfer _ v = do
GObject.Callbacks.mk_Callback (GObject.Callbacks.wrap_Callback Nothing v)
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.ActionEntry.callback"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-ActionEntry.html#g:attr:callback"
})
actionEntry_callback :: AttrLabelProxy "callback"
actionEntry_callback = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ActionEntry
type instance O.AttributeList ActionEntry = ActionEntryAttributeList
type ActionEntryAttributeList = ('[ '("name", ActionEntryNameFieldInfo), '("stockId", ActionEntryStockIdFieldInfo), '("label", ActionEntryLabelFieldInfo), '("accelerator", ActionEntryAcceleratorFieldInfo), '("tooltip", ActionEntryTooltipFieldInfo), '("callback", ActionEntryCallbackFieldInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveActionEntryMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveActionEntryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveActionEntryMethod t ActionEntry, O.OverloadedMethod info ActionEntry p) => OL.IsLabel t (ActionEntry -> 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 ~ ResolveActionEntryMethod t ActionEntry, O.OverloadedMethod info ActionEntry p, R.HasField t ActionEntry p) => R.HasField t ActionEntry p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveActionEntryMethod t ActionEntry, O.OverloadedMethodInfo info ActionEntry) => OL.IsLabel t (O.MethodProxy info ActionEntry) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif