Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
action_notifier.h
Go to the documentation of this file.
1
6#ifndef ACTION_NOTIFIER_H
7#define ACTION_NOTIFIER_H
8
9#include "ui.h"
10#include <stdbool.h>
11
13#define MAX_ACTION_NOTIFICATIONS 5
14
16#define MAX_ACTION_TEXT_LENGTH 128
17
19#define NOTIF_DUR_SHORT 1.0F
20
22#define NOTIF_DUR_NORMAL 1.5F
23
25#define NOTIF_DUR_LONG 2.0F
26
37
45
51
58void action_notifier_push(ActionNotifier* notifier, const char* text,
59 float duration);
60
66void action_notifier_update(ActionNotifier* notifier, float delta_time);
67
75void action_notifier_draw(ActionNotifier* notifier, UIContext* ui_ctx,
76 int screen_width, int screen_height);
77
78#endif /* ACTION_NOTIFIER_H */
void action_notifier_init(ActionNotifier *notifier)
Initializes the notifier.
Definition action_notifier.c:8
void action_notifier_draw(ActionNotifier *notifier, UIContext *ui_ctx, int screen_width, int screen_height)
Renders active notifications to the screen.
Definition action_notifier.c:69
#define MAX_ACTION_NOTIFICATIONS
Maximum number of concurrent notifications.
Definition action_notifier.h:13
void action_notifier_update(ActionNotifier *notifier, float delta_time)
Updates notification timers.
Definition action_notifier.c:52
#define MAX_ACTION_TEXT_LENGTH
Maximum length of a notification message.
Definition action_notifier.h:16
void action_notifier_push(ActionNotifier *notifier, const char *text, float duration)
Adds a new notification message.
Definition action_notifier.c:18
Represents a single active notification.
Definition action_notifier.h:31
bool active
Definition action_notifier.h:35
float max_lifetime
Definition action_notifier.h:34
float lifetime
Definition action_notifier.h:33
char text[128]
Definition action_notifier.h:32
Manager for action notifications.
Definition action_notifier.h:42
ActionNotification notes[5]
Definition action_notifier.h:43
Persistent state for the UI system.
Definition ui.h:52
Minimal immediate-mode User Interface (UI) library.