RGFW
A multi-platform single-header very simple-to-use framework library for creating GUI Libraries or simple GUI programs.
Loading...
Searching...
No Matches
Functions
Input

Functions

RGFWDEF RGFW_bool RGFW_isPressed (RGFW_window *win, RGFW_key key)
 
RGFWDEF RGFW_bool RGFW_wasPressed (RGFW_window *win, RGFW_key key)
 
RGFWDEF RGFW_bool RGFW_isHeld (RGFW_window *win, RGFW_key key)
 
RGFWDEF RGFW_bool RGFW_isReleased (RGFW_window *win, RGFW_key key)
 
RGFWDEF RGFW_bool RGFW_isClicked (RGFW_window *win, RGFW_key key)
 
RGFWDEF RGFW_bool RGFW_isMousePressed (RGFW_window *win, RGFW_mouseButton button)
 
RGFWDEF RGFW_bool RGFW_isMouseHeld (RGFW_window *win, RGFW_mouseButton button)
 
RGFWDEF RGFW_bool RGFW_isMouseReleased (RGFW_window *win, RGFW_mouseButton button)
 
RGFWDEF RGFW_bool RGFW_wasMousePressed (RGFW_window *win, RGFW_mouseButton button)
 

Detailed Description

Function Documentation

◆ RGFW_isClicked()

RGFWDEF RGFW_bool RGFW_isClicked ( RGFW_window win,
RGFW_key  key 
)
Parameters
keykey code

◆ RGFW_isHeld()

RGFWDEF RGFW_bool RGFW_isHeld ( RGFW_window win,
RGFW_key  key 
)

if key is held (key code)

◆ RGFW_isMouseHeld()

RGFWDEF RGFW_bool RGFW_isMouseHeld ( RGFW_window win,
RGFW_mouseButton  button 
)

if a mouse button is held

Parameters
buttonmouse button code

◆ RGFW_isMousePressed()

RGFWDEF RGFW_bool RGFW_isMousePressed ( RGFW_window win,
RGFW_mouseButton  button 
)

if a mouse button is pressed

Parameters
buttonmouse button code

◆ RGFW_isMouseReleased()

RGFWDEF RGFW_bool RGFW_isMouseReleased ( RGFW_window win,
RGFW_mouseButton  button 
)

if a mouse button was released

Parameters
buttonmouse button code

◆ RGFW_isPressed()

RGFWDEF RGFW_bool RGFW_isPressed ( RGFW_window win,
RGFW_key  key 
)

if window == NULL, it checks if the key is pressed globally. Otherwise, it checks only if the key is pressed while the window in focus. if key is pressed (key code)

◆ RGFW_isReleased()

RGFWDEF RGFW_bool RGFW_isReleased ( RGFW_window win,
RGFW_key  key 
)

if key is released (key code)

◆ RGFW_wasMousePressed()

RGFWDEF RGFW_bool RGFW_wasMousePressed ( RGFW_window win,
RGFW_mouseButton  button 
)

if a mouse button was pressed (checks previous state only)

Parameters
buttonmouse button code

◆ RGFW_wasPressed()

RGFWDEF RGFW_bool RGFW_wasPressed ( RGFW_window win,
RGFW_key  key 
)

if key was pressed (checks previous state only) (key code)