JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
CapabilitiesChooser.java
Go to the documentation of this file.
1/*
2 * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * - Redistribution of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistribution in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * Neither the name of Sun Microsystems, Inc. or the names of
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * This software is provided "AS IS," without a warranty of any kind. ALL
20 * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
21 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
22 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
23 * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
24 * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
25 * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
26 * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
27 * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
28 * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
29 * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
30 * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
31 *
32 * You acknowledge that this software is not designed or intended for use
33 * in the design, construction, operation or maintenance of any nuclear
34 * facility.
35 *
36 * Sun gratefully acknowledges that this software was originally authored
37 * and developed by Kenneth Bradley Russell and Christopher John Kline.
38 */
39
40package com.jogamp.nativewindow;
41
42import java.util.List;
43
44/** Provides a mechanism by which applications can customize the
45 window type selection for a given {@link Capabilities}.
46 Developers can implement this interface and pass an instance into
47 the method {@link GraphicsConfigurationFactory#chooseGraphicsConfiguration}; the chooser
48 will be called at window creation time. */
49
50public interface CapabilitiesChooser {
51 /** Chooses the index (0..available.length - 1) of the {@link
52 Capabilities} most closely matching the desired one from the
53 list of all supported. Some of the entries in the
54 <code>available</code> array may be null; the chooser must
55 ignore these. The <em>windowSystemRecommendedChoice</em>
56 parameter may be provided to the chooser by the underlying
57 window system; if this index is valid, it is recommended, but
58 not necessarily required, that the chooser select that entry.
59
60 <P> <em>Note:</em> this method is called automatically by the
61 {@link GraphicsConfigurationFactory#chooseGraphicsConfiguration} method
62 when an instance of this class is passed in to it.
63 It should generally not be
64 invoked by users directly, unless it is desired to delegate the
65 choice to some other CapabilitiesChooser object.
66 */
68 List<? extends CapabilitiesImmutable> available,
69 int windowSystemRecommendedChoice);
70}
Provides a mechanism by which applications can customize the window type selection for a given Capabi...
int chooseCapabilities(CapabilitiesImmutable desired, List<? extends CapabilitiesImmutable > available, int windowSystemRecommendedChoice)
Chooses the index (0..available.length - 1) of the Capabilities most closely matching the desired one...
Specifies an immutable set of capabilities that a window's rendering context must support,...