forked from z64tools/ext_lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_cursor.h
45 lines (37 loc) · 891 Bytes
/
ext_cursor.h
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
#ifndef EXT_CURSOR_H
#define EXT_CURSOR_H
#include <GLFW/glfw3.h>
#include <nanovg/src/nanovg.h>
#include "ext_type.h"
typedef struct {
rgba8_t* bitmap;
GLFWimage img;
void* glfwCur;
} CursorBitmap;
typedef enum {
CURSOR_NONE = -1,
CURSOR_DEFAULT = 0,
CURSOR_ARROW_L = 1,
CURSOR_ARROW_U,
CURSOR_ARROW_R,
CURSOR_ARROW_D,
CURSOR_ARROW_H,
CURSOR_ARROW_V,
CURSOR_CROSSHAIR,
CURSOR_EMPTY,
CURSOR_MAX
} CursorIndex;
typedef struct {
struct Window* window;
CursorBitmap cursor[CURSOR_MAX];
CursorIndex cursorNow;
CursorIndex cursorSet;
CursorIndex cursorForce;
} CursorIcon;
void Cursor_CreateCursor(CursorIndex id, const u8* data, s32 size, s32 xcent, s32 ycent);
void Cursor_Init(CursorIcon* cursor, struct Window*);
void Cursor_Free();
void Cursor_Update();
void Cursor_SetCursor(CursorIndex id);
void Cursor_ForceCursor(CursorIndex id);
#endif