mirror of
https://github.com/labwc/labwc.git
synced 2026-05-30 21:37:44 -04:00
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. |
||
|---|---|---|
| .. | ||
| button | ||
| common | ||
| config | ||
| input | ||
| menu | ||
| action.h | ||
| buffer.h | ||
| debug.h | ||
| decorations.h | ||
| dnd.h | ||
| edges.h | ||
| idle.h | ||
| labwc.h | ||
| layers.h | ||
| meson.build | ||
| node.h | ||
| output-virtual.h | ||
| placement.h | ||
| regions.h | ||
| resistance.h | ||
| resize_indicator.h | ||
| session-lock.h | ||
| snap.h | ||
| ssd-internal.h | ||
| ssd.h | ||
| theme.h | ||
| view-impl-common.h | ||
| view.h | ||
| window-rules.h | ||
| workspaces.h | ||
| xwayland.h | ||