module GI.Gtk.Objects.SizeGroup
(
SizeGroup(..) ,
IsSizeGroup ,
toSizeGroup ,
noSizeGroup ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
SizeGroupAddWidgetMethodInfo ,
#endif
sizeGroupAddWidget ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
SizeGroupGetIgnoreHiddenMethodInfo ,
#endif
sizeGroupGetIgnoreHidden ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
SizeGroupGetModeMethodInfo ,
#endif
sizeGroupGetMode ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
SizeGroupGetWidgetsMethodInfo ,
#endif
sizeGroupGetWidgets ,
sizeGroupNew ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
SizeGroupRemoveWidgetMethodInfo ,
#endif
sizeGroupRemoveWidget ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
SizeGroupSetIgnoreHiddenMethodInfo ,
#endif
sizeGroupSetIgnoreHidden ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
SizeGroupSetModeMethodInfo ,
#endif
sizeGroupSetMode ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
SizeGroupIgnoreHiddenPropertyInfo ,
#endif
constructSizeGroupIgnoreHidden ,
getSizeGroupIgnoreHidden ,
setSizeGroupIgnoreHidden ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
sizeGroupIgnoreHidden ,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
SizeGroupModePropertyInfo ,
#endif
constructSizeGroupMode ,
getSizeGroupMode ,
setSizeGroupMode ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
sizeGroupMode ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.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.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 qualified GI.Gtk.Enums as Gtk.Enums
import qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype SizeGroup = SizeGroup (ManagedPtr SizeGroup)
foreign import ccall "gtk_size_group_get_type"
c_gtk_size_group_get_type :: IO GType
instance GObject SizeGroup where
gobjectType _ = c_gtk_size_group_get_type
class GObject o => IsSizeGroup o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError SizeGroup a) =>
IsSizeGroup a
#endif
instance IsSizeGroup SizeGroup
instance GObject.Object.IsObject SizeGroup
instance Gtk.Buildable.IsBuildable SizeGroup
toSizeGroup :: (MonadIO m, IsSizeGroup o) => o -> m SizeGroup
toSizeGroup = liftIO . unsafeCastTo SizeGroup
noSizeGroup :: Maybe SizeGroup
noSizeGroup = Nothing
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type family ResolveSizeGroupMethod (t :: Symbol) (o :: *) :: * where
ResolveSizeGroupMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
ResolveSizeGroupMethod "addWidget" o = SizeGroupAddWidgetMethodInfo
ResolveSizeGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSizeGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSizeGroupMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
ResolveSizeGroupMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
ResolveSizeGroupMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
ResolveSizeGroupMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
ResolveSizeGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSizeGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSizeGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSizeGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSizeGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSizeGroupMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
ResolveSizeGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSizeGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSizeGroupMethod "removeWidget" o = SizeGroupRemoveWidgetMethodInfo
ResolveSizeGroupMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveSizeGroupMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
ResolveSizeGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSizeGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSizeGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSizeGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSizeGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSizeGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSizeGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSizeGroupMethod "getIgnoreHidden" o = SizeGroupGetIgnoreHiddenMethodInfo
ResolveSizeGroupMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
ResolveSizeGroupMethod "getMode" o = SizeGroupGetModeMethodInfo
ResolveSizeGroupMethod "getName" o = Gtk.Buildable.BuildableGetNameMethodInfo
ResolveSizeGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSizeGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSizeGroupMethod "getWidgets" o = SizeGroupGetWidgetsMethodInfo
ResolveSizeGroupMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
ResolveSizeGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSizeGroupMethod "setIgnoreHidden" o = SizeGroupSetIgnoreHiddenMethodInfo
ResolveSizeGroupMethod "setMode" o = SizeGroupSetModeMethodInfo
ResolveSizeGroupMethod "setName" o = Gtk.Buildable.BuildableSetNameMethodInfo
ResolveSizeGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSizeGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSizeGroupMethod t SizeGroup, O.MethodInfo info SizeGroup p) => O.IsLabelProxy t (SizeGroup -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveSizeGroupMethod t SizeGroup, O.MethodInfo info SizeGroup p) => O.IsLabel t (SizeGroup -> 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
getSizeGroupIgnoreHidden :: (MonadIO m, IsSizeGroup o) => o -> m Bool
getSizeGroupIgnoreHidden obj = liftIO $ getObjectPropertyBool obj "ignore-hidden"
setSizeGroupIgnoreHidden :: (MonadIO m, IsSizeGroup o) => o -> Bool -> m ()
setSizeGroupIgnoreHidden obj val = liftIO $ setObjectPropertyBool obj "ignore-hidden" val
constructSizeGroupIgnoreHidden :: (IsSizeGroup o) => Bool -> IO (GValueConstruct o)
constructSizeGroupIgnoreHidden val = constructObjectPropertyBool "ignore-hidden" val
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data SizeGroupIgnoreHiddenPropertyInfo
instance AttrInfo SizeGroupIgnoreHiddenPropertyInfo where
type AttrAllowedOps SizeGroupIgnoreHiddenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint SizeGroupIgnoreHiddenPropertyInfo = (~) Bool
type AttrBaseTypeConstraint SizeGroupIgnoreHiddenPropertyInfo = IsSizeGroup
type AttrGetType SizeGroupIgnoreHiddenPropertyInfo = Bool
type AttrLabel SizeGroupIgnoreHiddenPropertyInfo = "ignore-hidden"
type AttrOrigin SizeGroupIgnoreHiddenPropertyInfo = SizeGroup
attrGet _ = getSizeGroupIgnoreHidden
attrSet _ = setSizeGroupIgnoreHidden
attrConstruct _ = constructSizeGroupIgnoreHidden
attrClear _ = undefined
#endif
getSizeGroupMode :: (MonadIO m, IsSizeGroup o) => o -> m Gtk.Enums.SizeGroupMode
getSizeGroupMode obj = liftIO $ getObjectPropertyEnum obj "mode"
setSizeGroupMode :: (MonadIO m, IsSizeGroup o) => o -> Gtk.Enums.SizeGroupMode -> m ()
setSizeGroupMode obj val = liftIO $ setObjectPropertyEnum obj "mode" val
constructSizeGroupMode :: (IsSizeGroup o) => Gtk.Enums.SizeGroupMode -> IO (GValueConstruct o)
constructSizeGroupMode val = constructObjectPropertyEnum "mode" val
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data SizeGroupModePropertyInfo
instance AttrInfo SizeGroupModePropertyInfo where
type AttrAllowedOps SizeGroupModePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint SizeGroupModePropertyInfo = (~) Gtk.Enums.SizeGroupMode
type AttrBaseTypeConstraint SizeGroupModePropertyInfo = IsSizeGroup
type AttrGetType SizeGroupModePropertyInfo = Gtk.Enums.SizeGroupMode
type AttrLabel SizeGroupModePropertyInfo = "mode"
type AttrOrigin SizeGroupModePropertyInfo = SizeGroup
attrGet _ = getSizeGroupMode
attrSet _ = setSizeGroupMode
attrConstruct _ = constructSizeGroupMode
attrClear _ = undefined
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
instance O.HasAttributeList SizeGroup
type instance O.AttributeList SizeGroup = SizeGroupAttributeList
type SizeGroupAttributeList = ('[ '("ignoreHidden", SizeGroupIgnoreHiddenPropertyInfo), '("mode", SizeGroupModePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
sizeGroupIgnoreHidden :: AttrLabelProxy "ignoreHidden"
sizeGroupIgnoreHidden = AttrLabelProxy
sizeGroupMode :: AttrLabelProxy "mode"
sizeGroupMode = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type instance O.SignalList SizeGroup = SizeGroupSignalList
type SizeGroupSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_size_group_new" gtk_size_group_new ::
CUInt ->
IO (Ptr SizeGroup)
sizeGroupNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gtk.Enums.SizeGroupMode
-> m SizeGroup
sizeGroupNew mode = liftIO $ do
let mode' = (fromIntegral . fromEnum) mode
result <- gtk_size_group_new mode'
checkUnexpectedReturnNULL "sizeGroupNew" result
result' <- (wrapObject SizeGroup) result
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#endif
foreign import ccall "gtk_size_group_add_widget" gtk_size_group_add_widget ::
Ptr SizeGroup ->
Ptr Gtk.Widget.Widget ->
IO ()
sizeGroupAddWidget ::
(B.CallStack.HasCallStack, MonadIO m, IsSizeGroup a, Gtk.Widget.IsWidget b) =>
a
-> b
-> m ()
sizeGroupAddWidget sizeGroup widget = liftIO $ do
sizeGroup' <- unsafeManagedPtrCastPtr sizeGroup
widget' <- unsafeManagedPtrCastPtr widget
gtk_size_group_add_widget sizeGroup' widget'
touchManagedPtr sizeGroup
touchManagedPtr widget
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data SizeGroupAddWidgetMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsSizeGroup a, Gtk.Widget.IsWidget b) => O.MethodInfo SizeGroupAddWidgetMethodInfo a signature where
overloadedMethod _ = sizeGroupAddWidget
#endif
foreign import ccall "gtk_size_group_get_ignore_hidden" gtk_size_group_get_ignore_hidden ::
Ptr SizeGroup ->
IO CInt
sizeGroupGetIgnoreHidden ::
(B.CallStack.HasCallStack, MonadIO m, IsSizeGroup a) =>
a
-> m Bool
sizeGroupGetIgnoreHidden sizeGroup = liftIO $ do
sizeGroup' <- unsafeManagedPtrCastPtr sizeGroup
result <- gtk_size_group_get_ignore_hidden sizeGroup'
let result' = (/= 0) result
touchManagedPtr sizeGroup
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data SizeGroupGetIgnoreHiddenMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSizeGroup a) => O.MethodInfo SizeGroupGetIgnoreHiddenMethodInfo a signature where
overloadedMethod _ = sizeGroupGetIgnoreHidden
#endif
foreign import ccall "gtk_size_group_get_mode" gtk_size_group_get_mode ::
Ptr SizeGroup ->
IO CUInt
sizeGroupGetMode ::
(B.CallStack.HasCallStack, MonadIO m, IsSizeGroup a) =>
a
-> m Gtk.Enums.SizeGroupMode
sizeGroupGetMode sizeGroup = liftIO $ do
sizeGroup' <- unsafeManagedPtrCastPtr sizeGroup
result <- gtk_size_group_get_mode sizeGroup'
let result' = (toEnum . fromIntegral) result
touchManagedPtr sizeGroup
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data SizeGroupGetModeMethodInfo
instance (signature ~ (m Gtk.Enums.SizeGroupMode), MonadIO m, IsSizeGroup a) => O.MethodInfo SizeGroupGetModeMethodInfo a signature where
overloadedMethod _ = sizeGroupGetMode
#endif
foreign import ccall "gtk_size_group_get_widgets" gtk_size_group_get_widgets ::
Ptr SizeGroup ->
IO (Ptr (GSList (Ptr Gtk.Widget.Widget)))
sizeGroupGetWidgets ::
(B.CallStack.HasCallStack, MonadIO m, IsSizeGroup a) =>
a
-> m [Gtk.Widget.Widget]
sizeGroupGetWidgets sizeGroup = liftIO $ do
sizeGroup' <- unsafeManagedPtrCastPtr sizeGroup
result <- gtk_size_group_get_widgets sizeGroup'
result' <- unpackGSList result
result'' <- mapM (newObject Gtk.Widget.Widget) result'
touchManagedPtr sizeGroup
return result''
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data SizeGroupGetWidgetsMethodInfo
instance (signature ~ (m [Gtk.Widget.Widget]), MonadIO m, IsSizeGroup a) => O.MethodInfo SizeGroupGetWidgetsMethodInfo a signature where
overloadedMethod _ = sizeGroupGetWidgets
#endif
foreign import ccall "gtk_size_group_remove_widget" gtk_size_group_remove_widget ::
Ptr SizeGroup ->
Ptr Gtk.Widget.Widget ->
IO ()
sizeGroupRemoveWidget ::
(B.CallStack.HasCallStack, MonadIO m, IsSizeGroup a, Gtk.Widget.IsWidget b) =>
a
-> b
-> m ()
sizeGroupRemoveWidget sizeGroup widget = liftIO $ do
sizeGroup' <- unsafeManagedPtrCastPtr sizeGroup
widget' <- unsafeManagedPtrCastPtr widget
gtk_size_group_remove_widget sizeGroup' widget'
touchManagedPtr sizeGroup
touchManagedPtr widget
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data SizeGroupRemoveWidgetMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsSizeGroup a, Gtk.Widget.IsWidget b) => O.MethodInfo SizeGroupRemoveWidgetMethodInfo a signature where
overloadedMethod _ = sizeGroupRemoveWidget
#endif
foreign import ccall "gtk_size_group_set_ignore_hidden" gtk_size_group_set_ignore_hidden ::
Ptr SizeGroup ->
CInt ->
IO ()
sizeGroupSetIgnoreHidden ::
(B.CallStack.HasCallStack, MonadIO m, IsSizeGroup a) =>
a
-> Bool
-> m ()
sizeGroupSetIgnoreHidden sizeGroup ignoreHidden = liftIO $ do
sizeGroup' <- unsafeManagedPtrCastPtr sizeGroup
let ignoreHidden' = (fromIntegral . fromEnum) ignoreHidden
gtk_size_group_set_ignore_hidden sizeGroup' ignoreHidden'
touchManagedPtr sizeGroup
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data SizeGroupSetIgnoreHiddenMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSizeGroup a) => O.MethodInfo SizeGroupSetIgnoreHiddenMethodInfo a signature where
overloadedMethod _ = sizeGroupSetIgnoreHidden
#endif
foreign import ccall "gtk_size_group_set_mode" gtk_size_group_set_mode ::
Ptr SizeGroup ->
CUInt ->
IO ()
sizeGroupSetMode ::
(B.CallStack.HasCallStack, MonadIO m, IsSizeGroup a) =>
a
-> Gtk.Enums.SizeGroupMode
-> m ()
sizeGroupSetMode sizeGroup mode = liftIO $ do
sizeGroup' <- unsafeManagedPtrCastPtr sizeGroup
let mode' = (fromIntegral . fromEnum) mode
gtk_size_group_set_mode sizeGroup' mode'
touchManagedPtr sizeGroup
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data SizeGroupSetModeMethodInfo
instance (signature ~ (Gtk.Enums.SizeGroupMode -> m ()), MonadIO m, IsSizeGroup a) => O.MethodInfo SizeGroupSetModeMethodInfo a signature where
overloadedMethod _ = sizeGroupSetMode
#endif