{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The @GdkToplevelSize@ struct contains information that is useful
-- to compute the size of a toplevel.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gdk.Structs.ToplevelSize
    ( 

-- * Exported types
    ToplevelSize(..)                        ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- /None/.
-- 
-- ==== Getters
-- [getBounds]("GI.Gdk.Structs.ToplevelSize#g:method:getBounds").
-- 
-- ==== Setters
-- [setMinSize]("GI.Gdk.Structs.ToplevelSize#g:method:setMinSize"), [setShadowWidth]("GI.Gdk.Structs.ToplevelSize#g:method:setShadowWidth"), [setSize]("GI.Gdk.Structs.ToplevelSize#g:method:setSize").

#if defined(ENABLE_OVERLOADING)
    ResolveToplevelSizeMethod               ,
#endif

-- ** getBounds #method:getBounds#

#if defined(ENABLE_OVERLOADING)
    ToplevelSizeGetBoundsMethodInfo         ,
#endif
    toplevelSizeGetBounds                   ,


-- ** setMinSize #method:setMinSize#

#if defined(ENABLE_OVERLOADING)
    ToplevelSizeSetMinSizeMethodInfo        ,
#endif
    toplevelSizeSetMinSize                  ,


-- ** setShadowWidth #method:setShadowWidth#

#if defined(ENABLE_OVERLOADING)
    ToplevelSizeSetShadowWidthMethodInfo    ,
#endif
    toplevelSizeSetShadowWidth              ,


-- ** setSize #method:setSize#

#if defined(ENABLE_OVERLOADING)
    ToplevelSizeSetSizeMethodInfo           ,
#endif
    toplevelSizeSetSize                     ,




    ) 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.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.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


-- | Memory-managed wrapper type.
newtype ToplevelSize = ToplevelSize (SP.ManagedPtr ToplevelSize)
    deriving (ToplevelSize -> ToplevelSize -> Bool
(ToplevelSize -> ToplevelSize -> Bool)
-> (ToplevelSize -> ToplevelSize -> Bool) -> Eq ToplevelSize
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ToplevelSize -> ToplevelSize -> Bool
$c/= :: ToplevelSize -> ToplevelSize -> Bool
== :: ToplevelSize -> ToplevelSize -> Bool
$c== :: ToplevelSize -> ToplevelSize -> Bool
Eq)

instance SP.ManagedPtrNewtype ToplevelSize where
    toManagedPtr :: ToplevelSize -> ManagedPtr ToplevelSize
toManagedPtr (ToplevelSize ManagedPtr ToplevelSize
p) = ManagedPtr ToplevelSize
p

-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
instance BoxedPtr ToplevelSize where
    boxedPtrCopy :: ToplevelSize -> IO ToplevelSize
boxedPtrCopy = ToplevelSize -> IO ToplevelSize
forall (m :: * -> *) a. Monad m => a -> m a
return
    boxedPtrFree :: ToplevelSize -> IO ()
boxedPtrFree = \ToplevelSize
_x -> () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ToplevelSize
type instance O.AttributeList ToplevelSize = ToplevelSizeAttributeList
type ToplevelSizeAttributeList = ('[ ] :: [(Symbol, *)])
#endif

-- method ToplevelSize::get_bounds
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "size"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelSize" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `GdkToplevelSize`"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bounds_width"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for width"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "bounds_height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for height"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_size_get_bounds" gdk_toplevel_size_get_bounds :: 
    Ptr ToplevelSize ->                     -- size : TInterface (Name {namespace = "Gdk", name = "ToplevelSize"})
    Ptr Int32 ->                            -- bounds_width : TBasicType TInt
    Ptr Int32 ->                            -- bounds_height : TBasicType TInt
    IO ()

-- | Retrieves the bounds the toplevel is placed within.
-- 
-- The bounds represent the largest size a toplevel may have while still being
-- able to fit within some type of boundary. Depending on the backend, this may
-- be equivalent to the dimensions of the work area or the monitor on which the
-- window is being presented on, or something else that limits the way a
-- toplevel can be presented.
toplevelSizeGetBounds ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelSize
    -- ^ /@size@/: a @GdkToplevelSize@
    -> m ((Int32, Int32))
toplevelSizeGetBounds :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ToplevelSize -> m (Int32, Int32)
toplevelSizeGetBounds ToplevelSize
size = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr ToplevelSize
size' <- ToplevelSize -> IO (Ptr ToplevelSize)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelSize
size
    Ptr Int32
boundsWidth <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
boundsHeight <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr ToplevelSize -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_toplevel_size_get_bounds Ptr ToplevelSize
size' Ptr Int32
boundsWidth Ptr Int32
boundsHeight
    Int32
boundsWidth' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
boundsWidth
    Int32
boundsHeight' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
boundsHeight
    ToplevelSize -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelSize
size
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
boundsWidth
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
boundsHeight
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
boundsWidth', Int32
boundsHeight')

#if defined(ENABLE_OVERLOADING)
data ToplevelSizeGetBoundsMethodInfo
instance (signature ~ (m ((Int32, Int32))), MonadIO m) => O.OverloadedMethod ToplevelSizeGetBoundsMethodInfo ToplevelSize signature where
    overloadedMethod = toplevelSizeGetBounds

instance O.OverloadedMethodInfo ToplevelSizeGetBoundsMethodInfo ToplevelSize where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gdk.Structs.ToplevelSize.toplevelSizeGetBounds",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.4/docs/GI-Gdk-Structs-ToplevelSize.html#v:toplevelSizeGetBounds"
        })


#endif

-- method ToplevelSize::set_min_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "size"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelSize" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `GdkToplevelSize`"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "min_width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the minimum width" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "min_height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the minimum height" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_size_set_min_size" gdk_toplevel_size_set_min_size :: 
    Ptr ToplevelSize ->                     -- size : TInterface (Name {namespace = "Gdk", name = "ToplevelSize"})
    Int32 ->                                -- min_width : TBasicType TInt
    Int32 ->                                -- min_height : TBasicType TInt
    IO ()

-- | Sets the minimum size of the toplevel.
-- 
-- The minimum size corresponds to the limitations the toplevel can be shrunk
-- to, without resulting in incorrect painting. A user of a @GdkToplevel@ should
-- calculate these given both the existing size, and the bounds retrieved from
-- the @GdkToplevelSize@ object.
-- 
-- The minimum size should be within the bounds (see
-- 'GI.Gdk.Structs.ToplevelSize.toplevelSizeGetBounds').
toplevelSizeSetMinSize ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelSize
    -- ^ /@size@/: a @GdkToplevelSize@
    -> Int32
    -- ^ /@minWidth@/: the minimum width
    -> Int32
    -- ^ /@minHeight@/: the minimum height
    -> m ()
toplevelSizeSetMinSize :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ToplevelSize -> Int32 -> Int32 -> m ()
toplevelSizeSetMinSize ToplevelSize
size Int32
minWidth Int32
minHeight = 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 ToplevelSize
size' <- ToplevelSize -> IO (Ptr ToplevelSize)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelSize
size
    Ptr ToplevelSize -> Int32 -> Int32 -> IO ()
gdk_toplevel_size_set_min_size Ptr ToplevelSize
size' Int32
minWidth Int32
minHeight
    ToplevelSize -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelSize
size
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ToplevelSizeSetMinSizeMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m) => O.OverloadedMethod ToplevelSizeSetMinSizeMethodInfo ToplevelSize signature where
    overloadedMethod = toplevelSizeSetMinSize

instance O.OverloadedMethodInfo ToplevelSizeSetMinSizeMethodInfo ToplevelSize where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gdk.Structs.ToplevelSize.toplevelSizeSetMinSize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.4/docs/GI-Gdk-Structs-ToplevelSize.html#v:toplevelSizeSetMinSize"
        })


#endif

-- method ToplevelSize::set_shadow_width
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "size"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelSize" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `GdkToplevelSize`"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "left"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "width of the left part of the shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "right"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "width of the right part of the shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "top"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "height of the top part of the shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bottom"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "height of the bottom part of the shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_size_set_shadow_width" gdk_toplevel_size_set_shadow_width :: 
    Ptr ToplevelSize ->                     -- size : TInterface (Name {namespace = "Gdk", name = "ToplevelSize"})
    Int32 ->                                -- left : TBasicType TInt
    Int32 ->                                -- right : TBasicType TInt
    Int32 ->                                -- top : TBasicType TInt
    Int32 ->                                -- bottom : TBasicType TInt
    IO ()

-- | Sets the shadows size of the toplevel.
-- 
-- The shadow width corresponds to the part of the computed surface size
-- that would consist of the shadow margin surrounding the window, would
-- there be any.
toplevelSizeSetShadowWidth ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelSize
    -- ^ /@size@/: a @GdkToplevelSize@
    -> Int32
    -- ^ /@left@/: width of the left part of the shadow
    -> Int32
    -- ^ /@right@/: width of the right part of the shadow
    -> Int32
    -- ^ /@top@/: height of the top part of the shadow
    -> Int32
    -- ^ /@bottom@/: height of the bottom part of the shadow
    -> m ()
toplevelSizeSetShadowWidth :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ToplevelSize -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
toplevelSizeSetShadowWidth ToplevelSize
size Int32
left Int32
right Int32
top Int32
bottom = 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 ToplevelSize
size' <- ToplevelSize -> IO (Ptr ToplevelSize)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelSize
size
    Ptr ToplevelSize -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
gdk_toplevel_size_set_shadow_width Ptr ToplevelSize
size' Int32
left Int32
right Int32
top Int32
bottom
    ToplevelSize -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelSize
size
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ToplevelSizeSetShadowWidthMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m) => O.OverloadedMethod ToplevelSizeSetShadowWidthMethodInfo ToplevelSize signature where
    overloadedMethod = toplevelSizeSetShadowWidth

instance O.OverloadedMethodInfo ToplevelSizeSetShadowWidthMethodInfo ToplevelSize where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gdk.Structs.ToplevelSize.toplevelSizeSetShadowWidth",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.4/docs/GI-Gdk-Structs-ToplevelSize.html#v:toplevelSizeSetShadowWidth"
        })


#endif

-- method ToplevelSize::set_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "size"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelSize" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `GdkToplevelSize`"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the width" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the height" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_size_set_size" gdk_toplevel_size_set_size :: 
    Ptr ToplevelSize ->                     -- size : TInterface (Name {namespace = "Gdk", name = "ToplevelSize"})
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO ()

-- | Sets the size the toplevel prefers to be resized to.
-- 
-- The size should be within the bounds (see
-- 'GI.Gdk.Structs.ToplevelSize.toplevelSizeGetBounds'). The set size should
-- be considered as a hint, and should not be assumed to be
-- respected by the windowing system, or backend.
toplevelSizeSetSize ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelSize
    -- ^ /@size@/: a @GdkToplevelSize@
    -> Int32
    -- ^ /@width@/: the width
    -> Int32
    -- ^ /@height@/: the height
    -> m ()
toplevelSizeSetSize :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ToplevelSize -> Int32 -> Int32 -> m ()
toplevelSizeSetSize ToplevelSize
size Int32
width Int32
height = 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 ToplevelSize
size' <- ToplevelSize -> IO (Ptr ToplevelSize)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelSize
size
    Ptr ToplevelSize -> Int32 -> Int32 -> IO ()
gdk_toplevel_size_set_size Ptr ToplevelSize
size' Int32
width Int32
height
    ToplevelSize -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelSize
size
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ToplevelSizeSetSizeMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m) => O.OverloadedMethod ToplevelSizeSetSizeMethodInfo ToplevelSize signature where
    overloadedMethod = toplevelSizeSetSize

instance O.OverloadedMethodInfo ToplevelSizeSetSizeMethodInfo ToplevelSize where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gdk.Structs.ToplevelSize.toplevelSizeSetSize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.4/docs/GI-Gdk-Structs-ToplevelSize.html#v:toplevelSizeSetSize"
        })


#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveToplevelSizeMethod (t :: Symbol) (o :: *) :: * where
    ResolveToplevelSizeMethod "getBounds" o = ToplevelSizeGetBoundsMethodInfo
    ResolveToplevelSizeMethod "setMinSize" o = ToplevelSizeSetMinSizeMethodInfo
    ResolveToplevelSizeMethod "setShadowWidth" o = ToplevelSizeSetShadowWidthMethodInfo
    ResolveToplevelSizeMethod "setSize" o = ToplevelSizeSetSizeMethodInfo
    ResolveToplevelSizeMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveToplevelSizeMethod t ToplevelSize, O.OverloadedMethod info ToplevelSize p) => OL.IsLabel t (ToplevelSize -> 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 ~ ResolveToplevelSizeMethod t ToplevelSize, O.OverloadedMethod info ToplevelSize p, R.HasField t ToplevelSize p) => R.HasField t ToplevelSize p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveToplevelSizeMethod t ToplevelSize, O.OverloadedMethodInfo info ToplevelSize) => OL.IsLabel t (O.MethodProxy info ToplevelSize) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif