WIP callbacks or something
This commit is contained in:
parent
33ceed2d22
commit
ea0b2eb591
3 changed files with 66 additions and 12 deletions
|
|
@ -19,6 +19,9 @@ struct surface {
|
|||
struct wl_output *wl_output;
|
||||
|
||||
EGLSurface egl_surface;
|
||||
|
||||
// notice, surface does not own `state`, this is a backlink.
|
||||
struct client_state *state;
|
||||
};
|
||||
|
||||
struct surface_list {
|
||||
|
|
@ -41,6 +44,9 @@ struct client_state {
|
|||
EGLDisplay egl_display;
|
||||
EGLConfig egl_config;
|
||||
EGLContext egl_context;
|
||||
|
||||
/// Provide this from caller.
|
||||
void(*render_func)(void *data, int width, int height, double time);
|
||||
};
|
||||
|
||||
#define EVENT_DRAW 0
|
||||
|
|
@ -58,5 +64,5 @@ struct event {
|
|||
void wayland_init(struct client_state *state, int output_type);
|
||||
void commit(struct client_state *state);
|
||||
/// Provide pointer to be filled.
|
||||
void wait_for_event(struct client_state *state, struct event event);
|
||||
void wait_for_event(struct client_state *state, struct event *event);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue