diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-18 15:52:33 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-18 15:52:33 +0000 |
| commit | 6a35abb6ca683d35d5eefd55081c29af4893fec6 (patch) | |
| tree | ebfc7ec8b95e9240511312d416d28b1011c83ded /shm.h | |
| parent | shm: log size of purged buffer (diff) | |
shm: new functions: shm_cookie_*()
These functions return a SHM cookie given a terminal instance.
Diffstat (limited to 'shm.h')
| -rw-r--r-- | shm.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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)); } |
