Final Platform Layer  0.9.6-beta
Data Structures | Macros | Typedefs | Enumerations | Functions
final_platform_layer.h File Reference

Final Platform Layer (FPL) - A C99 Single-Header-File Platform Abstraction Library. More...

#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdarg.h>
#include <limits.h>
#include <assert.h>
#include <signal.h>
#include <malloc.h>

Go to the source code of this file.

Data Structures

struct  fplAudioDeviceFormat
 A structure containing audio device format runtime properties, such as type, samplerate, channels, etc. More...
 
union  fplAudioDeviceID
 A union containing a id of the underlying backend. More...
 
struct  fplAudioDeviceInfo
 A structure containing the name and the id of the audio device. More...
 
struct  fplAudioSettings
 A structure containing audio settings, such as format, device info, callbacks, backend, etc. More...
 
struct  fplAudioTargetFormat
 A structure containing audio target format configurations, such as type, sample rate, channels, etc. More...
 
struct  fplConditionVariable
 The condition variable structure. More...
 
struct  fplConsoleSettings
 A structure containing the title and options for the console. More...
 
struct  fplCPUCapabilities
 A structure that containing the processor capabilities, like MMX,SSE,AVX etc. More...
 
union  fplCPUIDLeaf
 A structure containing the 4-registers (EAX, EBX, ECX, EDX) for a CPU-Leaf. More...
 
struct  fplDisplayInfo
 A struct containing informations about a display. More...
 
struct  fplDisplayMode
 A structure containing one set of display mode settings, such as size, refresh rate, etc. More...
 
struct  fplDynamicLibraryHandle
 A structure containing the internal handle to a dynamic library. More...
 
struct  fplEvent
 A structure containing event data for all event types (Window, Keyboard, Mouse, etc.) More...
 
struct  fplFileEntry
 A structure containing the informations for a file or directory (name, type, attributes, etc.) More...
 
struct  fplFileHandle
 The filehandle structure. More...
 
union  fplFilePermissions
 A union containing the file permissions (UMask) More...
 
struct  fplFileTimeStamps
 A structure containing filestamps for creation/access/modify date. More...
 
struct  fplGamepadButton
 A structure containing properties for a gamepad button (IsDown, etc.) More...
 
struct  fplGamepadEvent
 A structure containing gamepad event data (Type, Device, State, etc.) More...
 
struct  fplGamepadState
 A structure containing the entire gamepad state. More...
 
struct  fplGamepadStates
 A struct containing the full state for all gamepad devices. More...
 
union  fplGraphicsApiSettings
 A union that contains graphics api settings. More...
 
struct  fplImageSource
 A structure containing data for working with a image source. More...
 
struct  fplInputSettings
 A structure containing input settings. More...
 
union  fplInternalConditionVariable
 A union containing the internal condition variable for any platform. More...
 
union  fplInternalDynamicLibraryHandle
 A union containing the library handle for any platform. More...
 
union  fplInternalFileEntryHandle
 A union containing the internal filehandle for any platform. More...
 
union  fplInternalFileHandle
 A union containing the internal filehandle for any platform. More...
 
struct  fplInternalFileRootInfo
 A structure containing the internal root file informations. More...
 
union  fplInternalMutexHandle
 A union containing the internal mutex handle for any platform. More...
 
union  fplInternalSemaphoreHandle
 A union containing the internal semaphore handle for any platform. More...
 
union  fplInternalSignalHandle
 A union containing the internal signal handle for any platform. More...
 
union  fplInternalThreadHandle
 A union containing the thread handle for any platform. More...
 
struct  fplKeyboardEvent
 A structure containing keyboard event data (Type, Keycode, Mapped key, etc.) More...
 
struct  fplKeyboardState
 A struct containing the full keyboard state. More...
 
struct  fplLogSettings
 A structure containing log settings. More...
 
struct  fplLogWriter
 A structure containing log writer settings. More...
 
struct  fplLogWriterConsole
 A structure containing console logging properties. More...
 
struct  fplLogWriterCustom
 A structure containing properties custom logging properties. More...
 
struct  fplMemoryAllocationSettings
 A structure for setting up memory allocation usage. More...
 
struct  fplMemoryBlock
 Defines a memory block. More...
 
struct  fplMemoryInfos
 A structure that contains informations about current memory usage. More...
 
struct  fplMemorySettings
 A structure for setting up memory settings for dynamic and temporary allocations. More...
 
struct  fplMouseEvent
 A structure containing mouse event data (Type, Button, Position, etc.) More...
 
struct  fplMouseState
 A struct containing the full mouse state. More...
 
struct  fplMutexHandle
 The mutex handle structure. More...
 
struct  fplOpenGLSettings
 A structure that contains OpenGL video settings. More...
 
struct  fplOSVersionInfos
 A structure that contains the version information for the operating system. More...
 
struct  fplSemaphoreHandle
 The semaphore handle structure. More...
 
struct  fplSettings
 A structure containing settings, such as window, video, etc. More...
 
struct  fplSignalHandle
 The signal handle structure. More...
 
union  fplSpecificAudioSettings
 A union containing backend specific audio settings. More...
 
struct  fplThreadHandle
 The thread handle structure. More...
 
struct  fplThreadParameters
 Contains creation parameters for fplThreadCreateWithParameters() More...
 
struct  fplVersionInfo
 A structure that contains version informations. More...
 
struct  fplVideoBackBuffer
 A structure containing video backbuffer properties. More...
 
struct  fplVideoRect
 A structure defining a video rectangles position and size. More...
 
union  fplVideoRequirements
 Stores the video requirements for the desired video backend. More...
 
struct  fplVideoRequirementsVulkan
 Stores the requirements for the Vulkan video backend. More...
 
struct  fplVideoSettings
 A structure that contains video settings such as backend, v-sync, API-settings, etc. More...
 
struct  fplVideoSurface
 Stores the surface properties for the active video backend. More...
 
struct  fplVideoSurfaceOpenGL
 Stores the surface properties for the OpenGL video backend. More...
 
struct  fplVideoSurfaceVulkan
 Stores the surface properties for the Vulkan video backend. More...
 
union  fplVideoWindow
 Stores the video window handles. More...
 
struct  fplVulkanSettings
 A structure that contains Vulkan video settings. More...
 
union  fplWallClock
 A structure storing the wallclock, used for time-measurements only. More...
 
struct  fplWindowCallbacks
 A structure containing the window callbacks. More...
 
struct  fplWindowDropFiles
 A structure containing number and dropped files informations. More...
 
struct  fplWindowEvent
 A structure containing window event data (Size, Position, etc.) More...
 
struct  fplWindowPosition
 A structure containing the position of a window. More...
 
struct  fplWindowSettings
 A structure containing window settings, such as size, title etc. More...
 
struct  fplWindowSize
 A structure containing the size of a window. More...
 

Macros

#define fpl_api
 Api call.
 
#define FPL_APPTYPE_WINDOW
 Detected window application type.
 
#define fpl_common_api
 Common api.
 
#define FPL_CPU_32BIT
 32-bit CPU detected
 
#define fpl_dllexport
 Link-library Export.
 
#define fpl_dllimport
 Link-library Import.
 
#define fpl_dlllocal
 Link-library Local.
 
#define FPL_ENUM_AS_FLAGS_OPERATORS(type)
 Macro for optionally adding enum operators for bitwise and/or/xor.
 
#define fpl_extern
 External call.
 
#define FPL_FILE_EXT_SEPARATOR
 File extension character.
 
#define fpl_force_inline
 Always inlines this function.
 
#define FPL_FUNCTION_NAME
 Function name macro.
 
#define fpl_globalvar
 Global persistent variable.
 
#define fpl_inline
 Inline function.
 
#define fpl_internal
 Private/Internal function.
 
#define fpl_internal_inline
 Internal inlined function.
 
#define FPL_IS_IDE
 Is any IDE active, such as Intellisense or any jetbrains IDE?
 
#define fpl_localvar
 Local persistent variable.
 
#define fpl_main
 Main entry point api definition.
 
#define FPL_MAX_BUFFER_LENGTH
 Maximum length of an internal buffer (in bytes)
 
#define FPL_MAX_FILENAME_LENGTH
 Maximum length of a filename.
 
#define FPL_MAX_GAMEPAD_STATE_COUNT
 Max number of gamepad states.
 
#define FPL_MAX_KEYBOARD_STATE_COUNT
 Max number of keyboard states.
 
#define FPL_MAX_NAME_LENGTH
 Maximum length of a name (in characters)
 
#define FPL_MAX_PATH_LENGTH
 Maximum length of a path.
 
#define fpl_no_inline
 Prevents inlining of this function.
 
#define FPL_NOT_IMPLEMENTED
 This will full-on crash when something is not implemented always.
 
#define fpl_null
 Null.
 
#define FPL_PATH_SEPARATOR
 Path separator character.
 
#define fpl_platform_api
 Platform api.
 
#define FPL_TIMEOUT_INFINITE
 Infinite timeout constant.
 
#define fplAlignAs(N)
 Structure alignment in bytes.
 
#define fplAlwaysAssert(exp)
 Always crashes the application with a null-pointer assignment, when the specified expression evaluates to false.
 
#define fplArrayCount(arr)
 Returns the element count from a static array. This should ideally produce a compile error when passing a pointer to it.
 
#define fplAsm
 A assembler compiler instruction (asm)
 
#define fplAssert(exp)
 Breaks with an runtime assertion, when the specified expression evaluates to false.
 
#define fplAssertPtr(ptr)
 Breaks when the specified pointer is fpl_null.
 
#define fplClearStruct(ptr)
 Clears the given struct pointer to zero.
 
#define fplCopyStruct(src, dst)
 Copies the given source struct into the destination struct.
 
#define fplDebugBreak()
 Stops the debugger on this line always.
 
#define fplGetAlignedSize(size, alignment)
 Returns the given size, extended to satisfy the given alignment boundary.
 
#define fplGetAlignmentOffset(value, alignment)
 Returns the offset for the value to satisfy the given alignment boundary.
 
#define fplGigaBytes(value)
 Returns the number of bytes for the given gigabytes.
 
#define fplHasInclude(inc)
 Test for include existence.
 
#define fplIsAligned(ptr, alignment)
 Returns true when the given pointer address is aligned to the given alignment.
 
#define fplIsBigEndian()
 Returns true when the given platform is big-endian.
 
#define fplIsBitSet(value, bit)
 Returns true when the given value has the given bit set.
 
#define fplIsLittleEndian()
 Returns true when the given platform is little-endian.
 
#define fplIsPowerOfTwo(value)
 Returns true when the given value is a power of two value.
 
#define fplKiloBytes(value)
 Returns the number of bytes for the given kilobytes.
 
#define fplMax(a, b)
 Returns the biggest value of A and B.
 
#define fplMegaBytes(value)
 Returns the number of bytes for the given megabytes.
 
#define fplMin(a, b)
 Returns the smallest value of A and B.
 
#define fplMinAlignment
 Minimum structure alignment.
 
#define fplOffsetOf(type, field)
 Returns the offset in bytes for the specified structure type and field name.
 
#define fplStackAllocate(size)
 Manually allocate the number of specified bytes of memory on the stack.
 
#define fplStaticAssert(exp)
 Breaks the compilation, when the specified expression evaluates to false.
 
#define fplStructInit
 Initializes a struct by the given type.
 
#define fplStructSet
 Sets a struct pointer to the given value.
 
#define fplTeraBytes(value)
 Returns the number of bytes for the given terabytes.
 
#define fplZeroInit
 Initializes a struct to zero.
 

Typedefs

typedef uint32_t() fpl_audio_client_read_callback(const fplAudioDeviceFormat *deviceFormat, const uint32_t frameCount, void *outputSamples, void *userData)
 A callback for reading audio samples from the client. More...
 
typedef int32_t fpl_b32
 32-bit boolean
 
typedef void() fpl_log_func_callback(const char *funcName, const int lineNumber, const fplLogLevel level, const char *message)
 A callback for printing a log message. More...
 
typedef void *() fpl_memory_allocate_callback(void *userData, const size_t size, const size_t alignment)
 Custom memory allocation callback.
 
typedef void() fpl_memory_release_callback(void *userData, void *ptr)
 Custom memory release callback.
 
typedef void() fpl_run_thread_callback(const fplThreadHandle *thread, void *data)
 A callback to execute user code inside another thread. More...
 
typedef bool() fpl_window_event_callback(const fplPlatformType platformType, void *windowState, void *rawEventData, void *userData)
 A callback executed for each raw window event. More...
 
typedef fpl_window_event_callback fpl_window_exposed_callback
 A callback executed when the window needs to be exposed/repainted. More...
 
typedef enum fplAudioBackendType fplAudioBackendType
 An enumeration of audio backend types.
 
typedef enum fplAudioDefaultFields fplAudioDefaultFields
 An enumeration of audio default fields.
 
typedef struct fplAudioDeviceFormat fplAudioDeviceFormat
 A structure containing audio device format runtime properties, such as type, samplerate, channels, etc.
 
typedef union fplAudioDeviceID fplAudioDeviceID
 A union containing a id of the underlying backend.
 
typedef struct fplAudioDeviceInfo fplAudioDeviceInfo
 A structure containing the name and the id of the audio device.
 
typedef enum fplAudioFormatType fplAudioFormatType
 An enumeration of audio format types.
 
typedef enum fplAudioLatencyMode fplAudioLatencyMode
 An enumeration of audio latency modes.
 
typedef enum fplAudioResultType fplAudioResultType
 An enumeration of audio results.
 
typedef struct fplAudioSettings fplAudioSettings
 A structure containing audio settings, such as format, device info, callbacks, backend, etc.
 
typedef struct fplAudioTargetFormat fplAudioTargetFormat
 A structure containing audio target format configurations, such as type, sample rate, channels, etc.
 
typedef enum fplButtonState fplButtonState
 An enumeration of button states.
 
typedef struct fplConditionVariable fplConditionVariable
 The condition variable structure.
 
typedef struct fplConsoleSettings fplConsoleSettings
 A structure containing the title and options for the console.
 
typedef enum fplCPUArchType fplCPUArchType
 An enumeration of architecture types.
 
typedef struct fplCPUCapabilities fplCPUCapabilities
 A structure that containing the processor capabilities, like MMX,SSE,AVX etc.
 
typedef union fplCPUIDLeaf fplCPUIDLeaf
 A structure containing the 4-registers (EAX, EBX, ECX, EDX) for a CPU-Leaf.
 
typedef struct fplDisplayInfo fplDisplayInfo
 A struct containing informations about a display.
 
typedef struct fplDisplayMode fplDisplayMode
 A structure containing one set of display mode settings, such as size, refresh rate, etc.
 
typedef struct fplDynamicLibraryHandle fplDynamicLibraryHandle
 A structure containing the internal handle to a dynamic library.
 
typedef struct fplEvent fplEvent
 A structure containing event data for all event types (Window, Keyboard, Mouse, etc.)
 
typedef enum fplEventType fplEventType
 An enumeration of event types (Window, Keyboard, Mouse, ...)
 
typedef enum fplFileAttributeFlags fplFileAttributeFlags
 An enumeratation of file attribute flags (Normal, Readonly, Hidden, etc.)
 
typedef struct fplFileEntry fplFileEntry
 A structure containing the informations for a file or directory (name, type, attributes, etc.)
 
typedef enum fplFileEntryType fplFileEntryType
 An enumeration of file entry types (File, Directory, etc.)
 
typedef struct fplFileHandle fplFileHandle
 The filehandle structure.
 
typedef enum fplFilePermissionFlags fplFilePermissionFlags
 An enumeration of file permission flags.
 
typedef enum fplFilePermissionMasks fplFilePermissionMasks
 An enumeration of file permission types.
 
typedef union fplFilePermissions fplFilePermissions
 A union containing the file permissions (UMask)
 
typedef enum fplFilePositionMode fplFilePositionMode
 An enumeration of file position modes (Beginning, Current, End)
 
typedef uint64_t fplFileTimeStamp
 The elapsed seconds since the UNIX epoch (1970-01-01 00:00:00)
 
typedef struct fplFileTimeStamps fplFileTimeStamps
 A structure containing filestamps for creation/access/modify date.
 
typedef struct fplGamepadButton fplGamepadButton
 A structure containing properties for a gamepad button (IsDown, etc.)
 
typedef enum fplGamepadButtonType fplGamepadButtonType
 An enumeration of gamepad buttons.
 
typedef struct fplGamepadEvent fplGamepadEvent
 A structure containing gamepad event data (Type, Device, State, etc.)
 
typedef enum fplGamepadEventType fplGamepadEventType
 An enumeration of gamepad event types (Connected, Disconnected, StateChanged, etc.)
 
typedef struct fplGamepadState fplGamepadState
 A structure containing the entire gamepad state.
 
typedef struct fplGamepadStates fplGamepadStates
 A struct containing the full state for all gamepad devices.
 
typedef union fplGraphicsApiSettings fplGraphicsApiSettings
 A union that contains graphics api settings.
 
typedef struct fplImageSource fplImageSource
 A structure containing data for working with a image source.
 
typedef enum fplImageType fplImageType
 An enumeration of image types.
 
typedef enum fplInitFlags fplInitFlags
 An enumeration of initialization flags.
 
typedef struct fplInputSettings fplInputSettings
 A structure containing input settings.
 
typedef union fplInternalConditionVariable fplInternalConditionVariable
 A union containing the internal condition variable for any platform.
 
typedef union fplInternalDynamicLibraryHandle fplInternalDynamicLibraryHandle
 A union containing the library handle for any platform.
 
typedef union fplInternalFileEntryHandle fplInternalFileEntryHandle
 A union containing the internal filehandle for any platform.
 
typedef union fplInternalFileHandle fplInternalFileHandle
 A union containing the internal filehandle for any platform.
 
typedef struct fplInternalFileRootInfo fplInternalFileRootInfo
 A structure containing the internal root file informations.
 
typedef union fplInternalMutexHandle fplInternalMutexHandle
 A union containing the internal mutex handle for any platform.
 
typedef union fplInternalSemaphoreHandle fplInternalSemaphoreHandle
 A union containing the internal semaphore handle for any platform.
 
typedef union fplInternalSignalHandle fplInternalSignalHandle
 A union containing the internal signal handle for any platform.
 
typedef union fplInternalThreadHandle fplInternalThreadHandle
 A union containing the thread handle for any platform.
 
typedef enum fplKey fplKey
 An enumeration of mapped keys (Based on MS Virtual-Key-Codes, mostly directly mapped from ASCII)
 
typedef struct fplKeyboardEvent fplKeyboardEvent
 A structure containing keyboard event data (Type, Keycode, Mapped key, etc.)
 
typedef enum fplKeyboardEventType fplKeyboardEventType
 An enumeration of keyboard event types.
 
typedef enum fplKeyboardModifierFlags fplKeyboardModifierFlags
 An enumeration of keyboard modifier flags.
 
typedef struct fplKeyboardState fplKeyboardState
 A struct containing the full keyboard state.
 
typedef enum fplLocaleFormat fplLocaleFormat
 A enumeration of locale formats.
 
typedef enum fplLogLevel fplLogLevel
 An enumeration of log levels.
 
typedef struct fplLogSettings fplLogSettings
 A structure containing log settings.
 
typedef struct fplLogWriter fplLogWriter
 A structure containing log writer settings.
 
typedef struct fplLogWriterConsole fplLogWriterConsole
 A structure containing console logging properties.
 
typedef struct fplLogWriterCustom fplLogWriterCustom
 A structure containing properties custom logging properties.
 
typedef enum fplLogWriterFlags fplLogWriterFlags
 An enumeration of log writer flags.
 
typedef enum fplMemoryAllocationMode fplMemoryAllocationMode
 A enumeration of dynamic memory allocation modes.
 
typedef struct fplMemoryAllocationSettings fplMemoryAllocationSettings
 A structure for setting up memory allocation usage.
 
typedef struct fplMemoryBlock fplMemoryBlock
 Defines a memory block.
 
typedef struct fplMemoryInfos fplMemoryInfos
 A structure that contains informations about current memory usage.
 
typedef struct fplMemorySettings fplMemorySettings
 A structure for setting up memory settings for dynamic and temporary allocations.
 
typedef enum fplMouseButtonType fplMouseButtonType
 An enumeration of mouse button types (Left, Right, ...)
 
typedef struct fplMouseEvent fplMouseEvent
 A structure containing mouse event data (Type, Button, Position, etc.)
 
typedef enum fplMouseEventType fplMouseEventType
 An enumeration of mouse event types (Move, ButtonDown, ...)
 
typedef struct fplMouseState fplMouseState
 A struct containing the full mouse state.
 
typedef struct fplMutexHandle fplMutexHandle
 The mutex handle structure.
 
typedef enum fplOpenGLCompabilityFlags fplOpenGLCompabilityFlags
 An enumeration of OpenGL compability flags.
 
typedef struct fplOpenGLSettings fplOpenGLSettings
 A structure that contains OpenGL video settings.
 
typedef struct fplOSVersionInfos fplOSVersionInfos
 A structure that contains the version information for the operating system.
 
typedef enum fplPlatformResultType fplPlatformResultType
 An enumeration of platform result types.
 
typedef enum fplPlatformType fplPlatformType
 An enumeration of platform types.
 
typedef struct fplSemaphoreHandle fplSemaphoreHandle
 The semaphore handle structure.
 
typedef struct fplSettings fplSettings
 A structure containing settings, such as window, video, etc.
 
typedef struct fplSignalHandle fplSignalHandle
 The signal handle structure.
 
typedef enum fplSignalValue fplSignalValue
 An enumeration of signal values.
 
typedef union fplSpecificAudioSettings fplSpecificAudioSettings
 A union containing backend specific audio settings.
 
typedef struct fplThreadHandle fplThreadHandle
 Forward declared thread handle. More...
 
typedef struct fplThreadParameters fplThreadParameters
 Contains creation parameters for fplThreadCreateWithParameters()
 
typedef enum fplThreadPriority fplThreadPriority
 Defines all possible thread priorities.
 
typedef uint32_t fplThreadState
 A type definition for mapping fplThreadState into a 32-bit integer.
 
typedef enum fplThreadStates fplThreadStates
 An enumeration of thread states.
 
typedef uint32_t fplTimeoutValue
 A type definition for a timeout value in milliseconds.
 
typedef struct fplVersionInfo fplVersionInfo
 A structure that contains version informations.
 
typedef char fplVersionNumberPart[4+1]
 A type definition for mapping a part of a version number.
 
typedef struct fplVideoBackBuffer fplVideoBackBuffer
 A structure containing video backbuffer properties.
 
typedef enum fplVideoBackendType fplVideoBackendType
 An enumeration of video backend types.
 
typedef struct fplVideoRect fplVideoRect
 A structure defining a video rectangles position and size.
 
typedef union fplVideoRequirements fplVideoRequirements
 Stores the video requirements for the desired video backend.
 
typedef struct fplVideoRequirementsVulkan fplVideoRequirementsVulkan
 Stores the requirements for the Vulkan video backend.
 
typedef struct fplVideoSettings fplVideoSettings
 A structure that contains video settings such as backend, v-sync, API-settings, etc.
 
typedef struct fplVideoSurface fplVideoSurface
 Stores the surface properties for the active video backend.
 
typedef struct fplVideoSurfaceOpenGL fplVideoSurfaceOpenGL
 Stores the surface properties for the OpenGL video backend.
 
typedef struct fplVideoSurfaceVulkan fplVideoSurfaceVulkan
 Stores the surface properties for the Vulkan video backend.
 
typedef union fplVideoWindow fplVideoWindow
 Stores the video window handles.
 
typedef struct fplVulkanSettings fplVulkanSettings
 A structure that contains Vulkan video settings.
 
typedef void() fplVulkanValidationLayerCallback(void *userData, const char *message, const uint32_t messageSeverity, const uint32_t messageType, const void *debugUtilsMessengerCallbackData)
 The debug callback called when the validation layer writes something.
 
typedef enum fplVulkanValidationLayerMode fplVulkanValidationLayerMode
 The validation layer modes for Vulkan.
 
typedef enum fplVulkanValidationSeverity fplVulkanValidationSeverity
 The validation layer logging severity for Vulkan.
 
typedef union fplWallClock fplWallClock
 A structure storing the wallclock, used for time-measurements only.
 
typedef struct fplWindowCallbacks fplWindowCallbacks
 A structure containing the window callbacks.
 
typedef struct fplWindowDropFiles fplWindowDropFiles
 A structure containing number and dropped files informations.
 
typedef struct fplWindowEvent fplWindowEvent
 A structure containing window event data (Size, Position, etc.)
 
typedef enum fplWindowEventType fplWindowEventType
 An enumeration of window event types (Resized, PositionChanged, etc.)
 
typedef struct fplWindowPosition fplWindowPosition
 A structure containing the position of a window.
 
typedef struct fplWindowSettings fplWindowSettings
 A structure containing window settings, such as size, title etc.
 
typedef struct fplWindowSize fplWindowSize
 A structure containing the size of a window.
 
typedef enum fplWindowState fplWindowState
 An enumeration containg the states of a window.
 
typedef enum fplWindowVisibilityState fplWindowVisibilityState
 An enumeration containing the visibility state of a window.
 

Enumerations

enum  fplAudioBackendType {
  fplAudioBackendType_None, fplAudioBackendType_Auto, fplAudioBackendType_DirectSound, fplAudioBackendType_Alsa,
  fplAudioBackendType_First, fplAudioBackendType_Last
}
 An enumeration of audio backend types. More...
 
enum  fplAudioDefaultFields {
  fplAudioDefaultFields_None, fplAudioDefaultFields_BufferSize, fplAudioDefaultFields_SampleRate, fplAudioDefaultFields_Channels,
  fplAudioDefaultFields_Periods, fplAudioDefaultFields_Type
}
 An enumeration of audio default fields. More...
 
enum  fplAudioFormatType {
  fplAudioFormatType_None, fplAudioFormatType_U8, fplAudioFormatType_S16, fplAudioFormatType_S24,
  fplAudioFormatType_S32, fplAudioFormatType_S64, fplAudioFormatType_F32, fplAudioFormatType_F64,
  fplAudioFormatType_First, fplAudioFormatType_Last
}
 An enumeration of audio format types. More...
 
enum  fplAudioLatencyMode { fplAudioLatencyMode_Conservative, fplAudioLatencyMode_Low }
 An enumeration of audio latency modes. More...
 
enum  fplAudioResultType {
  fplAudioResultType_None, fplAudioResultType_Success, fplAudioResultType_DeviceNotInitialized, fplAudioResultType_DeviceAlreadyStopped,
  fplAudioResultType_DeviceAlreadyStarted, fplAudioResultType_DeviceBusy, fplAudioResultType_NoDeviceFound, fplAudioResultType_ApiFailed,
  fplAudioResultType_PlatformNotInitialized, fplAudioResultType_BackendAlreadyInitialized, fplAudioResultType_UnsetAudioFormat, fplAudioResultType_UnsetAudioChannels,
  fplAudioResultType_UnsetAudioSampleRate, fplAudioResultType_UnsetAudioBufferSize, fplAudioResultType_Failed, fplAudioResultType_First,
  fplAudioResultType_Last
}
 An enumeration of audio results. More...
 
enum  fplButtonState { fplButtonState_Release, fplButtonState_Press, fplButtonState_Repeat }
 An enumeration of button states. More...
 
enum  fplCPUArchType {
  fplCPUArchType_Unknown, fplCPUArchType_x86, fplCPUArchType_x86_64, fplCPUArchType_x64,
  fplCPUArchType_Arm32, fplCPUArchType_Arm64, fplCPUArchType_First, fplCPUArchType_Last
}
 An enumeration of architecture types. More...
 
enum  fplEventType {
  fplEventType_None, fplEventType_Window, fplEventType_Keyboard, fplEventType_Mouse,
  fplEventType_Gamepad
}
 An enumeration of event types (Window, Keyboard, Mouse, ...) More...
 
enum  fplFileAttributeFlags {
  fplFileAttributeFlags_None, fplFileAttributeFlags_Normal, fplFileAttributeFlags_Hidden, fplFileAttributeFlags_System,
  fplFileAttributeFlags_Archive
}
 An enumeratation of file attribute flags (Normal, Readonly, Hidden, etc.) More...
 
enum  fplFileEntryType { fplFileEntryType_Unknown, fplFileEntryType_File, fplFileEntryType_Directory }
 An enumeration of file entry types (File, Directory, etc.) More...
 
enum  fplFilePermissionFlags { fplFilePermissionFlags_All, fplFilePermissionFlags_CanExecuteSearch, fplFilePermissionFlags_CanWrite, fplFilePermissionFlags_CanRead }
 An enumeration of file permission flags. More...
 
enum  fplFilePermissionMasks { fplFilePermissionMasks_None, fplFilePermissionMasks_User, fplFilePermissionMasks_Group, fplFilePermissionMasks_Owner }
 An enumeration of file permission types. More...
 
enum  fplFilePositionMode { fplFilePositionMode_Beginning, fplFilePositionMode_Current, fplFilePositionMode_End }
 An enumeration of file position modes (Beginning, Current, End) More...
 
enum  fplGamepadButtonType {
  fplGamepadButtonType_DPadUp, fplGamepadButtonType_DPadRight, fplGamepadButtonType_DPadDown, fplGamepadButtonType_DPadLeft,
  fplGamepadButtonType_ActionA, fplGamepadButtonType_ActionB, fplGamepadButtonType_ActionX, fplGamepadButtonType_ActionY,
  fplGamepadButtonType_Start, fplGamepadButtonType_Back, fplGamepadButtonType_LeftThumb, fplGamepadButtonType_RightThumb,
  fplGamepadButtonType_LeftShoulder, fplGamepadButtonType_RightShoulder
}
 An enumeration of gamepad buttons. More...
 
enum  fplGamepadEventType { fplGamepadEventType_None, fplGamepadEventType_Connected, fplGamepadEventType_Disconnected, fplGamepadEventType_StateChanged }
 An enumeration of gamepad event types (Connected, Disconnected, StateChanged, etc.) More...
 
enum  fplImageType { fplImageType_None, fplImageType_RGBA }
 An enumeration of image types. More...
 
enum  fplInitFlags {
  fplInitFlags_None, fplInitFlags_Console, fplInitFlags_Window, fplInitFlags_Video,
  fplInitFlags_Audio, fplInitFlags_GameController, fplInitFlags_All
}
 An enumeration of initialization flags. More...
 
enum  fplKey {
  fplKey_None, fplKey_Backspace, fplKey_Tab, fplKey_Clear,
  fplKey_Return, fplKey_Shift, fplKey_Control, fplKey_Alt,
  fplKey_Pause, fplKey_CapsLock, fplKey_Escape, fplKey_Space,
  fplKey_PageUp, fplKey_PageDown, fplKey_End, fplKey_Home,
  fplKey_Left, fplKey_Up, fplKey_Right, fplKey_Down,
  fplKey_Select, fplKey_Print, fplKey_Execute, fplKey_Snapshot,
  fplKey_Insert, fplKey_Delete, fplKey_Help, fplKey_0,
  fplKey_1, fplKey_2, fplKey_3, fplKey_4,
  fplKey_5, fplKey_6, fplKey_7, fplKey_8,
  fplKey_9, fplKey_A, fplKey_B, fplKey_C,
  fplKey_D, fplKey_E, fplKey_F, fplKey_G,
  fplKey_H, fplKey_I, fplKey_J, fplKey_K,
  fplKey_L, fplKey_M, fplKey_N, fplKey_O,
  fplKey_P, fplKey_Q, fplKey_R, fplKey_S,
  fplKey_T, fplKey_U, fplKey_V, fplKey_W,
  fplKey_X, fplKey_Y, fplKey_Z, fplKey_LeftSuper,
  fplKey_RightSuper, fplKey_Apps, fplKey_Sleep, fplKey_NumPad0,
  fplKey_NumPad1, fplKey_NumPad2, fplKey_NumPad3, fplKey_NumPad4,
  fplKey_NumPad5, fplKey_NumPad6, fplKey_NumPad7, fplKey_NumPad8,
  fplKey_NumPad9, fplKey_Multiply, fplKey_Add, fplKey_Separator,
  fplKey_Substract, fplKey_Decimal, fplKey_Divide, fplKey_F1,
  fplKey_F2, fplKey_F3, fplKey_F4, fplKey_F5,
  fplKey_F6, fplKey_F7, fplKey_F8, fplKey_F9,
  fplKey_F10, fplKey_F11, fplKey_F12, fplKey_F13,
  fplKey_F14, fplKey_F15, fplKey_F16, fplKey_F17,
  fplKey_F18, fplKey_F19, fplKey_F20, fplKey_F21,
  fplKey_F22, fplKey_F23, fplKey_F24, fplKey_NumLock,
  fplKey_Scroll, fplKey_LeftShift, fplKey_RightShift, fplKey_LeftControl,
  fplKey_RightControl, fplKey_LeftAlt, fplKey_RightAlt, fplKey_VolumeMute,
  fplKey_VolumeDown, fplKey_VolumeUp, fplKey_MediaNextTrack, fplKey_MediaPrevTrack,
  fplKey_MediaStop, fplKey_MediaPlayPause, fplKey_Oem1, fplKey_OemPlus,
  fplKey_OemComma, fplKey_OemMinus, fplKey_OemPeriod, fplKey_Oem2,
  fplKey_Oem3, fplKey_Oem4, fplKey_Oem5, fplKey_Oem6,
  fplKey_Oem7, fplKey_Oem8
}
 An enumeration of mapped keys (Based on MS Virtual-Key-Codes, mostly directly mapped from ASCII) More...
 
enum  fplKeyboardEventType { fplKeyboardEventType_None, fplKeyboardEventType_Button, fplKeyboardEventType_Input }
 An enumeration of keyboard event types. More...
 
enum  fplKeyboardModifierFlags {
  fplKeyboardModifierFlags_None, fplKeyboardModifierFlags_LAlt, fplKeyboardModifierFlags_RAlt, fplKeyboardModifierFlags_LCtrl,
  fplKeyboardModifierFlags_RCtrl, fplKeyboardModifierFlags_LShift, fplKeyboardModifierFlags_RShift, fplKeyboardModifierFlags_LSuper,
  fplKeyboardModifierFlags_RSuper, fplKeyboardModifierFlags_CapsLock, fplKeyboardModifierFlags_NumLock, fplKeyboardModifierFlags_ScrollLock
}
 An enumeration of keyboard modifier flags. More...
 
enum  fplLocaleFormat { fplLocaleFormat_None, fplLocaleFormat_ISO639 }
 A enumeration of locale formats. More...
 
enum  fplLogLevel {
  fplLogLevel_All, fplLogLevel_Critical, fplLogLevel_Error, fplLogLevel_Warning,
  fplLogLevel_Info, fplLogLevel_Verbose, fplLogLevel_Debug, fplLogLevel_Trace,
  fplLogLevel_First, fplLogLevel_Last
}
 An enumeration of log levels. More...
 
enum  fplLogWriterFlags {
  fplLogWriterFlags_None, fplLogWriterFlags_StandardConsole, fplLogWriterFlags_ErrorConsole, fplLogWriterFlags_DebugOut,
  fplLogWriterFlags_Custom
}
 An enumeration of log writer flags. More...
 
enum  fplMemoryAllocationMode { fplMemoryAllocationMode_Automatic, fplMemoryAllocationMode_Custom }
 A enumeration of dynamic memory allocation modes. More...
 
enum  fplMouseButtonType {
  fplMouseButtonType_None, fplMouseButtonType_Left, fplMouseButtonType_Right, fplMouseButtonType_Middle,
  fplMouseButtonType_MaxCount
}
 An enumeration of mouse button types (Left, Right, ...) More...
 
enum  fplMouseEventType { fplMouseEventType_None, fplMouseEventType_Move, fplMouseEventType_Button, fplMouseEventType_Wheel }
 An enumeration of mouse event types (Move, ButtonDown, ...) More...
 
enum  fplOpenGLCompabilityFlags { fplOpenGLCompabilityFlags_Legacy, fplOpenGLCompabilityFlags_Core, fplOpenGLCompabilityFlags_Compability, fplOpenGLCompabilityFlags_Forward }
 An enumeration of OpenGL compability flags. More...
 
enum  fplPlatformResultType {
  fplPlatformResultType_FailedWindow, fplPlatformResultType_FailedAudio, fplPlatformResultType_FailedVideo, fplPlatformResultType_FailedPlatform,
  fplPlatformResultType_FailedAllocatingMemory, fplPlatformResultType_AlreadyInitialized, fplPlatformResultType_NotInitialized, fplPlatformResultType_Success,
  fplPlatformResultType_First, fplPlatformResultType_Last
}
 An enumeration of platform result types. More...
 
enum  fplPlatformType {
  fplPlatformType_Unknown, fplPlatformType_Windows, fplPlatformType_Linux, fplPlatformType_Unix,
  fplPlatformType_First, fplPlatformType_Last
}
 An enumeration of platform types. More...
 
enum  fplSignalValue { fplSignalValue_Unset, fplSignalValue_Set }
 An enumeration of signal values. More...
 
enum  fplThreadPriority {
  fplThreadPriority_Unknown, fplThreadPriority_Idle, fplThreadPriority_Low, fplThreadPriority_Normal,
  fplThreadPriority_High, fplThreadPriority_RealTime, fplThreadPriority_Lowest, fplThreadPriority_Highest,
  fplThreadPriority_First, fplThreadPriority_Last
}
 Defines all possible thread priorities. More...
 
enum  fplThreadStates { fplThreadState_Stopped, fplThreadState_Starting, fplThreadState_Running, fplThreadState_Stopping }
 An enumeration of thread states. More...
 
enum  fplVideoBackendType {
  fplVideoBackendType_None, fplVideoBackendType_Software, fplVideoBackendType_OpenGL, fplVideoBackendType_Vulkan,
  fplVideoBackendType_First, fplVideoBackendType_Last
}
 An enumeration of video backend types. More...
 
enum  fplVulkanValidationLayerMode { fplVulkanValidationLayerMode_Disabled, fplVulkanValidationLayerMode_Logging, fplVulkanValidationLayerMode_User }
 The validation layer modes for Vulkan. More...
 
enum  fplVulkanValidationSeverity {
  fplVulkanValidationSeverity_Off, fplVulkanValidationSeverity_Error, fplVulkanValidationSeverity_Warning, fplVulkanValidationSeverity_Info,
  fplVulkanValidationSeverity_Verbose, fplVulkanValidationSeverity_All
}
 The validation layer logging severity for Vulkan. More...
 
enum  fplWindowEventType {
  fplWindowEventType_None, fplWindowEventType_Resized, fplWindowEventType_GotFocus, fplWindowEventType_LostFocus,
  fplWindowEventType_Minimized, fplWindowEventType_Maximized, fplWindowEventType_Restored, fplWindowEventType_DroppedFiles,
  fplWindowEventType_Exposed, fplWindowEventType_PositionChanged, fplWindowEventType_Closed, fplWindowEventType_Shown,
  fplWindowEventType_Hidden
}
 An enumeration of window event types (Resized, PositionChanged, etc.) More...
 
enum  fplWindowState {
  fplWindowState_Unknown, fplWindowState_Normal, fplWindowState_Iconify, fplWindowState_Maximize,
  fplWindowState_Fullscreen
}
 An enumeration containg the states of a window. More...
 
enum  fplWindowVisibilityState { fplWindowVisibilityState_Unknown, fplWindowVisibilityState_Show, fplWindowVisibilityState_Hide }
 An enumeration containing the visibility state of a window. More...
 

Functions

 FPL_ENUM_AS_FLAGS_OPERATORS (fplAudioDefaultFields)
 fplAudioDefaultFields operator overloads for C++
 
 FPL_ENUM_AS_FLAGS_OPERATORS (fplFileAttributeFlags)
 FileAttributeFlags operator overloads for C++.
 
 FPL_ENUM_AS_FLAGS_OPERATORS (fplFilePermissionFlags)
 fplFilePermissionFlags operator overloads for C++
 
 FPL_ENUM_AS_FLAGS_OPERATORS (fplFilePermissionMasks)
 fplFilePermissionMasks operator overloads for C++
 
 FPL_ENUM_AS_FLAGS_OPERATORS (fplInitFlags)
 InitFlags operator overloads for C++.
 
 FPL_ENUM_AS_FLAGS_OPERATORS (fplKeyboardModifierFlags)
 fplKeyboardModifierFlags operator overloads for C++
 
 FPL_ENUM_AS_FLAGS_OPERATORS (fplLogWriterFlags)
 Log writer flags enumeration operators.
 
fpl_common_api void * fplAtomicAddAndFetchPtr (volatile void **dest, const intptr_t addend)
 Adds the addend to destination pointer atomically and returns the result after the addition. More...
 
fpl_platform_api int32_t fplAtomicAddAndFetchS32 (volatile int32_t *dest, const int32_t addend)
 Adds the addend to destination 32-bit signed integer atomically and returns the result after the addition. More...
 
fpl_platform_api int64_t fplAtomicAddAndFetchS64 (volatile int64_t *dest, const int64_t addend)
 Adds the addend to destination 64-bit signed integer atomically and returns the result after the addition. More...
 
fpl_common_api size_t fplAtomicAddAndFetchSize (volatile size_t *dest, const size_t addend)
 Adds the addend to destination size atomically and returns the result after the addition. More...
 
fpl_platform_api uint32_t fplAtomicAddAndFetchU32 (volatile uint32_t *dest, const uint32_t addend)
 Adds the addend to destination 32-bit unsigned integer atomically and returns the result after the addition. More...
 
fpl_platform_api uint64_t fplAtomicAddAndFetchU64 (volatile uint64_t *dest, const uint64_t addend)
 Adds the addend to destination 64-bit unsigned integer atomically and returns the result after the addition. More...
 
fpl_common_api void * fplAtomicCompareAndSwapPtr (volatile void **dest, const void *comparand, const void *exchange)
 Compares a pointer with a comparand and swaps it when comparand matches the destination. More...
 
fpl_platform_api int32_t fplAtomicCompareAndSwapS32 (volatile int32_t *dest, const int32_t comparand, const int32_t exchange)
 Compares a 32-bit signed integer with a comparand and swaps it when comparand matches the destination. More...
 
fpl_platform_api int64_t fplAtomicCompareAndSwapS64 (volatile int64_t *dest, const int64_t comparand, const int64_t exchange)
 Compares a 64-bit signed integer with a comparand and swaps it when comparand matches the destination. More...
 
fpl_common_api size_t fplAtomicCompareAndSwapSize (volatile size_t *dest, const size_t comparand, const size_t exchange)
 Compares a size with a comparand and swaps it when comparand matches the destination. More...
 
fpl_platform_api uint32_t fplAtomicCompareAndSwapU32 (volatile uint32_t *dest, const uint32_t comparand, const uint32_t exchange)
 Compares a 32-bit unsigned integer with a comparand and swaps it when comparand matches the destination. More...
 
fpl_platform_api uint64_t fplAtomicCompareAndSwapU64 (volatile uint64_t *dest, const uint64_t comparand, const uint64_t exchange)
 Compares a 64-bit unsigned integer with a comparand and swaps it when comparand matches the destination. More...
 
fpl_common_api void * fplAtomicExchangePtr (volatile void **target, const void *value)
 Replaces a pointer with the given value atomically. More...
 
fpl_platform_api int32_t fplAtomicExchangeS32 (volatile int32_t *target, const int32_t value)
 Replaces a 32-bit signed integer with the given value atomically. More...
 
fpl_platform_api int64_t fplAtomicExchangeS64 (volatile int64_t *target, const int64_t value)
 Replaces a 64-bit signed integer with the given value atomically. More...
 
fpl_common_api size_t fplAtomicExchangeSize (volatile size_t *target, const size_t value)
 Replaces a size with the given value atomically. More...
 
fpl_platform_api uint32_t fplAtomicExchangeU32 (volatile uint32_t *target, const uint32_t value)
 Replaces a 32-bit unsigned integer with the given value atomically. More...
 
fpl_platform_api uint64_t fplAtomicExchangeU64 (volatile uint64_t *target, const uint64_t value)
 Replaces a 64-bit unsigned integer with the given value atomically. More...
 
fpl_common_api void * fplAtomicFetchAndAddPtr (volatile void **dest, const intptr_t addend)
 Adds a addend to the pointer atomically and returns the initial value before the add. More...
 
fpl_platform_api int32_t fplAtomicFetchAndAddS32 (volatile int32_t *value, const int32_t addend)
 Adds a 32-bit signed integer to the value by the given addend atomically. More...
 
fpl_platform_api int64_t fplAtomicFetchAndAddS64 (volatile int64_t *value, const int64_t addend)
 Adds a 64-bit signed integer to the value by the given addend atomically. More...
 
fpl_common_api size_t fplAtomicFetchAndAddSize (volatile size_t *dest, const size_t addend)
 Adds a size to the value by the given addend atomically. More...
 
fpl_platform_api uint32_t fplAtomicFetchAndAddU32 (volatile uint32_t *value, const uint32_t addend)
 Adds a 32-bit unsigned integer to the value by the given addend atomically. More...
 
fpl_platform_api uint64_t fplAtomicFetchAndAddU64 (volatile uint64_t *value, const uint64_t addend)
 Adds a 64-bit unsigned integer to the value by the given addend atomically. More...
 
fpl_common_api void * fplAtomicIncrementPtr (volatile void **dest)
 Increments/Advances the given pointer by one atomically. More...
 
fpl_platform_api int32_t fplAtomicIncrementS32 (volatile int32_t *dest)
 Increments the given 32-bit signed integer by one atomically. More...
 
fpl_platform_api int64_t fplAtomicIncrementS64 (volatile int64_t *dest)
 Increments the given 64-bit signed integer by one atomically. More...
 
fpl_common_api size_t fplAtomicIncrementSize (volatile size_t *dest)
 Increments the given size by one atomically. More...
 
fpl_platform_api uint32_t fplAtomicIncrementU32 (volatile uint32_t *dest)
 Increments the given 32-bit unsigned integer by one atomically. More...
 
fpl_platform_api uint64_t fplAtomicIncrementU64 (volatile uint64_t *dest)
 Increments the given 64-bit unsigned integer by one atomically. More...
 
fpl_common_api bool fplAtomicIsCompareAndSwapPtr (volatile void **dest, const void *comparand, const void *exchange)
 Compares a pointer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. More...
 
fpl_platform_api bool fplAtomicIsCompareAndSwapS32 (volatile int32_t *dest, const int32_t comparand, const int32_t exchange)
 Compares a 32-bit signed integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. More...
 
fpl_platform_api bool fplAtomicIsCompareAndSwapS64 (volatile int64_t *dest, const int64_t comparand, const int64_t exchange)
 Compares a 64-bit signed integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. More...
 
fpl_common_api bool fplAtomicIsCompareAndSwapSize (volatile size_t *dest, const size_t comparand, const size_t exchange)
 Compares a size with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. More...
 
fpl_platform_api bool fplAtomicIsCompareAndSwapU32 (volatile uint32_t *dest, const uint32_t comparand, const uint32_t exchange)
 Compares a 32-bit unsigned integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. More...
 
fpl_platform_api bool fplAtomicIsCompareAndSwapU64 (volatile uint64_t *dest, const uint64_t comparand, const uint64_t exchange)
 Compares a 64-bit unsigned integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. More...
 
fpl_common_api void * fplAtomicLoadPtr (volatile void **source)
 Loads the pointer value atomically and returns the value. More...
 
fpl_platform_api int32_t fplAtomicLoadS32 (volatile int32_t *source)
 Loads the 32-bit signed value atomically and returns the value. More...
 
fpl_platform_api int64_t fplAtomicLoadS64 (volatile int64_t *source)
 Loads the 64-bit signed value atomically and returns the value. More...
 
fpl_common_api size_t fplAtomicLoadSize (volatile size_t *source)
 Loads the size value atomically and returns the value. More...
 
fpl_platform_api uint32_t fplAtomicLoadU32 (volatile uint32_t *source)
 Loads the 32-bit unsigned value atomically and returns the value. More...
 
fpl_platform_api uint64_t fplAtomicLoadU64 (volatile uint64_t *source)
 Loads the 64-bit unsigned value atomically and returns the value. More...
 
fpl_platform_api void fplAtomicReadFence ()
 Inserts a memory read fence/barrier. More...
 
fpl_platform_api void fplAtomicReadWriteFence ()
 Inserts a memory read and write fence/barrier. More...
 
fpl_common_api void fplAtomicStorePtr (volatile void **dest, const void *value)
 Overwrites the pointer value atomically. More...
 
fpl_platform_api void fplAtomicStoreS32 (volatile int32_t *dest, const int32_t value)
 Overwrites the 32-bit signed value atomically. More...
 
fpl_platform_api void fplAtomicStoreS64 (volatile int64_t *dest, const int64_t value)
 Overwrites the 64-bit signed value atomically. More...
 
fpl_common_api void fplAtomicStoreSize (volatile size_t *dest, const size_t value)
 Overwrites the size value atomically. More...
 
fpl_platform_api void fplAtomicStoreU32 (volatile uint32_t *dest, const uint32_t value)
 Overwrites the 32-bit unsigned value atomically. More...
 
fpl_platform_api void fplAtomicStoreU64 (volatile uint64_t *dest, const uint64_t value)
 Overwrites the 64-bit unsigned value atomically. More...
 
fpl_platform_api void fplAtomicWriteFence ()
 Inserts a memory write fence/barrier. More...
 
fpl_common_api size_t fplChangeFileExtension (const char *filePath, const char *newFileExtension, char *destPath, const size_t maxDestLen)
 Changes the file extension on the given source path and writes the result into a destination buffer. More...
 
fpl_common_api void fplClearErrors ()
 Clears all the current errors in the platform. More...
 
fpl_platform_api void fplCloseFile (fplFileHandle *fileHandle)
 Closes the given file and releases the underlying resources and clears the handle to zero. More...
 
fpl_platform_api bool fplConditionBroadcast (fplConditionVariable *condition)
 Wakes up all threads that wait on the given condition. More...
 
fpl_platform_api void fplConditionDestroy (fplConditionVariable *condition)
 Releases the given condition and clears the structure to zero. More...
 
fpl_platform_api bool fplConditionInit (fplConditionVariable *condition)
 Initialize s the given condition. More...
 
fpl_platform_api bool fplConditionSignal (fplConditionVariable *condition)
 Wakes up one thread that waits on the given condition. More...
 
fpl_platform_api bool fplConditionWait (fplConditionVariable *condition, fplMutexHandle *mutex, const fplTimeoutValue timeout)
 Sleeps on the given condition and releases the mutex when done. More...
 
fpl_platform_api void fplConsoleError (const char *text)
 Writes the given text to the standard error console buffer. More...
 
fpl_common_api void fplConsoleFormatError (const char *format,...)
 Writes the given formatted text to the standard error console buffer. More...
 
fpl_common_api void fplConsoleFormatOut (const char *format,...)
 Writes the given formatted text to the standard output console buffer. More...
 
fpl_platform_api void fplConsoleOut (const char *text)
 Writes the given text to the standard output console buffer. More...
 
fpl_platform_api char fplConsoleWaitForCharInput ()
 Wait for a character to be typed in the console input and return it. More...
 
fpl_common_api void fplConvertAudioTargetFormatToDeviceFormat (const fplAudioTargetFormat *inFormat, fplAudioDeviceFormat *outFormat)
 Converts a fplAudioTargetFormat into a fplAudioDeviceFormat structure. More...
 
fpl_common_api char * fplCopyString (const char *source, char *dest, const size_t maxDestLen)
 Copies the given source string into a destination string. More...
 
fpl_common_api char * fplCopyStringLen (const char *source, const size_t sourceLen, char *dest, const size_t maxDestLen)
 Copies the given source string with a constrained length into a destination string. More...
 
fpl_platform_api fplCPUArchType fplCPUGetArchitecture ()
 Gets the processor architecture type. More...
 
const fpl_common_api char * fplCPUGetArchName (const fplCPUArchType type)
 Gets the string representation of the given architecture type. More...
 
fpl_common_api bool fplCPUGetCapabilities (fplCPUCapabilities *outCaps)
 Gets the capabilities of the processor. More...
 
fpl_platform_api size_t fplCPUGetCoreCount ()
 Retrieves the total number of processor cores. More...
 
fpl_common_api size_t fplCPUGetName (char *destBuffer, const size_t maxDestBufferLen)
 Retrieves the name of the processor. More...
 
fpl_common_api void fplCPUID (fplCPUIDLeaf *outLeaf, const uint32_t functionId)
 Queries the x86 CPUID leaf register (EAX, EBX, ECX, EDX) for the given function id. More...
 
fpl_common_api uint64_t fplCPURDTSC ()
 Reads the current time stamp counter (RDTSC) More...
 
fpl_common_api uint64_t fplCPUXCR0 ()
 Gets the x86 extended control register for index zero. More...
 
fpl_platform_api bool fplCreateBinaryFile (const char *filePath, fplFileHandle *outHandle)
 Create a binary file for writing to the given string path and returns the handle of it. More...
 
fpl_inline fplVideoRect fplCreateVideoRectFromLTRB (int32_t left, int32_t top, int32_t right, int32_t bottom)
 Makes a video rectangle from a LTRB rectangle. More...
 
fpl_common_api void fplDebugFormatOut (const char *format,...)
 Writes the given formatted text into the debugger output stream. More...
 
fpl_platform_api void fplDebugOut (const char *text)
 Writes the given text into the debugger output stream. More...
 
fpl_platform_api bool fplDirectoriesCreate (const char *path)
 Creates all the directories in the given path. More...
 
fpl_platform_api bool fplDirectoryExists (const char *path)
 Checks if the given directory exists and returns a boolean indicating its existence. More...
 
fpl_platform_api bool fplDirectoryRemove (const char *path)
 Deletes the given empty directory without confirmation and returns true when the deletion was successful. More...
 
fpl_platform_api bool fplDisableWindowFullscreen ()
 Switches the window back to window mode. More...
 
fpl_platform_api bool fplDynamicLibraryLoad (const char *libraryFilePath, fplDynamicLibraryHandle *outHandle)
 Loads a dynamic library and returns if the load was successful or not. More...
 
fpl_platform_api void fplDynamicLibraryUnload (fplDynamicLibraryHandle *handle)
 Unloads the loaded library and resets the handle to zero. More...
 
fpl_platform_api bool fplEnableWindowFullscreen ()
 Enables fullscreen mode on the nearest display. More...
 
fpl_common_api char * fplEnforcePathSeparator (char *path)
 Ensures that the given string always ends with a path separator. More...
 
fpl_common_api char * fplEnforcePathSeparatorLen (char *path, size_t maxPathLen)
 Ensures that the given string always ends with a path separator with length constrained. More...
 
const fpl_common_api char * fplExtractFileExtension (const char *sourcePath)
 Extracts the file extension from the given source path. More...
 
const fpl_common_api char * fplExtractFileName (const char *sourcePath)
 Extracts the file name including the file extension from the given source path. More...
 
fpl_common_api size_t fplExtractFilePath (const char *sourcePath, char *destPath, const size_t maxDestLen)
 Extracts the directory path from the given file path. More...
 
fpl_platform_api bool fplFileCopy (const char *sourceFilePath, const char *targetFilePath, const bool overwrite)
 Copies the given source file to the target path and returns true when the copy was successful. More...
 
fpl_platform_api bool fplFileDelete (const char *filePath)
 Deletes the given file without confirmation and returns true when the deletion was successful. More...
 
fpl_platform_api bool fplFileExists (const char *filePath)
 Checks if the file exists and returns a boolean indicating the existence. More...
 
fpl_platform_api bool fplFileMove (const char *sourceFilePath, const char *targetFilePath)
 Movies the given source file to the target file and returns true when the move was successful. More...
 
fpl_platform_api bool fplFlushFile (fplFileHandle *fileHandle)
 Flushes the buffers of the given file and causes all buffered data to be written to a file. More...
 
fpl_common_api size_t fplFormatString (char *destBuffer, const size_t maxDestBufferLen, const char *format,...)
 Fills out the given destination string buffer with a formatted string, using the format specifier and variable arguments. More...
 
fpl_common_api size_t fplFormatStringArgs (char *destBuffer, const size_t maxDestBufferLen, const char *format, va_list argList)
 Fills out the given destination string buffer with a formatted string, using the format specifier and the arguments list. More...
 
const fpl_common_api char * fplGetAudioBackendName (fplAudioBackendType backendType)
 Gets the string that represents the given audio backend type. More...
 
fpl_common_api fplAudioBackendType fplGetAudioBackendType ()
 Gets the current audio backend type. More...
 
fpl_common_api uint32_t fplGetAudioBufferSizeInBytes (const fplAudioFormatType format, const uint32_t channelCount, const uint32_t frameCount)
 Computes the total number of bytes for the buffer and the given parameters. More...
 
fpl_common_api uint32_t fplGetAudioBufferSizeInFrames (uint32_t sampleRate, uint32_t bufferSizeInMilliSeconds)
 Computes the total number of frames for given sample rate and buffer size. More...
 
fpl_common_api uint32_t fplGetAudioBufferSizeInMilliseconds (uint32_t sampleRate, uint32_t frameCount)
 Computes the duration in milliseconds for the given sample rate and frame count. More...
 
fpl_common_api uint32_t fplGetAudioDevices (fplAudioDeviceInfo *devices, uint32_t maxDeviceCount)
 Retrieves all playback audio devices. More...
 
const fpl_common_api char * fplGetAudioFormatName (const fplAudioFormatType format)
 Gets the string that represents the given audio format type. More...
 
fpl_common_api uint32_t fplGetAudioFrameSizeInBytes (const fplAudioFormatType format, const uint32_t channelCount)
 Computes the number of bytes required for one interleaved audio frame - containing all the channels. More...
 
fpl_common_api bool fplGetAudioHardwareFormat (fplAudioDeviceFormat *outFormat)
 Retrieves the native format for the current audio device. More...
 
fpl_common_api uint32_t fplGetAudioSampleSizeInBytes (const fplAudioFormatType format)
 Computes the number of bytes required to write one sample with one channel. More...
 
fpl_platform_api bool fplGetClipboardText (char *dest, const uint32_t maxDestLen)
 Retrieves the current clipboard text. More...
 
const fpl_common_api fplSettingsfplGetCurrentSettings ()
 Gets the current settings. More...
 
fpl_platform_api uint32_t fplGetCurrentThreadId ()
 Gets the thread id for the current thread. More...
 
fpl_platform_api size_t fplGetDisplayCount ()
 Gets the number of active displays. More...
 
fpl_platform_api bool fplGetDisplayFromPosition (const int32_t x, const int32_t y, fplDisplayInfo *outInfo)
 Finds the display from a cursor position and retrieves the information for it. More...
 
fpl_platform_api size_t fplGetDisplayModes (const char *id, fplDisplayMode *outModes, const size_t maxDisplayModeCount)
 Gets the information about the available display modes for the given display id. More...
 
fpl_platform_api size_t fplGetDisplays (fplDisplayInfo *outDisplays, const size_t maxDisplayCount)
 Gets informations about all active displays. More...
 
fpl_platform_api void * fplGetDynamicLibraryProc (const fplDynamicLibraryHandle *handle, const char *name)
 Returns the dynamic library procedure address for the given procedure name. More...
 
const fpl_common_api char * fplGetErrorByIndex (const size_t index)
 Gets the last error string from the given index. More...
 
fpl_common_api size_t fplGetErrorCount ()
 Gets the count of total last errors. More...
 
fpl_platform_api size_t fplGetExecutableFilePath (char *destPath, const size_t maxDestLen)
 Gets the full path to this executable, including the executable file name. More...
 
fpl_common_api size_t fplGetFilePosition (const fplFileHandle *fileHandle)
 Gets the current file position in bytes. More...
 
fpl_platform_api uint32_t fplGetFilePosition32 (const fplFileHandle *fileHandle)
 Gets the current file position in bytes. More...
 
fpl_platform_api uint64_t fplGetFilePosition64 (const fplFileHandle *fileHandle)
 Gets the current file position in bytes. More...
 
fpl_common_api size_t fplGetFileSizeFromHandle (const fplFileHandle *fileHandle)
 Gets the file size in bytes for an opened file. More...
 
fpl_platform_api uint32_t fplGetFileSizeFromHandle32 (const fplFileHandle *fileHandle)
 Gets the file size in bytes for an opened file. More...
 
fpl_platform_api uint64_t fplGetFileSizeFromHandle64 (const fplFileHandle *fileHandle)
 Gets the file size in bytes for an opened file. More...
 
fpl_platform_api size_t fplGetFileSizeFromPath (const char *filePath)
 Gets the file size in bytes for the given file. More...
 
fpl_platform_api uint32_t fplGetFileSizeFromPath32 (const char *filePath)
 Gets the file size in bytes for the given file. More...
 
fpl_platform_api uint64_t fplGetFileSizeFromPath64 (const char *filePath)
 Gets the file size in bytes for the given file. More...
 
fpl_platform_api bool fplGetFileTimestampsFromHandle (const fplFileHandle *fileHandle, fplFileTimeStamps *outStamps)
 Gets the timestamps for an opened file. More...
 
fpl_platform_api bool fplGetFileTimestampsFromPath (const char *filePath, fplFileTimeStamps *outStamps)
 Gets the timestamps for the given file. More...
 
fpl_platform_api size_t fplGetHomePath (char *destPath, const size_t maxDestLen)
 Gets the full path to your home directory. More...
 
fpl_platform_api size_t fplGetInputLocale (const fplLocaleFormat targetFormat, char *buffer, const size_t maxBufferLen)
 Gets the input locale in the given target format. More...
 
const fpl_common_api char * fplGetLastError ()
 Gets the last internal error string. More...
 
const fpl_common_api fplLogSettingsfplGetLogSettings ()
 Gets the current log settings. More...
 
const fpl_common_api fplThreadHandlefplGetMainThread ()
 Gets the thread handle for the main thread. More...
 
fpl_common_api fplLogLevel fplGetMaxLogLevel ()
 Gets the current maximum allowed log level. More...
 
const fpl_common_api char * fplGetPlatformName (const fplPlatformType type)
 Gets the string representation of the given platform type. More...
 
fpl_common_api fplPlatformResultType fplGetPlatformResult ()
 Gets the result type of the platform initialization. More...
 
const fpl_common_api char * fplGetPlatformResultName (const fplPlatformResultType type)
 Gets the string representation of a platform result type. More...
 
fpl_common_api fplPlatformType fplGetPlatformType ()
 Gets the type of the platform. More...
 
fpl_platform_api bool fplGetPrimaryDisplay (fplDisplayInfo *outInfo)
 Gets information about the primary display. More...
 
fpl_common_api size_t fplGetStringLength (const char *str)
 Counts the number of characters without including the zero terminator. More...
 
fpl_platform_api size_t fplGetSystemLocale (const fplLocaleFormat targetFormat, char *buffer, const size_t maxBufferLen)
 Gets the system locale in the given target format. More...
 
fpl_platform_api fplThreadPriority fplGetThreadPriority (fplThreadHandle *thread)
 Retrieves the current thread priority from the OS from the given fplThreadHandle . More...
 
fpl_common_api fplThreadState fplGetThreadState (fplThreadHandle *thread)
 Gets the current thread state for the given thread. More...
 
fpl_platform_api uint64_t fplGetTimeInMilliseconds ()
 Gets the current system clock in milliseconds in default precision. More...
 
fpl_platform_api double fplGetTimeInMillisecondsHP ()
 Gets the current system clock in milliseconds in high precision (micro/nanoseconds) More...
 
fpl_platform_api uint64_t fplGetTimeInMillisecondsLP ()
 Gets the current system clock in milliseconds in low precision (milliseconds) More...
 
fpl_platform_api double fplGetTimeInSeconds ()
 Gets the current system clock in seconds in default precision. More...
 
fpl_platform_api double fplGetTimeInSecondsHP ()
 Gets the current system clock in seconds in high precision (micro/nanoseconds). More...
 
fpl_platform_api uint64_t fplGetTimeInSecondsLP ()
 Gets the current system clock in seconds in low precision (seconds). More...
 
fpl_platform_api size_t fplGetUserLocale (const fplLocaleFormat targetFormat, char *buffer, const size_t maxBufferLen)
 Gets the user locale in the given target format. More...
 
fpl_common_api fplVideoBackBufferfplGetVideoBackBuffer ()
 Retrieves the pointer to the current video backbuffer. More...
 
const fpl_common_api char * fplGetVideoBackendName (fplVideoBackendType backendType)
 Gets a string that represents the given video backend. More...
 
fpl_common_api fplVideoBackendType fplGetVideoBackendType ()
 Gets the current video backend. More...
 
const fpl_common_api void * fplGetVideoProcedure (const char *procName)
 Gets the procedure by the specified name from the active video backend. More...
 
fpl_common_api bool fplGetVideoRequirements (const fplVideoBackendType backendType, fplVideoRequirements *requirements)
 Gets the video requirements for the specified video backend. More...
 
const fpl_common_api fplVideoSurfacefplGetVideoSurface ()
 Gets the current fplVideoSurface that stores all handles used for the active video backend. More...
 
fpl_platform_api fplWallClock fplGetWallClock ()
 Gets the current wall clock in high precision (micro/nanoseconds) used for time-measurements only. More...
 
fpl_platform_api double fplGetWallDelta (const fplWallClock start, const fplWallClock finish)
 Gets the delta value from two fplWallClock values as seconds. More...
 
fpl_platform_api bool fplGetWindowDisplay (fplDisplayInfo *outInfo)
 Gets information about the display for the FPL window. More...
 
fpl_platform_api bool fplGetWindowPosition (fplWindowPosition *outPos)
 Retrieves the absolute window position. More...
 
fpl_platform_api bool fplGetWindowSize (fplWindowSize *outSize)
 Retrieves the inner window size. More...
 
fpl_platform_api fplWindowState fplGetWindowState ()
 Gets the current window state. More...
 
fpl_common_api char * fplGetWindowTitle (char *outTitle, const size_t maxOutTitleLength)
 Retrieves the window title and writes it into the output string. More...
 
fpl_common_api bool fplIsPlatformInitialized ()
 Returns true when the platform is initialized, or false if not.
 
fpl_common_api bool fplIsStringEqual (const char *a, const char *b)
 Compares two strings and returns a boolean indicating the equality. More...
 
fpl_common_api bool fplIsStringEqualLen (const char *a, const size_t aLen, const char *b, const size_t bLen)
 Compares two strings with constrained lengths and returns a boolean indicating the equality. More...
 
fpl_common_api bool fplIsStringMatchWildcard (const char *source, const char *wildcard)
 Matches the given string by the given wildcard and returns a boolean indicating the match. More...
 
fpl_platform_api bool fplIsWindowDecorated ()
 Gets the window decorated state as boolean. More...
 
fpl_platform_api bool fplIsWindowFloating ()
 Gets the window floating state as boolean. More...
 
fpl_platform_api bool fplIsWindowFullscreen ()
 Gets the window fullscreen state as boolean. More...
 
fpl_platform_api bool fplIsWindowResizable ()
 Gets the window resizable state as boolean. More...
 
fpl_platform_api bool fplIsWindowRunning ()
 Gets the window running state as a boolean. More...
 
fpl_platform_api bool fplListDirBegin (const char *path, const char *filter, fplFileEntry *entry)
 Iterates through files/directories in the given directory. More...
 
fpl_platform_api void fplListDirEnd (fplFileEntry *entry)
 Releases opened resources from iterating through files/directories. More...
 
fpl_platform_api bool fplListDirNext (fplFileEntry *entry)
 Gets the next file entry from iterating through files/directories. More...
 
fpl_common_api fplSettings fplMakeDefaultSettings ()
 Creates a full settings structure containing default values. More...
 
fpl_common_api void * fplMemoryAlignedAllocate (const size_t size, const size_t alignment)
 Allocates aligned memory from the operating system by the given alignment. More...
 
fpl_common_api void fplMemoryAlignedFree (void *ptr)
 Releases the aligned memory allocated from the operating system. More...
 
fpl_platform_api void * fplMemoryAllocate (const size_t size)
 Allocates memory from the operating system by the given size. More...
 
fpl_common_api void fplMemoryClear (void *mem, const size_t size)
 Clears the given memory by the given size to zero. More...
 
fpl_common_api void fplMemoryCopy (const void *sourceMem, const size_t sourceSize, void *targetMem)
 Copies the given source memory with its length to the target memory. More...
 
fpl_platform_api void fplMemoryFree (void *ptr)
 Releases the memory allocated from the operating system. More...
 
fpl_platform_api bool fplMemoryGetInfos (fplMemoryInfos *outInfos)
 Retrieves the current system memory usage. More...
 
fpl_common_api void fplMemorySet (void *mem, const uint8_t value, const size_t size)
 Sets the given memory by the given size to the given value. More...
 
fpl_platform_api void fplMutexDestroy (fplMutexHandle *mutex)
 Releases the given mutex and clears the structure to zero. More...
 
fpl_platform_api bool fplMutexInit (fplMutexHandle *mutex)
 Initializes the given mutex. More...
 
fpl_platform_api bool fplMutexLock (fplMutexHandle *mutex)
 Locks the given mutex and blocks any other threads. More...
 
fpl_platform_api bool fplMutexTryLock (fplMutexHandle *mutex)
 Tries to lock the given mutex without blocking other threads. More...
 
fpl_platform_api bool fplMutexUnlock (fplMutexHandle *mutex)
 Unlocks the given mutex. More...
 
fpl_platform_api bool fplOpenBinaryFile (const char *filePath, fplFileHandle *outHandle)
 Opens a binary file for reading from a string path and returns the handle of it. More...
 
fpl_platform_api bool fplOSGetVersionInfos (fplOSVersionInfos *outInfos)
 Gets version informations from the operating system. More...
 
fpl_common_api size_t fplPathCombine (char *destPath, const size_t maxDestPathLen, const size_t pathCount,...)
 Combines all given paths by the platforms path separator for a fixed number of arguments. More...
 
fpl_common_api bool fplPlatformInit (const fplInitFlags initFlags, const fplSettings *initSettings)
 Initializes the platform layer. More...
 
fpl_common_api void fplPlatformRelease ()
 Releases the resources allocated by the platform layer. More...
 
fpl_common_api fplAudioResultType fplPlayAudio ()
 Start playing asynchronous audio. More...
 
fpl_platform_api bool fplPollEvent (fplEvent *ev)
 Polls the next event from the internal event queue or from the OS, handles them, and removes it from the queue. More...
 
fpl_platform_api void fplPollEvents ()
 Polls all the events from the OS and clears the internal event queue. More...
 
fpl_platform_api bool fplPollGamepadStates (fplGamepadStates *outStates)
 Polls the current gamepad states and writes it out into the output structure. More...
 
fpl_platform_api bool fplPollKeyboardState (fplKeyboardState *outState)
 Polls the current keyboard state and writes it out into the output structure. More...
 
fpl_platform_api bool fplPollMouseState (fplMouseState *outState)
 Polls the current mouse state and writes it out into the output structure. More...
 
fpl_platform_api bool fplQueryCursorPosition (int32_t *outX, int32_t *outY)
 Queries the cursor position in screen coordinates, relative to the root screen. More...
 
fpl_platform_api size_t fplReadFileBlock (const fplFileHandle *fileHandle, const size_t sizeToRead, void *targetBuffer, const size_t maxTargetBufferSize)
 Reads a block from the given file and returns the number of bytes read. More...
 
fpl_platform_api uint32_t fplReadFileBlock32 (const fplFileHandle *fileHandle, const uint32_t sizeToRead, void *targetBuffer, const uint32_t maxTargetBufferSize)
 Reads a block from the given file and returns the number of bytes read. More...
 
fpl_platform_api uint64_t fplReadFileBlock64 (const fplFileHandle *fileHandle, const uint64_t sizeToRead, void *targetBuffer, const uint64_t maxTargetBufferSize)
 Reads a block from the given file and returns the number of bytes read. More...
 
fpl_common_api bool fplResizeVideoBackBuffer (const uint32_t width, const uint32_t height)
 Resizes the current video backbuffer. More...
 
fpl_common_api size_t fplS32ToString (const int32_t value, char *buffer, const size_t maxBufferLen)
 Converts the given 32-bit integer value into a string. More...
 
fpl_platform_api void fplSemaphoreDestroy (fplSemaphoreHandle *semaphore)
 Releases the internal semaphore resources. More...
 
fpl_platform_api bool fplSemaphoreInit (fplSemaphoreHandle *semaphore, const uint32_t initialValue)
 Initializes the semaphore with the given initial value. More...
 
fpl_platform_api bool fplSemaphoreRelease (fplSemaphoreHandle *semaphore)
 Increments the semaphore value by one. More...
 
fpl_platform_api bool fplSemaphoreTryWait (fplSemaphoreHandle *semaphore)
 Tries to wait for the semaphore until it gets signaled or return immediately. More...
 
fpl_platform_api int32_t fplSemaphoreValue (fplSemaphoreHandle *semaphore)
 Gets the current semaphore value. More...
 
fpl_platform_api bool fplSemaphoreWait (fplSemaphoreHandle *semaphore, const fplTimeoutValue timeout)
 Waits for the semaphore until it gets signaled or the timeout has been reached. More...
 
fpl_platform_api size_t fplSessionGetUsername (char *nameBuffer, const size_t maxNameBufferLen)
 Gets the username of the current logged-in user from the session. More...
 
fpl_common_api bool fplSetAudioClientReadCallback (fpl_audio_client_read_callback *newCallback, void *userData)
 Overwrites the audio client read callback. More...
 
fpl_platform_api bool fplSetClipboardText (const char *text)
 Overwrites the current clipboard text with the given one. More...
 
fpl_common_api void fplSetDefaultAudioSettings (fplAudioSettings *audio)
 Resets the given audio settings to default settings (S16 PCM, 48 kHz, 2 Channels) More...
 
fpl_common_api void fplSetDefaultConsoleSettings (fplConsoleSettings *console)
 Resets the given console settings container to default settings. More...
 
fpl_common_api void fplSetDefaultInputSettings (fplInputSettings *input)
 Resets the given input settings container to default values. More...
 
fpl_common_api void fplSetDefaultSettings (fplSettings *settings)
 Resets the given settings container to default values for window, video, audio, etc. More...
 
fpl_common_api void fplSetDefaultVideoSettings (fplVideoSettings *video)
 Resets the given video settings to default values. More...
 
fpl_common_api void fplSetDefaultWindowSettings (fplWindowSettings *window)
 Resets the given window settings container to default settings. More...
 
fpl_common_api size_t fplSetFilePosition (const fplFileHandle *fileHandle, const intptr_t position, const fplFilePositionMode mode)
 Sets the current file position by the given position, depending on the mode it's absolute or relative. More...
 
fpl_platform_api uint32_t fplSetFilePosition32 (const fplFileHandle *fileHandle, const int32_t position, const fplFilePositionMode mode)
 Sets the current file position by the given position, depending on the mode it's absolute or relative. More...
 
fpl_platform_api uint64_t fplSetFilePosition64 (const fplFileHandle *fileHandle, const int64_t position, const fplFilePositionMode mode)
 Sets the current file position by the given position, depending on the mode it's absolute or relative. More...
 
fpl_platform_api bool fplSetFileTimestamps (const char *filePath, const fplFileTimeStamps *timeStamps)
 Sets the timestamps for the given file. More...
 
fpl_common_api void fplSetLogSettings (const fplLogSettings *params)
 Overwrites the current log settings. More...
 
fpl_common_api void fplSetMaxLogLevel (const fplLogLevel maxLevel)
 Changes the current maximum log level to the given value. More...
 
fpl_platform_api bool fplSetThreadPriority (fplThreadHandle *thread, const fplThreadPriority newPriority)
 Changes the thread priority to the given one, for the given fplThreadHandle . More...
 
fpl_platform_api void fplSetWindowCursorEnabled (const bool value)
 Enables or disables the window cursor. More...
 
fpl_platform_api void fplSetWindowDecorated (const bool value)
 Enables or disables the window decoration (Titlebar, Border, etc.). More...
 
fpl_platform_api void fplSetWindowFloating (const bool value)
 Enables or disables the window floating (Top-most) More...
 
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. More...
 
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. More...
 
fpl_common_api void fplSetWindowInputEvents (const bool enabled)
 Enables or Disables the input events for the window entirely. More...
 
fpl_platform_api void fplSetWindowPosition (const int32_t left, const int32_t top)
 Changes the window absolute position to the given coordinates. More...
 
fpl_platform_api void fplSetWindowResizeable (const bool value)
 Enables or disables the ability to resize the window. More...
 
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. More...
 
fpl_platform_api bool fplSetWindowState (const fplWindowState newState)
 Changes the current window state. More...
 
fpl_platform_api void fplSetWindowTitle (const char *title)
 Changes the window title to the given string. More...
 
fpl_platform_api void fplSignalDestroy (fplSignalHandle *signal)
 Releases the given signal and clears the structure to zero. More...
 
fpl_platform_api bool fplSignalInit (fplSignalHandle *signal, const fplSignalValue initialValue)
 Initializes the given signal. More...
 
fpl_platform_api bool fplSignalReset (fplSignalHandle *signal)
 Resets the signal. More...
 
fpl_platform_api bool fplSignalSet (fplSignalHandle *signal)
 Sets the signal and wakes up the given signal. More...
 
fpl_platform_api bool fplSignalWaitForAll (fplSignalHandle **signals, const size_t count, const size_t stride, const fplTimeoutValue timeout)
 Waits until all the given signals are waked up. More...
 
fpl_platform_api bool fplSignalWaitForAny (fplSignalHandle **signals, const size_t count, const size_t stride, const fplTimeoutValue timeout)
 Waits until any of the given signals wakes up or the timeout has been reached. More...
 
fpl_platform_api bool fplSignalWaitForOne (fplSignalHandle *signal, const fplTimeoutValue timeout)
 Waits until the given signal is waked up. More...
 
fpl_common_api fplAudioResultType fplStopAudio ()
 Stop playing asynchronous audio. More...
 
fpl_common_api char * fplStringAppend (const char *appended, char *buffer, size_t maxBufferLen)
 Appends the source string to the given buffer. More...
 
fpl_common_api char * fplStringAppendLen (const char *appended, const size_t appendedLen, char *buffer, size_t maxBufferLen)
 Appends the source string to the given buffer constrained by length. More...
 
fpl_common_api int32_t fplStringToS32 (const char *str)
 Converts the given string into a 32-bit integer. More...
 
fpl_common_api int32_t fplStringToS32Len (const char *str, const size_t len)
 Converts the given string into a 32-bit integer constrained by string length. More...
 
fpl_platform_api fplThreadHandlefplThreadCreate (fpl_run_thread_callback *runFunc, void *data)
 Creates and starts a thread and returns the handle to it. More...
 
fpl_platform_api fplThreadHandlefplThreadCreateWithParameters (fplThreadParameters *parameters)
 Creates and starts a thread from the specified fplThreadParameters and returns the handle to it. More...
 
fpl_platform_api void fplThreadSleep (const uint32_t milliseconds)
 Let the current thread sleep for the given amount of milliseconds. More...
 
fpl_platform_api bool fplThreadTerminate (fplThreadHandle *thread)
 Forces the given thread to stop and release all underlying resources. More...
 
fpl_platform_api bool fplThreadWaitForAll (fplThreadHandle **threads, const size_t count, const size_t stride, const fplTimeoutValue timeout)
 Wait until all given threads are done running or the given timeout has been reached. More...
 
fpl_platform_api bool fplThreadWaitForAny (fplThreadHandle **threads, const size_t count, const size_t stride, const fplTimeoutValue timeout)
 Wait until one of the given threads is done running or the given timeout has been reached. More...
 
fpl_platform_api bool fplThreadWaitForOne (fplThreadHandle *thread, const fplTimeoutValue timeout)
 Wait until the given thread is done running or the given timeout has been reached. More...
 
fpl_platform_api bool fplThreadYield ()
 Let the current thread yield execution to another thread that is ready to run on this core. More...
 
fpl_platform_api size_t fplUTF8StringToWideString (const char *utf8Source, const size_t utf8SourceLen, wchar_t *wideDest, const size_t maxWideDestLen)
 Converts the given 8-bit UTF-8 source ANSI string with length in a 16-bit wide string. More...
 
fpl_common_api void fplVideoFlip ()
 Forces the window to be redrawn or to swap the back/front buffer.
 
fpl_platform_api size_t fplWideStringToUTF8String (const wchar_t *wideSource, const size_t wideSourceLen, char *utf8Dest, const size_t maxUtf8DestLen)
 Converts the given 16-bit source wide string with length in an 8-bit UTF-8 ANSI string. More...
 
fpl_platform_api void fplWindowShutdown ()
 Closes the window and stops the event loop.
 
fpl_platform_api bool fplWindowUpdate ()
 Clears the internal event queue and updates input devices if needed. More...
 
fpl_common_api size_t fplWriteFileBlock (const fplFileHandle *fileHandle, void *sourceBuffer, const size_t sourceSize)
 Writes a block to the given file and returns the number of written bytes. More...
 
fpl_platform_api uint32_t fplWriteFileBlock32 (const fplFileHandle *fileHandle, void *sourceBuffer, const uint32_t sourceSize)
 Writes a block to the given file and returns the number of written bytes. More...
 
fpl_platform_api uint64_t fplWriteFileBlock64 (const fplFileHandle *fileHandle, void *sourceBuffer, const uint64_t sourceSize)
 Writes a block to the given file and returns the number of written bytes. More...
 

Detailed Description

Final Platform Layer (FPL) - A C99 Single-Header-File Platform Abstraction Library.

Version
v0.9.6-beta
Author
Torsten Spaete

Definition in file final_platform_layer.h.