public final class Screen extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Screen.EventHandler |
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 |
---|---|
boolean |
equals(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 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() |
static void |
notifySettingsChanged()
Called from native when the Screen definitions change.
|
void |
setAdapterOrdinal(int adapter) |
static void |
setEventHandler(Screen.EventHandler eh) |
String |
toString() |
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 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()
public int getAdapterOrdinal()
public void setAdapterOrdinal(int adapter)
public static void setEventHandler(Screen.EventHandler eh)
public static void notifySettingsChanged()
Copyright © 2020. All rights reserved.