Native cleanup, merge lime.ui.Mouse into Window
This commit is contained in:
31
project/include/ui/Cursor.h
Normal file
31
project/include/ui/Cursor.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef LIME_UI_CURSOR_H
|
||||
#define LIME_UI_CURSOR_H
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
enum Cursor {
|
||||
|
||||
HIDDEN,
|
||||
ARROW,
|
||||
CROSSHAIR,
|
||||
DEFAULT,
|
||||
MOVE,
|
||||
POINTER,
|
||||
RESIZE_NESW,
|
||||
RESIZE_NS,
|
||||
RESIZE_NWSE,
|
||||
RESIZE_WE,
|
||||
TEXT,
|
||||
WAIT,
|
||||
WAIT_ARROW,
|
||||
CUSTOM
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,30 +0,0 @@
|
||||
#ifndef LIME_UI_MOUSE_H
|
||||
#define LIME_UI_MOUSE_H
|
||||
|
||||
|
||||
#include <ui/MouseCursor.h>
|
||||
#include <ui/Window.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class Mouse {
|
||||
|
||||
public:
|
||||
|
||||
static MouseCursor currentCursor;
|
||||
|
||||
static void Hide ();
|
||||
static void SetCursor (MouseCursor cursor);
|
||||
static void SetLock (bool lock);
|
||||
static void Show ();
|
||||
static void Warp (int x, int y, Window* window);
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,30 +0,0 @@
|
||||
#ifndef LIME_UI_MOUSE_CURSOR_H
|
||||
#define LIME_UI_MOUSE_CURSOR_H
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
enum MouseCursor {
|
||||
|
||||
ARROW,
|
||||
CROSSHAIR,
|
||||
DEFAULT,
|
||||
MOVE,
|
||||
POINTER,
|
||||
RESIZE_NESW,
|
||||
RESIZE_NS,
|
||||
RESIZE_NWSE,
|
||||
RESIZE_WE,
|
||||
TEXT,
|
||||
WAIT,
|
||||
WAIT_ARROW,
|
||||
CUSTOM
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -33,12 +33,14 @@ namespace lime {
|
||||
virtual void Focus () = 0;
|
||||
virtual void* GetContext () = 0;
|
||||
virtual const char* GetContextType () = 0;
|
||||
// virtual Cursor GetCursor () = 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 bool GetMouseLock () = 0;
|
||||
virtual double GetScale () = 0;
|
||||
virtual bool GetTextInputEnabled () = 0;
|
||||
virtual int GetWidth () = 0;
|
||||
virtual int GetX () = 0;
|
||||
virtual int GetY () = 0;
|
||||
@@ -46,14 +48,17 @@ namespace lime {
|
||||
virtual void ReadPixels (ImageBuffer *buffer, Rectangle *rect) = 0;
|
||||
virtual void Resize (int width, int height) = 0;
|
||||
virtual bool SetBorderless (bool borderless) = 0;
|
||||
virtual void SetCursor (Cursor cursor) = 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 void SetMouseLock (bool mouseLock) = 0;
|
||||
virtual bool SetResizable (bool resizable) = 0;
|
||||
virtual void SetTextInputEnabled (bool enable) = 0;
|
||||
virtual const char* SetTitle (const char* title) = 0;
|
||||
virtual void WarpMouse (int x, int y) = 0;
|
||||
|
||||
Application* currentApplication;
|
||||
int flags;
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace lime {
|
||||
WINDOW_FOCUS_IN,
|
||||
WINDOW_FOCUS_OUT,
|
||||
WINDOW_LEAVE,
|
||||
WINDOW_MAXIMIZE,
|
||||
WINDOW_MINIMIZE,
|
||||
WINDOW_MOVE,
|
||||
WINDOW_RESIZE,
|
||||
|
||||
Reference in New Issue
Block a user