- More Documentation
This commit is contained in:
@@ -37,7 +37,7 @@ path path::current() {
|
||||
#include <unistd.h>
|
||||
#include <linux/limits.h>
|
||||
|
||||
path path::current() {
|
||||
path path::get_current() {
|
||||
char cstr[PATH_MAX];
|
||||
if (getcwd(cstr, sizeof(cstr)) == nullptr) {
|
||||
return path("");
|
||||
@@ -45,11 +45,11 @@ path path::current() {
|
||||
return path(cstring(cstr, strlen(cstr)));
|
||||
}
|
||||
|
||||
path path::current(const path& path) {
|
||||
path path::set_current(const path& path) {
|
||||
if (chdir(path._str.cstr())) {
|
||||
return fennec::path("");
|
||||
}
|
||||
return current();
|
||||
return get_current();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -76,10 +76,10 @@ void* operator new[](fennec::size_t size, fennec::align_t align, const fennec::n
|
||||
#endif
|
||||
|
||||
// Allocation functions
|
||||
void* operator new (fennec::size_t size) { return ::malloc(size); }
|
||||
void* operator new[](fennec::size_t size) { return ::malloc(size); }
|
||||
void* operator new (fennec::size_t size, const fennec::nothrow_t&) { return ::malloc(size); }
|
||||
void* operator new[](fennec::size_t size, const fennec::nothrow_t&) { return ::malloc(size); }
|
||||
void* operator new (fennec::size_t size) { return ::calloc(size, 1); }
|
||||
void* operator new[](fennec::size_t size) { return ::calloc(size, 1); }
|
||||
void* operator new (fennec::size_t size, const fennec::nothrow_t&) { return ::calloc(size, 1); }
|
||||
void* operator new[](fennec::size_t size, const fennec::nothrow_t&) { return ::calloc(size, 1); }
|
||||
|
||||
// Deallocation Functions
|
||||
void operator delete (void* ptr, fennec::size_t) noexcept { ::free(ptr); }
|
||||
|
||||
@@ -245,7 +245,7 @@ bool wayland_window::set_flag(uint8_t flag, bool value) {
|
||||
}
|
||||
|
||||
|
||||
// Helpers =============================================================================================================
|
||||
// Private Helpers =====================================================================================================
|
||||
|
||||
void wayland_window::_update_size(const ivec2& size) {
|
||||
//bool size_changed = any(notEqual(size, state.rect.size));
|
||||
|
||||
@@ -107,8 +107,8 @@ eglcontext::eglcontext(display_server* display)
|
||||
version.major = _eglvmajor;
|
||||
version.minor = _eglvminor;
|
||||
version.patch = 0;
|
||||
version.str = format("{} v{}.{}", egl_translate_type(_eglctype), _eglvmajor, _eglvminor);
|
||||
logger::log(format("Created OpenGL Context: {}", version.str));
|
||||
version.meta = _eglctype;
|
||||
logger::log(format("Created OpenGL Context: {} v{}.{}", egl_translate_type(version.meta), version.major, version.minor));
|
||||
}
|
||||
|
||||
eglcontext::~eglcontext() {
|
||||
@@ -138,7 +138,7 @@ eglcontext::~eglcontext() {
|
||||
version.major = 0;
|
||||
version.minor = 0;
|
||||
version.patch = 0;
|
||||
version.str = "";
|
||||
version.meta = 0;
|
||||
}
|
||||
|
||||
bool eglcontext::is_valid() {
|
||||
|
||||
@@ -109,7 +109,7 @@ window_id window_manager::create_window(const window::config& config, window_id
|
||||
return id;
|
||||
}
|
||||
|
||||
void window_manager::begin(window_id window) {
|
||||
void window_manager::begin_frame(window_id window) {
|
||||
if (not _display) {
|
||||
return;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ void window_manager::begin(window_id window) {
|
||||
_windows[window]->begin_frame();
|
||||
}
|
||||
|
||||
void window_manager::end(window_id window) {
|
||||
void window_manager::end_frame(window_id window) {
|
||||
if (not _display) {
|
||||
return;
|
||||
}
|
||||
@@ -160,6 +160,10 @@ ivec2 window_manager::_get_position(window_id id) const {
|
||||
return _windows[id]->get_position();
|
||||
}
|
||||
|
||||
irect window_manager::_get_bounds(window_id id) const {
|
||||
return _windows[id]->get_bounds();
|
||||
}
|
||||
|
||||
bool window_manager::_check_state(window_id id, uint8_t state) const {
|
||||
switch (state) {
|
||||
case window::state_running: return _windows[id]->is_running();
|
||||
|
||||
Reference in New Issue
Block a user