summaryrefslogtreecommitdiff
path: root/src/common/backend.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/backend.h')
-rw-r--r--src/common/backend.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common/backend.h b/src/common/backend.h
index b93547a..37fa167 100644
--- a/src/common/backend.h
+++ b/src/common/backend.h
@@ -24,7 +24,7 @@ struct yasl_surface {
uint32_t scale_120;
uint32_t state;
uint32_t bg_color;
- struct yasl_surface_cbs callbacks;
+ struct yasl_window_cbs callbacks;
void *ud;
uint64_t frame_generation;
struct input_queue input;
@@ -38,7 +38,7 @@ struct yasl_surface {
void yasl_surface_clear_timers(struct yasl_surface *s);
struct yasl_surface *yasl_create_toplevel(struct yasl_display *d,
- const struct yasl_surface_spec *spec, void *graphics_device);
+ const struct yasl_window_spec *spec, void *graphics_device);
static inline uint64_t yasl_frame_begin(struct yasl_surface *s)
{
@@ -58,13 +58,15 @@ struct yasl_backend_ops {
void (*display_paste)(struct yasl_display *d, enum yasl_selection sel, struct yasl_surface *target);
bool (*display_drag_start)(struct yasl_display *d, struct yasl_surface *origin, const struct yasl_drag_image *image, const struct yasl_drag_listener *l, void *ud);
void (*display_drag_cancel)(struct yasl_display *d);
+ /* Create with callbacks disabled; common code installs them after return. */
struct yasl_surface *(*surface_create_toplevel)(struct yasl_display *d,
- const struct yasl_surface_spec *spec, void *graphics_device);
+ const struct yasl_window_spec *spec, void *graphics_device);
struct yasl_surface *(*surface_create_popup)(struct yasl_surface *parent, const struct yasl_popup_spec *spec);
bool (*surface_popup_reposition)(struct yasl_surface *popup, const struct yasl_popup_spec *spec);
void (*surface_destroy)(struct yasl_surface *s);
struct yasl_display *(*surface_display)(const struct yasl_surface *s);
- void (*surface_set_callbacks)(struct yasl_surface *s, const struct yasl_surface_cbs *cbs, void *ud);
+ /* Copy only; must not invoke application callbacks. */
+ void (*surface_set_callbacks)(struct yasl_surface *s, const struct yasl_window_cbs *cbs, void *ud);
void (*surface_set_title)(struct yasl_surface *s, const char *title);
void (*surface_schedule_redraw)(struct yasl_surface *s);
bool (*surface_present)(struct yasl_surface *s, const struct yasl_framebuffer *fb, const struct yasl_damage_list *damage);