GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_widget_log.h
Go to the documentation of this file.
1//SPDX-License-Identifier: LGPL-2.0-or-later
2/*
3
4 Copyright (c) 2014-2024 Cyril Hrubis <metan@ucw.cz>
5
6 */
7
23#ifndef GP_WIDGET_LOG_H
24#define GP_WIDGET_LOG_H
25
26#include <stdlib.h>
27#include <utils/gp_cbuffer.h>
28
29struct gp_widget_log {
30 gp_widget_tattr tattr;
31 unsigned int min_width;
32 unsigned int min_lines;
33
34 gp_cbuffer log;
35 char **logs;
36};
37
44void gp_widget_log_append(gp_widget *self, const char *text);
45
60 unsigned int min_width, unsigned int min_lines,
61 size_t max_logs);
62
63#endif /* GP_WIDGET_LOG_H */
Circular buffer indexing and iterators.
gp_widget * gp_widget_log_new(gp_widget_tattr tattr, unsigned int min_width, unsigned int min_lines, size_t max_logs)
Allocates a log widget.
void gp_widget_log_append(gp_widget *self, const char *text)
Appends text to the log.
gp_widget_tattr
Text attribute flags.
A circular buffer indexes.
Definition gp_cbuffer.h:19
A widget base.
Definition gp_widget.h:28