diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-01-15 20:53:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-15 20:53:13 -0500 |
commit | b331c5c2c5cbb94df66789e52ab87598647e0056 (patch) | |
tree | 24be1a00880947a25b9f9f8a12129bbb371b1643 /include | |
parent | c690420501a35ee83bf6afeb52139b3da2c455c2 (diff) | |
parent | 0eebaf98d0550a9ea7adb743a5b85634f1d76b73 (diff) |
Merge pull request #549 from emersion/output-enabled
Add wlr_output::enabled
Diffstat (limited to 'include')
-rw-r--r-- | include/backend/drm/iface.h | 2 | ||||
-rw-r--r-- | include/rootston/config.h | 1 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_output.h | 7 | ||||
-rw-r--r-- | include/wlr/types/wlr_output.h | 13 |
4 files changed, 12 insertions, 11 deletions
diff --git a/include/backend/drm/iface.h b/include/backend/drm/iface.h index bc61eb51..4a5d2e9d 100644 --- a/include/backend/drm/iface.h +++ b/include/backend/drm/iface.h @@ -15,7 +15,7 @@ struct wlr_drm_crtc; // Used to provide atomic or legacy DRM functions struct wlr_drm_interface { // Enable or disable DPMS for connector - void (*conn_enable)(struct wlr_drm_backend *drm, + bool (*conn_enable)(struct wlr_drm_backend *drm, struct wlr_drm_connector *conn, bool enable); // Pageflip on crtc. If mode is non-NULL perform a full modeset using it. bool (*crtc_pageflip)(struct wlr_drm_backend *drm, diff --git a/include/rootston/config.h b/include/rootston/config.h index bd24e577..05f23b75 100644 --- a/include/rootston/config.h +++ b/include/rootston/config.h @@ -7,6 +7,7 @@ struct roots_output_config { char *name; + bool enable; enum wl_output_transform transform; int x, y; float scale; diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index 6d71f9b6..d5837def 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -26,14 +26,11 @@ struct wlr_output_impl { }; void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend, - const struct wlr_output_impl *impl); -void wlr_output_free(struct wlr_output *output); + const struct wlr_output_impl *impl, struct wl_display *display); void wlr_output_update_mode(struct wlr_output *output, struct wlr_output_mode *mode); void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width, int32_t height, int32_t refresh); -struct wl_global *wlr_output_create_global(struct wlr_output *wlr_output, - struct wl_display *display); -void wlr_output_destroy_global(struct wlr_output *wlr_output); +void wlr_output_update_enabled(struct wlr_output *output, bool enabled); #endif diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 6374ae9b..71463cb5 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -36,19 +36,19 @@ struct wlr_output_impl; struct wlr_output { const struct wlr_output_impl *impl; struct wlr_backend *backend; + struct wl_display *display; struct wl_global *wl_global; struct wl_list wl_resources; - uint32_t flags; char name[16]; char make[48]; char model[16]; char serial[16]; - float scale; - int32_t width, height; - int32_t refresh; // mHz int32_t phys_width, phys_height; // mm + + bool enabled; + float scale; enum wl_output_subpixel subpixel; enum wl_output_transform transform; bool needs_swap; @@ -58,11 +58,14 @@ struct wlr_output { // Note: some backends may have zero modes struct wl_list modes; struct wlr_output_mode *current_mode; + int32_t width, height; + int32_t refresh; // mHz struct { struct wl_signal frame; struct wl_signal swap_buffers; - struct wl_signal resolution; + struct wl_signal enable; + struct wl_signal mode; struct wl_signal scale; struct wl_signal transform; struct wl_signal destroy; |