Lines Matching defs:XAtom

29  * XAtom is a class that allows you to create and modify X Window properties.
36 * by the XServer and an <code>XAtom</code> object is returned. An <code>XAtom</code> can also be created
38 * in order to create an <code>XAtom</code>. <p> <p>
40 * Once an <code>XAtom</code> instance is created, you can call get and set property methods to
46 * XAtom xa = new XAtom(display,XAtom.XA_WM_NAME); <p>
52 * XAtom xa = new XAtom(display,XAtom.XA_CUT_BUFFER0);<p>
61 public final class XAtom {
63 // Order of lock: XAWTLock -> XAtom.class
65 /* Predefined Atoms - automatically extracted from XAtom.h */
67 private static XAtom[] emptyList = new XAtom[0];
138 static HashMap<Long, XAtom> atomToAtom = new HashMap<Long, XAtom>();
139 static HashMap<String, XAtom> nameToAtom = new HashMap<String, XAtom>();
140 static void register(XAtom at) {
144 synchronized (XAtom.class) {
153 static XAtom lookup(long atom) {
154 synchronized (XAtom.class) {
158 static XAtom lookup(String name) {
159 synchronized (XAtom.class) {
165 * 1.Make XAtom immutable.
168 static XAtom get(long atom) {
169 XAtom xatom = lookup(atom);
171 xatom = new XAtom(XToolkit.getDisplay(), atom);
175 public static XAtom get(String name) {
176 XAtom xatom = lookup(name);
178 xatom = new XAtom(XToolkit.getDisplay(), name);
195 XAtom at = lookup(atom);
223 /** This constructor will create and intern a new XAtom that is specified
227 * @param name name of the XAtom to create.
231 private XAtom(long display, String name) {
235 public XAtom(String name, boolean autoIntern) {
239 /** This constructor will create an instance of XAtom that is specified
240 * by the predefined XAtom specified by u <code> latom </code>
243 * @param atom a predefined XAtom.
246 public XAtom(long display, long atom) {
253 * and if <code>autoIntern</code> is true intern a new XAtom that is specified
257 * @param name name of the XAtom to create.
261 private XAtom(long display, String name, boolean autoIntern) {
278 public XAtom() {
303 XAtom XA_UTF8_STRING = XAtom.get("UTF8_STRING"); /* like STRING but encoding is UTF-8 */
619 * Interns the XAtom
662 * Returns the value of property ATOM[]/32 as array of XAtom objects
666 XAtom[] getAtomListProperty(long window) {
689 XAtom[] res = new XAtom[count];
691 res[index] = XAtom.get(XAtom.getAtom(list_atoms+index*getAtomSize()));
710 XAtom[] getAtomListProperty(XBaseWindow window) {
717 void setAtomListProperty(long window, XAtom[] atoms) {
719 setAtomData(window, XAtom.XA_ATOM, data, atoms.length);
728 setAtomData(window, XAtom.XA_ATOM, data, atoms.size());
734 public void setAtomListProperty(XBaseWindow window, XAtom[] atoms) {
760 static long toData(XAtom[] atoms) {
777 if (!(o instanceof XAtom)) {
780 XAtom ot = (XAtom)o;