#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Structs.RadioActionEntry
(
RadioActionEntry(..) ,
newZeroRadioActionEntry ,
noRadioActionEntry ,
clearRadioActionEntryAccelerator ,
getRadioActionEntryAccelerator ,
#if ENABLE_OVERLOADING
radioActionEntry_accelerator ,
#endif
setRadioActionEntryAccelerator ,
clearRadioActionEntryLabel ,
getRadioActionEntryLabel ,
#if ENABLE_OVERLOADING
radioActionEntry_label ,
#endif
setRadioActionEntryLabel ,
clearRadioActionEntryName ,
getRadioActionEntryName ,
#if ENABLE_OVERLOADING
radioActionEntry_name ,
#endif
setRadioActionEntryName ,
clearRadioActionEntryStockId ,
getRadioActionEntryStockId ,
#if ENABLE_OVERLOADING
radioActionEntry_stockId ,
#endif
setRadioActionEntryStockId ,
clearRadioActionEntryTooltip ,
getRadioActionEntryTooltip ,
#if ENABLE_OVERLOADING
radioActionEntry_tooltip ,
#endif
setRadioActionEntryTooltip ,
getRadioActionEntryValue ,
#if ENABLE_OVERLOADING
radioActionEntry_value ,
#endif
setRadioActionEntryValue ,
) 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.ManagedPtr as B.ManagedPtr
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.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
newtype RadioActionEntry = RadioActionEntry (ManagedPtr RadioActionEntry)
instance WrappedPtr RadioActionEntry where
wrappedPtrCalloc = callocBytes 48
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 48 >=> wrapPtr RadioActionEntry)
wrappedPtrFree = Just ptr_to_g_free
newZeroRadioActionEntry :: MonadIO m => m RadioActionEntry
newZeroRadioActionEntry = liftIO $ wrappedPtrCalloc >>= wrapPtr RadioActionEntry
instance tag ~ 'AttrSet => Constructible RadioActionEntry tag where
new _ attrs = do
o <- newZeroRadioActionEntry
GI.Attributes.set o attrs
return o
noRadioActionEntry :: Maybe RadioActionEntry
noRadioActionEntry = Nothing
getRadioActionEntryName :: MonadIO m => RadioActionEntry -> m (Maybe T.Text)
getRadioActionEntryName s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CString
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- cstringToText val'
return val''
return result
setRadioActionEntryName :: MonadIO m => RadioActionEntry -> CString -> m ()
setRadioActionEntryName s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (val :: CString)
clearRadioActionEntryName :: MonadIO m => RadioActionEntry -> m ()
clearRadioActionEntryName s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (FP.nullPtr :: CString)
#if ENABLE_OVERLOADING
data RadioActionEntryNameFieldInfo
instance AttrInfo RadioActionEntryNameFieldInfo where
type AttrAllowedOps RadioActionEntryNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RadioActionEntryNameFieldInfo = (~) CString
type AttrBaseTypeConstraint RadioActionEntryNameFieldInfo = (~) RadioActionEntry
type AttrGetType RadioActionEntryNameFieldInfo = Maybe T.Text
type AttrLabel RadioActionEntryNameFieldInfo = "name"
type AttrOrigin RadioActionEntryNameFieldInfo = RadioActionEntry
attrGet _ = getRadioActionEntryName
attrSet _ = setRadioActionEntryName
attrConstruct = undefined
attrClear _ = clearRadioActionEntryName
radioActionEntry_name :: AttrLabelProxy "name"
radioActionEntry_name = AttrLabelProxy
#endif
getRadioActionEntryStockId :: MonadIO m => RadioActionEntry -> m (Maybe T.Text)
getRadioActionEntryStockId s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO CString
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- cstringToText val'
return val''
return result
setRadioActionEntryStockId :: MonadIO m => RadioActionEntry -> CString -> m ()
setRadioActionEntryStockId s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (val :: CString)
clearRadioActionEntryStockId :: MonadIO m => RadioActionEntry -> m ()
clearRadioActionEntryStockId s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (FP.nullPtr :: CString)
#if ENABLE_OVERLOADING
data RadioActionEntryStockIdFieldInfo
instance AttrInfo RadioActionEntryStockIdFieldInfo where
type AttrAllowedOps RadioActionEntryStockIdFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RadioActionEntryStockIdFieldInfo = (~) CString
type AttrBaseTypeConstraint RadioActionEntryStockIdFieldInfo = (~) RadioActionEntry
type AttrGetType RadioActionEntryStockIdFieldInfo = Maybe T.Text
type AttrLabel RadioActionEntryStockIdFieldInfo = "stock_id"
type AttrOrigin RadioActionEntryStockIdFieldInfo = RadioActionEntry
attrGet _ = getRadioActionEntryStockId
attrSet _ = setRadioActionEntryStockId
attrConstruct = undefined
attrClear _ = clearRadioActionEntryStockId
radioActionEntry_stockId :: AttrLabelProxy "stockId"
radioActionEntry_stockId = AttrLabelProxy
#endif
getRadioActionEntryLabel :: MonadIO m => RadioActionEntry -> m (Maybe T.Text)
getRadioActionEntryLabel s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO CString
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- cstringToText val'
return val''
return result
setRadioActionEntryLabel :: MonadIO m => RadioActionEntry -> CString -> m ()
setRadioActionEntryLabel s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: CString)
clearRadioActionEntryLabel :: MonadIO m => RadioActionEntry -> m ()
clearRadioActionEntryLabel s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (FP.nullPtr :: CString)
#if ENABLE_OVERLOADING
data RadioActionEntryLabelFieldInfo
instance AttrInfo RadioActionEntryLabelFieldInfo where
type AttrAllowedOps RadioActionEntryLabelFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RadioActionEntryLabelFieldInfo = (~) CString
type AttrBaseTypeConstraint RadioActionEntryLabelFieldInfo = (~) RadioActionEntry
type AttrGetType RadioActionEntryLabelFieldInfo = Maybe T.Text
type AttrLabel RadioActionEntryLabelFieldInfo = "label"
type AttrOrigin RadioActionEntryLabelFieldInfo = RadioActionEntry
attrGet _ = getRadioActionEntryLabel
attrSet _ = setRadioActionEntryLabel
attrConstruct = undefined
attrClear _ = clearRadioActionEntryLabel
radioActionEntry_label :: AttrLabelProxy "label"
radioActionEntry_label = AttrLabelProxy
#endif
getRadioActionEntryAccelerator :: MonadIO m => RadioActionEntry -> m (Maybe T.Text)
getRadioActionEntryAccelerator s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO CString
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- cstringToText val'
return val''
return result
setRadioActionEntryAccelerator :: MonadIO m => RadioActionEntry -> CString -> m ()
setRadioActionEntryAccelerator s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (val :: CString)
clearRadioActionEntryAccelerator :: MonadIO m => RadioActionEntry -> m ()
clearRadioActionEntryAccelerator s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (FP.nullPtr :: CString)
#if ENABLE_OVERLOADING
data RadioActionEntryAcceleratorFieldInfo
instance AttrInfo RadioActionEntryAcceleratorFieldInfo where
type AttrAllowedOps RadioActionEntryAcceleratorFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RadioActionEntryAcceleratorFieldInfo = (~) CString
type AttrBaseTypeConstraint RadioActionEntryAcceleratorFieldInfo = (~) RadioActionEntry
type AttrGetType RadioActionEntryAcceleratorFieldInfo = Maybe T.Text
type AttrLabel RadioActionEntryAcceleratorFieldInfo = "accelerator"
type AttrOrigin RadioActionEntryAcceleratorFieldInfo = RadioActionEntry
attrGet _ = getRadioActionEntryAccelerator
attrSet _ = setRadioActionEntryAccelerator
attrConstruct = undefined
attrClear _ = clearRadioActionEntryAccelerator
radioActionEntry_accelerator :: AttrLabelProxy "accelerator"
radioActionEntry_accelerator = AttrLabelProxy
#endif
getRadioActionEntryTooltip :: MonadIO m => RadioActionEntry -> m (Maybe T.Text)
getRadioActionEntryTooltip s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 32) :: IO CString
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- cstringToText val'
return val''
return result
setRadioActionEntryTooltip :: MonadIO m => RadioActionEntry -> CString -> m ()
setRadioActionEntryTooltip s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 32) (val :: CString)
clearRadioActionEntryTooltip :: MonadIO m => RadioActionEntry -> m ()
clearRadioActionEntryTooltip s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 32) (FP.nullPtr :: CString)
#if ENABLE_OVERLOADING
data RadioActionEntryTooltipFieldInfo
instance AttrInfo RadioActionEntryTooltipFieldInfo where
type AttrAllowedOps RadioActionEntryTooltipFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RadioActionEntryTooltipFieldInfo = (~) CString
type AttrBaseTypeConstraint RadioActionEntryTooltipFieldInfo = (~) RadioActionEntry
type AttrGetType RadioActionEntryTooltipFieldInfo = Maybe T.Text
type AttrLabel RadioActionEntryTooltipFieldInfo = "tooltip"
type AttrOrigin RadioActionEntryTooltipFieldInfo = RadioActionEntry
attrGet _ = getRadioActionEntryTooltip
attrSet _ = setRadioActionEntryTooltip
attrConstruct = undefined
attrClear _ = clearRadioActionEntryTooltip
radioActionEntry_tooltip :: AttrLabelProxy "tooltip"
radioActionEntry_tooltip = AttrLabelProxy
#endif
getRadioActionEntryValue :: MonadIO m => RadioActionEntry -> m Int32
getRadioActionEntryValue s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 40) :: IO Int32
return val
setRadioActionEntryValue :: MonadIO m => RadioActionEntry -> Int32 -> m ()
setRadioActionEntryValue s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 40) (val :: Int32)
#if ENABLE_OVERLOADING
data RadioActionEntryValueFieldInfo
instance AttrInfo RadioActionEntryValueFieldInfo where
type AttrAllowedOps RadioActionEntryValueFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RadioActionEntryValueFieldInfo = (~) Int32
type AttrBaseTypeConstraint RadioActionEntryValueFieldInfo = (~) RadioActionEntry
type AttrGetType RadioActionEntryValueFieldInfo = Int32
type AttrLabel RadioActionEntryValueFieldInfo = "value"
type AttrOrigin RadioActionEntryValueFieldInfo = RadioActionEntry
attrGet _ = getRadioActionEntryValue
attrSet _ = setRadioActionEntryValue
attrConstruct = undefined
attrClear _ = undefined
radioActionEntry_value :: AttrLabelProxy "value"
radioActionEntry_value = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList RadioActionEntry
type instance O.AttributeList RadioActionEntry = RadioActionEntryAttributeList
type RadioActionEntryAttributeList = ('[ '("name", RadioActionEntryNameFieldInfo), '("stockId", RadioActionEntryStockIdFieldInfo), '("label", RadioActionEntryLabelFieldInfo), '("accelerator", RadioActionEntryAcceleratorFieldInfo), '("tooltip", RadioActionEntryTooltipFieldInfo), '("value", RadioActionEntryValueFieldInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
type family ResolveRadioActionEntryMethod (t :: Symbol) (o :: *) :: * where
ResolveRadioActionEntryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRadioActionEntryMethod t RadioActionEntry, O.MethodInfo info RadioActionEntry p) => OL.IsLabel t (RadioActionEntry -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif