#ifndef LIME_UI_WINDOW_H #define LIME_UI_WINDOW_H #ifdef CreateWindow #undef CreateWindow #endif #include #include #include #include #include namespace lime { // struct HL_Window { // hl_type* t; // HL_Application* application; // bool borderless; // vdynamic* config; // vdynamic* display; // int id; // vdynamic* onActivate; // vdynamic* onClose; // vdynamic* onCreate; // vdynamic* onDeactivate; // vdynamic* onDropFile; // vdynamic* onEnter; // vdynamic* onFocusIn; // vdynamic* onFocusOut; // vdynamic* onFullscreen; // vdynamic* onKeyDown; // vdynamic* onKeyUp; // vdynamic* onLeave; // vdynamic* onMinimize; // vdynamic* onMouseDown; // vdynamic* onMouseMove; // vdynamic* onMouseMoveRelative; // vdynamic* onMouseUp; // vdynamic* onMouseWheel; // vdynamic* onMove; // vdynamic* onResize; // vdynamic* onRestore; // vdynamic* onTextEdit; // vdynamic* onTextInput; // HL_Renderer* renderer; // double scale; // vdynamic* stage; // vdynamic* backend; // bool __borderless; // bool __fullscreen; // int __height; // bool __maximized; // bool __minimized; // bool __resizable; // double __scale; // vbyte* __title; // int __width; // int __x; // int __y; // }; class Window { public: virtual ~Window () {}; virtual void Alert (const char* message, const char* title) = 0; 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; virtual int GetWidth () = 0; virtual int GetX () = 0; virtual int GetY () = 0; 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; virtual bool SetMaximized (bool minimized) = 0; virtual bool SetMinimized (bool minimized) = 0; virtual bool SetResizable (bool resizable) = 0; virtual const char* SetTitle (const char* title) = 0; Application* currentApplication; int flags; }; Window* CreateWindow (Application* application, int width, int height, int flags, const char* title); enum WindowFlags { WINDOW_FLAG_FULLSCREEN = 0x00000001, WINDOW_FLAG_BORDERLESS = 0x00000002, WINDOW_FLAG_RESIZABLE = 0x00000004, WINDOW_FLAG_HARDWARE = 0x00000008, WINDOW_FLAG_VSYNC = 0x00000010, WINDOW_FLAG_HW_AA = 0x00000020, WINDOW_FLAG_HW_AA_HIRES = 0x00000060, WINDOW_FLAG_ALLOW_SHADERS = 0x00000080, WINDOW_FLAG_REQUIRE_SHADERS = 0x00000100, WINDOW_FLAG_DEPTH_BUFFER = 0x00000200, WINDOW_FLAG_STENCIL_BUFFER = 0x00000400, WINDOW_FLAG_ALLOW_HIGHDPI = 0x00000800, WINDOW_FLAG_HIDDEN = 0x00001000, WINDOW_FLAG_MINIMIZED = 0x00002000, WINDOW_FLAG_MAXIMIZED = 0x00004000, WINDOW_FLAG_ALWAYS_ON_TOP = 0x00008000, WINDOW_FLAG_COLOR_DEPTH_32_BIT = 0x00010000 }; } #endif