From a0a00ddd1a5d01566ffd145765a813814e20ae20 Mon Sep 17 00:00:00 2001 From: Yuta Doi Date: Fri, 22 Dec 2017 21:00:10 +0900 Subject: Add APIs which can get information about the display and the surface area getDisplayInfo() can get the display information as follows: - width[pixel] - height[pixel] - width[mm] - height[mm] NOTE: It uses wl_output::geometry() for getting physical width[mm] and height[mm] of the display, but the value is different with measured value. value from wl_output::geometry(): width:320 height:520 measured value : width:193 height:343 getAreaInfo() can get the information of area drawn by the application as follows: - x-coordinate - y-coordinate - width - height The details are described in doc/ApplicationGuide.md. Bug-AGL: SPEC-1087 Change-Id: I97c71b1618f9c8a799b14d9a0a53acfb27e1822d Signed-off-by: Yuta Doi --- src/wayland.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/wayland.hpp') diff --git a/src/wayland.hpp b/src/wayland.hpp index 619e47a..6e687ed 100644 --- a/src/wayland.hpp +++ b/src/wayland.hpp @@ -96,6 +96,8 @@ struct display { struct output : wayland_proxy { int width{}; int height{}; + int physical_width{}; + int physical_height{}; int refresh{}; int transform{}; @@ -250,7 +252,10 @@ struct controller : public wayland_proxy { layer_map_type layers; screen_map_type screens; - size output_size; + std::unique_ptr screen; + + size output_size; // Display size[pixel] + size physical_size; // Display size[mm] wm::controller_hooks *chooks; -- cgit 1.2.3-korg