|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.x11.Resource gnu.x11.Drawable gnu.x11.Window
public class Window
X window.
Nested Class Summary | |
---|---|
static class |
Window.Attributes
X window attributes. |
static class |
Window.AttributesReply
Reply of attributes() . |
static class |
Window.Changes
X window changes. |
class |
Window.Coordinates
Reply of translate_coordinates(Window, int, int) . |
class |
Window.PointerInfo
Reply of #pointer() . |
class |
Window.Property
Reply of #property(boolean, Atom, Atom, int, int) . |
static class |
Window.TimeCoord
|
class |
Window.TreeInfo
Reply of tree() . |
static class |
Window.WMClassHint
X window manager class hint. |
static class |
Window.WMHints
X window manager hints. |
static class |
Window.WMSizeHints
X window manager size hints. |
static class |
Window.WMState
X window manager state. |
Nested classes/interfaces inherited from class gnu.x11.Drawable |
---|
Drawable.GeometryInfo |
Field Summary | |
---|---|
static int |
ALREADY_GRABBED
|
static int |
ANY_BUTTON
|
static int |
ANY_KEY
|
static int |
ANY_MODIFIER
|
static int |
APPEND
|
static int |
ASYNCHRONOUS
|
static int |
COPY_FROM_PARENT
|
static int |
DELETE
|
static int |
FROZEN
|
static int |
INPUT_ONLY
|
static int |
INPUT_OUTPUT
|
static int |
INSERT
|
static int |
INVALID_TIME
|
static int |
LOWER_HIGHEST
|
static int |
MAX_WM_LENGTH
|
static Window |
NONE
Predefined windows. |
static int |
NOT_VIEWABLE
|
Window |
parent
|
static Window |
POINTER_ROOT
|
static int |
PREPEND
|
static int |
RAISE_LOWEST
|
static int |
REPLACE
|
static int |
SUCCESS
|
static int |
SYNCHRONOUS
|
static int |
TO_NONE
|
static int |
TO_PARENT
|
static int |
TO_POINTER_ROOT
|
int |
x
|
int |
y
|
Fields inherited from class gnu.x11.Drawable |
---|
COMPLEX, CONVEX, CURSOR, height, NONCONVEX, ORIGIN, PREVIOUS, STIPPLE, TILE, width |
Fields inherited from class gnu.x11.Resource |
---|
display, id |
Constructor Summary | |
---|---|
Window(Display display,
int id)
Intern. |
|
Window(int id)
Predefined. |
|
Window(Window parent,
int x,
int y,
int width,
int height)
Initialize member fields only without creating object in X server. |
|
Window(Window parent,
int x,
int y,
int width,
int height,
int border_width,
Window.Attributes attr)
|
|
Window(Window parent,
Rectangle geometry)
|
|
Window(Window parent,
Rectangle geometry,
int border_width,
Window.Attributes attr)
|
Method Summary | |
---|---|
Window.AttributesReply |
attributes()
|
void |
change_attributes(Window.Attributes attr)
This request will be aggregated. |
void |
change_property(Atom property,
Atom type,
int data)
|
void |
change_property(int mode,
Atom property,
Atom type,
int format,
java.lang.Object data,
int offset,
int data_format)
Extra parameters (offset and data_format) are used to support Data class as parameter for writing. |
void |
change_save_set(boolean mode)
|
void |
circulate_window(int direction)
|
void |
clear_area(int x,
int y,
int width,
int height,
boolean exposures)
|
void |
clear(boolean exposures)
|
void |
configure(Window.Changes changes)
This request will be aggregated. |
void |
convert_selection(Atom selection,
Atom target,
Atom property,
int time)
|
void |
create()
|
void |
create(int border_width,
int depth,
int klass,
int visual_id,
Window.Attributes attr)
|
void |
create(int border_width,
Window.Attributes attr)
|
void |
delete_property(Atom property)
|
void |
delete()
|
void |
destroy_subwindows()
|
void |
destroy()
|
void |
flip()
|
Window.TimeCoord[] |
get_motion_events(int start,
int stop)
|
Window.Property |
get_property(boolean delete,
Atom property,
Atom type,
int offset,
int length)
|
void |
grab_button_ignore_locks(int button,
int modifiers,
boolean owner_events,
int event_mask,
int pointer_mode,
int keyboard_mode,
Window confine_to,
Cursor cursor)
Grab button ignoring caps lock (LOCK), num lock (MOD2), and scroll lock (MOD5). |
void |
grab_button(int button,
int modifiers,
boolean owner_events,
int event_mask,
int pointer_mode,
int keyboard_mode,
Window confine_to,
Cursor cursor)
|
void |
grab_key_ignore_locks(int keysym,
int modifiers,
boolean owner_events,
int pointer_mode,
int keyboard_mode)
Grab key ignoring caps lock (LOCK), num lock (MOD2), and scroll lock (MOD5). |
void |
grab_key(int keysym,
int modifiers,
boolean owner_events,
int pointer_mode,
int keyboard_mode)
|
int |
grab_keyboard(boolean owner_events,
int pointer_mode,
int keyboard_mode,
int time)
|
int |
grab_pointer(boolean owner_events,
int event_mask,
int pointer_mode,
int keyboard_mode,
Window confine_to,
Cursor cursor,
int time)
|
void |
iconify()
|
int |
id()
Returns the resource ID of this resource. |
static java.lang.Object |
intern(Display display,
int id)
|
void |
kill()
|
Colormap[] |
list_installed_colormaps()
|
void |
lower()
|
void |
map_subwindows()
|
void |
map()
|
void |
move_resize()
|
void |
move_resize(int x,
int y,
int width,
int height)
|
void |
move_resize(Rectangle rectangle)
|
void |
move()
|
void |
move(int x,
int y)
|
Atom[] |
properties()
|
Window.PointerInfo |
query_pointer()
|
void |
raise()
|
Rectangle |
rectangle()
|
void |
reparent(Window parent,
int x,
int y)
|
void |
resize()
|
void |
resize(int width,
int height)
|
boolean |
resized(Rectangle r)
|
void |
rotate_properties(Atom[] properties,
int delta)
|
Screen |
screen()
|
void |
select_input(int event_mask)
|
void |
send_event(boolean propagate,
int event_mask,
Event event)
|
void |
set_background(Color c)
|
void |
set_background(int pixel)
|
void |
set_background(Pixmap p)
|
void |
set_border(Color c)
|
void |
set_border(int pixel)
|
void |
set_border(Pixmap p)
|
void |
set_colormap(Colormap cmap)
|
void |
set_geometry_cache(Rectangle r)
|
void |
set_input_focus()
|
void |
set_input_focus(int revert_to,
int time)
|
void |
set_selection_owner(Atom selection,
int time)
|
void |
set_wm_class_hint(java.lang.String res_name,
java.lang.String res_class)
|
void |
set_wm_class_hint(Window.WMClassHint class_hint)
|
void |
set_wm_delete_window()
|
void |
set_wm_hints(Window.WMHints wm_hints)
|
void |
set_wm_name(java.lang.String wm_name)
|
void |
set_wm_normal_hints(Window.WMSizeHints size_hints)
|
void |
set_wm_protocol(java.lang.String name)
|
void |
set_wm_state(int state)
|
void |
set_wm_state(int state,
Window icon)
|
void |
set_wm_state(Window.WMState state)
|
void |
set_wm(java.lang.Object app,
java.lang.String topic)
A standard way to set wm class hint and name in Java. |
java.lang.String |
toString()
|
Window.Coordinates |
translate_coordinates(Window src,
int src_x,
int src_y)
|
Window.TreeInfo |
tree()
|
void |
ungrab_button(int button,
int modifiers)
|
void |
ungrab_key(int keysym,
int modifiers)
|
void |
unmap_subwindows()
|
void |
unmap()
|
void |
warp_pointer(int x,
int y)
|
void |
warp_pointer(Point position)
|
void |
warp_pointer(Window src,
int src_x,
int src_y,
int src_width,
int src_height,
int dest_x,
int dest_y)
|
Window.WMClassHint |
wm_class_hint()
|
Window.WMHints |
wm_hints()
|
java.lang.String |
wm_name()
|
Window.WMSizeHints |
wm_normal_hints()
|
boolean |
wm_protocol(java.lang.String name)
|
int[] |
wm_protocols()
|
Window.WMState |
wm_state()
|
Methods inherited from class gnu.x11.Drawable |
---|
arc, best_size, copy_area, copy_plane, fill_arc, fill_poly, fill_poly, fill_rectangle, get_geometry, image_text, image_text16, image, line, point, poly_arc, poly_fill_arc, poly_line, poly_line, poly_line, poly_point, poly_point, poly_rectangle, poly_segment, poly_text, poly_text16, put_image, put_small_image, rectangle, rectangle, segment, text, text16, text8 |
Methods inherited from class gnu.x11.Resource |
---|
unintern |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Window NONE
All predefined resources are not "properly" initialzied, in the
sense that member variable display
is null
.
That is, they are not connected to any X server, and cannot be used
for server interaction (because display == null
,
resulting in NullPointerException
).
For special operations like setting selection owner to
NONE
, do:
Window.NONE.display = ...;
Window.NONE.set_selection_owner (...);
We could make these predefined resources members of
Display
class, and could initialize them properly for
each Display
instance. It would prevent programmers from
the mistake described above. However, predefined resources are not
designed in the first place for server interaction. For example, you
cannot draw a line on Window.POINTER_WINDOW
. Second, it
is a better classification to put predefined resources in their
respective classes. Third, it is cheaper to have predefined resources
as static final
objects.
Note also that, consequently, predefined resources are not interned
to Display.resource
. For example, Window.intern
(this, 0)
will not return static variable NONE
.
Instead it creates a new Window
object which sequential
intern calls will return. As a side effect, Window
equality should not be tested with ==
operator; it should
be tested easily as this_window.id == that_window.id
.
public int x
public int y
public Window parent
public static final int COPY_FROM_PARENT
public static final int INPUT_OUTPUT
public static final int INPUT_ONLY
public static final int INSERT
public static final int DELETE
public static final int RAISE_LOWEST
public static final int LOWER_HIGHEST
public static final int REPLACE
public static final int PREPEND
public static final int APPEND
public static final int SYNCHRONOUS
public static final int ASYNCHRONOUS
public static final int SUCCESS
public static final int ALREADY_GRABBED
public static final int INVALID_TIME
public static final int NOT_VIEWABLE
public static final int FROZEN
public static final int ANY_BUTTON
public static final int ANY_MODIFIER
public static final int ANY_KEY
public static final Window POINTER_ROOT
public static final int TO_NONE
public static final int TO_POINTER_ROOT
public static final int TO_PARENT
public static final int MAX_WM_LENGTH
Constructor Detail |
---|
public Window(int id)
public Window(Display display, int id)
public Window(Window parent, Rectangle geometry)
Window(Window, int, int, int, int)
public Window(Window parent, Rectangle geometry, int border_width, Window.Attributes attr)
Window(Window, int, int, int, int, int, Window.Attributes)
public Window(Window parent, int x, int y, int width, int height)
public Window(Window parent, int x, int y, int width, int height, int border_width, Window.Attributes attr)
create(int, int, int, int, Window.Attributes)
Method Detail |
---|
public void create(int border_width, int depth, int klass, int visual_id, Window.Attributes attr)
depth
- possible: COPY_FROM_PARENT
klass
- valid:
COPY_FROM_PARENT
,
INPUT_OUTPUT
,
INPUT_ONLY
visual_id
- possible: COPY_FROM_PARENT
public void create(int border_width, Window.Attributes attr)
create(int, int, int, int, Window.Attributes)
public void create()
create(int, Window.Attributes)
public void change_attributes(Window.Attributes attr)
aggregation
public Window.AttributesReply attributes()
public void destroy()
public void destroy_subwindows()
public void change_save_set(boolean mode)
mode
- valid:
INSERT
,
DELETE
public void reparent(Window parent, int x, int y)
public void map()
public void map_subwindows()
public void unmap()
public void unmap_subwindows()
public void configure(Window.Changes changes)
aggregation
public void circulate_window(int direction)
direction
- valid:
RAISE_LOWEST
,
LOWER_HIGHEST
public Window.TreeInfo tree()
public void change_property(int mode, Atom property, Atom type, int format, java.lang.Object data, int offset, int data_format)
mode
- valid:
REPLACE
,
PREPEND
,
APPEND
format:
- valid:
8
,
16
,
32
data_format:
- valid:
8
,
16
,
32
public void delete_property(Atom property)
public Window.Property get_property(boolean delete, Atom property, Atom type, int offset, int length)
public Atom[] properties()
Enum#next()
of type Atom
,
Enum#next4()
public void set_selection_owner(Atom selection, int time)
time
- possible: Display.CURRENT_TIME
public void convert_selection(Atom selection, Atom target, Atom property, int time)
time
- possible: Display.CURRENT_TIME
public void send_event(boolean propagate, int event_mask, Event event)
public int grab_pointer(boolean owner_events, int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, int time)
pointer_mode
- valid:
SYNCHRONOUS
,
ASYNCHRONOUS
keyboard_mode
- valid:
SYNCHRONOUS
,
ASYNCHRONOUS
confine_to
- possible: NONE
cursor
- possible: Cursor.NONE
time
- possible: Display.CURRENT_TIME
SUCCESS
,
ALREADY_GRABBED
,
FROZEN
,
INVALID_TIME
,
NOT_VIEWABLE
public void grab_button(int button, int modifiers, boolean owner_events, int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor)
button
- possible: ANY_BUTTON
modifiers
- possible: ANY_MODIFIER
pointer_mode
- valid:
SYNCHRONOUS
,
ASYNCHRONOUS
keyboard_mode
- valid:
SYNCHRONOUS
,
ASYNCHRONOUS
confine_to
- possible: NONE
cursor
- possible: Cursor.NONE
public void ungrab_button(int button, int modifiers)
button
- possible: ANY_BUTTON
modifiers
- possible: ANY_MODIFIER
public int grab_keyboard(boolean owner_events, int pointer_mode, int keyboard_mode, int time)
pointer_mode
- valid:
SYNCHRONOUS
,
ASYNCHRONOUS
keyboard_mode
- valid:
SYNCHRONOUS
,
ASYNCHRONOUS
time
- possible: Display.CURRENT_TIME
SUCCESS
,
ALREADY_GRABBED
,
FROZEN
,
INVALID_TIME
,
NOT_VIEWABLE
public void grab_key(int keysym, int modifiers, boolean owner_events, int pointer_mode, int keyboard_mode)
modifiers
- possible: ANY_MODIFIER
pointer_mode
- valid:
SYNCHRONOUS
,
ASYNCHRONOUS
keyboard_mode
- valid:
SYNCHRONOUS
,
ASYNCHRONOUS
public void ungrab_key(int keysym, int modifiers)
key
- possible: ANY_KEY
modifiers
- possible: ANY_MODIFIER
public Window.PointerInfo query_pointer()
public Window.TimeCoord[] get_motion_events(int start, int stop)
start
- possible: Display.CURRENT_TIME
stop
- possible: Display.CURRENT_TIME
public Window.Coordinates translate_coordinates(Window src, int src_x, int src_y)
public void warp_pointer(Window src, int src_x, int src_y, int src_width, int src_height, int dest_x, int dest_y)
src
- possible: NONE
public void set_background(Color c)
change_attributes(Window.Attributes)
,
Window.Attributes.set_background(Color)
public void set_background(int pixel)
change_attributes(Window.Attributes)
,
Window.Attributes.set_background(int)
public void set_background(Pixmap p)
change_attributes(Window.Attributes)
,
Window.Attributes.set_background(Pixmap)
public void set_border(Color c)
change_attributes(Window.Attributes)
,
Window.Attributes.set_border(Color)
public void set_border(int pixel)
change_attributes(Window.Attributes)
,
Window.Attributes.set_border(int)
public void set_border(Pixmap p)
change_attributes(Window.Attributes)
,
Window.Attributes.set_border(Pixmap)
public void set_colormap(Colormap cmap)
change_attributes(Window.Attributes)
,
Window.Attributes.set_colormap(Colormap)
public void set_input_focus(int revert_to, int time)
mode
- valid:
TO_NONE
,
TO_POINTER_ROOT
,
TO_PARENT
time
- possible: Display.CURRENT_TIME
public void clear_area(int x, int y, int width, int height, boolean exposures)
public Colormap[] list_installed_colormaps()
Enum#next()
of type Colormap
,
Enum#next4()
public void rotate_properties(Atom[] properties, int delta)
public void change_property(Atom property, Atom type, int data)
#change_property(int, int, Atom, Atom, int, Object, int, int)
public void clear(boolean exposures)
clear_area(int, int, int, int, boolean)
public void delete()
public void flip()
configure(Window.Changes)
public void grab_button_ignore_locks(int button, int modifiers, boolean owner_events, int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor)
grab_button(int, int, boolean, int, int, int, Window, Cursor)
public void grab_key_ignore_locks(int keysym, int modifiers, boolean owner_events, int pointer_mode, int keyboard_mode)
grab_key(int, int, boolean, int, int)
,
grab_button_ignore_locks(int, int, boolean, int, int, int,
Window, Cursor)
public void iconify()
send_event(boolean, int, Event)
public static java.lang.Object intern(Display display, int id)
public void lower()
configure(Window.Changes)
public void move()
public void move(int x, int y)
configure(Window.Changes)
public void move_resize()
configure(Window.Changes)
public void move_resize(int x, int y, int width, int height)
configure(Window.Changes)
public void move_resize(Rectangle rectangle)
configure(Window.Changes)
public void kill()
Display.kill_client(Resource)
public void raise()
configure(Window.Changes)
public Rectangle rectangle()
public void resize()
configure(Window.Changes)
public void resize(int width, int height)
configure(Window.Changes)
public boolean resized(Rectangle r)
public Screen screen()
public void select_input(int event_mask)
change_attributes(Window.Attributes)
public void set_input_focus()
set_input_focus(int, int)
public void set_geometry_cache(Rectangle r)
public void set_wm(java.lang.Object app, java.lang.String topic)
set_wm_class_hint(String, String)
,
set_wm_name(String)
public void set_wm_class_hint(Window.WMClassHint class_hint)
set_wm_class_hint(String, String)
public void set_wm_class_hint(java.lang.String res_name, java.lang.String res_class)
#change_property(int, int, Atom, Atom, int, Object, int, int)
public void set_wm_hints(Window.WMHints wm_hints)
#change_property(int, int, Atom, Atom, int, Object, int, int)
public void set_wm_normal_hints(Window.WMSizeHints size_hints)
#change_property(int, int, Atom, Atom, int, Object, int, int)
public void set_wm_name(java.lang.String wm_name)
#change_property(int, int, Atom, Atom, int, Object, int, int)
public void set_wm_delete_window()
set_wm_protocol(String)
public void set_wm_protocol(java.lang.String name)
change_property(Atom, Atom, int)
public void set_wm_state(int state)
set_wm_state(int, Window)
public void set_wm_state(Window.WMState state)
set_wm_state(int, Window)
public void set_wm_state(int state, Window icon)
#change_property(int, int, Atom, Atom, int, Object, int, int)
public java.lang.String toString()
toString
in class java.lang.Object
public Window.WMClassHint wm_class_hint()
#property(boolean, Atom, Atom, int, int)
public Window.WMHints wm_hints()
#property(boolean, Atom, Atom, int, int)
public java.lang.String wm_name()
#property(boolean, Atom, Atom, int, int)
public Window.WMSizeHints wm_normal_hints()
#property(boolean, Atom, Atom, int, int)
public boolean wm_protocol(java.lang.String name)
wm_protocols()
public int[] wm_protocols()
Enum#next()
of type Atom
,
Enum#next4()
#property(boolean, Atom, Atom, int, int)
public Window.WMState wm_state()
#property(boolean, Atom, Atom, int, int)
public void warp_pointer(int x, int y)
warp_pointer(Window, int, int, int, int, int, int)
public void warp_pointer(Point position)
warp_pointer(int, int)
public int id()
Resource
id
in interface GLXDrawable
id
in class Resource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |