Refactor various headers
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
21
engine/src/platform/linux/x11/window_structs.h
Normal file
21
engine/src/platform/linux/x11/window_structs.h
Normal 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
|
||||
15
engine/src/platform/linux/x11/wrapper.h
Normal file
15
engine/src/platform/linux/x11/wrapper.h
Normal 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
|
||||
Reference in New Issue
Block a user