aboutsummaryrefslogtreecommitdiff
path: root/shm.h
diff options
context:
space:
mode:
Diffstat (limited to 'shm.h')
-rw-r--r--shm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/shm.h b/shm.h
index 18da7a1f..eb9987ed 100644
--- a/shm.h
+++ b/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)); }