|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.newt.Window
com.jogamp.newt.OffscreenWindow
public class OffscreenWindow
Field Summary |
---|
Fields inherited from class com.jogamp.newt.Window |
---|
caps, ClickTimeout, config, DEBUG_IMPLEMENTATION, DEBUG_KEY_EVENT, DEBUG_MOUSE_EVENT, DEBUG_WINDOW_EVENT, fullscreen, height, nfs_height, nfs_width, nfs_x, nfs_y, parentNativeWindow, parentWindowHandle, screen, title, undecorated, visible, width, windowHandle, windowLock, x, y |
Fields inherited from interface javax.media.nativewindow.NativeWindow |
---|
LOCK_SUCCESS, LOCK_SURFACE_CHANGED, LOCK_SURFACE_NOT_READY, LOCK_SURFACE_UNLOCKED |
Constructor Summary | |
---|---|
OffscreenWindow()
|
Method Summary | |
---|---|
protected void |
closeNative()
|
protected void |
createNativeImpl()
Create native windowHandle, ie creates a new native invisible window. |
void |
destroy(boolean deep)
|
long |
getSurfaceHandle()
Returns the handle to the surface for this NativeWindow. |
void |
invalidate()
render all native window information invalid, as if the native window was destroyed. |
boolean |
setFullscreen(boolean fullscreen)
|
protected boolean |
setFullscreenImpl(boolean fullscreen,
int x,
int y,
int w,
int h)
|
void |
setPosition(int x,
int y)
Sets the location of the top left corner of the window, including decorations (so the client area will be placed at x+insets.left,y+insets.top .This call is ignored if in fullscreen mode. |
protected void |
setPositionImpl(int x,
int y)
|
void |
setSize(int width,
int height)
Sets the size of the client area of the window, excluding decorations Total size of the window will be width+insets.left+insets.right, height+insets.top+insets.bottom |
protected void |
setSizeImpl(int width,
int height)
|
void |
setSurfaceHandle(long handle)
|
protected void |
setVisibleImpl(boolean visible)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OffscreenWindow()
Method Detail |
---|
protected void createNativeImpl()
Window
createNativeImpl
in class Window
protected void closeNative()
closeNative
in class Window
public void invalidate()
Window
render all native window information invalid,
as if the native window was destroyed.
all other resources and states are kept intact,
ie listeners, parent handles and size, position etc.
invalidate
in interface NativeWindow
invalidate
in class Window
Window.destroy()
,
Window.destroy(boolean)
,
Window.invalidate(boolean)
public void destroy(boolean deep)
destroy
in class Window
deep
- If true, all resources, ie listeners, parent handles, size, position
and the referenced NEWT screen and display, will be destroyed as well. Be aware that if you call
this method with deep = true, you will not be able to regenerate the Window.Window.destroy()
,
Window.invalidate(boolean)
public void setSurfaceHandle(long handle)
setSurfaceHandle
in interface SurfaceChangeable
public long getSurfaceHandle()
NativeWindow
The surface handle should be set/update by NativeWindow.lockSurface()
,
where NativeWindow.unlockSurface()
is not allowed to modify it.
After NativeWindow.unlockSurface()
it is no more guaranteed
that the surface handle is still valid.
The surface handle shall reflect the platform one
for all drawable surface operations, e.g. opengl, swap-buffer.
On X11 this returns an entity of type Window,
since there is no differentiation of surface and window there.
On Microsoft Windows this returns an entity of type HDC.
getSurfaceHandle
in interface NativeWindow
getSurfaceHandle
in class Window
protected void setVisibleImpl(boolean visible)
setVisibleImpl
in class Window
public void setSize(int width, int height)
Window
width+insets.left+insets.right, height+insets.top+insets.bottom
Zero size semantics are respected, see Window.setVisible(boolean)
:
if ( 0 != windowHandle && 0>=width*height && visible ) { setVisible(false); } else if ( 0 == windowHandle && 0This call is ignored if in fullscreen mode.
- Specified by:
setSize
in interfaceSurfaceChangeable
- Overrides:
setSize
in classWindow
- Parameters:
width
- of the client area of the windowheight
- of the client area of the window
protected void setSizeImpl(int width, int height)
setSizeImpl
in class Window
public void setPosition(int x, int y)
Window
x+insets.left,y+insets.top
.
setPosition
in class Window
x
- coord of the top left cornery
- coord of the top left cornerprotected void setPositionImpl(int x, int y)
setPositionImpl
in class Window
public boolean setFullscreen(boolean fullscreen)
setFullscreen
in class Window
protected boolean setFullscreenImpl(boolean fullscreen, int x, int y, int w, int h)
setFullscreenImpl
in class Window
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |