javax.media.nativewindow
Interface VisualIDHolder

All Known Subinterfaces:
AbstractGraphicsConfiguration, CapabilitiesImmutable, GLCapabilitiesImmutable
All Known Implementing Classes:
AWTGraphicsConfiguration, Capabilities, DefaultGraphicsConfiguration, GLCapabilities, MutableGraphicsConfiguration, X11GraphicsConfiguration

public interface VisualIDHolder

Visual ID holder interface.

Allows queries of different types of native visual IDs, see #getVisualID(int).


Nested Class Summary
static class VisualIDHolder.VIDComparator
          Comparing VisualIDHolder.VIDType.NATIVE
static class VisualIDHolder.VIDType
           
 
Field Summary
static int VID_UNDEFINED
          getVisualID(VIDType) result indicating an undefined value, which could be cause by an unsupported query.
 
Method Summary
 int getVisualID(VisualIDHolder.VIDType type)
          Returns the native visual ID of the given type if supported, or VID_UNDEFINED if not supported.
 

Field Detail

VID_UNDEFINED

static final int VID_UNDEFINED
getVisualID(VIDType) result indicating an undefined value, which could be cause by an unsupported query.

We assume the const value 0 doesn't reflect a valid native visual ID and is interpreted as no value on all platforms. This is currently true for Android, X11 and Windows.

See Also:
Constant Field Values
Method Detail

getVisualID

int getVisualID(VisualIDHolder.VIDType type)
                throws NativeWindowException
Returns the native visual ID of the given type if supported, or VID_UNDEFINED if not supported.

Depending on the native windowing system, type is handled as follows:

Note: INTRINSIC and NATIVE are always handled, but may result in VID_UNDEFINED. The latter is true if the native value are actually undefined or the corresponding object is not mapped to a native visual object.

Throws:
NativeWindowException - if type is neither INTRINSIC nor NATIVE and does not match the native implementation.


Copyright 2010 JogAmp Community.