Controls the keyboard/mouse pointer grabs and a set of Screens.
beep
public void beep()
Emits a short beep on display.
close
public void close()
Closes the connection to the windowing system for this display
and cleans up associated resources.
flush
public void flush()
Flushes any requests queued for the windowing system; this
happens automatically when the main loop block waiting for
events, but if your application is drawing without returning
control to the main loop, you may need to call this method
explicitely. A common case where this method 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.
gdk_display_beep
protected static final void gdk_display_beep(Handle display)
gdk_display_close
protected static final void gdk_display_close(Handle display)
gdk_display_flush
protected static final void gdk_display_flush(Handle display)
gdk_display_get_core_pointer
protected static final Handle gdk_display_get_core_pointer(Handle display)
gdk_display_get_default
protected static final Handle gdk_display_get_default()
gdk_display_get_default_cursor_size
protected static final int gdk_display_get_default_cursor_size(Handle display)
gdk_display_get_default_group
protected static final Handle gdk_display_get_default_group(Handle display)
gdk_display_get_default_screen
protected static final Handle gdk_display_get_default_screen(Handle display)
gdk_display_get_event
protected static final Handle gdk_display_get_event(Handle display)
gdk_display_get_maximum_cursor_size
protected static final void gdk_display_get_maximum_cursor_size(Handle display,
int[] width,
int[] height)
gdk_display_get_n_screens
protected static final int gdk_display_get_n_screens(Handle display)
gdk_display_get_name
protected static final String gdk_display_get_name(Handle display)
gdk_display_get_pointer
protected static final void gdk_display_get_pointer(Handle display,
Handle screen,
int[] x,
int[] y,
int[] modType)
gdk_display_get_screen
protected static final Handle gdk_display_get_screen(Handle display,
int screenNum)
gdk_display_get_type
protected static final int gdk_display_get_type()
gdk_display_get_window_at_pointer
protected static final Handle gdk_display_get_window_at_pointer(Handle display,
int x,
int y)
gdk_display_keyboard_ungrab
protected static final void gdk_display_keyboard_ungrab(Handle display,
int time)
gdk_display_list_devices
protected static final Handle[] gdk_display_list_devices(Handle display)
gdk_display_open
protected static final Handle gdk_display_open(String displayName)
gdk_display_peek_event
protected static final Handle gdk_display_peek_event(Handle display)
gdk_display_pointer_is_grabbed
protected static final boolean gdk_display_pointer_is_grabbed(Handle display)
gdk_display_pointer_ungrab
protected static final void gdk_display_pointer_ungrab(Handle display,
int time)
gdk_display_put_event
protected static final void gdk_display_put_event(Handle display,
Handle event)
gdk_display_request_selection_notification
protected static final boolean gdk_display_request_selection_notification(Handle display,
Handle selection)
gdk_display_store_clipboard
protected static final void gdk_display_store_clipboard(Handle display,
Handle clipboardWindow,
int time,
Handle[] targets)
gdk_display_supports_clipboard_persistence
protected static final boolean gdk_display_supports_clipboard_persistence(Handle display)
gdk_display_supports_cursor_alpha
protected static final boolean gdk_display_supports_cursor_alpha(Handle display)
gdk_display_supports_cursor_color
protected static final boolean gdk_display_supports_cursor_color(Handle display)
gdk_display_supports_selection_notification
protected static final boolean gdk_display_supports_selection_notification(Handle display)
gdk_display_sync
protected static final void gdk_display_sync(Handle display)
getCorePointer
public Device getCorePointer()
getDefaultCursorSize
public int getDefaultCursorSize()
Returns the default size to use for cursors on display.
getDefaultGroup
public Window getDefaultGroup()
Returns the default group leader window for all toplevel
windows on display.
getDefaultScreen
public Screen getDefaultScreen()
Gets the default Screen for display.
getEvent
public Event getEvent()
Gets the next event to be processed by the display,
fetching events from the windowing system if necessary.
getMaxCursorHeight
public int getMaxCursorHeight()
Return the maximum height for a cursor on display.
getMaxCursorWidth
public int getMaxCursorWidth()
Return the maximum width for a cursor on display.
getName
public String getName()
Gets the name of the Display.
getNumScreens
public int getNumScreens()
Gets the number of Screens managed by the Display.
getPointerLocation
public Point getPointerLocation()
Returns the point where the pointer is currently pointing.
getPointerScreen
public Screen getPointerScreen()
Returns the screen that the pointer is on.
getScreen
public Screen getScreen(int screenNumber)
Gets the a Screen object for one of the screens of the display.
screenNumber
-
getWindowAtPointer
public Window getWindowAtPointer()
Obtains the window underneath the mouse pointer.
listDevice
public Device[] listDevice()
Returns an array of available input devices attached to this
display.
open
public static Display open(String name)
Opens a Display.
name
-
peekEvent
public Event peekEvent()
Gets a copy of the first event in the display's event
queue without removing the event from the queue.
pointerIsGrabbed
public boolean pointerIsGrabbed()
Tests if the pointer is grabbed.
putEvent
public void putEvent(Event anEvent)
Appends a copy of a given event onto the front of the
event queue for the display.
anEvent
-
requestSelectionNotification
public boolean requestSelectionNotification(Atom atom)
Requests EventOwnerChange events for ownership changes of the
selection named by the given atom.
atom
-
storeClipboard
public void storeClipboard(Window clipboardWindow,
Atom[] targets)
Issues a request to the clipboard manager to store the clipboard
data.
clipboardWindow
- targets
-
supportsClipboardPersistence
public boolean supportsClipboardPersistence()
Returns whether the display supports clipboard persistence; i.e.
if it is possible to store the clipboard data after an application
has quit.
supportsCursorAlpha
public boolean supportsCursorAlpha()
Returns true if the cursor can use an 8bit alpha channel
on display.
supportsCursorColor
public boolean supportsCursorColor()
Returns true if multicolored cursors are supported on the
display.
supportsSelectionNotification
public boolean supportsSelectionNotification()
Returns whether EventOwnerChange events will be sent when
the owner of a selection changes.
sync
public void sync()
Flushes any requests queued for the windowing system and
waits until all requests are handled. This is often used
for making sure that the display is synchronized with the
current state of the program.
ungrabKeyboard
public void ungrabKeyboard()
Releases any keyboard grab.
ungrabPointer
public void ungrabPointer()
Releases any pointer grab.