#include "TuiScreenProperty.h"
#include "TuiLayout.h"

#if defined(W1536)
#include "TuiLayout_w1536.h"
#elif defined(DPI640)
#include "TuiLayout_w1440.h"
#elif defined(DPI480)
#include "TuiLayout_w1080.h"
#elif defined(DPI320)
#include "TuiLayout_w720.h"
#endif

static uint32_t gScreenWidth;
static float gScreenDp;
static uint32_t gScreenHeight;
static uint32_t gScreenPunchCutHeight;

void initScreenProperty() {
	initLayout();
	gScreenWidth = SCREEN_WIDTH;
	gScreenDp = SCREEN_PIX_PER_DP;
	gScreenHeight = SCREEN_HEIGHT; // #define SCREEN_HEIGHT			(width - SCREEN_PUNCHCUT_HEIGHT)
	gScreenPunchCutHeight = SCREEN_PUNCHCUT_HEIGHT;
}

uint32_t getScreenWidth() {
	if (getRotationType() != NONE_ROTATION_TYPE)
		return gScreenHeight;
	return gScreenWidth;
}

uint32_t getScreenHeight() {
	if (getRotationType() != NONE_ROTATION_TYPE)
		return gScreenWidth;
	return gScreenHeight;
}

float getScreenDp() {
	return gScreenDp;
}

uint32_t getScreenPunchCutHeight() {
	return gScreenPunchCutHeight;
}