return EINA_TRUE;
}
+
+EINTERN void
+e_comp_screen_debug_info_get(Eldbus_Message_Iter *iter)
+{
+ Eldbus_Message_Iter *line_array;
+ E_Comp_Screen *e_comp_screen = NULL;
+ E_Output *output = NULL;
+ E_Hwc *hwc = NULL;
+ Eina_List *l;
+ char info_str[1024];
+ int idx = 0;
+
+ e_comp_screen = e_comp->e_comp_screen;
+
+ eldbus_message_iter_arguments_append(iter, "as", &line_array);
+ if (!e_comp_screen)
+ {
+ eldbus_message_iter_basic_append(line_array,
+ 's',
+ "e_comp_screen not initialized..");
+ eldbus_message_iter_container_close(iter, line_array);
+ return;
+ }
+
+ eldbus_message_iter_basic_append(line_array, 's',
+ "==========================================================================================="
+ "=============================================================");
+ eldbus_message_iter_basic_append(line_array, 's',
+ " idx maker model name type status dpms subpixel align_w min max phy(mm)");
+ eldbus_message_iter_basic_append(line_array, 's',
+ "==========================================================================================="
+ "=============================================================");
+
+ EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
+ {
+ if (!output) continue;
+ hwc = output->hwc;
+ if (!output->hwc) continue;
+ if (e_hwc_policy_get(hwc) == E_HWC_POLICY_NONE) continue;
+
+ // TODO: need to implement more to show the specific information
+ snprintf(info_str, sizeof(info_str), "%d, %s", ++idx, "NOT IMPLEMENTED YET~!!! TODO::::");
+ eldbus_message_iter_basic_append(line_array, 's', info_str);
+ }
+
+ eldbus_message_iter_basic_append(line_array, 's',
+ "==========================================================================================="
+ "=============================================================");
+
+ eldbus_message_iter_container_close(iter, line_array);
+}
\ No newline at end of file
EINTERN Eina_List * e_comp_screen_pp_available_formats_get(void);
E_API Eina_Bool e_comp_screen_available_video_formats_get(const tbm_format **formats, int *count);
+EINTERN void e_comp_screen_debug_info_get(Eldbus_Message_Iter *iter);
#endif /*E_COMP_SCREEN_H*/
return;
}
+static void
+_cb_screen_info_get(const Eldbus_Message *msg)
+{
+ const char *name = NULL, *text = NULL;
+ Eina_Bool res;
+ Eldbus_Message_Iter *lines;
+ char *result = NULL;
+
+ res = eldbus_message_error_get(msg, &name, &text);
+ if (res) goto finish;
+
+ res = eldbus_message_arguments_get(msg, "as", &lines);
+ if (!res) goto finish;
+
+ while (eldbus_message_iter_get_and_next(lines, 's', &result))
+ printf("%s\n", result);
+
+ return;
+
+finish:
+ if ((name) || (text))
+ {
+ printf("errname:%s errmsg:%s\n", name, text);
+ }
+}
+
+static void
+_e_info_client_proc_screen_info(int argc, char **argv)
+{
+ Eina_Bool res;
+ int dummy_value = 1;
+
+ res = _e_info_client_eldbus_message_with_args("screen_info", _cb_screen_info_get, "i", dummy_value);
+
+ EINA_SAFETY_ON_FALSE_RETURN(res);
+
+ return;
+}
+
typedef struct _ProcInfo
{
const char *option;
"Print hwc windows information",
_e_info_client_proc_hwc_wins
},
+ {
+ "screen_info",
+ NULL,
+ "Print screen and output information",
+ _e_info_client_proc_screen_info
+ },
};
static ProcInfo procs_to_execute[] =
return reply;
}
+static Eldbus_Message *
+_e_info_server_cb_screen_info_get(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
+{
+ Eldbus_Message *reply;
+ E_Hwc_Wins_Debug_Cmd cmd;
+
+ if (!eldbus_message_arguments_get(msg, "i", &cmd))
+ {
+ return eldbus_message_error_new(msg, GET_CALL_MSG_ARG_ERR,
+ "screen_info: an attempt to get arguments from method call message failed");
+ }
+
+ reply = eldbus_message_method_return_new(msg);
+ e_comp_screen_debug_info_get(eldbus_message_iter_get(reply));
+
+ 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 },
{ "magnifier", ELDBUS_ARGS({"i", "magnifier"}), NULL, e_info_server_cb_magnifier, 0},
{ "input_region", ELDBUS_ARGS({"siiii", "options"}), ELDBUS_ARGS({"a(iiii)", "path"}), _e_info_server_cb_input_region, 0},
{ "hwc_wins", ELDBUS_ARGS({"i", "option"}), ELDBUS_ARGS({"as", "hwc wins info"}), _e_info_server_cb_hwc_wins_info_get, 0 },
+ { "screen_info", ELDBUS_ARGS({"i", "option"}), ELDBUS_ARGS({"as", "screen info"}), _e_info_server_cb_screen_info_get, 0 },
{ NULL, NULL, NULL, NULL, 0 }
};
E_INFO_FPS_TYPE_HWC_COMP,
} E_Info_Fps_Type;
+/* -------------------------------------------------------------------------- */
+/* SCREEN INFO */
+/* -------------------------------------------------------------------------- */
+#define USAGE_SCREEN_INFO \
+ "-screen_info\n" \
+ "Example:\n" \
+ "\twinfo -screen_info\n"
+
#endif /* end of _E_INFO_SHARED_TYPES_ */