static void _cb_method_transient_for_below(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
static void _cb_method_aux_hint_get(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
static void _cb_method_configured_output_resolution(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
+static void _cb_method_screen_size_get(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
/* callbacks - signal */
static void _cb_signal_vis_changed(void *data, const Eldbus_Message *msg);
return !!coutres_set;
}
+Eina_Bool
+etRunner::getScreenSize(int *width, int *height)
+{
+ Eldbus_Pending *p = NULL;
+ E_TC_Rectangle geom = {0,};
+ Eina_Bool res = EINA_FALSE;
+
+ if (width) *width = 0;
+ if (height) *height = 0;
+
+ p = eldbus_proxy_call(dbus.ds_proxy,
+ "GetScreenSize",
+ _cb_method_screen_size_get,
+ &geom,
+ -1,
+ "");
+ EINA_SAFETY_ON_NULL_RETURN_VAL(p, EINA_FALSE);
+
+ work();
+
+ if (geom.w > 0 && geom.h > 0)
+ {
+ if (width) *width = geom.w;
+ if (height) *height = geom.h;
+ res = EINA_TRUE;
+ }
+
+ return res;
+}
+
Eina_Bool
etRunner::setWinIconic(etWin *tw,
Eina_Bool set)
etRunner::get().finishWork();
}
+static void
+_cb_method_screen_size_get(void *data,
+ const Eldbus_Message *msg,
+ Eldbus_Pending *p)
+{
+ const char *name = NULL, *text = NULL;
+ Eina_Bool res = EINA_FALSE;
+ E_TC_Rectangle *geom = (E_TC_Rectangle *)data;
+
+ geom->w = 0;
+ geom->h = 0;
+
+ res = eldbus_message_error_get(msg, &name, &text);
+ EINA_SAFETY_ON_TRUE_GOTO(res, finish);
+
+ res = eldbus_message_arguments_get(msg, "ii", &geom->w, &geom->h);
+
+finish:
+ if ((name) || (text))
+ {
+ ERR("errname: %s errmsg: %s\n", name, text);
+ }
+
+ etRunner::get().finishWork();
+}
+
/* callbacks - signal */
static void
_cb_signal_vis_changed(void *data,