{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Toplevel surfaces are sovereign windows that can be presented
-- to the user in various states (maximized, on all workspaces,
-- etc).
-- 
-- The GdkToplevelLayout struct contains information that
-- is necessary to do so, and is passed to 'GI.Gdk.Interfaces.Toplevel.toplevelPresent'.

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

module GI.Gdk.Structs.ToplevelLayout
    ( 

-- * Exported types
    ToplevelLayout(..)                      ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveToplevelLayoutMethod             ,
#endif


-- ** copy #method:copy#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutCopyMethodInfo            ,
#endif
    toplevelLayoutCopy                      ,


-- ** equal #method:equal#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutEqualMethodInfo           ,
#endif
    toplevelLayoutEqual                     ,


-- ** getFullscreen #method:getFullscreen#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutGetFullscreenMethodInfo   ,
#endif
    toplevelLayoutGetFullscreen             ,


-- ** getFullscreenMonitor #method:getFullscreenMonitor#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutGetFullscreenMonitorMethodInfo,
#endif
    toplevelLayoutGetFullscreenMonitor      ,


-- ** getMaximized #method:getMaximized#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutGetMaximizedMethodInfo    ,
#endif
    toplevelLayoutGetMaximized              ,


-- ** getMinHeight #method:getMinHeight#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutGetMinHeightMethodInfo    ,
#endif
    toplevelLayoutGetMinHeight              ,


-- ** getMinWidth #method:getMinWidth#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutGetMinWidthMethodInfo     ,
#endif
    toplevelLayoutGetMinWidth               ,


-- ** getResizable #method:getResizable#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutGetResizableMethodInfo    ,
#endif
    toplevelLayoutGetResizable              ,


-- ** new #method:new#

    toplevelLayoutNew                       ,


-- ** ref #method:ref#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutRefMethodInfo             ,
#endif
    toplevelLayoutRef                       ,


-- ** setFullscreen #method:setFullscreen#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutSetFullscreenMethodInfo   ,
#endif
    toplevelLayoutSetFullscreen             ,


-- ** setMaximized #method:setMaximized#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutSetMaximizedMethodInfo    ,
#endif
    toplevelLayoutSetMaximized              ,


-- ** setResizable #method:setResizable#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutSetResizableMethodInfo    ,
#endif
    toplevelLayoutSetResizable              ,


-- ** unref #method:unref#

#if defined(ENABLE_OVERLOADING)
    ToplevelLayoutUnrefMethodInfo           ,
#endif
    toplevelLayoutUnref                     ,




    ) 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.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 {-# SOURCE #-} qualified GI.Gdk.Objects.Monitor as Gdk.Monitor

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

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

foreign import ccall "gdk_toplevel_layout_get_type" c_gdk_toplevel_layout_get_type :: 
    IO GType

type instance O.ParentTypes ToplevelLayout = '[]
instance O.HasParentTypes ToplevelLayout

instance B.Types.TypedObject ToplevelLayout where
    glibType :: IO GType
glibType = IO GType
c_gdk_toplevel_layout_get_type

instance B.Types.GBoxed ToplevelLayout

-- | Convert 'ToplevelLayout' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue ToplevelLayout where
    toGValue :: ToplevelLayout -> IO GValue
toGValue ToplevelLayout
o = do
        GType
gtype <- IO GType
c_gdk_toplevel_layout_get_type
        ToplevelLayout -> (Ptr ToplevelLayout -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ToplevelLayout
o (GType
-> (GValue -> Ptr ToplevelLayout -> IO ())
-> Ptr ToplevelLayout
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr ToplevelLayout -> IO ()
forall a. GValue -> Ptr a -> IO ()
B.GValue.set_boxed)
        
    fromGValue :: GValue -> IO ToplevelLayout
fromGValue GValue
gv = do
        Ptr ToplevelLayout
ptr <- GValue -> IO (Ptr ToplevelLayout)
forall b. GValue -> IO (Ptr b)
B.GValue.get_boxed GValue
gv :: IO (Ptr ToplevelLayout)
        (ManagedPtr ToplevelLayout -> ToplevelLayout)
-> Ptr ToplevelLayout -> IO ToplevelLayout
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr ToplevelLayout -> ToplevelLayout
ToplevelLayout Ptr ToplevelLayout
ptr
        
    


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

-- method ToplevelLayout::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "min_width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the minimum width for the layout"
--                 , 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 for the layout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_layout_new" gdk_toplevel_layout_new :: 
    Int32 ->                                -- min_width : TBasicType TInt
    Int32 ->                                -- min_height : TBasicType TInt
    IO (Ptr ToplevelLayout)

-- | Create a toplevel layout description.
-- 
-- Used together with 'GI.Gdk.Interfaces.Toplevel.toplevelPresent' to describe
-- how a toplevel surface should be placed and behave on-screen.
-- 
-- The size is in ”application pixels”, not
-- ”device pixels” (see 'GI.Gdk.Objects.Surface.surfaceGetScaleFactor').
toplevelLayoutNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@minWidth@/: the minimum width for the layout
    -> Int32
    -- ^ /@minHeight@/: the minimum height for the layout
    -> m ToplevelLayout
    -- ^ __Returns:__ newly created instance of t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
toplevelLayoutNew :: Int32 -> Int32 -> m ToplevelLayout
toplevelLayoutNew Int32
minWidth Int32
minHeight = IO ToplevelLayout -> m ToplevelLayout
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ToplevelLayout -> m ToplevelLayout)
-> IO ToplevelLayout -> m ToplevelLayout
forall a b. (a -> b) -> a -> b
$ do
    Ptr ToplevelLayout
result <- Int32 -> Int32 -> IO (Ptr ToplevelLayout)
gdk_toplevel_layout_new Int32
minWidth Int32
minHeight
    Text -> Ptr ToplevelLayout -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"toplevelLayoutNew" Ptr ToplevelLayout
result
    ToplevelLayout
result' <- ((ManagedPtr ToplevelLayout -> ToplevelLayout)
-> Ptr ToplevelLayout -> IO ToplevelLayout
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ToplevelLayout -> ToplevelLayout
ToplevelLayout) Ptr ToplevelLayout
result
    ToplevelLayout -> IO ToplevelLayout
forall (m :: * -> *) a. Monad m => a -> m a
return ToplevelLayout
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method ToplevelLayout::copy
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_layout_copy" gdk_toplevel_layout_copy :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    IO (Ptr ToplevelLayout)

-- | Create a new t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout' and copy the contents of /@layout@/ into it.
toplevelLayoutCopy ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> m ToplevelLayout
    -- ^ __Returns:__ a copy of /@layout@/.
toplevelLayoutCopy :: ToplevelLayout -> m ToplevelLayout
toplevelLayoutCopy ToplevelLayout
layout = IO ToplevelLayout -> m ToplevelLayout
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ToplevelLayout -> m ToplevelLayout)
-> IO ToplevelLayout -> m ToplevelLayout
forall a b. (a -> b) -> a -> b
$ do
    Ptr ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    Ptr ToplevelLayout
result <- Ptr ToplevelLayout -> IO (Ptr ToplevelLayout)
gdk_toplevel_layout_copy Ptr ToplevelLayout
layout'
    Text -> Ptr ToplevelLayout -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"toplevelLayoutCopy" Ptr ToplevelLayout
result
    ToplevelLayout
result' <- ((ManagedPtr ToplevelLayout -> ToplevelLayout)
-> Ptr ToplevelLayout -> IO ToplevelLayout
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ToplevelLayout -> ToplevelLayout
ToplevelLayout) Ptr ToplevelLayout
result
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    ToplevelLayout -> IO ToplevelLayout
forall (m :: * -> *) a. Monad m => a -> m a
return ToplevelLayout
result'

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutCopyMethodInfo
instance (signature ~ (m ToplevelLayout), MonadIO m) => O.MethodInfo ToplevelLayoutCopyMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutCopy

#endif

-- method ToplevelLayout::equal
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "other"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "another #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_layout_equal" gdk_toplevel_layout_equal :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    Ptr ToplevelLayout ->                   -- other : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    IO CInt

-- | Check whether /@layout@/ and /@other@/ has identical layout properties.
toplevelLayoutEqual ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> ToplevelLayout
    -- ^ /@other@/: another t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@layout@/ and /@other@/ have identical layout properties,
    --     otherwise 'P.False'.
toplevelLayoutEqual :: ToplevelLayout -> ToplevelLayout -> m Bool
toplevelLayoutEqual ToplevelLayout
layout ToplevelLayout
other = 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 ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    Ptr ToplevelLayout
other' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
other
    CInt
result <- Ptr ToplevelLayout -> Ptr ToplevelLayout -> IO CInt
gdk_toplevel_layout_equal Ptr ToplevelLayout
layout' Ptr ToplevelLayout
other'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
other
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutEqualMethodInfo
instance (signature ~ (ToplevelLayout -> m Bool), MonadIO m) => O.MethodInfo ToplevelLayoutEqualMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutEqual

#endif

-- method ToplevelLayout::get_fullscreen
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_layout_get_fullscreen" gdk_toplevel_layout_get_fullscreen :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    IO CInt

-- | Returns whether the layout should cause the surface
-- to be fullscreen when presented.
toplevelLayoutGetFullscreen ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@layout@/ is fullscreen
toplevelLayoutGetFullscreen :: ToplevelLayout -> m Bool
toplevelLayoutGetFullscreen ToplevelLayout
layout = 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 ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    CInt
result <- Ptr ToplevelLayout -> IO CInt
gdk_toplevel_layout_get_fullscreen Ptr ToplevelLayout
layout'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutGetFullscreenMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo ToplevelLayoutGetFullscreenMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutGetFullscreen

#endif

-- method ToplevelLayout::get_fullscreen_monitor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Monitor" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_layout_get_fullscreen_monitor" gdk_toplevel_layout_get_fullscreen_monitor :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    IO (Ptr Gdk.Monitor.Monitor)

-- | Returns the monitor that the layout is fullscreening
-- the surface on.
toplevelLayoutGetFullscreenMonitor ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> m (Maybe Gdk.Monitor.Monitor)
    -- ^ __Returns:__ the monitor on which /@layout@/ fullscreens
toplevelLayoutGetFullscreenMonitor :: ToplevelLayout -> m (Maybe Monitor)
toplevelLayoutGetFullscreenMonitor ToplevelLayout
layout = IO (Maybe Monitor) -> m (Maybe Monitor)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Monitor) -> m (Maybe Monitor))
-> IO (Maybe Monitor) -> m (Maybe Monitor)
forall a b. (a -> b) -> a -> b
$ do
    Ptr ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    Ptr Monitor
result <- Ptr ToplevelLayout -> IO (Ptr Monitor)
gdk_toplevel_layout_get_fullscreen_monitor Ptr ToplevelLayout
layout'
    Maybe Monitor
maybeResult <- Ptr Monitor -> (Ptr Monitor -> IO Monitor) -> IO (Maybe Monitor)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Monitor
result ((Ptr Monitor -> IO Monitor) -> IO (Maybe Monitor))
-> (Ptr Monitor -> IO Monitor) -> IO (Maybe Monitor)
forall a b. (a -> b) -> a -> b
$ \Ptr Monitor
result' -> do
        Monitor
result'' <- ((ManagedPtr Monitor -> Monitor) -> Ptr Monitor -> IO Monitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Monitor -> Monitor
Gdk.Monitor.Monitor) Ptr Monitor
result'
        Monitor -> IO Monitor
forall (m :: * -> *) a. Monad m => a -> m a
return Monitor
result''
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    Maybe Monitor -> IO (Maybe Monitor)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Monitor
maybeResult

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutGetFullscreenMonitorMethodInfo
instance (signature ~ (m (Maybe Gdk.Monitor.Monitor)), MonadIO m) => O.MethodInfo ToplevelLayoutGetFullscreenMonitorMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutGetFullscreenMonitor

#endif

-- method ToplevelLayout::get_maximized
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_layout_get_maximized" gdk_toplevel_layout_get_maximized :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    IO CInt

-- | Returns whether the layout should present the
-- surface as maximized.
toplevelLayoutGetMaximized ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the layout is maximized
toplevelLayoutGetMaximized :: ToplevelLayout -> m Bool
toplevelLayoutGetMaximized ToplevelLayout
layout = 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 ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    CInt
result <- Ptr ToplevelLayout -> IO CInt
gdk_toplevel_layout_get_maximized Ptr ToplevelLayout
layout'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutGetMaximizedMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo ToplevelLayoutGetMaximizedMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutGetMaximized

#endif

-- method ToplevelLayout::get_min_height
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_layout_get_min_height" gdk_toplevel_layout_get_min_height :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    IO Int32

-- | Returns the minimum height of the given layout.
toplevelLayoutGetMinHeight ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> m Int32
    -- ^ __Returns:__ the minimum height of /@layout@/
toplevelLayoutGetMinHeight :: ToplevelLayout -> m Int32
toplevelLayoutGetMinHeight ToplevelLayout
layout = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    Int32
result <- Ptr ToplevelLayout -> IO Int32
gdk_toplevel_layout_get_min_height Ptr ToplevelLayout
layout'
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutGetMinHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo ToplevelLayoutGetMinHeightMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutGetMinHeight

#endif

-- method ToplevelLayout::get_min_width
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_layout_get_min_width" gdk_toplevel_layout_get_min_width :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    IO Int32

-- | Returns the minimum width of the given layout.
toplevelLayoutGetMinWidth ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> m Int32
    -- ^ __Returns:__ the minimum width of /@layout@/
toplevelLayoutGetMinWidth :: ToplevelLayout -> m Int32
toplevelLayoutGetMinWidth ToplevelLayout
layout = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    Int32
result <- Ptr ToplevelLayout -> IO Int32
gdk_toplevel_layout_get_min_width Ptr ToplevelLayout
layout'
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutGetMinWidthMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo ToplevelLayoutGetMinWidthMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutGetMinWidth

#endif

-- method ToplevelLayout::get_resizable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_layout_get_resizable" gdk_toplevel_layout_get_resizable :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    IO CInt

-- | Returns whether the layout should allow the user
-- to resize the surface.
toplevelLayoutGetResizable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the layout is resizable
toplevelLayoutGetResizable :: ToplevelLayout -> m Bool
toplevelLayoutGetResizable ToplevelLayout
layout = 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 ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    CInt
result <- Ptr ToplevelLayout -> IO CInt
gdk_toplevel_layout_get_resizable Ptr ToplevelLayout
layout'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutGetResizableMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo ToplevelLayoutGetResizableMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutGetResizable

#endif

-- method ToplevelLayout::ref
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_toplevel_layout_ref" gdk_toplevel_layout_ref :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    IO (Ptr ToplevelLayout)

-- | Increases the reference count of /@layout@/.
toplevelLayoutRef ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> m ToplevelLayout
    -- ^ __Returns:__ the same /@layout@/
toplevelLayoutRef :: ToplevelLayout -> m ToplevelLayout
toplevelLayoutRef ToplevelLayout
layout = IO ToplevelLayout -> m ToplevelLayout
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ToplevelLayout -> m ToplevelLayout)
-> IO ToplevelLayout -> m ToplevelLayout
forall a b. (a -> b) -> a -> b
$ do
    Ptr ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    Ptr ToplevelLayout
result <- Ptr ToplevelLayout -> IO (Ptr ToplevelLayout)
gdk_toplevel_layout_ref Ptr ToplevelLayout
layout'
    Text -> Ptr ToplevelLayout -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"toplevelLayoutRef" Ptr ToplevelLayout
result
    ToplevelLayout
result' <- ((ManagedPtr ToplevelLayout -> ToplevelLayout)
-> Ptr ToplevelLayout -> IO ToplevelLayout
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ToplevelLayout -> ToplevelLayout
ToplevelLayout) Ptr ToplevelLayout
result
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    ToplevelLayout -> IO ToplevelLayout
forall (m :: * -> *) a. Monad m => a -> m a
return ToplevelLayout
result'

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutRefMethodInfo
instance (signature ~ (m ToplevelLayout), MonadIO m) => O.MethodInfo ToplevelLayoutRefMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutRef

#endif

-- method ToplevelLayout::set_fullscreen
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "fullscreen"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to fullscreen the surface"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "monitor"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Monitor" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the monitor to fullscreen on"
--                 , 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_layout_set_fullscreen" gdk_toplevel_layout_set_fullscreen :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    CInt ->                                 -- fullscreen : TBasicType TBoolean
    Ptr Gdk.Monitor.Monitor ->              -- monitor : TInterface (Name {namespace = "Gdk", name = "Monitor"})
    IO ()

-- | Sets whether the layout should cause the surface
-- to be fullscreen when presented.
toplevelLayoutSetFullscreen ::
    (B.CallStack.HasCallStack, MonadIO m, Gdk.Monitor.IsMonitor a) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> Bool
    -- ^ /@fullscreen@/: 'P.True' to fullscreen the surface
    -> Maybe (a)
    -- ^ /@monitor@/: the monitor to fullscreen on
    -> m ()
toplevelLayoutSetFullscreen :: ToplevelLayout -> Bool -> Maybe a -> m ()
toplevelLayoutSetFullscreen ToplevelLayout
layout Bool
fullscreen Maybe a
monitor = 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 ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    let fullscreen' :: CInt
fullscreen' = (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
fullscreen
    Ptr Monitor
maybeMonitor <- case Maybe a
monitor of
        Maybe a
Nothing -> Ptr Monitor -> IO (Ptr Monitor)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Monitor
forall a. Ptr a
nullPtr
        Just a
jMonitor -> do
            Ptr Monitor
jMonitor' <- a -> IO (Ptr Monitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jMonitor
            Ptr Monitor -> IO (Ptr Monitor)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Monitor
jMonitor'
    Ptr ToplevelLayout -> CInt -> Ptr Monitor -> IO ()
gdk_toplevel_layout_set_fullscreen Ptr ToplevelLayout
layout' CInt
fullscreen' Ptr Monitor
maybeMonitor
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
monitor a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutSetFullscreenMethodInfo
instance (signature ~ (Bool -> Maybe (a) -> m ()), MonadIO m, Gdk.Monitor.IsMonitor a) => O.MethodInfo ToplevelLayoutSetFullscreenMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutSetFullscreen

#endif

-- method ToplevelLayout::set_maximized
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "maximized"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to maximize" , 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_layout_set_maximized" gdk_toplevel_layout_set_maximized :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    CInt ->                                 -- maximized : TBasicType TBoolean
    IO ()

-- | Sets whether the layout should cause the surface
-- to be maximized when presented.
toplevelLayoutSetMaximized ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> Bool
    -- ^ /@maximized@/: 'P.True' to maximize
    -> m ()
toplevelLayoutSetMaximized :: ToplevelLayout -> Bool -> m ()
toplevelLayoutSetMaximized ToplevelLayout
layout Bool
maximized = 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 ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    let maximized' :: CInt
maximized' = (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
maximized
    Ptr ToplevelLayout -> CInt -> IO ()
gdk_toplevel_layout_set_maximized Ptr ToplevelLayout
layout' CInt
maximized'
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutSetMaximizedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m) => O.MethodInfo ToplevelLayoutSetMaximizedMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutSetMaximized

#endif

-- method ToplevelLayout::set_resizable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "resizable"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to allow resizing"
--                 , 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_layout_set_resizable" gdk_toplevel_layout_set_resizable :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    CInt ->                                 -- resizable : TBasicType TBoolean
    IO ()

-- | Sets whether the layout should allow the user
-- to resize the surface after it has been presented.
toplevelLayoutSetResizable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> Bool
    -- ^ /@resizable@/: 'P.True' to allow resizing
    -> m ()
toplevelLayoutSetResizable :: ToplevelLayout -> Bool -> m ()
toplevelLayoutSetResizable ToplevelLayout
layout Bool
resizable = 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 ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    let resizable' :: CInt
resizable' = (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
resizable
    Ptr ToplevelLayout -> CInt -> IO ()
gdk_toplevel_layout_set_resizable Ptr ToplevelLayout
layout' CInt
resizable'
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutSetResizableMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m) => O.MethodInfo ToplevelLayoutSetResizableMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutSetResizable

#endif

-- method ToplevelLayout::unref
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ToplevelLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkToplevelLayout"
--                 , 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_layout_unref" gdk_toplevel_layout_unref :: 
    Ptr ToplevelLayout ->                   -- layout : TInterface (Name {namespace = "Gdk", name = "ToplevelLayout"})
    IO ()

-- | Decreases the reference count of /@layout@/.
toplevelLayoutUnref ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ToplevelLayout
    -- ^ /@layout@/: a t'GI.Gdk.Structs.ToplevelLayout.ToplevelLayout'
    -> m ()
toplevelLayoutUnref :: ToplevelLayout -> m ()
toplevelLayoutUnref ToplevelLayout
layout = 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 ToplevelLayout
layout' <- ToplevelLayout -> IO (Ptr ToplevelLayout)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ToplevelLayout
layout
    Ptr ToplevelLayout -> IO ()
gdk_toplevel_layout_unref Ptr ToplevelLayout
layout'
    ToplevelLayout -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ToplevelLayout
layout
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ToplevelLayoutUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo ToplevelLayoutUnrefMethodInfo ToplevelLayout signature where
    overloadedMethod = toplevelLayoutUnref

#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveToplevelLayoutMethod (t :: Symbol) (o :: *) :: * where
    ResolveToplevelLayoutMethod "copy" o = ToplevelLayoutCopyMethodInfo
    ResolveToplevelLayoutMethod "equal" o = ToplevelLayoutEqualMethodInfo
    ResolveToplevelLayoutMethod "ref" o = ToplevelLayoutRefMethodInfo
    ResolveToplevelLayoutMethod "unref" o = ToplevelLayoutUnrefMethodInfo
    ResolveToplevelLayoutMethod "getFullscreen" o = ToplevelLayoutGetFullscreenMethodInfo
    ResolveToplevelLayoutMethod "getFullscreenMonitor" o = ToplevelLayoutGetFullscreenMonitorMethodInfo
    ResolveToplevelLayoutMethod "getMaximized" o = ToplevelLayoutGetMaximizedMethodInfo
    ResolveToplevelLayoutMethod "getMinHeight" o = ToplevelLayoutGetMinHeightMethodInfo
    ResolveToplevelLayoutMethod "getMinWidth" o = ToplevelLayoutGetMinWidthMethodInfo
    ResolveToplevelLayoutMethod "getResizable" o = ToplevelLayoutGetResizableMethodInfo
    ResolveToplevelLayoutMethod "setFullscreen" o = ToplevelLayoutSetFullscreenMethodInfo
    ResolveToplevelLayoutMethod "setMaximized" o = ToplevelLayoutSetMaximizedMethodInfo
    ResolveToplevelLayoutMethod "setResizable" o = ToplevelLayoutSetResizableMethodInfo
    ResolveToplevelLayoutMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveToplevelLayoutMethod t ToplevelLayout, O.MethodInfo info ToplevelLayout p) => OL.IsLabel t (ToplevelLayout -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif