REDESIGNED: Window state config #1367 -WIP-
Some flags not working properly yet...
This commit is contained in:
parent
a560fe9a1e
commit
468a0bedd8
4 changed files with 426 additions and 170 deletions
57
src/raylib.h
57
src/raylib.h
|
@ -462,19 +462,24 @@ typedef struct VrDeviceInfo {
|
|||
//----------------------------------------------------------------------------------
|
||||
// Enumerators Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
// System config flags
|
||||
// NOTE: Used for bit masks
|
||||
// System/Window config flags
|
||||
// NOTE: Every bit registers one state (use it with bit masks)
|
||||
// By default all flags are set to 0
|
||||
typedef enum {
|
||||
FLAG_RESERVED = 1, // Reserved
|
||||
FLAG_FULLSCREEN_MODE = 2, // Set to run program in fullscreen
|
||||
FLAG_WINDOW_RESIZABLE = 4, // Set to allow resizable window
|
||||
FLAG_WINDOW_UNDECORATED = 8, // Set to disable window decoration (frame and buttons)
|
||||
FLAG_WINDOW_TRANSPARENT = 16, // Set to allow transparent window
|
||||
FLAG_WINDOW_HIDDEN = 128, // Set to create the window initially hidden
|
||||
FLAG_WINDOW_ALWAYS_RUN = 256, // Set to allow windows running while minimized
|
||||
FLAG_MSAA_4X_HINT = 32, // Set to try enabling MSAA 4X
|
||||
FLAG_VSYNC_HINT = 64, // Set to try enabling V-Sync on GPU
|
||||
FLAG_INTERLACED_HINT = 512 // Set to try V3D to choose an interlaced video format
|
||||
FLAG_FULLSCREEN_MODE = 0x00000002, // Set to run program in fullscreen
|
||||
FLAG_WINDOW_RESIZABLE = 0x00000004, // Set to allow resizable window
|
||||
FLAG_WINDOW_UNDECORATED = 0x00000008, // Set to disable window decoration (frame and buttons)
|
||||
FLAG_WINDOW_TRANSPARENT = 0x00000010, // Set to allow transparent framebuffer
|
||||
FLAG_WINDOW_HIDDEN = 0x00000080, // Set to hide window
|
||||
FLAG_WINDOW_MINIMIZED = 0x00000200, // Set to minimize window (iconify)
|
||||
FLAG_WINDOW_MAXIMIZED = 0x00000400, // Set to maximize window (expanded to monitor)
|
||||
FLAG_WINDOW_UNFOCUSED = 0x00000800, // Set to window non focused
|
||||
FLAG_WINDOW_TOPMOST = 0x00001000, // Set to window always on top
|
||||
FLAG_WINDOW_HIGHDPI = 0x00002000, // Set to support HighDPI
|
||||
FLAG_WINDOW_ALWAYS_RUN = 0x00000100, // Set to allow windows running while minimized
|
||||
FLAG_VSYNC_HINT = 0x00000040, // Set to try enabling V-Sync on GPU
|
||||
FLAG_MSAA_4X_HINT = 0x00000020, // Set to try enabling MSAA 4X
|
||||
FLAG_INTERLACED_HINT = 0x00010000 // Set to try enabling interlaced video format (for V3D)
|
||||
} ConfigFlag;
|
||||
|
||||
// Trace log type
|
||||
|
@ -887,20 +892,22 @@ RLAPI void InitWindow(int width, int height, const char *title); // Initialize
|
|||
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
||||
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
||||
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized
|
||||
RLAPI bool IsWindowMaximized(void); // Check if window has been maximized (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowFocused(void); // Check if window has been focused
|
||||
RLAPI bool IsWindowResized(void); // Check if window has been resized
|
||||
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden
|
||||
RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen
|
||||
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
||||
RLAPI void UnhideWindow(void); // Show the window
|
||||
RLAPI void HideWindow(void); // Hide the window
|
||||
RLAPI void DecorateWindow(void); // Decorate the window (only PLATFORM_DESKTOP)
|
||||
RLAPI void UndecorateWindow(void); // Undecorate the window (only PLATFORM_DESKTOP)
|
||||
RLAPI void MaximizeWindow(void); // Maximize the window, if resizable (only PLATFORM_DESKTOP)
|
||||
RLAPI void RestoreWindow(void); // Restore the window, if resizable (only PLATFORM_DESKTOP)
|
||||
|
||||
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowMinimized(void); // Check if window is currently minimized (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowMaximized(void); // Check if window is currently maximized (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowFocused(void); // Check if window is currently focused (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowResized(void); // Check if window has been resized last frame
|
||||
RLAPI bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
|
||||
RLAPI void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
|
||||
RLAPI void HideWindow(void); // Set window state: hidden (only PLATFORM_DESKTOP)
|
||||
RLAPI void UnhideWindow(void); // Set window state: visible (only PLATFORM_DESKTOP)
|
||||
RLAPI void DecorateWindow(void); // Set window state: decorated (only PLATFORM_DESKTOP)
|
||||
RLAPI void UndecorateWindow(void); // Set window state: undecorated (only PLATFORM_DESKTOP)
|
||||
RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
||||
RLAPI void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
|
||||
RLAPI void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
|
||||
RLAPI void SetWindowState(unsigned int flags); // Set window configuration state using flags
|
||||
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 SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue