Refactor various headers

This commit is contained in:
2025-06-26 22:00:28 +10:00
parent 04eec1b703
commit db7d50c371
20 changed files with 486 additions and 454 deletions

View File

@@ -8,8 +8,12 @@
#include "platform/linux/x11/window_driver.h"
#include "platform/linux/x11/window_structs.h"
#include "platform/linux/x11/wrapper.h"
#ifdef NOVA_VULKAN
#include "drivers/vulkan/render_driver.h"
#include "drivers/vulkan/render_structs.h"
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_xlib.h>

View File

@@ -8,24 +8,13 @@
#ifdef NOVA_X11
#include <X11/Xlib.h>
#include "platform/linux/x11/wrapper.h"
#include <nova/platform/window_driver.h>
#include <unordered_map>
namespace X11 {
using Window = ::Window;
using Display = ::Display;
using Atom = ::Atom;
} // namespace X11
namespace Nova {
struct Window {
X11::Window handle = 0;
int width = 0;
int height = 0;
};
class X11WindowDriver final : public WindowDriver {
public:
X11WindowDriver();

View File

@@ -0,0 +1,21 @@
/**
* Copyright (c) 2025, Jayden Grubb <contact@jaydengrubb.com>
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
/// NOTE: This header should only be included in implementation files
#include "platform/linux/x11/wrapper.h"
#include <nova/platform/platform_structs.h>
namespace Nova {
struct Window {
X11::Window handle = 0;
int width = 0;
int height = 0;
};
} // namespace Nova

View File

@@ -0,0 +1,15 @@
/**
* Copyright (c) 2025, Jayden Grubb <contact@jaydengrubb.com>
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include <X11/Xlib.h>
namespace X11 {
using Window = ::Window;
using Display = ::Display;
using Atom = ::Atom;
} // namespace X11