Euphoria
sdlwindow.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "core/mousebehaviour.h"
4 #include "base/vec2.h"
5 
6 
7 extern "C"
8 {
9  struct SDL_Window;
10 }
11 
12 
13 namespace eu::window
14 {
15  struct SdlWindow
16  {
17  SdlWindow
18  (
19  const std::string& title,
20  int width,
21  int height,
22  bool resize = false
23  );
24 
25  ~SdlWindow();
26 
27  void
29 
30  SdlWindow(const SdlWindow& other) = delete;
31  void operator=(const SdlWindow&) = delete;
32  SdlWindow(SdlWindow&& other) = delete;
33  void operator=(SdlWindow&&) = delete;
34 
35  // 0-(size-1)
36  [[nodiscard]] vec2i
37  get_mouse_position() const;
38 
39  SDL_Window* window;
40  };
41 
42 
43  void
44  enable_char_event(bool enable);
45 }
void enable_char_event(bool enable)
Definition: sdlwindow.cc:61
Definition: vec2.h:72
SdlWindow(const SdlWindow &other)=delete
SdlWindow(const std::string &title, int width, int height, bool resize=false)
Definition: sdlwindow.cc:10
vec2i get_mouse_position() const
Definition: sdlwindow.cc:74
void operator=(const SdlWindow &)=delete
SDL_Window * window
Definition: sdlwindow.h:39
SdlWindow(SdlWindow &&other)=delete
void set_mouse_behaviour(core::MouseBehaviour) const
Definition: sdlwindow.cc:39
void operator=(SdlWindow &&)=delete