Add get_api() and get_api_name() to WindowDriver

This commit is contained in:
2025-04-12 10:32:30 +10:00
parent 1849593dfc
commit 6cbf8df17a
4 changed files with 26 additions and 0 deletions

View 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

View File

@@ -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;