Compare commits

...

35 Commits

Author SHA1 Message Date
Daniel Zaoui ee7396c007 Fix classes lookup 2017-06-06 10:28:31 +03:00
Daniel Zaoui 4bb2424f9e Remove unused include 2017-06-06 10:28:31 +03:00
Daniel Zaoui 962a0b5067 Remove old library usage 2017-06-06 10:28:31 +03:00
Daniel Zaoui 94e32a55dd Free buffers after sending them 2017-06-06 10:28:31 +03:00
Daniel Zaoui 1fc93e92ae Adapt opcodes registration for Windows 2017-06-06 10:28:31 +03:00
Daniel Zaoui fbf83cc256 Support endianness 2017-06-06 10:28:31 +03:00
Daniel Zaoui 45a804aad1 Rename opcodes strings for a better readability 2017-06-06 10:28:31 +03:00
Daniel Zaoui 1012d73b8c Adapt code to EFL changes 2017-06-06 10:28:31 +03:00
Daniel Zaoui daaba2c6c1 Use Eo iterators 2017-06-06 10:28:31 +03:00
Daniel Zaoui 7e894d1e69 Fix coverity issues 2017-06-06 10:28:31 +03:00
Daniel Zaoui dc659a2566 Adapt to EFL changes 2017-06-06 10:28:31 +03:00
Daniel Zaoui 3efc1b954e Use better names for daemon operations 2017-06-06 10:28:31 +03:00
Daniel Zaoui dec2755b2e Replace remote profile support with remote port 2017-06-06 10:28:31 +03:00
Daniel Zaoui 4cd8a71e05 Set title 2017-06-06 10:28:31 +03:00
Daniel Zaoui a35cbb82ea Merge the Eo/Evas/Eolian into Clouseau 2017-06-06 10:28:31 +03:00
Daniel Zaoui 5d4e377378 Adapt remote connection to latest EFL changes 2017-06-06 10:28:31 +03:00
Daniel Zaoui ddf3c0b1d7 EvLog: support direct recording from the application 2017-06-06 10:28:31 +03:00
Daniel Zaoui 92eb15ef8e Fix main UI 2017-06-06 10:28:31 +03:00
Daniel Zaoui 01b061c9b2 Add evlog.edc and install data images 2017-06-06 10:28:31 +03:00
Daniel Zaoui 290a43b377 Support storing snapshot of all the running extensions into one file
When the user wants to save the data (snapshot), Clouseau requests from
every running extension the data that is "exported".
All the data are then encapsulated into one single file.
The first idea was to use EET to store the extensions blobs as basic var
arrays. But it was taking so much time that is has been chosen that the
data itself is appended in the file after the EET blob. This one only
contains the app name/pid and the number of bytes of the blob, per
extension.
Additionnally, the objects introspection extension has been modified to
behave as the first Clouseau, i.e taking all the objects information in
one shot and using it during the interaction with the user.
The Save/Load button is now a part of the main toolbar.
2017-06-06 10:28:31 +03:00
Daniel Zaoui 2388fde7ed evlog: support data import 2017-06-06 10:28:31 +03:00
Daniel Zaoui ec13d9020f Resurrect the -f option
It has been removed when the extentions feature has been introduced.

Now, when -f is used in the command line, a list of extensions is
displayed to request the user to choose the extension that needs to
handle this file.
2017-06-06 10:28:31 +03:00
Daniel Zaoui ee6fbd81ea Support of evlog as an extension 2017-06-06 10:28:31 +03:00
Daniel Zaoui 4b2c77e47b Introduce the extensions feature
The objects introspection, that has always been as a core part, is now
an extension, and can be not used.
The directories structure allows other extensions to be developed inside
the Clouseau tree, even if they can be developed outside.

Other extensions will be added and the extensions feature will be
adapted to fit all their requirements.
2017-06-06 10:28:31 +03:00
Daniel Zaoui 8a53045b0d Remove unused code 2017-06-06 10:28:31 +03:00
Daniel Zaoui 0f4a910465 Move Clouseau module inside this repository 2017-06-06 10:28:31 +03:00
Daniel Zaoui 6160da735f Support remote connection 2017-06-06 10:28:31 +03:00
Daniel Zaoui 7d65920fbd Remove fake session use
All can be done without the intervention of Eina_Debug. We just need to
dispatch the packets by their own opcode.
2017-06-06 10:28:31 +03:00
Daniel Zaoui 7db88770c7 Redesign the tools bar
Now a toolbar widget is used instead of a box.
The settings window has been replaced by a menu, as well as the apps and
connection hoversels.
2017-06-06 10:28:31 +03:00
Daniel Zaoui 6865c7f810 Support screenshots save in snapshot file 2017-06-06 10:28:31 +03:00
Daniel Zaoui 67a9ff31ee Adapt to Evas Debug changes 2017-06-06 10:28:31 +03:00
Daniel Zaoui a2dab74f46 Implement snapshot load 2017-06-06 10:28:31 +03:00
Daniel Zaoui 20dd69752c Improve object info access code 2017-06-06 10:28:31 +03:00
Daniel Zaoui 0d4673d08f Add snapshot save feature
It doesn't save the screenshots yet. Should be done soon.

During save, the UI is frozen until the last packet is received.

The snapshot file contains info about the application, opcodes that will
be needed during loading and the buffers received from the application
describing the objects and their information.
2017-06-06 10:28:31 +03:00
Daniel Zaoui fcffa64078 Store apps info into a decicated structure 2017-06-06 10:28:31 +03:00
19 changed files with 5123 additions and 1520 deletions

View File

@ -3,6 +3,10 @@ cmake_minimum_required(VERSION 2.8.1)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
project(CLOUSEAU)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
set(DEBUG_COMMON_DEFINITIONS -DEFL_EO_API_SUPPORT -DEFL_BETA_API_SUPPORT)
add_definitions(${DEBUG_COMMON_DEFINITIONS})
find_package(Efl REQUIRED)
find_package(Eina REQUIRED)
@ -13,6 +17,10 @@ find_package(Eo REQUIRED)
find_package(Elementary REQUIRED)
find_package(Ecore REQUIRED)
find_package(Evas REQUIRED)
find_package(Edebug REQUIRED)
find_package(Ffi REQUIRED)
add_subdirectory(src/bin)
add_subdirectory(src/lib)
add_subdirectory(data)
add_dependencies(clouseau_evlog clouseau_evlog_edj)

15
data/CMakeLists.txt Normal file
View File

@ -0,0 +1,15 @@
add_custom_command (
OUTPUT clouseau_evlog.edj
COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_SOURCE_DIR}/evlog.edc clouseau_evlog.edj
DEPENDS evlog.edc
)
add_custom_target (
clouseau_evlog_edj
DEPENDS clouseau_evlog.edj evlog.edc
)
install (
FILES ${CMAKE_CURRENT_BINARY_DIR}/clouseau_evlog.edj images/show-screenshot.png images/take-screenshot.png
DESTINATION share/${PROJECT_NAME_LOWER}
)

138
data/evlog.edc Normal file
View File

@ -0,0 +1,138 @@
#define TILED_PATTERN(_WIDTH, _HEIGHT) \
fill { size { relative: 0.0 0.0; offset: _WIDTH _HEIGHT; } }
collections {
images.image: "box_glow.png" COMP;
images.image: "box_outline.png" COMP;
group { name: "range";
parts {
part { name: "bg"; type: RECT;
description { state: "default" 0.0;
rel1.offset: 1 1;
rel2.offset: -2 -2;
color_class: "range";
}
}
part { name: "text"; type: TEXT;
scale: 1;
description { state: "default" 0.0;
rel1.to: "bg";
rel2.to: "bg";
color: 255 255 255 255;
text { font: "Sans"; size: 10;
min: 0 1;
align: 0.0 1.0;
}
}
}
}
}
group { name: "cpufreq";
parts {
part { name: "bg"; type: RECT;
description { state: "default" 0.0;
// rel1.offset: 1 1;
// rel2.offset: -2 -2;
color_class: "range";
}
}
}
}
group { name: "cpuused";
parts {
part { name: "bg"; type: RECT;
description { state: "default" 0.0;
// rel1.offset: 1 1;
// rel2.offset: -2 -2;
color_class: "range";
}
}
}
}
images.image: "diagonal_stripes.png" COMP;
group { name: "state";
parts {
part { name: "bg";
description { state: "default" 0.0;
rel1.offset: 1 1;
rel2.offset: -2 -2;
color_class: "state";
TILED_PATTERN(240, 240)
image.normal: "diagonal_stripes.png";
}
}
part { name: "text"; type: TEXT;
scale: 1;
description { state: "default" 0.0;
rel1.to: "bg";
rel2.to: "bg";
color: 255 255 255 255;
text { font: "Sans"; size: 10;
min: 0 1;
align: 0.0 1.0;
}
}
}
}
}
images.image: "handle_pick_up_right.png" COMP;
group { name: "frame";
parts {
part { name: "base"; type: RECT;
description { state: "default" 0.0;
color: 51 153 255 128;
min: 1 1;
}
}
part { name: "bg";
description { state: "default" 0.0;
image.normal: "handle_pick_up_right.png";
rel1.offset: -12 -11;
rel1.relative: 0.0 1.0;
rel2.offset: -12 -11;
rel2.relative: 0.0 1.0;
align: 0.0 0.0;
min: 42 54;
max: 42 54;
}
}
}
}
group { name: "event";
parts {
part { name: "base"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
color_class: "event";
min: 1 1;
}
}
part { name: "over"; type: RECT;
description { state: "default" 0.0;
color: 0 0 0 0;
min: 5 1;
}
}
part { name: "text"; type: TEXT;
scale: 1;
description { state: "default" 0.0;
rel1.relative: 0.0 1.0;
rel2.relative: 1.0 1.0;
align: 0.5 0.0;
color_class: "event";
text { font: "Sans"; size: 10;
min: 1 1;
align: 0.5 0.0;
}
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -2,23 +2,20 @@ set(CMAKE_BUILD_TYPE Debug)
LIST(APPEND SOURCES clouseau_client.c gui.c)
STRING(REGEX REPLACE "\n" "" EOLIAN_EO_DIR ${EOLIAN_EO_DIR})
STRING(REGEX REPLACE " " "" EOLIAN_EO_DIR ${EOLIAN_EO_DIR})
add_definitions(${CLI_COMMON_DEFINITIONS} -DEFL_EO_API_SUPPORT
-DEOLIAN_EO_DIR="${EOLIAN_EO_DIR}" -DGUI_IMAGES_PATH="${CMAKE_HOME_DIRECTORY}/data/images")
add_definitions(-DEFL_EO_API_SUPPORT -DGUI_IMAGES_PATH="${CMAKE_INSTALL_PREFIX}/data/images")
add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
link_directories (${PC_LIBELEMENTARY_LIBRARY_DIRS})
include_directories(
${CMAKE_SOURCE_DIR}/src/lib
${ELEMENTARY_INCLUDE_DIRS}
${EINA_INCLUDE_DIRS}
${EET_INCLUDE_DIRS}
${EFREET_INCLUDE_DIRS}
${EO_INCLUDE_DIRS}
${EOLIAN_INCLUDE_DIRS}
${ECORE_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${EDEBUG_INCLUDE_DIRS}
)
set(EOLIAN_INCLUDE_FLAG -I \"${EOLIAN_EO_DIR}/eo-1\" -I${CMAKE_CURRENT_SOURCE_DIR})
@ -27,16 +24,15 @@ add_executable(clouseau_client ${SOURCES})
target_link_libraries(clouseau_client
pthread
clouseau_debug
${EFL_LIBRARIES}
${ELEMENTARY_LIBRARIES}
${EINA_LIBRARIES}
${EET_LIBRARIES}
${EFREET_LIBRARIES}
${EO_LIBRARIES}
${EOLIAN_LIBRARIES}
${ECORE_LIBRARIES}
${EVAS_LIBRARIES}
${EDEBUG_LIBRARIES}
ecore_file
)

File diff suppressed because it is too large Load Diff

View File

@ -13,37 +13,12 @@
#include "elm_interface_fileselector.h"
#include "gui.h"
static Gui_Widgets g_pub_widgets;
extern void gui_new_profile_win_create_done(Gui_New_Profile_Win_Widgets *wdgs);
extern void gui_config_win_widgets_done(Gui_Config_Win_Widgets *wdgs);
#ifdef GUI_IMAGES_PATH
const char *SHOW_SCREENSHOT_ICON = GUI_IMAGES_PATH"/show-screenshot.png";
const char *TAKE_SCREENSHOT_ICON = GUI_IMAGES_PATH"/take-screenshot.png";
#else
#error "Please define GUI_IMAGES_PATH"
#endif
extern void
new_profile_save_cb(void *data, const Efl_Event *event);
conn_menu_show(void *data, Evas_Object *obj, void *event_info);
extern void
screenshot_req_cb(void *data, const Efl_Event *event);
save_load_perform(void *data, Evas_Object *obj, void *event_info);
extern void
config_ok_button_clicked(void *data, const Efl_Event *event);
extern void
conn_menu_show(void *data, const Efl_Event *event);
extern void
load_perform(void *data, const Efl_Event *event);
extern void
jump_entry_changed(void *data, const Efl_Event *event);
extern void
take_screenshot_button_clicked(void *data, const Efl_Event *event);
extern void
show_screenshot_button_clicked(void *data, const Efl_Event *event);
static void
_config_open(void *data, const Efl_Event *event);
remote_port_entry_changed(void *data, const Efl_Event *event);
static void
_pubs_free_cb(void *data, const Efl_Event *event EINA_UNUSED)
@ -57,450 +32,109 @@ gui_main_win_create(Eo *__main_parent)
Gui_Main_Win_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Eo *main_win;
Eo *elm_bg1;
Eo *elm_box1;
Eo *bar_box;
Eo *conn_selector;
Eo *conn_selector_menu;
Eo *load_button;
Eo *apps_selector;
Eo *jump_to_entry;
Eo *extensions_bt;
Eo *settings_bt;
Eo *save_bt;
Eo *elm_panes1;
Eo *object_infos_list;
Eo *objects_list;
Eo *bg;
Eo *main_box, *ext_box;
Eo *tb;
Eo *ext_selector;
Eo *freeze_pulse;
Eo *freeze_inwin;
main_win = elm_win_add(__main_parent, "Window", ELM_WIN_BASIC);
pub_widgets->main_win = main_win;
elm_win_autodel_set(main_win, EINA_TRUE);
evas_object_size_hint_weight_set(main_win, 1.000000, 1.000000);
elm_win_title_set(main_win, "Clouseau");
efl_gfx_size_set(main_win, 478, 484);
elm_bg1 = efl_add(ELM_BG_CLASS, main_win);
evas_object_size_hint_weight_set(elm_bg1, 1.000000, 1.000000);
efl_gfx_visible_set(elm_bg1, EINA_TRUE);
efl_gfx_position_set(elm_bg1, 0, 0);
elm_box1 = elm_box_add(main_win);
evas_object_size_hint_weight_set(elm_box1, 1.000000, 1.000000);
efl_gfx_visible_set(elm_box1, EINA_TRUE);
efl_gfx_size_set(elm_box1, 643, 598);
efl_gfx_position_set(elm_box1, -7, -2);
elm_box_padding_set(elm_box1, 0, 0);
elm_box_align_set(elm_box1, 0.000000, 0.000000);
elm_win_resize_object_add(main_win, elm_bg1);
elm_win_resize_object_add(main_win, elm_box1);
bg = efl_add(ELM_BG_CLASS, main_win);
evas_object_size_hint_weight_set(bg, 1.000000, 1.000000);
efl_gfx_visible_set(bg, EINA_TRUE);
efl_gfx_position_set(bg, 0, 0);
elm_win_resize_object_add(main_win, bg);
bar_box = elm_box_add(main_win);
pub_widgets->bar_box = bar_box;
elm_box_horizontal_set(bar_box, EINA_TRUE);
evas_object_size_hint_weight_set(bar_box, 1.000000, 0.000000);
evas_object_size_hint_align_set(bar_box, -1.00000, -1.000000);
efl_gfx_visible_set(bar_box, EINA_TRUE);
main_box = elm_box_add(main_win);
evas_object_size_hint_weight_set(main_box, 1.000000, 1.000000);
efl_gfx_visible_set(main_box, EINA_TRUE);
elm_win_resize_object_add(main_win, main_box);
conn_selector = elm_button_add(bar_box);
pub_widgets->conn_selector = conn_selector;
evas_object_size_hint_weight_set(conn_selector, 1.000000, 1.000000);
evas_object_size_hint_align_set(conn_selector, -1.000000, -1.000000);
efl_gfx_visible_set(conn_selector, EINA_TRUE);
elm_box_pack_end(bar_box, conn_selector);
efl_event_callback_add(conn_selector, EFL_UI_EVENT_CLICKED, conn_menu_show, NULL);
tb = elm_toolbar_add(main_win);
elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_MENU);
evas_object_size_hint_weight_set(tb, 0, 0);
evas_object_size_hint_align_set(tb, -1, 0);
elm_toolbar_menu_parent_set(tb, main_win);
conn_selector_menu = elm_menu_add(main_win);
pub_widgets->conn_selector_menu = conn_selector_menu;
pub_widgets->conn_selector = elm_toolbar_item_append(tb, "call-start", "Connection", NULL, NULL);
elm_toolbar_item_menu_set(pub_widgets->conn_selector, EINA_TRUE);
load_button = elm_button_add(bar_box);
pub_widgets->load_button = load_button;
evas_object_size_hint_weight_set(load_button, 1.000000, 1.000000);
evas_object_size_hint_align_set(load_button, -1.000000, -1.000000);
efl_gfx_visible_set(load_button, EINA_TRUE);
elm_box_pack_end(bar_box, load_button);
efl_event_callback_add(load_button, EFL_UI_EVENT_CLICKED, load_perform, NULL);
pub_widgets->conn_selector_menu = elm_toolbar_item_menu_get(pub_widgets->conn_selector);
apps_selector = elm_hoversel_add(main_win);
pub_widgets->apps_selector = apps_selector;
evas_object_size_hint_weight_set(apps_selector, 1.000000, 1.000000);
evas_object_size_hint_align_set(apps_selector, -1.00000, -1.000000);
efl_gfx_visible_set(apps_selector, EINA_TRUE);
elm_obj_widget_part_text_set(apps_selector, NULL, "Select App");
elm_box_pack_end(bar_box, apps_selector);
pub_widgets->apps_selector = elm_toolbar_item_append(tb, "view-list-details", "Select App", NULL, NULL);
elm_toolbar_item_menu_set(pub_widgets->apps_selector, EINA_TRUE);
jump_to_entry = elm_entry_add(bar_box);
elm_entry_scrollable_set(jump_to_entry, EINA_TRUE);
elm_entry_single_line_set(jump_to_entry, EINA_TRUE);
elm_object_part_text_set(jump_to_entry, "guide", "Jump To Pointer");
evas_object_size_hint_align_set(jump_to_entry,
EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(jump_to_entry,
EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(bar_box, jump_to_entry);
evas_object_show(jump_to_entry);
efl_event_callback_add(jump_to_entry, ELM_ENTRY_EVENT_ACTIVATED, jump_entry_changed, NULL);
pub_widgets->apps_selector_menu = elm_toolbar_item_menu_get(pub_widgets->apps_selector);
extensions_bt = elm_button_add(bar_box);
evas_object_size_hint_weight_set(extensions_bt, 1.000000, 1.000000);
evas_object_size_hint_align_set(extensions_bt, -1.00000, -1.000000);
efl_gfx_visible_set(extensions_bt, EINA_TRUE);
elm_obj_widget_part_text_set(extensions_bt, NULL, "Extensions");
elm_box_pack_end(bar_box, extensions_bt);
pub_widgets->save_load_bt = elm_toolbar_item_append(tb, "document-export", "Save", save_load_perform, NULL);
settings_bt = elm_button_add(bar_box);
evas_object_size_hint_weight_set(settings_bt, 1.000000, 1.000000);
evas_object_size_hint_align_set(settings_bt, -1.00000, -1.000000);
efl_gfx_visible_set(settings_bt, EINA_TRUE);
elm_obj_widget_part_text_set(settings_bt, NULL, "Settings");
elm_box_pack_end(bar_box, settings_bt);
efl_event_callback_add(settings_bt, EFL_UI_EVENT_CLICKED, _config_open, main_win);
ext_selector = elm_toolbar_item_append(tb, "system-reboot", "Extensions", NULL, NULL);
elm_toolbar_item_menu_set(ext_selector, EINA_TRUE);
save_bt = elm_button_add(bar_box);
pub_widgets->save_bt = save_bt;
evas_object_size_hint_weight_set(save_bt, 1.000000, 1.000000);
evas_object_size_hint_align_set(save_bt, -1.00000, -1.000000);
elm_obj_widget_part_text_set(save_bt, NULL, "Save");
pub_widgets->ext_selector_menu = elm_toolbar_item_menu_get(ext_selector);
Eo *settings_it = elm_toolbar_item_append(tb, "system-run", "Settings", NULL, NULL);
elm_toolbar_item_menu_set(settings_it, EINA_TRUE);
elm_box_pack_end(main_box, tb);
efl_gfx_visible_set(tb, EINA_TRUE);
freeze_pulse = elm_progressbar_add(main_win);
pub_widgets->freeze_pulse = freeze_pulse;
elm_object_style_set(freeze_pulse, "wheel");
elm_object_text_set(freeze_pulse, "Style: wheel");
elm_progressbar_pulse_set(freeze_pulse, EINA_TRUE);
elm_progressbar_pulse(freeze_pulse, EINA_FALSE);
evas_object_size_hint_align_set(freeze_pulse, 0.5, 0.0);
evas_object_size_hint_weight_set(freeze_pulse, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(main_win, freeze_pulse);
ext_box = elm_box_add(main_box);
pub_widgets->ext_box = ext_box;
evas_object_size_hint_weight_set(ext_box, 1.000000, 1.000000);
evas_object_size_hint_align_set(ext_box, -1.000000, -1.000000);
efl_gfx_visible_set(ext_box, EINA_TRUE);
elm_box_pack_end(main_box, ext_box);
freeze_inwin = elm_win_inwin_add(main_win);
pub_widgets->freeze_inwin = freeze_inwin;
elm_object_style_set(freeze_inwin, "minimal");
elm_panes1 = efl_add(ELM_PANES_CLASS, elm_box1);
elm_obj_panes_content_right_size_set(elm_panes1, 0.600000);
evas_object_size_hint_weight_set(elm_panes1, 1.000000, 1.000000);
efl_gfx_size_set(elm_panes1, 75, 75);
efl_gfx_visible_set(elm_panes1, EINA_TRUE);
evas_object_size_hint_weight_set(elm_panes1, 1.000000, 1.000000);
evas_object_size_hint_align_set(elm_panes1, -1.000000, -1.000000);
elm_box_pack_end(elm_box1, bar_box);
elm_box_pack_end(elm_box1, elm_panes1);
object_infos_list = elm_genlist_add(elm_panes1);
pub_widgets->object_infos_list = object_infos_list;
evas_object_size_hint_weight_set(object_infos_list, 1.000000, 1.000000);
efl_gfx_visible_set(object_infos_list, EINA_TRUE);
objects_list = efl_add(ELM_GENLIST_CLASS, elm_panes1);
pub_widgets->objects_list = objects_list;
evas_object_size_hint_weight_set(objects_list, 1.000000, 1.000000);
efl_gfx_visible_set(objects_list, EINA_TRUE);
elm_object_part_content_set(elm_panes1, "left", objects_list);
elm_object_part_content_set(elm_panes1, "right", object_infos_list);
efl_gfx_visible_set(main_win, EINA_TRUE);
efl_event_callback_add(main_win, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
return pub_widgets;
}
Gui_New_Profile_Win_Widgets *
gui_new_profile_win_create(Eo *__main_parent)
Gui_Remote_Port_Win_Widgets *
gui_remote_port_win_create(Eo *__main_parent)
{
Gui_New_Profile_Win_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Gui_Remote_Port_Win_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Eo *new_profile_win;
Eo *elm_bg4;
Eo *elm_box5;
Eo *elm_box4;
Eo *new_profile_cancel_button;
Eo *new_profile_save_button;
Eo *elm_box6;
Eo *elm_label3;
Eo *new_profile_name;
Eo *elm_label1;
Eo *new_profile_command;
Eo *elm_label2;
Eo *new_profile_script;
Eo *inwin;
Eo *entry;
inwin = elm_win_inwin_add(__main_parent);
pub_widgets->inwin = inwin;
new_profile_win = elm_win_add(__main_parent, "Window", ELM_WIN_BASIC);
pub_widgets->new_profile_win = new_profile_win;
elm_win_autodel_set(new_profile_win, EINA_TRUE);
evas_object_size_hint_weight_set(new_profile_win, 1.000000, 1.000000);
efl_gfx_size_set(new_profile_win, 689, 390);
elm_win_title_set(new_profile_win, "New profile...");
elm_win_modal_set(new_profile_win, EINA_TRUE);
elm_bg4 = efl_add(ELM_BG_CLASS, new_profile_win);
evas_object_size_hint_weight_set(elm_bg4, 1.000000, 1.000000);
efl_gfx_visible_set(elm_bg4, EINA_TRUE);
elm_box5 = elm_box_add(new_profile_win);
elm_box_padding_set(elm_box5, 7, 0);
evas_object_size_hint_weight_set(elm_box5, 1.000000, 1.000000);
evas_object_size_hint_align_set(elm_box5, -1.000000, -1.000000);
efl_gfx_size_set(elm_box5, 200, 200);
efl_gfx_visible_set(elm_box5, EINA_TRUE);
elm_win_resize_object_add(new_profile_win, elm_bg4);
elm_win_resize_object_add(new_profile_win, elm_box5);
elm_box4 = elm_box_add(elm_box5);
elm_box_padding_set(elm_box4, 7, 0);
evas_object_size_hint_weight_set(elm_box4, 1.000000, 1.000000);
evas_object_size_hint_align_set(elm_box4, -1.000000, -1.000000);
efl_gfx_size_set(elm_box4, 200, 200);
efl_gfx_visible_set(elm_box4, EINA_TRUE);
elm_box_horizontal_set(elm_box4, EINA_TRUE);
new_profile_cancel_button = efl_add(ELM_BUTTON_CLASS, elm_box4);
pub_widgets->new_profile_cancel_button = new_profile_cancel_button;
evas_object_size_hint_weight_set(new_profile_cancel_button, 1.000000, 1.000000);
efl_gfx_visible_set(new_profile_cancel_button, EINA_TRUE);
efl_gfx_size_set(new_profile_cancel_button, 73, 30);
elm_obj_widget_part_text_set(new_profile_cancel_button, NULL, "Cancel");
new_profile_save_button = efl_add(ELM_BUTTON_CLASS, elm_box4);
pub_widgets->new_profile_save_button = new_profile_save_button;
evas_object_size_hint_weight_set(new_profile_save_button, 1.000000, 1.000000);
efl_gfx_visible_set(new_profile_save_button, EINA_TRUE);
efl_gfx_size_set(new_profile_save_button, 73, 30);
elm_obj_widget_part_text_set(new_profile_save_button, NULL, "Save");
efl_event_callback_add(new_profile_save_button, EFL_UI_EVENT_CLICKED, new_profile_save_cb, NULL);
elm_box_pack_end(elm_box4, new_profile_save_button);
elm_box_pack_end(elm_box4, new_profile_cancel_button);
elm_box6 = elm_box_add(elm_box5);
elm_box_padding_set(elm_box6, 7, 0);
evas_object_size_hint_weight_set(elm_box6, 1.000000, 1.000000);
evas_object_size_hint_align_set(elm_box6, -1.000000, -1.000000);
efl_gfx_size_set(elm_box6, 200, 200);
efl_gfx_visible_set(elm_box6, EINA_TRUE);
elm_box_horizontal_set(elm_box6, EINA_TRUE);
elm_label3 = efl_add(ELM_LABEL_CLASS, elm_box6);
efl_gfx_visible_set(elm_label3, EINA_TRUE);
efl_gfx_size_set(elm_label3, 60, 30);
evas_object_size_hint_align_set(elm_label3, 1.000000, -1.000000);
elm_obj_widget_part_text_set(elm_label3, NULL, "Name: ");
evas_object_size_hint_weight_set(elm_label3, 0.000000, 1.000000);
new_profile_name = efl_add(ELM_ENTRY_CLASS, elm_box6);
pub_widgets->new_profile_name = new_profile_name;
evas_object_size_hint_align_set(new_profile_name, -1.000000, -1.000000);
efl_gfx_visible_set(new_profile_name, EINA_TRUE);
efl_gfx_size_set(new_profile_name, 65, 35);
elm_obj_entry_scrollable_set(new_profile_name, EINA_TRUE);
elm_obj_entry_single_line_set(new_profile_name, EINA_TRUE);
evas_object_size_hint_weight_set(new_profile_name, 4.000000, 1.000000);
elm_obj_entry_editable_set(new_profile_name, EINA_TRUE);
elm_obj_widget_part_text_set(new_profile_name, NULL, "");
elm_box_pack_end(elm_box6, elm_label3);
elm_box_pack_end(elm_box6, new_profile_name);
elm_label1 = efl_add(ELM_LABEL_CLASS, elm_box5);
evas_object_size_hint_weight_set(elm_label1, 1.000000, 1.000000);
efl_gfx_visible_set(elm_label1, EINA_TRUE);
efl_gfx_size_set(elm_label1, 115, 30);
efl_gfx_position_set(elm_label1, 847, 0);
elm_obj_widget_part_text_set(elm_label1, NULL, "Command: ");
evas_object_size_hint_align_set(elm_label1, 0.000000, 2.000000);
new_profile_command = efl_add(ELM_ENTRY_CLASS, elm_box5);
pub_widgets->new_profile_command = new_profile_command;
elm_obj_entry_scrollable_set(new_profile_command, EINA_TRUE);
evas_object_size_hint_align_set(new_profile_command, -1.000000, -1.000000);
efl_gfx_visible_set(new_profile_command, EINA_TRUE);
efl_gfx_size_set(new_profile_command, 65, 35);
elm_obj_entry_single_line_set(new_profile_command, EINA_TRUE);
evas_object_size_hint_weight_set(new_profile_command, 1.000000, 2.000000);
elm_label2 = efl_add(ELM_LABEL_CLASS, elm_box5);
evas_object_size_hint_weight_set(elm_label2, 1.000000, 1.000000);
efl_gfx_visible_set(elm_label2, EINA_TRUE);
efl_gfx_size_set(elm_label2, 60, 30);
evas_object_size_hint_align_set(elm_label2, 0.000000, 1.000000);
elm_obj_widget_part_text_set(elm_label2, NULL, "Script: ");
new_profile_script = efl_add(ELM_ENTRY_CLASS, elm_box5);
pub_widgets->new_profile_script = new_profile_script;
elm_obj_entry_scrollable_set(new_profile_script, EINA_TRUE);
evas_object_size_hint_align_set(new_profile_script, -1.000000, -1.000000);
efl_gfx_visible_set(new_profile_script, EINA_TRUE);
efl_gfx_size_set(new_profile_script, 65, 35);
evas_object_size_hint_weight_set(new_profile_script, 1.000000, 8.000000);
elm_box_pack_end(elm_box5, elm_box6);
elm_box_pack_end(elm_box5, elm_label1);
elm_box_pack_end(elm_box5, new_profile_command);
elm_box_pack_end(elm_box5, elm_label2);
elm_box_pack_end(elm_box5, new_profile_script);
elm_box_pack_end(elm_box5, elm_box4);
efl_gfx_visible_set(new_profile_win, EINA_TRUE);
efl_event_callback_add(new_profile_win, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
entry = elm_entry_add(inwin);
elm_entry_scrollable_set(entry, EINA_TRUE);
elm_entry_single_line_set(entry, EINA_TRUE);
elm_object_part_text_set(entry, "guide", "Port to connect to remote device");
efl_event_callback_add(entry, ELM_ENTRY_EVENT_ACTIVATED, remote_port_entry_changed, inwin);
evas_object_show(entry);
elm_win_inwin_content_set(inwin, entry);
elm_win_inwin_activate(inwin);
efl_event_callback_add(inwin, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
return pub_widgets;
}
Gui_Take_Screenshot_Button_Widgets *
gui_take_screenshot_button_create(Eo *__main_parent)
{
Gui_Take_Screenshot_Button_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Eo *bt;
Eo *elm_icon1;
bt = efl_add(ELM_BUTTON_CLASS, __main_parent);
pub_widgets->bt = bt;
evas_object_size_hint_weight_set(bt, 1.000000, 1.000000);
efl_gfx_visible_set(bt, EINA_TRUE);
efl_gfx_size_set(bt, 73, 30);
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, take_screenshot_button_clicked, NULL);
elm_icon1 = elm_icon_add(bt);
evas_object_size_hint_weight_set(elm_icon1, 1.000000, 1.000000);
efl_gfx_visible_set(elm_icon1, EINA_TRUE);
efl_gfx_size_set(elm_icon1, 40, 40);
efl_file_set(elm_icon1, TAKE_SCREENSHOT_ICON, NULL);
elm_object_part_content_set(bt, "icon", elm_icon1);
efl_event_callback_add(bt, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
return pub_widgets;
}
Gui_Show_Screenshot_Button_Widgets *
gui_show_screenshot_button_create(Eo *__main_parent)
{
Gui_Show_Screenshot_Button_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Eo *bt;
Eo *elm_icon1;
bt = efl_add(ELM_BUTTON_CLASS, __main_parent);
pub_widgets->bt = bt;
evas_object_size_hint_weight_set(bt, 1.000000, 1.000000);
efl_gfx_visible_set(bt, EINA_TRUE);
efl_gfx_size_set(bt, 73, 30);
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, show_screenshot_button_clicked, NULL);
elm_icon1 = elm_icon_add(bt);
evas_object_size_hint_weight_set(elm_icon1, 1.000000, 1.000000);
efl_gfx_visible_set(elm_icon1, EINA_TRUE);
efl_gfx_size_set(elm_icon1, 40, 40);
efl_file_set(elm_icon1, SHOW_SCREENSHOT_ICON, NULL);
elm_object_part_content_set(bt, "icon", elm_icon1);
efl_event_callback_add(bt, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
return pub_widgets;
}
Gui_Show_Screenshot_Win_Widgets *
gui_show_screenshot_win_create(Eo *__main_parent)
{
Gui_Show_Screenshot_Win_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Eo *win;
Eo *bg;
win = elm_win_add(__main_parent, "Screenshot", ELM_WIN_BASIC);
pub_widgets->win = win;
elm_win_autodel_set(win, EINA_TRUE);
efl_gfx_size_set(win, 300, 300);
evas_object_size_hint_weight_set(win, 1.000000, 1.000000);
elm_win_title_set(win, "Screenshot");
elm_win_modal_set(win, EINA_TRUE);
bg = efl_add(ELM_BG_CLASS, win);
pub_widgets->bg = bg;
evas_object_size_hint_weight_set(bg, 1.000000, 1.000000);
efl_gfx_visible_set(bg, EINA_TRUE);
elm_win_resize_object_add(win, bg);
efl_gfx_visible_set(win, EINA_TRUE);
efl_event_callback_add(win, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
return pub_widgets;
}
static void
_config_cancel_button_clicked(void *data, const Efl_Event *event EINA_UNUSED)
{
Gui_Config_Win_Widgets *wdgs = data;
efl_del(wdgs->win);
}
static void
_config_open(void *data, const Efl_Event *event EINA_UNUSED)
{
Eo *parent = data;
Gui_Config_Win_Widgets *wdgs = gui_config_win_create(parent);
gui_config_win_widgets_done(wdgs);
}
Gui_Config_Win_Widgets *
gui_config_win_create(Eo *__main_parent)
{
Gui_Config_Win_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Eo *win;
Eo *elm_bg2;
Eo *elm_box2;
Eo *elm_box3;
Eo *options_box;
Eo *ok_button;
Eo *cancel_button;
Eo *objs_types_sel;
Eo *highlight_ck;
win = elm_win_add(__main_parent, "Win", ELM_WIN_BASIC);
pub_widgets->win = win;
elm_win_autodel_set(win, EINA_TRUE);
elm_widget_part_text_set(win, NULL, "Window");
efl_gfx_size_set(win, 347, 362);
evas_object_size_hint_weight_set(win, 1.000000, 1.000000);
evas_object_freeze_events_set(win, EINA_FALSE);
evas_object_repeat_events_set(win, EINA_FALSE);
elm_win_title_set(win, "Config");
elm_bg2 = elm_bg_add(win);
evas_object_size_hint_weight_set(elm_bg2, 1.000000, 1.000000);
efl_gfx_visible_set(elm_bg2, EINA_TRUE);
elm_box2 = elm_box_add(win);
elm_box_padding_set(elm_box2, 7, 0);
evas_object_size_hint_weight_set(elm_box2, 1.000000, 1.000000);
efl_gfx_visible_set(elm_box2, EINA_TRUE);
elm_win_resize_object_add(win, elm_bg2);
elm_win_resize_object_add(win, elm_box2);
elm_box3 = elm_box_add(elm_box2);
elm_box_padding_set(elm_box3, 7, 0);
evas_object_size_hint_align_set(elm_box3, -1.000000, -1.000000);
efl_gfx_visible_set(elm_box3, EINA_TRUE);
elm_box_horizontal_set(elm_box3, EINA_TRUE);
evas_object_size_hint_weight_set(elm_box3, 1.000000, 0.200000);
ok_button = efl_add(ELM_BUTTON_CLASS, elm_box3);
pub_widgets->ok_button = ok_button;
evas_object_size_hint_weight_set(ok_button, 1.000000, 1.000000);
efl_gfx_visible_set(ok_button, EINA_TRUE);
elm_obj_widget_part_text_set(ok_button, NULL, "Ok");
efl_event_callback_add(ok_button, EFL_UI_EVENT_CLICKED, config_ok_button_clicked, pub_widgets);
cancel_button = efl_add(ELM_BUTTON_CLASS, elm_box3);
pub_widgets->cancel_button = cancel_button;
evas_object_size_hint_weight_set(cancel_button, 1.000000, 1.000000);
efl_gfx_visible_set(cancel_button, EINA_TRUE);
elm_obj_widget_part_text_set(cancel_button, NULL, "Cancel");
efl_event_callback_add(cancel_button, EFL_UI_EVENT_CLICKED, _config_cancel_button_clicked, pub_widgets);
elm_box_pack_end(elm_box3, ok_button);
elm_box_pack_end(elm_box3, cancel_button);
options_box = elm_box_add(elm_box2);
evas_object_size_hint_align_set(options_box, -1.000000, -1.000000);
efl_gfx_visible_set(options_box, EINA_TRUE);
evas_object_size_hint_weight_set(options_box, 1.000000, 0.200000);
objs_types_sel = elm_hoversel_add(options_box);
evas_object_size_hint_weight_set(objs_types_sel, 1.000000, 0.000000);
evas_object_size_hint_align_set(objs_types_sel, -1.00000, -1.000000);
elm_hoversel_hover_parent_set(objs_types_sel, win);
elm_hoversel_auto_update_set(objs_types_sel, EINA_TRUE);
elm_hoversel_item_add(objs_types_sel, objs_types_strings[0], NULL, ELM_ICON_NONE, NULL, (void *)0);
elm_hoversel_item_add(objs_types_sel, objs_types_strings[1], NULL, ELM_ICON_NONE, NULL, (void *)1);
efl_gfx_visible_set(objs_types_sel, EINA_TRUE);
elm_box_pack_end(options_box, objs_types_sel);
pub_widgets->objs_types_sel = objs_types_sel;
highlight_ck = elm_check_add(options_box);
pub_widgets->highlight_ck = highlight_ck;
evas_object_size_hint_weight_set(highlight_ck, 1.000000, 1.000000);
evas_object_size_hint_align_set(highlight_ck, -1.00000, -1.000000);
elm_object_text_set(highlight_ck, "Highlight");
elm_box_pack_end(options_box, highlight_ck);
efl_gfx_visible_set(highlight_ck, EINA_TRUE);
elm_box_pack_end(elm_box2, options_box);
elm_box_pack_end(elm_box2, elm_box3);
efl_gfx_visible_set(win, EINA_TRUE);
efl_event_callback_add(win, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
return pub_widgets;
}
Gui_Widgets *gui_gui_get()
{
static Eina_Bool initialized = EINA_FALSE;
if (!initialized)
{
g_pub_widgets.main_win = gui_main_win_create(NULL);
initialized = EINA_TRUE;
}
return &g_pub_widgets;
}

View File

@ -3,74 +3,31 @@
#include <Eo.h>
#include <Elementary.h>
static const char* objs_types_strings[] =
{
"Show all canvas objects",
"Only show Elementary widgets"
};
typedef struct
{
Eo *main_win;
Eo *bar_box;
Eo *ext_box;
Eo *conn_selector;
Eo *conn_selector_menu;
Eo *load_button;
Eo *apps_selector;
Eo *save_bt;
Eo *object_infos_list;
Eo *objects_list;
Eo *apps_selector_menu;
Eo *save_load_bt;
Eo *ext_selector_menu;
Eo *freeze_pulse;
Eo *freeze_inwin;
} Gui_Main_Win_Widgets;
typedef struct
{
Eo *new_profile_win;
Eo *new_profile_cancel_button;
Eo *new_profile_save_button;
Eo *new_profile_name;
Eo *new_profile_command;
Eo *new_profile_script;
} Gui_New_Profile_Win_Widgets;
typedef struct
{
Eo *win;
Eo *ok_button;
Eo *inwin;
Eo *cancel_button;
Eo *objs_types_sel;
Eo *highlight_ck;
} Gui_Config_Win_Widgets;
typedef struct
{
Eo *bt;
} Gui_Take_Screenshot_Button_Widgets;
typedef struct
{
Eo *bt;
} Gui_Show_Screenshot_Button_Widgets;
typedef struct
{
Eo *win;
Eo *bg;
} Gui_Show_Screenshot_Win_Widgets;
typedef struct
{
Gui_Main_Win_Widgets *main_win;
} Gui_Widgets;
Eo *save_button;
Eo *name_entry;
Eo *port_entry;
} Gui_Remote_Port_Win_Widgets;
Gui_Main_Win_Widgets *gui_main_win_create(Eo *parent);
Gui_New_Profile_Win_Widgets *gui_new_profile_win_create(Eo *parent);
Gui_Remote_Port_Win_Widgets *gui_remote_port_win_create(Eo *parent);
Gui_Take_Screenshot_Button_Widgets *gui_take_screenshot_button_create(Eo *parent);
Gui_Show_Screenshot_Button_Widgets *gui_show_screenshot_button_create(Eo *parent);
Gui_Show_Screenshot_Win_Widgets *gui_show_screenshot_win_create(Eo *parent);
Gui_Config_Win_Widgets *gui_config_win_create(Eo *__main_parent);
Gui_Widgets *gui_gui_get();
#endif

26
src/lib/CMakeLists.txt Normal file
View File

@ -0,0 +1,26 @@
set(CMAKE_BUILD_TYPE Debug)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${EINA_INCLUDE_DIRS}
${EOLIAN_INCLUDE_DIRS}
${EO_INCLUDE_DIRS}
${FFI_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${ELEMENTARY_INCLUDE_DIRS}
)
add_library(clouseau_debug SHARED clouseau_debug.c)
target_link_libraries(clouseau_debug
${EINA_LIBRARIES}
${EO_LIBRARIES}
${EOLIAN_LIBRARIES}
${FFI_LIBRARIES}
)
INSTALL(FILES Clouseau.h DESTINATION include)
INSTALL(TARGETS clouseau_debug LIBRARY DESTINATION lib)
add_subdirectory(extensions)

61
src/lib/Clouseau.h Normal file
View File

@ -0,0 +1,61 @@
#ifndef _CLOUSEAU_H
#define _CLOUSEAU_H
#ifdef EAPI
# undef EAPI
#endif
#ifdef _WIN32
# ifdef DEBUG_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif /* ! DLL_EXPORT */
# else
# define EAPI __declspec(dllimport)
# endif /* ! DEBUG_BUILD */
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif /* ! _WIN32 */
#include <Eina.h>
typedef struct _Extension_Config Extension_Config;
typedef struct _Clouseau_Extension Clouseau_Extension;
typedef Eo *(*Ui_Get_Cb)(Clouseau_Extension *ext, Eo *parent);
typedef void (*Session_Changed_Cb)(Clouseau_Extension *ext);
typedef void (*App_Changed_Cb)(Clouseau_Extension *ext);
typedef void (*Import_Data_Cb)(Clouseau_Extension *ext, void *buffer, int size, int version);
typedef void *(*Export_Data_Cb)(Clouseau_Extension *ext, int *size, int *version);
typedef Eo *(*Inwin_Create_Cb)();
typedef void (*Ui_Freeze_Cb)(Clouseau_Extension *ext, Eina_Bool freeze);
struct _Clouseau_Extension
{
const char *name; /* Name filled by the extension */
Eina_Debug_Session *session; /* Current session */
int app_id; /* Current application */
Eina_Stringshare *path_to_config; /* Path to configuration directory */
Eo *ui_object; /* Main object of the UI extension */
Session_Changed_Cb session_changed_cb; /* Function called when the session changed */
App_Changed_Cb app_changed_cb; /* Function called when the app changed */
Import_Data_Cb import_data_cb; /* Function called when data has to be imported */
Export_Data_Cb export_data_cb; /* Function called when data has to be exported */
Inwin_Create_Cb inwin_create_cb; /* Function to call to create a Inwin */
Ui_Freeze_Cb ui_freeze_cb; /* Function to call to freeze/thaw the UI */
void *data; /* Data allocated and managed by the extension */
Extension_Config *ext_cfg; /* Extention configuration - used by Clouseau */
};
#endif

1090
src/lib/clouseau_debug.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
add_subdirectory(objects_introspection)
add_subdirectory(evlog)

View File

@ -0,0 +1,29 @@
set(CMAKE_BUILD_TYPE Debug)
add_definitions(-DEFL_EO_API_SUPPORT -DEVLOG_EDJ="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}/clouseau_evlog.edj")
set(EOLIAN_INCLUDE_FLAG -I \"${EOLIAN_EO_DIR}/eo-1\" -I${CMAKE_CURRENT_SOURCE_DIR})
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${ELEMENTARY_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${EO_INCLUDE_DIRS}
${EINA_INCLUDE_DIRS}
${EET_INCLUDE_DIRS}
)
link_directories (${PC_LIBELEMENTARY_LIBRARY_DIRS})
add_library(clouseau_evlog SHARED main.c)
target_link_libraries(clouseau_evlog
${ELEMENTARY_LIBRARIES}
${EVAS_LIBRARIES}
${EO_LIBRARIES}
${EINA_LIBRARIES}
${EET_LIBRARIES}
)
INSTALL(TARGETS clouseau_evlog LIBRARY DESTINATION lib)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
set(CMAKE_BUILD_TYPE Debug)
STRING(REGEX REPLACE "\n" "" EOLIAN_EO_DIR ${EOLIAN_EO_DIR})
STRING(REGEX REPLACE " " "" EOLIAN_EO_DIR ${EOLIAN_EO_DIR})
add_definitions(${CLI_COMMON_DEFINITIONS} -DEFL_EO_API_SUPPORT
-DEOLIAN_EO_DIR="${EOLIAN_EO_DIR}")
add_definitions(-DEFL_EO_API_SUPPORT -DGUI_IMAGES_PATH="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}")
set(EOLIAN_INCLUDE_FLAG -I \"${EOLIAN_EO_DIR}/eo-1\" -I${CMAKE_CURRENT_SOURCE_DIR})
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${ELEMENTARY_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${EO_INCLUDE_DIRS}
${EINA_INCLUDE_DIRS}
${EET_INCLUDE_DIRS}
${EOLIAN_INCLUDE_DIRS}
)
link_directories (${PC_LIBELEMENTARY_LIBRARY_DIRS})
add_library(clouseau_objects_introspection SHARED main.c gui.c)
target_link_libraries(clouseau_objects_introspection
${ELEMENTARY_LIBRARIES}
${EVAS_LIBRARIES}
${EO_LIBRARIES}
${EINA_LIBRARIES}
${EET_LIBRARIES}
${EOLIAN_LIBRARIES}
)
INSTALL(TARGETS clouseau_objects_introspection LIBRARY DESTINATION lib)

View File

@ -0,0 +1,205 @@
#ifndef EFL_BETA_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#ifndef EFL_EO_API_SUPPORT
#define EFL_EO_API_SUPPORT
#endif
#ifndef ELM_INTERNAL_API_ARGESFSDFEFC
#define ELM_INTERNAL_API_ARGESFSDFEFC
#endif
#include <Elementary.h>
#include "elm_widget_container.h"
#include "elm_interface_scrollable.h"
#include "elm_interface_fileselector.h"
#include "gui.h"
static const char* objs_types_strings[] =
{
"Show all canvas objects",
"Only show Elementary widgets",
NULL
};
#ifdef GUI_IMAGES_PATH
const char *SHOW_SCREENSHOT_ICON = GUI_IMAGES_PATH"/show-screenshot.png";
const char *TAKE_SCREENSHOT_ICON = GUI_IMAGES_PATH"/take-screenshot.png";
#else
#error "Please define GUI_IMAGES_PATH"
#endif
extern void
screenshot_req_cb(void *data, const Efl_Event *event);
extern void
reload_perform(void *data, Evas_Object *obj, void *event_info);
extern void
take_screenshot_button_clicked(void *data, const Efl_Event *event);
extern void
show_screenshot_button_clicked(void *data, const Efl_Event *event);
extern void
snapshot_do(void *data, Evas_Object *fs, void *event_info);
extern void
objs_type_changed(void *data, Evas_Object *obj, void *event_info);
extern void
highlight_changed(void *data, Evas_Object *obj, void *event_info);
extern void
jump_to_ptr_inwin_show(void *data, Evas_Object *obj, void *event_info);
static void
_pubs_free_cb(void *data, const Efl_Event *event EINA_UNUSED)
{
free(data);
}
Gui_Win_Widgets *
gui_win_create(Eo *__main_parent)
{
Gui_Win_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Eo *box, *tb;
Eo *panes;
Eo *object_infos_list;
Eo *objects_list;
box = elm_box_add(__main_parent);
pub_widgets->main = box;
evas_object_size_hint_weight_set(box, 1, 1);
evas_object_size_hint_align_set(box, -1, -1);
efl_gfx_visible_set(box, EINA_TRUE);
efl_event_callback_add(box, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
tb = elm_toolbar_add(__main_parent);
pub_widgets->tb = tb;
elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_MENU);
elm_toolbar_menu_parent_set(tb, __main_parent);
evas_object_size_hint_weight_set(tb, 0, 0);
evas_object_size_hint_align_set(tb, -1, 0);
efl_gfx_visible_set(tb, EINA_TRUE);
pub_widgets->reload_button = elm_toolbar_item_append(tb, "view-refresh", "Reload", reload_perform, NULL);
elm_toolbar_item_append(tb, "edit-find", "Jump To Pointer", jump_to_ptr_inwin_show, NULL);
{
int i = 0;
Eo *settings_it = elm_toolbar_item_append(tb, "system-run", "Settings", NULL, NULL);
elm_toolbar_item_menu_set(settings_it, EINA_TRUE);
Eo *settings_menu = elm_toolbar_item_menu_get(settings_it);
Eo *objs_type_it = elm_menu_item_add(settings_menu, NULL, NULL,
"Objects types display", NULL, NULL);
while (objs_types_strings[i])
{
Eo *it = elm_menu_item_add(settings_menu, objs_type_it, NULL,
objs_types_strings[i], objs_type_changed, (void *)(uintptr_t)i);
Eo *rd = elm_radio_add(settings_menu);
elm_radio_state_value_set(rd, i);
if (!i) pub_widgets->objs_type_radio = rd;
else elm_radio_group_add(rd, pub_widgets->objs_type_radio);
elm_object_item_content_set(it, rd);
i++;
}
Eo *highlight_it = elm_menu_item_add(settings_menu, NULL, NULL,
"Hightlight", highlight_changed, NULL);
Eo *ck = elm_check_add(settings_menu);
elm_object_item_content_set(highlight_it, ck);
pub_widgets->highlight_ck = ck;
}
panes = efl_add(ELM_PANES_CLASS, box);
elm_obj_panes_content_right_size_set(panes, 0.600000);
evas_object_size_hint_weight_set(panes, 1.000000, 1.000000);
efl_gfx_size_set(panes, 75, 75);
efl_gfx_visible_set(panes, EINA_TRUE);
evas_object_size_hint_weight_set(panes, 1.000000, 1.000000);
evas_object_size_hint_align_set(panes, -1.000000, -1.000000);
elm_box_pack_end(box, tb);
elm_box_pack_end(box, panes);
object_infos_list = elm_genlist_add(panes);
pub_widgets->object_infos_list = object_infos_list;
evas_object_size_hint_weight_set(object_infos_list, 1.000000, 1.000000);
efl_gfx_visible_set(object_infos_list, EINA_TRUE);
objects_list = efl_add(ELM_GENLIST_CLASS, panes);
pub_widgets->objects_list = objects_list;
evas_object_size_hint_weight_set(objects_list, 1.000000, 1.000000);
efl_gfx_visible_set(objects_list, EINA_TRUE);
elm_object_part_content_set(panes, "left", objects_list);
elm_object_part_content_set(panes, "right", object_infos_list);
return pub_widgets;
}
Gui_Take_Screenshot_Button_Widgets *
gui_take_screenshot_button_create(Eo *__main_parent)
{
Gui_Take_Screenshot_Button_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Eo *bt;
Eo *elm_icon1;
bt = efl_add(EFL_UI_BUTTON_CLASS, __main_parent);
pub_widgets->bt = bt;
evas_object_size_hint_weight_set(bt, 1.000000, 1.000000);
efl_gfx_visible_set(bt, EINA_TRUE);
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, take_screenshot_button_clicked, NULL);
elm_icon1 = elm_icon_add(bt);
evas_object_size_hint_weight_set(elm_icon1, 1.000000, 1.000000);
efl_gfx_visible_set(elm_icon1, EINA_TRUE);
efl_file_set(elm_icon1, TAKE_SCREENSHOT_ICON, NULL);
elm_object_part_content_set(bt, "icon", elm_icon1);
efl_event_callback_add(bt, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
return pub_widgets;
}
Gui_Show_Screenshot_Button_Widgets *
gui_show_screenshot_button_create(Eo *__main_parent)
{
Gui_Show_Screenshot_Button_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Eo *bt;
Eo *elm_icon1;
bt = efl_add(EFL_UI_BUTTON_CLASS, __main_parent);
pub_widgets->bt = bt;
evas_object_size_hint_weight_set(bt, 1.000000, 1.000000);
efl_gfx_visible_set(bt, EINA_TRUE);
efl_gfx_size_set(bt, 73, 30);
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, show_screenshot_button_clicked, NULL);
elm_icon1 = elm_icon_add(bt);
evas_object_size_hint_weight_set(elm_icon1, 1.000000, 1.000000);
efl_gfx_visible_set(elm_icon1, EINA_TRUE);
efl_gfx_size_set(elm_icon1, 40, 40);
efl_file_set(elm_icon1, SHOW_SCREENSHOT_ICON, NULL);
elm_object_part_content_set(bt, "icon", elm_icon1);
efl_event_callback_add(bt, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
return pub_widgets;
}
Gui_Show_Screenshot_Win_Widgets *
gui_show_screenshot_win_create(Eo *__main_parent)
{
Gui_Show_Screenshot_Win_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
Eo *win;
Eo *bg;
win = elm_win_add(__main_parent, "Screenshot", ELM_WIN_BASIC);
pub_widgets->win = win;
elm_win_autodel_set(win, EINA_TRUE);
efl_gfx_size_set(win, 300, 300);
evas_object_size_hint_weight_set(win, 1.000000, 1.000000);
elm_win_title_set(win, "Screenshot");
elm_win_modal_set(win, EINA_TRUE);
bg = efl_add(ELM_BG_CLASS, win);
pub_widgets->bg = bg;
evas_object_size_hint_weight_set(bg, 1.000000, 1.000000);
efl_gfx_visible_set(bg, EINA_TRUE);
elm_win_resize_object_add(win, bg);
efl_gfx_visible_set(win, EINA_TRUE);
efl_event_callback_add(win, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
return pub_widgets;
}

View File

@ -0,0 +1,40 @@
#ifndef _gui_h_
#define _gui_h_
#include <Eo.h>
#include <Elementary.h>
typedef struct
{
Eo *main;
Eo *tb;
Eo *reload_button;
Eo *objs_type_radio;
Eo *highlight_ck;
Eo *object_infos_list;
Eo *objects_list;
} Gui_Win_Widgets;
typedef struct
{
Eo *bt;
} Gui_Take_Screenshot_Button_Widgets;
typedef struct
{
Eo *bt;
} Gui_Show_Screenshot_Button_Widgets;
typedef struct
{
Eo *win;
Eo *bg;
} Gui_Show_Screenshot_Win_Widgets;
Gui_Win_Widgets *gui_win_create(Eo *parent);
Gui_Take_Screenshot_Button_Widgets *gui_take_screenshot_button_create(Eo *parent);
Gui_Show_Screenshot_Button_Widgets *gui_show_screenshot_button_create(Eo *parent);
Gui_Show_Screenshot_Win_Widgets *gui_show_screenshot_win_create(Eo *parent);
#endif

File diff suppressed because it is too large Load Diff