Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- Exported types
- Methods
- beep
- close
- deviceIsGrabbed
- flush
- getAppLaunchContext
- getDefault
- getDefaultCursorSize
- getDefaultGroup
- getDefaultScreen
- getDefaultSeat
- getDeviceManager
- getEvent
- getMaximalCursorSize
- getMonitor
- getMonitorAtPoint
- getMonitorAtWindow
- getNMonitors
- getNScreens
- getName
- getPointer
- getPrimaryMonitor
- getScreen
- getWindowAtPointer
- hasPending
- isClosed
- keyboardUngrab
- listDevices
- listSeats
- notifyStartupComplete
- open
- openDefaultLibgtkOnly
- peekEvent
- pointerIsGrabbed
- pointerUngrab
- putEvent
- requestSelectionNotification
- setDoubleClickDistance
- setDoubleClickTime
- storeClipboard
- supportsClipboardPersistence
- supportsComposite
- supportsCursorAlpha
- supportsCursorColor
- supportsInputShapes
- supportsSelectionNotification
- supportsShapes
- sync
- warpPointer
- Signals
Display
objects purpose are two fold:
- To manage and provide information about input devices (pointers and keyboards)
- To manage and provide information about the available
GdkScreens
GdkDisplay objects are the GDK representation of an X Display, which can be described as a workstation consisting of a keyboard, a pointing device (such as a mouse) and one or more screens. It is used to open and keep track of various GdkScreen objects currently instantiated by the application. It is also used to access the keyboard(s) and mouse pointer(s) of the display.
Most of the input device handling has been factored out into
the separate DeviceManager
object. Every display has a
device manager, which you can obtain using
displayGetDeviceManager
.
Synopsis
- newtype Display = Display (ManagedPtr Display)
- class (GObject o, IsDescendantOf Display o) => IsDisplay o
- toDisplay :: (MonadIO m, IsDisplay o) => o -> m Display
- displayBeep :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m ()
- displayClose :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m ()
- displayDeviceIsGrabbed :: (HasCallStack, MonadIO m, IsDisplay a, IsDevice b) => a -> b -> m Bool
- displayFlush :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m ()
- displayGetAppLaunchContext :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m AppLaunchContext
- displayGetDefault :: (HasCallStack, MonadIO m) => m (Maybe Display)
- displayGetDefaultCursorSize :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Word32
- displayGetDefaultGroup :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Window
- displayGetDefaultScreen :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Screen
- displayGetDefaultSeat :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Seat
- displayGetDeviceManager :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m (Maybe DeviceManager)
- displayGetEvent :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m (Maybe Event)
- displayGetMaximalCursorSize :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m (Word32, Word32)
- displayGetMonitor :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Int32 -> m (Maybe Monitor)
- displayGetMonitorAtPoint :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Int32 -> Int32 -> m Monitor
- displayGetMonitorAtWindow :: (HasCallStack, MonadIO m, IsDisplay a, IsWindow b) => a -> b -> m Monitor
- displayGetNMonitors :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Int32
- displayGetNScreens :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Int32
- displayGetName :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Text
- displayGetPointer :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m (Screen, Int32, Int32, [ModifierType])
- displayGetPrimaryMonitor :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m (Maybe Monitor)
- displayGetScreen :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Int32 -> m Screen
- displayGetWindowAtPointer :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m (Maybe Window, Int32, Int32)
- displayHasPending :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displayIsClosed :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displayKeyboardUngrab :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Word32 -> m ()
- displayListDevices :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m [Device]
- displayListSeats :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m [Seat]
- displayNotifyStartupComplete :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Text -> m ()
- displayOpen :: (HasCallStack, MonadIO m) => Text -> m (Maybe Display)
- displayOpenDefaultLibgtkOnly :: (HasCallStack, MonadIO m) => m (Maybe Display)
- displayPeekEvent :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m (Maybe Event)
- displayPointerIsGrabbed :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displayPointerUngrab :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Word32 -> m ()
- displayPutEvent :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Event -> m ()
- displayRequestSelectionNotification :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Atom -> m Bool
- displaySetDoubleClickDistance :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Word32 -> m ()
- displaySetDoubleClickTime :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Word32 -> m ()
- displayStoreClipboard :: (HasCallStack, MonadIO m, IsDisplay a, IsWindow b) => a -> b -> Word32 -> Maybe [Atom] -> m ()
- displaySupportsClipboardPersistence :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displaySupportsComposite :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displaySupportsCursorAlpha :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displaySupportsCursorColor :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displaySupportsInputShapes :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displaySupportsSelectionNotification :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displaySupportsShapes :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displaySync :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m ()
- displayWarpPointer :: (HasCallStack, MonadIO m, IsDisplay a, IsScreen b) => a -> b -> Int32 -> Int32 -> m ()
- type DisplayClosedCallback = Bool -> IO ()
- afterDisplayClosed :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayClosedCallback) -> m SignalHandlerId
- onDisplayClosed :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayClosedCallback) -> m SignalHandlerId
- type DisplayMonitorAddedCallback = Monitor -> IO ()
- afterDisplayMonitorAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayMonitorAddedCallback) -> m SignalHandlerId
- onDisplayMonitorAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayMonitorAddedCallback) -> m SignalHandlerId
- type DisplayMonitorRemovedCallback = Monitor -> IO ()
- afterDisplayMonitorRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayMonitorRemovedCallback) -> m SignalHandlerId
- onDisplayMonitorRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayMonitorRemovedCallback) -> m SignalHandlerId
- type DisplayOpenedCallback = IO ()
- afterDisplayOpened :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayOpenedCallback) -> m SignalHandlerId
- onDisplayOpened :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayOpenedCallback) -> m SignalHandlerId
- type DisplaySeatAddedCallback = Seat -> IO ()
- afterDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatAddedCallback) -> m SignalHandlerId
- onDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatAddedCallback) -> m SignalHandlerId
- type DisplaySeatRemovedCallback = Seat -> IO ()
- afterDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatRemovedCallback) -> m SignalHandlerId
- onDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatRemovedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Display Source # | |
GObject Display Source # | |
Defined in GI.Gdk.Objects.Display | |
ManagedPtrNewtype Display Source # | |
Defined in GI.Gdk.Objects.Display toManagedPtr :: Display -> ManagedPtr Display # | |
TypedObject Display Source # | |
Defined in GI.Gdk.Objects.Display | |
HasParentTypes Display Source # | |
Defined in GI.Gdk.Objects.Display | |
IsGValue (Maybe Display) Source # | Convert |
Defined in GI.Gdk.Objects.Display | |
type ParentTypes Display Source # | |
Defined in GI.Gdk.Objects.Display |
class (GObject o, IsDescendantOf Display o) => IsDisplay o Source #
Instances
(GObject o, IsDescendantOf Display o) => IsDisplay o Source # | |
Defined in GI.Gdk.Objects.Display |
Methods
Click to display all available methods, including inherited ones
Methods
beep, bindProperty, bindPropertyFull, close, deviceIsGrabbed, flush, forceFloating, freezeNotify, getv, hasPending, isClosed, isFloating, keyboardUngrab, listDevices, listSeats, notify, notifyByPspec, notifyStartupComplete, peekEvent, pointerIsGrabbed, pointerUngrab, putEvent, ref, refSink, requestSelectionNotification, runDispose, stealData, stealQdata, storeClipboard, supportsClipboardPersistence, supportsComposite, supportsCursorAlpha, supportsCursorColor, supportsInputShapes, supportsSelectionNotification, supportsShapes, sync, thawNotify, unref, warpPointer, watchClosure.
Getters
getAppLaunchContext, getData, getDefaultCursorSize, getDefaultGroup, getDefaultScreen, getDefaultSeat, getDeviceManager, getEvent, getMaximalCursorSize, getMonitor, getMonitorAtPoint, getMonitorAtWindow, getNMonitors, getNScreens, getName, getPointer, getPrimaryMonitor, getProperty, getQdata, getScreen, getWindowAtPointer.
Setters
setData, setDataFull, setDoubleClickDistance, setDoubleClickTime, setProperty.
beep
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m () |
Emits a short beep on display
Since: 2.2
close
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m () |
Closes the connection to the windowing system for the given display, and cleans up associated resources.
Since: 2.2
deviceIsGrabbed
displayDeviceIsGrabbed Source #
:: (HasCallStack, MonadIO m, IsDisplay a, IsDevice b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Returns True
if there is an ongoing grab on device
for display
.
flush
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m () |
Flushes any requests queued for the windowing system; this happens automatically when the main loop blocks waiting for new events, but if your application is drawing without returning control to the main loop, you may need to call this function explicitly. A common case where this function needs to be called is when an application is executing drawing commands from a thread other than the thread where the main loop is running.
This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.
Since: 2.4
getAppLaunchContext
displayGetAppLaunchContext Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m AppLaunchContext | Returns: a new |
Returns a AppLaunchContext
suitable for launching
applications on the given display.
Since: 3.0
getDefault
:: (HasCallStack, MonadIO m) | |
=> m (Maybe Display) | Returns: a |
Gets the default Display
. This is a convenience
function for:
gdk_display_manager_get_default_display (gdk_display_manager_get ())
.
Since: 2.2
getDefaultCursorSize
displayGetDefaultCursorSize Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Word32 | Returns: the default cursor size. |
Returns the default size to use for cursors on display
.
Since: 2.4
getDefaultGroup
displayGetDefaultGroup Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Window | Returns: The default group leader window
for |
Returns the default group leader window for all toplevel windows
on display
. This window is implicitly created by GDK.
See windowSetGroup
.
Since: 2.4
getDefaultScreen
displayGetDefaultScreen Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Screen | Returns: the default |
Get the default Screen
for display
.
Since: 2.2
getDefaultSeat
displayGetDefaultSeat Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Seat | Returns: the default seat. |
Returns the default Seat
for this display.
Since: 3.20
getDeviceManager
displayGetDeviceManager Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m (Maybe DeviceManager) | Returns: A |
Deprecated: (Since version 3.20.)Use displayGetDefaultSeat
and Seat
operations.
Returns the DeviceManager
associated to display
.
Since: 3.0
getEvent
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m (Maybe Event) | Returns: the next |
Gets the next Event
to be processed for display
, fetching events from the
windowing system if necessary.
Since: 2.2
getMaximalCursorSize
displayGetMaximalCursorSize Source #
Gets the maximal size to use for cursors on display
.
Since: 2.4
getMonitor
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Int32 |
|
-> m (Maybe Monitor) | Returns: the |
Gets a monitor associated with this display.
Since: 3.22
getMonitorAtPoint
displayGetMonitorAtPoint Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m Monitor | Returns: the monitor containing the point |
Gets the monitor in which the point (x
, y
) is located,
or a nearby monitor if the point is not in any monitor.
Since: 3.22
getMonitorAtWindow
displayGetMonitorAtWindow Source #
:: (HasCallStack, MonadIO m, IsDisplay a, IsWindow b) | |
=> a |
|
-> b |
|
-> m Monitor | Returns: the monitor with the largest overlap with |
Gets the monitor in which the largest area of window
resides, or a monitor close to window
if it is outside
of all monitors.
Since: 3.22
getNMonitors
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Int32 | Returns: the number of monitors |
Gets the number of monitors that belong to display
.
The returned number is valid until the next emission of the monitorAdded or monitorRemoved signal.
Since: 3.22
getNScreens
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Int32 | Returns: number of screens. |
Deprecated: (Since version 3.10)The number of screens is always 1.
Gets the number of screen managed by the display
.
Since: 2.2
getName
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Text | Returns: a string representing the display name. This string is owned by GDK and should not be modified or freed. |
Gets the name of the display.
Since: 2.2
getPointer
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m (Screen, Int32, Int32, [ModifierType]) |
Deprecated: (Since version 3.0)Use deviceGetPosition
instead.
Gets the current location of the pointer and the current modifier mask for a given display.
Since: 2.2
getPrimaryMonitor
displayGetPrimaryMonitor Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m (Maybe Monitor) | Returns: the primary monitor, or |
Gets the primary monitor for the display.
The primary monitor is considered the monitor where the “main desktop” lives. While normal application windows typically allow the window manager to place the windows, specialized desktop applications such as panels should place themselves on the primary monitor.
Since: 3.22
getScreen
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Int32 |
|
-> m Screen | Returns: the |
Deprecated: (Since version 3.20)There is only one screen; use displayGetDefaultScreen
to get it.
Returns a screen object for one of the screens of the display.
Since: 2.2
getWindowAtPointer
displayGetWindowAtPointer Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m (Maybe Window, Int32, Int32) | Returns: the window under the mouse
pointer, or |
Deprecated: (Since version 3.0)Use deviceGetWindowAtPosition
instead.
Obtains the window underneath the mouse pointer, returning the location
of the pointer in that window in winX
, winY
for screen
. Returns Nothing
if the window under the mouse pointer is not known to GDK (for example,
belongs to another application).
Since: 2.2
hasPending
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the display has events that are waiting to be processed.
Since: 3.0
isClosed
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Bool | Returns: |
Finds out if the display has been closed.
Since: 2.22
keyboardUngrab
displayKeyboardUngrab Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Word32 |
|
-> m () |
Deprecated: (Since version 3.0)Use deviceUngrab
, together with deviceGrab
instead.
Release any keyboard grab
Since: 2.2
listDevices
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m [Device] | Returns:
a list of |
Deprecated: (Since version 3.0)Use deviceManagerListDevices
instead.
Returns the list of available input devices attached to display
.
The list is statically allocated and should not be freed.
Since: 2.2
listSeats
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m [Seat] | Returns: the
list of seats known to the |
Returns the list of seats known to display
.
Since: 3.20
notifyStartupComplete
displayNotifyStartupComplete Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Text |
|
-> m () |
Indicates to the GUI environment that the application has finished loading, using a given identifier.
GTK+ will call this function automatically for GtkWindow
with custom startup-notification identifier unless
gtk_window_set_auto_startup_notification()
is called to
disable that feature.
Since: 3.0
open
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Maybe Display) | Returns: a |
Opens a display.
Since: 2.2
openDefaultLibgtkOnly
displayOpenDefaultLibgtkOnly Source #
:: (HasCallStack, MonadIO m) | |
=> m (Maybe Display) | Returns: the default display, if it
could be opened, otherwise |
Deprecated: (Since version 3.16)This symbol was never meant to be used outside of GTK+
Opens the default display specified by command line arguments or
environment variables, sets it as the default display, and returns
it. parseArgs
must have been called first. If the default
display has previously been set, simply returns that. An internal
function that should not be used by applications.
peekEvent
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m (Maybe Event) | Returns: a copy of the first |
Gets a copy of the first Event
in the display
’s event queue, without
removing the event from the queue. (Note that this function will
not get more events from the windowing system. It only checks the events
that have already been moved to the GDK event queue.)
Since: 2.2
pointerIsGrabbed
displayPointerIsGrabbed Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.0)Use displayDeviceIsGrabbed
instead.
Test if the pointer is grabbed.
Since: 2.2
pointerUngrab
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Word32 |
|
-> m () |
Deprecated: (Since version 3.0)Use deviceUngrab
, together with deviceGrab
instead.
Release any pointer grab.
Since: 2.2
putEvent
Appends a copy of the given event onto the front of the event
queue for display
.
Since: 2.2
requestSelectionNotification
displayRequestSelectionNotification Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Atom |
|
-> m Bool | Returns: whether |
Request EventOwnerChange
events for ownership changes
of the selection named by the given atom.
Since: 2.6
setDoubleClickDistance
displaySetDoubleClickDistance Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the double click distance (two clicks within this distance
count as a double click and result in a GDK_2BUTTON_PRESS
event).
See also displaySetDoubleClickTime
.
Applications should not set this, it is a global
user-configured setting.
Since: 2.4
setDoubleClickTime
displaySetDoubleClickTime Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the double click time (two clicks within this time interval
count as a double click and result in a GDK_2BUTTON_PRESS
event).
Applications should not set this, it is a global
user-configured setting.
Since: 2.2
storeClipboard
displayStoreClipboard Source #
:: (HasCallStack, MonadIO m, IsDisplay a, IsWindow b) | |
=> a |
|
-> b |
|
-> Word32 |
|
-> Maybe [Atom] |
|
-> m () |
Issues a request to the clipboard manager to store the clipboard data. On X11, this is a special program that works according to the FreeDesktop Clipboard Specification.
Since: 2.6
supportsClipboardPersistence
displaySupportsClipboardPersistence Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the speicifed display supports clipboard persistance; i.e. if it’s possible to store the clipboard data after an application has quit. On X11 this checks if a clipboard daemon is running.
Since: 2.6
supportsComposite
displaySupportsComposite Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.16)Compositing is an outdated technology that only ever worked on X11.
Returns True
if windowSetComposited
can be used
to redirect drawing on the window using compositing.
Currently this only works on X11 with XComposite and XDamage extensions available.
Since: 2.12
supportsCursorAlpha
displaySupportsCursorAlpha Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Bool | Returns: whether cursors can have alpha channels. |
Returns True
if cursors can use an 8bit alpha channel
on display
. Otherwise, cursors are restricted to bilevel
alpha (i.e. a mask).
Since: 2.4
supportsCursorColor
displaySupportsCursorColor Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Bool | Returns: whether cursors can have multiple colors. |
Returns True
if multicolored cursors are supported
on display
. Otherwise, cursors have only a forground
and a background color.
Since: 2.4
supportsInputShapes
displaySupportsInputShapes Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Bool | Returns: |
Returns True
if gdk_window_input_shape_combine_mask()
can
be used to modify the input shape of windows on display
.
Since: 2.10
supportsSelectionNotification
displaySupportsSelectionNotification Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Bool | Returns: whether |
Returns whether EventOwnerChange
events will be
sent when the owner of a selection changes.
Since: 2.6
supportsShapes
displaySupportsShapes Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Bool | Returns: |
Returns True
if gdk_window_shape_combine_mask()
can
be used to create shaped windows on display
.
Since: 2.10
sync
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m () |
Flushes any requests queued for the windowing system and waits until all
requests have been handled. This is often used for making sure that the
display is synchronized with the current state of the program. Calling
displaySync
before errorTrapPop
makes sure that any errors
generated from earlier requests are handled before the error trap is
removed.
This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.
Since: 2.2
warpPointer
:: (HasCallStack, MonadIO m, IsDisplay a, IsScreen b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Deprecated: (Since version 3.0)Use deviceWarp
instead.
Warps the pointer of display
to the point x
,y
on
the screen screen
, unless the pointer is confined
to a window by a grab, in which case it will be moved
as far as allowed by the grab. Warping the pointer
creates events as if the user had moved the mouse
instantaneously to the destination.
Note that the pointer should normally be under the
control of the user. This function was added to cover
some rare use cases like keyboard navigation support
for the color picker in the GtkColorSelectionDialog
.
Since: 2.8
Signals
closed
type DisplayClosedCallback Source #
The closed signal is emitted when the connection to the windowing
system for display
is closed.
Since: 2.2
afterDisplayClosed :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayClosedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the closed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
display #closed callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDisplayClosed :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayClosedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the closed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
display #closed callback
monitorAdded
type DisplayMonitorAddedCallback Source #
The monitorAdded signal is emitted whenever a monitor is added.
Since: 3.22
afterDisplayMonitorAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayMonitorAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the monitorAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
display #monitorAdded callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDisplayMonitorAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayMonitorAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the monitorAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
display #monitorAdded callback
monitorRemoved
type DisplayMonitorRemovedCallback Source #
The monitorRemoved signal is emitted whenever a monitor is removed.
Since: 3.22
afterDisplayMonitorRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayMonitorRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the monitorRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
display #monitorRemoved callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDisplayMonitorRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayMonitorRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the monitorRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
display #monitorRemoved callback
opened
type DisplayOpenedCallback = IO () Source #
The opened signal is emitted when the connection to the windowing
system for display
is opened.
afterDisplayOpened :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayOpenedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the opened signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
display #opened callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDisplayOpened :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayOpenedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the opened signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
display #opened callback
seatAdded
type DisplaySeatAddedCallback Source #
The seatAdded signal is emitted whenever a new seat is made known to the windowing system.
Since: 3.20
afterDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the seatAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
display #seatAdded callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the seatAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
display #seatAdded callback
seatRemoved
type DisplaySeatRemovedCallback Source #
The seatRemoved signal is emitted whenever a seat is removed by the windowing system.
Since: 3.20
afterDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the seatRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
display #seatRemoved callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the seatRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
display #seatRemoved callback