Add window.displayMode for fullscreen display mode switching

This commit is contained in:
Joshua Granick
2017-02-28 11:32:55 -08:00
parent 314e020428
commit 81c4926802
14 changed files with 350 additions and 24 deletions

View File

@@ -0,0 +1,33 @@
#ifndef LIME_SYSTEM_DISPLAY_MODE_H
#define LIME_SYSTEM_DISPLAY_MODE_H
#include <hx/CFFI.h>
#include <graphics/PixelFormat.h>
namespace lime {
class DisplayMode {
public:
DisplayMode ();
DisplayMode (value DisplayMode);
DisplayMode (int width, int height, PixelFormat pixelFormat, int refreshRate);
value Value ();
int height;
PixelFormat pixelFormat;
int refreshRate;
int width;
};
}
#endif

View File

@@ -8,6 +8,7 @@
#include <app/Application.h>
#include <graphics/ImageBuffer.h>
#include <system/DisplayMode.h>
#include <stdint.h>
@@ -25,6 +26,7 @@ namespace lime {
virtual void Close () = 0;
virtual void Focus () = 0;
virtual int GetDisplay () = 0;
virtual void GetDisplayMode (DisplayMode* displayMode) = 0;
virtual bool GetEnableTextEvents () = 0;
virtual int GetHeight () = 0;
virtual uint32_t GetID () = 0;
@@ -34,6 +36,7 @@ namespace lime {
virtual void Move (int x, int y) = 0;
virtual void Resize (int width, int height) = 0;
virtual bool SetBorderless (bool borderless) = 0;
virtual void SetDisplayMode (DisplayMode* displayMode) = 0;
virtual void SetEnableTextEvents (bool enable) = 0;
virtual bool SetFullscreen (bool fullscreen) = 0;
virtual void SetIcon (ImageBuffer *imageBuffer) = 0;