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
12 * Interprets data from an Xlib XButtonEvent into members of java
15 * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
17 public class XButtonEvent
extends XEvent
20 // Must match the definition in X.h:
21 public static final int MASK_SHIFT
= 1<<0,
30 public XButtonEvent(XAnyEvent event
)
34 // FIXME: Avoid double checking?
35 if ((event
.getType() != XAnyEvent
.TYPE_BUTTON_PRESS
) &&
36 (event
.getType() != XAnyEvent
.TYPE_BUTTON_RELEASE
))
38 throw new IllegalArgumentException("Wrong event type");