1717#include < gf2/core/TouchTypes.h>
1818#include < gf2/core/Vec2.h>
1919
20- #include " GraphicsApi .h"
20+ #include " CoreApi .h"
2121
2222namespace gf {
2323
@@ -66,166 +66,166 @@ namespace gf {
6666 };
6767
6868 // clang-format off
69- struct GF_GRAPHICS_API QuitEvent {
69+ struct GF_CORE_API QuitEvent {
7070 };
7171 // clang-format on
7272
73- struct GF_GRAPHICS_API WindowShownEvent {
73+ struct GF_CORE_API WindowShownEvent {
7474 uint32_t window_id;
7575 };
7676
77- struct GF_GRAPHICS_API WindowHiddenEvent {
77+ struct GF_CORE_API WindowHiddenEvent {
7878 uint32_t window_id;
7979 };
8080
81- struct GF_GRAPHICS_API WindowExposedEvent {
81+ struct GF_CORE_API WindowExposedEvent {
8282 uint32_t window_id;
8383 };
8484
85- struct GF_GRAPHICS_API WindowMovedEvent {
85+ struct GF_CORE_API WindowMovedEvent {
8686 uint32_t window_id;
8787 Vec2I position;
8888 };
8989
90- struct GF_GRAPHICS_API WindowResizedEvent {
90+ struct GF_CORE_API WindowResizedEvent {
9191 uint32_t window_id;
9292 Vec2I size;
9393 };
9494
95- // struct GF_GRAPHICS_API WindowPixelSizeChangedEvent {
95+ // struct GF_CORE_API WindowPixelSizeChangedEvent {
9696 // uint32_t window_id;
9797 // Vec2I size;
9898 // };
9999
100- struct GF_GRAPHICS_API WindowMinimizedEvent {
100+ struct GF_CORE_API WindowMinimizedEvent {
101101 uint32_t window_id;
102102 };
103103
104- struct GF_GRAPHICS_API WindowMaximizedEvent {
104+ struct GF_CORE_API WindowMaximizedEvent {
105105 uint32_t window_id;
106106 };
107107
108- struct GF_GRAPHICS_API WindowRestoredEvent {
108+ struct GF_CORE_API WindowRestoredEvent {
109109 uint32_t window_id;
110110 };
111111
112- struct GF_GRAPHICS_API MouseFocusGainedEvent {
112+ struct GF_CORE_API MouseFocusGainedEvent {
113113 uint32_t window_id;
114114 };
115115
116- struct GF_GRAPHICS_API MouseFocusLostEvent {
116+ struct GF_CORE_API MouseFocusLostEvent {
117117 uint32_t window_id;
118118 };
119119
120- struct GF_GRAPHICS_API KeyboardFocusGainedEvent {
120+ struct GF_CORE_API KeyboardFocusGainedEvent {
121121 uint32_t window_id;
122122 };
123123
124- struct GF_GRAPHICS_API KeyboardFocusLostEvent {
124+ struct GF_CORE_API KeyboardFocusLostEvent {
125125 uint32_t window_id;
126126 };
127127
128- struct GF_GRAPHICS_API WindowCloseRequestedEvent {
128+ struct GF_CORE_API WindowCloseRequestedEvent {
129129 uint32_t window_id;
130130 };
131131
132- struct GF_GRAPHICS_API KeyPressedEvent {
132+ struct GF_CORE_API KeyPressedEvent {
133133 uint32_t window_id;
134134 Keycode keycode;
135135 Scancode scancode;
136136 Flags<Modifier> modifiers;
137137 };
138138
139- struct GF_GRAPHICS_API KeyRepeatedEvent {
139+ struct GF_CORE_API KeyRepeatedEvent {
140140 uint32_t window_id;
141141 Keycode keycode;
142142 Scancode scancode;
143143 Flags<Modifier> modifiers;
144144 uint8_t repeat;
145145 };
146146
147- struct GF_GRAPHICS_API KeyReleasedEvent {
147+ struct GF_CORE_API KeyReleasedEvent {
148148 uint32_t window_id;
149149 Keycode keycode;
150150 Scancode scancode;
151151 Flags<Modifier> modifiers;
152152 };
153153
154- // struct GF_GRAPHICS_API TextEditedEvent {
154+ // struct GF_CORE_API TextEditedEvent {
155155 // uint32_t window_id;
156156 // std::string_view text;
157157 // int32_t start;
158158 // int32_t length;
159159 // };
160160
161- struct GF_GRAPHICS_API TextEnteredEvent {
161+ struct GF_CORE_API TextEnteredEvent {
162162 uint32_t window_id;
163163 std::array<char , 32 > text; // TODO: SDL3: changed to a std::string_view
164164 };
165165
166- // struct GF_GRAPHICS_API TextCandidatesShownEvent {
166+ // struct GF_CORE_API TextCandidatesShownEvent {
167167 // uint32_t window_id;
168168 // std::array<std::string_view, 10> candidates;
169169 // int32_t count;
170170 // int32_t selected;
171171 // bool horizontal;
172172 // };
173173
174- struct GF_GRAPHICS_API MouseMovedEvent {
174+ struct GF_CORE_API MouseMovedEvent {
175175 uint32_t window_id;
176176 MouseId mouse_id;
177177 Vec2I position;
178178 Vec2I motion;
179179 };
180180
181- struct GF_GRAPHICS_API MouseButtonPressedEvent {
181+ struct GF_CORE_API MouseButtonPressedEvent {
182182 uint32_t window_id;
183183 MouseId mouse_id;
184184 MouseButton button;
185185 Vec2I position;
186186 uint8_t clicks;
187187 };
188188
189- struct GF_GRAPHICS_API MouseButtonReleasedEvent {
189+ struct GF_CORE_API MouseButtonReleasedEvent {
190190 uint32_t window_id;
191191 MouseId mouse_id;
192192 MouseButton button;
193193 Vec2I position;
194194 uint8_t clicks;
195195 };
196196
197- struct GF_GRAPHICS_API MouseWheelScrolledEvent {
197+ struct GF_CORE_API MouseWheelScrolledEvent {
198198 uint32_t window_id;
199199 MouseId mouse_id;
200200 Vec2I offset;
201201 MouseWheelDirection direction;
202202 };
203203
204- struct GF_GRAPHICS_API GamepadAxisMovedEvent {
204+ struct GF_CORE_API GamepadAxisMovedEvent {
205205 GamepadId gamepad_id;
206206 GamepadAxis axis;
207207 int16_t value;
208208 };
209209
210- struct GF_GRAPHICS_API GamepadButtonPressedEvent {
210+ struct GF_CORE_API GamepadButtonPressedEvent {
211211 GamepadId gamepad_id;
212212 GamepadButton button;
213213 };
214214
215- struct GF_GRAPHICS_API GamepadButtonReleasedEvent {
215+ struct GF_CORE_API GamepadButtonReleasedEvent {
216216 GamepadId gamepad_id;
217217 GamepadButton button;
218218 };
219219
220- struct GF_GRAPHICS_API GamepadConnectedEvent {
220+ struct GF_CORE_API GamepadConnectedEvent {
221221 GamepadHwId gamepad_hw_id;
222222 };
223223
224- struct GF_GRAPHICS_API GamepadDisconnectedEvent {
224+ struct GF_CORE_API GamepadDisconnectedEvent {
225225 GamepadId gamepad_id;
226226 };
227227
228- struct GF_GRAPHICS_API TouchPressedEvent {
228+ struct GF_CORE_API TouchPressedEvent {
229229 uint32_t window_id;
230230 TouchId touch_id;
231231 FingerId finger;
@@ -234,7 +234,7 @@ namespace gf {
234234 float pressure;
235235 };
236236
237- struct GF_GRAPHICS_API TouchReleasedEvent {
237+ struct GF_CORE_API TouchReleasedEvent {
238238 uint32_t window_id;
239239 TouchId touch_id;
240240 FingerId finger;
@@ -243,7 +243,7 @@ namespace gf {
243243 float pressure;
244244 };
245245
246- struct GF_GRAPHICS_API TouchMovedEvent {
246+ struct GF_CORE_API TouchMovedEvent {
247247 uint32_t window_id;
248248 TouchId touch_id;
249249 FingerId finger;
@@ -252,7 +252,7 @@ namespace gf {
252252 float pressure;
253253 };
254254
255- class GF_GRAPHICS_API Event {
255+ class GF_CORE_API Event {
256256 public:
257257 constexpr Event () = default;
258258
@@ -303,9 +303,6 @@ namespace gf {
303303 return std::get<static_cast <std::size_t >(E)>(m_data);
304304 }
305305
306- static std::optional<Event> poll ();
307- static Event wait ();
308-
309306 private:
310307 uint64_t m_timestamp = 0 ;
311308
0 commit comments