{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GdkX11.Objects.X11Surface
(
X11Surface(..) ,
IsX11Surface ,
toX11Surface ,
#if defined(ENABLE_OVERLOADING)
ResolveX11SurfaceMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
X11SurfaceGetDesktopMethodInfo ,
#endif
x11SurfaceGetDesktop ,
x11SurfaceGetGroup ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceGetXidMethodInfo ,
#endif
x11SurfaceGetXid ,
x11SurfaceLookupForDisplay ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceMoveToCurrentDesktopMethodInfo,
#endif
x11SurfaceMoveToCurrentDesktop ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceMoveToDesktopMethodInfo ,
#endif
x11SurfaceMoveToDesktop ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceSetFrameSyncEnabledMethodInfo ,
#endif
x11SurfaceSetFrameSyncEnabled ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceSetGroupMethodInfo ,
#endif
x11SurfaceSetGroup ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceSetSkipPagerHintMethodInfo ,
#endif
x11SurfaceSetSkipPagerHint ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceSetSkipTaskbarHintMethodInfo ,
#endif
x11SurfaceSetSkipTaskbarHint ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceSetThemeVariantMethodInfo ,
#endif
x11SurfaceSetThemeVariant ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceSetUrgencyHintMethodInfo ,
#endif
x11SurfaceSetUrgencyHint ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceSetUserTimeMethodInfo ,
#endif
x11SurfaceSetUserTime ,
#if defined(ENABLE_OVERLOADING)
X11SurfaceSetUtf8PropertyMethodInfo ,
#endif
x11SurfaceSetUtf8Property ,
) 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 qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import {-# SOURCE #-} qualified GI.GdkX11.Objects.X11Display as GdkX11.X11Display
newtype X11Surface = X11Surface (SP.ManagedPtr X11Surface)
deriving (X11Surface -> X11Surface -> Bool
(X11Surface -> X11Surface -> Bool)
-> (X11Surface -> X11Surface -> Bool) -> Eq X11Surface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: X11Surface -> X11Surface -> Bool
$c/= :: X11Surface -> X11Surface -> Bool
== :: X11Surface -> X11Surface -> Bool
$c== :: X11Surface -> X11Surface -> Bool
Eq)
instance SP.ManagedPtrNewtype X11Surface where
toManagedPtr :: X11Surface -> ManagedPtr X11Surface
toManagedPtr (X11Surface ManagedPtr X11Surface
p) = ManagedPtr X11Surface
p
foreign import ccall "gdk_x11_surface_get_type"
c_gdk_x11_surface_get_type :: IO B.Types.GType
instance B.Types.TypedObject X11Surface where
glibType :: IO GType
glibType = IO GType
c_gdk_x11_surface_get_type
instance B.Types.GObject X11Surface
instance B.GValue.IsGValue X11Surface where
toGValue :: X11Surface -> IO GValue
toGValue X11Surface
o = do
GType
gtype <- IO GType
c_gdk_x11_surface_get_type
X11Surface -> (Ptr X11Surface -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr X11Surface
o (GType
-> (GValue -> Ptr X11Surface -> IO ())
-> Ptr X11Surface
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr X11Surface -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO X11Surface
fromGValue GValue
gv = do
Ptr X11Surface
ptr <- GValue -> IO (Ptr X11Surface)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr X11Surface)
(ManagedPtr X11Surface -> X11Surface)
-> Ptr X11Surface -> IO X11Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr X11Surface -> X11Surface
X11Surface Ptr X11Surface
ptr
class (SP.GObject o, O.IsDescendantOf X11Surface o) => IsX11Surface o
instance (SP.GObject o, O.IsDescendantOf X11Surface o) => IsX11Surface o
instance O.HasParentTypes X11Surface
type instance O.ParentTypes X11Surface = '[Gdk.Surface.Surface, GObject.Object.Object]
toX11Surface :: (MonadIO m, IsX11Surface o) => o -> m X11Surface
toX11Surface :: o -> m X11Surface
toX11Surface = IO X11Surface -> m X11Surface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO X11Surface -> m X11Surface)
-> (o -> IO X11Surface) -> o -> m X11Surface
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr X11Surface -> X11Surface) -> o -> IO X11Surface
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr X11Surface -> X11Surface
X11Surface
#if defined(ENABLE_OVERLOADING)
type family ResolveX11SurfaceMethod (t :: Symbol) (o :: *) :: * where
ResolveX11SurfaceMethod "beep" o = Gdk.Surface.SurfaceBeepMethodInfo
ResolveX11SurfaceMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveX11SurfaceMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveX11SurfaceMethod "createCairoContext" o = Gdk.Surface.SurfaceCreateCairoContextMethodInfo
ResolveX11SurfaceMethod "createGlContext" o = Gdk.Surface.SurfaceCreateGlContextMethodInfo
ResolveX11SurfaceMethod "createSimilarSurface" o = Gdk.Surface.SurfaceCreateSimilarSurfaceMethodInfo
ResolveX11SurfaceMethod "createVulkanContext" o = Gdk.Surface.SurfaceCreateVulkanContextMethodInfo
ResolveX11SurfaceMethod "destroy" o = Gdk.Surface.SurfaceDestroyMethodInfo
ResolveX11SurfaceMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveX11SurfaceMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveX11SurfaceMethod "freezeUpdates" o = Gdk.Surface.SurfaceFreezeUpdatesMethodInfo
ResolveX11SurfaceMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveX11SurfaceMethod "hide" o = Gdk.Surface.SurfaceHideMethodInfo
ResolveX11SurfaceMethod "isDestroyed" o = Gdk.Surface.SurfaceIsDestroyedMethodInfo
ResolveX11SurfaceMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveX11SurfaceMethod "moveToCurrentDesktop" o = X11SurfaceMoveToCurrentDesktopMethodInfo
ResolveX11SurfaceMethod "moveToDesktop" o = X11SurfaceMoveToDesktopMethodInfo
ResolveX11SurfaceMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveX11SurfaceMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveX11SurfaceMethod "queueExpose" o = Gdk.Surface.SurfaceQueueExposeMethodInfo
ResolveX11SurfaceMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveX11SurfaceMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveX11SurfaceMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveX11SurfaceMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveX11SurfaceMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveX11SurfaceMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveX11SurfaceMethod "thawUpdates" o = Gdk.Surface.SurfaceThawUpdatesMethodInfo
ResolveX11SurfaceMethod "translateCoordinates" o = Gdk.Surface.SurfaceTranslateCoordinatesMethodInfo
ResolveX11SurfaceMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveX11SurfaceMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveX11SurfaceMethod "getCursor" o = Gdk.Surface.SurfaceGetCursorMethodInfo
ResolveX11SurfaceMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveX11SurfaceMethod "getDesktop" o = X11SurfaceGetDesktopMethodInfo
ResolveX11SurfaceMethod "getDeviceCursor" o = Gdk.Surface.SurfaceGetDeviceCursorMethodInfo
ResolveX11SurfaceMethod "getDevicePosition" o = Gdk.Surface.SurfaceGetDevicePositionMethodInfo
ResolveX11SurfaceMethod "getDisplay" o = Gdk.Surface.SurfaceGetDisplayMethodInfo
ResolveX11SurfaceMethod "getFrameClock" o = Gdk.Surface.SurfaceGetFrameClockMethodInfo
ResolveX11SurfaceMethod "getHeight" o = Gdk.Surface.SurfaceGetHeightMethodInfo
ResolveX11SurfaceMethod "getMapped" o = Gdk.Surface.SurfaceGetMappedMethodInfo
ResolveX11SurfaceMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveX11SurfaceMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveX11SurfaceMethod "getScaleFactor" o = Gdk.Surface.SurfaceGetScaleFactorMethodInfo
ResolveX11SurfaceMethod "getSupportMultidevice" o = Gdk.Surface.SurfaceGetSupportMultideviceMethodInfo
ResolveX11SurfaceMethod "getWidth" o = Gdk.Surface.SurfaceGetWidthMethodInfo
ResolveX11SurfaceMethod "getXid" o = X11SurfaceGetXidMethodInfo
ResolveX11SurfaceMethod "setCursor" o = Gdk.Surface.SurfaceSetCursorMethodInfo
ResolveX11SurfaceMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveX11SurfaceMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveX11SurfaceMethod "setDeviceCursor" o = Gdk.Surface.SurfaceSetDeviceCursorMethodInfo
ResolveX11SurfaceMethod "setFrameSyncEnabled" o = X11SurfaceSetFrameSyncEnabledMethodInfo
ResolveX11SurfaceMethod "setGroup" o = X11SurfaceSetGroupMethodInfo
ResolveX11SurfaceMethod "setInputRegion" o = Gdk.Surface.SurfaceSetInputRegionMethodInfo
ResolveX11SurfaceMethod "setOpaqueRegion" o = Gdk.Surface.SurfaceSetOpaqueRegionMethodInfo
ResolveX11SurfaceMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveX11SurfaceMethod "setShadowWidth" o = Gdk.Surface.SurfaceSetShadowWidthMethodInfo
ResolveX11SurfaceMethod "setSkipPagerHint" o = X11SurfaceSetSkipPagerHintMethodInfo
ResolveX11SurfaceMethod "setSkipTaskbarHint" o = X11SurfaceSetSkipTaskbarHintMethodInfo
ResolveX11SurfaceMethod "setSupportMultidevice" o = Gdk.Surface.SurfaceSetSupportMultideviceMethodInfo
ResolveX11SurfaceMethod "setThemeVariant" o = X11SurfaceSetThemeVariantMethodInfo
ResolveX11SurfaceMethod "setUrgencyHint" o = X11SurfaceSetUrgencyHintMethodInfo
ResolveX11SurfaceMethod "setUserTime" o = X11SurfaceSetUserTimeMethodInfo
ResolveX11SurfaceMethod "setUtf8Property" o = X11SurfaceSetUtf8PropertyMethodInfo
ResolveX11SurfaceMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveX11SurfaceMethod t X11Surface, O.MethodInfo info X11Surface p) => OL.IsLabel t (X11Surface -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList X11Surface
type instance O.AttributeList X11Surface = X11SurfaceAttributeList
type X11SurfaceAttributeList = ('[ '("cursor", Gdk.Surface.SurfaceCursorPropertyInfo), '("display", Gdk.Surface.SurfaceDisplayPropertyInfo), '("frameClock", Gdk.Surface.SurfaceFrameClockPropertyInfo), '("mapped", Gdk.Surface.SurfaceMappedPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList X11Surface = X11SurfaceSignalList
type X11SurfaceSignalList = ('[ '("enterMonitor", Gdk.Surface.SurfaceEnterMonitorSignalInfo), '("event", Gdk.Surface.SurfaceEventSignalInfo), '("leaveMonitor", Gdk.Surface.SurfaceLeaveMonitorSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("popupLayoutChanged", Gdk.Surface.SurfacePopupLayoutChangedSignalInfo), '("render", Gdk.Surface.SurfaceRenderSignalInfo), '("sizeChanged", Gdk.Surface.SurfaceSizeChangedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gdk_x11_surface_get_desktop" gdk_x11_surface_get_desktop ::
Ptr X11Surface ->
IO Word32
x11SurfaceGetDesktop ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> m Word32
x11SurfaceGetDesktop :: a -> m Word32
x11SurfaceGetDesktop a
surface = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Word32
result <- Ptr X11Surface -> IO Word32
gdk_x11_surface_get_desktop Ptr X11Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data X11SurfaceGetDesktopMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceGetDesktopMethodInfo a signature where
overloadedMethod = x11SurfaceGetDesktop
#endif
foreign import ccall "gdk_x11_surface_get_xid" gdk_x11_surface_get_xid ::
Ptr X11Surface ->
IO CULong
x11SurfaceGetXid ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> m CULong
x11SurfaceGetXid :: a -> m CULong
x11SurfaceGetXid a
surface = IO CULong -> m CULong
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CULong -> m CULong) -> IO CULong -> m CULong
forall a b. (a -> b) -> a -> b
$ do
Ptr X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CULong
result <- Ptr X11Surface -> IO CULong
gdk_x11_surface_get_xid Ptr X11Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
CULong -> IO CULong
forall (m :: * -> *) a. Monad m => a -> m a
return CULong
result
#if defined(ENABLE_OVERLOADING)
data X11SurfaceGetXidMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceGetXidMethodInfo a signature where
overloadedMethod = x11SurfaceGetXid
#endif
foreign import ccall "gdk_x11_surface_move_to_current_desktop" gdk_x11_surface_move_to_current_desktop ::
Ptr X11Surface ->
IO ()
x11SurfaceMoveToCurrentDesktop ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> m ()
x11SurfaceMoveToCurrentDesktop :: a -> m ()
x11SurfaceMoveToCurrentDesktop a
surface = 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 X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr X11Surface -> IO ()
gdk_x11_surface_move_to_current_desktop Ptr X11Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data X11SurfaceMoveToCurrentDesktopMethodInfo
instance (signature ~ (m ()), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceMoveToCurrentDesktopMethodInfo a signature where
overloadedMethod = x11SurfaceMoveToCurrentDesktop
#endif
foreign import ccall "gdk_x11_surface_move_to_desktop" gdk_x11_surface_move_to_desktop ::
Ptr X11Surface ->
Word32 ->
IO ()
x11SurfaceMoveToDesktop ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> Word32
-> m ()
x11SurfaceMoveToDesktop :: a -> Word32 -> m ()
x11SurfaceMoveToDesktop a
surface Word32
desktop = 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 X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr X11Surface -> Word32 -> IO ()
gdk_x11_surface_move_to_desktop Ptr X11Surface
surface' Word32
desktop
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data X11SurfaceMoveToDesktopMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceMoveToDesktopMethodInfo a signature where
overloadedMethod = x11SurfaceMoveToDesktop
#endif
foreign import ccall "gdk_x11_surface_set_frame_sync_enabled" gdk_x11_surface_set_frame_sync_enabled ::
Ptr X11Surface ->
CInt ->
IO ()
x11SurfaceSetFrameSyncEnabled ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> Bool
-> m ()
x11SurfaceSetFrameSyncEnabled :: a -> Bool -> m ()
x11SurfaceSetFrameSyncEnabled a
surface Bool
frameSyncEnabled = 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 X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
let frameSyncEnabled' :: CInt
frameSyncEnabled' = (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
frameSyncEnabled
Ptr X11Surface -> CInt -> IO ()
gdk_x11_surface_set_frame_sync_enabled Ptr X11Surface
surface' CInt
frameSyncEnabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data X11SurfaceSetFrameSyncEnabledMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceSetFrameSyncEnabledMethodInfo a signature where
overloadedMethod = x11SurfaceSetFrameSyncEnabled
#endif
foreign import ccall "gdk_x11_surface_set_group" gdk_x11_surface_set_group ::
Ptr X11Surface ->
Ptr Gdk.Surface.Surface ->
IO ()
x11SurfaceSetGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a, Gdk.Surface.IsSurface b) =>
a
-> b
-> m ()
x11SurfaceSetGroup :: a -> b -> m ()
x11SurfaceSetGroup a
surface b
leader = 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 X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface
leader' <- b -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
leader
Ptr X11Surface -> Ptr Surface -> IO ()
gdk_x11_surface_set_group Ptr X11Surface
surface' Ptr Surface
leader'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
leader
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data X11SurfaceSetGroupMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsX11Surface a, Gdk.Surface.IsSurface b) => O.MethodInfo X11SurfaceSetGroupMethodInfo a signature where
overloadedMethod = x11SurfaceSetGroup
#endif
foreign import ccall "gdk_x11_surface_set_skip_pager_hint" ::
Ptr X11Surface ->
CInt ->
IO ()
x11SurfaceSetSkipPagerHint ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> Bool
-> m ()
a
surface Bool
skipsPager = 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 X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
let skipsPager' :: CInt
skipsPager' = (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
skipsPager
Ptr X11Surface -> CInt -> IO ()
gdk_x11_surface_set_skip_pager_hint Ptr X11Surface
surface' CInt
skipsPager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data X11SurfaceSetSkipPagerHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceSetSkipPagerHintMethodInfo a signature where
overloadedMethod = x11SurfaceSetSkipPagerHint
#endif
foreign import ccall "gdk_x11_surface_set_skip_taskbar_hint" gdk_x11_surface_set_skip_taskbar_hint ::
Ptr X11Surface ->
CInt ->
IO ()
x11SurfaceSetSkipTaskbarHint ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> Bool
-> m ()
x11SurfaceSetSkipTaskbarHint :: a -> Bool -> m ()
x11SurfaceSetSkipTaskbarHint a
surface Bool
skipsTaskbar = 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 X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
let skipsTaskbar' :: CInt
skipsTaskbar' = (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
skipsTaskbar
Ptr X11Surface -> CInt -> IO ()
gdk_x11_surface_set_skip_taskbar_hint Ptr X11Surface
surface' CInt
skipsTaskbar'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data X11SurfaceSetSkipTaskbarHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceSetSkipTaskbarHintMethodInfo a signature where
overloadedMethod = x11SurfaceSetSkipTaskbarHint
#endif
foreign import ccall "gdk_x11_surface_set_theme_variant" gdk_x11_surface_set_theme_variant ::
Ptr X11Surface ->
CString ->
IO ()
x11SurfaceSetThemeVariant ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> T.Text
-> m ()
x11SurfaceSetThemeVariant :: a -> Text -> m ()
x11SurfaceSetThemeVariant a
surface Text
variant = 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 X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CString
variant' <- Text -> IO CString
textToCString Text
variant
Ptr X11Surface -> CString -> IO ()
gdk_x11_surface_set_theme_variant Ptr X11Surface
surface' CString
variant'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
variant'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data X11SurfaceSetThemeVariantMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceSetThemeVariantMethodInfo a signature where
overloadedMethod = x11SurfaceSetThemeVariant
#endif
foreign import ccall "gdk_x11_surface_set_urgency_hint" gdk_x11_surface_set_urgency_hint ::
Ptr X11Surface ->
CInt ->
IO ()
x11SurfaceSetUrgencyHint ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> Bool
-> m ()
x11SurfaceSetUrgencyHint :: a -> Bool -> m ()
x11SurfaceSetUrgencyHint a
surface Bool
urgent = 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 X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
let urgent' :: CInt
urgent' = (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
urgent
Ptr X11Surface -> CInt -> IO ()
gdk_x11_surface_set_urgency_hint Ptr X11Surface
surface' CInt
urgent'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data X11SurfaceSetUrgencyHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceSetUrgencyHintMethodInfo a signature where
overloadedMethod = x11SurfaceSetUrgencyHint
#endif
foreign import ccall "gdk_x11_surface_set_user_time" gdk_x11_surface_set_user_time ::
Ptr X11Surface ->
Word32 ->
IO ()
x11SurfaceSetUserTime ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> Word32
-> m ()
x11SurfaceSetUserTime :: a -> Word32 -> m ()
x11SurfaceSetUserTime a
surface Word32
timestamp = 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 X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr X11Surface -> Word32 -> IO ()
gdk_x11_surface_set_user_time Ptr X11Surface
surface' Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data X11SurfaceSetUserTimeMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceSetUserTimeMethodInfo a signature where
overloadedMethod = x11SurfaceSetUserTime
#endif
foreign import ccall "gdk_x11_surface_set_utf8_property" gdk_x11_surface_set_utf8_property ::
Ptr X11Surface ->
CString ->
CString ->
IO ()
x11SurfaceSetUtf8Property ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Surface a) =>
a
-> T.Text
-> Maybe (T.Text)
-> m ()
x11SurfaceSetUtf8Property :: a -> Text -> Maybe Text -> m ()
x11SurfaceSetUtf8Property a
surface Text
name Maybe Text
value = 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 X11Surface
surface' <- a -> IO (Ptr X11Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CString
name' <- Text -> IO CString
textToCString Text
name
CString
maybeValue <- case Maybe Text
value of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jValue -> do
CString
jValue' <- Text -> IO CString
textToCString Text
jValue
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jValue'
Ptr X11Surface -> CString -> CString -> IO ()
gdk_x11_surface_set_utf8_property Ptr X11Surface
surface' CString
name' CString
maybeValue
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeValue
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data X11SurfaceSetUtf8PropertyMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> m ()), MonadIO m, IsX11Surface a) => O.MethodInfo X11SurfaceSetUtf8PropertyMethodInfo a signature where
overloadedMethod = x11SurfaceSetUtf8Property
#endif
foreign import ccall "gdk_x11_surface_get_group" gdk_x11_surface_get_group ::
Ptr Gdk.Surface.Surface ->
IO (Ptr Gdk.Surface.Surface)
x11SurfaceGetGroup ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Surface.IsSurface a) =>
a
-> m Gdk.Surface.Surface
x11SurfaceGetGroup :: a -> m Surface
x11SurfaceGetGroup a
surface = IO Surface -> m Surface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Surface -> m Surface) -> IO Surface -> m Surface
forall a b. (a -> b) -> a -> b
$ do
Ptr Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface
result <- Ptr Surface -> IO (Ptr Surface)
gdk_x11_surface_get_group Ptr Surface
surface'
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"x11SurfaceGetGroup" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Surface -> Surface
Gdk.Surface.Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_x11_surface_lookup_for_display" gdk_x11_surface_lookup_for_display ::
Ptr GdkX11.X11Display.X11Display ->
CULong ->
IO (Ptr X11Surface)
x11SurfaceLookupForDisplay ::
(B.CallStack.HasCallStack, MonadIO m, GdkX11.X11Display.IsX11Display a) =>
a
-> CULong
-> m X11Surface
x11SurfaceLookupForDisplay :: a -> CULong -> m X11Surface
x11SurfaceLookupForDisplay a
display CULong
window = IO X11Surface -> m X11Surface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO X11Surface -> m X11Surface) -> IO X11Surface -> m X11Surface
forall a b. (a -> b) -> a -> b
$ do
Ptr X11Display
display' <- a -> IO (Ptr X11Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr X11Surface
result <- Ptr X11Display -> CULong -> IO (Ptr X11Surface)
gdk_x11_surface_lookup_for_display Ptr X11Display
display' CULong
window
Text -> Ptr X11Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"x11SurfaceLookupForDisplay" Ptr X11Surface
result
X11Surface
result' <- ((ManagedPtr X11Surface -> X11Surface)
-> Ptr X11Surface -> IO X11Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr X11Surface -> X11Surface
X11Surface) Ptr X11Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
X11Surface -> IO X11Surface
forall (m :: * -> *) a. Monad m => a -> m a
return X11Surface
result'
#if defined(ENABLE_OVERLOADING)
#endif