GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
widgets
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-2023 Cyril Hrubis <metan@ucw.cz>
5
6
*/
7
13
#ifndef GP_WIDGET_LOG_H
14
#define GP_WIDGET_LOG_H
15
16
#include <stdlib.h>
17
#include <
utils/gp_cbuffer.h
>
18
19
struct
gp_widget_log {
20
gp_widget_tattr tattr;
21
unsigned
int
min_width;
22
unsigned
int
min_lines;
23
24
gp_cbuffer
log;
25
char
**logs;
26
};
27
34
void
gp_widget_log_append
(gp_widget *self,
const
char
*text);
35
49
gp_widget *
gp_widget_log_new
(gp_widget_tattr tattr,
50
unsigned
int
min_width,
unsigned
int
min_lines,
51
size_t
max_logs);
52
53
#endif
/* GP_WIDGET_LOG_H */
gp_cbuffer.h
Circular buffer indexing and iterators.
gp_widget_log_new
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.
gp_widget_log_append
void gp_widget_log_append(gp_widget *self, const char *text)
Appends text to the log.
gp_cbuffer
A circular buffer indexes.
Definition
gp_cbuffer.h:19
Generated by
1.9.8