Tatooine
api.h
Go to the documentation of this file.
1#ifndef TATOOINE_GL_GLFW_API_H
2#define TATOOINE_GL_GLFW_API_H
3//==============================================================================
5#include <iostream>
6#include <stdexcept>
7//==============================================================================
9//==============================================================================
10struct api {
11 static auto get() -> api const&;
12 //----------------------------------------------------------------------------
13 // GLFW callbacks
14 //----------------------------------------------------------------------------
15 static auto on_error(int /*error*/, char const* description) -> void;
16 static auto on_close(GLFWwindow*) -> void;
17 static auto on_resize(GLFWwindow* w, int width, int height) -> void;
18 static auto on_cursor_moved(GLFWwindow* w, double xpos, double ypos) -> void;
19 static auto on_button(GLFWwindow*, int button, int action, int mods) -> void;
20 static auto on_mouse_wheel(GLFWwindow*, double xoffset, double yoffset)
21 -> void;
22 static auto on_key(GLFWwindow*, int key, int scancode, int action, int mods)
23 -> void;
24
25 private:
26 api();
27
28 public:
30};
31//==============================================================================
32} // namespace tatooine::gl::glfw
33//==============================================================================
34#endif
Definition: api.h:8
button
Definition: mouse.h:8
key
Definition: keyboard.h:9
Definition: api.h:10
static auto on_resize(GLFWwindow *w, int width, int height) -> void
static auto on_close(GLFWwindow *) -> void
static auto on_button(GLFWwindow *, int button, int action, int mods) -> void
static auto on_key(GLFWwindow *, int key, int scancode, int action, int mods) -> void
static auto get() -> api const &
static auto on_mouse_wheel(GLFWwindow *, double xoffset, double yoffset) -> void
static auto on_error(int, char const *description) -> void
static auto on_cursor_moved(GLFWwindow *w, double xpos, double ypos) -> void