1 /* Copyright (C) 2000 Free Software Foundation
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
11 import gnu
.gcj
.RawData
;
14 * Mutable event structure that can contain any data from any event
15 * type. Events can be constructed or loaded from the event queue.
17 * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
19 public final class XAnyEvent
21 // Must match the definitions in X.h:
22 public static final int
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,
32 TYPE_KEYMAP_NOTIFY
= 11,
34 TYPE_GRAPHICS_EXPOSE
= 13,
36 TYPE_VISIBILITY_NOTIFY
= 15,
37 TYPE_CREATE_NOTIFY
= 16,
38 TYPE_DESTROY_NOTIFY
= 17,
39 TYPE_UNMAP_NOTIFY
= 18,
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;
57 // Must match the definitions in X.h:
58 public final static long MASK_SUBSTRUCTURE_NOTIFY
= 1L<<19,
59 MASK_SUBSTRUCTURE_REDIRECT
= 1L<<20;
61 public XAnyEvent(Display display
)
63 this.display
= display
;
67 private native void init();
68 protected native void finalize();
71 * Load next event into the event structure.
73 public native void loadNext();
75 public native int getType();
76 public native void setType(int type
);
78 public native Window
getWindow();
79 public native void setWindow(Window window
);
82 * @returns the number of the last request processed by the server.
84 public native long getSerial();
86 public native void send(Window destination
, boolean propagate
,
92 public String
toString()
94 if (structure
== null)
95 return getClass().getName() + "[no-structure]";
97 return getClass().getName() +
98 "[type=" + getType() +
99 ",window=" + getWindow() + "]";