{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.SizeGroup
    ( 
    SizeGroup(..)                           ,
    IsSizeGroup                             ,
    toSizeGroup                             ,
 
#if defined(ENABLE_OVERLOADING)
    ResolveSizeGroupMethod                  ,
#endif
#if defined(ENABLE_OVERLOADING)
    SizeGroupAddWidgetMethodInfo            ,
#endif
    sizeGroupAddWidget                      ,
#if defined(ENABLE_OVERLOADING)
    SizeGroupGetIgnoreHiddenMethodInfo      ,
#endif
    sizeGroupGetIgnoreHidden                ,
#if defined(ENABLE_OVERLOADING)
    SizeGroupGetModeMethodInfo              ,
#endif
    sizeGroupGetMode                        ,
#if defined(ENABLE_OVERLOADING)
    SizeGroupGetWidgetsMethodInfo           ,
#endif
    sizeGroupGetWidgets                     ,
    sizeGroupNew                            ,
#if defined(ENABLE_OVERLOADING)
    SizeGroupRemoveWidgetMethodInfo         ,
#endif
    sizeGroupRemoveWidget                   ,
#if defined(ENABLE_OVERLOADING)
    SizeGroupSetIgnoreHiddenMethodInfo      ,
#endif
    sizeGroupSetIgnoreHidden                ,
#if defined(ENABLE_OVERLOADING)
    SizeGroupSetModeMethodInfo              ,
#endif
    sizeGroupSetMode                        ,
 
#if defined(ENABLE_OVERLOADING)
    SizeGroupIgnoreHiddenPropertyInfo       ,
#endif
    constructSizeGroupIgnoreHidden          ,
    getSizeGroupIgnoreHidden                ,
    setSizeGroupIgnoreHidden                ,
#if defined(ENABLE_OVERLOADING)
    sizeGroupIgnoreHidden                   ,
#endif
#if defined(ENABLE_OVERLOADING)
    SizeGroupModePropertyInfo               ,
#endif
    constructSizeGroupMode                  ,
    getSizeGroupMode                        ,
    setSizeGroupMode                        ,
#if defined(ENABLE_OVERLOADING)
    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.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.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
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
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype SizeGroup = SizeGroup (ManagedPtr SizeGroup)
    deriving (SizeGroup -> SizeGroup -> Bool
(SizeGroup -> SizeGroup -> Bool)
-> (SizeGroup -> SizeGroup -> Bool) -> Eq SizeGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SizeGroup -> SizeGroup -> Bool
$c/= :: SizeGroup -> SizeGroup -> Bool
== :: SizeGroup -> SizeGroup -> Bool
$c== :: SizeGroup -> SizeGroup -> Bool
Eq)
foreign import ccall "gtk_size_group_get_type"
    c_gtk_size_group_get_type :: IO GType
instance GObject SizeGroup where
    gobjectType :: IO GType
gobjectType = IO GType
c_gtk_size_group_get_type
    
instance B.GValue.IsGValue SizeGroup where
    toGValue :: SizeGroup -> IO GValue
toGValue SizeGroup
o = do
        GType
gtype <- IO GType
c_gtk_size_group_get_type
        SizeGroup -> (Ptr SizeGroup -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr SizeGroup
o (GType
-> (GValue -> Ptr SizeGroup -> IO ()) -> Ptr SizeGroup -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr SizeGroup -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO SizeGroup
fromGValue GValue
gv = do
        Ptr SizeGroup
ptr <- GValue -> IO (Ptr SizeGroup)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr SizeGroup)
        (ManagedPtr SizeGroup -> SizeGroup)
-> Ptr SizeGroup -> IO SizeGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr SizeGroup -> SizeGroup
SizeGroup Ptr SizeGroup
ptr
        
    
class (GObject o, O.IsDescendantOf SizeGroup o) => IsSizeGroup o
instance (GObject o, O.IsDescendantOf SizeGroup o) => IsSizeGroup o
instance O.HasParentTypes SizeGroup
type instance O.ParentTypes SizeGroup = '[GObject.Object.Object, Gtk.Buildable.Buildable]
toSizeGroup :: (MonadIO m, IsSizeGroup o) => o -> m SizeGroup
toSizeGroup :: o -> m SizeGroup
toSizeGroup = IO SizeGroup -> m SizeGroup
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SizeGroup -> m SizeGroup)
-> (o -> IO SizeGroup) -> o -> m SizeGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr SizeGroup -> SizeGroup) -> o -> IO SizeGroup
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr SizeGroup -> SizeGroup
SizeGroup
#if defined(ENABLE_OVERLOADING)
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 "getv" o = GObject.Object.ObjectGetvMethodInfo
    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 "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 "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    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) => OL.IsLabel t (SizeGroup -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif
#endif
   
   
   
getSizeGroupIgnoreHidden :: (MonadIO m, IsSizeGroup o) => o -> m Bool
getSizeGroupIgnoreHidden :: o -> m Bool
getSizeGroupIgnoreHidden o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"ignore-hidden"
setSizeGroupIgnoreHidden :: (MonadIO m, IsSizeGroup o) => o -> Bool -> m ()
setSizeGroupIgnoreHidden :: o -> Bool -> m ()
setSizeGroupIgnoreHidden o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"ignore-hidden" Bool
val
constructSizeGroupIgnoreHidden :: (IsSizeGroup o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructSizeGroupIgnoreHidden :: Bool -> m (GValueConstruct o)
constructSizeGroupIgnoreHidden Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"ignore-hidden" Bool
val
#if defined(ENABLE_OVERLOADING)
data SizeGroupIgnoreHiddenPropertyInfo
instance AttrInfo SizeGroupIgnoreHiddenPropertyInfo where
    type AttrAllowedOps SizeGroupIgnoreHiddenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SizeGroupIgnoreHiddenPropertyInfo = IsSizeGroup
    type AttrSetTypeConstraint SizeGroupIgnoreHiddenPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint SizeGroupIgnoreHiddenPropertyInfo = (~) Bool
    type AttrTransferType SizeGroupIgnoreHiddenPropertyInfo = Bool
    type AttrGetType SizeGroupIgnoreHiddenPropertyInfo = Bool
    type AttrLabel SizeGroupIgnoreHiddenPropertyInfo = "ignore-hidden"
    type AttrOrigin SizeGroupIgnoreHiddenPropertyInfo = SizeGroup
    attrGet = getSizeGroupIgnoreHidden
    attrSet = setSizeGroupIgnoreHidden
    attrTransfer _ v = do
        return v
    attrConstruct = constructSizeGroupIgnoreHidden
    attrClear = undefined
#endif
   
   
   
getSizeGroupMode :: (MonadIO m, IsSizeGroup o) => o -> m Gtk.Enums.SizeGroupMode
getSizeGroupMode :: o -> m SizeGroupMode
getSizeGroupMode o
obj = IO SizeGroupMode -> m SizeGroupMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SizeGroupMode -> m SizeGroupMode)
-> IO SizeGroupMode -> m SizeGroupMode
forall a b. (a -> b) -> a -> b
$ o -> String -> IO SizeGroupMode
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"mode"
setSizeGroupMode :: (MonadIO m, IsSizeGroup o) => o -> Gtk.Enums.SizeGroupMode -> m ()
setSizeGroupMode :: o -> SizeGroupMode -> m ()
setSizeGroupMode o
obj SizeGroupMode
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> SizeGroupMode -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"mode" SizeGroupMode
val
constructSizeGroupMode :: (IsSizeGroup o, MIO.MonadIO m) => Gtk.Enums.SizeGroupMode -> m (GValueConstruct o)
constructSizeGroupMode :: SizeGroupMode -> m (GValueConstruct o)
constructSizeGroupMode SizeGroupMode
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> SizeGroupMode -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"mode" SizeGroupMode
val
#if defined(ENABLE_OVERLOADING)
data SizeGroupModePropertyInfo
instance AttrInfo SizeGroupModePropertyInfo where
    type AttrAllowedOps SizeGroupModePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SizeGroupModePropertyInfo = IsSizeGroup
    type AttrSetTypeConstraint SizeGroupModePropertyInfo = (~) Gtk.Enums.SizeGroupMode
    type AttrTransferTypeConstraint SizeGroupModePropertyInfo = (~) Gtk.Enums.SizeGroupMode
    type AttrTransferType SizeGroupModePropertyInfo = Gtk.Enums.SizeGroupMode
    type AttrGetType SizeGroupModePropertyInfo = Gtk.Enums.SizeGroupMode
    type AttrLabel SizeGroupModePropertyInfo = "mode"
    type AttrOrigin SizeGroupModePropertyInfo = SizeGroup
    attrGet = getSizeGroupMode
    attrSet = setSizeGroupMode
    attrTransfer _ v = do
        return v
    attrConstruct = constructSizeGroupMode
    attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SizeGroup
type instance O.AttributeList SizeGroup = SizeGroupAttributeList
type SizeGroupAttributeList = ('[ '("ignoreHidden", SizeGroupIgnoreHiddenPropertyInfo), '("mode", SizeGroupModePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
sizeGroupIgnoreHidden :: AttrLabelProxy "ignoreHidden"
sizeGroupIgnoreHidden = AttrLabelProxy
sizeGroupMode :: AttrLabelProxy "mode"
sizeGroupMode = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
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 :: SizeGroupMode -> m SizeGroup
sizeGroupNew SizeGroupMode
mode = IO SizeGroup -> m SizeGroup
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SizeGroup -> m SizeGroup) -> IO SizeGroup -> m SizeGroup
forall a b. (a -> b) -> a -> b
$ do
    let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (SizeGroupMode -> Int) -> SizeGroupMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SizeGroupMode -> Int
forall a. Enum a => a -> Int
fromEnum) SizeGroupMode
mode
    Ptr SizeGroup
result <- CUInt -> IO (Ptr SizeGroup)
gtk_size_group_new CUInt
mode'
    Text -> Ptr SizeGroup -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"sizeGroupNew" Ptr SizeGroup
result
    SizeGroup
result' <- ((ManagedPtr SizeGroup -> SizeGroup)
-> Ptr SizeGroup -> IO SizeGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr SizeGroup -> SizeGroup
SizeGroup) Ptr SizeGroup
result
    SizeGroup -> IO SizeGroup
forall (m :: * -> *) a. Monad m => a -> m a
return SizeGroup
result'
#if defined(ENABLE_OVERLOADING)
#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 :: a -> b -> m ()
sizeGroupAddWidget a
sizeGroup b
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SizeGroup
sizeGroup' <- a -> IO (Ptr SizeGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sizeGroup
    Ptr Widget
widget' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
widget
    Ptr SizeGroup -> Ptr Widget -> IO ()
gtk_size_group_add_widget Ptr SizeGroup
sizeGroup' Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sizeGroup
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
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
{-# DEPRECATED sizeGroupGetIgnoreHidden ["(Since version 3.22)","Measuring the size of hidden widgets has not worked","    reliably for a long time. In most cases, they will report a size","    of 0 nowadays, and thus, their size will not affect the other","    size group members. In effect, size groups will always operate","    as if this property was 'P.True'. Use a t'GI.Gtk.Objects.Stack.Stack' instead to hide","    widgets while still having their size taken into account."] #-}
sizeGroupGetIgnoreHidden ::
    (B.CallStack.HasCallStack, MonadIO m, IsSizeGroup a) =>
    a
    
    -> m Bool
    
sizeGroupGetIgnoreHidden :: a -> m Bool
sizeGroupGetIgnoreHidden a
sizeGroup = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr SizeGroup
sizeGroup' <- a -> IO (Ptr SizeGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sizeGroup
    CInt
result <- Ptr SizeGroup -> IO CInt
gtk_size_group_get_ignore_hidden Ptr SizeGroup
sizeGroup'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sizeGroup
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
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 :: a -> m SizeGroupMode
sizeGroupGetMode a
sizeGroup = IO SizeGroupMode -> m SizeGroupMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SizeGroupMode -> m SizeGroupMode)
-> IO SizeGroupMode -> m SizeGroupMode
forall a b. (a -> b) -> a -> b
$ do
    Ptr SizeGroup
sizeGroup' <- a -> IO (Ptr SizeGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sizeGroup
    CUInt
result <- Ptr SizeGroup -> IO CUInt
gtk_size_group_get_mode Ptr SizeGroup
sizeGroup'
    let result' :: SizeGroupMode
result' = (Int -> SizeGroupMode
forall a. Enum a => Int -> a
toEnum (Int -> SizeGroupMode) -> (CUInt -> Int) -> CUInt -> SizeGroupMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sizeGroup
    SizeGroupMode -> IO SizeGroupMode
forall (m :: * -> *) a. Monad m => a -> m a
return SizeGroupMode
result'
#if defined(ENABLE_OVERLOADING)
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 :: a -> m [Widget]
sizeGroupGetWidgets a
sizeGroup = IO [Widget] -> m [Widget]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Widget] -> m [Widget]) -> IO [Widget] -> m [Widget]
forall a b. (a -> b) -> a -> b
$ do
    Ptr SizeGroup
sizeGroup' <- a -> IO (Ptr SizeGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sizeGroup
    Ptr (GSList (Ptr Widget))
result <- Ptr SizeGroup -> IO (Ptr (GSList (Ptr Widget)))
gtk_size_group_get_widgets Ptr SizeGroup
sizeGroup'
    [Ptr Widget]
result' <- Ptr (GSList (Ptr Widget)) -> IO [Ptr Widget]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr Widget))
result
    [Widget]
result'' <- (Ptr Widget -> IO Widget) -> [Ptr Widget] -> IO [Widget]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) [Ptr Widget]
result'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sizeGroup
    [Widget] -> IO [Widget]
forall (m :: * -> *) a. Monad m => a -> m a
return [Widget]
result''
#if defined(ENABLE_OVERLOADING)
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 :: a -> b -> m ()
sizeGroupRemoveWidget a
sizeGroup b
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SizeGroup
sizeGroup' <- a -> IO (Ptr SizeGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sizeGroup
    Ptr Widget
widget' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
widget
    Ptr SizeGroup -> Ptr Widget -> IO ()
gtk_size_group_remove_widget Ptr SizeGroup
sizeGroup' Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sizeGroup
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
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 ()
{-# DEPRECATED sizeGroupSetIgnoreHidden ["(Since version 3.22)","Measuring the size of hidden widgets has not worked","    reliably for a long time. In most cases, they will report a size","    of 0 nowadays, and thus, their size will not affect the other","    size group members. In effect, size groups will always operate","    as if this property was 'P.True'. Use a t'GI.Gtk.Objects.Stack.Stack' instead to hide","    widgets while still having their size taken into account."] #-}
sizeGroupSetIgnoreHidden ::
    (B.CallStack.HasCallStack, MonadIO m, IsSizeGroup a) =>
    a
    
    -> Bool
    
    
    -> m ()
sizeGroupSetIgnoreHidden :: a -> Bool -> m ()
sizeGroupSetIgnoreHidden a
sizeGroup Bool
ignoreHidden = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SizeGroup
sizeGroup' <- a -> IO (Ptr SizeGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sizeGroup
    let ignoreHidden' :: CInt
ignoreHidden' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
ignoreHidden
    Ptr SizeGroup -> CInt -> IO ()
gtk_size_group_set_ignore_hidden Ptr SizeGroup
sizeGroup' CInt
ignoreHidden'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sizeGroup
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
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 :: a -> SizeGroupMode -> m ()
sizeGroupSetMode a
sizeGroup SizeGroupMode
mode = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SizeGroup
sizeGroup' <- a -> IO (Ptr SizeGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sizeGroup
    let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (SizeGroupMode -> Int) -> SizeGroupMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SizeGroupMode -> Int
forall a. Enum a => a -> Int
fromEnum) SizeGroupMode
mode
    Ptr SizeGroup -> CUInt -> IO ()
gtk_size_group_set_mode Ptr SizeGroup
sizeGroup' CUInt
mode'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sizeGroup
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SizeGroupSetModeMethodInfo
instance (signature ~ (Gtk.Enums.SizeGroupMode -> m ()), MonadIO m, IsSizeGroup a) => O.MethodInfo SizeGroupSetModeMethodInfo a signature where
    overloadedMethod = sizeGroupSetMode
#endif