-
Notifications
You must be signed in to change notification settings - Fork 13
Window functions
This category contains functions for handling the window. More...
| Type | Name |
|---|---|
| enum |
fplWindowState { fplWindowState_Unknown , fplWindowState_Normal , fplWindowState_Iconify , fplWindowState_Maximize , fplWindowState_Fullscreen } An enumeration containing the states of a window. More... |
| enum |
fplWindowVisibilityState { fplWindowVisibilityState_Unknown , fplWindowVisibilityState_Show , fplWindowVisibilityState_Hide } An enumeration containing the visibility state of a window. More... |
| Type | Name |
|---|---|
| fpl_platform_api bool |
fplDisableWindowFullscreen (void) Switches the window back to window mode. |
| fpl_platform_api bool |
fplEnableWindowFullscreen (void) Enables fullscreen mode on the nearest display. |
| fpl_platform_api bool |
fplGetWindowPosition (fplWindowPosition *outPos) Retrieves the absolute window position. |
| fpl_platform_api bool |
fplGetWindowSize (fplWindowSize *outSize) Retrieves the inner window size. |
| fpl_platform_api fplWindowState |
fplGetWindowState (void) Gets the current window state. |
| fpl_common_api size_t |
fplGetWindowTitle (char *outTitle, const size_t maxOutTitleLength) Retrieves the window title and writes it into the output string. |
| fpl_platform_api bool |
fplIsWindowDecorated (void) Gets the window decorated state as boolean. |
| fpl_platform_api bool |
fplIsWindowFloating (void) Gets the window floating state as boolean. |
| fpl_platform_api bool |
fplIsWindowFullscreen (void) Gets the window fullscreen state as boolean. |
| fpl_platform_api bool |
fplIsWindowResizable (void) Gets the window resizable state as boolean. |
| fpl_platform_api bool |
fplIsWindowRunning (void) Gets the window running state as a boolean. |
| fpl_platform_api bool |
fplQueryCursorPosition (int32_t *outX, int32_t *outY) Queries the cursor position in screen coordinates, relative to the root screen. |
| fpl_platform_api void |
fplSetWindowCursorEnabled (const bool value) Enables or disables the window cursor. |
| fpl_platform_api void |
fplSetWindowDecorated (const bool value) Enables or disables the window decoration (Titlebar, Border, etc.). |
| fpl_platform_api void |
fplSetWindowFloating (const bool value) Enables or disables the window floating (Top-most). |
| fpl_platform_api bool |
fplSetWindowFullscreenRect (const bool value, const int32_t x, const int32_t y, const int32_t width, const int32_t height) Enables or disables fullscreen mode based on the given rectangle. |
| fpl_platform_api bool |
fplSetWindowFullscreenSize (const bool value, const uint32_t fullscreenWidth, const uint32_t fullscreenHeight, const uint32_t refreshRate) Enables or disables fullscreen mode based on the given size and the current display. |
| fpl_common_api void |
fplSetWindowInputEvents (const bool enabled) Enables or disables the input events for the window entirely. |
| fpl_platform_api void |
fplSetWindowPosition (const int32_t left, const int32_t top) Changes the window absolute position to the given coordinates. |
| fpl_platform_api void |
fplSetWindowResizeable (const bool value) Enables or disables the ability to resize the window. |
| fpl_platform_api void |
fplSetWindowSize (const uint32_t width, const uint32_t height) Resizes the window to fit the inner size based on the given size. |
| fpl_platform_api bool |
fplSetWindowState (const fplWindowState newState) Changes the current window state. |
| fpl_platform_api void |
fplSetWindowTitle (const char *title) Changes the window title to the given string. |
| fpl_platform_api void |
fplWindowShutdown (void) Closes the window and stops the event loop. |
| fpl_platform_api bool |
fplWindowUpdate (void) Clears the internal event queue and updates input devices if needed. |
This category contains functions for handling the window.
enum fplWindowStateAn enumeration containing the states of a window.
Definition at line 9883 of file final_platform_layer.h.
enum fplWindowVisibilityStateAn enumeration containing the visibility state of a window.
| Name | Description |
|---|---|
| fplWindowVisibilityState_Unknown | Unknown state. |
| fplWindowVisibilityState_Show | Window is visible. |
| fplWindowVisibilityState_Hide | Window is hidden. |
Definition at line 9900 of file final_platform_layer.h.
fpl_platform_api bool fplDisableWindowFullscreen ( void )Switches the window back to window mode.
Returns: Returns true when the window was changed to window mode, false otherwise.
Attention: This will not alter the display resolution or the refresh rate.
fpl_platform_api bool fplEnableWindowFullscreen ( void )Enables fullscreen mode on the nearest display.
Returns: Returns true when the window was changed to fullscreen, false otherwise.
Attention: This will not alter the display resolution or the refresh rate.
fpl_platform_api bool fplGetWindowPosition ( fplWindowPosition * outPos)Retrieves the absolute window position.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [out] | outPos | Reference to the window position structure fplWindowPosition. |
Returns: Returns true when we got the position, false otherwise.
fpl_platform_api bool fplGetWindowSize ( fplWindowSize * outSize)Retrieves the inner window size.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [out] | outSize | Reference to the window size structure. |
Returns: Returns true when we got the inner size from the current window, false otherwise.
fpl_platform_api fplWindowState fplGetWindowState ( void )Gets the current window state.
Returns: Returns the current window state.
fpl_common_api size_t fplGetWindowTitle ( char * outTitle, const size_t maxOutTitleLength )Retrieves the window title and writes it into the output string.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [out] | outTitle | The output title string (may be null to query the required size only). |
| [in] | maxOutTitleLength | The maximum length of the output title. |
Returns: Returns the total number of characters required (excluding NUL). Returns 0 on hard error or when the buffer is too small.
fpl_platform_api bool fplIsWindowDecorated ( void )Gets the window decorated state as boolean.
Returns: Returns true when the window is decorated, false otherwise.
fpl_platform_api bool fplIsWindowFloating ( void )Gets the window floating state as boolean.
Returns: Returns true when the window is floating, false otherwise.
fpl_platform_api bool fplIsWindowFullscreen ( void )Gets the window fullscreen state as boolean.
Returns: Returns true when the window is in fullscreen mode, false otherwise.
fpl_platform_api bool fplIsWindowResizable ( void )Gets the window resizable state as boolean.
Returns: Returns true when the window is resizable, false otherwise.
fpl_platform_api bool fplIsWindowRunning ( void )Gets the window running state as a boolean.
Returns: Returns true when the window is running, false otherwise.
fpl_platform_api bool fplQueryCursorPosition ( int32_t * outX, int32_t * outY )Queries the cursor position in screen coordinates, relative to the root screen.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [out] | outX | Reference to the outgoing X position. |
| [out] | outY | Reference to the outgoing Y position. |
fpl_platform_api void fplSetWindowCursorEnabled ( const bool value)Enables or disables the window cursor.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | value | The new cursor visibility state. |
fpl_platform_api void fplSetWindowDecorated ( const bool value)Enables or disables the window decoration (Titlebar, Border, etc.).
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | value | The new decorated state. |
fpl_platform_api void fplSetWindowFloating ( const bool value)Enables or disables the window floating (Top-most).
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | value | The new floating state. |
fpl_platform_api bool fplSetWindowFullscreenRect ( const bool value, const int32_t x, const int32_t y, const int32_t width, const int32_t height )Enables or disables fullscreen mode based on the given rectangle.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | value | The new fullscreen state. |
| [in] | x | The left position in virtual screen coordinates. |
| [in] | y | The top position in virtual screen coordinates. |
| [in] | width | The width in virtual screen coordinates. |
| [in] | height | The height in virtual screen coordinates. |
Returns: Returns true when the window was changed to the rectangle, false otherwise.
Attention: This will not alter the display resolution or the refresh rate.
fpl_platform_api bool fplSetWindowFullscreenSize ( const bool value, const uint32_t fullscreenWidth, const uint32_t fullscreenHeight, const uint32_t refreshRate )Enables or disables fullscreen mode based on the given size and the current display.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | value | The new fullscreen state. |
| [in] | fullscreenWidth | The fullscreen width in screen units. When set to zero the current display position is used. |
| [in] | fullscreenHeight | The fullscreen height in screen units. When set to zero the current display position is used. |
| [in] | refreshRate | The refresh rate in Hz. When set to zero the current display setting is used. |
Returns: Returns true when the window was changed to the desired fullscreen mode, false otherwise.
Attention: This may alter the display resolution or the refresh rate.
fpl_common_api void fplSetWindowInputEvents ( const bool enabled)Enables or disables the input events for the window entirely.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | enabled | If set to true, the input events are processed; if false, no input events are handled. |
Note: The text input event is always handled, regardless of this setting.
fpl_platform_api void fplSetWindowPosition ( const int32_t left, const int32_t top )Changes the window absolute position to the given coordinates.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | left | The left position in screen units. |
| [in] | top | The top position in screen units. |
fpl_platform_api void fplSetWindowResizeable ( const bool value)Enables or disables the ability to resize the window.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | value | The new resizable state. |
fpl_platform_api void fplSetWindowSize ( const uint32_t width, const uint32_t height )Resizes the window to fit the inner size based on the given size.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | width | The width in screen units. |
| [in] | height | The height in screen units. |
fpl_platform_api bool fplSetWindowState ( const fplWindowState newState)Changes the current window state.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | newState | The new window state. |
Returns: Returns true when the window state was changed, false otherwise.
fpl_platform_api void fplSetWindowTitle ( const char * title)Changes the window title to the given string.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | title | The title string. |
fpl_platform_api bool fplWindowUpdate ( void )Clears the internal event queue and updates input devices if needed.
Returns: Returns true when the window is still active, false otherwise.
- Assertion & Debug
- Atomic operations
- Audio functions
- Clipboard functions
- Console functions
- Constants
- Display/Monitor functions
- Dynamic library loading
- Error Handling
- Files/IO functions
- Function macros
- Hardware Infos
- Input types and functions
- Localization functions
- Logging
- Memory Macros
- Memory functions
- Operating system Infos
- Path functions
- Platform functions
- Session Infos
- Settings & Configurations
- Storage class identifiers
- String functions
- Threading and synchronizations routines
- Timing functions
- Video functions
- Window events
- Window functions
- fplARMCPUCapabilities
- fplAudioChannelMap
- fplAudioDeviceID
- fplAudioDeviceInfo
- fplAudioFormat
- fplAudioSettings
- fplColor32
- fplConditionVariable
- fplConsoleSettings
- fplCPUCapabilities
- fplCPUIDLeaf
- fplDateTime
- fplDateTimeCreationResult
- fplDateTimeResult
- fplDisplayInfo
- fplDisplayMode
- fplDynamicLibraryHandle
- fplEndianess
- fplEvent
- fplFileEntry
- fplFileHandle
- fplFilePermissions
- fplFileTimeStamps
- fplGamepadButton
- fplGamepadData
- fplGamepadEvent
- fplGamepadInfo
- fplGamepadInputBinding
- fplGamepadMapping
- fplGamepadSettings
- fplGamepadState
- fplGamepadStates
- fplGraphicsApiSettings
- fplImageSource
- fplInputBackendMask
- fplInputBackendSupport
- fplInputDevice
- fplInputDeviceGuid
- fplInputSettings
- fplInternalConditionVariable
- fplInternalDynamicLibraryHandle
- fplInternalFileEntryHandle
- fplInternalFileHandle
- fplInternalFileRootInfo
- fplInternalMutexHandle
- fplInternalSemaphoreHandle
- fplInternalSignalHandle
- fplInternalThreadHandle
- fplKeyboardEvent
- fplKeyboardState
- fplLogSettings
- fplLogWriter
- fplLogWriterConsole
- fplLogWriterCustom
- fplMemoryAllocationSettings
- fplMemoryBlock
- fplMemoryInfos
- fplMemorySettings
- fplMouseEvent
- fplMouseState
- fplMutexHandle
- fplOpenGLSettings
- fplOSVersionInfos
- fplSemaphoreHandle
- fplSettings
- fplSignalHandle
- fplSpecificAudioSettings
- fplThreadHandle
- fplThreadParameters
- fplTimestamp
- fplVersionInfo
- fplVideoBackBuffer
- fplVideoRect
- fplVideoRequirements
- fplVideoRequirementsVulkan
- fplVideoSettings
- fplVideoSurface
- fplVideoSurfaceOpenGL
- fplVideoSurfaceVulkan
- fplVideoWindow
- fplVulkanSettings
- fplWindowCallbacks
- fplWindowDropFiles
- fplWindowEvent
- fplWindowPosition
- fplWindowSettings
- fplWindowSize
- fplX86CPUCapabilities