28package com.jogamp.opengl.test.junit.newt.parenting;
30import com.jogamp.graph.font.FontScale;
31import com.jogamp.nativewindow.CapabilitiesImmutable;
32import com.jogamp.nativewindow.NativeWindow;
33import com.jogamp.nativewindow.NativeWindowHolder;
34import com.jogamp.newt.Window;
35import com.jogamp.newt.event.KeyEvent;
36import com.jogamp.newt.opengl.GLWindow;
37import com.jogamp.newt.opengl.util.NEWTDemoListener;
38import com.jogamp.opengl.GLAnimatorControl;
52 this.winHolder = winHolder;
72 glWindow.invokeOnNewThread(
null,
false,
new Runnable() {
82 printlnState(
"[reparent pre - glWin to TOP.1] frame ", p0+
", glWindow "+p1);
Simple static font scale methods for unit conversions.
static float[] ppmmToPPI(final float[] ppmm)
Converts [1/mm] to [1/inch] in place.
final short getKeySymbol()
Returns the virtual key symbol reflecting the current keyboard layout.
static final short VK_R
See VK_A.
static final short VK_L
See VK_A.
final boolean isConsumed()
Returns true if this events has been consumed, otherwise false.
final void setConsumed(final boolean consumed)
If consumed is true, this event is marked as consumed, ie.
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
Point getLocationOnScreen(final Point storage)
Returns the window's top-left client-area position in the screen.
final NativeWindow getParent()
final ReparentOperation reparentWindow(final NativeWindow newParent, final int x, final int y, final int hints)
Change this window's parent window.
final void requestFocus()
Request focus for this native window.
NEWT GLWindow Demo functionality.
void printlnState(final String prelude)
Extending demo functionality of NEWTDemoListener.
void keyPressed(final KeyEvent e)
A key has been pressed, excluding auto-repeat modifier keys.
NewtReparentingKeyAdapter(final NativeWindowHolder winHolder, final GLWindow glWindow)
void setTitle(final NativeWindow nw, final Window win)
Specifies an immutable set of capabilities that a window's rendering context must support,...
boolean isBackgroundOpaque()
Returns whether an opaque or translucent surface is requested, supported or chosen.
int getSurfaceWidth()
Returns the width of the client area excluding insets (window decorations) in pixel units.
int getSurfaceHeight()
Returns the height of the client area excluding insets (window decorations) in pixel units.
Accessor interface for implementing classes with ownership of a NativeWindow via an is-a or has-a rel...
NativeWindow getNativeWindow()
Returns the associated NativeWindow of this NativeWindowHolder, which is identical to getNativeSurfac...
Extend the NativeSurface interface with windowing information such as window-handle,...
int getHeight()
Returns the height of the client area excluding insets (window decorations) in window units.
Point getLocationOnScreen(Point point)
Returns the window's top-left client-area position in the screen.
int getY()
Returns the current y position of the top-left corner of the client area relative to it's parent in w...
Rectangle getBounds()
Returns a newly created Rectangle containing window origin, getX() & getY(), and size,...
int getX()
Returns the current x position of this window, relative to it's parent.
int getWidth()
Returns the width of the client area excluding insets (window decorations) in window units.
Specifying NEWT's Window functionality:
void setTitle(String title)
CapabilitiesImmutable getChosenCapabilities()
Gets an immutable set of chosen capabilities.
float[] getPixelsPerMM(final float[] ppmmStore)
Returns the pixels per millimeter of this window's NativeSurface according to the main monitor's curr...
CapabilitiesImmutable getRequestedCapabilities()
Gets an immutable set of requested capabilities.
Thread setExclusiveContextThread(Thread t)
Dedicates this instance's GLContext to the given thread.