aboutsummaryrefslogtreecommitdiff
path: root/shm.h
diff options
context:
space:
mode:
Diffstat (limited to 'shm.h')
-rw-r--r--shm.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/shm.h b/shm.h
index d67b3567..fe3f4b93 100644
--- a/shm.h
+++ b/shm.h
@@ -16,24 +16,28 @@ struct buffer {
bool busy;
size_t size; /* Buffer size */
- void *mmapped; /* Raw data */
+ void *mmapped; /* Raw data (TODO: rename) */
struct wl_buffer *wl_buf;
pixman_image_t *pix;
/* Internal */
int fd; /* memfd */
+ struct wl_shm_pool *pool;
+
void *real_mmapped; /* Address returned from mmap */
size_t mmap_size; /* Size of mmap (>= size) */
off_t offset; /* Offset into memfd where data begins */
+
+ bool scrollable;
bool purge; /* True if this buffer should be destroyed */
};
struct buffer *shm_get_buffer(
- struct wl_shm *shm, int width, int height, unsigned long cookie);
+ struct wl_shm *shm, int width, int height, unsigned long cookie, bool scrollable);
void shm_fini(void);
-bool shm_can_scroll(void);
+bool shm_can_scroll(const struct buffer *buf);
bool shm_scroll(struct wl_shm *shm, struct buffer *buf, int rows,
int top_margin, int top_keep_rows,
int bottom_margin, int bottom_keep_rows);