

-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

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

module GI.GtkLayerShell.Functions
    ( 

 -- * Methods


-- ** autoExclusiveZoneEnable #method:autoExclusiveZoneEnable#

    autoExclusiveZoneEnable                 ,


-- ** autoExclusiveZoneIsEnabled #method:autoExclusiveZoneIsEnabled#

    autoExclusiveZoneIsEnabled              ,


-- ** getAnchor #method:getAnchor#

    getAnchor                               ,


-- ** getExclusiveZone #method:getExclusiveZone#

    getExclusiveZone                        ,


-- ** getKeyboardInteractivity #method:getKeyboardInteractivity#

    getKeyboardInteractivity                ,


-- ** getKeyboardMode #method:getKeyboardMode#

    getKeyboardMode                         ,


-- ** getLayer #method:getLayer#

    getLayer                                ,


-- ** getMajorVersion #method:getMajorVersion#

    getMajorVersion                         ,


-- ** getMargin #method:getMargin#

    getMargin                               ,


-- ** getMicroVersion #method:getMicroVersion#

    getMicroVersion                         ,


-- ** getMinorVersion #method:getMinorVersion#

    getMinorVersion                         ,


-- ** getMonitor #method:getMonitor#

    getMonitor                              ,


-- ** getNamespace #method:getNamespace#

    getNamespace                            ,


-- ** getProtocolVersion #method:getProtocolVersion#

    getProtocolVersion                      ,


-- ** getRespectClose #method:getRespectClose#

    getRespectClose                         ,


-- ** getZwlrLayerSurfaceV1 #method:getZwlrLayerSurfaceV1#

    getZwlrLayerSurfaceV1                   ,


-- ** initForWindow #method:initForWindow#

    initForWindow                           ,


-- ** isLayerWindow #method:isLayerWindow#

    isLayerWindow                           ,


-- ** isSupported #method:isSupported#

    isSupported                             ,


-- ** setAnchor #method:setAnchor#

    setAnchor                               ,


-- ** setExclusiveZone #method:setExclusiveZone#

    setExclusiveZone                        ,


-- ** setKeyboardInteractivity #method:setKeyboardInteractivity#

    setKeyboardInteractivity                ,


-- ** setKeyboardMode #method:setKeyboardMode#

    setKeyboardMode                         ,


-- ** setLayer #method:setLayer#

    setLayer                                ,


-- ** setMargin #method:setMargin#

    setMargin                               ,


-- ** setMonitor #method:setMonitor#

    setMonitor                              ,


-- ** setNamespace #method:setNamespace#

    setNamespace                            ,


-- ** setRespectClose #method:setRespectClose#

    setRespectClose                         ,


-- ** tryForceCommit #method:tryForceCommit#

    tryForceCommit                          ,




    ) 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.GHashTable as B.GHT
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.Kind as DK
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
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.Gdk.Objects.Monitor as Gdk.Monitor
import qualified GI.Gtk.Objects.Window as Gtk.Window
import {-# SOURCE #-} qualified GI.GtkLayerShell.Enums as GtkLayerShell.Enums

#else
import qualified GI.Gdk.Objects.Monitor as Gdk.Monitor
import qualified GI.Gtk.Objects.Window as Gtk.Window
import {-# SOURCE #-} qualified GI.GtkLayerShell.Enums as GtkLayerShell.Enums

#endif

-- function try_force_commit
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_try_force_commit" gtk_layer_try_force_commit :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO ()

-- | Commits a surface state if there\'s no pending commit scheduled by the GTK.
-- You almost never need to call this; the only known case is when the surface is in a state
-- where it does not receive frame callbacks and the regular deferred commit mechanism
-- is unavailable.
-- 
-- /Since: 0.9/
tryForceCommit ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m ()
tryForceCommit window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    gtk_layer_try_force_commit window'
    touchManagedPtr window
    return ()


-- function set_respect_close
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "respect_close"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "If to forward the .closed event to GTK."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_set_respect_close" gtk_layer_set_respect_close :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    CInt ->                                 -- respect_close : TBasicType TBoolean
    IO ()

-- | Compositors may send the @zwlr_layer_surface_v1.closed@ event in some cases (such as
-- when an output is destroyed). Prior to v0.10 this always triggered a GTK @delete-event@
-- signal, which would destroy the window if not intercepted by application code. In v0.10+
-- this behavior is disabled by default, and can be turned back on by calling this
-- function with 'P.True'. To handle the @.closed@ event without destroying your window
-- turn respect_close on and connect a @delete-event@ listener that returns 'P.True'.
-- 
-- /Since: 0.10/
setRespectClose ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> Bool
    -- ^ /@respectClose@/: If to forward the .closed event to GTK.
    -> m ()
setRespectClose window respectClose = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    let respectClose' = (P.fromIntegral . P.fromEnum) respectClose
    gtk_layer_set_respect_close window' respectClose'
    touchManagedPtr window
    return ()


-- function set_namespace
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name_space"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The namespace of this layer surface."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_set_namespace" gtk_layer_set_namespace :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    CString ->                              -- name_space : TBasicType TUTF8
    IO ()

-- | Set the \"namespace\" of the surface.
-- 
-- No one is quite sure what this is for, but it probably should be something generic
-- (\"panel\", \"osk\", etc). The /@nameSpace@/ string is copied, and caller maintains
-- ownership of original. If the window is currently mapped, it will get remapped so
-- the change can take effect.
-- 
-- Default is \"gtk-layer-shell\" (which will be used if set to 'P.Nothing')
setNamespace ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> T.Text
    -- ^ /@nameSpace@/: The namespace of this layer surface.
    -> m ()
setNamespace window nameSpace = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    nameSpace' <- textToCString nameSpace
    gtk_layer_set_namespace window' nameSpace'
    touchManagedPtr window
    freeMem nameSpace'
    return ()


-- function set_monitor
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "monitor"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Monitor" }
--           , argCType = Just "GdkMonitor*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The output this layer surface will be placed on (%NULL to let the compositor decide)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_set_monitor" gtk_layer_set_monitor :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    Ptr Gdk.Monitor.Monitor ->              -- monitor : TInterface (Name {namespace = "Gdk", name = "Monitor"})
    IO ()

-- | Set the output for the window to be placed on, or 'P.Nothing' to let the compositor choose.
-- If the window is currently mapped, it will get remapped so the change can take effect.
-- 
-- Default is 'P.Nothing'
setMonitor ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a, Gdk.Monitor.IsMonitor b) =>
    a
    -- ^ /@window@/: A layer surface.
    -> b
    -- ^ /@monitor@/: The output this layer surface will be placed on ('P.Nothing' to let the compositor decide).
    -> m ()
setMonitor window monitor = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    monitor' <- unsafeManagedPtrCastPtr monitor
    gtk_layer_set_monitor window' monitor'
    touchManagedPtr window
    touchManagedPtr monitor
    return ()


-- function set_margin
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "edge"
--           , argType =
--               TInterface Name { namespace = "GtkLayerShell" , name = "Edge" }
--           , argCType = Just "GtkLayerShellEdge"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The #GtkLayerShellEdge for which to set the margin."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin_size"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The margin for @edge to be set."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_set_margin" gtk_layer_set_margin :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    CUInt ->                                -- edge : TInterface (Name {namespace = "GtkLayerShell", name = "Edge"})
    Int32 ->                                -- margin_size : TBasicType TInt
    IO ()

-- | Set the margin for a specific /@edge@/ of a /@window@/. Effects both surface\'s distance from
-- the edge and its exclusive zone size (if auto exclusive zone enabled).
-- 
-- Default is 0 for each t'GI.GtkLayerShell.Enums.Edge'
setMargin ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> GtkLayerShell.Enums.Edge
    -- ^ /@edge@/: The t'GI.GtkLayerShell.Enums.Edge' for which to set the margin.
    -> Int32
    -- ^ /@marginSize@/: The margin for /@edge@/ to be set.
    -> m ()
setMargin window edge marginSize = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    let edge' = (fromIntegral . fromEnum) edge
    gtk_layer_set_margin window' edge' marginSize
    touchManagedPtr window
    return ()


-- function set_layer
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "layer"
--           , argType =
--               TInterface Name { namespace = "GtkLayerShell" , name = "Layer" }
--           , argCType = Just "GtkLayerShellLayer"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The layer on which this surface appears."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_set_layer" gtk_layer_set_layer :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    CUInt ->                                -- layer : TInterface (Name {namespace = "GtkLayerShell", name = "Layer"})
    IO ()

-- | Set the \"layer\" on which the surface appears (controls if it is over top of or below other surfaces). The layer may
-- be changed on-the-fly in the current version of the layer shell protocol, but on compositors that only support an
-- older version the /@window@/ is remapped so the change can take effect.
-- 
-- Default is 'GI.GtkLayerShell.Enums.LayerTop'
setLayer ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> GtkLayerShell.Enums.Layer
    -- ^ /@layer@/: The layer on which this surface appears.
    -> m ()
setLayer window layer = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    let layer' = (fromIntegral . fromEnum) layer
    gtk_layer_set_layer window' layer'
    touchManagedPtr window
    return ()


-- function set_keyboard_mode
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mode"
--           , argType =
--               TInterface
--                 Name { namespace = "GtkLayerShell" , name = "KeyboardMode" }
--           , argCType = Just "GtkLayerShellKeyboardMode"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The type of keyboard interactivity requested."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_set_keyboard_mode" gtk_layer_set_keyboard_mode :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    CUInt ->                                -- mode : TInterface (Name {namespace = "GtkLayerShell", name = "KeyboardMode"})
    IO ()

-- | Sets if\/when /@window@/ should receive keyboard events from the compositor, see
-- GtkLayerShellKeyboardMode for details.
-- 
-- Default is 'GI.GtkLayerShell.Enums.KeyboardModeNone'
-- 
-- /Since: 0.6/
setKeyboardMode ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> GtkLayerShell.Enums.KeyboardMode
    -- ^ /@mode@/: The type of keyboard interactivity requested.
    -> m ()
setKeyboardMode window mode = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    let mode' = (fromIntegral . fromEnum) mode
    gtk_layer_set_keyboard_mode window' mode'
    touchManagedPtr window
    return ()


-- function set_keyboard_interactivity
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "interactivity"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Whether the layer surface should receive keyboard events."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_set_keyboard_interactivity" gtk_layer_set_keyboard_interactivity :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    CInt ->                                 -- interactivity : TBasicType TBoolean
    IO ()

{-# DEPRECATED setKeyboardInteractivity ["(Since version 0.6)","Use gtk_layer_set_keyboard_mode () instead."] #-}
-- | Whether the /@window@/ should receive keyboard events from the compositor.
-- 
-- Default is 'P.False'
setKeyboardInteractivity ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> Bool
    -- ^ /@interactivity@/: Whether the layer surface should receive keyboard events.
    -> m ()
setKeyboardInteractivity window interactivity = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    let interactivity' = (P.fromIntegral . P.fromEnum) interactivity
    gtk_layer_set_keyboard_interactivity window' interactivity'
    touchManagedPtr window
    return ()


-- function set_exclusive_zone
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "exclusive_zone"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The size of the exclusive zone."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_set_exclusive_zone" gtk_layer_set_exclusive_zone :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    Int32 ->                                -- exclusive_zone : TBasicType TInt
    IO ()

-- | Has no effect unless the surface is anchored to an edge. Requests that the compositor
-- does not place other surfaces within the given exclusive zone of the anchored edge.
-- For example, a panel can request to not be covered by maximized windows. See
-- wlr-layer-shell-unstable-v1.xml for details.
-- 
-- Default is 0
setExclusiveZone ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> Int32
    -- ^ /@exclusiveZone@/: The size of the exclusive zone.
    -> m ()
setExclusiveZone window exclusiveZone = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    gtk_layer_set_exclusive_zone window' exclusiveZone
    touchManagedPtr window
    return ()


-- function set_anchor
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "edge"
--           , argType =
--               TInterface Name { namespace = "GtkLayerShell" , name = "Edge" }
--           , argCType = Just "GtkLayerShellEdge"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "A #GtkLayerShellEdge this layer surface may be anchored to."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "anchor_to_edge"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Whether or not to anchor this layer surface to @edge."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_set_anchor" gtk_layer_set_anchor :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    CUInt ->                                -- edge : TInterface (Name {namespace = "GtkLayerShell", name = "Edge"})
    CInt ->                                 -- anchor_to_edge : TBasicType TBoolean
    IO ()

-- | Set whether /@window@/ should be anchored to /@edge@/.
-- * If two perpendicular edges are anchored, the surface with be anchored to that corner
-- * If two opposite edges are anchored, the window will be stretched across the screen in that direction
-- 
-- 
-- Default is 'P.False' for each t'GI.GtkLayerShell.Enums.Edge'
setAnchor ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> GtkLayerShell.Enums.Edge
    -- ^ /@edge@/: A t'GI.GtkLayerShell.Enums.Edge' this layer surface may be anchored to.
    -> Bool
    -- ^ /@anchorToEdge@/: Whether or not to anchor this layer surface to /@edge@/.
    -> m ()
setAnchor window edge anchorToEdge = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    let edge' = (fromIntegral . fromEnum) edge
    let anchorToEdge' = (P.fromIntegral . P.fromEnum) anchorToEdge
    gtk_layer_set_anchor window' edge' anchorToEdge'
    touchManagedPtr window
    return ()


-- function is_supported
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_is_supported" gtk_layer_is_supported :: 
    IO CInt

-- | May block for a Wayland roundtrip the first time it\'s called.
-- 
-- /Since: 0.5/
isSupported ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Bool
    -- ^ __Returns:__ 'P.True' if the platform is Wayland and Wayland compositor supports the
    -- zwlr_layer_shell_v1 protocol.
isSupported  = liftIO $ do
    result <- gtk_layer_is_supported
    let result' = (/= 0) result
    return result'


-- function is_layer_window
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "A #GtkWindow that may or may not have a layer surface."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_is_layer_window" gtk_layer_is_layer_window :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO CInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.5/
isLayerWindow ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A t'GI.Gtk.Objects.Window.Window' that may or may not have a layer surface.
    -> m Bool
    -- ^ __Returns:__ if /@window@/ has been initialized as a layer surface.
isLayerWindow window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    result <- gtk_layer_is_layer_window window'
    let result' = (/= 0) result
    touchManagedPtr window
    return result'


-- function init_for_window
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "A #GtkWindow to be turned into a layer surface."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_init_for_window" gtk_layer_init_for_window :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO ()

-- | Set the /@window@/ up to be a layer surface once it is mapped. this must be called before
-- the /@window@/ is realized.
initForWindow ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A t'GI.Gtk.Objects.Window.Window' to be turned into a layer surface.
    -> m ()
initForWindow window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    gtk_layer_init_for_window window'
    touchManagedPtr window
    return ()


-- function get_zwlr_layer_surface_v1
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_zwlr_layer_surface_v1" gtk_layer_get_zwlr_layer_surface_v1 :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO (Ptr ())

-- | /No description available in the introspection data./
-- 
-- /Since: 0.4/
getZwlrLayerSurfaceV1 ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m (Ptr ())
    -- ^ __Returns:__ The underlying layer surface Wayland object
getZwlrLayerSurfaceV1 window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    result <- gtk_layer_get_zwlr_layer_surface_v1 window'
    touchManagedPtr window
    return result


-- function get_respect_close
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_respect_close" gtk_layer_get_respect_close :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO CInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.10/
getRespectClose ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m Bool
    -- ^ __Returns:__ if the respect_close behavior is enabled, see 'GI.GtkLayerShell.Functions.setRespectClose'
getRespectClose window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    result <- gtk_layer_get_respect_close window'
    let result' = (/= 0) result
    touchManagedPtr window
    return result'


-- function get_protocol_version
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_protocol_version" gtk_layer_get_protocol_version :: 
    IO Word32

-- | May block for a Wayland roundtrip the first time it\'s called.
-- 
-- /Since: 0.6/
getProtocolVersion ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Word32
    -- ^ __Returns:__ version of the zwlr_layer_shell_v1 protocol supported by the
    -- compositor or 0 if the protocol is not supported.
getProtocolVersion  = liftIO $ do
    result <- gtk_layer_get_protocol_version
    return result


-- function get_namespace
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_namespace" gtk_layer_get_namespace :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO CString

-- | NOTE: this function does not return ownership of the string. Do not free the returned string.
-- Future calls into the library may invalidate the returned string.
-- 
-- /Since: 0.5/
getNamespace ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m T.Text
    -- ^ __Returns:__ a reference to the namespace property. If namespace is unset, returns the
    -- default namespace (\"gtk-layer-shell\"). Never returns 'P.Nothing'.
getNamespace window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    result <- gtk_layer_get_namespace window'
    checkUnexpectedReturnNULL "getNamespace" result
    result' <- cstringToText result
    touchManagedPtr window
    return result'


-- function get_monitor
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Monitor" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_monitor" gtk_layer_get_monitor :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO (Ptr Gdk.Monitor.Monitor)

-- | NOTE: To get which monitor the surface is actually on, use
-- 'GI.Gdk.Objects.Display.displayGetMonitorAtWindow'.
-- 
-- /Since: 0.5/
getMonitor ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m Gdk.Monitor.Monitor
    -- ^ __Returns:__ the monitor this surface will\/has requested to be on, can be 'P.Nothing'.
getMonitor window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    result <- gtk_layer_get_monitor window'
    checkUnexpectedReturnNULL "getMonitor" result
    result' <- (newObject Gdk.Monitor.Monitor) result
    touchManagedPtr window
    return result'


-- function get_minor_version
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_minor_version" gtk_layer_get_minor_version :: 
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.4/
getMinorVersion ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Word32
    -- ^ __Returns:__ the minor version number of the GTK Layer Shell library
getMinorVersion  = liftIO $ do
    result <- gtk_layer_get_minor_version
    return result


-- function get_micro_version
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_micro_version" gtk_layer_get_micro_version :: 
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.4/
getMicroVersion ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Word32
    -- ^ __Returns:__ the micro\/patch version number of the GTK Layer Shell library
getMicroVersion  = liftIO $ do
    result <- gtk_layer_get_micro_version
    return result


-- function get_margin
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "edge"
--           , argType =
--               TInterface Name { namespace = "GtkLayerShell" , name = "Edge" }
--           , argCType = Just "GtkLayerShellEdge"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_margin" gtk_layer_get_margin :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    CUInt ->                                -- edge : TInterface (Name {namespace = "GtkLayerShell", name = "Edge"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.5/
getMargin ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> GtkLayerShell.Enums.Edge
    -> m Int32
    -- ^ __Returns:__ the size of the margin for the given edge.
getMargin window edge = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    let edge' = (fromIntegral . fromEnum) edge
    result <- gtk_layer_get_margin window' edge'
    touchManagedPtr window
    return result


-- function get_major_version
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_major_version" gtk_layer_get_major_version :: 
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.4/
getMajorVersion ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Word32
    -- ^ __Returns:__ the major version number of the GTK Layer Shell library
getMajorVersion  = liftIO $ do
    result <- gtk_layer_get_major_version
    return result


-- function get_layer
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "GtkLayerShell" , name = "Layer" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_layer" gtk_layer_get_layer :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO CUInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.5/
getLayer ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m GtkLayerShell.Enums.Layer
    -- ^ __Returns:__ the current layer.
getLayer window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    result <- gtk_layer_get_layer window'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr window
    return result'


-- function get_keyboard_mode
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "GtkLayerShell" , name = "KeyboardMode" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_keyboard_mode" gtk_layer_get_keyboard_mode :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO CUInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.6/
getKeyboardMode ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m GtkLayerShell.Enums.KeyboardMode
    -- ^ __Returns:__ current keyboard interactivity mode for /@window@/.
getKeyboardMode window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    result <- gtk_layer_get_keyboard_mode window'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr window
    return result'


-- function get_keyboard_interactivity
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_keyboard_interactivity" gtk_layer_get_keyboard_interactivity :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO CInt

{-# DEPRECATED getKeyboardInteractivity ["(Since version 0.6)","Use gtk_layer_get_keyboard_mode () instead."] #-}
-- | /No description available in the introspection data./
-- 
-- /Since: 0.5/
getKeyboardInteractivity ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m Bool
    -- ^ __Returns:__ if keyboard interactivity is enabled
getKeyboardInteractivity window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    result <- gtk_layer_get_keyboard_interactivity window'
    let result' = (/= 0) result
    touchManagedPtr window
    return result'


-- function get_exclusive_zone
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_exclusive_zone" gtk_layer_get_exclusive_zone :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.5/
getExclusiveZone ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m Int32
    -- ^ __Returns:__ the window\'s exclusive zone (which may have been set manually or automatically)
getExclusiveZone window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    result <- gtk_layer_get_exclusive_zone window'
    touchManagedPtr window
    return result


-- function get_anchor
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "edge"
--           , argType =
--               TInterface Name { namespace = "GtkLayerShell" , name = "Edge" }
--           , argCType = Just "GtkLayerShellEdge"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_get_anchor" gtk_layer_get_anchor :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    CUInt ->                                -- edge : TInterface (Name {namespace = "GtkLayerShell", name = "Edge"})
    IO CInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.5/
getAnchor ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> GtkLayerShell.Enums.Edge
    -> m Bool
    -- ^ __Returns:__ if this surface is anchored to the given edge.
getAnchor window edge = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    let edge' = (fromIntegral . fromEnum) edge
    result <- gtk_layer_get_anchor window' edge'
    let result' = (/= 0) result
    touchManagedPtr window
    return result'


-- function auto_exclusive_zone_is_enabled
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_auto_exclusive_zone_is_enabled" gtk_layer_auto_exclusive_zone_is_enabled :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO CInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.5/
autoExclusiveZoneIsEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m Bool
    -- ^ __Returns:__ if the surface\'s exclusive zone is set to change based on the window\'s size
autoExclusiveZoneIsEnabled window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    result <- gtk_layer_auto_exclusive_zone_is_enabled window'
    let result' = (/= 0) result
    touchManagedPtr window
    return result'


-- function auto_exclusive_zone_enable
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , argCType = Just "GtkWindow*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A layer surface." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layer_auto_exclusive_zone_enable" gtk_layer_auto_exclusive_zone_enable :: 
    Ptr Gtk.Window.Window ->                -- window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO ()

-- | When auto exclusive zone is enabled, exclusive zone is automatically set to the
-- size of the /@window@/ + relevant margin. To disable auto exclusive zone, just set the
-- exclusive zone to 0 or any other fixed value.
-- 
-- NOTE: you can control the auto exclusive zone by changing the margin on the non-anchored
-- edge. This behavior is specific to gtk-layer-shell and not part of the underlying protocol
autoExclusiveZoneEnable ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    a
    -- ^ /@window@/: A layer surface.
    -> m ()
autoExclusiveZoneEnable window = liftIO $ do
    window' <- unsafeManagedPtrCastPtr window
    gtk_layer_auto_exclusive_zone_enable window'
    touchManagedPtr window
    return ()



