38 * in order to create an <code>XAtom</code>. <p> <p>
39 *
40 * Once an <code>XAtom</code> instance is created, you can call get and set property methods to
41 * set the values for a particular window. <p> <p>
42 *
43 *
44 * Example usage : To set the window name for a top level: <p>
45 * <code>
46 * XAtom xa = new XAtom(display,XAtom.XA_WM_NAME); <p>
47 * xa.setProperty(window,"Hello World");<p></code>
48 *<p>
49 *<p>
50 * To get the cut buffer :<p>
51 * <p><code>
52 * XAtom xa = new XAtom(display,XAtom.XA_CUT_BUFFER0);<p>
53 * String selection = xa.getProperty(root_window);<p></code>
54 * @author Bino George
55 * @since 1.5
56 */
57
58 import sun.misc.Unsafe;
59 import java.util.HashMap;
60
61 public final class XAtom {
62
63 // Order of lock: XAWTLock -> XAtom.class
64
65 /* Predefined Atoms - automatically extracted from XAtom.h */
66 private static Unsafe unsafe = XlibWrapper.unsafe;
67 private static XAtom[] emptyList = new XAtom[0];
68
69 public static final long XA_PRIMARY=1;
70 public static final long XA_SECONDARY=2;
71 public static final long XA_ARC=3;
72 public static final long XA_ATOM=4;
73 public static final long XA_BITMAP=5;
74 public static final long XA_CARDINAL=6;
75 public static final long XA_COLORMAP=7;
76 public static final long XA_CURSOR=8;
77 public static final long XA_CUT_BUFFER0=9;
78 public static final long XA_CUT_BUFFER1=10;
|
38 * in order to create an <code>XAtom</code>. <p> <p>
39 *
40 * Once an <code>XAtom</code> instance is created, you can call get and set property methods to
41 * set the values for a particular window. <p> <p>
42 *
43 *
44 * Example usage : To set the window name for a top level: <p>
45 * <code>
46 * XAtom xa = new XAtom(display,XAtom.XA_WM_NAME); <p>
47 * xa.setProperty(window,"Hello World");<p></code>
48 *<p>
49 *<p>
50 * To get the cut buffer :<p>
51 * <p><code>
52 * XAtom xa = new XAtom(display,XAtom.XA_CUT_BUFFER0);<p>
53 * String selection = xa.getProperty(root_window);<p></code>
54 * @author Bino George
55 * @since 1.5
56 */
57
58 import jdk.internal.misc.Unsafe;
59 import java.util.HashMap;
60
61 public final class XAtom {
62
63 // Order of lock: XAWTLock -> XAtom.class
64
65 /* Predefined Atoms - automatically extracted from XAtom.h */
66 private static Unsafe unsafe = XlibWrapper.unsafe;
67 private static XAtom[] emptyList = new XAtom[0];
68
69 public static final long XA_PRIMARY=1;
70 public static final long XA_SECONDARY=2;
71 public static final long XA_ARC=3;
72 public static final long XA_ATOM=4;
73 public static final long XA_BITMAP=5;
74 public static final long XA_CARDINAL=6;
75 public static final long XA_COLORMAP=7;
76 public static final long XA_CURSOR=8;
77 public static final long XA_CUT_BUFFER0=9;
78 public static final long XA_CUT_BUFFER1=10;
|