Controls the keyboard/mouse pointer grabs and a set of s
<gdk-display>
objects purpose are two fold:
To grab/ungrab keyboard focus and mouse pointer
To manage and provide information about the <gdk-screen>
(s) available for
this <gdk-display>
<gdk-display>
objects are the GDK representation of the 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 <gdk-screen>
objects currently instanciated by the
application. It is also used to grab and release the keyboard and the mouse
pointer.
<gboolean>
)The ::closed signal is emitted when the connection to the windowing system for display is closed.
Since 2.2
mchars
) ⇒ (ret <gdk-display>
)Opens a display.
- display-name
- the name of the display to open
- ret
- a
<gdk-display>
, or ‘#f
’ if the display could not be opened.Since 2.2
<gdk-display>
)Gets the default
<gdk-display>
. This is a convenience function for:gdk_display_manager_get_default_display (gdk_display_manager_get ())
- ret
- a
<gdk-display>
, or ‘#f
’ if there is no default display.Since 2.2
<gdk-display>
) ⇒ (ret mchars
)Gets the name of the display.
- display
- a
<gdk-display>
- ret
- a string representing the display name. This string is owned by GDK and should not be modified or freed.
Since 2.2
<gdk-display>
) ⇒ (ret int
)Gets the number of screen managed by the display.
- display
- a
<gdk-display>
- ret
- number of screens.
Since 2.2
<gdk-display>
) (screen_num int
) ⇒ (ret <gdk-screen>
)Returns a screen object for one of the screens of the display.
- display
- a
<gdk-display>
- screen-num
- the screen number
- ret
- the
<gdk-screen>
objectSince 2.2
<gdk-display>
) ⇒ (ret <gdk-screen>
)Get the default
<gdk-screen>
for display.
- display
- a
<gdk-display>
- ret
- the default
<gdk-screen>
object for displaySince 2.2
<gdk-display>
) (time_ unsigned-int32
)Release any pointer grab.
- display
- a
<gdk-display>
.- time
- a timestap (e.g. ‘GDK_CURRENT_TIME’).
Since 2.2
<gdk-display>
) (time_ unsigned-int32
)Release any keyboard grab
- display
- a
<gdk-display>
.- time
- a timestap (e.g
<gdk-current-time>
).Since 2.2
<gdk-display>
) ⇒ (ret bool
)Test if the pointer is grabbed.
- display
- a
<gdk-display>
- ret
- ‘
#t
’ if an active X pointer grab is in effectSince 2.2
<gdk-display>
)Emits a short beep on display
- display
- a
<gdk-display>
Since 2.2
<gdk-display>
)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
gdk-display-sync
beforegdk-error-trap-pop
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.
- display
- a
<gdk-display>
Since 2.2
<gdk-display>
)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 explicitely. 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.
- display
- a
<gdk-display>
Since 2.4
<gdk-display>
)Closes the connection to the windowing system for the given display, and cleans up associated resources.
- display
- a
<gdk-display>
Since 2.2
<gdk-display>
) ⇒ (ret glist-of
)Returns the list of available input devices attached to display. The list is statically allocated and should not be freed.
- display
- a
<gdk-display>
- ret
- a list of
<gdk-device>
Since 2.2
<gdk-display>
) ⇒ (ret <gdk-event>
)Gets the next
<gdk-event>
to be processed for display, fetching events from the windowing system if necessary.
- display
- a
<gdk-display>
- ret
- the next
<gdk-event>
to be processed, or ‘#f
’ if no events are pending. The returned<gdk-event>
should be freed withgdk-event-free
.Since 2.2
<gdk-display>
) ⇒ (ret <gdk-event>
)Gets a copy of the first
<gdk-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.)
- display
- a
<gdk-display>
- ret
- a copy of the first
<gdk-event>
on the event queue, or ‘#f
’ if no events are in the queue. The returned<gdk-event>
should be freed withgdk-event-free
.Since 2.2
<gdk-display>
) (event <gdk-event>
)Appends a copy of the given event onto the front of the event queue for display.
- display
- a
<gdk-display>
- event
- a
<gdk-event>
.Since 2.2
<gdk-display>
) (msec unsigned-int
)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.
- display
- a
<gdk-display>
- msec
- double click time in milliseconds (thousandths of a second)
Since 2.2
<gdk-display>
) ⇒ (ret <gdk-window>
) (win_x int
) (win_y int
)Obtains the window underneath the mouse pointer, returning the location of that window in win-x, win-y for screen. Returns ‘
#f
’ if the window under the mouse pointer is not known to GDK (for example, belongs to another application).
- display
- a
<gdk-display>
- win-x
- return location for origin of the window under the pointer
- win-y
- return location for origin of the window under the pointer
- ret
- the window under the mouse pointer, or ‘
#f
’Since 2.2
<gdk-display>
) (screen <gdk-screen>
) (x int
) (y int
)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
<gtk-color-selection-dialog>
.
- display
- a
<gdk-display>
- screen
- the screen of display to warp the pointer to
- x
- the x coordinate of the destination
- y
- the y coordinate of the destination
Since 2.8
<gdk-display>
) ⇒ (ret bool
)Returns ‘
#t
’ if multicolored cursors are supported on display. Otherwise, cursors have only a forground and a background color.
- display
- a
<gdk-display>
- ret
- whether cursors can have multiple colors.
Since 2.4
<gdk-display>
) ⇒ (ret bool
)Returns ‘
#t
’ if cursors can use an 8bit alpha channel on display. Otherwise, cursors are restricted to bilevel alpha (i.e. a mask).
- display
- a
<gdk-display>
- ret
- whether cursors can have alpha channels.
Since 2.4
<gdk-display>
) ⇒ (ret unsigned-int
)Returns the default size to use for cursors on display.
- display
- a
<gdk-display>
- ret
- the default cursor size.
Since 2.4
<gdk-display>
) ⇒ (width unsigned-int
) (height unsigned-int
)Gets the maximal size to use for cursors on display.
- display
- a
<gdk-display>
- width
- the return location for the maximal cursor width
- height
- the return location for the maximal cursor height
Since 2.4
<gdk-display>
) ⇒ (ret <gdk-window>
)Returns the default group leader window for all toplevel windows on display. This window is implicitly created by GDK. See
gdk-window-set-group
.
- display
- a
<gdk-display>
- ret
- The default group leader window for display
Since 2.4
<gdk-display>
) ⇒ (ret bool
)Returns ‘
#t
’ ifgdk-window-shape-combine-mask
can be used to create shaped windows on display.
- display
- a
<gdk-display>
- ret
- ‘
#t
’ if shaped windows are supportedSince 2.10
<gdk-display>
) ⇒ (ret bool
)Returns ‘
#t
’ ifgdk-window-input-shape-combine-mask
can be used to modify the input shape of windows on display.
- display
- a
<gdk-display>
- ret
- ‘
#t
’ if windows with modified input shape are supportedSince 2.10