added App::focused and System::open_url apis

This commit is contained in:
Noel Berry
2022-01-25 22:50:20 -08:00
parent 4620b1bd70
commit ccd02fa9ef
5 changed files with 42 additions and 1 deletions

View File

@ -149,6 +149,9 @@ namespace Blah
// macOS is usually 2.0, other platforms vary.
float content_scale();
// If the window is currently focused or has mouse input
bool focused();
// Toggles fullscreen if supported on the platform.
// Otherwise this function does nothing.
void fullscreen(bool enabled);
@ -162,4 +165,10 @@ namespace Blah
// Reference to the window's back buffer
extern const TargetRef backbuffer;
}
namespace System
{
// Tries to open the given URL in a web browser
void open_url(const char* url);
}
}