mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-27 03:49:03 +08:00
2622c79d2d
* Makefile.am: Added rules for libgcjx library. * Makefile.in: Rebuilt. * configure.in: Added check for X. * configure: Rebuilt. * gnu/awt/LightweightRedirector.java: New file. * gnu/awt/j2d/AbstractGraphicsState.java: New file. * gnu/awt/j2d/DirectRasterGraphics.java: New file. * gnu/awt/j2d/Graphics2DImpl.java: New file. * gnu/awt/j2d/IntegerGraphicsState.java: New file. * gnu/awt/j2d/MappedRaster.java: New file. * gnu/awt/xlib/XCanvasPeer.java: New file. * gnu/awt/xlib/XEventLoop.java: New file. * gnu/awt/xlib/XEventQueue.java: New file. * gnu/awt/xlib/XFontMetrics.java: New file. * gnu/awt/xlib/XFramePeer.java: New file. * gnu/awt/xlib/XGraphics.java: New file. * gnu/awt/xlib/XGraphicsConfiguration.java: New file. * gnu/awt/xlib/XPanelPeer.java: New file. * gnu/awt/xlib/XToolkit.java: New file. * gnu/gcj/xlib/Clip.java: New file. * gnu/gcj/xlib/Colormap.java: New file. * gnu/gcj/xlib/Display.java: New file. * gnu/gcj/xlib/Drawable.java: New file. * gnu/gcj/xlib/Font.java: New file. * gnu/gcj/xlib/GC.java: New file. * gnu/gcj/xlib/Pixmap.java: New file. * gnu/gcj/xlib/Screen.java: New file. * gnu/gcj/xlib/Visual.java: New file. * gnu/gcj/xlib/WMSizeHints.java: New file. * gnu/gcj/xlib/Window.java: New file. * gnu/gcj/xlib/WindowAttributes.java: New file. * gnu/gcj/xlib/XAnyEvent.java: New file. * gnu/gcj/xlib/XButtonEvent.java: New file. * gnu/gcj/xlib/XColor.java: New file. * gnu/gcj/xlib/XConfigureEvent.java: New file. * gnu/gcj/xlib/XConnectException.java: New file. * gnu/gcj/xlib/XEvent.java: New file. * gnu/gcj/xlib/XException.java: New file. * gnu/gcj/xlib/XExposeEvent.java: New file. * gnu/gcj/xlib/XID.java: New file. * gnu/gcj/xlib/XImage.java: New file. * gnu/gcj/xlib/XUnmapEvent.java: New file. * gnu/gcj/xlib/natClip.cc: New file. * gnu/gcj/xlib/natColormap.cc: New file. * gnu/gcj/xlib/natDisplay.cc: New file. * gnu/gcj/xlib/natDrawable.cc: New file. * gnu/gcj/xlib/natFont.cc: New file. * gnu/gcj/xlib/natGC.cc: New file. * gnu/gcj/xlib/natPixmap.cc: New file. * gnu/gcj/xlib/natScreen.cc: New file. * gnu/gcj/xlib/natVisual.cc: New file. * gnu/gcj/xlib/natWMSizeHints.cc: New file. * gnu/gcj/xlib/natWindow.cc: New file. * gnu/gcj/xlib/natWindowAttributes.cc: New file. * gnu/gcj/xlib/natXAnyEvent.cc: New file. * gnu/gcj/xlib/natXButtonEvent.cc: New file. * gnu/gcj/xlib/natXColor.cc: New file. * gnu/gcj/xlib/natXConfigureEvent.cc: New file. * gnu/gcj/xlib/natXException.cc: New file. * gnu/gcj/xlib/natXExposeEvent.cc: New file. * gnu/gcj/xlib/natXImage.cc: New file. * gnu/gcj/xlib/natXUnmapEvent.cc: New file. * java/awt/EventDispatchThread.java: Start thead on creation. From-SVN: r37005
107 lines
2.5 KiB
Java
107 lines
2.5 KiB
Java
/* Copyright (C) 2000 Free Software Foundation
|
|
|
|
This file is part of libgcj.
|
|
|
|
This software is copyrighted work licensed under the terms of the
|
|
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|
details. */
|
|
|
|
package gnu.gcj.xlib;
|
|
import gnu.gcj.RawData;
|
|
|
|
/**
|
|
*
|
|
* Collection of attributes that can be applied to or read from an
|
|
* X11 window.
|
|
*
|
|
* <p>TODO: Split this class into two classes. One for the structure
|
|
* XSetWindowAttributes and one for the XWindowAttributes. However
|
|
* they should still share this common base class.
|
|
*
|
|
* @author Rolf W. Rasmussen <rolfwr@ii.uib.no> */
|
|
public class WindowAttributes
|
|
{
|
|
// Must match definitions in X.h:
|
|
public final static long MASK_BUTTON_PRESS = 1L<< 2,
|
|
MASK_BUTTON_RELEASE = 1L<< 3,
|
|
MASK_EXPOSURE = 1L<<15,
|
|
MASK_STRUCTURE_NOTIFY = 1L<<17;
|
|
|
|
public WindowAttributes()
|
|
{
|
|
init(null);
|
|
}
|
|
|
|
public WindowAttributes(Window from)
|
|
{
|
|
initFromWindow(from);
|
|
}
|
|
|
|
private native void initFromWindow(Window from);
|
|
private native void init(WindowAttributes copyFrom);
|
|
protected native void finalize();
|
|
|
|
public Object clone()
|
|
{
|
|
WindowAttributes attributes = (WindowAttributes) super.clone();
|
|
// In case of an exception before the stucture is copied.
|
|
attributes.in = 0;
|
|
attributes.out = 0;
|
|
|
|
// FIXME: do anything else?
|
|
|
|
attributes.init(this);
|
|
return attributes;
|
|
}
|
|
|
|
public native void setBackground(long pixel);
|
|
public native void setBackground(Pixmap pixmap);
|
|
public native void setEventMask(long eventMask);
|
|
|
|
public void setVisual(Visual visual)
|
|
{
|
|
this.visual = visual;
|
|
}
|
|
|
|
/**
|
|
* Retrieve the visual.
|
|
*
|
|
* @return the visual that is or should be used by a window. null
|
|
* means CopyFormParent.
|
|
*/
|
|
public native Visual getVisual();
|
|
|
|
Display display;
|
|
|
|
/**
|
|
* Reference to XWindowAttribute structure containing attributes
|
|
* read from a window.
|
|
*/
|
|
RawData in = 0;
|
|
|
|
/**
|
|
* Reference to XSetWindowAttribute structure containing attributes
|
|
* to be applied to a window.
|
|
*/
|
|
RawData out = 0;
|
|
|
|
long mask;
|
|
|
|
/** null means CopyFromParent during window creation. */
|
|
Visual visual = null;
|
|
|
|
public native void apply(Window window);
|
|
|
|
final RawData getXSetWindowAttributesStructure()
|
|
{
|
|
if (out == null)
|
|
initOut();
|
|
return out;
|
|
}
|
|
|
|
void initOut()
|
|
{
|
|
throw new UnsupportedOperationException("not implemented yet");
|
|
}
|
|
}
|