Top Fields Constructors Methods
com.jogamp.nativewindow

public Class DelegatedUpstreamSurfaceHookWithSurfaceSize

extends Object
implements UpstreamSurfaceHook
Class Inheritance
All Implemented Interfaces
com.jogamp.nativewindow.UpstreamSurfaceHook
Imports
com.jogamp.nativewindow.NativeSurface, .ProxySurface, .UpstreamSurfaceHook

Field Summary

Modifier and TypeField and Description
pack-priv final NativeSurface
pack-priv final UpstreamSurfaceHook

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final void
create(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.create.

called within ProxySurface#createNotify() within lock, before using surface.
public final void
destroy(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.destroy.

called within ProxySurface#destroyNotify() within lock, before clearing fields.
public final int
getSurfaceHeight(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceHeight.

Returns the height of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.
public final int
getSurfaceWidth(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceWidth.

Returns the width of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.
public final NativeSurface
getUpstreamSurface()

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getUpstreamSurface.

Returns the optional upstream NativeSurface if used by implementation, otherwise null.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

surfaceback to summary
pack-priv final NativeSurface surface
upstreamback to summary
pack-priv final UpstreamSurfaceHook upstream

Constructor Detail

DelegatedUpstreamSurfaceHookWithSurfaceSizeback to summary
public DelegatedUpstreamSurfaceHookWithSurfaceSize(final UpstreamSurfaceHook upstream, final NativeSurface surface)
Parameters
upstream:UpstreamSurfaceHook

optional upstream UpstreamSurfaceHook used for create(ProxySurface) and destroy(ProxySurface).

surface:NativeSurface

mandatory NativeSurface used for getSurfaceWidth(ProxySurface) and getSurfaceHeight(ProxySurface), not used for getUpstreamSurface().

Method Detail

createback to summary
public final void create(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.create.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.create.

called within ProxySurface#createNotify() within lock, before using surface.

Annotations
@Override
destroyback to summary
public final void destroy(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.destroy.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.destroy.

called within ProxySurface#destroyNotify() within lock, before clearing fields.

Annotations
@Override
getSurfaceHeightback to summary
public final int getSurfaceHeight(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceHeight.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceHeight.

Returns the height of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.

Annotations
@Override
getSurfaceWidthback to summary
public final int getSurfaceWidth(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceWidth.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceWidth.

Returns the width of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.

Annotations
@Override
getUpstreamSurfaceback to summary
public final NativeSurface getUpstreamSurface()

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getUpstreamSurface.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.getUpstreamSurface.

Returns the optional upstream NativeSurface if used by implementation, otherwise null.

One example is the JOGL EGLWrappedSurface, which might be backed up by a native platform NativeSurface (X11, WGL, CGL, ..).

Returns null.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override