aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-12 19:22:38 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-12 19:33:24 +0000
commit74f723e0cf932fc7f734ec994f8f4612a8df5a02 (patch)
tree68e41959c5e8ed27317372dd4ba0ef75081e7fef /terminal.h
parentrender: fix foreground color for non-block cursor (diff)
output: initial support for output scaling
* Not updated run-time; only scale at start up used * Multiple monitors (outputs) not supported, as we can't track which output we're on (yet).
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index 9badf1c4..03e1584f 100644
--- a/terminal.h
+++ b/terminal.h
@@ -20,6 +20,23 @@
#define likely(c) __builtin_expect(!!(c), 1)
#define unlikely(c) __builtin_expect(!!(c), 0)
+struct monitor {
+ struct wl_output *output;
+ struct zxdg_output_v1 *xdg;
+ char *name;
+
+ int x;
+ int y;
+
+ int width_mm;
+ int height_mm;
+
+ int width_px;
+ int height_px;
+
+ int scale;
+};
+
struct wayland {
struct wl_display *display;
struct wl_registry *registry;
@@ -27,6 +44,7 @@ struct wayland {
struct wl_surface *surface;
struct wl_shm *shm;
struct wl_seat *seat;
+ struct zxdg_output_manager_v1 *xdg_output_manager;
struct wl_data_device_manager *data_device_manager;
struct wl_data_device *data_device;
struct zwp_primary_selection_device_manager_v1 *primary_selection_device_manager;
@@ -44,6 +62,7 @@ struct wayland {
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
bool have_argb8888;
+ tll(struct monitor) monitors;
};
struct rgb { float r, g, b; };
@@ -246,6 +265,7 @@ struct terminal {
struct vt vt;
struct kbd kbd;
+ int scale;
int width; /* pixels */
int height; /* pixels */
int cols; /* number of columns */