{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Structs.PadActionEntry
(
PadActionEntry(..) ,
newZeroPadActionEntry ,
#if defined(ENABLE_OVERLOADING)
ResolvePadActionEntryMethod ,
#endif
clearPadActionEntryActionName ,
getPadActionEntryActionName ,
#if defined(ENABLE_OVERLOADING)
padActionEntry_actionName ,
#endif
setPadActionEntryActionName ,
getPadActionEntryIndex ,
#if defined(ENABLE_OVERLOADING)
padActionEntry_index ,
#endif
setPadActionEntryIndex ,
clearPadActionEntryLabel ,
getPadActionEntryLabel ,
#if defined(ENABLE_OVERLOADING)
padActionEntry_label ,
#endif
setPadActionEntryLabel ,
getPadActionEntryMode ,
#if defined(ENABLE_OVERLOADING)
padActionEntry_mode ,
#endif
setPadActionEntryMode ,
getPadActionEntryType ,
#if defined(ENABLE_OVERLOADING)
padActionEntry_type ,
#endif
setPadActionEntryType ,
) 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 {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
newtype PadActionEntry = PadActionEntry (SP.ManagedPtr PadActionEntry)
deriving (PadActionEntry -> PadActionEntry -> Bool
(PadActionEntry -> PadActionEntry -> Bool)
-> (PadActionEntry -> PadActionEntry -> Bool) -> Eq PadActionEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PadActionEntry -> PadActionEntry -> Bool
== :: PadActionEntry -> PadActionEntry -> Bool
$c/= :: PadActionEntry -> PadActionEntry -> Bool
/= :: PadActionEntry -> PadActionEntry -> Bool
Eq)
instance SP.ManagedPtrNewtype PadActionEntry where
toManagedPtr :: PadActionEntry -> ManagedPtr PadActionEntry
toManagedPtr (PadActionEntry ManagedPtr PadActionEntry
p) = ManagedPtr PadActionEntry
p
instance BoxedPtr PadActionEntry where
boxedPtrCopy :: PadActionEntry -> IO PadActionEntry
boxedPtrCopy = \PadActionEntry
p -> PadActionEntry
-> (Ptr PadActionEntry -> IO PadActionEntry) -> IO PadActionEntry
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr PadActionEntry
p (Int -> Ptr PadActionEntry -> IO (Ptr PadActionEntry)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
32 (Ptr PadActionEntry -> IO (Ptr PadActionEntry))
-> (Ptr PadActionEntry -> IO PadActionEntry)
-> Ptr PadActionEntry
-> IO PadActionEntry
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr PadActionEntry -> PadActionEntry)
-> Ptr PadActionEntry -> IO PadActionEntry
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr PadActionEntry -> PadActionEntry
PadActionEntry)
boxedPtrFree :: PadActionEntry -> IO ()
boxedPtrFree = \PadActionEntry
x -> PadActionEntry -> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr PadActionEntry
x Ptr PadActionEntry -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr PadActionEntry where
boxedPtrCalloc :: IO (Ptr PadActionEntry)
boxedPtrCalloc = Int -> IO (Ptr PadActionEntry)
forall a. Int -> IO (Ptr a)
callocBytes Int
32
newZeroPadActionEntry :: MonadIO m => m PadActionEntry
newZeroPadActionEntry :: forall (m :: * -> *). MonadIO m => m PadActionEntry
newZeroPadActionEntry = IO PadActionEntry -> m PadActionEntry
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PadActionEntry -> m PadActionEntry)
-> IO PadActionEntry -> m PadActionEntry
forall a b. (a -> b) -> a -> b
$ IO (Ptr PadActionEntry)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr PadActionEntry)
-> (Ptr PadActionEntry -> IO PadActionEntry) -> IO PadActionEntry
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr PadActionEntry -> PadActionEntry)
-> Ptr PadActionEntry -> IO PadActionEntry
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr PadActionEntry -> PadActionEntry
PadActionEntry
instance tag ~ 'AttrSet => Constructible PadActionEntry tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr PadActionEntry -> PadActionEntry)
-> [AttrOp PadActionEntry tag] -> m PadActionEntry
new ManagedPtr PadActionEntry -> PadActionEntry
_ [AttrOp PadActionEntry tag]
attrs = do
PadActionEntry
o <- m PadActionEntry
forall (m :: * -> *). MonadIO m => m PadActionEntry
newZeroPadActionEntry
PadActionEntry -> [AttrOp PadActionEntry 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set PadActionEntry
o [AttrOp PadActionEntry tag]
[AttrOp PadActionEntry 'AttrSet]
attrs
PadActionEntry -> m PadActionEntry
forall a. a -> m a
forall (m :: * -> *) a. Monad m => a -> m a
return PadActionEntry
o
getPadActionEntryType :: MonadIO m => PadActionEntry -> m Gtk.Enums.PadActionType
getPadActionEntryType :: forall (m :: * -> *).
MonadIO m =>
PadActionEntry -> m PadActionType
getPadActionEntryType PadActionEntry
s = IO PadActionType -> m PadActionType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PadActionType -> m PadActionType)
-> IO PadActionType -> m PadActionType
forall a b. (a -> b) -> a -> b
$ PadActionEntry
-> (Ptr PadActionEntry -> IO PadActionType) -> IO PadActionType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO PadActionType) -> IO PadActionType)
-> (Ptr PadActionEntry -> IO PadActionType) -> IO PadActionType
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr PadActionEntry
ptr Ptr PadActionEntry -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CUInt
let val' :: PadActionType
val' = (Int -> PadActionType
forall a. Enum a => Int -> a
toEnum (Int -> PadActionType) -> (CUInt -> Int) -> CUInt -> PadActionType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
val
PadActionType -> IO PadActionType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return PadActionType
val'
setPadActionEntryType :: MonadIO m => PadActionEntry -> Gtk.Enums.PadActionType -> m ()
setPadActionEntryType :: forall (m :: * -> *).
MonadIO m =>
PadActionEntry -> PadActionType -> m ()
setPadActionEntryType PadActionEntry
s PadActionType
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
$ PadActionEntry -> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO ()) -> IO ())
-> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
let val' :: CUInt
val' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PadActionType -> Int) -> PadActionType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PadActionType -> Int
forall a. Enum a => a -> Int
fromEnum) PadActionType
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PadActionEntry
ptr Ptr PadActionEntry -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data PadActionEntryTypeFieldInfo
instance AttrInfo PadActionEntryTypeFieldInfo where
type AttrBaseTypeConstraint PadActionEntryTypeFieldInfo = (~) PadActionEntry
type AttrAllowedOps PadActionEntryTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PadActionEntryTypeFieldInfo = (~) Gtk.Enums.PadActionType
type AttrTransferTypeConstraint PadActionEntryTypeFieldInfo = (~)Gtk.Enums.PadActionType
type AttrTransferType PadActionEntryTypeFieldInfo = Gtk.Enums.PadActionType
type AttrGetType PadActionEntryTypeFieldInfo = Gtk.Enums.PadActionType
type AttrLabel PadActionEntryTypeFieldInfo = "type"
type AttrOrigin PadActionEntryTypeFieldInfo = PadActionEntry
attrGet = getPadActionEntryType
attrSet = setPadActionEntryType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.PadActionEntry.type"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-PadActionEntry.html#g:attr:type"
})
padActionEntry_type :: AttrLabelProxy "type"
padActionEntry_type = AttrLabelProxy
#endif
getPadActionEntryIndex :: MonadIO m => PadActionEntry -> m Int32
getPadActionEntryIndex :: forall (m :: * -> *). MonadIO m => PadActionEntry -> m Int32
getPadActionEntryIndex PadActionEntry
s = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ PadActionEntry -> (Ptr PadActionEntry -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO Int32) -> IO Int32)
-> (Ptr PadActionEntry -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr PadActionEntry
ptr Ptr PadActionEntry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Int32
Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setPadActionEntryIndex :: MonadIO m => PadActionEntry -> Int32 -> m ()
setPadActionEntryIndex :: forall (m :: * -> *). MonadIO m => PadActionEntry -> Int32 -> m ()
setPadActionEntryIndex PadActionEntry
s Int32
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
$ PadActionEntry -> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO ()) -> IO ())
-> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PadActionEntry
ptr Ptr PadActionEntry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data PadActionEntryIndexFieldInfo
instance AttrInfo PadActionEntryIndexFieldInfo where
type AttrBaseTypeConstraint PadActionEntryIndexFieldInfo = (~) PadActionEntry
type AttrAllowedOps PadActionEntryIndexFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PadActionEntryIndexFieldInfo = (~) Int32
type AttrTransferTypeConstraint PadActionEntryIndexFieldInfo = (~)Int32
type AttrTransferType PadActionEntryIndexFieldInfo = Int32
type AttrGetType PadActionEntryIndexFieldInfo = Int32
type AttrLabel PadActionEntryIndexFieldInfo = "index"
type AttrOrigin PadActionEntryIndexFieldInfo = PadActionEntry
attrGet = getPadActionEntryIndex
attrSet = setPadActionEntryIndex
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.PadActionEntry.index"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-PadActionEntry.html#g:attr:index"
})
padActionEntry_index :: AttrLabelProxy "index"
padActionEntry_index = AttrLabelProxy
#endif
getPadActionEntryMode :: MonadIO m => PadActionEntry -> m Int32
getPadActionEntryMode :: forall (m :: * -> *). MonadIO m => PadActionEntry -> m Int32
getPadActionEntryMode PadActionEntry
s = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ PadActionEntry -> (Ptr PadActionEntry -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO Int32) -> IO Int32)
-> (Ptr PadActionEntry -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr PadActionEntry
ptr Ptr PadActionEntry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO Int32
Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setPadActionEntryMode :: MonadIO m => PadActionEntry -> Int32 -> m ()
setPadActionEntryMode :: forall (m :: * -> *). MonadIO m => PadActionEntry -> Int32 -> m ()
setPadActionEntryMode PadActionEntry
s Int32
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
$ PadActionEntry -> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO ()) -> IO ())
-> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PadActionEntry
ptr Ptr PadActionEntry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data PadActionEntryModeFieldInfo
instance AttrInfo PadActionEntryModeFieldInfo where
type AttrBaseTypeConstraint PadActionEntryModeFieldInfo = (~) PadActionEntry
type AttrAllowedOps PadActionEntryModeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PadActionEntryModeFieldInfo = (~) Int32
type AttrTransferTypeConstraint PadActionEntryModeFieldInfo = (~)Int32
type AttrTransferType PadActionEntryModeFieldInfo = Int32
type AttrGetType PadActionEntryModeFieldInfo = Int32
type AttrLabel PadActionEntryModeFieldInfo = "mode"
type AttrOrigin PadActionEntryModeFieldInfo = PadActionEntry
attrGet = getPadActionEntryMode
attrSet = setPadActionEntryMode
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.PadActionEntry.mode"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-PadActionEntry.html#g:attr:mode"
})
padActionEntry_mode :: AttrLabelProxy "mode"
padActionEntry_mode = AttrLabelProxy
#endif
getPadActionEntryLabel :: MonadIO m => PadActionEntry -> m (Maybe T.Text)
getPadActionEntryLabel :: forall (m :: * -> *). MonadIO m => PadActionEntry -> m (Maybe Text)
getPadActionEntryLabel PadActionEntry
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
$ PadActionEntry
-> (Ptr PadActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr PadActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr PadActionEntry
ptr Ptr PadActionEntry -> 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
setPadActionEntryLabel :: MonadIO m => PadActionEntry -> CString -> m ()
setPadActionEntryLabel :: forall (m :: * -> *).
MonadIO m =>
PadActionEntry -> CString -> m ()
setPadActionEntryLabel PadActionEntry
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
$ PadActionEntry -> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO ()) -> IO ())
-> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PadActionEntry
ptr Ptr PadActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
val :: CString)
clearPadActionEntryLabel :: MonadIO m => PadActionEntry -> m ()
clearPadActionEntryLabel :: forall (m :: * -> *). MonadIO m => PadActionEntry -> m ()
clearPadActionEntryLabel PadActionEntry
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
$ PadActionEntry -> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO ()) -> IO ())
-> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PadActionEntry
ptr Ptr PadActionEntry -> 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 PadActionEntryLabelFieldInfo
instance AttrInfo PadActionEntryLabelFieldInfo where
type AttrBaseTypeConstraint PadActionEntryLabelFieldInfo = (~) PadActionEntry
type AttrAllowedOps PadActionEntryLabelFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint PadActionEntryLabelFieldInfo = (~) CString
type AttrTransferTypeConstraint PadActionEntryLabelFieldInfo = (~)CString
type AttrTransferType PadActionEntryLabelFieldInfo = CString
type AttrGetType PadActionEntryLabelFieldInfo = Maybe T.Text
type AttrLabel PadActionEntryLabelFieldInfo = "label"
type AttrOrigin PadActionEntryLabelFieldInfo = PadActionEntry
attrGet = getPadActionEntryLabel
attrSet = setPadActionEntryLabel
attrConstruct = undefined
attrClear = clearPadActionEntryLabel
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.PadActionEntry.label"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-PadActionEntry.html#g:attr:label"
})
padActionEntry_label :: AttrLabelProxy "label"
padActionEntry_label = AttrLabelProxy
#endif
getPadActionEntryActionName :: MonadIO m => PadActionEntry -> m (Maybe T.Text)
getPadActionEntryActionName :: forall (m :: * -> *). MonadIO m => PadActionEntry -> m (Maybe Text)
getPadActionEntryActionName PadActionEntry
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
$ PadActionEntry
-> (Ptr PadActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr PadActionEntry -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr PadActionEntry
ptr Ptr PadActionEntry -> 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
setPadActionEntryActionName :: MonadIO m => PadActionEntry -> CString -> m ()
setPadActionEntryActionName :: forall (m :: * -> *).
MonadIO m =>
PadActionEntry -> CString -> m ()
setPadActionEntryActionName PadActionEntry
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
$ PadActionEntry -> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO ()) -> IO ())
-> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PadActionEntry
ptr Ptr PadActionEntry -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (CString
val :: CString)
clearPadActionEntryActionName :: MonadIO m => PadActionEntry -> m ()
clearPadActionEntryActionName :: forall (m :: * -> *). MonadIO m => PadActionEntry -> m ()
clearPadActionEntryActionName PadActionEntry
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
$ PadActionEntry -> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PadActionEntry
s ((Ptr PadActionEntry -> IO ()) -> IO ())
-> (Ptr PadActionEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PadActionEntry
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PadActionEntry
ptr Ptr PadActionEntry -> 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 PadActionEntryActionNameFieldInfo
instance AttrInfo PadActionEntryActionNameFieldInfo where
type AttrBaseTypeConstraint PadActionEntryActionNameFieldInfo = (~) PadActionEntry
type AttrAllowedOps PadActionEntryActionNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint PadActionEntryActionNameFieldInfo = (~) CString
type AttrTransferTypeConstraint PadActionEntryActionNameFieldInfo = (~)CString
type AttrTransferType PadActionEntryActionNameFieldInfo = CString
type AttrGetType PadActionEntryActionNameFieldInfo = Maybe T.Text
type AttrLabel PadActionEntryActionNameFieldInfo = "action_name"
type AttrOrigin PadActionEntryActionNameFieldInfo = PadActionEntry
attrGet = getPadActionEntryActionName
attrSet = setPadActionEntryActionName
attrConstruct = undefined
attrClear = clearPadActionEntryActionName
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Structs.PadActionEntry.actionName"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-PadActionEntry.html#g:attr:actionName"
})
padActionEntry_actionName :: AttrLabelProxy "actionName"
padActionEntry_actionName = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PadActionEntry
type instance O.AttributeList PadActionEntry = PadActionEntryAttributeList
type PadActionEntryAttributeList = ('[ '("type", PadActionEntryTypeFieldInfo), '("index", PadActionEntryIndexFieldInfo), '("mode", PadActionEntryModeFieldInfo), '("label", PadActionEntryLabelFieldInfo), '("actionName", PadActionEntryActionNameFieldInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolvePadActionEntryMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolvePadActionEntryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePadActionEntryMethod t PadActionEntry, O.OverloadedMethod info PadActionEntry p) => OL.IsLabel t (PadActionEntry -> 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 ~ ResolvePadActionEntryMethod t PadActionEntry, O.OverloadedMethod info PadActionEntry p, R.HasField t PadActionEntry p) => R.HasField t PadActionEntry p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolvePadActionEntryMethod t PadActionEntry, O.OverloadedMethodInfo info PadActionEntry) => OL.IsLabel t (O.MethodProxy info PadActionEntry) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif