summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-29 13:48:10 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-14 14:04:43 +0200
commit4a2c73eca3713fa049c86d021aae27ac66c4e481 (patch)
treebaf5ac05d4e071da897cf16c114580ef1563f75e
parentbcdcf57a93ac30b0aac23ed2fed9f71312cae5da (diff)
WIP: add enddraw() and deacrivate_surface() implementations.
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-rw-r--r--AFBClient.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/AFBClient.cpp b/AFBClient.cpp
index 6a57310..283e22c 100644
--- a/AFBClient.cpp
+++ b/AFBClient.cpp
@@ -67,7 +67,7 @@ int AFBClient::requestSurface(const char *label)
bool is_not_set;
};
- constexpr struct optional nullopt = {0, true};
+ constexpr struct optional const nullopt = {0, true};
auto id = nullopt;
/* send the request */
@@ -139,12 +139,20 @@ int AFBClient::dispatch(uint64_t timeout) {
void AFBClient::deactivateSurface(const char *label)
{
- UNUSED(label);
+ json_object *j = json_object_new_object();
+ json_object_object_add(j, "drawing_name", json_object_new_string(label));
+ call(AFBClient::wmAPI, "deactivate_surface", json_object_to_json_string(j));
+ json_object_put(j);
+ dispatch(-1);
}
void AFBClient::endDraw(const char *label)
{
- UNUSED(label);
+ json_object *j = json_object_new_object();
+ json_object_object_add(j, "drawing_name", json_object_new_string(label));
+ call(AFBClient::wmAPI, "enddraw", json_object_to_json_string(j));
+ json_object_put(j);
+ dispatch(-1);
}
/* called when wsj1 receives a method invocation */