1 // Written in the D programming language.
2 /++
3  + Authors: KanzakiKino
4  + Copyright: KanzakiKino 2018
5  + License: LGPL-3.0
6 ++/
7 module g4d.glfw.type;
8 import g4d.glfw.lib;
9 
10 ///
11 enum MouseButton
12 {
13     Left   = GLFW_MOUSE_BUTTON_1,
14     Right  = GLFW_MOUSE_BUTTON_2,
15     Middle = GLFW_MOUSE_BUTTON_3,
16     _4     = GLFW_MOUSE_BUTTON_4,
17     _5     = GLFW_MOUSE_BUTTON_5,
18     _6     = GLFW_MOUSE_BUTTON_6,
19     _7     = GLFW_MOUSE_BUTTON_7,
20 }
21 
22 ///
23 enum Key
24 {
25     Space         = GLFW_KEY_SPACE        ,
26     Apostrophe    = GLFW_KEY_APOSTROPHE   ,
27     Comma         = GLFW_KEY_COMMA        ,
28     Minus         = GLFW_KEY_MINUS        ,
29     Period        = GLFW_KEY_PERIOD       ,
30     Slash         = GLFW_KEY_SLASH        ,
31     _0            = GLFW_KEY_0            ,
32     _1            = GLFW_KEY_1            ,
33     _2            = GLFW_KEY_2            ,
34     _3            = GLFW_KEY_3            ,
35     _4            = GLFW_KEY_4            ,
36     _5            = GLFW_KEY_5            ,
37     _6            = GLFW_KEY_6            ,
38     _7            = GLFW_KEY_7            ,
39     _8            = GLFW_KEY_8            ,
40     _9            = GLFW_KEY_9            ,
41     Semicolon     = GLFW_KEY_SEMICOLON    ,
42     Equal         = GLFW_KEY_EQUAL        ,
43     A             = GLFW_KEY_A            ,
44     B             = GLFW_KEY_B            ,
45     C             = GLFW_KEY_C            ,
46     D             = GLFW_KEY_D            ,
47     E             = GLFW_KEY_E            ,
48     F             = GLFW_KEY_F            ,
49     G             = GLFW_KEY_G            ,
50     H             = GLFW_KEY_H            ,
51     I             = GLFW_KEY_I            ,
52     J             = GLFW_KEY_J            ,
53     K             = GLFW_KEY_K            ,
54     L             = GLFW_KEY_L            ,
55     M             = GLFW_KEY_M            ,
56     N             = GLFW_KEY_N            ,
57     O             = GLFW_KEY_O            ,
58     P             = GLFW_KEY_P            ,
59     Q             = GLFW_KEY_Q            ,
60     R             = GLFW_KEY_R            ,
61     S             = GLFW_KEY_S            ,
62     T             = GLFW_KEY_T            ,
63     U             = GLFW_KEY_U            ,
64     V             = GLFW_KEY_V            ,
65     W             = GLFW_KEY_W            ,
66     X             = GLFW_KEY_X            ,
67     Y             = GLFW_KEY_Y            ,
68     Z             = GLFW_KEY_Z            ,
69     LeftBracket   = GLFW_KEY_LEFT_BRACKET ,
70     Backslash     = GLFW_KEY_BACKSLASH    ,
71     RightBracket  = GLFW_KEY_RIGHT_BRACKET,
72     GraveAccent   = GLFW_KEY_GRAVE_ACCENT ,
73     World1        = GLFW_KEY_WORLD_1      ,
74     World2        = GLFW_KEY_WORLD_2      ,
75 
76     Escape        = GLFW_KEY_ESCAPE       ,
77     Enter         = GLFW_KEY_ENTER        ,
78     Tab           = GLFW_KEY_TAB          ,
79     Backspace     = GLFW_KEY_BACKSPACE    ,
80     Insert        = GLFW_KEY_INSERT       ,
81     Delete        = GLFW_KEY_DELETE       ,
82     Right         = GLFW_KEY_RIGHT        ,
83     Left          = GLFW_KEY_LEFT         ,
84     Down          = GLFW_KEY_DOWN         ,
85     Up            = GLFW_KEY_UP           ,
86     PageUp        = GLFW_KEY_PAGE_UP      ,
87     PageDown      = GLFW_KEY_PAGE_DOWN    ,
88     Home          = GLFW_KEY_HOME         ,
89     End           = GLFW_KEY_END          ,
90     CapsLock      = GLFW_KEY_CAPS_LOCK    ,
91     ScrollLock    = GLFW_KEY_SCROLL_LOCK  ,
92     NumLock       = GLFW_KEY_NUM_LOCK     ,
93     PrintScreen   = GLFW_KEY_PRINT_SCREEN ,
94     Pause         = GLFW_KEY_PAUSE        ,
95     F1            = GLFW_KEY_F1           ,
96     F2            = GLFW_KEY_F2           ,
97     F3            = GLFW_KEY_F3           ,
98     F4            = GLFW_KEY_F4           ,
99     F5            = GLFW_KEY_F5           ,
100     F6            = GLFW_KEY_F6           ,
101     F7            = GLFW_KEY_F7           ,
102     F8            = GLFW_KEY_F8           ,
103     F9            = GLFW_KEY_F9           ,
104     F10           = GLFW_KEY_F10          ,
105     F11           = GLFW_KEY_F11          ,
106     F12           = GLFW_KEY_F12          ,
107     F13           = GLFW_KEY_F13          ,
108     F14           = GLFW_KEY_F14          ,
109     F15           = GLFW_KEY_F15          ,
110     F16           = GLFW_KEY_F16          ,
111     F17           = GLFW_KEY_F17          ,
112     F18           = GLFW_KEY_F18          ,
113     F19           = GLFW_KEY_F19          ,
114     F20           = GLFW_KEY_F20          ,
115     F21           = GLFW_KEY_F21          ,
116     F22           = GLFW_KEY_F22          ,
117     F23           = GLFW_KEY_F23          ,
118     F24           = GLFW_KEY_F24          ,
119     F25           = GLFW_KEY_F25          ,
120     KP0           = GLFW_KEY_KP_0         ,
121     KP1           = GLFW_KEY_KP_1         ,
122     KP2           = GLFW_KEY_KP_2         ,
123     KP3           = GLFW_KEY_KP_3         ,
124     KP4           = GLFW_KEY_KP_4         ,
125     KP5           = GLFW_KEY_KP_5         ,
126     KP6           = GLFW_KEY_KP_6         ,
127     KP7           = GLFW_KEY_KP_7         ,
128     KP8           = GLFW_KEY_KP_8         ,
129     KP9           = GLFW_KEY_KP_9         ,
130     KPDecimal     = GLFW_KEY_KP_DECIMAL   ,
131     KPDivide      = GLFW_KEY_KP_DIVIDE    ,
132     KPMultiply    = GLFW_KEY_KP_MULTIPLY  ,
133     KPSubtract    = GLFW_KEY_KP_SUBTRACT  ,
134     KPAdd         = GLFW_KEY_KP_ADD       ,
135     KPEnter       = GLFW_KEY_KP_ENTER     ,
136     KPEqual       = GLFW_KEY_KP_EQUAL     ,
137     LeftShift     = GLFW_KEY_LEFT_SHIFT   ,
138     LeftControl   = GLFW_KEY_LEFT_CONTROL ,
139     LeftAlt       = GLFW_KEY_LEFT_ALT     ,
140     LeftSuper     = GLFW_KEY_LEFT_SUPER   ,
141     RightShift    = GLFW_KEY_RIGHT_SHIFT  ,
142     RightControl  = GLFW_KEY_RIGHT_CONTROL,
143     RightAlt      = GLFW_KEY_RIGHT_ALT    ,
144     RightSuper    = GLFW_KEY_RIGHT_SUPER  ,
145     Menu          = GLFW_KEY_MENU         ,
146 }
147 
148 ///
149 enum KeyState
150 {
151     Press   = GLFW_PRESS,
152     Repeat  = GLFW_REPEAT,
153     Release = GLFW_RELEASE,
154 }