}
}
+static void
+_e_info_client_proc_video_shell(int argc, char **argv)
+{
+ char **args = &argv[2];
+
+ argc = argc - 2;
+ if (argc <= 0)
+ goto err;
+
+ if (strcmp(args[0], "--enable-border") == 0)
+ _e_info_client_eldbus_message_with_args(VIDEO_SHELL_BORDER_ENABLED_SET_METHOD_NAME, NULL, "b", EINA_TRUE);
+ else if (strcmp(args[0], "--disable-border") == 0)
+ _e_info_client_eldbus_message_with_args(VIDEO_SHELL_BORDER_ENABLED_SET_METHOD_NAME, NULL, "b", EINA_FALSE);
+ else
+ goto err;
+
+ return;
+err:
+ printf("video_shell: error: invalid argument\n");
+ printf("%s", USAGE_VIDEO_SHELL);
+}
+
typedef struct _ProcInfo
{
const char *option;
"Enable/Disable specific log",
_e_info_client_log_control
},
+ {
+ "video_shell",
+ USAGE_VIDEO_SHELL,
+ "The command for video shell",
+ _e_info_client_proc_video_shell,
+ },
};
ProcInfo procs_to_input[] =
#include "e_comp_input_intern.h"
#include "e_alpha_mask_rect_intern.h"
#include "e_display_intern.h"
+#include "e_video_shell_intern.h"
#include <tbm_bufmgr.h>
#include <tbm_surface.h>
return reply;
}
+static Eldbus_Message *
+_e_info_server_cb_video_shell_border_enabled_set(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
+{
+ Eldbus_Message *reply = eldbus_message_method_return_new(msg);
+ Eina_Bool enabled;
+
+ if (!eldbus_message_arguments_get(msg, "b", &enabled))
+ {
+ ERR("Error getting arguments.");
+ goto end;
+ }
+
+ e_video_shell_border_enabled_set(enabled);
+
+end:
+ return reply;
+}
+
//{ "method_name", arguments_from_client, return_values_to_client, _method_cb, ELDBUS_METHOD_FLAG },
static const Eldbus_Method methods[] = {
{ "get_window_info", NULL, ELDBUS_ARGS({"iiiiisiiia("VALUE_TYPE_FOR_TOPVWINS")", "array of ec"}), _e_info_server_cb_window_info_get, 0 },
{ "input_subtype_set", ELDBUS_ARGS({"ss", "set input device's subtype(subclas)"}), ELDBUS_ARGS({"s", "result message"}), _e_info_server_cb_input_subtype_set, 0 },
{ "kvm_transparent", ELDBUS_ARGS({"i", "set kvm service window to transparent"}), NULL, _e_info_server_cb_kvm_transparent_set, 0 },
{ "log_control", ELDBUS_ARGS({"s","log type" }, {"i", "enable"}), NULL, _e_info_server_cb_log_control, 0},
+ { VIDEO_SHELL_BORDER_ENABLED_SET_METHOD_NAME, ELDBUS_ARGS({"b", "enable border of video viewport"}), NULL, _e_info_server_cb_video_shell_border_enabled_set, 0},
{ NULL, NULL, NULL, NULL, 0 }
};
static const char *e_video_surface_role_name = "wtz_video_surface";
static Eina_Bool border_enabled = EINA_FALSE;
+static Eina_List *shells;
static void _source_viewport_destroyed(E_Video_Viewport_Source *source);
static void _source_viewport_committed(E_Video_Viewport_Source *source);
{
VS_INF("SHELL %p| Free", shell);
+ shells = eina_list_remove(shells, shell);
eina_hash_free(shell->viewports);
free(shell);
}
shell->display_destroy.notify = _video_shell_cb_display_destroy;
wl_display_add_destroy_listener(display, &shell->display_destroy);
+ shells = eina_list_append(shells, shell);
+
VS_INF("SHELL %p| Created", shell);
return shell;
EINTERN void
e_video_shell_border_enabled_set(Eina_Bool enabled)
{
+ E_Video_Shell *shell;
+ E_Video_Viewport *viewport;
+ Eina_Iterator *itr;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(shells, l, shell)
+ {
+ itr = eina_hash_iterator_data_new(shell->viewports);
+ EINA_ITERATOR_FOREACH(itr, viewport)
+ {
+ if (enabled)
+ {
+ _viewport_border_init(viewport);
+ _viewport_border_geometry_update(viewport);
+ }
+ else
+ {
+ _viewport_border_finish(viewport);
+ }
+ }
+ eina_iterator_free(itr);
+ }
+
border_enabled = enabled;
}
"\twinfo -log key_input_ttrace_enable 1\n" \
"\twinfo -log buffer_serial_log_enable 1\n"
+/* -------------------------------------------------------------------------- */
+/* VIDEO SHELL */
+/* -------------------------------------------------------------------------- */
+#define VIDEO_SHELL_BORDER_ENABLED_SET_METHOD_NAME "video_shell_border_enabled_set"
+#define USAGE_VIDEO_SHELL \
+ "-video_shell [OPTIONS]\n" \
+ "\t--enable-border : Enable video viewport border\n" \
+ "\t--disable-border : Disable video viewport border\n" \
+ "Example:\n" \
+ "\twinfo -video_shell --enable-border\n" \
+ "\twinfo -video_shell --dislable-border\n" \
+
#endif /* end of _E_INFO_SHARED_TYPES_ */