diff --git a/include/blah/app.h b/include/blah/app.h index 1be0141..7eb1ede 100644 --- a/include/blah/app.h +++ b/include/blah/app.h @@ -1,5 +1,6 @@ #pragma once #include +#include namespace Blah { @@ -112,6 +113,24 @@ namespace Blah // Gets the user path const char* user_path(); + // Gets the Window Title + const char* get_title(); + + // Sets the Window Title + void set_title(const char* title); + + // Gets the Window Position + Point get_position(); + + // Sets the Window Position + void set_position(Point point); + + // Gets the Window Size + Point get_size(); + + // Sets the Window Size + void set_size(Point point); + // Gets the width of the window int width(); diff --git a/src/app.cpp b/src/app.cpp index c0f0013..f28be19 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -204,18 +204,48 @@ const char* App::user_path() return PlatformBackend::user_path(); } +const char* App::get_title() +{ + return PlatformBackend::get_title(); +} + +void App::set_title(const char* title) +{ + PlatformBackend::set_title(title); +} + +Point App::get_position() +{ + Point result; + PlatformBackend::get_position(&result.x, &result.y); + return result; +} + +void App::set_position(Point point) +{ + PlatformBackend::set_position(point.x, point.y); +} + +Point App::get_size() +{ + Point result; + PlatformBackend::get_size(&result.x, &result.y); + return result; +} + +void App::set_size(Point point) +{ + PlatformBackend::set_size(point.x, point.y); +} + int App::width() { - int w, h; - PlatformBackend::get_size(&w, &h); - return w; + return get_size().x; } int App::height() { - int w, h; - PlatformBackend::get_size(&w, &h); - return h; + return get_size().y; } int App::draw_width()