diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-05-14 10:07:58 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-05-14 10:48:31 +0900 |
commit | d31270592190870d13c98460d351697350c67cc2 (patch) | |
tree | 992e6dfbf349963311a0be67d0d848ca372621f8 /src/app.cpp | |
parent | e21c981f0ba536c5973bb91e9bf72c6b9d4bf9f2 (diff) |
[Local]:1st step for blocking sequence
* add new class to allocate window resource
* add new class for list to hold clients information
* change API of request surface
Change-Id: Ic39fa8908163d49b429125639189dd89812f94e9
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/app.cpp')
-rw-r--r-- | src/app.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/app.cpp b/src/app.cpp index 937da6a..53a645e 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -35,6 +35,8 @@ #include <regex> #include <thread> +#include "windowmanager-client.hpp" +#include "allocate_queue.hpp" namespace wm { @@ -58,6 +60,7 @@ const char kKeyHeightPixel[] = "height_pixel"; const char kKeyWidthMm[] = "width_mm"; const char kKeyHeightMm[] = "height_mm"; +static AllocateRequestList allocate_list; namespace { @@ -705,7 +708,7 @@ void App::emit_invisible(char const *label) { void App::emit_visible(char const *label) { return emit_visible(label, true); } -result<int> App::api_request_surface(char const *drawing_name) { +result<int> App::api_request_surface(char const *drawing_name, char const * appid, int flag) { auto lid = this->layers.get_layer_id(std::string(drawing_name)); if (!lid) { /** @@ -731,6 +734,10 @@ result<int> App::api_request_surface(char const *drawing_name) { HMI_DEBUG("wm", "Set main_surface id to %u", id); } + // add client into the db + WMClient* client = new WMClient(appid, *lid, id, drawing_name); // role is drawing_name for now + allocate_list.addClient(client); + return Ok<int>(id); } |