#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Objects.RadioAction
(
RadioAction(..) ,
IsRadioAction ,
toRadioAction ,
noRadioAction ,
#if ENABLE_OVERLOADING
RadioActionGetCurrentValueMethodInfo ,
#endif
radioActionGetCurrentValue ,
#if ENABLE_OVERLOADING
RadioActionGetGroupMethodInfo ,
#endif
radioActionGetGroup ,
#if ENABLE_OVERLOADING
RadioActionJoinGroupMethodInfo ,
#endif
radioActionJoinGroup ,
radioActionNew ,
#if ENABLE_OVERLOADING
RadioActionSetCurrentValueMethodInfo ,
#endif
radioActionSetCurrentValue ,
#if ENABLE_OVERLOADING
RadioActionSetGroupMethodInfo ,
#endif
radioActionSetGroup ,
#if ENABLE_OVERLOADING
RadioActionCurrentValuePropertyInfo ,
#endif
constructRadioActionCurrentValue ,
getRadioActionCurrentValue ,
#if ENABLE_OVERLOADING
radioActionCurrentValue ,
#endif
setRadioActionCurrentValue ,
#if ENABLE_OVERLOADING
RadioActionGroupPropertyInfo ,
#endif
clearRadioActionGroup ,
constructRadioActionGroup ,
#if ENABLE_OVERLOADING
radioActionGroup ,
#endif
setRadioActionGroup ,
#if ENABLE_OVERLOADING
RadioActionValuePropertyInfo ,
#endif
constructRadioActionValue ,
getRadioActionValue ,
#if ENABLE_OVERLOADING
radioActionValue ,
#endif
setRadioActionValue ,
C_RadioActionChangedCallback ,
RadioActionChangedCallback ,
#if ENABLE_OVERLOADING
RadioActionChangedSignalInfo ,
#endif
afterRadioActionChanged ,
genClosure_RadioActionChanged ,
mk_RadioActionChangedCallback ,
noRadioActionChangedCallback ,
onRadioActionChanged ,
wrap_RadioActionChangedCallback ,
) 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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Action as Gtk.Action
import {-# SOURCE #-} qualified GI.Gtk.Objects.ToggleAction as Gtk.ToggleAction
newtype RadioAction = RadioAction (ManagedPtr RadioAction)
foreign import ccall "gtk_radio_action_get_type"
c_gtk_radio_action_get_type :: IO GType
instance GObject RadioAction where
gobjectType _ = c_gtk_radio_action_get_type
class GObject o => IsRadioAction o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError RadioAction a) =>
IsRadioAction a
#endif
instance IsRadioAction RadioAction
instance Gtk.ToggleAction.IsToggleAction RadioAction
instance Gtk.Action.IsAction RadioAction
instance GObject.Object.IsObject RadioAction
instance Gtk.Buildable.IsBuildable RadioAction
toRadioAction :: (MonadIO m, IsRadioAction o) => o -> m RadioAction
toRadioAction = liftIO . unsafeCastTo RadioAction
noRadioAction :: Maybe RadioAction
noRadioAction = Nothing
#if ENABLE_OVERLOADING
type family ResolveRadioActionMethod (t :: Symbol) (o :: *) :: * where
ResolveRadioActionMethod "activate" o = Gtk.Action.ActionActivateMethodInfo
ResolveRadioActionMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
ResolveRadioActionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveRadioActionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveRadioActionMethod "blockActivate" o = Gtk.Action.ActionBlockActivateMethodInfo
ResolveRadioActionMethod "connectAccelerator" o = Gtk.Action.ActionConnectAcceleratorMethodInfo
ResolveRadioActionMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
ResolveRadioActionMethod "createIcon" o = Gtk.Action.ActionCreateIconMethodInfo
ResolveRadioActionMethod "createMenu" o = Gtk.Action.ActionCreateMenuMethodInfo
ResolveRadioActionMethod "createMenuItem" o = Gtk.Action.ActionCreateMenuItemMethodInfo
ResolveRadioActionMethod "createToolItem" o = Gtk.Action.ActionCreateToolItemMethodInfo
ResolveRadioActionMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
ResolveRadioActionMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
ResolveRadioActionMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
ResolveRadioActionMethod "disconnectAccelerator" o = Gtk.Action.ActionDisconnectAcceleratorMethodInfo
ResolveRadioActionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveRadioActionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveRadioActionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveRadioActionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveRadioActionMethod "isSensitive" o = Gtk.Action.ActionIsSensitiveMethodInfo
ResolveRadioActionMethod "isVisible" o = Gtk.Action.ActionIsVisibleMethodInfo
ResolveRadioActionMethod "joinGroup" o = RadioActionJoinGroupMethodInfo
ResolveRadioActionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveRadioActionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveRadioActionMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
ResolveRadioActionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveRadioActionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveRadioActionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveRadioActionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveRadioActionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveRadioActionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveRadioActionMethod "toggled" o = Gtk.ToggleAction.ToggleActionToggledMethodInfo
ResolveRadioActionMethod "unblockActivate" o = Gtk.Action.ActionUnblockActivateMethodInfo
ResolveRadioActionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveRadioActionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveRadioActionMethod "getAccelClosure" o = Gtk.Action.ActionGetAccelClosureMethodInfo
ResolveRadioActionMethod "getAccelPath" o = Gtk.Action.ActionGetAccelPathMethodInfo
ResolveRadioActionMethod "getActive" o = Gtk.ToggleAction.ToggleActionGetActiveMethodInfo
ResolveRadioActionMethod "getAlwaysShowImage" o = Gtk.Action.ActionGetAlwaysShowImageMethodInfo
ResolveRadioActionMethod "getCurrentValue" o = RadioActionGetCurrentValueMethodInfo
ResolveRadioActionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveRadioActionMethod "getDrawAsRadio" o = Gtk.ToggleAction.ToggleActionGetDrawAsRadioMethodInfo
ResolveRadioActionMethod "getGicon" o = Gtk.Action.ActionGetGiconMethodInfo
ResolveRadioActionMethod "getGroup" o = RadioActionGetGroupMethodInfo
ResolveRadioActionMethod "getIconName" o = Gtk.Action.ActionGetIconNameMethodInfo
ResolveRadioActionMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
ResolveRadioActionMethod "getIsImportant" o = Gtk.Action.ActionGetIsImportantMethodInfo
ResolveRadioActionMethod "getLabel" o = Gtk.Action.ActionGetLabelMethodInfo
ResolveRadioActionMethod "getName" o = Gtk.Action.ActionGetNameMethodInfo
ResolveRadioActionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveRadioActionMethod "getProxies" o = Gtk.Action.ActionGetProxiesMethodInfo
ResolveRadioActionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveRadioActionMethod "getSensitive" o = Gtk.Action.ActionGetSensitiveMethodInfo
ResolveRadioActionMethod "getShortLabel" o = Gtk.Action.ActionGetShortLabelMethodInfo
ResolveRadioActionMethod "getStockId" o = Gtk.Action.ActionGetStockIdMethodInfo
ResolveRadioActionMethod "getTooltip" o = Gtk.Action.ActionGetTooltipMethodInfo
ResolveRadioActionMethod "getVisible" o = Gtk.Action.ActionGetVisibleMethodInfo
ResolveRadioActionMethod "getVisibleHorizontal" o = Gtk.Action.ActionGetVisibleHorizontalMethodInfo
ResolveRadioActionMethod "getVisibleVertical" o = Gtk.Action.ActionGetVisibleVerticalMethodInfo
ResolveRadioActionMethod "setAccelGroup" o = Gtk.Action.ActionSetAccelGroupMethodInfo
ResolveRadioActionMethod "setAccelPath" o = Gtk.Action.ActionSetAccelPathMethodInfo
ResolveRadioActionMethod "setActive" o = Gtk.ToggleAction.ToggleActionSetActiveMethodInfo
ResolveRadioActionMethod "setAlwaysShowImage" o = Gtk.Action.ActionSetAlwaysShowImageMethodInfo
ResolveRadioActionMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
ResolveRadioActionMethod "setCurrentValue" o = RadioActionSetCurrentValueMethodInfo
ResolveRadioActionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveRadioActionMethod "setDrawAsRadio" o = Gtk.ToggleAction.ToggleActionSetDrawAsRadioMethodInfo
ResolveRadioActionMethod "setGicon" o = Gtk.Action.ActionSetGiconMethodInfo
ResolveRadioActionMethod "setGroup" o = RadioActionSetGroupMethodInfo
ResolveRadioActionMethod "setIconName" o = Gtk.Action.ActionSetIconNameMethodInfo
ResolveRadioActionMethod "setIsImportant" o = Gtk.Action.ActionSetIsImportantMethodInfo
ResolveRadioActionMethod "setLabel" o = Gtk.Action.ActionSetLabelMethodInfo
ResolveRadioActionMethod "setName" o = Gtk.Buildable.BuildableSetNameMethodInfo
ResolveRadioActionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveRadioActionMethod "setSensitive" o = Gtk.Action.ActionSetSensitiveMethodInfo
ResolveRadioActionMethod "setShortLabel" o = Gtk.Action.ActionSetShortLabelMethodInfo
ResolveRadioActionMethod "setStockId" o = Gtk.Action.ActionSetStockIdMethodInfo
ResolveRadioActionMethod "setTooltip" o = Gtk.Action.ActionSetTooltipMethodInfo
ResolveRadioActionMethod "setVisible" o = Gtk.Action.ActionSetVisibleMethodInfo
ResolveRadioActionMethod "setVisibleHorizontal" o = Gtk.Action.ActionSetVisibleHorizontalMethodInfo
ResolveRadioActionMethod "setVisibleVertical" o = Gtk.Action.ActionSetVisibleVerticalMethodInfo
ResolveRadioActionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRadioActionMethod t RadioAction, O.MethodInfo info RadioAction p) => O.IsLabelProxy t (RadioAction -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveRadioActionMethod t RadioAction, O.MethodInfo info RadioAction p) => O.IsLabel t (RadioAction -> 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
#endif
{-# DEPRECATED RadioActionChangedCallback ["(Since version 3.10)"] #-}
type RadioActionChangedCallback =
RadioAction
-> IO ()
noRadioActionChangedCallback :: Maybe RadioActionChangedCallback
noRadioActionChangedCallback = Nothing
type C_RadioActionChangedCallback =
Ptr () ->
Ptr RadioAction ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_RadioActionChangedCallback :: C_RadioActionChangedCallback -> IO (FunPtr C_RadioActionChangedCallback)
genClosure_RadioActionChanged :: RadioActionChangedCallback -> IO Closure
genClosure_RadioActionChanged cb = do
let cb' = wrap_RadioActionChangedCallback cb
mk_RadioActionChangedCallback cb' >>= newCClosure
wrap_RadioActionChangedCallback ::
RadioActionChangedCallback ->
C_RadioActionChangedCallback
wrap_RadioActionChangedCallback _cb _ current _ = do
current' <- (newObject RadioAction) current
_cb current'
onRadioActionChanged :: (IsRadioAction a, MonadIO m) => a -> RadioActionChangedCallback -> m SignalHandlerId
onRadioActionChanged obj cb = liftIO $ do
let cb' = wrap_RadioActionChangedCallback cb
cb'' <- mk_RadioActionChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' SignalConnectBefore
afterRadioActionChanged :: (IsRadioAction a, MonadIO m) => a -> RadioActionChangedCallback -> m SignalHandlerId
afterRadioActionChanged obj cb = liftIO $ do
let cb' = wrap_RadioActionChangedCallback cb
cb'' <- mk_RadioActionChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' SignalConnectAfter
getRadioActionCurrentValue :: (MonadIO m, IsRadioAction o) => o -> m Int32
getRadioActionCurrentValue obj = liftIO $ getObjectPropertyInt32 obj "current-value"
setRadioActionCurrentValue :: (MonadIO m, IsRadioAction o) => o -> Int32 -> m ()
setRadioActionCurrentValue obj val = liftIO $ setObjectPropertyInt32 obj "current-value" val
constructRadioActionCurrentValue :: (IsRadioAction o) => Int32 -> IO (GValueConstruct o)
constructRadioActionCurrentValue val = constructObjectPropertyInt32 "current-value" val
#if ENABLE_OVERLOADING
data RadioActionCurrentValuePropertyInfo
instance AttrInfo RadioActionCurrentValuePropertyInfo where
type AttrAllowedOps RadioActionCurrentValuePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint RadioActionCurrentValuePropertyInfo = (~) Int32
type AttrBaseTypeConstraint RadioActionCurrentValuePropertyInfo = IsRadioAction
type AttrGetType RadioActionCurrentValuePropertyInfo = Int32
type AttrLabel RadioActionCurrentValuePropertyInfo = "current-value"
type AttrOrigin RadioActionCurrentValuePropertyInfo = RadioAction
attrGet _ = getRadioActionCurrentValue
attrSet _ = setRadioActionCurrentValue
attrConstruct _ = constructRadioActionCurrentValue
attrClear _ = undefined
#endif
setRadioActionGroup :: (MonadIO m, IsRadioAction o, IsRadioAction a) => o -> a -> m ()
setRadioActionGroup obj val = liftIO $ setObjectPropertyObject obj "group" (Just val)
constructRadioActionGroup :: (IsRadioAction o, IsRadioAction a) => a -> IO (GValueConstruct o)
constructRadioActionGroup val = constructObjectPropertyObject "group" (Just val)
clearRadioActionGroup :: (MonadIO m, IsRadioAction o) => o -> m ()
clearRadioActionGroup obj = liftIO $ setObjectPropertyObject obj "group" (Nothing :: Maybe RadioAction)
#if ENABLE_OVERLOADING
data RadioActionGroupPropertyInfo
instance AttrInfo RadioActionGroupPropertyInfo where
type AttrAllowedOps RadioActionGroupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrClear]
type AttrSetTypeConstraint RadioActionGroupPropertyInfo = IsRadioAction
type AttrBaseTypeConstraint RadioActionGroupPropertyInfo = IsRadioAction
type AttrGetType RadioActionGroupPropertyInfo = ()
type AttrLabel RadioActionGroupPropertyInfo = "group"
type AttrOrigin RadioActionGroupPropertyInfo = RadioAction
attrGet _ = undefined
attrSet _ = setRadioActionGroup
attrConstruct _ = constructRadioActionGroup
attrClear _ = clearRadioActionGroup
#endif
getRadioActionValue :: (MonadIO m, IsRadioAction o) => o -> m Int32
getRadioActionValue obj = liftIO $ getObjectPropertyInt32 obj "value"
setRadioActionValue :: (MonadIO m, IsRadioAction o) => o -> Int32 -> m ()
setRadioActionValue obj val = liftIO $ setObjectPropertyInt32 obj "value" val
constructRadioActionValue :: (IsRadioAction o) => Int32 -> IO (GValueConstruct o)
constructRadioActionValue val = constructObjectPropertyInt32 "value" val
#if ENABLE_OVERLOADING
data RadioActionValuePropertyInfo
instance AttrInfo RadioActionValuePropertyInfo where
type AttrAllowedOps RadioActionValuePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint RadioActionValuePropertyInfo = (~) Int32
type AttrBaseTypeConstraint RadioActionValuePropertyInfo = IsRadioAction
type AttrGetType RadioActionValuePropertyInfo = Int32
type AttrLabel RadioActionValuePropertyInfo = "value"
type AttrOrigin RadioActionValuePropertyInfo = RadioAction
attrGet _ = getRadioActionValue
attrSet _ = setRadioActionValue
attrConstruct _ = constructRadioActionValue
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList RadioAction
type instance O.AttributeList RadioAction = RadioActionAttributeList
type RadioActionAttributeList = ('[ '("actionGroup", Gtk.Action.ActionActionGroupPropertyInfo), '("active", Gtk.ToggleAction.ToggleActionActivePropertyInfo), '("alwaysShowImage", Gtk.Action.ActionAlwaysShowImagePropertyInfo), '("currentValue", RadioActionCurrentValuePropertyInfo), '("drawAsRadio", Gtk.ToggleAction.ToggleActionDrawAsRadioPropertyInfo), '("gicon", Gtk.Action.ActionGiconPropertyInfo), '("group", RadioActionGroupPropertyInfo), '("hideIfEmpty", Gtk.Action.ActionHideIfEmptyPropertyInfo), '("iconName", Gtk.Action.ActionIconNamePropertyInfo), '("isImportant", Gtk.Action.ActionIsImportantPropertyInfo), '("label", Gtk.Action.ActionLabelPropertyInfo), '("name", Gtk.Action.ActionNamePropertyInfo), '("sensitive", Gtk.Action.ActionSensitivePropertyInfo), '("shortLabel", Gtk.Action.ActionShortLabelPropertyInfo), '("stockId", Gtk.Action.ActionStockIdPropertyInfo), '("tooltip", Gtk.Action.ActionTooltipPropertyInfo), '("value", RadioActionValuePropertyInfo), '("visible", Gtk.Action.ActionVisiblePropertyInfo), '("visibleHorizontal", Gtk.Action.ActionVisibleHorizontalPropertyInfo), '("visibleOverflown", Gtk.Action.ActionVisibleOverflownPropertyInfo), '("visibleVertical", Gtk.Action.ActionVisibleVerticalPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
radioActionCurrentValue :: AttrLabelProxy "currentValue"
radioActionCurrentValue = AttrLabelProxy
radioActionGroup :: AttrLabelProxy "group"
radioActionGroup = AttrLabelProxy
radioActionValue :: AttrLabelProxy "value"
radioActionValue = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
data RadioActionChangedSignalInfo
instance SignalInfo RadioActionChangedSignalInfo where
type HaskellCallbackType RadioActionChangedSignalInfo = RadioActionChangedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_RadioActionChangedCallback cb
cb'' <- mk_RadioActionChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' connectMode
type instance O.SignalList RadioAction = RadioActionSignalList
type RadioActionSignalList = ('[ '("activate", Gtk.Action.ActionActivateSignalInfo), '("changed", RadioActionChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("toggled", Gtk.ToggleAction.ToggleActionToggledSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_radio_action_new" gtk_radio_action_new ::
CString ->
CString ->
CString ->
CString ->
Int32 ->
IO (Ptr RadioAction)
{-# DEPRECATED radioActionNew ["(Since version 3.10)"] #-}
radioActionNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Int32
-> m RadioAction
radioActionNew name label tooltip stockId value = liftIO $ do
name' <- textToCString name
maybeLabel <- case label of
Nothing -> return nullPtr
Just jLabel -> do
jLabel' <- textToCString jLabel
return jLabel'
maybeTooltip <- case tooltip of
Nothing -> return nullPtr
Just jTooltip -> do
jTooltip' <- textToCString jTooltip
return jTooltip'
maybeStockId <- case stockId of
Nothing -> return nullPtr
Just jStockId -> do
jStockId' <- textToCString jStockId
return jStockId'
result <- gtk_radio_action_new name' maybeLabel maybeTooltip maybeStockId value
checkUnexpectedReturnNULL "radioActionNew" result
result' <- (wrapObject RadioAction) result
freeMem name'
freeMem maybeLabel
freeMem maybeTooltip
freeMem maybeStockId
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gtk_radio_action_get_current_value" gtk_radio_action_get_current_value ::
Ptr RadioAction ->
IO Int32
{-# DEPRECATED radioActionGetCurrentValue ["(Since version 3.10)"] #-}
radioActionGetCurrentValue ::
(B.CallStack.HasCallStack, MonadIO m, IsRadioAction a) =>
a
-> m Int32
radioActionGetCurrentValue action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_radio_action_get_current_value action'
touchManagedPtr action
return result
#if ENABLE_OVERLOADING
data RadioActionGetCurrentValueMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsRadioAction a) => O.MethodInfo RadioActionGetCurrentValueMethodInfo a signature where
overloadedMethod _ = radioActionGetCurrentValue
#endif
foreign import ccall "gtk_radio_action_get_group" gtk_radio_action_get_group ::
Ptr RadioAction ->
IO (Ptr (GSList (Ptr RadioAction)))
{-# DEPRECATED radioActionGetGroup ["(Since version 3.10)"] #-}
radioActionGetGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsRadioAction a) =>
a
-> m [RadioAction]
radioActionGetGroup action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_radio_action_get_group action'
result' <- unpackGSList result
result'' <- mapM (newObject RadioAction) result'
touchManagedPtr action
return result''
#if ENABLE_OVERLOADING
data RadioActionGetGroupMethodInfo
instance (signature ~ (m [RadioAction]), MonadIO m, IsRadioAction a) => O.MethodInfo RadioActionGetGroupMethodInfo a signature where
overloadedMethod _ = radioActionGetGroup
#endif
foreign import ccall "gtk_radio_action_join_group" gtk_radio_action_join_group ::
Ptr RadioAction ->
Ptr RadioAction ->
IO ()
{-# DEPRECATED radioActionJoinGroup ["(Since version 3.10)"] #-}
radioActionJoinGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsRadioAction a, IsRadioAction b) =>
a
-> Maybe (b)
-> m ()
radioActionJoinGroup action groupSource = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
maybeGroupSource <- case groupSource of
Nothing -> return nullPtr
Just jGroupSource -> do
jGroupSource' <- unsafeManagedPtrCastPtr jGroupSource
return jGroupSource'
gtk_radio_action_join_group action' maybeGroupSource
touchManagedPtr action
whenJust groupSource touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data RadioActionJoinGroupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRadioAction a, IsRadioAction b) => O.MethodInfo RadioActionJoinGroupMethodInfo a signature where
overloadedMethod _ = radioActionJoinGroup
#endif
foreign import ccall "gtk_radio_action_set_current_value" gtk_radio_action_set_current_value ::
Ptr RadioAction ->
Int32 ->
IO ()
{-# DEPRECATED radioActionSetCurrentValue ["(Since version 3.10)"] #-}
radioActionSetCurrentValue ::
(B.CallStack.HasCallStack, MonadIO m, IsRadioAction a) =>
a
-> Int32
-> m ()
radioActionSetCurrentValue action currentValue = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
gtk_radio_action_set_current_value action' currentValue
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data RadioActionSetCurrentValueMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsRadioAction a) => O.MethodInfo RadioActionSetCurrentValueMethodInfo a signature where
overloadedMethod _ = radioActionSetCurrentValue
#endif
foreign import ccall "gtk_radio_action_set_group" gtk_radio_action_set_group ::
Ptr RadioAction ->
Ptr (GSList (Ptr RadioAction)) ->
IO ()
{-# DEPRECATED radioActionSetGroup ["(Since version 3.10)"] #-}
radioActionSetGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsRadioAction a, IsRadioAction b) =>
a
-> [b]
-> m ()
radioActionSetGroup action group = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
group' <- mapM unsafeManagedPtrCastPtr group
group'' <- packGSList group'
gtk_radio_action_set_group action' group''
touchManagedPtr action
mapM_ touchManagedPtr group
g_slist_free group''
return ()
#if ENABLE_OVERLOADING
data RadioActionSetGroupMethodInfo
instance (signature ~ ([b] -> m ()), MonadIO m, IsRadioAction a, IsRadioAction b) => O.MethodInfo RadioActionSetGroupMethodInfo a signature where
overloadedMethod _ = radioActionSetGroup
#endif