Skip to content

Window events

Finalspace edited this page May 29, 2026 · 1 revision

This category contains types/functions for handling window events. More...

Data Structures

Type Name
struct fplEvent
A structure containing event data for all event types (Window, Keyboard, Mouse, etc.). More...
struct fplKeyboardEvent
A structure containing keyboard event data (Type, Keycode, Mapped key, etc.). More...
struct fplMouseEvent
A structure containing mouse event data (Type, Button, Position, etc.). More...
struct fplWindowDropFiles
A structure containing number and dropped files information. More...
struct fplWindowEvent
A structure containing window event data (Size, Position, etc.). More...

Enumerations

Type Name
enum fplEventType {
fplEventType_None , fplEventType_Window , fplEventType_Keyboard , fplEventType_Mouse ,
fplEventType_Gamepad
}
An enumeration of event types (Window, Keyboard, Mouse, etc.). More...
enum fplKeyboardEventType { fplKeyboardEventType_None , fplKeyboardEventType_Button , fplKeyboardEventType_Input }
An enumeration of keyboard event types. More...
enum fplMouseEventType { fplMouseEventType_None , fplMouseEventType_Move , fplMouseEventType_Button , fplMouseEventType_Wheel }
An enumeration of mouse event types (Move, ButtonDown, etc.). 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...

Functions

Type Name
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.
fpl_platform_api void fplPollEvents (void)
Polls all the events from the OS and clears the internal event queue.

Detailed Description

This category contains types/functions for handling window events.

Enumeration Type Documentation

fplEventType

enum fplEventType

An enumeration of event types (Window, Keyboard, Mouse, etc.).

Name Description
fplEventType_None None event type.
fplEventType_Window Window event.
fplEventType_Keyboard Keyboard event.
fplEventType_Mouse Mouse event.
fplEventType_Gamepad Gamepad event.

Definition at line 9822 of file final_platform_layer.h.

fplKeyboardEventType

enum fplKeyboardEventType

An enumeration of keyboard event types.

Name Description
fplKeyboardEventType_None None key event type.
fplKeyboardEventType_Button Key button event.
fplKeyboardEventType_Input Character was entered.

Definition at line 9758 of file final_platform_layer.h.

fplMouseEventType

enum fplMouseEventType

An enumeration of mouse event types (Move, ButtonDown, etc.).

Name Description
fplMouseEventType_None No mouse event type.
fplMouseEventType_Move Mouse position has been changed.
fplMouseEventType_Button Mouse button event.
fplMouseEventType_Wheel Mouse wheel event.

Definition at line 9788 of file final_platform_layer.h.

fplWindowEventType

enum fplWindowEventType

An enumeration of window event types (Resized, PositionChanged, etc.).

Name Description
fplWindowEventType_None None window event type.
fplWindowEventType_Resized Window has been resized.
fplWindowEventType_GotFocus Window got focus.
fplWindowEventType_LostFocus Window lost focus.
fplWindowEventType_Minimized Window has been minimized.
fplWindowEventType_Maximized Window has been maximized.
fplWindowEventType_Restored Window has been restored.
fplWindowEventType_DroppedFiles Dropped one or more files into the window.
fplWindowEventType_Exposed Window was exposed.
fplWindowEventType_PositionChanged Window was moved.
fplWindowEventType_Closed Window was closed.
fplWindowEventType_Shown Window was shown.
fplWindowEventType_Hidden Window was hidden.

Definition at line 9695 of file final_platform_layer.h.

Function Documentation

fplPollEvent()

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.

Parameters

Direction Parameter Description
[out] ev Reference to the event structure fplEvent.

Returns: Returns false when there are no events left, true otherwise.

See also: Polling the window events

fplPollEvents()

fpl_platform_api void fplPollEvents ( void )

Polls all the events from the OS and clears the internal event queue.

Warning: Don't use this function if you want to handle the events. Use

fplPollEvent() instead!

See also: Ignoring the events

Final Platform Layer

Pages

Topics

Data Structures

Clone this wiki locally