$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
action_notifier.c File Reference
#include "action_notifier.h"
#include "log.h"
#include "ui.h"
#include "utils.h"
#include <cglm/types.h>
Include dependency graph for action_notifier.c:

Functions

void action_notifier_init (ActionNotifier *notifier)
 Initializes the notifier. More...
 
void action_notifier_push (ActionNotifier *notifier, const char *text, float duration)
 Adds a new notification message. More...
 
void action_notifier_update (ActionNotifier *notifier, float delta_time)
 Updates notification timers. More...
 
void action_notifier_draw (ActionNotifier *notifier, UIContext *ui_ctx, int screen_width, int screen_height)
 Renders active notifications to the screen. More...
 

Function Documentation

◆ action_notifier_draw()

void action_notifier_draw ( ActionNotifier notifier,
UIContext ui_ctx,
int  screen_width,
int  screen_height 
)

Renders active notifications to the screen.

Parameters
notifierPointer to the notifier.
ui_ctxUIContext to use for drawing.
screen_widthCurrent window width.
screen_heightCurrent window height.
Here is the call graph for this function:

◆ action_notifier_init()

void action_notifier_init ( ActionNotifier notifier)

Initializes the notifier.

Parameters
notifierPointer to the notifier struct.

◆ action_notifier_push()

void action_notifier_push ( ActionNotifier notifier,
const char *  text,
float  duration 
)

Adds a new notification message.

Parameters
notifierPointer to the notifier.
textThe message to display.
durationDuration in seconds.
Here is the call graph for this function:

◆ action_notifier_update()

void action_notifier_update ( ActionNotifier notifier,
float  delta_time 
)

Updates notification timers.

Parameters
notifierPointer to the notifier.
delta_timeDelta time since last update (seconds).