Final Platform Layer 0.9.8-beta
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
Window events

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

Data Structures

struct  fplEvent
 A structure containing event data for all event types (Window, Keyboard, Mouse, etc.) 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  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 informations. More...
 
struct  fplWindowEvent
 A structure containing window event data (Size, Position, etc.) More...
 

Typedefs

typedef enum fplButtonState fplButtonState
 An enumeration of button states.
 
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 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 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 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 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.)
 

Enumerations

enum  fplButtonState { fplButtonState_Release , fplButtonState_Press , fplButtonState_Repeat }
 An enumeration of button states. More...
 
enum  fplEventType {
  fplEventType_None , fplEventType_Window , fplEventType_Keyboard , fplEventType_Mouse ,
  fplEventType_Gamepad
}
 An enumeration of event types (Window, Keyboard, Mouse, ...) 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  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  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  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

 FPL_ENUM_AS_FLAGS_OPERATORS (fplKeyboardModifierFlags)
 fplKeyboardModifierFlags operator overloads for C++
 
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 ()
 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

◆ fplButtonState

An enumeration of button states.

Enumerator
fplButtonState_Release 

Key released.

fplButtonState_Press 

Key pressed.

fplButtonState_Repeat 

Key is hold down.

Definition at line 5937 of file final_platform_layer.h.

◆ fplEventType

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

Enumerator
fplEventType_None 

None event type.

fplEventType_Window 

Window event.

fplEventType_Keyboard 

Keyboard event.

fplEventType_Mouse 

Mouse event.

fplEventType_Gamepad 

Gamepad event.

Definition at line 6173 of file final_platform_layer.h.

◆ fplGamepadButtonType

An enumeration of gamepad buttons.

Enumerator
fplGamepadButtonType_DPadUp 

DPad up.

fplGamepadButtonType_DPadRight 

DPad right.

fplGamepadButtonType_DPadDown 

DPad down.

fplGamepadButtonType_DPadLeft 

DPad left.

fplGamepadButtonType_ActionA 

Action-A.

fplGamepadButtonType_ActionB 

Action-B.

fplGamepadButtonType_ActionX 

Action-X.

fplGamepadButtonType_ActionY 

Action-Y.

fplGamepadButtonType_Start 

Start.

fplGamepadButtonType_Back 

Back.

fplGamepadButtonType_LeftThumb 

Left-Thumb.

fplGamepadButtonType_RightThumb 

Right-Thumb.

fplGamepadButtonType_LeftShoulder 

Left-Shoulder.

fplGamepadButtonType_RightShoulder 

Right-Shoulder.

Definition at line 6061 of file final_platform_layer.h.

◆ fplGamepadEventType

An enumeration of gamepad event types (Connected, Disconnected, StateChanged, etc.)

Enumerator
fplGamepadEventType_None 

No gamepad event.

fplGamepadEventType_Connected 

Gamepad connected.

fplGamepadEventType_Disconnected 

Gamepad disconnected.

fplGamepadEventType_StateChanged 

Gamepad state updated.

Definition at line 6043 of file final_platform_layer.h.

◆ fplKey

enum fplKey

An enumeration of mapped keys (Based on MS Virtual-Key-Codes, mostly directly mapped from ASCII)

Enumerator
fplKey_Oem1 

'/?' for US

fplKey_OemPlus 

'+' for any country

fplKey_OemComma 

',' for any country

fplKey_OemMinus 

'-' for any country

fplKey_OemPeriod 

'.' for any country

fplKey_Oem2 

'/?' for US

fplKey_Oem3 

'‘~’ for US

fplKey_Oem4 

'[{' for US

fplKey_Oem5 

'|' for US

fplKey_Oem6 

']}' for US

fplKey_Oem7 

''"' for US

Definition at line 5689 of file final_platform_layer.h.

◆ fplKeyboardEventType

An enumeration of keyboard event types.

Enumerator
fplKeyboardEventType_None 

None key event type.

fplKeyboardEventType_Button 

Key button event.

fplKeyboardEventType_Input 

Character was entered.

Definition at line 5947 of file final_platform_layer.h.

◆ fplKeyboardModifierFlags

An enumeration of keyboard modifier flags.

Enumerator
fplKeyboardModifierFlags_None 

No modifiers.

fplKeyboardModifierFlags_LAlt 

Left alt key is down.

fplKeyboardModifierFlags_RAlt 

Right alt key is down.

fplKeyboardModifierFlags_LCtrl 

Left ctrl key is down.

fplKeyboardModifierFlags_RCtrl 

Right ctrl key is down.

fplKeyboardModifierFlags_LShift 

Left shift key is down.

fplKeyboardModifierFlags_RShift 

Right shift key is down.

fplKeyboardModifierFlags_LSuper 

Left super key is down.

fplKeyboardModifierFlags_RSuper 

Right super key is down.

fplKeyboardModifierFlags_CapsLock 

Capslock state is active.

fplKeyboardModifierFlags_NumLock 

Numlock state is active.

fplKeyboardModifierFlags_ScrollLock 

Scrolllock state is active.

Definition at line 5957 of file final_platform_layer.h.

◆ fplMouseButtonType

An enumeration of mouse button types (Left, Right, ...)

Enumerator
fplMouseButtonType_None 

No mouse button.

fplMouseButtonType_Left 

Left mouse button.

fplMouseButtonType_Right 

Right mouse button.

fplMouseButtonType_Middle 

Middle mouse button.

fplMouseButtonType_MaxCount 

Max mouse button count.

Definition at line 6013 of file final_platform_layer.h.

◆ fplMouseEventType

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

Enumerator
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 6001 of file final_platform_layer.h.

◆ fplWindowEventType

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

Enumerator
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 5883 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
evThe pointer to the fplEvent structure
Returns
Returns false when there are no events left, true otherwise.
See also
Polling the window events

◆ fplPollEvents()

fpl_platform_api void fplPollEvents ( )

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

Warning
Dont use this function if you want to handle the events. Use fplPollEvent() instead!
See also
Ignoring the events