|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gdk.Display
public class Display
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 Screen objects currently instanciated by the application. It is also used to grab and release the keyboard and the mouse pointer.
Constructor Summary | |
---|---|
Display()
Creates the default Display. |
|
Display(org.gnu.glib.Handle hndl)
|
|
Display(java.lang.String name)
Creates the named display |
Method Summary | |
---|---|
void |
beep()
Emits a short beep on display. |
void |
close()
Closes the connection to the windowing system for this display and cleans up associated resources. |
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. |
Device |
getCorePointer()
Returns the core pointer device for this display. |
int |
getDefaultCursorSize()
Returns the default size to use for cursors on display. |
Window |
getDefaultGroup()
Returns the default group leader window for all toplevel windows on display. |
Screen |
getDefaultScreen()
Gets the default Screen for display. |
static Display |
getDisplayFromHandle(org.gnu.glib.Handle hndl)
Create a new Display from a handle to a native resource. |
Event |
getEvent()
Gets the next event to be processed by the display, fetching events from the windowing system if necessary. |
int |
getMaxCursorHeight()
Return the maximum height for a cursor on display. |
int |
getMaxCursorWidth()
Return the maximum width for a cursor on display. |
java.lang.String |
getName()
Gets the name of the Display. |
int |
getNumScreens()
Gets the number of Screens managed by the Display. |
Point |
getPointerLocation()
Returns the point where the pointer is currently pointing. |
Screen |
getPointerScreen()
Returns the screen that the pointer is on. |
Screen |
getScreen(int screenNumber)
Gets the a Screen object for one of the screens of the display. |
Type |
getType()
|
Window |
getWindowAtPointer()
Obtains the window underneath the mouse pointer. |
Device[] |
listDevice()
Returns an array of available input devices attached to this display. |
static Display |
open(java.lang.String name)
Deprecated. |
Event |
peekEvent()
Gets a copy of the first event in the display's event queue without removing the event from the queue. |
boolean |
pointerIsGrabbed()
Tests if the pointer is grabbed. |
void |
putEvent(Event anEvent)
Appends a copy of a given event onto the front of the event queue for the display. |
boolean |
requestSelectionNotification(Atom atom)
Requests EventOwnerChange events for ownership changes of the selection named by the given atom. |
void |
setDoubleClickDistance(int distance)
Sets the double click distance (two clicks within this distance count as a double click). |
void |
setDoubleClickTime(int msec)
Set the double click time (two clicks within this time interval count as a double click). |
void |
storeClipboard(Window clipboardWindow,
Atom[] targets)
Issues a request to the clipboard manager to store the clipboard data. |
boolean |
supportsClipboardPersistence()
Returns whether the display supports clipboard persistence; i.e. |
boolean |
supportsCursorAlpha()
Returns true if the cursor can use an 8bit alpha channel on display. |
boolean |
supportsCursorColor()
Returns true if multicolored cursors are supported on the display. |
boolean |
supportsSelectionNotification()
Returns whether EventOwnerChange events will be sent when the owner of a selection changes. |
void |
sync()
Flushes any requests queued for the windowing system and waits until all requests are handled. |
void |
ungrabKeyboard()
Releases any keyboard grab. |
void |
ungrabPointer()
Releases any pointer grab. |
void |
warpPointer(Screen screen,
int x,
int y)
|
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Display()
public Display(java.lang.String name)
name
- The name of the display to openpublic Display(org.gnu.glib.Handle hndl)
Method Detail |
---|
public static Display open(java.lang.String name)
name
- public java.lang.String getName()
public int getNumScreens()
public Screen getScreen(int screenNumber)
screenNumber
- public Screen getDefaultScreen()
public void ungrabPointer()
public void ungrabKeyboard()
public boolean pointerIsGrabbed()
public void beep()
public void sync()
public void flush()
public void close()
public Device[] listDevice()
public Event getEvent()
public Event peekEvent()
public void putEvent(Event anEvent)
anEvent
- public Point getPointerLocation()
public Screen getPointerScreen()
public Device getCorePointer()
public Window getWindowAtPointer()
public boolean supportsCursorAlpha()
public boolean supportsCursorColor()
public int getDefaultCursorSize()
public int getMaxCursorWidth()
public int getMaxCursorHeight()
public Window getDefaultGroup()
public boolean supportsSelectionNotification()
public boolean requestSelectionNotification(Atom atom)
atom
- public boolean supportsClipboardPersistence()
public void storeClipboard(Window clipboardWindow, Atom[] targets)
clipboardWindow
- targets
- public void warpPointer(Screen screen, int x, int y)
public void setDoubleClickTime(int msec)
msec
- public void setDoubleClickDistance(int distance)
distance
- public Type getType()
public static Display getDisplayFromHandle(org.gnu.glib.Handle hndl)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |