Brenta Engine 1.2
Loading...
Searching...
No Matches
brenta::Window Class Reference
Inheritance diagram for brenta::Window:
brenta::Subsystem

Data Structures

class  Builder
 
struct  Config
 
class  Driver
 

Public Types

using WindowHandle = void *
 
using ProcHandle = void *
 
using Callback = void *
 
- Public Types inherited from brenta::Subsystem
using Error = std::string
 

Public Member Functions

std::string name () override
 
bool is_initialized () override
 
std::expected< void, Subsystem::Error > initialize () override
 
std::expected< void, Subsystem::Error > terminate () override
 

Static Public Member Functions

static Windowinstance ()
 
static int get_width ()
 
static int get_height ()
 
static bool should_close ()
 
static bool is_key_pressed (Key key)
 
static Time get_time ()
 
static ProcHandle get_proc_address ()
 
static WindowHandle get_window ()
 
static tenno::shared_ptr< Window::Driverget_driver ()
 
static void set_mouse_capture (bool is_captured)
 
static void set_mouse_callback (Callback callback)
 
static void set_size_callback (Callback callback)
 
static void set_mouse_pos_callback (Callback callback)
 
static void set_key_callback (Callback callback)
 
static void set_dimensions (int width, int height)
 
static void swap_buffers ()
 
static void poll_events ()
 
static void update_dimensions ()
 
static void make_context_current ()
 
static void close ()
 

Static Public Attributes

static tenno::shared_ptr< FrameBufferframebuffer = nullptr
 
static const std::string subsystem_name = "window"
 

Static Protected Attributes

static bool initialized = false
 
static Window::Config init_config = {}
 
static tenno::shared_ptr< Window::Driverbackend = nullptr
 

Detailed Description

Definition at line 30 of file window.hpp.

Member Typedef Documentation

◆ Callback

using brenta::Window::Callback = void*

Definition at line 40 of file window.hpp.

◆ ProcHandle

using brenta::Window::ProcHandle = void*

Definition at line 39 of file window.hpp.

◆ WindowHandle

using brenta::Window::WindowHandle = void*

Definition at line 38 of file window.hpp.

Member Function Documentation

◆ close()

void Window::close ( )
static

Definition at line 172 of file window.cpp.

◆ get_driver()

tenno::shared_ptr< Window::Driver > Window::get_driver ( )
static

Definition at line 133 of file window.cpp.

◆ get_height()

int Window::get_height ( )
static

Definition at line 126 of file window.cpp.

◆ get_proc_address()

Window::ProcHandle Window::get_proc_address ( )
static

Definition at line 112 of file window.cpp.

◆ get_time()

Time Window::get_time ( )
static

Definition at line 98 of file window.cpp.

◆ get_width()

int Window::get_width ( )
static

Definition at line 119 of file window.cpp.

◆ get_window()

Window::WindowHandle Window::get_window ( )
static

Definition at line 105 of file window.cpp.

◆ initialize()

std::expected< void, Subsystem::Error > Window::initialize ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 31 of file window.cpp.

◆ instance()

Window & Window::instance ( )
static

Definition at line 78 of file window.cpp.

◆ is_initialized()

bool Window::is_initialized ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 69 of file window.cpp.

◆ is_key_pressed()

bool Window::is_key_pressed ( Key  key)
static

Definition at line 91 of file window.cpp.

◆ make_context_current()

void Window::make_context_current ( )
static

Definition at line 205 of file window.cpp.

◆ name()

std::string Window::name ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 64 of file window.cpp.

◆ poll_events()

void Window::poll_events ( )
static

Definition at line 186 of file window.cpp.

◆ set_dimensions()

void Window::set_dimensions ( int  width,
int  height 
)
static

Definition at line 144 of file window.cpp.

◆ set_key_callback()

void Window::set_key_callback ( Window::Callback  callback)
static

Definition at line 193 of file window.cpp.

◆ set_mouse_callback()

void Window::set_mouse_callback ( Window::Callback  callback)
static

Definition at line 151 of file window.cpp.

◆ set_mouse_capture()

void Window::set_mouse_capture ( bool  is_captured)
static

Definition at line 165 of file window.cpp.

◆ set_mouse_pos_callback()

void Window::set_mouse_pos_callback ( Window::Callback  callback)
static

Definition at line 199 of file window.cpp.

◆ set_size_callback()

void Window::set_size_callback ( Window::Callback  callback)
static

Definition at line 158 of file window.cpp.

◆ should_close()

bool Window::should_close ( )
static

Definition at line 84 of file window.cpp.

◆ swap_buffers()

void Window::swap_buffers ( )
static

Definition at line 179 of file window.cpp.

◆ terminate()

std::expected< void, Subsystem::Error > Window::terminate ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 52 of file window.cpp.

◆ update_dimensions()

void Window::update_dimensions ( )
static

Definition at line 138 of file window.cpp.

Field Documentation

◆ backend

tenno::shared_ptr< Window::Driver > Window::backend = nullptr
staticprotected

Definition at line 98 of file window.hpp.

◆ framebuffer

tenno::shared_ptr< FrameBuffer > Window::framebuffer = nullptr
static

Definition at line 42 of file window.hpp.

◆ init_config

Window::Config Window::init_config = {}
staticprotected

Definition at line 97 of file window.hpp.

◆ initialized

bool Window::initialized = false
staticprotected

Definition at line 96 of file window.hpp.

◆ subsystem_name

const std::string Window::subsystem_name = "window"
static

Definition at line 45 of file window.hpp.


The documentation for this class was generated from the following files: