parent
f3036be13f
commit
415b342d3c
2 changed files with 31 additions and 3 deletions
@ -1,7 +1,34 @@ |
||||
#pragma once |
||||
|
||||
#include <bkpch.h> |
||||
#include <bakara/events/event.h> |
||||
|
||||
namespace Bk { |
||||
class Window { |
||||
|
||||
} |
||||
struct WindowPros
|
||||
{ |
||||
std::string title; |
||||
uint width; |
||||
uint height; |
||||
|
||||
WindowPros(std::string title = "Bakara engine", uint width = 1000, uint height = 800) |
||||
: title(title), width(width), height(height) {} |
||||
}; |
||||
|
||||
class Window
|
||||
{ |
||||
public:
|
||||
using EventCallback = std::function<void(Event& e)>; |
||||
virtual ~Window(){} |
||||
|
||||
virtual uint get_width() const = 0; |
||||
virtual uint get_height() const = 0; |
||||
|
||||
virtual void on_update() = 0; |
||||
virtual void set_event_callback(const EventCallback callback) = 0; |
||||
|
||||
virtual void set_vsync(bool enable) = 0; |
||||
virtual bool is_vsync() const = 0; |
||||
|
||||
static std::unique_ptr<Window> create_window(const WindowPros& props = WindowPros()); |
||||
}; |
||||
} |
Loading…
Reference in New Issue