1 #ifndef RAYLIB_CPP_WINDOW_HPP_ 2 #define RAYLIB_CPP_WINDOW_HPP_ 23 Window(
int width = 800,
int height = 450,
const std::string& title =
"raylib",
bool lateInit =
false) {
25 Init(width, height, title);
33 void Init(
int width,
int height,
const std::string& title) {
34 ::InitWindow(width, height, title.c_str());
41 return ::WindowShouldClose();
55 return ::IsWindowReady();
58 return ::IsWindowMinimized();
61 return ::IsWindowResized();
64 return ::IsWindowHidden();
68 return ::IsWindowFullscreen();
83 ::SetWindowIcon(image);
87 ::SetWindowTitle(title.c_str());
91 ::SetWindowPosition(x, y);
95 ::SetWindowMonitor(monitor);
99 ::SetWindowMinSize(width, height);
103 ::SetWindowSize(width, height);
107 return ::GetWindowHandle();
120 return ::GetScreenWidth();
124 return ::GetScreenHeight();
128 return ::GetWindowPosition();
152 return ::GetFrameTime();
Vector2 GetWindowPosition()
void Close()
Close window and unload OpenGL context.
Window & SetMonitor(int monitor)
Window & SetMinSize(int width, int height)
Window(int width=800, int height=450, const std::string &title="raylib", bool lateInit=false)
Initialize window and OpenGL context.
void Init(int width, int height, const std::string &title)
Window & SetPosition(int x, int y)
Window & ToggleFullscreen()
Window & SetTitle(const std::string &title)
std::string GetClipboardText()
Window & SetSize(int width, int height)
static bool IsReady()
Check if window has been initialized successfully.
Window and Graphics Device Functions.
Provides all the classes associated with raylib-cpp.
Window & SetClipboardText(const std::string &text)
std::string GetMonitorName(int monitor)
Window & SetTargetFPS(int fps)
Window & SetIcon(Image image)
bool ShouldClose()
Check if KEY_ESCAPE pressed or Close icon pressed.