1:
8:
9: package ;
10:
11: import ;
12:
13:
19: public final class XAnyEvent
20: {
21:
22: public static final int
23: TYPE_KEY_PRESS = 2,
24: TYPE_KEY_RELEASE = 3,
25: TYPE_BUTTON_PRESS = 4,
26: TYPE_BUTTON_RELEASE = 5,
27: TYPE_MOTION_NOTIFY = 6,
28: TYPE_ENTER_NOTIFY = 7,
29: TYPE_LEAVE_NOTIFY = 8,
30: TYPE_FOCUS_IN = 9,
31: TYPE_FOCUS_OUT = 10,
32: TYPE_KEYMAP_NOTIFY = 11,
33: TYPE_EXPOSE = 12,
34: TYPE_GRAPHICS_EXPOSE = 13,
35: TYPE_NO_EXPOSE = 14,
36: TYPE_VISIBILITY_NOTIFY = 15,
37: TYPE_CREATE_NOTIFY = 16,
38: TYPE_DESTROY_NOTIFY = 17,
39: TYPE_UNMAP_NOTIFY = 18,
40: TYPE_MAP_NOTIFY = 19,
41: TYPE_MAP_REQUEST = 20,
42: TYPE_REPARENT_NOTIFY = 21,
43: TYPE_CONFIGURE_NOTIFY = 22,
44: TYPE_CONFIGURE_REQUEST = 23,
45: TYPE_GRAVITY_NOTIFY = 24,
46: TYPE_RESIZE_REQUEST = 25,
47: TYPE_CIRCULATE_NOTIFY = 26,
48: TYPE_CIRCULATE_REQUEST = 27,
49: TYPE_PROPERTY_NOTIFY = 28,
50: TYPE_SELECTION_CLEAR = 29,
51: TYPE_SELECTION_REQUEST = 30,
52: TYPE_SELECTION_NOTIFY = 31,
53: TYPE_COLORMAP_NOTIFY = 32,
54: TYPE_CLIENT_MESSAGE = 33,
55: TYPE_MAPPING_NOTIFY = 34;
56:
57:
58: public final static long MASK_SUBSTRUCTURE_NOTIFY = 1L<<19,
59: MASK_SUBSTRUCTURE_REDIRECT = 1L<<20;
60:
61: public XAnyEvent(Display display)
62: {
63: this.display = display;
64: init();
65: }
66:
67: private native void init();
68: protected native void finalize();
69:
70:
73: public native boolean loadNext(boolean block);
74: public native void interrupt();
75:
76: public native int getType();
77: public native void setType(int type);
78:
79: public native Window getWindow();
80: public native void setWindow(Window window);
81:
82:
85: public native long getSerial();
86:
87: public native void send(Window destination, boolean propagate,
88: long mask);
89:
90: RawData pipefds;
91: RawData structure;
92: Display display;
93:
94: public String toString()
95: {
96: if (structure == null)
97: return getClass().getName() + "[no-structure]";
98:
99: return getClass().getName() +
100: "[type=" + getType() +
101: ",window=" + getWindow() + "]";
102: }
103: }