{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Objects.Display
(
Display(..) ,
IsDisplay ,
toDisplay ,
#if defined(ENABLE_OVERLOADING)
ResolveDisplayMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DisplayBeepMethodInfo ,
#endif
displayBeep ,
#if defined(ENABLE_OVERLOADING)
DisplayCloseMethodInfo ,
#endif
displayClose ,
#if defined(ENABLE_OVERLOADING)
DisplayCreateGlContextMethodInfo ,
#endif
displayCreateGlContext ,
#if defined(ENABLE_OVERLOADING)
DisplayDeviceIsGrabbedMethodInfo ,
#endif
displayDeviceIsGrabbed ,
#if defined(ENABLE_OVERLOADING)
DisplayFlushMethodInfo ,
#endif
displayFlush ,
#if defined(ENABLE_OVERLOADING)
DisplayGetAppLaunchContextMethodInfo ,
#endif
displayGetAppLaunchContext ,
#if defined(ENABLE_OVERLOADING)
DisplayGetClipboardMethodInfo ,
#endif
displayGetClipboard ,
displayGetDefault ,
#if defined(ENABLE_OVERLOADING)
DisplayGetDefaultSeatMethodInfo ,
#endif
displayGetDefaultSeat ,
#if defined(ENABLE_OVERLOADING)
DisplayGetDmabufFormatsMethodInfo ,
#endif
displayGetDmabufFormats ,
#if defined(ENABLE_OVERLOADING)
DisplayGetMonitorAtSurfaceMethodInfo ,
#endif
displayGetMonitorAtSurface ,
#if defined(ENABLE_OVERLOADING)
DisplayGetMonitorsMethodInfo ,
#endif
displayGetMonitors ,
#if defined(ENABLE_OVERLOADING)
DisplayGetNameMethodInfo ,
#endif
displayGetName ,
#if defined(ENABLE_OVERLOADING)
DisplayGetPrimaryClipboardMethodInfo ,
#endif
displayGetPrimaryClipboard ,
#if defined(ENABLE_OVERLOADING)
DisplayGetSettingMethodInfo ,
#endif
displayGetSetting ,
#if defined(ENABLE_OVERLOADING)
DisplayGetStartupNotificationIdMethodInfo,
#endif
displayGetStartupNotificationId ,
#if defined(ENABLE_OVERLOADING)
DisplayIsClosedMethodInfo ,
#endif
displayIsClosed ,
#if defined(ENABLE_OVERLOADING)
DisplayIsCompositedMethodInfo ,
#endif
displayIsComposited ,
#if defined(ENABLE_OVERLOADING)
DisplayIsRgbaMethodInfo ,
#endif
displayIsRgba ,
#if defined(ENABLE_OVERLOADING)
DisplayListSeatsMethodInfo ,
#endif
displayListSeats ,
#if defined(ENABLE_OVERLOADING)
DisplayMapKeycodeMethodInfo ,
#endif
displayMapKeycode ,
#if defined(ENABLE_OVERLOADING)
DisplayMapKeyvalMethodInfo ,
#endif
displayMapKeyval ,
#if defined(ENABLE_OVERLOADING)
DisplayNotifyStartupCompleteMethodInfo ,
#endif
displayNotifyStartupComplete ,
displayOpen ,
#if defined(ENABLE_OVERLOADING)
DisplayPrepareGlMethodInfo ,
#endif
displayPrepareGl ,
#if defined(ENABLE_OVERLOADING)
DisplayPutEventMethodInfo ,
#endif
displayPutEvent ,
#if defined(ENABLE_OVERLOADING)
DisplaySupportsInputShapesMethodInfo ,
#endif
displaySupportsInputShapes ,
#if defined(ENABLE_OVERLOADING)
DisplaySupportsShadowWidthMethodInfo ,
#endif
displaySupportsShadowWidth ,
#if defined(ENABLE_OVERLOADING)
DisplaySyncMethodInfo ,
#endif
displaySync ,
#if defined(ENABLE_OVERLOADING)
DisplayTranslateKeyMethodInfo ,
#endif
displayTranslateKey ,
#if defined(ENABLE_OVERLOADING)
DisplayCompositedPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
displayComposited ,
#endif
getDisplayComposited ,
#if defined(ENABLE_OVERLOADING)
DisplayDmabufFormatsPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
displayDmabufFormats ,
#endif
getDisplayDmabufFormats ,
#if defined(ENABLE_OVERLOADING)
DisplayInputShapesPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
displayInputShapes ,
#endif
getDisplayInputShapes ,
#if defined(ENABLE_OVERLOADING)
DisplayRgbaPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
displayRgba ,
#endif
getDisplayRgba ,
#if defined(ENABLE_OVERLOADING)
DisplayShadowWidthPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
displayShadowWidth ,
#endif
getDisplayShadowWidth ,
DisplayClosedCallback ,
#if defined(ENABLE_OVERLOADING)
DisplayClosedSignalInfo ,
#endif
afterDisplayClosed ,
onDisplayClosed ,
DisplayOpenedCallback ,
#if defined(ENABLE_OVERLOADING)
DisplayOpenedSignalInfo ,
#endif
afterDisplayOpened ,
onDisplayOpened ,
DisplaySeatAddedCallback ,
#if defined(ENABLE_OVERLOADING)
DisplaySeatAddedSignalInfo ,
#endif
afterDisplaySeatAdded ,
onDisplaySeatAdded ,
DisplaySeatRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
DisplaySeatRemovedSignalInfo ,
#endif
afterDisplaySeatRemoved ,
onDisplaySeatRemoved ,
DisplaySettingChangedCallback ,
#if defined(ENABLE_OVERLOADING)
DisplaySettingChangedSignalInfo ,
#endif
afterDisplaySettingChanged ,
onDisplaySettingChanged ,
) 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
#if MIN_VERSION_base(4,18,0)
import qualified GI.Cairo.Enums as Cairo.Enums
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.Region as Cairo.Region
import qualified GI.Cairo.Structs.Surface as Cairo.Surface
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import {-# SOURCE #-} qualified GI.Gdk.Objects.AppLaunchContext as Gdk.AppLaunchContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.CairoContext as Gdk.CairoContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import {-# SOURCE #-} qualified GI.Gdk.Objects.ContentProvider as Gdk.ContentProvider
import {-# SOURCE #-} qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import {-# SOURCE #-} qualified GI.Gdk.Objects.Device as Gdk.Device
import {-# SOURCE #-} qualified GI.Gdk.Objects.DeviceTool as Gdk.DeviceTool
import {-# SOURCE #-} qualified GI.Gdk.Objects.DrawContext as Gdk.DrawContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.Event as Gdk.Event
import {-# SOURCE #-} qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import {-# SOURCE #-} qualified GI.Gdk.Objects.GLContext as Gdk.GLContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.Monitor as Gdk.Monitor
import {-# SOURCE #-} qualified GI.Gdk.Objects.Seat as Gdk.Seat
import {-# SOURCE #-} qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
import {-# SOURCE #-} qualified GI.Gdk.Objects.Surface as Gdk.Surface
import {-# SOURCE #-} qualified GI.Gdk.Objects.Texture as Gdk.Texture
import {-# SOURCE #-} qualified GI.Gdk.Objects.VulkanContext as Gdk.VulkanContext
import {-# SOURCE #-} qualified GI.Gdk.Structs.ContentFormats as Gdk.ContentFormats
import {-# SOURCE #-} qualified GI.Gdk.Structs.DmabufFormats as Gdk.DmabufFormats
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventSequence as Gdk.EventSequence
import {-# SOURCE #-} qualified GI.Gdk.Structs.FrameTimings as Gdk.FrameTimings
import {-# SOURCE #-} qualified GI.Gdk.Structs.KeymapKey as Gdk.KeymapKey
import {-# SOURCE #-} qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import {-# SOURCE #-} qualified GI.Gdk.Structs.TimeCoord as Gdk.TimeCoord
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Gio.Interfaces.LoadableIcon as Gio.LoadableIcon
import qualified GI.Gio.Objects.AppLaunchContext as Gio.AppLaunchContext
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.InputStream as Gio.InputStream
import qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
import qualified GI.Pango.Enums as Pango.Enums
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Objects.AppLaunchContext as Gdk.AppLaunchContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import {-# SOURCE #-} qualified GI.Gdk.Objects.Device as Gdk.Device
import {-# SOURCE #-} qualified GI.Gdk.Objects.Event as Gdk.Event
import {-# SOURCE #-} qualified GI.Gdk.Objects.GLContext as Gdk.GLContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.Monitor as Gdk.Monitor
import {-# SOURCE #-} qualified GI.Gdk.Objects.Seat as Gdk.Seat
import {-# SOURCE #-} qualified GI.Gdk.Objects.Surface as Gdk.Surface
import {-# SOURCE #-} qualified GI.Gdk.Structs.DmabufFormats as Gdk.DmabufFormats
import {-# SOURCE #-} qualified GI.Gdk.Structs.KeymapKey as Gdk.KeymapKey
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
#endif
newtype Display = Display (SP.ManagedPtr Display)
deriving (Display -> Display -> Bool
(Display -> Display -> Bool)
-> (Display -> Display -> Bool) -> Eq Display
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Display -> Display -> Bool
== :: Display -> Display -> Bool
$c/= :: Display -> Display -> Bool
/= :: Display -> Display -> Bool
Eq)
instance SP.ManagedPtrNewtype Display where
toManagedPtr :: Display -> ManagedPtr Display
toManagedPtr (Display ManagedPtr Display
p) = ManagedPtr Display
p
foreign import ccall "gdk_display_get_type"
c_gdk_display_get_type :: IO B.Types.GType
instance B.Types.TypedObject Display where
glibType :: IO GType
glibType = IO GType
c_gdk_display_get_type
instance B.Types.GObject Display
class (SP.GObject o, O.IsDescendantOf Display o) => IsDisplay o
instance (SP.GObject o, O.IsDescendantOf Display o) => IsDisplay o
instance O.HasParentTypes Display
type instance O.ParentTypes Display = '[GObject.Object.Object]
toDisplay :: (MIO.MonadIO m, IsDisplay o) => o -> m Display
toDisplay :: forall (m :: * -> *) o. (MonadIO m, IsDisplay o) => o -> m Display
toDisplay = IO Display -> m Display
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Display -> m Display) -> (o -> IO Display) -> o -> m Display
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Display -> Display) -> o -> IO Display
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Display -> Display
Display
instance B.GValue.IsGValue (Maybe Display) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gdk_display_get_type
gvalueSet_ :: Ptr GValue -> Maybe Display -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Display
P.Nothing = Ptr GValue -> Ptr Display -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Display
forall a. Ptr a
FP.nullPtr :: FP.Ptr Display)
gvalueSet_ Ptr GValue
gv (P.Just Display
obj) = Display -> (Ptr Display -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Display
obj (Ptr GValue -> Ptr Display -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Display)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr Display)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Display)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject Display ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDisplayMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDisplayMethod "beep" o = DisplayBeepMethodInfo
ResolveDisplayMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDisplayMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDisplayMethod "close" o = DisplayCloseMethodInfo
ResolveDisplayMethod "createGlContext" o = DisplayCreateGlContextMethodInfo
ResolveDisplayMethod "deviceIsGrabbed" o = DisplayDeviceIsGrabbedMethodInfo
ResolveDisplayMethod "flush" o = DisplayFlushMethodInfo
ResolveDisplayMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDisplayMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDisplayMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDisplayMethod "isClosed" o = DisplayIsClosedMethodInfo
ResolveDisplayMethod "isComposited" o = DisplayIsCompositedMethodInfo
ResolveDisplayMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDisplayMethod "isRgba" o = DisplayIsRgbaMethodInfo
ResolveDisplayMethod "listSeats" o = DisplayListSeatsMethodInfo
ResolveDisplayMethod "mapKeycode" o = DisplayMapKeycodeMethodInfo
ResolveDisplayMethod "mapKeyval" o = DisplayMapKeyvalMethodInfo
ResolveDisplayMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDisplayMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDisplayMethod "notifyStartupComplete" o = DisplayNotifyStartupCompleteMethodInfo
ResolveDisplayMethod "prepareGl" o = DisplayPrepareGlMethodInfo
ResolveDisplayMethod "putEvent" o = DisplayPutEventMethodInfo
ResolveDisplayMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDisplayMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDisplayMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDisplayMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDisplayMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDisplayMethod "supportsInputShapes" o = DisplaySupportsInputShapesMethodInfo
ResolveDisplayMethod "supportsShadowWidth" o = DisplaySupportsShadowWidthMethodInfo
ResolveDisplayMethod "sync" o = DisplaySyncMethodInfo
ResolveDisplayMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDisplayMethod "translateKey" o = DisplayTranslateKeyMethodInfo
ResolveDisplayMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDisplayMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDisplayMethod "getAppLaunchContext" o = DisplayGetAppLaunchContextMethodInfo
ResolveDisplayMethod "getClipboard" o = DisplayGetClipboardMethodInfo
ResolveDisplayMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDisplayMethod "getDefaultSeat" o = DisplayGetDefaultSeatMethodInfo
ResolveDisplayMethod "getDmabufFormats" o = DisplayGetDmabufFormatsMethodInfo
ResolveDisplayMethod "getMonitorAtSurface" o = DisplayGetMonitorAtSurfaceMethodInfo
ResolveDisplayMethod "getMonitors" o = DisplayGetMonitorsMethodInfo
ResolveDisplayMethod "getName" o = DisplayGetNameMethodInfo
ResolveDisplayMethod "getPrimaryClipboard" o = DisplayGetPrimaryClipboardMethodInfo
ResolveDisplayMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDisplayMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDisplayMethod "getSetting" o = DisplayGetSettingMethodInfo
ResolveDisplayMethod "getStartupNotificationId" o = DisplayGetStartupNotificationIdMethodInfo
ResolveDisplayMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDisplayMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDisplayMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDisplayMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDisplayMethod t Display, O.OverloadedMethod info Display p) => OL.IsLabel t (Display -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDisplayMethod t Display, O.OverloadedMethod info Display p, R.HasField t Display p) => R.HasField t Display p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDisplayMethod t Display, O.OverloadedMethodInfo info Display) => OL.IsLabel t (O.MethodProxy info Display) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type DisplayClosedCallback =
Bool
-> IO ()
type C_DisplayClosedCallback =
Ptr Display ->
CInt ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DisplayClosedCallback :: C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
wrap_DisplayClosedCallback ::
GObject a => (a -> DisplayClosedCallback) ->
C_DisplayClosedCallback
wrap_DisplayClosedCallback :: forall a.
GObject a =>
(a -> DisplayClosedCallback) -> C_DisplayClosedCallback
wrap_DisplayClosedCallback a -> DisplayClosedCallback
gi'cb Ptr Display
gi'selfPtr CInt
isError Ptr ()
_ = do
let isError' :: Bool
isError' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
isError
Ptr Display -> (Display -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Display
gi'selfPtr ((Display -> IO ()) -> IO ()) -> (Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Display
gi'self -> a -> DisplayClosedCallback
gi'cb (Display -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Display
gi'self) Bool
isError'
onDisplayClosed :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayClosedCallback) -> m SignalHandlerId
onDisplayClosed :: forall a (m :: * -> *).
(IsDisplay a, MonadIO m) =>
a -> ((?self::a) => DisplayClosedCallback) -> m SignalHandlerId
onDisplayClosed a
obj (?self::a) => DisplayClosedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DisplayClosedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DisplayClosedCallback
DisplayClosedCallback
cb
let wrapped' :: C_DisplayClosedCallback
wrapped' = (a -> DisplayClosedCallback) -> C_DisplayClosedCallback
forall a.
GObject a =>
(a -> DisplayClosedCallback) -> C_DisplayClosedCallback
wrap_DisplayClosedCallback a -> DisplayClosedCallback
wrapped
wrapped'' <- C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
mk_DisplayClosedCallback C_DisplayClosedCallback
wrapped'
connectSignalFunPtr obj "closed" wrapped'' SignalConnectBefore Nothing
afterDisplayClosed :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayClosedCallback) -> m SignalHandlerId
afterDisplayClosed :: forall a (m :: * -> *).
(IsDisplay a, MonadIO m) =>
a -> ((?self::a) => DisplayClosedCallback) -> m SignalHandlerId
afterDisplayClosed a
obj (?self::a) => DisplayClosedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DisplayClosedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DisplayClosedCallback
DisplayClosedCallback
cb
let wrapped' :: C_DisplayClosedCallback
wrapped' = (a -> DisplayClosedCallback) -> C_DisplayClosedCallback
forall a.
GObject a =>
(a -> DisplayClosedCallback) -> C_DisplayClosedCallback
wrap_DisplayClosedCallback a -> DisplayClosedCallback
wrapped
wrapped'' <- C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
mk_DisplayClosedCallback C_DisplayClosedCallback
wrapped'
connectSignalFunPtr obj "closed" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DisplayClosedSignalInfo
instance SignalInfo DisplayClosedSignalInfo where
type HaskellCallbackType DisplayClosedSignalInfo = DisplayClosedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DisplayClosedCallback cb
cb'' <- mk_DisplayClosedCallback cb'
connectSignalFunPtr obj "closed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display::closed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#g:signal:closed"})
#endif
type DisplayOpenedCallback =
IO ()
type C_DisplayOpenedCallback =
Ptr Display ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DisplayOpenedCallback :: C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
wrap_DisplayOpenedCallback ::
GObject a => (a -> DisplayOpenedCallback) ->
C_DisplayOpenedCallback
wrap_DisplayOpenedCallback :: forall a. GObject a => (a -> IO ()) -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback a -> IO ()
gi'cb Ptr Display
gi'selfPtr Ptr ()
_ = do
Ptr Display -> (Display -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Display
gi'selfPtr ((Display -> IO ()) -> IO ()) -> (Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Display
gi'self -> a -> IO ()
gi'cb (Display -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Display
gi'self)
onDisplayOpened :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayOpenedCallback) -> m SignalHandlerId
onDisplayOpened :: forall a (m :: * -> *).
(IsDisplay a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onDisplayOpened a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_DisplayOpenedCallback
wrapped' = (a -> IO ()) -> C_DisplayOpenedCallback
forall a. GObject a => (a -> IO ()) -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback a -> IO ()
wrapped
wrapped'' <- C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
mk_DisplayOpenedCallback C_DisplayOpenedCallback
wrapped'
connectSignalFunPtr obj "opened" wrapped'' SignalConnectBefore Nothing
afterDisplayOpened :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayOpenedCallback) -> m SignalHandlerId
afterDisplayOpened :: forall a (m :: * -> *).
(IsDisplay a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterDisplayOpened a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_DisplayOpenedCallback
wrapped' = (a -> IO ()) -> C_DisplayOpenedCallback
forall a. GObject a => (a -> IO ()) -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback a -> IO ()
wrapped
wrapped'' <- C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
mk_DisplayOpenedCallback C_DisplayOpenedCallback
wrapped'
connectSignalFunPtr obj "opened" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DisplayOpenedSignalInfo
instance SignalInfo DisplayOpenedSignalInfo where
type HaskellCallbackType DisplayOpenedSignalInfo = DisplayOpenedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DisplayOpenedCallback cb
cb'' <- mk_DisplayOpenedCallback cb'
connectSignalFunPtr obj "opened" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display::opened"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#g:signal:opened"})
#endif
type DisplaySeatAddedCallback =
Gdk.Seat.Seat
-> IO ()
type C_DisplaySeatAddedCallback =
Ptr Display ->
Ptr Gdk.Seat.Seat ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DisplaySeatAddedCallback :: C_DisplaySeatAddedCallback -> IO (FunPtr C_DisplaySeatAddedCallback)
wrap_DisplaySeatAddedCallback ::
GObject a => (a -> DisplaySeatAddedCallback) ->
C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback :: forall a.
GObject a =>
(a -> DisplaySeatAddedCallback) -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback a -> DisplaySeatAddedCallback
gi'cb Ptr Display
gi'selfPtr Ptr Seat
seat Ptr ()
_ = do
seat' <- ((ManagedPtr Seat -> Seat) -> Ptr Seat -> IO Seat
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Seat -> Seat
Gdk.Seat.Seat) Ptr Seat
seat
B.ManagedPtr.withNewObject gi'selfPtr $ \Display
gi'self -> a -> DisplaySeatAddedCallback
gi'cb (Display -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Display
gi'self) Seat
seat'
onDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatAddedCallback) -> m SignalHandlerId
onDisplaySeatAdded :: forall a (m :: * -> *).
(IsDisplay a, MonadIO m) =>
a -> ((?self::a) => DisplaySeatAddedCallback) -> m SignalHandlerId
onDisplaySeatAdded a
obj (?self::a) => DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DisplaySeatAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DisplaySeatAddedCallback
DisplaySeatAddedCallback
cb
let wrapped' :: C_DisplaySeatAddedCallback
wrapped' = (a -> DisplaySeatAddedCallback) -> C_DisplaySeatAddedCallback
forall a.
GObject a =>
(a -> DisplaySeatAddedCallback) -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback a -> DisplaySeatAddedCallback
wrapped
wrapped'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatAddedCallback C_DisplaySeatAddedCallback
wrapped'
connectSignalFunPtr obj "seat-added" wrapped'' SignalConnectBefore Nothing
afterDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatAddedCallback) -> m SignalHandlerId
afterDisplaySeatAdded :: forall a (m :: * -> *).
(IsDisplay a, MonadIO m) =>
a -> ((?self::a) => DisplaySeatAddedCallback) -> m SignalHandlerId
afterDisplaySeatAdded a
obj (?self::a) => DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DisplaySeatAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DisplaySeatAddedCallback
DisplaySeatAddedCallback
cb
let wrapped' :: C_DisplaySeatAddedCallback
wrapped' = (a -> DisplaySeatAddedCallback) -> C_DisplaySeatAddedCallback
forall a.
GObject a =>
(a -> DisplaySeatAddedCallback) -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback a -> DisplaySeatAddedCallback
wrapped
wrapped'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatAddedCallback C_DisplaySeatAddedCallback
wrapped'
connectSignalFunPtr obj "seat-added" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DisplaySeatAddedSignalInfo
instance SignalInfo DisplaySeatAddedSignalInfo where
type HaskellCallbackType DisplaySeatAddedSignalInfo = DisplaySeatAddedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DisplaySeatAddedCallback cb
cb'' <- mk_DisplaySeatAddedCallback cb'
connectSignalFunPtr obj "seat-added" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display::seat-added"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#g:signal:seatAdded"})
#endif
type DisplaySeatRemovedCallback =
Gdk.Seat.Seat
-> IO ()
type C_DisplaySeatRemovedCallback =
Ptr Display ->
Ptr Gdk.Seat.Seat ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DisplaySeatRemovedCallback :: C_DisplaySeatRemovedCallback -> IO (FunPtr C_DisplaySeatRemovedCallback)
wrap_DisplaySeatRemovedCallback ::
GObject a => (a -> DisplaySeatRemovedCallback) ->
C_DisplaySeatRemovedCallback
wrap_DisplaySeatRemovedCallback :: forall a.
GObject a =>
(a -> DisplaySeatAddedCallback) -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback a -> DisplaySeatAddedCallback
gi'cb Ptr Display
gi'selfPtr Ptr Seat
seat Ptr ()
_ = do
seat' <- ((ManagedPtr Seat -> Seat) -> Ptr Seat -> IO Seat
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Seat -> Seat
Gdk.Seat.Seat) Ptr Seat
seat
B.ManagedPtr.withNewObject gi'selfPtr $ \Display
gi'self -> a -> DisplaySeatAddedCallback
gi'cb (Display -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Display
gi'self) Seat
seat'
onDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatRemovedCallback) -> m SignalHandlerId
onDisplaySeatRemoved :: forall a (m :: * -> *).
(IsDisplay a, MonadIO m) =>
a -> ((?self::a) => DisplaySeatAddedCallback) -> m SignalHandlerId
onDisplaySeatRemoved a
obj (?self::a) => DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DisplaySeatAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DisplaySeatAddedCallback
DisplaySeatAddedCallback
cb
let wrapped' :: C_DisplaySeatAddedCallback
wrapped' = (a -> DisplaySeatAddedCallback) -> C_DisplaySeatAddedCallback
forall a.
GObject a =>
(a -> DisplaySeatAddedCallback) -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback a -> DisplaySeatAddedCallback
wrapped
wrapped'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatRemovedCallback C_DisplaySeatAddedCallback
wrapped'
connectSignalFunPtr obj "seat-removed" wrapped'' SignalConnectBefore Nothing
afterDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatRemovedCallback) -> m SignalHandlerId
afterDisplaySeatRemoved :: forall a (m :: * -> *).
(IsDisplay a, MonadIO m) =>
a -> ((?self::a) => DisplaySeatAddedCallback) -> m SignalHandlerId
afterDisplaySeatRemoved a
obj (?self::a) => DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DisplaySeatAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DisplaySeatAddedCallback
DisplaySeatAddedCallback
cb
let wrapped' :: C_DisplaySeatAddedCallback
wrapped' = (a -> DisplaySeatAddedCallback) -> C_DisplaySeatAddedCallback
forall a.
GObject a =>
(a -> DisplaySeatAddedCallback) -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback a -> DisplaySeatAddedCallback
wrapped
wrapped'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatRemovedCallback C_DisplaySeatAddedCallback
wrapped'
connectSignalFunPtr obj "seat-removed" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DisplaySeatRemovedSignalInfo
instance SignalInfo DisplaySeatRemovedSignalInfo where
type HaskellCallbackType DisplaySeatRemovedSignalInfo = DisplaySeatRemovedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DisplaySeatRemovedCallback cb
cb'' <- mk_DisplaySeatRemovedCallback cb'
connectSignalFunPtr obj "seat-removed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display::seat-removed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#g:signal:seatRemoved"})
#endif
type DisplaySettingChangedCallback =
T.Text
-> IO ()
type C_DisplaySettingChangedCallback =
Ptr Display ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DisplaySettingChangedCallback :: C_DisplaySettingChangedCallback -> IO (FunPtr C_DisplaySettingChangedCallback)
wrap_DisplaySettingChangedCallback ::
GObject a => (a -> DisplaySettingChangedCallback) ->
C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback :: forall a.
GObject a =>
(a -> DisplaySettingChangedCallback)
-> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback a -> DisplaySettingChangedCallback
gi'cb Ptr Display
gi'selfPtr CString
setting Ptr ()
_ = do
setting' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
setting
B.ManagedPtr.withNewObject gi'selfPtr $ \Display
gi'self -> a -> DisplaySettingChangedCallback
gi'cb (Display -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Display
gi'self) Text
setting'
onDisplaySettingChanged :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySettingChangedCallback) -> m SignalHandlerId
onDisplaySettingChanged :: forall a (m :: * -> *).
(IsDisplay a, MonadIO m) =>
a
-> ((?self::a) => DisplaySettingChangedCallback)
-> m SignalHandlerId
onDisplaySettingChanged a
obj (?self::a) => DisplaySettingChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DisplaySettingChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DisplaySettingChangedCallback
DisplaySettingChangedCallback
cb
let wrapped' :: C_DisplaySettingChangedCallback
wrapped' = (a -> DisplaySettingChangedCallback)
-> C_DisplaySettingChangedCallback
forall a.
GObject a =>
(a -> DisplaySettingChangedCallback)
-> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback a -> DisplaySettingChangedCallback
wrapped
wrapped'' <- C_DisplaySettingChangedCallback
-> IO (FunPtr C_DisplaySettingChangedCallback)
mk_DisplaySettingChangedCallback C_DisplaySettingChangedCallback
wrapped'
connectSignalFunPtr obj "setting-changed" wrapped'' SignalConnectBefore Nothing
afterDisplaySettingChanged :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySettingChangedCallback) -> m SignalHandlerId
afterDisplaySettingChanged :: forall a (m :: * -> *).
(IsDisplay a, MonadIO m) =>
a
-> ((?self::a) => DisplaySettingChangedCallback)
-> m SignalHandlerId
afterDisplaySettingChanged a
obj (?self::a) => DisplaySettingChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DisplaySettingChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DisplaySettingChangedCallback
DisplaySettingChangedCallback
cb
let wrapped' :: C_DisplaySettingChangedCallback
wrapped' = (a -> DisplaySettingChangedCallback)
-> C_DisplaySettingChangedCallback
forall a.
GObject a =>
(a -> DisplaySettingChangedCallback)
-> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback a -> DisplaySettingChangedCallback
wrapped
wrapped'' <- C_DisplaySettingChangedCallback
-> IO (FunPtr C_DisplaySettingChangedCallback)
mk_DisplaySettingChangedCallback C_DisplaySettingChangedCallback
wrapped'
connectSignalFunPtr obj "setting-changed" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DisplaySettingChangedSignalInfo
instance SignalInfo DisplaySettingChangedSignalInfo where
type HaskellCallbackType DisplaySettingChangedSignalInfo = DisplaySettingChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DisplaySettingChangedCallback cb
cb'' <- mk_DisplaySettingChangedCallback cb'
connectSignalFunPtr obj "setting-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display::setting-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#g:signal:settingChanged"})
#endif
getDisplayComposited :: (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayComposited :: forall (m :: * -> *) o. (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayComposited o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"composited"
#if defined(ENABLE_OVERLOADING)
data DisplayCompositedPropertyInfo
instance AttrInfo DisplayCompositedPropertyInfo where
type AttrAllowedOps DisplayCompositedPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DisplayCompositedPropertyInfo = IsDisplay
type AttrSetTypeConstraint DisplayCompositedPropertyInfo = (~) ()
type AttrTransferTypeConstraint DisplayCompositedPropertyInfo = (~) ()
type AttrTransferType DisplayCompositedPropertyInfo = ()
type AttrGetType DisplayCompositedPropertyInfo = Bool
type AttrLabel DisplayCompositedPropertyInfo = "composited"
type AttrOrigin DisplayCompositedPropertyInfo = Display
attrGet = getDisplayComposited
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.composited"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#g:attr:composited"
})
#endif
getDisplayDmabufFormats :: (MonadIO m, IsDisplay o) => o -> m Gdk.DmabufFormats.DmabufFormats
getDisplayDmabufFormats :: forall (m :: * -> *) o.
(MonadIO m, IsDisplay o) =>
o -> m DmabufFormats
getDisplayDmabufFormats o
obj = IO DmabufFormats -> m DmabufFormats
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DmabufFormats -> m DmabufFormats)
-> IO DmabufFormats -> m DmabufFormats
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe DmabufFormats) -> IO DmabufFormats
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDisplayDmabufFormats" (IO (Maybe DmabufFormats) -> IO DmabufFormats)
-> IO (Maybe DmabufFormats) -> IO DmabufFormats
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DmabufFormats -> DmabufFormats)
-> IO (Maybe DmabufFormats)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"dmabuf-formats" ManagedPtr DmabufFormats -> DmabufFormats
Gdk.DmabufFormats.DmabufFormats
#if defined(ENABLE_OVERLOADING)
data DisplayDmabufFormatsPropertyInfo
instance AttrInfo DisplayDmabufFormatsPropertyInfo where
type AttrAllowedOps DisplayDmabufFormatsPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DisplayDmabufFormatsPropertyInfo = IsDisplay
type AttrSetTypeConstraint DisplayDmabufFormatsPropertyInfo = (~) ()
type AttrTransferTypeConstraint DisplayDmabufFormatsPropertyInfo = (~) ()
type AttrTransferType DisplayDmabufFormatsPropertyInfo = ()
type AttrGetType DisplayDmabufFormatsPropertyInfo = Gdk.DmabufFormats.DmabufFormats
type AttrLabel DisplayDmabufFormatsPropertyInfo = "dmabuf-formats"
type AttrOrigin DisplayDmabufFormatsPropertyInfo = Display
attrGet = getDisplayDmabufFormats
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.dmabufFormats"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#g:attr:dmabufFormats"
})
#endif
getDisplayInputShapes :: (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayInputShapes :: forall (m :: * -> *) o. (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayInputShapes o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"input-shapes"
#if defined(ENABLE_OVERLOADING)
data DisplayInputShapesPropertyInfo
instance AttrInfo DisplayInputShapesPropertyInfo where
type AttrAllowedOps DisplayInputShapesPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DisplayInputShapesPropertyInfo = IsDisplay
type AttrSetTypeConstraint DisplayInputShapesPropertyInfo = (~) ()
type AttrTransferTypeConstraint DisplayInputShapesPropertyInfo = (~) ()
type AttrTransferType DisplayInputShapesPropertyInfo = ()
type AttrGetType DisplayInputShapesPropertyInfo = Bool
type AttrLabel DisplayInputShapesPropertyInfo = "input-shapes"
type AttrOrigin DisplayInputShapesPropertyInfo = Display
attrGet = getDisplayInputShapes
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.inputShapes"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#g:attr:inputShapes"
})
#endif
getDisplayRgba :: (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayRgba :: forall (m :: * -> *) o. (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayRgba o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"rgba"
#if defined(ENABLE_OVERLOADING)
data DisplayRgbaPropertyInfo
instance AttrInfo DisplayRgbaPropertyInfo where
type AttrAllowedOps DisplayRgbaPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DisplayRgbaPropertyInfo = IsDisplay
type AttrSetTypeConstraint DisplayRgbaPropertyInfo = (~) ()
type AttrTransferTypeConstraint DisplayRgbaPropertyInfo = (~) ()
type AttrTransferType DisplayRgbaPropertyInfo = ()
type AttrGetType DisplayRgbaPropertyInfo = Bool
type AttrLabel DisplayRgbaPropertyInfo = "rgba"
type AttrOrigin DisplayRgbaPropertyInfo = Display
attrGet = getDisplayRgba
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.rgba"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#g:attr:rgba"
})
#endif
getDisplayShadowWidth :: (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayShadowWidth :: forall (m :: * -> *) o. (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayShadowWidth o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"shadow-width"
#if defined(ENABLE_OVERLOADING)
data DisplayShadowWidthPropertyInfo
instance AttrInfo DisplayShadowWidthPropertyInfo where
type AttrAllowedOps DisplayShadowWidthPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DisplayShadowWidthPropertyInfo = IsDisplay
type AttrSetTypeConstraint DisplayShadowWidthPropertyInfo = (~) ()
type AttrTransferTypeConstraint DisplayShadowWidthPropertyInfo = (~) ()
type AttrTransferType DisplayShadowWidthPropertyInfo = ()
type AttrGetType DisplayShadowWidthPropertyInfo = Bool
type AttrLabel DisplayShadowWidthPropertyInfo = "shadow-width"
type AttrOrigin DisplayShadowWidthPropertyInfo = Display
attrGet = getDisplayShadowWidth
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.shadowWidth"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#g:attr:shadowWidth"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Display
type instance O.AttributeList Display = DisplayAttributeList
type DisplayAttributeList = ('[ '("composited", DisplayCompositedPropertyInfo), '("dmabufFormats", DisplayDmabufFormatsPropertyInfo), '("inputShapes", DisplayInputShapesPropertyInfo), '("rgba", DisplayRgbaPropertyInfo), '("shadowWidth", DisplayShadowWidthPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
displayComposited :: AttrLabelProxy "composited"
displayComposited = AttrLabelProxy
displayDmabufFormats :: AttrLabelProxy "dmabufFormats"
displayDmabufFormats = AttrLabelProxy
displayInputShapes :: AttrLabelProxy "inputShapes"
displayInputShapes = AttrLabelProxy
displayRgba :: AttrLabelProxy "rgba"
displayRgba = AttrLabelProxy
displayShadowWidth :: AttrLabelProxy "shadowWidth"
displayShadowWidth = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Display = DisplaySignalList
type DisplaySignalList = ('[ '("closed", DisplayClosedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("opened", DisplayOpenedSignalInfo), '("seatAdded", DisplaySeatAddedSignalInfo), '("seatRemoved", DisplaySeatRemovedSignalInfo), '("settingChanged", DisplaySettingChangedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gdk_display_beep" gdk_display_beep ::
Ptr Display ->
IO ()
displayBeep ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m ()
displayBeep :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m ()
displayBeep a
display = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
gdk_display_beep display'
touchManagedPtr display
return ()
#if defined(ENABLE_OVERLOADING)
data DisplayBeepMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayBeepMethodInfo a signature where
overloadedMethod = displayBeep
instance O.OverloadedMethodInfo DisplayBeepMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayBeep",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayBeep"
})
#endif
foreign import ccall "gdk_display_close" gdk_display_close ::
Ptr Display ->
IO ()
displayClose ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m ()
displayClose :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m ()
displayClose a
display = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
gdk_display_close display'
touchManagedPtr display
return ()
#if defined(ENABLE_OVERLOADING)
data DisplayCloseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayCloseMethodInfo a signature where
overloadedMethod = displayClose
instance O.OverloadedMethodInfo DisplayCloseMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayClose",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayClose"
})
#endif
foreign import ccall "gdk_display_create_gl_context" gdk_display_create_gl_context ::
Ptr Display ->
Ptr (Ptr GError) ->
IO (Ptr Gdk.GLContext.GLContext)
displayCreateGlContext ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Gdk.GLContext.GLContext
displayCreateGlContext :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m GLContext
displayCreateGlContext a
self = IO GLContext -> m GLContext
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GLContext -> m GLContext) -> IO GLContext -> m GLContext
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
onException (do
result <- propagateGError $ gdk_display_create_gl_context self'
checkUnexpectedReturnNULL "displayCreateGlContext" result
result' <- (wrapObject Gdk.GLContext.GLContext) result
touchManagedPtr self
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data DisplayCreateGlContextMethodInfo
instance (signature ~ (m Gdk.GLContext.GLContext), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayCreateGlContextMethodInfo a signature where
overloadedMethod = displayCreateGlContext
instance O.OverloadedMethodInfo DisplayCreateGlContextMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayCreateGlContext",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayCreateGlContext"
})
#endif
foreign import ccall "gdk_display_device_is_grabbed" gdk_display_device_is_grabbed ::
Ptr Display ->
Ptr Gdk.Device.Device ->
IO CInt
displayDeviceIsGrabbed ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a, Gdk.Device.IsDevice b) =>
a
-> b
-> m Bool
displayDeviceIsGrabbed :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDisplay a, IsDevice b) =>
a -> b -> m Bool
displayDeviceIsGrabbed a
display b
device = IO Bool -> m Bool
forall a. IO a -> m a
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
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
device' <- unsafeManagedPtrCastPtr device
result <- gdk_display_device_is_grabbed display' device'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr display
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayDeviceIsGrabbedMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsDisplay a, Gdk.Device.IsDevice b) => O.OverloadedMethod DisplayDeviceIsGrabbedMethodInfo a signature where
overloadedMethod = displayDeviceIsGrabbed
instance O.OverloadedMethodInfo DisplayDeviceIsGrabbedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayDeviceIsGrabbed",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayDeviceIsGrabbed"
})
#endif
foreign import ccall "gdk_display_flush" gdk_display_flush ::
Ptr Display ->
IO ()
displayFlush ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m ()
displayFlush :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m ()
displayFlush a
display = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
gdk_display_flush display'
touchManagedPtr display
return ()
#if defined(ENABLE_OVERLOADING)
data DisplayFlushMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayFlushMethodInfo a signature where
overloadedMethod = displayFlush
instance O.OverloadedMethodInfo DisplayFlushMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayFlush",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayFlush"
})
#endif
foreign import ccall "gdk_display_get_app_launch_context" gdk_display_get_app_launch_context ::
Ptr Display ->
IO (Ptr Gdk.AppLaunchContext.AppLaunchContext)
displayGetAppLaunchContext ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Gdk.AppLaunchContext.AppLaunchContext
displayGetAppLaunchContext :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m AppLaunchContext
displayGetAppLaunchContext a
display = IO AppLaunchContext -> m AppLaunchContext
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AppLaunchContext -> m AppLaunchContext)
-> IO AppLaunchContext -> m AppLaunchContext
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_get_app_launch_context display'
checkUnexpectedReturnNULL "displayGetAppLaunchContext" result
result' <- (wrapObject Gdk.AppLaunchContext.AppLaunchContext) result
touchManagedPtr display
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetAppLaunchContextMethodInfo
instance (signature ~ (m Gdk.AppLaunchContext.AppLaunchContext), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayGetAppLaunchContextMethodInfo a signature where
overloadedMethod = displayGetAppLaunchContext
instance O.OverloadedMethodInfo DisplayGetAppLaunchContextMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayGetAppLaunchContext",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayGetAppLaunchContext"
})
#endif
foreign import ccall "gdk_display_get_clipboard" gdk_display_get_clipboard ::
Ptr Display ->
IO (Ptr Gdk.Clipboard.Clipboard)
displayGetClipboard ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Gdk.Clipboard.Clipboard
displayGetClipboard :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m Clipboard
displayGetClipboard a
display = IO Clipboard -> m Clipboard
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Clipboard -> m Clipboard) -> IO Clipboard -> m Clipboard
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_get_clipboard display'
checkUnexpectedReturnNULL "displayGetClipboard" result
result' <- (newObject Gdk.Clipboard.Clipboard) result
touchManagedPtr display
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetClipboardMethodInfo
instance (signature ~ (m Gdk.Clipboard.Clipboard), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayGetClipboardMethodInfo a signature where
overloadedMethod = displayGetClipboard
instance O.OverloadedMethodInfo DisplayGetClipboardMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayGetClipboard",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayGetClipboard"
})
#endif
foreign import ccall "gdk_display_get_default_seat" gdk_display_get_default_seat ::
Ptr Display ->
IO (Ptr Gdk.Seat.Seat)
displayGetDefaultSeat ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m (Maybe Gdk.Seat.Seat)
displayGetDefaultSeat :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m (Maybe Seat)
displayGetDefaultSeat a
display = IO (Maybe Seat) -> m (Maybe Seat)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Seat) -> m (Maybe Seat))
-> IO (Maybe Seat) -> m (Maybe Seat)
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_get_default_seat display'
maybeResult <- convertIfNonNull result $ \Ptr Seat
result' -> do
result'' <- ((ManagedPtr Seat -> Seat) -> Ptr Seat -> IO Seat
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Seat -> Seat
Gdk.Seat.Seat) Ptr Seat
result'
return result''
touchManagedPtr display
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DisplayGetDefaultSeatMethodInfo
instance (signature ~ (m (Maybe Gdk.Seat.Seat)), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayGetDefaultSeatMethodInfo a signature where
overloadedMethod = displayGetDefaultSeat
instance O.OverloadedMethodInfo DisplayGetDefaultSeatMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayGetDefaultSeat",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayGetDefaultSeat"
})
#endif
foreign import ccall "gdk_display_get_dmabuf_formats" gdk_display_get_dmabuf_formats ::
Ptr Display ->
IO (Ptr Gdk.DmabufFormats.DmabufFormats)
displayGetDmabufFormats ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Gdk.DmabufFormats.DmabufFormats
displayGetDmabufFormats :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m DmabufFormats
displayGetDmabufFormats a
display = IO DmabufFormats -> m DmabufFormats
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DmabufFormats -> m DmabufFormats)
-> IO DmabufFormats -> m DmabufFormats
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_get_dmabuf_formats display'
checkUnexpectedReturnNULL "displayGetDmabufFormats" result
result' <- (newBoxed Gdk.DmabufFormats.DmabufFormats) result
touchManagedPtr display
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetDmabufFormatsMethodInfo
instance (signature ~ (m Gdk.DmabufFormats.DmabufFormats), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayGetDmabufFormatsMethodInfo a signature where
overloadedMethod = displayGetDmabufFormats
instance O.OverloadedMethodInfo DisplayGetDmabufFormatsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayGetDmabufFormats",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayGetDmabufFormats"
})
#endif
foreign import ccall "gdk_display_get_monitor_at_surface" gdk_display_get_monitor_at_surface ::
Ptr Display ->
Ptr Gdk.Surface.Surface ->
IO (Ptr Gdk.Monitor.Monitor)
displayGetMonitorAtSurface ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a, Gdk.Surface.IsSurface b) =>
a
-> b
-> m (Maybe Gdk.Monitor.Monitor)
displayGetMonitorAtSurface :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDisplay a, IsSurface b) =>
a -> b -> m (Maybe Monitor)
displayGetMonitorAtSurface a
display b
surface = IO (Maybe Monitor) -> m (Maybe Monitor)
forall a. IO a -> m a
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
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
surface' <- unsafeManagedPtrCastPtr surface
result <- gdk_display_get_monitor_at_surface display' surface'
maybeResult <- convertIfNonNull result $ \Ptr Monitor
result' -> do
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'
return result''
touchManagedPtr display
touchManagedPtr surface
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DisplayGetMonitorAtSurfaceMethodInfo
instance (signature ~ (b -> m (Maybe Gdk.Monitor.Monitor)), MonadIO m, IsDisplay a, Gdk.Surface.IsSurface b) => O.OverloadedMethod DisplayGetMonitorAtSurfaceMethodInfo a signature where
overloadedMethod = displayGetMonitorAtSurface
instance O.OverloadedMethodInfo DisplayGetMonitorAtSurfaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayGetMonitorAtSurface",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayGetMonitorAtSurface"
})
#endif
foreign import ccall "gdk_display_get_monitors" gdk_display_get_monitors ::
Ptr Display ->
IO (Ptr Gio.ListModel.ListModel)
displayGetMonitors ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Gio.ListModel.ListModel
displayGetMonitors :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m ListModel
displayGetMonitors a
self = IO ListModel -> m ListModel
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ListModel -> m ListModel) -> IO ListModel -> m ListModel
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- gdk_display_get_monitors self'
checkUnexpectedReturnNULL "displayGetMonitors" result
result' <- (newObject Gio.ListModel.ListModel) result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetMonitorsMethodInfo
instance (signature ~ (m Gio.ListModel.ListModel), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayGetMonitorsMethodInfo a signature where
overloadedMethod = displayGetMonitors
instance O.OverloadedMethodInfo DisplayGetMonitorsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayGetMonitors",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayGetMonitors"
})
#endif
foreign import ccall "gdk_display_get_name" gdk_display_get_name ::
Ptr Display ->
IO CString
displayGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m T.Text
displayGetName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m Text
displayGetName a
display = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_get_name display'
checkUnexpectedReturnNULL "displayGetName" result
result' <- cstringToText result
touchManagedPtr display
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayGetNameMethodInfo a signature where
overloadedMethod = displayGetName
instance O.OverloadedMethodInfo DisplayGetNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayGetName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayGetName"
})
#endif
foreign import ccall "gdk_display_get_primary_clipboard" gdk_display_get_primary_clipboard ::
Ptr Display ->
IO (Ptr Gdk.Clipboard.Clipboard)
displayGetPrimaryClipboard ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Gdk.Clipboard.Clipboard
displayGetPrimaryClipboard :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m Clipboard
displayGetPrimaryClipboard a
display = IO Clipboard -> m Clipboard
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Clipboard -> m Clipboard) -> IO Clipboard -> m Clipboard
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_get_primary_clipboard display'
checkUnexpectedReturnNULL "displayGetPrimaryClipboard" result
result' <- (newObject Gdk.Clipboard.Clipboard) result
touchManagedPtr display
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetPrimaryClipboardMethodInfo
instance (signature ~ (m Gdk.Clipboard.Clipboard), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayGetPrimaryClipboardMethodInfo a signature where
overloadedMethod = displayGetPrimaryClipboard
instance O.OverloadedMethodInfo DisplayGetPrimaryClipboardMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayGetPrimaryClipboard",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayGetPrimaryClipboard"
})
#endif
foreign import ccall "gdk_display_get_setting" gdk_display_get_setting ::
Ptr Display ->
CString ->
Ptr GValue ->
IO CInt
displayGetSetting ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> T.Text
-> GValue
-> m Bool
displayGetSetting :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> Text -> GValue -> m Bool
displayGetSetting a
display Text
name GValue
value = IO Bool -> m Bool
forall a. IO a -> m a
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
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
name' <- textToCString name
value' <- unsafeManagedPtrGetPtr value
result <- gdk_display_get_setting display' name' value'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr display
touchManagedPtr value
freeMem name'
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetSettingMethodInfo
instance (signature ~ (T.Text -> GValue -> m Bool), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayGetSettingMethodInfo a signature where
overloadedMethod = displayGetSetting
instance O.OverloadedMethodInfo DisplayGetSettingMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayGetSetting",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayGetSetting"
})
#endif
foreign import ccall "gdk_display_get_startup_notification_id" gdk_display_get_startup_notification_id ::
Ptr Display ->
IO CString
{-# DEPRECATED displayGetStartupNotificationId ["(Since version 4.10)"] #-}
displayGetStartupNotificationId ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m (Maybe T.Text)
displayGetStartupNotificationId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m (Maybe Text)
displayGetStartupNotificationId a
display = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_get_startup_notification_id display'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
return result''
touchManagedPtr display
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DisplayGetStartupNotificationIdMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayGetStartupNotificationIdMethodInfo a signature where
overloadedMethod = displayGetStartupNotificationId
instance O.OverloadedMethodInfo DisplayGetStartupNotificationIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayGetStartupNotificationId",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayGetStartupNotificationId"
})
#endif
foreign import ccall "gdk_display_is_closed" gdk_display_is_closed ::
Ptr Display ->
IO CInt
displayIsClosed ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Bool
displayIsClosed :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m Bool
displayIsClosed a
display = IO Bool -> m Bool
forall a. IO a -> m a
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
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_is_closed display'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr display
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayIsClosedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayIsClosedMethodInfo a signature where
overloadedMethod = displayIsClosed
instance O.OverloadedMethodInfo DisplayIsClosedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayIsClosed",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayIsClosed"
})
#endif
foreign import ccall "gdk_display_is_composited" gdk_display_is_composited ::
Ptr Display ->
IO CInt
displayIsComposited ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Bool
displayIsComposited :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m Bool
displayIsComposited a
display = IO Bool -> m Bool
forall a. IO a -> m a
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
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_is_composited display'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr display
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayIsCompositedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayIsCompositedMethodInfo a signature where
overloadedMethod = displayIsComposited
instance O.OverloadedMethodInfo DisplayIsCompositedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayIsComposited",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayIsComposited"
})
#endif
foreign import ccall "gdk_display_is_rgba" gdk_display_is_rgba ::
Ptr Display ->
IO CInt
displayIsRgba ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Bool
displayIsRgba :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m Bool
displayIsRgba a
display = IO Bool -> m Bool
forall a. IO a -> m a
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
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_is_rgba display'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr display
return result'
#if defined(ENABLE_OVERLOADING)
data DisplayIsRgbaMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayIsRgbaMethodInfo a signature where
overloadedMethod = displayIsRgba
instance O.OverloadedMethodInfo DisplayIsRgbaMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayIsRgba",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayIsRgba"
})
#endif
foreign import ccall "gdk_display_list_seats" gdk_display_list_seats ::
Ptr Display ->
IO (Ptr (GList (Ptr Gdk.Seat.Seat)))
displayListSeats ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m [Gdk.Seat.Seat]
displayListSeats :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m [Seat]
displayListSeats a
display = IO [Seat] -> m [Seat]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Seat] -> m [Seat]) -> IO [Seat] -> m [Seat]
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_list_seats display'
result' <- unpackGList result
result'' <- mapM (newObject Gdk.Seat.Seat) result'
g_list_free result
touchManagedPtr display
return result''
#if defined(ENABLE_OVERLOADING)
data DisplayListSeatsMethodInfo
instance (signature ~ (m [Gdk.Seat.Seat]), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayListSeatsMethodInfo a signature where
overloadedMethod = displayListSeats
instance O.OverloadedMethodInfo DisplayListSeatsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayListSeats",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayListSeats"
})
#endif
foreign import ccall "gdk_display_map_keycode" gdk_display_map_keycode ::
Ptr Display ->
Word32 ->
Ptr (Ptr Gdk.KeymapKey.KeymapKey) ->
Ptr (Ptr Word32) ->
Ptr Int32 ->
IO CInt
displayMapKeycode ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> Word32
-> m ((Bool, [Gdk.KeymapKey.KeymapKey], [Word32]))
displayMapKeycode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> Word32 -> m (Bool, [KeymapKey], [Word32])
displayMapKeycode a
display Word32
keycode = IO (Bool, [KeymapKey], [Word32]) -> m (Bool, [KeymapKey], [Word32])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, [KeymapKey], [Word32])
-> m (Bool, [KeymapKey], [Word32]))
-> IO (Bool, [KeymapKey], [Word32])
-> m (Bool, [KeymapKey], [Word32])
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
keys <- callocMem :: IO (Ptr (Ptr Gdk.KeymapKey.KeymapKey))
keyvals <- callocMem :: IO (Ptr (Ptr Word32))
nEntries <- allocMem :: IO (Ptr Int32)
result <- gdk_display_map_keycode display' keycode keys keyvals nEntries
nEntries' <- peek nEntries
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
keys' <- peek keys
keys'' <- (unpackBlockArrayWithLength 12 nEntries') keys'
keys''' <- mapM (wrapPtr Gdk.KeymapKey.KeymapKey) keys''
freeMem keys'
keyvals' <- peek keyvals
keyvals'' <- (unpackStorableArrayWithLength nEntries') keyvals'
freeMem keyvals'
touchManagedPtr display
freeMem keys
freeMem keyvals
freeMem nEntries
return (result', keys''', keyvals'')
#if defined(ENABLE_OVERLOADING)
data DisplayMapKeycodeMethodInfo
instance (signature ~ (Word32 -> m ((Bool, [Gdk.KeymapKey.KeymapKey], [Word32]))), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayMapKeycodeMethodInfo a signature where
overloadedMethod = displayMapKeycode
instance O.OverloadedMethodInfo DisplayMapKeycodeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayMapKeycode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayMapKeycode"
})
#endif
foreign import ccall "gdk_display_map_keyval" gdk_display_map_keyval ::
Ptr Display ->
Word32 ->
Ptr (Ptr Gdk.KeymapKey.KeymapKey) ->
Ptr Int32 ->
IO CInt
displayMapKeyval ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> Word32
-> m ((Bool, [Gdk.KeymapKey.KeymapKey]))
displayMapKeyval :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> Word32 -> m (Bool, [KeymapKey])
displayMapKeyval a
display Word32
keyval = IO (Bool, [KeymapKey]) -> m (Bool, [KeymapKey])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, [KeymapKey]) -> m (Bool, [KeymapKey]))
-> IO (Bool, [KeymapKey]) -> m (Bool, [KeymapKey])
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
keys <- callocMem :: IO (Ptr (Ptr Gdk.KeymapKey.KeymapKey))
nKeys <- allocMem :: IO (Ptr Int32)
result <- gdk_display_map_keyval display' keyval keys nKeys
nKeys' <- peek nKeys
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
keys' <- peek keys
keys'' <- (unpackBlockArrayWithLength 12 nKeys') keys'
keys''' <- mapM (wrapPtr Gdk.KeymapKey.KeymapKey) keys''
freeMem keys'
touchManagedPtr display
freeMem keys
freeMem nKeys
return (result', keys''')
#if defined(ENABLE_OVERLOADING)
data DisplayMapKeyvalMethodInfo
instance (signature ~ (Word32 -> m ((Bool, [Gdk.KeymapKey.KeymapKey]))), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayMapKeyvalMethodInfo a signature where
overloadedMethod = displayMapKeyval
instance O.OverloadedMethodInfo DisplayMapKeyvalMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayMapKeyval",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayMapKeyval"
})
#endif
foreign import ccall "gdk_display_notify_startup_complete" gdk_display_notify_startup_complete ::
Ptr Display ->
CString ->
IO ()
{-# DEPRECATED displayNotifyStartupComplete ["(Since version 4.10)","Using 'GI.Gdk.Interfaces.Toplevel.toplevelSetStartupId' is sufficient"] #-}
displayNotifyStartupComplete ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> T.Text
-> m ()
displayNotifyStartupComplete :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> Text -> m ()
displayNotifyStartupComplete a
display Text
startupId = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
startupId' <- textToCString startupId
gdk_display_notify_startup_complete display' startupId'
touchManagedPtr display
freeMem startupId'
return ()
#if defined(ENABLE_OVERLOADING)
data DisplayNotifyStartupCompleteMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayNotifyStartupCompleteMethodInfo a signature where
overloadedMethod = displayNotifyStartupComplete
instance O.OverloadedMethodInfo DisplayNotifyStartupCompleteMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayNotifyStartupComplete",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayNotifyStartupComplete"
})
#endif
foreign import ccall "gdk_display_prepare_gl" gdk_display_prepare_gl ::
Ptr Display ->
Ptr (Ptr GError) ->
IO CInt
displayPrepareGl ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m ()
displayPrepareGl :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m ()
displayPrepareGl a
self = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
onException (do
_ <- propagateGError $ gdk_display_prepare_gl self'
touchManagedPtr self
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data DisplayPrepareGlMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayPrepareGlMethodInfo a signature where
overloadedMethod = displayPrepareGl
instance O.OverloadedMethodInfo DisplayPrepareGlMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayPrepareGl",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayPrepareGl"
})
#endif
foreign import ccall "gdk_display_put_event" gdk_display_put_event ::
Ptr Display ->
Ptr Gdk.Event.Event ->
IO ()
{-# DEPRECATED displayPutEvent ["(Since version 4.10)","This function is only useful in very","special situations and should not be used by applications."] #-}
displayPutEvent ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a, Gdk.Event.IsEvent b) =>
a
-> b
-> m ()
displayPutEvent :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDisplay a, IsEvent b) =>
a -> b -> m ()
displayPutEvent a
display b
event = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
event' <- unsafeManagedPtrCastPtr event
gdk_display_put_event display' event'
touchManagedPtr display
touchManagedPtr event
return ()
#if defined(ENABLE_OVERLOADING)
data DisplayPutEventMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDisplay a, Gdk.Event.IsEvent b) => O.OverloadedMethod DisplayPutEventMethodInfo a signature where
overloadedMethod = displayPutEvent
instance O.OverloadedMethodInfo DisplayPutEventMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayPutEvent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayPutEvent"
})
#endif
foreign import ccall "gdk_display_supports_input_shapes" gdk_display_supports_input_shapes ::
Ptr Display ->
IO CInt
displaySupportsInputShapes ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Bool
displaySupportsInputShapes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m Bool
displaySupportsInputShapes a
display = IO Bool -> m Bool
forall a. IO a -> m a
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
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_supports_input_shapes display'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr display
return result'
#if defined(ENABLE_OVERLOADING)
data DisplaySupportsInputShapesMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplaySupportsInputShapesMethodInfo a signature where
overloadedMethod = displaySupportsInputShapes
instance O.OverloadedMethodInfo DisplaySupportsInputShapesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displaySupportsInputShapes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displaySupportsInputShapes"
})
#endif
foreign import ccall "gdk_display_supports_shadow_width" gdk_display_supports_shadow_width ::
Ptr Display ->
IO CInt
displaySupportsShadowWidth ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Bool
displaySupportsShadowWidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m Bool
displaySupportsShadowWidth a
display = IO Bool -> m Bool
forall a. IO a -> m a
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
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
result <- gdk_display_supports_shadow_width display'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr display
return result'
#if defined(ENABLE_OVERLOADING)
data DisplaySupportsShadowWidthMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplaySupportsShadowWidthMethodInfo a signature where
overloadedMethod = displaySupportsShadowWidth
instance O.OverloadedMethodInfo DisplaySupportsShadowWidthMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displaySupportsShadowWidth",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displaySupportsShadowWidth"
})
#endif
foreign import ccall "gdk_display_sync" gdk_display_sync ::
Ptr Display ->
IO ()
displaySync ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m ()
displaySync :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a -> m ()
displaySync a
display = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
gdk_display_sync display'
touchManagedPtr display
return ()
#if defined(ENABLE_OVERLOADING)
data DisplaySyncMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplaySyncMethodInfo a signature where
overloadedMethod = displaySync
instance O.OverloadedMethodInfo DisplaySyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displaySync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displaySync"
})
#endif
foreign import ccall "gdk_display_translate_key" gdk_display_translate_key ::
Ptr Display ->
Word32 ->
CUInt ->
Int32 ->
Ptr Word32 ->
Ptr Int32 ->
Ptr Int32 ->
Ptr CUInt ->
IO CInt
displayTranslateKey ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> Word32
-> [Gdk.Flags.ModifierType]
-> Int32
-> m ((Bool, Word32, Int32, Int32, [Gdk.Flags.ModifierType]))
displayTranslateKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDisplay a) =>
a
-> Word32
-> [ModifierType]
-> Int32
-> m (Bool, Word32, Int32, Int32, [ModifierType])
displayTranslateKey a
display Word32
keycode [ModifierType]
state Int32
group = IO (Bool, Word32, Int32, Int32, [ModifierType])
-> m (Bool, Word32, Int32, Int32, [ModifierType])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word32, Int32, Int32, [ModifierType])
-> m (Bool, Word32, Int32, Int32, [ModifierType]))
-> IO (Bool, Word32, Int32, Int32, [ModifierType])
-> m (Bool, Word32, Int32, Int32, [ModifierType])
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
let state' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
state
keyval <- allocMem :: IO (Ptr Word32)
effectiveGroup <- allocMem :: IO (Ptr Int32)
level <- allocMem :: IO (Ptr Int32)
consumed <- allocMem :: IO (Ptr CUInt)
result <- gdk_display_translate_key display' keycode state' group keyval effectiveGroup level consumed
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
keyval' <- peek keyval
effectiveGroup' <- peek effectiveGroup
level' <- peek level
consumed' <- peek consumed
let consumed'' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
consumed'
touchManagedPtr display
freeMem keyval
freeMem effectiveGroup
freeMem level
freeMem consumed
return (result', keyval', effectiveGroup', level', consumed'')
#if defined(ENABLE_OVERLOADING)
data DisplayTranslateKeyMethodInfo
instance (signature ~ (Word32 -> [Gdk.Flags.ModifierType] -> Int32 -> m ((Bool, Word32, Int32, Int32, [Gdk.Flags.ModifierType]))), MonadIO m, IsDisplay a) => O.OverloadedMethod DisplayTranslateKeyMethodInfo a signature where
overloadedMethod = displayTranslateKey
instance O.OverloadedMethodInfo DisplayTranslateKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Display.displayTranslateKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-Display.html#v:displayTranslateKey"
})
#endif
foreign import ccall "gdk_display_get_default" gdk_display_get_default ::
IO (Ptr Display)
displayGetDefault ::
(B.CallStack.HasCallStack, MonadIO m) =>
m (Maybe Display)
displayGetDefault :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
m (Maybe Display)
displayGetDefault = IO (Maybe Display) -> m (Maybe Display)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Display) -> m (Maybe Display))
-> IO (Maybe Display) -> m (Maybe Display)
forall a b. (a -> b) -> a -> b
$ do
result <- IO (Ptr Display)
gdk_display_get_default
maybeResult <- convertIfNonNull result $ \Ptr Display
result' -> do
result'' <- ((ManagedPtr Display -> Display) -> Ptr Display -> IO Display
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Display -> Display
Display) Ptr Display
result'
return result''
return maybeResult
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_display_open" gdk_display_open ::
CString ->
IO (Ptr Display)
displayOpen ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe (T.Text)
-> m (Maybe Display)
displayOpen :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Maybe Text -> m (Maybe Display)
displayOpen Maybe Text
displayName = IO (Maybe Display) -> m (Maybe Display)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Display) -> m (Maybe Display))
-> IO (Maybe Display) -> m (Maybe Display)
forall a b. (a -> b) -> a -> b
$ do
maybeDisplayName <- case Maybe Text
displayName of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jDisplayName -> do
jDisplayName' <- Text -> IO CString
textToCString Text
jDisplayName
return jDisplayName'
result <- gdk_display_open maybeDisplayName
maybeResult <- convertIfNonNull result $ \Ptr Display
result' -> do
result'' <- ((ManagedPtr Display -> Display) -> Ptr Display -> IO Display
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Display -> Display
Display) Ptr Display
result'
return result''
freeMem maybeDisplayName
return maybeResult
#if defined(ENABLE_OVERLOADING)
#endif