CYD-UI
A C++ library for building native graphic user interfaces
Loading...
Searching...
No Matches
window.cppm
Go to the documentation of this file.
1
5
6module;
7#define SDL_MAIN_HANDLED
8#include <SDL3/SDL.h>
9
10
11export module cydui.graphics.window;
12
13import std;
14
15export import fabric.async;
16export import fabric.profiling;
17export import fabric.type_aliases;
18
19
20export namespace cydui::graphics {
21 struct window_t {
23 fabric::async::async_bus_t* async_bus,
24 prof::context_t* profiler,
25 unsigned long w,
26 unsigned long h
27 ) {
28 this->bus = async_bus;
29 this->profiler = profiler;
30 }
31
32 Uint32 window_id() const {
33 return SDL_GetWindowID(window);
34 }
35
36 fabric::async::async_bus_t* bus;
37 prof::context_t* profiler;
38
39 // SDL
40 SDL_Window* window = nullptr;
41 SDL_Renderer* renderer = nullptr;
42 SDL_Texture* texture = nullptr;
43 };
44}
Uint32 window_id() const
Definition window.cppm:32
SDL_Renderer * renderer
Definition window.cppm:41
window_t(fabric::async::async_bus_t *async_bus, prof::context_t *profiler, unsigned long w, unsigned long h)
Definition window.cppm:22
fabric::async::async_bus_t * bus
Definition window.cppm:36
SDL_Texture * texture
Definition window.cppm:42
prof::context_t * profiler
Definition window.cppm:37