Top Description Inners Fields Methods
com.jogamp.nativewindow

public Interface VisualIDHolder

Known Direct Subinterfaces
com.jogamp.nativewindow.AbstractGraphicsConfiguration, com.jogamp.nativewindow.CapabilitiesImmutable
Imports
java.util.Comparator

Visual ID holder interface.

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static enum

Field Summary

Modifier and TypeField and Description
public static final int
VID_UNDEFINED

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

Method Summary

Modifier and TypeMethod and Description
public 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_UNDEFINEDback to summary
public 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.

Method Detail

getVisualIDback to summary
public 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:

  • X11 throws NativeWindowException on EGL_CONFIG, WIN32_PFD
    • INTRINSIC: X11 XVisual ID
    • NATIVE: X11 XVisual ID
    • X11_XVISUAL: X11 XVisual ID
    • X11_FBCONFIG: VID_UNDEFINED
  • X11/GL throws NativeWindowException on EGL_CONFIG, WIN32_PFD
    • INTRINSIC: X11 XVisual ID
    • NATIVE: X11 XVisual ID
    • X11_XVISUAL: X11 XVisual ID
    • X11_FBCONFIG: X11 FBConfig ID or VID_UNDEFINED
  • Windows/GL throws NativeWindowException on EGL_CONFIG, X11_XVISUAL, X11_FBCONFIG
    • INTRINSIC: Win32 PIXELFORMATDESCRIPTOR ID
    • NATIVE: Win32 PIXELFORMATDESCRIPTOR ID
    • WIN32_PFD: Win32 PIXELFORMATDESCRIPTOR ID
  • EGL/GL throws NativeWindowException on X11_XVISUAL, X11_FBCONFIG, WIN32_PFD
    • INTRINSIC: EGL Config ID
    • NATIVE: EGL NativeVisual ID (X11 XVisual ID, Win32 PIXELFORMATDESCRIPTOR ID, ...)
    • EGL_CONFIG: EGL Config ID

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.
Exceptions
NativeWindowException:
if type is neither INTRINSIC nor NATIVE and does not match the native implementation.
com.jogamp.nativewindow back to summary

public Class VisualIDHolder.VIDComparator

extends Object
implements Comparator<VisualIDHolder>
Class Inheritance
All Implemented Interfaces
java.util.Comparator

Comparing VIDType#NATIVE

Field Summary

Modifier and TypeField and Description
private final VisualIDHolder.VIDType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
compare(final VisualIDHolder
the first object to be compared.
vid1
,
final VisualIDHolder
the second object to be compared.
vid2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

typeback to summary
private final VisualIDHolder.VIDType type

Constructor Detail

VIDComparatorback to summary
public VIDComparator(final VisualIDHolder.VIDType type)

Method Detail

compareback to summary
public int compare(final VisualIDHolder vid1, final VisualIDHolder vid2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
vid1:VisualIDHolder

the first object to be compared.

vid2:VisualIDHolder

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@Override
com.jogamp.nativewindow back to summary

public final Enum VisualIDHolder.VIDType

extends Enum<VisualIDHolder.VIDType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final VisualIDHolder.VIDType
public final int
public static final VisualIDHolder.VIDType
public static final VisualIDHolder.VIDType
public static final VisualIDHolder.VIDType
public static final VisualIDHolder.VIDType
public static final VisualIDHolder.VIDType

Constructor Summary

AccessConstructor and Description
private
VIDType(final int id)

Method Summary

Modifier and TypeMethod and Description
public static VisualIDHolder.VIDType
public static VisualIDHolder.VIDType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

EGL_CONFIGback to summary
public static final VisualIDHolder.VIDType EGL_CONFIG
idback to summary
public final int id
INTRINSICback to summary
public static final VisualIDHolder.VIDType INTRINSIC
NATIVEback to summary
public static final VisualIDHolder.VIDType NATIVE
WIN32_PFDback to summary
public static final VisualIDHolder.VIDType WIN32_PFD
X11_FBCONFIGback to summary
public static final VisualIDHolder.VIDType X11_FBCONFIG
X11_XVISUALback to summary
public static final VisualIDHolder.VIDType X11_XVISUAL

Constructor Detail

VIDTypeback to summary
private VIDType(final int id)

Method Detail

valueOfback to summary
public static VisualIDHolder.VIDType valueOf(String name)
valuesback to summary
public static VisualIDHolder.VIDType[] values()