2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / gnu / gcj / xlib / WMSizeHints.java
blobc0b198c58a704ae453079a9c169a3b8c12978252
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
7 details. */
9 package gnu.gcj.xlib;
11 import gnu.gcj.RawData;
13 /**
14 * Size hints for an X11 window in its normal state. This class wraps
15 * the Xlib XSizeHints stucture.
17 * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
19 public class WMSizeHints implements Cloneable
21 public WMSizeHints()
23 init(null);
26 private native void init(WMSizeHints copyFrom);
27 protected native void finalize();
29 public Object clone() {
30 try
32 WMSizeHints hints = (WMSizeHints) super.clone();
33 // In case of an exception before the stucture is copied.
34 hints.structure = null;
36 hints.init(this);
37 return hints;
39 catch (CloneNotSupportedException ex)
41 // This should never happen.
42 throw new InternalError ();
46 public native void applyNormalHints(Window window);
48 public native void setMinSize(int width, int height);
49 public native void setMaxSize(int width, int height);
51 RawData structure;