Add window.displayMode for fullscreen display mode switching
This commit is contained in:
33
project/include/system/DisplayMode.h
Normal file
33
project/include/system/DisplayMode.h
Normal 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
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user