diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-22 20:06:53 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-03-22 20:06:53 -0400 |
commit | 30b8fb5572cd59c096b00a26c7a41cd674e9337b (patch) | |
tree | 2a7de55685259200422f2bf23cab909fa788db54 /include/wlr/backend.h | |
parent | 8836b167bf0ff152de951f7fdabb1deae85f6e93 (diff) | |
parent | 77d3be66eaabca4309794536984c54a5e94e9eb5 (diff) |
Merge branch 'master' into xdg-positioner
Diffstat (limited to 'include/wlr/backend.h')
-rw-r--r-- | include/wlr/backend.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/wlr/backend.h b/include/wlr/backend.h index 00dc9fdc..e3b14add 100644 --- a/include/wlr/backend.h +++ b/include/wlr/backend.h @@ -11,16 +11,39 @@ struct wlr_backend { const struct wlr_backend_impl *impl; struct { + /** Raised when destroyed, passed the wlr_backend reference */ struct wl_signal destroy; + /** Raised when new inputs are added, passed the wlr_input_device */ struct wl_signal new_input; + /** Raised when new outputs are added, passed the wlr_output */ struct wl_signal new_output; } events; }; +/** + * Automatically initializes the most suitable backend given the environment. + * Will always return a multibackend. The backend is created but not started. + * Returns NULL on failure. + */ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display); +/** + * Start the backend. This may signal new_input or new_output immediately, but + * may also wait until the display's event loop begins. Returns false on + * failure. + */ bool wlr_backend_start(struct wlr_backend *backend); +/** + * Destroy the backend and clean up all of its resources. Normally called + * automatically when the wl_display is destroyed. + */ void wlr_backend_destroy(struct wlr_backend *backend); +/** + * Obtains the wlr_egl reference this backend is using. + */ struct wlr_egl *wlr_backend_get_egl(struct wlr_backend *backend); +/** + * Obtains the wlr_renderer reference this backend is using. + */ struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend); uint32_t usec_to_msec(uint64_t usec); |