Package com.jogamp.nativewindow
Interface VisualIDHolder
-
- All Known Subinterfaces:
AbstractGraphicsConfiguration,CapabilitiesImmutable
- All Known Implementing Classes:
AWTGraphicsConfiguration,Capabilities,DefaultGraphicsConfiguration,MutableGraphicsConfiguration,X11GraphicsConfiguration
public interface VisualIDHolderVisual ID holder interface.Allows queries of different types of native visual IDs, see
#getVisualID(int).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classVisualIDHolder.VIDComparatorComparingVisualIDHolder.VIDType.NATIVEstatic classVisualIDHolder.VIDType
-
Field Summary
Fields Modifier and Type Field Description static intVID_UNDEFINEDgetVisualID(VIDType)result indicating an undefined value, which could be cause by an unsupported query.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetVisualID(VisualIDHolder.VIDType type)Returns the native visual ID of the giventypeif supported, orVID_UNDEFINEDif not supported.booleanisVisualIDSupported(VisualIDHolder.VIDType type)Returns true if the givenVisualIDHolder.VIDTypeis supported, otherwise false.
-
-
-
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
0doesn'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 giventypeif supported, orVID_UNDEFINEDif not supported.Depending on the native windowing system,
typeis handled as follows:- X11 throws NativeWindowException on
EGL_CONFIG,WIN32_PFDINTRINSIC: X11 XVisual IDNATIVE: X11 XVisual IDX11_XVISUAL: X11 XVisual IDX11_FBCONFIG:VID_UNDEFINED
- X11/GL throws NativeWindowException on
EGL_CONFIG,WIN32_PFDINTRINSIC: X11 XVisual IDNATIVE: X11 XVisual IDX11_XVISUAL: X11 XVisual IDX11_FBCONFIG: X11 FBConfig ID orVID_UNDEFINED
- Windows/GL throws NativeWindowException on
EGL_CONFIG,X11_XVISUAL,X11_FBCONFIGINTRINSIC: Win32 PIXELFORMATDESCRIPTOR IDNATIVE: Win32 PIXELFORMATDESCRIPTOR IDWIN32_PFD: Win32 PIXELFORMATDESCRIPTOR ID
- EGL/GL throws NativeWindowException on
X11_XVISUAL,X11_FBCONFIG,WIN32_PFDINTRINSIC: EGL Config IDNATIVE: EGL NativeVisual ID (X11 XVisual ID, Win32 PIXELFORMATDESCRIPTOR ID, ...)EGL_CONFIG: EGL Config ID
One may use
Note:isVisualIDSupported(VIDType)to test upfront whether aVisualIDHolder.VIDTypeis supported, e.g. to avoid an exception or query or compare all available.INTRINSICandNATIVEare always handled, but may result inVID_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- iftypeis neitherINTRINSICnorNATIVEand does not match the native implementation.- See Also:
isVisualIDSupported(VIDType)
- X11 throws NativeWindowException on
-
isVisualIDSupported
boolean isVisualIDSupported(VisualIDHolder.VIDType type)
Returns true if the givenVisualIDHolder.VIDTypeis supported, otherwise false.Note:
INTRINSICandNATIVEare always handled, but may result inVID_UNDEFINED. The latter is true if the native value are actually undefined or the corresponding object is not mapped to a native visual object.- See Also:
getVisualID(VIDType)
-
-