summaryrefslogtreecommitdiffstats
path: root/src/game/client/glfw.hh
blob: d97842915c87b8ace1f4db7f8010a537bbcbdca9 (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
#ifndef CLIENTFW
#define CLIENTFW 1
#pragma once

struct GlfwCursorPosEvent final {
    glm::fvec2 pos;
};

struct GlfwFramebufferSizeEvent final {
    glm::ivec2 size;
    float aspect;
};

struct GlfwJoystickEvent final {
    int joystick_id;
    int event_type;
};

struct GlfwKeyEvent final {
    int key { GLFW_KEY_UNKNOWN };
    int scancode;
    int action;
    int mods;
};

struct GlfwMouseButtonEvent final {
    int button { GLFW_KEY_UNKNOWN };
    int action;
    int mods;
};

struct GlfwScrollEvent final {
    float dx;
    float dy;
};

#endif // CLIENTFW