Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- Overloaded 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 C_DisplayClosedCallback = Ptr () -> CInt -> Ptr () -> IO ()
- type DisplayClosedCallback = Bool -> IO ()
- afterDisplayClosed :: (IsDisplay a, MonadIO m) => a -> DisplayClosedCallback -> m SignalHandlerId
- genClosure_DisplayClosed :: MonadIO m => DisplayClosedCallback -> m (GClosure C_DisplayClosedCallback)
- mk_DisplayClosedCallback :: C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
- noDisplayClosedCallback :: Maybe DisplayClosedCallback
- onDisplayClosed :: (IsDisplay a, MonadIO m) => a -> DisplayClosedCallback -> m SignalHandlerId
- wrap_DisplayClosedCallback :: DisplayClosedCallback -> C_DisplayClosedCallback
- type C_DisplayMonitorAddedCallback = Ptr () -> Ptr Monitor -> Ptr () -> IO ()
- type DisplayMonitorAddedCallback = Monitor -> IO ()
- afterDisplayMonitorAdded :: (IsDisplay a, MonadIO m) => a -> DisplayMonitorAddedCallback -> m SignalHandlerId
- genClosure_DisplayMonitorAdded :: MonadIO m => DisplayMonitorAddedCallback -> m (GClosure C_DisplayMonitorAddedCallback)
- mk_DisplayMonitorAddedCallback :: C_DisplayMonitorAddedCallback -> IO (FunPtr C_DisplayMonitorAddedCallback)
- noDisplayMonitorAddedCallback :: Maybe DisplayMonitorAddedCallback
- onDisplayMonitorAdded :: (IsDisplay a, MonadIO m) => a -> DisplayMonitorAddedCallback -> m SignalHandlerId
- wrap_DisplayMonitorAddedCallback :: DisplayMonitorAddedCallback -> C_DisplayMonitorAddedCallback
- type C_DisplayMonitorRemovedCallback = Ptr () -> Ptr Monitor -> Ptr () -> IO ()
- type DisplayMonitorRemovedCallback = Monitor -> IO ()
- afterDisplayMonitorRemoved :: (IsDisplay a, MonadIO m) => a -> DisplayMonitorRemovedCallback -> m SignalHandlerId
- genClosure_DisplayMonitorRemoved :: MonadIO m => DisplayMonitorRemovedCallback -> m (GClosure C_DisplayMonitorRemovedCallback)
- mk_DisplayMonitorRemovedCallback :: C_DisplayMonitorRemovedCallback -> IO (FunPtr C_DisplayMonitorRemovedCallback)
- noDisplayMonitorRemovedCallback :: Maybe DisplayMonitorRemovedCallback
- onDisplayMonitorRemoved :: (IsDisplay a, MonadIO m) => a -> DisplayMonitorRemovedCallback -> m SignalHandlerId
- wrap_DisplayMonitorRemovedCallback :: DisplayMonitorRemovedCallback -> C_DisplayMonitorRemovedCallback
- type C_DisplayOpenedCallback = Ptr () -> Ptr () -> IO ()
- type DisplayOpenedCallback = IO ()
- afterDisplayOpened :: (IsDisplay a, MonadIO m) => a -> DisplayOpenedCallback -> m SignalHandlerId
- genClosure_DisplayOpened :: MonadIO m => DisplayOpenedCallback -> m (GClosure C_DisplayOpenedCallback)
- mk_DisplayOpenedCallback :: C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
- noDisplayOpenedCallback :: Maybe DisplayOpenedCallback
- onDisplayOpened :: (IsDisplay a, MonadIO m) => a -> DisplayOpenedCallback -> m SignalHandlerId
- wrap_DisplayOpenedCallback :: DisplayOpenedCallback -> C_DisplayOpenedCallback
- type C_DisplaySeatAddedCallback = Ptr () -> Ptr Seat -> Ptr () -> IO ()
- type DisplaySeatAddedCallback = Seat -> IO ()
- afterDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> DisplaySeatAddedCallback -> m SignalHandlerId
- genClosure_DisplaySeatAdded :: MonadIO m => DisplaySeatAddedCallback -> m (GClosure C_DisplaySeatAddedCallback)
- mk_DisplaySeatAddedCallback :: C_DisplaySeatAddedCallback -> IO (FunPtr C_DisplaySeatAddedCallback)
- noDisplaySeatAddedCallback :: Maybe DisplaySeatAddedCallback
- onDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> DisplaySeatAddedCallback -> m SignalHandlerId
- wrap_DisplaySeatAddedCallback :: DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
- type C_DisplaySeatRemovedCallback = Ptr () -> Ptr Seat -> Ptr () -> IO ()
- type DisplaySeatRemovedCallback = Seat -> IO ()
- afterDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> DisplaySeatRemovedCallback -> m SignalHandlerId
- genClosure_DisplaySeatRemoved :: MonadIO m => DisplaySeatRemovedCallback -> m (GClosure C_DisplaySeatRemovedCallback)
- mk_DisplaySeatRemovedCallback :: C_DisplaySeatRemovedCallback -> IO (FunPtr C_DisplaySeatRemovedCallback)
- noDisplaySeatRemovedCallback :: Maybe DisplaySeatRemovedCallback
- onDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> DisplaySeatRemovedCallback -> m SignalHandlerId
- wrap_DisplaySeatRemovedCallback :: DisplaySeatRemovedCallback -> C_DisplaySeatRemovedCallback
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 glibType :: IO GType | |
IsGValue Display Source # | Convert |
Defined in GI.Gdk.Objects.Display toGValue :: Display -> IO GValue fromGValue :: GValue -> IO Display | |
HasParentTypes Display Source # | |
Defined in GI.Gdk.Objects.Display | |
type ParentTypes Display Source # | |
Defined in GI.Gdk.Objects.Display type ParentTypes Display = '[Object] |
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
Overloaded methods
beep
Emits a short beep on display
Since: 2.2
close
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
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 #
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
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 C_DisplayClosedCallback = Ptr () -> CInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DisplayClosedCallback Source #
= Bool |
|
-> IO () |
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 -> 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
genClosure_DisplayClosed :: MonadIO m => DisplayClosedCallback -> m (GClosure C_DisplayClosedCallback) Source #
Wrap the callback into a GClosure
.
mk_DisplayClosedCallback :: C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback) Source #
Generate a function pointer callable from C code, from a C_DisplayClosedCallback
.
noDisplayClosedCallback :: Maybe DisplayClosedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DisplayClosedCallback
onDisplayClosed :: (IsDisplay a, MonadIO m) => 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
wrap_DisplayClosedCallback :: DisplayClosedCallback -> C_DisplayClosedCallback Source #
Wrap a DisplayClosedCallback
into a C_DisplayClosedCallback
.
monitorAdded
type C_DisplayMonitorAddedCallback = Ptr () -> Ptr Monitor -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DisplayMonitorAddedCallback Source #
= Monitor |
|
-> IO () |
The monitorAdded signal is emitted whenever a monitor is added.
Since: 3.22
afterDisplayMonitorAdded :: (IsDisplay a, MonadIO m) => 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
genClosure_DisplayMonitorAdded :: MonadIO m => DisplayMonitorAddedCallback -> m (GClosure C_DisplayMonitorAddedCallback) Source #
Wrap the callback into a GClosure
.
mk_DisplayMonitorAddedCallback :: C_DisplayMonitorAddedCallback -> IO (FunPtr C_DisplayMonitorAddedCallback) Source #
Generate a function pointer callable from C code, from a C_DisplayMonitorAddedCallback
.
noDisplayMonitorAddedCallback :: Maybe DisplayMonitorAddedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DisplayMonitorAddedCallback
onDisplayMonitorAdded :: (IsDisplay a, MonadIO m) => 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
wrap_DisplayMonitorAddedCallback :: DisplayMonitorAddedCallback -> C_DisplayMonitorAddedCallback Source #
Wrap a DisplayMonitorAddedCallback
into a C_DisplayMonitorAddedCallback
.
monitorRemoved
type C_DisplayMonitorRemovedCallback = Ptr () -> Ptr Monitor -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DisplayMonitorRemovedCallback Source #
= Monitor |
|
-> IO () |
The monitorRemoved signal is emitted whenever a monitor is removed.
Since: 3.22
afterDisplayMonitorRemoved :: (IsDisplay a, MonadIO m) => 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
genClosure_DisplayMonitorRemoved :: MonadIO m => DisplayMonitorRemovedCallback -> m (GClosure C_DisplayMonitorRemovedCallback) Source #
Wrap the callback into a GClosure
.
mk_DisplayMonitorRemovedCallback :: C_DisplayMonitorRemovedCallback -> IO (FunPtr C_DisplayMonitorRemovedCallback) Source #
Generate a function pointer callable from C code, from a C_DisplayMonitorRemovedCallback
.
noDisplayMonitorRemovedCallback :: Maybe DisplayMonitorRemovedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DisplayMonitorRemovedCallback
onDisplayMonitorRemoved :: (IsDisplay a, MonadIO m) => 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
wrap_DisplayMonitorRemovedCallback :: DisplayMonitorRemovedCallback -> C_DisplayMonitorRemovedCallback Source #
Wrap a DisplayMonitorRemovedCallback
into a C_DisplayMonitorRemovedCallback
.
opened
type C_DisplayOpenedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
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 -> 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
genClosure_DisplayOpened :: MonadIO m => DisplayOpenedCallback -> m (GClosure C_DisplayOpenedCallback) Source #
Wrap the callback into a GClosure
.
mk_DisplayOpenedCallback :: C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback) Source #
Generate a function pointer callable from C code, from a C_DisplayOpenedCallback
.
noDisplayOpenedCallback :: Maybe DisplayOpenedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DisplayOpenedCallback
onDisplayOpened :: (IsDisplay a, MonadIO m) => 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
wrap_DisplayOpenedCallback :: DisplayOpenedCallback -> C_DisplayOpenedCallback Source #
Wrap a DisplayOpenedCallback
into a C_DisplayOpenedCallback
.
seatAdded
type C_DisplaySeatAddedCallback = Ptr () -> Ptr Seat -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DisplaySeatAddedCallback Source #
= Seat |
|
-> IO () |
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 -> 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
genClosure_DisplaySeatAdded :: MonadIO m => DisplaySeatAddedCallback -> m (GClosure C_DisplaySeatAddedCallback) Source #
Wrap the callback into a GClosure
.
mk_DisplaySeatAddedCallback :: C_DisplaySeatAddedCallback -> IO (FunPtr C_DisplaySeatAddedCallback) Source #
Generate a function pointer callable from C code, from a C_DisplaySeatAddedCallback
.
noDisplaySeatAddedCallback :: Maybe DisplaySeatAddedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DisplaySeatAddedCallback
onDisplaySeatAdded :: (IsDisplay a, MonadIO m) => 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
wrap_DisplaySeatAddedCallback :: DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback Source #
Wrap a DisplaySeatAddedCallback
into a C_DisplaySeatAddedCallback
.
seatRemoved
type C_DisplaySeatRemovedCallback = Ptr () -> Ptr Seat -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DisplaySeatRemovedCallback Source #
= Seat |
|
-> IO () |
The seatRemoved signal is emitted whenever a seat is removed by the windowing system.
Since: 3.20
afterDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => 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
genClosure_DisplaySeatRemoved :: MonadIO m => DisplaySeatRemovedCallback -> m (GClosure C_DisplaySeatRemovedCallback) Source #
Wrap the callback into a GClosure
.
mk_DisplaySeatRemovedCallback :: C_DisplaySeatRemovedCallback -> IO (FunPtr C_DisplaySeatRemovedCallback) Source #
Generate a function pointer callable from C code, from a C_DisplaySeatRemovedCallback
.
noDisplaySeatRemovedCallback :: Maybe DisplaySeatRemovedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DisplaySeatRemovedCallback
onDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => 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