{-# LANGUAGE 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)
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)
DisplayGetDefaultGroupMethodInfo ,
#endif
displayGetDefaultGroup ,
#if defined(ENABLE_OVERLOADING)
DisplayGetDefaultSeatMethodInfo ,
#endif
displayGetDefaultSeat ,
#if defined(ENABLE_OVERLOADING)
DisplayGetEventMethodInfo ,
#endif
displayGetEvent ,
#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)
DisplayHasPendingMethodInfo ,
#endif
displayHasPending ,
#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)
DisplayPeekEventMethodInfo ,
#endif
displayPeekEvent ,
#if defined(ENABLE_OVERLOADING)
DisplayPutEventMethodInfo ,
#endif
displayPutEvent ,
#if defined(ENABLE_OVERLOADING)
DisplaySupportsInputShapesMethodInfo ,
#endif
displaySupportsInputShapes ,
#if defined(ENABLE_OVERLOADING)
DisplaySyncMethodInfo ,
#endif
displaySync ,
#if defined(ENABLE_OVERLOADING)
DisplayCompositedPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
displayComposited ,
#endif
getDisplayComposited ,
#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 ,
C_DisplayClosedCallback ,
DisplayClosedCallback ,
#if defined(ENABLE_OVERLOADING)
DisplayClosedSignalInfo ,
#endif
afterDisplayClosed ,
genClosure_DisplayClosed ,
mk_DisplayClosedCallback ,
noDisplayClosedCallback ,
onDisplayClosed ,
wrap_DisplayClosedCallback ,
C_DisplayOpenedCallback ,
DisplayOpenedCallback ,
#if defined(ENABLE_OVERLOADING)
DisplayOpenedSignalInfo ,
#endif
afterDisplayOpened ,
genClosure_DisplayOpened ,
mk_DisplayOpenedCallback ,
noDisplayOpenedCallback ,
onDisplayOpened ,
wrap_DisplayOpenedCallback ,
C_DisplaySeatAddedCallback ,
DisplaySeatAddedCallback ,
#if defined(ENABLE_OVERLOADING)
DisplaySeatAddedSignalInfo ,
#endif
afterDisplaySeatAdded ,
genClosure_DisplaySeatAdded ,
mk_DisplaySeatAddedCallback ,
noDisplaySeatAddedCallback ,
onDisplaySeatAdded ,
wrap_DisplaySeatAddedCallback ,
C_DisplaySeatRemovedCallback ,
DisplaySeatRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
DisplaySeatRemovedSignalInfo ,
#endif
afterDisplaySeatRemoved ,
genClosure_DisplaySeatRemoved ,
mk_DisplaySeatRemovedCallback ,
noDisplaySeatRemovedCallback ,
onDisplaySeatRemoved ,
wrap_DisplaySeatRemovedCallback ,
C_DisplaySettingChangedCallback ,
DisplaySettingChangedCallback ,
#if defined(ENABLE_OVERLOADING)
DisplaySettingChangedSignalInfo ,
#endif
afterDisplaySettingChanged ,
genClosure_DisplaySettingChanged ,
mk_DisplaySettingChangedCallback ,
noDisplaySettingChangedCallback ,
onDisplaySettingChanged ,
wrap_DisplaySettingChangedCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# 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.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.KeymapKey as Gdk.KeymapKey
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
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
/= :: Display -> Display -> Bool
$c/= :: Display -> Display -> Bool
== :: Display -> Display -> Bool
$c== :: 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
instance B.GValue.IsGValue Display where
toGValue :: Display -> IO GValue
toGValue Display
o = do
GType
gtype <- IO GType
c_gdk_display_get_type
Display -> (Ptr Display -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Display
o (GType
-> (GValue -> Ptr Display -> IO ()) -> Ptr Display -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Display -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Display
fromGValue GValue
gv = do
Ptr Display
ptr <- GValue -> IO (Ptr Display)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Display)
(ManagedPtr Display -> Display) -> Ptr Display -> IO Display
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Display -> Display
Display Ptr Display
ptr
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 :: (MonadIO m, IsDisplay o) => o -> m Display
toDisplay :: o -> m Display
toDisplay = IO Display -> m Display
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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'
unsafeCastTo ManagedPtr Display -> Display
Display
#if defined(ENABLE_OVERLOADING)
type family ResolveDisplayMethod (t :: Symbol) (o :: *) :: * where
ResolveDisplayMethod "beep" o = DisplayBeepMethodInfo
ResolveDisplayMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDisplayMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDisplayMethod "close" o = DisplayCloseMethodInfo
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 "hasPending" o = DisplayHasPendingMethodInfo
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 "peekEvent" o = DisplayPeekEventMethodInfo
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 "sync" o = DisplaySyncMethodInfo
ResolveDisplayMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
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 "getDefaultGroup" o = DisplayGetDefaultGroupMethodInfo
ResolveDisplayMethod "getDefaultSeat" o = DisplayGetDefaultSeatMethodInfo
ResolveDisplayMethod "getEvent" o = DisplayGetEventMethodInfo
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.MethodInfo 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
#endif
type DisplayClosedCallback =
Bool
-> IO ()
noDisplayClosedCallback :: Maybe DisplayClosedCallback
noDisplayClosedCallback :: Maybe DisplayClosedCallback
noDisplayClosedCallback = Maybe DisplayClosedCallback
forall a. Maybe a
Nothing
type C_DisplayClosedCallback =
Ptr () ->
CInt ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DisplayClosedCallback :: C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
genClosure_DisplayClosed :: MonadIO m => DisplayClosedCallback -> m (GClosure C_DisplayClosedCallback)
genClosure_DisplayClosed :: DisplayClosedCallback -> m (GClosure C_DisplayClosedCallback)
genClosure_DisplayClosed DisplayClosedCallback
cb = IO (GClosure C_DisplayClosedCallback)
-> m (GClosure C_DisplayClosedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplayClosedCallback)
-> m (GClosure C_DisplayClosedCallback))
-> IO (GClosure C_DisplayClosedCallback)
-> m (GClosure C_DisplayClosedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DisplayClosedCallback
cb' = DisplayClosedCallback -> C_DisplayClosedCallback
wrap_DisplayClosedCallback DisplayClosedCallback
cb
C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
mk_DisplayClosedCallback C_DisplayClosedCallback
cb' IO (FunPtr C_DisplayClosedCallback)
-> (FunPtr C_DisplayClosedCallback
-> IO (GClosure C_DisplayClosedCallback))
-> IO (GClosure C_DisplayClosedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplayClosedCallback
-> IO (GClosure C_DisplayClosedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DisplayClosedCallback ::
DisplayClosedCallback ->
C_DisplayClosedCallback
wrap_DisplayClosedCallback :: DisplayClosedCallback -> C_DisplayClosedCallback
wrap_DisplayClosedCallback DisplayClosedCallback
_cb Ptr ()
_ CInt
isError Ptr ()
_ = do
let isError' :: Bool
isError' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
isError
DisplayClosedCallback
_cb Bool
isError'
onDisplayClosed :: (IsDisplay a, MonadIO m) => a -> DisplayClosedCallback -> m SignalHandlerId
onDisplayClosed :: a -> DisplayClosedCallback -> m SignalHandlerId
onDisplayClosed a
obj DisplayClosedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_DisplayClosedCallback
cb' = DisplayClosedCallback -> C_DisplayClosedCallback
wrap_DisplayClosedCallback DisplayClosedCallback
cb
FunPtr C_DisplayClosedCallback
cb'' <- C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
mk_DisplayClosedCallback C_DisplayClosedCallback
cb'
a
-> Text
-> FunPtr C_DisplayClosedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"closed" FunPtr C_DisplayClosedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDisplayClosed :: (IsDisplay a, MonadIO m) => a -> DisplayClosedCallback -> m SignalHandlerId
afterDisplayClosed :: a -> DisplayClosedCallback -> m SignalHandlerId
afterDisplayClosed a
obj DisplayClosedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_DisplayClosedCallback
cb' = DisplayClosedCallback -> C_DisplayClosedCallback
wrap_DisplayClosedCallback DisplayClosedCallback
cb
FunPtr C_DisplayClosedCallback
cb'' <- C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
mk_DisplayClosedCallback C_DisplayClosedCallback
cb'
a
-> Text
-> FunPtr C_DisplayClosedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"closed" FunPtr C_DisplayClosedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
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
#endif
type DisplayOpenedCallback =
IO ()
noDisplayOpenedCallback :: Maybe DisplayOpenedCallback
noDisplayOpenedCallback :: Maybe (IO ())
noDisplayOpenedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_DisplayOpenedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DisplayOpenedCallback :: C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
genClosure_DisplayOpened :: MonadIO m => DisplayOpenedCallback -> m (GClosure C_DisplayOpenedCallback)
genClosure_DisplayOpened :: IO () -> m (GClosure C_DisplayOpenedCallback)
genClosure_DisplayOpened IO ()
cb = IO (GClosure C_DisplayOpenedCallback)
-> m (GClosure C_DisplayOpenedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplayOpenedCallback)
-> m (GClosure C_DisplayOpenedCallback))
-> IO (GClosure C_DisplayOpenedCallback)
-> m (GClosure C_DisplayOpenedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DisplayOpenedCallback
cb' = IO () -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback IO ()
cb
C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
mk_DisplayOpenedCallback C_DisplayOpenedCallback
cb' IO (FunPtr C_DisplayOpenedCallback)
-> (FunPtr C_DisplayOpenedCallback
-> IO (GClosure C_DisplayOpenedCallback))
-> IO (GClosure C_DisplayOpenedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplayOpenedCallback
-> IO (GClosure C_DisplayOpenedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DisplayOpenedCallback ::
DisplayOpenedCallback ->
C_DisplayOpenedCallback
wrap_DisplayOpenedCallback :: IO () -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onDisplayOpened :: (IsDisplay a, MonadIO m) => a -> DisplayOpenedCallback -> m SignalHandlerId
onDisplayOpened :: a -> IO () -> m SignalHandlerId
onDisplayOpened a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_DisplayOpenedCallback
cb' = IO () -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback IO ()
cb
FunPtr C_DisplayOpenedCallback
cb'' <- C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
mk_DisplayOpenedCallback C_DisplayOpenedCallback
cb'
a
-> Text
-> FunPtr C_DisplayOpenedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"opened" FunPtr C_DisplayOpenedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDisplayOpened :: (IsDisplay a, MonadIO m) => a -> DisplayOpenedCallback -> m SignalHandlerId
afterDisplayOpened :: a -> IO () -> m SignalHandlerId
afterDisplayOpened a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_DisplayOpenedCallback
cb' = IO () -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback IO ()
cb
FunPtr C_DisplayOpenedCallback
cb'' <- C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
mk_DisplayOpenedCallback C_DisplayOpenedCallback
cb'
a
-> Text
-> FunPtr C_DisplayOpenedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"opened" FunPtr C_DisplayOpenedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
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
#endif
type DisplaySeatAddedCallback =
Gdk.Seat.Seat
-> IO ()
noDisplaySeatAddedCallback :: Maybe DisplaySeatAddedCallback
noDisplaySeatAddedCallback :: Maybe DisplaySeatAddedCallback
noDisplaySeatAddedCallback = Maybe DisplaySeatAddedCallback
forall a. Maybe a
Nothing
type C_DisplaySeatAddedCallback =
Ptr () ->
Ptr Gdk.Seat.Seat ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DisplaySeatAddedCallback :: C_DisplaySeatAddedCallback -> IO (FunPtr C_DisplaySeatAddedCallback)
genClosure_DisplaySeatAdded :: MonadIO m => DisplaySeatAddedCallback -> m (GClosure C_DisplaySeatAddedCallback)
genClosure_DisplaySeatAdded :: DisplaySeatAddedCallback -> m (GClosure C_DisplaySeatAddedCallback)
genClosure_DisplaySeatAdded DisplaySeatAddedCallback
cb = IO (GClosure C_DisplaySeatAddedCallback)
-> m (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplaySeatAddedCallback)
-> m (GClosure C_DisplaySeatAddedCallback))
-> IO (GClosure C_DisplaySeatAddedCallback)
-> m (GClosure C_DisplaySeatAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback DisplaySeatAddedCallback
cb
C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatAddedCallback C_DisplaySeatAddedCallback
cb' IO (FunPtr C_DisplaySeatAddedCallback)
-> (FunPtr C_DisplaySeatAddedCallback
-> IO (GClosure C_DisplaySeatAddedCallback))
-> IO (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplaySeatAddedCallback
-> IO (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DisplaySeatAddedCallback ::
DisplaySeatAddedCallback ->
C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback :: DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback DisplaySeatAddedCallback
_cb Ptr ()
_ Ptr Seat
seat Ptr ()
_ = do
Seat
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
DisplaySeatAddedCallback
_cb Seat
seat'
onDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> DisplaySeatAddedCallback -> m SignalHandlerId
onDisplaySeatAdded :: a -> DisplaySeatAddedCallback -> m SignalHandlerId
onDisplaySeatAdded a
obj DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback DisplaySeatAddedCallback
cb
FunPtr C_DisplaySeatAddedCallback
cb'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatAddedCallback C_DisplaySeatAddedCallback
cb'
a
-> Text
-> FunPtr C_DisplaySeatAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"seat-added" FunPtr C_DisplaySeatAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> DisplaySeatAddedCallback -> m SignalHandlerId
afterDisplaySeatAdded :: a -> DisplaySeatAddedCallback -> m SignalHandlerId
afterDisplaySeatAdded a
obj DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback DisplaySeatAddedCallback
cb
FunPtr C_DisplaySeatAddedCallback
cb'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatAddedCallback C_DisplaySeatAddedCallback
cb'
a
-> Text
-> FunPtr C_DisplaySeatAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"seat-added" FunPtr C_DisplaySeatAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
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
#endif
type DisplaySeatRemovedCallback =
Gdk.Seat.Seat
-> IO ()
noDisplaySeatRemovedCallback :: Maybe DisplaySeatRemovedCallback
noDisplaySeatRemovedCallback :: Maybe DisplaySeatAddedCallback
noDisplaySeatRemovedCallback = Maybe DisplaySeatAddedCallback
forall a. Maybe a
Nothing
type C_DisplaySeatRemovedCallback =
Ptr () ->
Ptr Gdk.Seat.Seat ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DisplaySeatRemovedCallback :: C_DisplaySeatRemovedCallback -> IO (FunPtr C_DisplaySeatRemovedCallback)
genClosure_DisplaySeatRemoved :: MonadIO m => DisplaySeatRemovedCallback -> m (GClosure C_DisplaySeatRemovedCallback)
genClosure_DisplaySeatRemoved :: DisplaySeatAddedCallback -> m (GClosure C_DisplaySeatAddedCallback)
genClosure_DisplaySeatRemoved DisplaySeatAddedCallback
cb = IO (GClosure C_DisplaySeatAddedCallback)
-> m (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplaySeatAddedCallback)
-> m (GClosure C_DisplaySeatAddedCallback))
-> IO (GClosure C_DisplaySeatAddedCallback)
-> m (GClosure C_DisplaySeatAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback DisplaySeatAddedCallback
cb
C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatRemovedCallback C_DisplaySeatAddedCallback
cb' IO (FunPtr C_DisplaySeatAddedCallback)
-> (FunPtr C_DisplaySeatAddedCallback
-> IO (GClosure C_DisplaySeatAddedCallback))
-> IO (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplaySeatAddedCallback
-> IO (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DisplaySeatRemovedCallback ::
DisplaySeatRemovedCallback ->
C_DisplaySeatRemovedCallback
wrap_DisplaySeatRemovedCallback :: DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback DisplaySeatAddedCallback
_cb Ptr ()
_ Ptr Seat
seat Ptr ()
_ = do
Seat
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
DisplaySeatAddedCallback
_cb Seat
seat'
onDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> DisplaySeatRemovedCallback -> m SignalHandlerId
onDisplaySeatRemoved :: a -> DisplaySeatAddedCallback -> m SignalHandlerId
onDisplaySeatRemoved a
obj DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback DisplaySeatAddedCallback
cb
FunPtr C_DisplaySeatAddedCallback
cb'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatRemovedCallback C_DisplaySeatAddedCallback
cb'
a
-> Text
-> FunPtr C_DisplaySeatAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"seat-removed" FunPtr C_DisplaySeatAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> DisplaySeatRemovedCallback -> m SignalHandlerId
afterDisplaySeatRemoved :: a -> DisplaySeatAddedCallback -> m SignalHandlerId
afterDisplaySeatRemoved a
obj DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback DisplaySeatAddedCallback
cb
FunPtr C_DisplaySeatAddedCallback
cb'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatRemovedCallback C_DisplaySeatAddedCallback
cb'
a
-> Text
-> FunPtr C_DisplaySeatAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"seat-removed" FunPtr C_DisplaySeatAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
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
#endif
type DisplaySettingChangedCallback =
T.Text
-> IO ()
noDisplaySettingChangedCallback :: Maybe DisplaySettingChangedCallback
noDisplaySettingChangedCallback :: Maybe DisplaySettingChangedCallback
noDisplaySettingChangedCallback = Maybe DisplaySettingChangedCallback
forall a. Maybe a
Nothing
type C_DisplaySettingChangedCallback =
Ptr () ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DisplaySettingChangedCallback :: C_DisplaySettingChangedCallback -> IO (FunPtr C_DisplaySettingChangedCallback)
genClosure_DisplaySettingChanged :: MonadIO m => DisplaySettingChangedCallback -> m (GClosure C_DisplaySettingChangedCallback)
genClosure_DisplaySettingChanged :: DisplaySettingChangedCallback
-> m (GClosure C_DisplaySettingChangedCallback)
genClosure_DisplaySettingChanged DisplaySettingChangedCallback
cb = IO (GClosure C_DisplaySettingChangedCallback)
-> m (GClosure C_DisplaySettingChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplaySettingChangedCallback)
-> m (GClosure C_DisplaySettingChangedCallback))
-> IO (GClosure C_DisplaySettingChangedCallback)
-> m (GClosure C_DisplaySettingChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DisplaySettingChangedCallback
cb' = DisplaySettingChangedCallback -> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback DisplaySettingChangedCallback
cb
C_DisplaySettingChangedCallback
-> IO (FunPtr C_DisplaySettingChangedCallback)
mk_DisplaySettingChangedCallback C_DisplaySettingChangedCallback
cb' IO (FunPtr C_DisplaySettingChangedCallback)
-> (FunPtr C_DisplaySettingChangedCallback
-> IO (GClosure C_DisplaySettingChangedCallback))
-> IO (GClosure C_DisplaySettingChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplaySettingChangedCallback
-> IO (GClosure C_DisplaySettingChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DisplaySettingChangedCallback ::
DisplaySettingChangedCallback ->
C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback :: DisplaySettingChangedCallback -> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback DisplaySettingChangedCallback
_cb Ptr ()
_ CString
setting Ptr ()
_ = do
Text
setting' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
setting
DisplaySettingChangedCallback
_cb Text
setting'
onDisplaySettingChanged :: (IsDisplay a, MonadIO m) => a -> DisplaySettingChangedCallback -> m SignalHandlerId
onDisplaySettingChanged :: a -> DisplaySettingChangedCallback -> m SignalHandlerId
onDisplaySettingChanged a
obj DisplaySettingChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_DisplaySettingChangedCallback
cb' = DisplaySettingChangedCallback -> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback DisplaySettingChangedCallback
cb
FunPtr C_DisplaySettingChangedCallback
cb'' <- C_DisplaySettingChangedCallback
-> IO (FunPtr C_DisplaySettingChangedCallback)
mk_DisplaySettingChangedCallback C_DisplaySettingChangedCallback
cb'
a
-> Text
-> FunPtr C_DisplaySettingChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"setting-changed" FunPtr C_DisplaySettingChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDisplaySettingChanged :: (IsDisplay a, MonadIO m) => a -> DisplaySettingChangedCallback -> m SignalHandlerId
afterDisplaySettingChanged :: a -> DisplaySettingChangedCallback -> m SignalHandlerId
afterDisplaySettingChanged a
obj DisplaySettingChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_DisplaySettingChangedCallback
cb' = DisplaySettingChangedCallback -> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback DisplaySettingChangedCallback
cb
FunPtr C_DisplaySettingChangedCallback
cb'' <- C_DisplaySettingChangedCallback
-> IO (FunPtr C_DisplaySettingChangedCallback)
mk_DisplaySettingChangedCallback C_DisplaySettingChangedCallback
cb'
a
-> Text
-> FunPtr C_DisplaySettingChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"setting-changed" FunPtr C_DisplaySettingChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
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
#endif
getDisplayComposited :: (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayComposited :: o -> m Bool
getDisplayComposited o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ 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
#endif
getDisplayInputShapes :: (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayInputShapes :: o -> m Bool
getDisplayInputShapes o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ 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
#endif
getDisplayRgba :: (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayRgba :: o -> m Bool
getDisplayRgba o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ 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
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Display
type instance O.AttributeList Display = DisplayAttributeList
type DisplayAttributeList = ('[ '("composited", DisplayCompositedPropertyInfo), '("inputShapes", DisplayInputShapesPropertyInfo), '("rgba", DisplayRgbaPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
displayComposited :: AttrLabelProxy "composited"
displayComposited = AttrLabelProxy
displayInputShapes :: AttrLabelProxy "inputShapes"
displayInputShapes = AttrLabelProxy
displayRgba :: AttrLabelProxy "rgba"
displayRgba = 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, *)])
#endif
foreign import ccall "gdk_display_beep" gdk_display_beep ::
Ptr Display ->
IO ()
displayBeep ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m ()
displayBeep :: a -> m ()
displayBeep a
display = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Display -> IO ()
gdk_display_beep Ptr Display
display'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DisplayBeepMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.MethodInfo DisplayBeepMethodInfo a signature where
overloadedMethod = 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 :: a -> m ()
displayClose a
display = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Display -> IO ()
gdk_display_close Ptr Display
display'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DisplayCloseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.MethodInfo DisplayCloseMethodInfo a signature where
overloadedMethod = displayClose
#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 :: a -> b -> m Bool
displayDeviceIsGrabbed a
display b
device = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
CInt
result <- Ptr Display -> Ptr Device -> IO CInt
gdk_display_device_is_grabbed Ptr Display
display' Ptr Device
device'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DisplayDeviceIsGrabbedMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsDisplay a, Gdk.Device.IsDevice b) => O.MethodInfo DisplayDeviceIsGrabbedMethodInfo a signature where
overloadedMethod = 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 :: a -> m ()
displayFlush a
display = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Display -> IO ()
gdk_display_flush Ptr Display
display'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DisplayFlushMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.MethodInfo DisplayFlushMethodInfo a signature where
overloadedMethod = 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 :: a -> m AppLaunchContext
displayGetAppLaunchContext a
display = IO AppLaunchContext -> m AppLaunchContext
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
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr AppLaunchContext
result <- Ptr Display -> IO (Ptr AppLaunchContext)
gdk_display_get_app_launch_context Ptr Display
display'
Text -> Ptr AppLaunchContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"displayGetAppLaunchContext" Ptr AppLaunchContext
result
AppLaunchContext
result' <- ((ManagedPtr AppLaunchContext -> AppLaunchContext)
-> Ptr AppLaunchContext -> IO AppLaunchContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr AppLaunchContext -> AppLaunchContext
Gdk.AppLaunchContext.AppLaunchContext) Ptr AppLaunchContext
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
AppLaunchContext -> IO AppLaunchContext
forall (m :: * -> *) a. Monad m => a -> m a
return AppLaunchContext
result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetAppLaunchContextMethodInfo
instance (signature ~ (m Gdk.AppLaunchContext.AppLaunchContext), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetAppLaunchContextMethodInfo a signature where
overloadedMethod = 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 :: a -> m Clipboard
displayGetClipboard a
display = IO Clipboard -> m Clipboard
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
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Clipboard
result <- Ptr Display -> IO (Ptr Clipboard)
gdk_display_get_clipboard Ptr Display
display'
Text -> Ptr Clipboard -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"displayGetClipboard" Ptr Clipboard
result
Clipboard
result' <- ((ManagedPtr Clipboard -> Clipboard)
-> Ptr Clipboard -> IO Clipboard
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Clipboard -> Clipboard
Gdk.Clipboard.Clipboard) Ptr Clipboard
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Clipboard -> IO Clipboard
forall (m :: * -> *) a. Monad m => a -> m a
return Clipboard
result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetClipboardMethodInfo
instance (signature ~ (m Gdk.Clipboard.Clipboard), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetClipboardMethodInfo a signature where
overloadedMethod = displayGetClipboard
#endif
foreign import ccall "gdk_display_get_default_group" gdk_display_get_default_group ::
Ptr Display ->
IO (Ptr Gdk.Surface.Surface)
displayGetDefaultGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Gdk.Surface.Surface
displayGetDefaultGroup :: a -> m Surface
displayGetDefaultGroup a
display = IO Surface -> m Surface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Surface -> m Surface) -> IO Surface -> m Surface
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Surface
result <- Ptr Display -> IO (Ptr Surface)
gdk_display_get_default_group Ptr Display
display'
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"displayGetDefaultGroup" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Surface -> Surface
Gdk.Surface.Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetDefaultGroupMethodInfo
instance (signature ~ (m Gdk.Surface.Surface), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetDefaultGroupMethodInfo a signature where
overloadedMethod = displayGetDefaultGroup
#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 :: a -> m (Maybe Seat)
displayGetDefaultSeat a
display = IO (Maybe Seat) -> m (Maybe Seat)
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
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Seat
result <- Ptr Display -> IO (Ptr Seat)
gdk_display_get_default_seat Ptr Display
display'
Maybe Seat
maybeResult <- Ptr Seat -> (Ptr Seat -> IO Seat) -> IO (Maybe Seat)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Seat
result ((Ptr Seat -> IO Seat) -> IO (Maybe Seat))
-> (Ptr Seat -> IO Seat) -> IO (Maybe Seat)
forall a b. (a -> b) -> a -> b
$ \Ptr Seat
result' -> do
Seat
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'
Seat -> IO Seat
forall (m :: * -> *) a. Monad m => a -> m a
return Seat
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Maybe Seat -> IO (Maybe Seat)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Seat
maybeResult
#if defined(ENABLE_OVERLOADING)
data DisplayGetDefaultSeatMethodInfo
instance (signature ~ (m (Maybe Gdk.Seat.Seat)), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetDefaultSeatMethodInfo a signature where
overloadedMethod = displayGetDefaultSeat
#endif
foreign import ccall "gdk_display_get_event" gdk_display_get_event ::
Ptr Display ->
IO (Ptr Gdk.Event.Event)
displayGetEvent ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m (Maybe Gdk.Event.Event)
displayGetEvent :: a -> m (Maybe Event)
displayGetEvent a
display = IO (Maybe Event) -> m (Maybe Event)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Event) -> m (Maybe Event))
-> IO (Maybe Event) -> m (Maybe Event)
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Event
result <- Ptr Display -> IO (Ptr Event)
gdk_display_get_event Ptr Display
display'
Maybe Event
maybeResult <- Ptr Event -> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Event
result ((Ptr Event -> IO Event) -> IO (Maybe Event))
-> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. (a -> b) -> a -> b
$ \Ptr Event
result' -> do
Event
result'' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr Event -> Event
Gdk.Event.Event) Ptr Event
result'
Event -> IO Event
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Maybe Event -> IO (Maybe Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Event
maybeResult
#if defined(ENABLE_OVERLOADING)
data DisplayGetEventMethodInfo
instance (signature ~ (m (Maybe Gdk.Event.Event)), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetEventMethodInfo a signature where
overloadedMethod = displayGetEvent
#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 Gdk.Monitor.Monitor
displayGetMonitorAtSurface :: a -> b -> m Monitor
displayGetMonitorAtSurface a
display b
surface = IO Monitor -> m Monitor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Monitor -> m Monitor) -> IO Monitor -> m Monitor
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Surface
surface' <- b -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
surface
Ptr Monitor
result <- Ptr Display -> Ptr Surface -> IO (Ptr Monitor)
gdk_display_get_monitor_at_surface Ptr Display
display' Ptr Surface
surface'
Text -> Ptr Monitor -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"displayGetMonitorAtSurface" Ptr Monitor
result
Monitor
result' <- ((ManagedPtr Monitor -> Monitor) -> Ptr Monitor -> IO Monitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Monitor -> Monitor
Gdk.Monitor.Monitor) Ptr Monitor
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
surface
Monitor -> IO Monitor
forall (m :: * -> *) a. Monad m => a -> m a
return Monitor
result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetMonitorAtSurfaceMethodInfo
instance (signature ~ (b -> m Gdk.Monitor.Monitor), MonadIO m, IsDisplay a, Gdk.Surface.IsSurface b) => O.MethodInfo DisplayGetMonitorAtSurfaceMethodInfo a signature where
overloadedMethod = 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 :: a -> m ListModel
displayGetMonitors a
self = IO ListModel -> m ListModel
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
Ptr Display
self' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr ListModel
result <- Ptr Display -> IO (Ptr ListModel)
gdk_display_get_monitors Ptr Display
self'
Text -> Ptr ListModel -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"displayGetMonitors" Ptr ListModel
result
ListModel
result' <- ((ManagedPtr ListModel -> ListModel)
-> Ptr ListModel -> IO ListModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ListModel -> ListModel
Gio.ListModel.ListModel) Ptr ListModel
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
ListModel -> IO ListModel
forall (m :: * -> *) a. Monad m => a -> m a
return ListModel
result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetMonitorsMethodInfo
instance (signature ~ (m Gio.ListModel.ListModel), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetMonitorsMethodInfo a signature where
overloadedMethod = 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 :: a -> m Text
displayGetName a
display = IO Text -> m Text
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
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
CString
result <- Ptr Display -> IO CString
gdk_display_get_name Ptr Display
display'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"displayGetName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetNameMethodInfo a signature where
overloadedMethod = 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 :: a -> m Clipboard
displayGetPrimaryClipboard a
display = IO Clipboard -> m Clipboard
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
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Clipboard
result <- Ptr Display -> IO (Ptr Clipboard)
gdk_display_get_primary_clipboard Ptr Display
display'
Text -> Ptr Clipboard -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"displayGetPrimaryClipboard" Ptr Clipboard
result
Clipboard
result' <- ((ManagedPtr Clipboard -> Clipboard)
-> Ptr Clipboard -> IO Clipboard
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Clipboard -> Clipboard
Gdk.Clipboard.Clipboard) Ptr Clipboard
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Clipboard -> IO Clipboard
forall (m :: * -> *) a. Monad m => a -> m a
return Clipboard
result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetPrimaryClipboardMethodInfo
instance (signature ~ (m Gdk.Clipboard.Clipboard), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetPrimaryClipboardMethodInfo a signature where
overloadedMethod = 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 :: a -> Text -> GValue -> m Bool
displayGetSetting a
display Text
name GValue
value = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
CInt
result <- Ptr Display -> CString -> Ptr GValue -> IO CInt
gdk_display_get_setting Ptr Display
display' CString
name' Ptr GValue
value'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Ptr GValue -> IO ()
B.GValue.unsetGValue Ptr GValue
value'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetSettingMethodInfo
instance (signature ~ (T.Text -> GValue -> m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetSettingMethodInfo a signature where
overloadedMethod = displayGetSetting
#endif
foreign import ccall "gdk_display_get_startup_notification_id" gdk_display_get_startup_notification_id ::
Ptr Display ->
IO CString
displayGetStartupNotificationId ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m T.Text
displayGetStartupNotificationId :: a -> m Text
displayGetStartupNotificationId a
display = IO Text -> m Text
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
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
CString
result <- Ptr Display -> IO CString
gdk_display_get_startup_notification_id Ptr Display
display'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"displayGetStartupNotificationId" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DisplayGetStartupNotificationIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetStartupNotificationIdMethodInfo a signature where
overloadedMethod = displayGetStartupNotificationId
#endif
foreign import ccall "gdk_display_has_pending" gdk_display_has_pending ::
Ptr Display ->
IO CInt
displayHasPending ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m Bool
displayHasPending :: a -> m Bool
displayHasPending a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
CInt
result <- Ptr Display -> IO CInt
gdk_display_has_pending Ptr Display
display'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DisplayHasPendingMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplayHasPendingMethodInfo a signature where
overloadedMethod = displayHasPending
#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 :: a -> m Bool
displayIsClosed a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
CInt
result <- Ptr Display -> IO CInt
gdk_display_is_closed Ptr Display
display'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DisplayIsClosedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplayIsClosedMethodInfo a signature where
overloadedMethod = 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 :: a -> m Bool
displayIsComposited a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
CInt
result <- Ptr Display -> IO CInt
gdk_display_is_composited Ptr Display
display'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DisplayIsCompositedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplayIsCompositedMethodInfo a signature where
overloadedMethod = 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 :: a -> m Bool
displayIsRgba a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
CInt
result <- Ptr Display -> IO CInt
gdk_display_is_rgba Ptr Display
display'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DisplayIsRgbaMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplayIsRgbaMethodInfo a signature where
overloadedMethod = 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 :: a -> m [Seat]
displayListSeats a
display = IO [Seat] -> m [Seat]
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
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr (GList (Ptr Seat))
result <- Ptr Display -> IO (Ptr (GList (Ptr Seat)))
gdk_display_list_seats Ptr Display
display'
[Ptr Seat]
result' <- Ptr (GList (Ptr Seat)) -> IO [Ptr Seat]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Seat))
result
[Seat]
result'' <- (Ptr Seat -> IO Seat) -> [Ptr Seat] -> IO [Seat]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((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'
Ptr (GList (Ptr Seat)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Seat))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
[Seat] -> IO [Seat]
forall (m :: * -> *) a. Monad m => a -> m a
return [Seat]
result''
#if defined(ENABLE_OVERLOADING)
data DisplayListSeatsMethodInfo
instance (signature ~ (m [Gdk.Seat.Seat]), MonadIO m, IsDisplay a) => O.MethodInfo DisplayListSeatsMethodInfo a signature where
overloadedMethod = 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 :: a -> Word32 -> m (Bool, [KeymapKey], [Word32])
displayMapKeycode a
display Word32
keycode = IO (Bool, [KeymapKey], [Word32]) -> m (Bool, [KeymapKey], [Word32])
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
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr (Ptr KeymapKey)
keys <- IO (Ptr (Ptr KeymapKey))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gdk.KeymapKey.KeymapKey))
Ptr (Ptr Word32)
keyvals <- IO (Ptr (Ptr Word32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word32))
Ptr Int32
nEntries <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
CInt
result <- Ptr Display
-> Word32
-> Ptr (Ptr KeymapKey)
-> Ptr (Ptr Word32)
-> Ptr Int32
-> IO CInt
gdk_display_map_keycode Ptr Display
display' Word32
keycode Ptr (Ptr KeymapKey)
keys Ptr (Ptr Word32)
keyvals Ptr Int32
nEntries
Int32
nEntries' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
nEntries
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr KeymapKey
keys' <- Ptr (Ptr KeymapKey) -> IO (Ptr KeymapKey)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr KeymapKey)
keys
[Ptr KeymapKey]
keys'' <- (Int -> Int32 -> Ptr KeymapKey -> IO [Ptr KeymapKey]
forall a b. Integral a => Int -> a -> Ptr b -> IO [Ptr b]
unpackBlockArrayWithLength Int
12 Int32
nEntries') Ptr KeymapKey
keys'
[KeymapKey]
keys''' <- (Ptr KeymapKey -> IO KeymapKey)
-> [Ptr KeymapKey] -> IO [KeymapKey]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr KeymapKey -> KeymapKey)
-> Ptr KeymapKey -> IO KeymapKey
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr KeymapKey -> KeymapKey
Gdk.KeymapKey.KeymapKey) [Ptr KeymapKey]
keys''
Ptr KeymapKey -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr KeymapKey
keys'
Ptr Word32
keyvals' <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word32)
keyvals
[Word32]
keyvals'' <- (Int32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Int32
nEntries') Ptr Word32
keyvals'
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
keyvals'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Ptr (Ptr KeymapKey) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr KeymapKey)
keys
Ptr (Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word32)
keyvals
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
nEntries
(Bool, [KeymapKey], [Word32]) -> IO (Bool, [KeymapKey], [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', [KeymapKey]
keys''', [Word32]
keyvals'')
#if defined(ENABLE_OVERLOADING)
data DisplayMapKeycodeMethodInfo
instance (signature ~ (Word32 -> m ((Bool, [Gdk.KeymapKey.KeymapKey], [Word32]))), MonadIO m, IsDisplay a) => O.MethodInfo DisplayMapKeycodeMethodInfo a signature where
overloadedMethod = 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 :: a -> Word32 -> m (Bool, [KeymapKey])
displayMapKeyval a
display Word32
keyval = IO (Bool, [KeymapKey]) -> m (Bool, [KeymapKey])
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
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr (Ptr KeymapKey)
keys <- IO (Ptr (Ptr KeymapKey))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gdk.KeymapKey.KeymapKey))
Ptr Int32
nKeys <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
CInt
result <- Ptr Display
-> Word32 -> Ptr (Ptr KeymapKey) -> Ptr Int32 -> IO CInt
gdk_display_map_keyval Ptr Display
display' Word32
keyval Ptr (Ptr KeymapKey)
keys Ptr Int32
nKeys
Int32
nKeys' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
nKeys
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr KeymapKey
keys' <- Ptr (Ptr KeymapKey) -> IO (Ptr KeymapKey)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr KeymapKey)
keys
[Ptr KeymapKey]
keys'' <- (Int -> Int32 -> Ptr KeymapKey -> IO [Ptr KeymapKey]
forall a b. Integral a => Int -> a -> Ptr b -> IO [Ptr b]
unpackBlockArrayWithLength Int
12 Int32
nKeys') Ptr KeymapKey
keys'
[KeymapKey]
keys''' <- (Ptr KeymapKey -> IO KeymapKey)
-> [Ptr KeymapKey] -> IO [KeymapKey]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr KeymapKey -> KeymapKey)
-> Ptr KeymapKey -> IO KeymapKey
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr KeymapKey -> KeymapKey
Gdk.KeymapKey.KeymapKey) [Ptr KeymapKey]
keys''
Ptr KeymapKey -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr KeymapKey
keys'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Ptr (Ptr KeymapKey) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr KeymapKey)
keys
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
nKeys
(Bool, [KeymapKey]) -> IO (Bool, [KeymapKey])
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', [KeymapKey]
keys''')
#if defined(ENABLE_OVERLOADING)
data DisplayMapKeyvalMethodInfo
instance (signature ~ (Word32 -> m ((Bool, [Gdk.KeymapKey.KeymapKey]))), MonadIO m, IsDisplay a) => O.MethodInfo DisplayMapKeyvalMethodInfo a signature where
overloadedMethod = displayMapKeyval
#endif
foreign import ccall "gdk_display_notify_startup_complete" gdk_display_notify_startup_complete ::
Ptr Display ->
CString ->
IO ()
displayNotifyStartupComplete ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> T.Text
-> m ()
displayNotifyStartupComplete :: a -> Text -> m ()
displayNotifyStartupComplete a
display Text
startupId = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
CString
startupId' <- Text -> IO CString
textToCString Text
startupId
Ptr Display -> CString -> IO ()
gdk_display_notify_startup_complete Ptr Display
display' CString
startupId'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
startupId'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DisplayNotifyStartupCompleteMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDisplay a) => O.MethodInfo DisplayNotifyStartupCompleteMethodInfo a signature where
overloadedMethod = displayNotifyStartupComplete
#endif
foreign import ccall "gdk_display_peek_event" gdk_display_peek_event ::
Ptr Display ->
IO (Ptr Gdk.Event.Event)
displayPeekEvent ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m (Maybe Gdk.Event.Event)
displayPeekEvent :: a -> m (Maybe Event)
displayPeekEvent a
display = IO (Maybe Event) -> m (Maybe Event)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Event) -> m (Maybe Event))
-> IO (Maybe Event) -> m (Maybe Event)
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Event
result <- Ptr Display -> IO (Ptr Event)
gdk_display_peek_event Ptr Display
display'
Maybe Event
maybeResult <- Ptr Event -> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Event
result ((Ptr Event -> IO Event) -> IO (Maybe Event))
-> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. (a -> b) -> a -> b
$ \Ptr Event
result' -> do
Event
result'' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr Event -> Event
Gdk.Event.Event) Ptr Event
result'
Event -> IO Event
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Maybe Event -> IO (Maybe Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Event
maybeResult
#if defined(ENABLE_OVERLOADING)
data DisplayPeekEventMethodInfo
instance (signature ~ (m (Maybe Gdk.Event.Event)), MonadIO m, IsDisplay a) => O.MethodInfo DisplayPeekEventMethodInfo a signature where
overloadedMethod = displayPeekEvent
#endif
foreign import ccall "gdk_display_put_event" gdk_display_put_event ::
Ptr Display ->
Ptr Gdk.Event.Event ->
IO ()
displayPutEvent ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a, Gdk.Event.IsEvent b) =>
a
-> b
-> m ()
displayPutEvent :: a -> b -> m ()
displayPutEvent a
display b
event = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Event
event' <- b -> IO (Ptr Event)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
event
Ptr Display -> Ptr Event -> IO ()
gdk_display_put_event Ptr Display
display' Ptr Event
event'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
event
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DisplayPutEventMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDisplay a, Gdk.Event.IsEvent b) => O.MethodInfo DisplayPutEventMethodInfo a signature where
overloadedMethod = 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 :: a -> m Bool
displaySupportsInputShapes a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
CInt
result <- Ptr Display -> IO CInt
gdk_display_supports_input_shapes Ptr Display
display'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DisplaySupportsInputShapesMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplaySupportsInputShapesMethodInfo a signature where
overloadedMethod = displaySupportsInputShapes
#endif
foreign import ccall "gdk_display_sync" gdk_display_sync ::
Ptr Display ->
IO ()
displaySync ::
(B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
a
-> m ()
displaySync :: a -> m ()
displaySync a
display = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Display -> IO ()
gdk_display_sync Ptr Display
display'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DisplaySyncMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.MethodInfo DisplaySyncMethodInfo a signature where
overloadedMethod = displaySync
#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 :: m (Maybe Display)
displayGetDefault = IO (Maybe Display) -> m (Maybe Display)
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
Ptr Display
result <- IO (Ptr Display)
gdk_display_get_default
Maybe Display
maybeResult <- Ptr Display -> (Ptr Display -> IO Display) -> IO (Maybe Display)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Display
result ((Ptr Display -> IO Display) -> IO (Maybe Display))
-> (Ptr Display -> IO Display) -> IO (Maybe Display)
forall a b. (a -> b) -> a -> b
$ \Ptr Display
result' -> do
Display
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'
Display -> IO Display
forall (m :: * -> *) a. Monad m => a -> m a
return Display
result''
Maybe Display -> IO (Maybe Display)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Display
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) =>
T.Text
-> m (Maybe Display)
displayOpen :: Text -> m (Maybe Display)
displayOpen Text
displayName = IO (Maybe Display) -> m (Maybe Display)
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
CString
displayName' <- Text -> IO CString
textToCString Text
displayName
Ptr Display
result <- CString -> IO (Ptr Display)
gdk_display_open CString
displayName'
Maybe Display
maybeResult <- Ptr Display -> (Ptr Display -> IO Display) -> IO (Maybe Display)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Display
result ((Ptr Display -> IO Display) -> IO (Maybe Display))
-> (Ptr Display -> IO Display) -> IO (Maybe Display)
forall a b. (a -> b) -> a -> b
$ \Ptr Display
result' -> do
Display
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'
Display -> IO Display
forall (m :: * -> *) a. Monad m => a -> m a
return Display
result''
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
displayName'
Maybe Display -> IO (Maybe Display)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Display
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif