2016-05-03 08:07:17 +02:00
|
|
|
// Copyright 2016 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common/math_util.h"
|
|
|
|
namespace Layout {
|
|
|
|
/// Describes the layout of the window framebuffer (size and top/bottom screen positions)
|
|
|
|
struct FramebufferLayout {
|
|
|
|
unsigned width;
|
|
|
|
unsigned height;
|
|
|
|
bool top_screen_enabled;
|
|
|
|
bool bottom_screen_enabled;
|
|
|
|
MathUtil::Rectangle<unsigned> top_screen;
|
|
|
|
MathUtil::Rectangle<unsigned> bottom_screen;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Factory method for constructing a default FramebufferLayout
|
|
|
|
* @param width Window framebuffer width in pixels
|
|
|
|
* @param height Window framebuffer height in pixels
|
2016-11-10 08:36:07 +01:00
|
|
|
* @param is_swapped if true, the bottom screen will be displayed above the top screen
|
2016-05-03 08:07:17 +02:00
|
|
|
* @return Newly created FramebufferLayout object with default screen regions initialized
|
|
|
|
*/
|
|
|
|
FramebufferLayout DefaultFrameLayout(unsigned width, unsigned height, bool is_swapped);
|
|
|
|
|
|
|
|
/**
|
2016-11-10 08:36:07 +01:00
|
|
|
* Factory method for constructing a FramebufferLayout with only the top or bottom screen
|
2016-05-03 08:07:17 +02:00
|
|
|
* @param width Window framebuffer width in pixels
|
|
|
|
* @param height Window framebuffer height in pixels
|
2016-11-10 08:36:07 +01:00
|
|
|
* @param is_swapped if true, the bottom screen will be displayed (and the top won't be displayed)
|
2016-05-03 08:07:17 +02:00
|
|
|
* @return Newly created FramebufferLayout object with default screen regions initialized
|
|
|
|
*/
|
|
|
|
FramebufferLayout SingleFrameLayout(unsigned width, unsigned height, bool is_swapped);
|
|
|
|
|
|
|
|
/**
|
2016-11-05 09:58:11 +01:00
|
|
|
* Factory method for constructing a Frame with the a 4x size Top screen with a 1x size bottom
|
|
|
|
* screen on the right
|
2016-05-03 08:07:17 +02:00
|
|
|
* This is useful in particular because it matches well with a 1920x1080 resolution monitor
|
|
|
|
* @param width Window framebuffer width in pixels
|
|
|
|
* @param height Window framebuffer height in pixels
|
2016-11-10 08:36:07 +01:00
|
|
|
* @param is_swapped if true, the bottom screen will be the large display
|
2016-05-03 08:07:17 +02:00
|
|
|
* @return Newly created FramebufferLayout object with default screen regions initialized
|
|
|
|
*/
|
|
|
|
FramebufferLayout LargeFrameLayout(unsigned width, unsigned height, bool is_swapped);
|
2016-11-10 08:36:07 +01:00
|
|
|
}
|