+ HMI_NOTICE("trace");
+ if(afb_event_is_valid(this->evname2afb_event[kSyncDraw]))
+ {
+ json_object *j_rect = json_object_new_object();
+ json_object_object_add(j_rect, kKeyX, json_object_new_int(r.x));
+ json_object_object_add(j_rect, kKeyY, json_object_new_int(r.y));
+ json_object_object_add(j_rect, kKeyWidth, json_object_new_int(r.w));
+ json_object_object_add(j_rect, kKeyHeight, json_object_new_int(r.h));
+
+ json_object* j = json_object_new_object();
+ json_object_object_add(j, kKeyRole, json_object_new_string(this->role().c_str()));
+ json_object_object_add(j, kKeyDrawingName, json_object_new_string(this->role().c_str()));
+ json_object_object_add(j, kKeyDrawingArea, json_object_new_string(area.c_str()));
+ json_object_object_add(j, kKeyArea, json_object_new_string(this->role().c_str()));
+
+ json_object_object_add(j, kKeyDrawingRect, j_rect);
+ afb_event_push(this->evname2afb_event[kSyncDraw], j);
+ }
+ else
+ {
+ HMI_ERROR("Failed to send %s", __func__);
+ }
+}
+
+void WMClient::emitFlushDraw()
+{
+ if(afb_event_is_valid(this->evname2afb_event[kFlushDraw]))
+ {
+ json_object* j = json_object_new_object();
+ json_object_object_add(j, kKeyRole, json_object_new_string(this->role().c_str()));
+ json_object_object_add(j, kKeyDrawingName, json_object_new_string(this->role().c_str()));
+ afb_event_push(this->evname2afb_event[kFlushDraw], nullptr);
+ }
+ else
+ {
+ HMI_ERROR("Failed to send %s", __func__);
+ }
+}
+
+void WMClient::emitError(WMError error)
+{
+ if (!afb_event_is_valid(this->evname2afb_event[kKeyError])){