input and handler possibly fixed and point
This commit is contained in:
parent
d6281e8eac
commit
3fa74e8f9e
7 changed files with 288 additions and 0 deletions
40
include/arc/input/mouse.h
Normal file
40
include/arc/input/mouse.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#ifndef ARC_GRAPHICS_MOUSE_H_
|
||||
#define ARC_GRAPHICS_MOUSE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "arc/math/point.h"
|
||||
|
||||
typedef struct ARC_Mouse ARC_Mouse;
|
||||
|
||||
typedef struct ARC_MouseInfo ARC_MouseInfo;
|
||||
|
||||
typedef enum ARC_MouseState {
|
||||
ARC_MOUSE_NONE,
|
||||
ARC_MOUSE_PRESSED,
|
||||
ARC_MOUSE_RELEASED
|
||||
} ARC_MouseState;
|
||||
|
||||
typedef enum ARC_MouseButton {
|
||||
ARC_MOUSE_LEFT = 0,
|
||||
ARC_MOUSE_MIDDLE = 1,
|
||||
ARC_MOUSE_RIGHT = 2,
|
||||
ARC_MOUSE_X1 = 3,
|
||||
ARC_MOUSE_X2 = 4
|
||||
} ARC_MouseButton;
|
||||
|
||||
#define ARC_MOUSE_BUTTON_NUM 5
|
||||
|
||||
void ARC_Mouse_Create(ARC_Mouse **mouse, ARC_MouseInfo *info);
|
||||
void ARC_Mouse_Destroy(ARC_Mouse *mouse);
|
||||
void ARC_Mouse_Update(ARC_Mouse *mouse);
|
||||
ARC_Point ARC_Mouse_GetCoords(ARC_Mouse *mouse);
|
||||
ARC_MouseState ARC_Mouse_GetState(ARC_Mouse *mouse, ARC_MouseButton button);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // !ARC_GRAPHICS_MOUSE_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue