PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
callback_state.h
1#pragma once
2
3#include "pixelbullet/window/glfw/callback_adapter.h"
4
5namespace pixelbullet::glfw_window_internal
6{
8{
9 unsigned int& width;
10 unsigned int& height;
11 glm::ivec2& position;
12 bool& focused;
13 bool& fullscreen;
14 glm::ivec2& size;
15 glm::ivec2& fullscreen_size;
16 uint32_t window_id;
17 input::InputState& input_state;
18 const std::function<void(Event&)>& event_callback;
19 const std::function<void(uint32_t)>& framebuffer_resize_callback;
20
21 [[nodiscard]] CallbackAdapter::State AsState() const
22 {
23 return { width,
24 height,
25 position,
26 focused,
27 fullscreen,
28 size,
29 fullscreen_size,
30 window_id,
31 input_state,
32 event_callback,
33 framebuffer_resize_callback };
34 }
35};
36} // namespace pixelbullet::glfw_window_internal
Definition event.h:72
Definition input.h:25