labwc/include/common
Consolatis fc9cf5c931 src/common/buf.c: enhance the buffer API
There is at least one user of the buffer API that reuse a single
buffer by just resetting `buf.len` to `0`. This works as long as
the new user of the buffer actually adds something to the buffer.

However, if we don't add anything but still provide `buf.buf` to
a consumer, the old content will be re-used.

This patch thus adds two new clearing variants to the buffer API:
- `buf_clear()` which doesn't reset the internal allocations
- `buf_reset()` which does free the internal allocations

Additionally, this patch makes `buffer_add_char()` public which
allows adding single characters to an existing buffer. This will
be used in a future PR which implements custom format strings for
the OSD.
2024-03-16 15:45:46 +00:00
..
array.h common/array.h: add wl_array_for_each_reverse macro 2023-11-21 22:31:05 +01:00
border.h Move border-struct to common/border.h for sharing 2023-06-26 06:04:07 +01:00
buf.h src/common/buf.c: enhance the buffer API 2024-03-16 15:45:46 +00:00
dir.h config: support merging multiple config files 2024-01-18 20:20:36 +00:00
fd_util.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
file-helpers.h common/file-helpers.c: share file_exists() to reduce duplication 2023-09-17 19:26:41 +01:00
font.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
grab-file.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
graphic-helpers.h theme: create hover button fallbacks 2023-12-21 02:42:23 +01:00
list.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
macros.h edges, resistance, snap: unified resistance and snapping engine 2024-01-30 15:02:17 -05:00
match.h common: use fnmatch() for pattern matching 2023-10-01 14:17:29 +01:00
mem.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
nodename.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
parse-bool.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
scaled_font_buffer.h scaled_scene_buffer: make dropping the buffer optional 2023-10-19 21:48:57 +01:00
scaled_scene_buffer.h scaled_scene_buffer: make dropping the buffer optional 2023-10-19 21:48:57 +01:00
scene-helpers.h chase: use wlroots tree node getters 2023-12-03 18:24:26 +00:00
spawn.h Fix various typos across the codebase 2024-03-08 13:59:20 +01:00
string-helpers.h session: process environment.d and allow empty variables 2024-03-11 20:01:14 +00:00
surface-helpers.h cursor: process layer subsurfaces in cursor_button_press() 2024-03-09 00:44:19 +01:00