Reviewed latest PR
This commit is contained in:
parent
91ea007478
commit
7132ba44db
2 changed files with 18 additions and 18 deletions
22
src/core.c
22
src/core.c
|
@ -739,6 +739,15 @@ bool IsWindowMinimized(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if window is currently hidden
|
||||||
|
bool IsWindowHidden(void)
|
||||||
|
{
|
||||||
|
#if defined(PLATFORM_DESKTOP)
|
||||||
|
return (glfwGetWindowAttrib(window, GLFW_VISIBLE) == GL_FALSE);
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
// Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
||||||
void ToggleFullscreen(void)
|
void ToggleFullscreen(void)
|
||||||
{
|
{
|
||||||
|
@ -827,7 +836,7 @@ void SetWindowSize(int width, int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the window
|
// Show the window
|
||||||
void ShowWindow()
|
void ShowWindow(void)
|
||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
glfwShowWindow(window);
|
glfwShowWindow(window);
|
||||||
|
@ -835,22 +844,13 @@ void ShowWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide the window
|
// Hide the window
|
||||||
void HideWindow()
|
void HideWindow(void)
|
||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
glfwHideWindow(window);
|
glfwHideWindow(window);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if window is currently hidden
|
|
||||||
bool IsWindowHidden()
|
|
||||||
{
|
|
||||||
#if defined(PLATFORM_DESKTOP)
|
|
||||||
return glfwGetWindowAttrib(window, GLFW_VISIBLE) == GL_FALSE;
|
|
||||||
#endif
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get current screen width
|
// Get current screen width
|
||||||
int GetScreenWidth(void)
|
int GetScreenWidth(void)
|
||||||
{
|
{
|
||||||
|
|
10
src/raylib.h
10
src/raylib.h
|
@ -834,23 +834,23 @@ extern "C" { // Prevents name mangling of functions
|
||||||
|
|
||||||
// Window-related functions
|
// Window-related functions
|
||||||
RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
|
RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
|
||||||
|
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
||||||
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
||||||
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||||
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
|
||||||
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus)
|
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus)
|
||||||
|
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden
|
||||||
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
||||||
|
RLAPI void ShowWindow(void); // Show the window
|
||||||
|
RLAPI void HideWindow(void); // Hide the window
|
||||||
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
|
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
|
||||||
RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
|
RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
|
||||||
RLAPI void SetWindowSize(int width, int height); // Set window dimensions
|
RLAPI void SetWindowSize(int width, int height); // Set window dimensions
|
||||||
RLAPI void ShowWindow(); // Show the window
|
RLAPI void *GetWindowHandle(void); // Get native window handle
|
||||||
RLAPI void HideWindow(); // Hide the window
|
|
||||||
RLAPI bool IsWindowHidden(); // Check if window is currently hidden
|
|
||||||
RLAPI int GetScreenWidth(void); // Get current screen width
|
RLAPI int GetScreenWidth(void); // Get current screen width
|
||||||
RLAPI int GetScreenHeight(void); // Get current screen height
|
RLAPI int GetScreenHeight(void); // Get current screen height
|
||||||
RLAPI void *GetWindowHandle(void); // Get native window handle
|
|
||||||
RLAPI int GetMonitorCount(void); // Get number of connected monitors
|
RLAPI int GetMonitorCount(void); // Get number of connected monitors
|
||||||
RLAPI int GetMonitorWidth(int monitor); // Get primary monitor width
|
RLAPI int GetMonitorWidth(int monitor); // Get primary monitor width
|
||||||
RLAPI int GetMonitorHeight(int monitor); // Get primary monitor height
|
RLAPI int GetMonitorHeight(int monitor); // Get primary monitor height
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue