public final class Screen
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Screen.EventHandler |
Modifier and Type | Field and Description |
---|---|
private int |
adapter |
private int |
depth |
private static int |
dpiOverride |
private static Screen.EventHandler |
eventHandler |
private int |
height |
private long |
ptr |
private float |
renderScale |
private int |
resolutionX |
private int |
resolutionY |
private static java.util.List<Screen> |
screens |
private float |
uiScale |
private int |
visibleHeight |
private int |
visibleWidth |
private int |
visibleX |
private int |
visibleY |
private int |
width |
private int |
x |
private int |
y |
Modifier | Constructor and Description |
---|---|
protected |
Screen(long nativePtr,
int depth,
int x,
int y,
int width,
int height,
int visibleX,
int visibleY,
int visibleWidth,
int visibleHeight,
int resolutionX,
int resolutionY,
float renderScale) |
protected |
Screen(long nativePtr,
int depth,
int x,
int y,
int width,
int height,
int visibleX,
int visibleY,
int visibleWidth,
int visibleHeight,
int resolutionX,
int resolutionY,
float uiScale,
float renderScale) |
Modifier and Type | Method and Description |
---|---|
private void |
dispose() |
boolean |
equals(java.lang.Object o) |
int |
getAdapterOrdinal() |
int |
getDepth()
Could be called from any thread
|
int |
getHeight()
Could be called from any thread
|
static Screen |
getMainScreen()
Could be called from any thread
|
long |
getNativeScreen()
Could be called from any thread
|
float |
getRenderScale()
Returns the recommended scaling for rendering an image for this
screen, potentially larger than
getUIScale() . |
int |
getResolutionX()
Could be called from any thread
|
int |
getResolutionY()
Could be called from any thread
|
static java.util.List<Screen> |
getScreens()
Could be called from any thread
|
float |
getUIScale()
Returns the scaling of the UI (window sizes and event coordinates)
on the screen.
|
static double |
getVideoRefreshPeriod() |
int |
getVisibleHeight()
Could be called from any thread
|
int |
getVisibleWidth()
Could be called from any thread
|
int |
getVisibleX()
Could be called from any thread
|
int |
getVisibleY()
Could be called from any thread
|
int |
getWidth()
Could be called from any thread
|
int |
getX()
Could be called from any thread
|
int |
getY()
Could be called from any thread
|
int |
hashCode() |
(package private) static void |
initScreens() |
static void |
notifySettingsChanged()
Called from native when the Screen definitions change.
|
void |
setAdapterOrdinal(int adapter) |
static void |
setEventHandler(Screen.EventHandler eh) |
java.lang.String |
toString() |
private static volatile java.util.List<Screen> screens
private static final int dpiOverride
private static Screen.EventHandler eventHandler
private volatile long ptr
private volatile int adapter
private final int depth
private final int x
private final int y
private final int width
private final int height
private final int visibleX
private final int visibleY
private final int visibleWidth
private final int visibleHeight
private final int resolutionX
private final int resolutionY
private final float uiScale
private final float renderScale
protected Screen(long nativePtr, int depth, int x, int y, int width, int height, int visibleX, int visibleY, int visibleWidth, int visibleHeight, int resolutionX, int resolutionY, float renderScale)
protected Screen(long nativePtr, int depth, int x, int y, int width, int height, int visibleX, int visibleY, int visibleWidth, int visibleHeight, int resolutionX, int resolutionY, float uiScale, float renderScale)
public static double getVideoRefreshPeriod()
public static Screen getMainScreen()
public static java.util.List<Screen> getScreens()
public int getDepth()
public int getX()
public int getY()
public int getWidth()
public int getHeight()
public int getVisibleX()
public int getVisibleY()
public int getVisibleWidth()
public int getVisibleHeight()
public int getResolutionX()
public int getResolutionY()
public float getUIScale()
public float getRenderScale()
getUIScale()
.
Could be called from any threadpublic long getNativeScreen()
private void dispose()
public int getAdapterOrdinal()
public void setAdapterOrdinal(int adapter)
public static void setEventHandler(Screen.EventHandler eh)
public static void notifySettingsChanged()
static void initScreens()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object