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

Macros

#define RGFW_MAX_EVENTS   32
 
#define RGFW_eventQueuePushEx(eventInit)   { RGFW_event e; eventInit; RGFW_eventQueuePush(e); }
 

Functions

RGFWDEF double RGFW_getTime (void)
 
RGFWDEF u64 RGFW_getTimeNS (void)
 
RGFWDEF void RGFW_sleep (u64 milisecond)
 
RGFWDEF void RGFW_setTime (double time)
 
RGFWDEF u64 RGFW_getTimerValue (void)
 
RGFWDEF u64 RGFW_getTimerFreq (void)
 
RGFWDEF u32 RGFW_checkFPS (double startTime, u32 frameCount, u32 fpsCap)
 
RGFWDEF void RGFW_setRootWindow (RGFW_window *win)
 
RGFWDEF RGFW_windowRGFW_getRootWindow (void)
 
void RGFW_eventQueuePush (RGFW_event event)
 
RGFW_eventRGFW_eventQueuePop (RGFW_window *win)
 
typedef RGFW_ENUM (u8, RGFW_key)
 
RGFWDEF u32 RGFW_apiKeyToRGFW (u32 keycode)
 
RGFWDEF u32 RGFW_rgfwToApiKey (u32 keycode)
 
RGFWDEF u8 RGFW_rgfwToKeyChar (u32 keycode)
 
typedef RGFW_ENUM (u8, RGFW_mouseIcons)
 

Detailed Description

Macro Definition Documentation

◆ RGFW_eventQueuePushEx

#define RGFW_eventQueuePushEx (   eventInit)    { RGFW_event e; eventInit; RGFW_eventQueuePush(e); }

◆ RGFW_MAX_EVENTS

#define RGFW_MAX_EVENTS   32

Function Documentation

◆ RGFW_apiKeyToRGFW()

RGFWDEF u32 RGFW_apiKeyToRGFW ( u32  keycode)

converts api keycode to the RGFW unmapped/physical key

◆ RGFW_checkFPS()

RGFWDEF u32 RGFW_checkFPS ( double  startTime,
u32  frameCount,
u32  fpsCap 
)

change which window is the root window

◆ RGFW_ENUM() [1/2]

typedef RGFW_ENUM ( u8  ,
RGFW_key   
)

key codes and mouse icon enums

◆ RGFW_ENUM() [2/2]

typedef RGFW_ENUM ( u8  ,
RGFW_mouseIcons   
)

◆ RGFW_eventQueuePop()

RGFW_event * RGFW_eventQueuePop ( RGFW_window win)

◆ RGFW_eventQueuePush()

void RGFW_eventQueuePush ( RGFW_event  event)

standard event queue, used for injecting events and returning source API callback events like any other queue check

◆ RGFW_getRootWindow()

RGFWDEF RGFW_window * RGFW_getRootWindow ( void  )

◆ RGFW_getTime()

RGFWDEF double RGFW_getTime ( void  )

get time in seconds since RGFW_setTime, which ran when the first window is open

◆ RGFW_getTimeNS()

RGFWDEF u64 RGFW_getTimeNS ( void  )

get time in nanoseconds RGFW_setTime, which ran when the first window is open

◆ RGFW_getTimerFreq()

RGFWDEF u64 RGFW_getTimerFreq ( void  )

get API time freq

◆ RGFW_getTimerValue()

RGFWDEF u64 RGFW_getTimerValue ( void  )

get API timer value

◆ RGFW_rgfwToApiKey()

RGFWDEF u32 RGFW_rgfwToApiKey ( u32  keycode)

converts RGFW keycode to the unmapped/physical api key

◆ RGFW_rgfwToKeyChar()

RGFWDEF u8 RGFW_rgfwToKeyChar ( u32  keycode)

converts RGFW keycode to the mapped keychar

◆ RGFW_setRootWindow()

RGFWDEF void RGFW_setRootWindow ( RGFW_window win)

◆ RGFW_setTime()

RGFWDEF void RGFW_setTime ( double  time)

set timer in seconds

◆ RGFW_sleep()

RGFWDEF void RGFW_sleep ( u64  milisecond)

sleep for a set time