From 6bff43023b630d7e9f413e39821ebf89c40a399a Mon Sep 17 00:00:00 2001
From: Sven Gothel
*/
public interface NativeWindow extends NativeSurface {
-
- /**
+
+ /**
* destroys the window and releases
* windowing related resources.
*/
@@ -67,63 +67,63 @@ public interface NativeWindow extends NativeSurface {
/**
* Returns the window handle for this NativeWindow.
*
- * The window handle shall reflect the platform one
+ * The window handle shall reflect the platform one
* for all window related operations, e.g. open, close, resize.
*
* On X11 this returns an entity of type Window.
* Insets are available only after the native window has been created,
* ie. the native window has been made visible.
* Since the position reflects the client area, it does not include the insets.
- *
- * On Microsoft Windows this returns an entity of type HWND.
+ * On Microsoft Windows this returns an entity of type HWND.
*/
public long getWindowHandle();
- /**
+ /**
* Returns the insets defined as the width and height of the window decoration
* on the left, right, top and bottom.
* Insets are zero if the window is undecorated, including child windows.
- *
+ *
*
- *
+ *
* The top-level window area's top-left corner is located at
*
* getX() - getInsets().{@link InsetsImmutable#getLeftWidth() getLeftWidth()}
* getY() - getInsets().{@link InsetsImmutable#getTopHeight() getTopHeight()}
- *
- *
+ *
+ *
* The top-level window size is
*
- * getWidth() + getInsets().{@link InsetsImmutable#getTotalWidth() getTotalWidth()}
+ * getWidth() + getInsets().{@link InsetsImmutable#getTotalWidth() getTotalWidth()}
* getHeight() + getInsets().{@link InsetsImmutable#getTotalHeight() getTotalHeight()}
- *
- *
+ *
+ *
* @return insets
*/
public InsetsImmutable getInsets();
-
+
/** Returns the current x position of this window, relative to it's parent. */
-
- /**
+
+ /**
* @return the current x position of the top-left corner
- * of the client area relative to it's parent.
+ * of the client area relative to it's parent.
* Since the position reflects the client area, it does not include the insets.
* @see #getInsets()
*/
public int getX();
- /**
+ /**
* @return the current y position of the top-left corner
- * of the client area relative to it's parent.
+ * of the client area relative to it's parent.
* Since the position reflects the client area, it does not include the insets.
* @see #getInsets()
*/
public int getY();
- /**
- * Returns the current position of the top-left corner
+ /**
+ * Returns the current position of the top-left corner
* of the client area in screen coordinates.
*
this
instance. */
Window getDelegatedWindow();
-
+
//
// Child Window Management
- //
+ //
boolean addChild(NativeWindow win);
@@ -154,7 +155,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
/**
* Sets the size of the window's client area, excluding decorations.
- *
+ *
*
* Zero size semantics are respected, see {@link #setVisible(boolean)}:
*
@@ -171,72 +172,72 @@ public interface Window extends NativeWindow, WindowClosingProtocol { * * @param width of the window's client area * @param height of the window's client area - * + * * @see #getInsets() */ void setSize(int width, int height); /** * Sets the size of the top-level window including insets (window decorations). - * + * ** Note: Insets (if supported) are available only after the window is set visible and hence has been created. *
* * @param width of the top-level window area * @param height of the top-level window area - * + * * @see #setSize(int, int) * @see #getInsets() */ void setTopLevelSize(int width, int height); - + /** * Sets the location of the window's client area, excluding insets (window decorations).
- * + * * This call is ignored if in fullscreen mode.
* * @param x coord of the client-area's top left corner * @param y coord of the client-area's top left corner - * + * * @see #getInsets() */ void setPosition(int x, int y); - + /** * Sets the location of the top-level window inclusive insets (window decorations).
- * + * ** Note: Insets (if supported) are available only after the window is set visible and hence has been created. *
- * + * * This call is ignored if in fullscreen mode.
* * @param x coord of the top-level left corner * @param y coord of the top-level left corner - * + * * @see #setPosition(int, int) * @see #getInsets() */ void setTopLevelPosition(int x, int y); void setUndecorated(boolean value); - + boolean isUndecorated(); - + void setAlwaysOnTop(boolean value); - + boolean isAlwaysOnTop(); - + void setTitle(String title); String getTitle(); boolean isPointerVisible(); - + /** * Makes the pointer visible or invisible. - * + * * @param pointerVisible defaults totrue
for platforms w/ visible pointer, * otherwise defaults totrue
, eg. Android. * @see #confinePointer(boolean) @@ -244,32 +245,32 @@ public interface Window extends NativeWindow, WindowClosingProtocol { void setPointerVisible(boolean pointerVisible); boolean isPointerConfined(); - + /** * Confine the pointer to this window, ie. pointer jail. *- * Before jailing the mouse pointer, + * Before jailing the mouse pointer, * the window request the focus and the pointer is centered in the window. *
*- * In combination w/ {@link #warpPointer(int, int)} + * In combination w/ {@link #warpPointer(int, int)} * and maybe {@link #setPointerVisible(boolean)} a simple mouse * navigation can be realized.
- * + * * @param confine defaults tofalse
. */ void confinePointer(boolean confine); - + /** * Moves the pointer to x/y relative to this window's origin. - * + * * @param x relative pointer x position within this window * @param y relative pointer y position within this window - * + * * @see #confinePointer(boolean) */ void warpPointer(int x, int y); - + /** Reparenting operation types */ public enum ReparentOperation { /** No native reparenting valid */ @@ -285,7 +286,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol { ACTION_NATIVE_CREATION, /** Change Window tree only, native creation is pending */ - ACTION_NATIVE_CREATION_PENDING; + ACTION_NATIVE_CREATION_PENDING; } /** @@ -305,7 +306,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol { ReparentOperation reparentWindow(NativeWindow newParent, boolean forceDestroyCreate); boolean setFullscreen(boolean fullscreen); - + boolean isFullscreen(); static interface FocusRunnable { @@ -317,7 +318,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol { } /** - * Sets a {@link FocusRunnable}, + * Sets a {@link FocusRunnable}, * which {@link FocusRunnable#run()} method is executed before the native focus is requested. ** This allows notifying a covered window toolkit like AWT that the focus is requested, @@ -325,7 +326,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol { *
*/ void setFocusAction(FocusRunnable focusAction); - + /** * Sets a {@link KeyListener} allowing focus traversal with a covered window toolkit like AWT. *@@ -336,27 +337,27 @@ public interface Window extends NativeWindow, WindowClosingProtocol { */ void setKeyboardFocusHandler(KeyListener l); - /** + /** * Request focus for this native window *
* The request is handled on this Window EDT and blocked until finished. *
- * + * * @see #requestFocus(boolean) */ void requestFocus(); - /** + /** * Request focus for this native window *- * The request is handled on this Window EDT. + * The request is handled on this Window EDT. *
- * + * * @param wait true if waiting until the request is executed, otherwise false * @see #requestFocus() */ void requestFocus(boolean wait); - + void windowRepaint(int x, int y, int width, int height); void enqueueEvent(boolean wait, com.jogamp.newt.event.NEWTEvent event); @@ -410,7 +411,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol { */ void setKeyboardVisible(boolean visible); - /** + /** * Returntrue
if the virtual on-screen keyboard is visible, otherwisefalse
. ** Currently on
Android
, the only supported platform right now, @@ -420,7 +421,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol { * @see #setKeyboardVisible(boolean) */ boolean isKeyboardVisible(); - + /** * * Appends the given {@link com.jogamp.newt.event.KeyListener} to the end of -- cgit v1.2.3