0N/A/*
6447N/A * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A// This file is an automatically generated file, please do not edit this file, modify the WrapperGenerator.java file instead !
0N/A
0N/Apackage sun.awt.X11;
0N/A
0N/Aimport sun.misc.Unsafe;
0N/A
0N/Apublic class XQueryTree {
0N/A private static Unsafe unsafe = XlibWrapper.unsafe;
0N/A private boolean __executed = false;
0N/A long _w;
0N/A long root_ptr = unsafe.allocateMemory(Native.getLongSize());
0N/A long parent_ptr = unsafe.allocateMemory(Native.getLongSize());
0N/A long children_ptr = unsafe.allocateMemory(Native.getLongSize());
0N/A long nchildren_ptr = unsafe.allocateMemory(Native.getIntSize());
0N/A UnsafeXDisposerRecord disposer;
0N/A public XQueryTree(
0N/A long w )
0N/A {
0N/A set_w(w);
0N/A sun.java2d.Disposer.addRecord(this, disposer = new UnsafeXDisposerRecord("XQueryTree",
0N/A new long[]{root_ptr, parent_ptr, nchildren_ptr},
0N/A new long[] {children_ptr}));
0N/A set_children(0);
0N/A }
0N/A public int execute() {
0N/A return execute(null);
0N/A }
1216N/A public int execute(XErrorHandler errorHandler) {
0N/A XToolkit.awtLock();
0N/A try {
0N/A if (isDisposed()) {
0N/A throw new IllegalStateException("Disposed");
0N/A }
0N/A if (__executed) {
0N/A throw new IllegalStateException("Already executed");
0N/A }
0N/A __executed = true;
0N/A if (errorHandler != null) {
6447N/A XErrorHandlerUtil.WITH_XERROR_HANDLER(errorHandler);
0N/A }
0N/A Native.putLong(children_ptr, 0);
0N/A int status =
0N/A XlibWrapper.XQueryTree(XToolkit.getDisplay(),
0N/A get_w(),
0N/A root_ptr,
0N/A parent_ptr,
0N/A children_ptr,
0N/A nchildren_ptr );
0N/A if (errorHandler != null) {
6447N/A XErrorHandlerUtil.RESTORE_XERROR_HANDLER();
0N/A }
0N/A return status;
0N/A } finally {
0N/A XToolkit.awtUnlock();
0N/A }
0N/A }
0N/A public boolean isExecuted() {
0N/A return __executed;
0N/A }
0N/A
0N/A public boolean isDisposed() {
0N/A return disposer.disposed;
0N/A }
0N/A public void dispose() {
0N/A XToolkit.awtLock();
0N/A try {
0N/A if (isDisposed()) {
0N/A return;
0N/A }
0N/A disposer.dispose();
0N/A } finally {
0N/A XToolkit.awtUnlock();
0N/A }
0N/A }
0N/A public long get_w() {
0N/A if (isDisposed()) {
0N/A throw new IllegalStateException("Disposed");
0N/A }
0N/A if (!__executed) {
0N/A throw new IllegalStateException("Not executed");
0N/A }
0N/A return _w;
0N/A }
0N/A public void set_w(long data) {
0N/A _w = data;
0N/A }
0N/A public long get_root() {
0N/A if (isDisposed()) {
0N/A throw new IllegalStateException("Disposed");
0N/A }
0N/A if (!__executed) {
0N/A throw new IllegalStateException("Not executed");
0N/A }
0N/A return Native.getLong(root_ptr);
0N/A }
0N/A public void set_root(long data) {
0N/A Native.putLong(root_ptr, data);
0N/A }
0N/A public long get_parent() {
0N/A if (isDisposed()) {
0N/A throw new IllegalStateException("Disposed");
0N/A }
0N/A if (!__executed) {
0N/A throw new IllegalStateException("Not executed");
0N/A }
0N/A return Native.getLong(parent_ptr);
0N/A }
0N/A public void set_parent(long data) {
0N/A Native.putLong(parent_ptr, data);
0N/A }
0N/A public long get_children() {
0N/A if (isDisposed()) {
0N/A throw new IllegalStateException("Disposed");
0N/A }
0N/A if (!__executed) {
0N/A throw new IllegalStateException("Not executed");
0N/A }
0N/A return Native.getLong(children_ptr);
0N/A }
0N/A public void set_children(long data) {
0N/A Native.putLong(children_ptr, data);
0N/A }
0N/A public int get_nchildren() {
0N/A if (isDisposed()) {
0N/A throw new IllegalStateException("Disposed");
0N/A }
0N/A if (!__executed) {
0N/A throw new IllegalStateException("Not executed");
0N/A }
0N/A return Native.getInt(nchildren_ptr);
0N/A }
0N/A public void set_nchildren(int data) {
0N/A Native.putInt(nchildren_ptr, data);
0N/A }
0N/A}