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 XTranslateCoordinates {
0N/A private static Unsafe unsafe = XlibWrapper.unsafe;
0N/A private boolean __executed = false;
0N/A long _scr_w;
0N/A long _dest_w;
0N/A int _src_x;
0N/A int _src_y;
0N/A long dest_x_ptr = unsafe.allocateMemory(Native.getIntSize());
0N/A long dest_y_ptr = unsafe.allocateMemory(Native.getIntSize());
0N/A long child_ptr = unsafe.allocateMemory(Native.getLongSize());
0N/A public XTranslateCoordinates(
0N/A long scr_w,
0N/A long dest_w,
0N/A int src_x,
0N/A int src_y )
0N/A {
0N/A set_scr_w(scr_w);
0N/A set_dest_w(dest_w);
0N/A set_src_x(src_x);
0N/A set_src_y(src_y);
0N/A
0N/A sun.java2d.Disposer.addRecord(this, disposer = new UnsafeXDisposerRecord("XTranslateCoordinates",
0N/A dest_x_ptr, dest_y_ptr, child_ptr));
0N/A }
0N/A UnsafeXDisposerRecord disposer;
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 int status =
0N/A XlibWrapper.XTranslateCoordinates(XToolkit.getDisplay(),
0N/A get_scr_w(),
0N/A get_dest_w(),
0N/A get_src_x(),
0N/A get_src_y(),
0N/A dest_x_ptr,
0N/A dest_y_ptr,
0N/A child_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_scr_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 _scr_w;
0N/A }
0N/A public void set_scr_w(long data) {
0N/A _scr_w = data;
0N/A }
0N/A public long get_dest_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 _dest_w;
0N/A }
0N/A public void set_dest_w(long data) {
0N/A _dest_w = data;
0N/A }
0N/A public int get_src_x() {
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 _src_x;
0N/A }
0N/A public void set_src_x(int data) {
0N/A _src_x = data;
0N/A }
0N/A public int get_src_y() {
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 _src_y;
0N/A }
0N/A public void set_src_y(int data) {
0N/A _src_y = data;
0N/A }
0N/A public int get_dest_x() {
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(dest_x_ptr);
0N/A }
0N/A public void set_dest_x(int data) {
0N/A Native.putInt(dest_x_ptr, data);
0N/A }
0N/A public int get_dest_y() {
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(dest_y_ptr);
0N/A }
0N/A public void set_dest_y(int data) {
0N/A Native.putInt(dest_y_ptr, data);
0N/A }
0N/A public long get_child() {
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(child_ptr);
0N/A }
0N/A public void set_child(long data) {
0N/A Native.putLong(child_ptr, data);
0N/A }
0N/A}