2022-10-02 23:06:56 +02:00
|
|
|
package android.view;
|
|
|
|
|
|
2023-09-12 23:18:47 +02:00
|
|
|
import android.graphics.Point;
|
2022-10-02 23:06:56 +02:00
|
|
|
import android.util.DisplayMetrics;
|
|
|
|
|
|
|
|
|
|
public final class Display {
|
|
|
|
|
|
|
|
|
|
public static int window_width = 960;
|
|
|
|
|
public static int window_height = 540;
|
|
|
|
|
|
|
|
|
|
// FIXME: what do we return here?
|
|
|
|
|
// we don't want to hardcode this stuff, but at the same time the apps can cache it
|
|
|
|
|
public void getMetrics(DisplayMetrics outMetrics) {
|
|
|
|
|
outMetrics.widthPixels = this.window_width;
|
|
|
|
|
outMetrics.heightPixels = this.window_height;
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-14 09:46:37 +02:00
|
|
|
public void getRealMetrics(DisplayMetrics outMetrics) {
|
|
|
|
|
getMetrics(outMetrics); // probably?
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2022-12-27 17:21:21 +01:00
|
|
|
public int getWidth() {
|
|
|
|
|
return window_width;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getHeight() {
|
|
|
|
|
return window_height;
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-14 09:46:37 +02:00
|
|
|
public int getRawWidth() {
|
|
|
|
|
return window_width; // what's the difference?
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getRawHeight() {
|
|
|
|
|
return window_height; // what's the difference?
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-02 23:06:56 +02:00
|
|
|
public int getRotation() {
|
2023-06-22 11:45:46 +02:00
|
|
|
return 0 /*ROTATION_0*/;
|
2022-10-02 23:06:56 +02:00
|
|
|
}
|
2022-10-26 18:39:04 +02:00
|
|
|
|
|
|
|
|
public float getRefreshRate() {
|
|
|
|
|
return 60; // FIXME
|
|
|
|
|
}
|
2022-12-27 17:21:21 +01:00
|
|
|
|
|
|
|
|
public long getAppVsyncOffsetNanos() {
|
|
|
|
|
return 0; // what else would we return here?
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getDisplayId() {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public long getPresentationDeadlineNanos() {
|
|
|
|
|
return 0; // what else...
|
|
|
|
|
}
|
2023-09-12 23:18:47 +02:00
|
|
|
|
|
|
|
|
public void getSize(Point size) {
|
|
|
|
|
size.set(getWidth(), getHeight());
|
|
|
|
|
}
|
2024-02-17 15:15:05 +01:00
|
|
|
|
|
|
|
|
public void getRealSize(Point size) {
|
|
|
|
|
getSize(size);
|
|
|
|
|
}
|
2022-10-02 23:06:56 +02:00
|
|
|
}
|