summaryrefslogtreecommitdiff
path: root/Source/Asura.Engine/Input/Mouse.h
blob: 0f34fdd3ed7f3d022849611da40feca7c2b67f6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef __ASURA_ENGINE_MOUSE_H__
#define __ASURA_ENGINE_MOUSE_H__

#include "Cursor.h"
#include "InputDevice.hpp"

namespace AsuraEngine
{
	namespace Input
	{

		class Mouse : public InputDevice<Mouse>
		{
		public:

			///
			/// ͼƬйָʹϵͳָ
			///
			Cursor *CreateCursor(Graphics::ImageData *data, int hotx, int hoty);
			Cursor *GetSystemCursor(Cursor::SystemCursor cursortype);

			void SetCursor(Cursor *cursor);
			void SetCursor() ;

			Cursor* GetCursor() const;

			bool IsCursorSupported() const;

			double GetX() const;
			double GetY() const;
			void GetPosition(double &x, double &y) const;
			void GetX(double x) ;
			void SetY(double y) ;
			void SetPosition(double x, double y) ;
			void SetVisible(bool visible) ;
			bool IsDown(const std::vector<int> &buttons) const;
			bool IsVisible() const;
			void SetGrabbed(bool grab) ;
			bool IsGrabbed() const;
			bool SetRelativeMode(bool relative) ;
			bool GetRelativeMode() const;

			//----------------------------------------------------------------------------------------------------------

			LUAX_DECL_SINGLETON(Mouse);

			//----------------------------------------------------------------------------------------------------------

		private:

		};

	}
}

#endif