#include "e_info_server_intern.h"
#include "e_utils_intern.h"
#include "e_hints_intern.h"
+#include "e_appinfo_intern.h"
#define BUS "org.enlightenment.wm"
#define PATH "/org/enlightenment/wm"
static Eldbus_Message *_e_test_helper_cb_add_supported_aux_hint(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
static Eldbus_Message *_e_test_helper_cb_del_supported_aux_hint(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
static Eldbus_Message *_e_test_helper_cb_get_aux_hint(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
+static Eldbus_Message *_e_test_helper_cb_set_configured_output_resolution(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
+static Eldbus_Message *_e_test_helper_cb_set_base_output_resolution(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
static Eina_Bool _e_test_helper_cb_img_render(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
static Eina_Bool _e_test_helper_cb_effect_start(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
static Eina_Bool _e_test_helper_cb_effect_end(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
ELDBUS_ARGS({"iss", "id, name, value"}),
_e_test_helper_cb_get_aux_hint, 0,
},
+ {
+ "SetConfiguredOutputResolution",
+ ELDBUS_ARGS({"iii", "set or unset, width, height of configured output resolution"}),
+ ELDBUS_ARGS({"i", "configured output resolution is set or not"}),
+ _e_test_helper_cb_set_configured_output_resolution, 0,
+ },
+ {
+ "SetBasedOutputResolution",
+ ELDBUS_ARGS({"iiii", "window ID, set or unset, width, height of configured output resolution"}),
+ ELDBUS_ARGS({"i", "configured output resolution is set or not"}),
+ _e_test_helper_cb_set_base_output_resolution, 0,
+ },
{ }
};
return reply;
}
+static Eldbus_Message *
+_e_test_helper_cb_set_configured_output_resolution(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
+{
+ Eldbus_Message *reply = eldbus_message_method_return_new(msg);
+ int set = 0, w = 0, h = 0;
+
+ if (!eldbus_message_arguments_get(msg, "iii", &set, &w, &h))
+ {
+ ERR("error on eldbus_message_arguments_get()\n");
+ goto fin;
+ }
+
+ if (!th_data) goto fin;
+
+ e_config->configured_output_resolution.use = set;
+ if (set)
+ {
+ e_config->configured_output_resolution.w = w;
+ e_config->configured_output_resolution.h = h;
+ ELOGF("TEST", "set configutred output resolution to %dx%d", NULL, w, h);
+ }
+ else
+ ELOGF("TEST", "unset configutred output resolution", NULL);
+
+fin:
+ eldbus_message_arguments_append(reply, "i", set);
+
+ return reply;
+}
+
+static Eldbus_Message *
+_e_test_helper_cb_set_base_output_resolution(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
+{
+ Eldbus_Message *reply = eldbus_message_method_return_new(msg);
+ pid_t pid = 0;
+ E_Appinfo *eai = NULL;
+ int set = 0, w = 0, h = 0;
+
+ if (!eldbus_message_arguments_get(msg, "iiii", &pid, &set, &w, &h))
+ {
+ ERR("error on eldbus_message_arguments_get()\n");
+ goto fin;
+ }
+
+ if (!th_data) goto fin;
+ if (pid <= 0) goto fin;
+
+ eai = e_appinfo_find_with_pid(pid);
+
+ if (set)
+ {
+ e_appinfo_base_output_resolution_set(eai, w, h);
+ ELOGF("TEST", "set base output resolution of eai(pid:%d): %p to %dx%d", NULL, pid, eai, w, h);
+ }
+ else
+ {
+ e_appinfo_base_output_resolution_set(eai, 0, 0);
+ ELOGF("TEST", "unset base output resolution of eai(pid:%d): %p", NULL, pid, eai);
+ }
+
+fin:
+ eldbus_message_arguments_append(reply, "i", set);
+
+ return reply;
+}
+
static Eina_Bool
_e_test_helper_cb_img_render(void *data EINA_UNUSED,
int type EINA_UNUSED,