4632N/A/*
6323N/A * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
4632N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4632N/A *
4632N/A * This code is free software; you can redistribute it and/or modify it
4632N/A * under the terms of the GNU General Public License version 2 only, as
4632N/A * published by the Free Software Foundation. Oracle designates this
4632N/A * particular file as subject to the "Classpath" exception as provided
4632N/A * by Oracle in the LICENSE file that accompanied this code.
4632N/A *
4632N/A * This code is distributed in the hope that it will be useful, but WITHOUT
4632N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4632N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4632N/A * version 2 for more details (a copy is included in the LICENSE file that
4632N/A * accompanied this code).
4632N/A *
4632N/A * You should have received a copy of the GNU General Public License version
4632N/A * 2 along with this work; if not, write to the Free Software Foundation,
4632N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4632N/A *
4632N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4632N/A * or visit www.oracle.com if you need additional information or have any
4632N/A * questions.
4632N/A */
4632N/A
4632N/Apackage sun.lwawt;
4632N/A
4632N/Aimport java.awt.*;
4632N/A
4858N/Aimport sun.awt.CausedFocusEvent;
4632N/Aimport sun.java2d.SurfaceData;
4632N/A
4632N/A// TODO Is it worth to generify this interface, like that:
4632N/A//
4632N/A// public interface PlatformWindow<WindowType extends Window>
4632N/A//
4632N/A// ?
4632N/A
4632N/Apublic interface PlatformWindow {
4632N/A
4632N/A /*
4632N/A * Delegate initialization (create native window and all the
4632N/A * related resources).
4632N/A */
4632N/A public void initialize(Window target, LWWindowPeer peer, PlatformWindow owner);
4632N/A
4632N/A /*
4632N/A * Delegate shutdown (dispose native window and all the
4632N/A * related resources).
4632N/A */
4632N/A public void dispose();
4632N/A
4632N/A /*
4632N/A * Shows or hides the window.
4632N/A */
4632N/A public void setVisible(boolean visible);
4632N/A
4632N/A /*
4632N/A * Sets the window title
4632N/A */
4632N/A public void setTitle(String title);
4632N/A
4632N/A /*
4632N/A * Sets the window bounds. Called when user changes window bounds
4632N/A * with setSize/setLocation/setBounds/reshape methods.
4632N/A */
4632N/A public void setBounds(int x, int y, int w, int h);
4632N/A
4632N/A /*
5041N/A * Returns the graphics device where the window is.
4632N/A */
5041N/A public GraphicsDevice getGraphicsDevice();
4632N/A
4632N/A /*
4632N/A * Returns the location of the window.
4632N/A */
4632N/A public Point getLocationOnScreen();
4632N/A
4632N/A /*
4632N/A * Returns the window insets.
4632N/A */
4632N/A public Insets getInsets();
4632N/A
4632N/A /*
4632N/A * Returns the metrics for a given font.
4632N/A */
4632N/A public FontMetrics getFontMetrics(Font f);
4632N/A
4632N/A /*
4632N/A * Get the SurfaceData for the window.
4632N/A */
4632N/A public SurfaceData getScreenSurface();
4632N/A
4632N/A /*
4632N/A * Revalidates the window's current SurfaceData and returns
4632N/A * the newly created one.
4632N/A */
4632N/A public SurfaceData replaceSurfaceData();
4632N/A
4632N/A /*
4632N/A * Creates a new image to serve as a back buffer.
4632N/A */
4632N/A public Image createBackBuffer();
4632N/A
4632N/A /*
4632N/A * Move the given part of the back buffer to the front buffer.
4632N/A */
4632N/A public void flip(int x1, int y1, int x2, int y2,
4632N/A BufferCapabilities.FlipContents flipAction);
4632N/A
4996N/A public void setModalBlocked(boolean blocked);
4996N/A
4632N/A public void toFront();
4632N/A
4632N/A public void toBack();
4632N/A
4632N/A public void setMenuBar(MenuBar mb);
4632N/A
4632N/A public void setAlwaysOnTop(boolean value);
4632N/A
4632N/A public void updateFocusableWindowState();
4632N/A
4858N/A public boolean rejectFocusRequest(CausedFocusEvent.Cause cause);
4858N/A
4717N/A public boolean requestWindowFocus();
4717N/A
4717N/A /*
4717N/A * Returns true only when called on a frame/dialog when it's natively focused.
4717N/A */
4717N/A public boolean isActive();
4632N/A
4632N/A public void setResizable(boolean resizable);
4632N/A
5276N/A /**
5276N/A * Applies the minimum and maximum size to the platform window.
5276N/A */
5276N/A public void setSizeConstraints(int minW, int minH, int maxW, int maxH);
4632N/A
4632N/A /**
4632N/A * Transforms the given Graphics object according to the native
4632N/A * implementation traits (insets, etc.).
4632N/A */
4632N/A public Graphics transformGraphics(Graphics g);
4632N/A
4632N/A /*
4632N/A * Installs the images for particular window.
4632N/A */
4632N/A public void updateIconImages();
4632N/A
4632N/A public void setOpacity(float opacity);
4632N/A
4639N/A public void setOpaque(boolean isOpaque);
4639N/A
4632N/A public void enterFullScreenMode();
4632N/A
4632N/A public void exitFullScreenMode();
4632N/A
6323N/A public boolean isFullScreenMode();
6323N/A
4632N/A public void setWindowState(int windowState);
4655N/A
4655N/A public long getLayerPtr();
4655N/A
4655N/A public LWWindowPeer getPeer();
6323N/A
6323N/A public boolean isUnderMouse();
4632N/A}