mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-18 05:34:02 -04:00
shm: new functions: shm_cookie_*()
These functions return a SHM cookie given a terminal instance.
This commit is contained in:
parent
7b610e018b
commit
6a35abb6ca
2 changed files with 5 additions and 4 deletions
5
shm.h
5
shm.h
|
|
@ -28,3 +28,8 @@ struct buffer *shm_get_buffer(
|
|||
void shm_fini(void);
|
||||
|
||||
void shm_purge(struct wl_shm *shm, unsigned long cookie);
|
||||
|
||||
struct terminal;
|
||||
static inline unsigned long shm_cookie_grid(const struct terminal *term) { return (unsigned long)((uintptr_t)term + 0); }
|
||||
static inline unsigned long shm_cookie_search(const struct terminal *term) { return (unsigned long)((uintptr_t)term + 1); }
|
||||
static inline unsigned long shm_cookie_csd(const struct terminal *term, int n) { return (unsigned long)((uintptr_t)term + 2 + (n)); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue