Add get_api() and get_api_name() to WindowDriver
This commit is contained in:
11
engine/include/nova/platform/window_api.h
Normal file
11
engine/include/nova/platform/window_api.h
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Copyright (c) 2025, Jayden Grubb <contact@jaydengrubb.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Nova {
|
||||
enum class WindowAPI { WAYLAND, WIN32, X11 };
|
||||
} // namespace Nova
|
||||
@@ -7,6 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <nova/api.h>
|
||||
#include <nova/platform/window_api.h>
|
||||
#include <nova/types.h>
|
||||
|
||||
#include <string_view>
|
||||
@@ -22,6 +23,9 @@ namespace Nova {
|
||||
static WindowDriver* create();
|
||||
virtual ~WindowDriver() = default;
|
||||
|
||||
[[nodiscard]] virtual WindowAPI get_api() const = 0;
|
||||
[[nodiscard]] virtual std::string get_api_name() const = 0;
|
||||
|
||||
virtual void poll_events() = 0;
|
||||
virtual void beep() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user