1:
8:
9: package ;
10:
11:
17: public class XButtonEvent extends XEvent
18: {
19:
20:
21: public static final int MASK_SHIFT = 1<<0,
22: MASK_LOCK = 1<<1,
23: MASK_CONTROL = 1<<2,
24: MASK_MOD1 = 1<<3,
25: MASK_MOD2 = 1<<4,
26: MASK_MOD3 = 1<<5,
27: MASK_MOD4 = 1<<6,
28: MASK_MOD5 = 1<<7;
29:
30: public XButtonEvent(XAnyEvent event)
31: {
32: super(event);
33:
34:
35: if ((event.getType() != XAnyEvent.TYPE_BUTTON_PRESS) &&
36: (event.getType() != XAnyEvent.TYPE_BUTTON_RELEASE))
37: {
38: throw new IllegalArgumentException("Wrong event type");
39: }
40: init();
41: }
42:
43: native void init();
44:
45: public long time;
46: public int x;
47: public int y;
48: public int state;
49: public int button;
50: }
51:
52: