46 lines
1,017 B
C
46 lines
1,017 B
C
#ifndef ARC_GRAPHICS_MOUSE_H_
|
|
#define ARC_GRAPHICS_MOUSE_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "arc/math/point.h"
|
|
#include <stdint.h>
|
|
|
|
/**
|
|
* @brief predefien ARC_Input so as not to get circular reference
|
|
*/
|
|
typedef struct ARC_Input ARC_Input;
|
|
|
|
typedef struct ARC_Mouse ARC_Mouse;
|
|
|
|
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_CreateWithInput(ARC_Mouse **mouse, ARC_Input *input);
|
|
|
|
void ARC_Mouse_Destroy(ARC_Mouse *mouse);
|
|
void ARC_Mouse_Update(ARC_Mouse *mouse);
|
|
ARC_FPoint *ARC_Mouse_GetCoords(ARC_Mouse *mouse);
|
|
ARC_MouseState ARC_Mouse_GetState(ARC_Mouse *mouse, ARC_MouseButton button);
|
|
int32_t *ARC_Mouse_GetScrollY(ARC_Mouse *mouse);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // !ARC_GRAPHICS_MOUSE_H_
|