2013-08-13 20:04:25 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* Mouse.h *
|
|
|
|
* *
|
|
|
|
* XFX::Input::Mouse class definition file *
|
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
|
|
*****************************************************************************/
|
2013-05-05 18:18:41 +02:00
|
|
|
#ifndef _XFX_INPUT_MOUSE_
|
|
|
|
#define _XFX_INPUT_MOUSE_
|
|
|
|
|
|
|
|
#include "Enums.h"
|
|
|
|
#include <System/Types.h>
|
|
|
|
|
|
|
|
using namespace System;
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
{
|
|
|
|
namespace Input
|
|
|
|
{
|
2013-08-13 20:04:25 +02:00
|
|
|
/**
|
|
|
|
* Represents the state of a mouse input device, including mouse cursor position and buttons pressed.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
struct MouseState
|
|
|
|
{
|
|
|
|
ButtonState_t LeftButton;
|
|
|
|
ButtonState_t MiddleButton;
|
|
|
|
ButtonState_t RightButton;
|
|
|
|
int X;
|
|
|
|
ButtonState_t XButton1;
|
|
|
|
ButtonState_t XButton2;
|
|
|
|
int Y;
|
2013-08-13 20:04:25 +02:00
|
|
|
|
2013-05-30 13:55:10 +02:00
|
|
|
bool operator!=(const MouseState& other) const;
|
|
|
|
bool operator==(const MouseState& other) const;
|
2013-05-05 18:18:41 +02:00
|
|
|
};
|
2013-08-13 20:04:25 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Allows retrieval of position and button clicks from a mouse input device.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
class Mouse
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
Mouse(); //Private constructor to prevent instantiation.
|
|
|
|
|
|
|
|
public:
|
|
|
|
static MouseState GetState();
|
|
|
|
static void SetPosition(int x, int y);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_XFX_INPUT_MOUSE_
|