Compare commits
158 Commits
devs/avilo
...
master
Author | SHA1 | Date |
---|---|---|
Daniel Zaoui | 73668cfb0e | |
Daniel Zaoui | 243e4c4dc8 | |
Daniel Zaoui | ff15ac77f4 | |
Daniel Zaoui | 4664d39e13 | |
Mykyta Biliavskyi | af282ab41a | |
Marcel Hollerbach | 1baa498b55 | |
Daniel Zaoui | a3b3135d33 | |
Daniel Zaoui | b23b7f9ab6 | |
Daniel Zaoui | e0cbb82680 | |
Daniel Zaoui | d813400307 | |
Marcel Hollerbach | 1f7667819b | |
Daniel Zaoui | 0ddf1692a5 | |
Daniel Zaoui | 669bb5390c | |
Daniel Zaoui | aee290a401 | |
Daniel Zaoui | e032a521d9 | |
Daniel Zaoui | 41ad146676 | |
Daniel Zaoui | 64ac1ca966 | |
Daniel Zaoui | 24eee06b53 | |
Hermet Park | 4b6a03e963 | |
Marcel Hollerbach | 5fdd956379 | |
Marcel Hollerbach | 1d05baf59f | |
Marcel Hollerbach | 92e3461f5b | |
Daniel Zaoui | 31732fbf5c | |
Daniel Zaoui | 6367fbdf86 | |
Daniel Zaoui | 8627aacaeb | |
Marcel Hollerbach | 19fe1c898e | |
Marcel Hollerbach | 1060bd4b23 | |
Marcel Hollerbach | a5b70e6903 | |
Marcel Hollerbach | 5b20f26f76 | |
q66 | 70e1087187 | |
Daniel Zaoui | 28713189a0 | |
Davide Andreoli | c64d481e70 | |
Marcel Hollerbach | 5fd8f312a5 | |
Marcel Hollerbach | 2737e98a5b | |
Marcel Hollerbach | e4e3838767 | |
Marcel Hollerbach | 8d07e441f2 | |
Marcel Hollerbach | d882c9f0af | |
Marcel Hollerbach | 244f33420d | |
Marcel Hollerbach | 067726dea8 | |
Marcel Hollerbach | c029379b6d | |
Marcel Hollerbach | 8bb9cce1ca | |
Marcel Hollerbach | 5b0b1a0f91 | |
Marcel Hollerbach | 8ed75b7448 | |
Mykyta Biliavskyi | cfcf900910 | |
Jean-Philippe Andre | f5c971b734 | |
Mykyta Biliavskyi | 318ee74c88 | |
Mykyta Biliavskyi | 0130202924 | |
Daniel Zaoui | 5b0a310145 | |
Daniel Zaoui | 432ed396db | |
Daniel Zaoui | 6b643a7f57 | |
Marcel Hollerbach | 5dedb7054f | |
Marcel Hollerbach | 4a94694bc0 | |
Marcel Hollerbach | ccefc5e57b | |
Marcel Hollerbach | 7dadc722c5 | |
Marcel Hollerbach | ef625c3d68 | |
Marcel Hollerbach | 2514cff9e4 | |
Marcel Hollerbach | 65d89b92c2 | |
Marcel Hollerbach | 4ae284bd0b | |
Daniel Zaoui | 1013671a37 | |
Daniel Zaoui | b962f53712 | |
Mykyta Biliavskyi | 4df7f37839 | |
Mykyta Biliavskyi | 170923b164 | |
Daniel Zaoui | 26c85dda2d | |
Daniel Zaoui | dc7ee20d22 | |
Daniel Zaoui | c1dd9ae043 | |
Cedric BAIL | 64b36848af | |
Jérémy Zurcher | eca7479b59 | |
Marcel Hollerbach | 79e62083c9 | |
Marcel Hollerbach | a6eedef550 | |
Daniel Zaoui | e2dbf08cb2 | |
Daniel Zaoui | 9d75e1a5db | |
Daniel Zaoui | a7432b429c | |
Daniel Zaoui | 0808f42643 | |
Daniel Zaoui | f588374b06 | |
Daniel Zaoui | 252f013174 | |
Daniel Zaoui | 390739d795 | |
Daniel Zaoui | 287e8498a7 | |
Daniel Zaoui | bbd9525f4b | |
Daniel Zaoui | 524541c49d | |
Daniel Zaoui | cdd91eb12c | |
Daniel Zaoui | 07474f14b7 | |
Daniel Zaoui | 9416c31515 | |
Daniel Zaoui | c394331763 | |
Daniel Zaoui | b745bd6d7e | |
Daniel Zaoui | d89f624d7e | |
Daniel Zaoui | 43cfe6d441 | |
Daniel Zaoui | 446e39c0e3 | |
Daniel Zaoui | 31d522b386 | |
Daniel Zaoui | 7ce0b23e7a | |
Daniel Zaoui | 774142353a | |
Daniel Zaoui | 74f279bcaf | |
Daniel Zaoui | bd725339bc | |
Daniel Zaoui | c982cb8685 | |
Daniel Zaoui | 73a790e331 | |
Daniel Zaoui | 952c243721 | |
Daniel Zaoui | 6e21f6d620 | |
Daniel Zaoui | 50ea3a2740 | |
Daniel Zaoui | 0baf933727 | |
Daniel Zaoui | 8f52887d57 | |
Daniel Zaoui | 7f709213b4 | |
Daniel Zaoui | 7bf7b0a431 | |
Daniel Zaoui | 9948eea27a | |
Daniel Zaoui | 57773aea05 | |
Daniel Zaoui | b395635dd3 | |
Daniel Zaoui | 44aa6dd03e | |
Daniel Zaoui | ab69add6d3 | |
Daniel Zaoui | b309fa2bc2 | |
Daniel Zaoui | 6daf22321a | |
Daniel Zaoui | 80c18f3bd5 | |
Daniel Zaoui | 3c80e7bb46 | |
Daniel Zaoui | 9fc5c432bf | |
Daniel Zaoui | 88420d78d4 | |
Daniel Zaoui | 4f5e0fde15 | |
Daniel Zaoui | 236a4f1c15 | |
Daniel Zaoui | 17d00e68a9 | |
Daniel Zaoui | 4d119765aa | |
Daniel Zaoui | 5d65effa28 | |
Daniel Zaoui | 987d9bc250 | |
Daniel Zaoui | 358139179d | |
Daniel Zaoui | d38d8f4b1b | |
Daniel Zaoui | 7cf8e2e425 | |
Daniel Zaoui | 7cb901e58f | |
Daniel Zaoui | 4a2c702778 | |
Daniel Zaoui | a42bc82db8 | |
Daniel Zaoui | ca58cb9f9b | |
Daniel Zaoui | 07710c01fc | |
Daniel Zaoui | e2869aa298 | |
Daniel Zaoui | 449d833d80 | |
Daniel Zaoui | 0a99a22086 | |
Daniel Zaoui | febe013c2e | |
Daniel Zaoui | 601eb80e07 | |
Daniel Zaoui | a792302ca9 | |
Daniel Zaoui | 73dff60926 | |
Daniel Zaoui | e9eb0d29bc | |
Daniel Zaoui | 9b9ab9f07f | |
Daniel Zaoui | 03423ff979 | |
Vyacheslav Reutskiy | b79b2f9033 | |
Daniel Zaoui | ee36702153 | |
Shuhrat Dehkanov | a2af39e8cd | |
Marcel Hollerbach | ce049917b2 | |
Marcel Hollerbach | d4aaaad679 | |
Marcel Hollerbach | 01d83bd6bd | |
Marcel Hollerbach | 24a971509b | |
Shuhrat Dehkanov | eafc27dc05 | |
Marcel Hollerbach | eac39b5359 | |
Marcel Hollerbach | b4bc63f028 | |
Marcel Hollerbach | e53de2b36c | |
Marcel Hollerbach | e462833622 | |
Marcel Hollerbach | 9083738d10 | |
Cedric Bail | 11c42ebdf9 | |
Shuhrat Dehkanov | 9f62d59140 | |
Jean Guyomarc'h | 92abcec41b | |
Jérémy Zurcher | 0f9a7e2d03 | |
Tom Hacohen | c18c74eb29 | |
Tom Hacohen | 0773475ab0 | |
Amitesh Singh | a56abd48ab | |
Amitesh Singh | 7cf2984305 | |
Tom Hacohen | 237f6e1cc1 |
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"project_id" : "clouseau",
|
||||
"conduit_uri" : "https://phab.enlightenment.org/"
|
||||
}
|
|
@ -11,7 +11,6 @@ Makefile.in
|
|||
.*.sw[po]
|
||||
*.gcov
|
||||
*.gcno
|
||||
/README
|
||||
/aclocal.m4
|
||||
/autom4te.cache/
|
||||
/config.cache
|
||||
|
|
|
@ -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,11 @@ find_package(Eo REQUIRED)
|
|||
find_package(Elementary REQUIRED)
|
||||
find_package(Ecore REQUIRED)
|
||||
find_package(Evas REQUIRED)
|
||||
find_package(Edebug REQUIRED)
|
||||
find_package(Ffi REQUIRED)
|
||||
find_package(efl_profiler QUIET)
|
||||
|
||||
add_subdirectory(src/bin)
|
||||
add_subdirectory(src/lib)
|
||||
add_subdirectory(data)
|
||||
|
||||
add_dependencies(clouseau_evlog clouseau_evlog_edj)
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
Clouseau
|
||||
|
||||
Clouseau is a UI inspection tool aimed to debug EFL applications.
|
||||
|
||||
Requirements:
|
||||
|
||||
efl (1.20 +)
|
||||
|
||||
Compiling:
|
||||
|
||||
1. mkdir build
|
||||
2. cd build
|
||||
3. cmake -DCMAKE_INSTALL_PREFIX=/your_install_path ..
|
||||
4. make
|
||||
5. (sudo) make install
|
||||
|
||||
How to use it?
|
||||
|
||||
1. Run efl_debugd on the machine where the program to debug has to run
|
||||
2. Run your program
|
||||
3. Run clouseau_client -l / -r [port]
|
||||
4. Choose the extension you want to use
|
||||
5. Choose your application
|
||||
|
||||
clouseau_client can run in three modes:
|
||||
- locally: it connects to the local daemon (efl_debugd)
|
||||
- remotely: you have to establish a connection (SSH...) and to supply the port to use to Clouseau
|
||||
- offline: this is for the case you want to visualize a snapshot saved earlier
|
|
@ -0,0 +1,22 @@
|
|||
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_command (
|
||||
OUTPUT clouseau_focus_inspector.edj
|
||||
COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_SOURCE_DIR}/focus_inspector.edc clouseau_focus_inspector.edj
|
||||
DEPENDS focus_inspector.edc
|
||||
)
|
||||
|
||||
add_custom_target (
|
||||
clouseau_evlog_edj
|
||||
DEPENDS clouseau_evlog.edj evlog.edc
|
||||
)
|
||||
|
||||
add_custom_target(focus_inspector_theme DEPENDS clouseau_focus_inspector.edj)
|
||||
|
||||
install (
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/clouseau_focus_inspector.edj ${CMAKE_CURRENT_BINARY_DIR}/clouseau_evlog.edj images/show-screenshot.png images/take-screenshot.png
|
||||
DESTINATION share/${PROJECT_NAME_LOWER}
|
||||
)
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
collections {
|
||||
images {
|
||||
image: "focus_inspector_history.svg" COMP;
|
||||
image: "focus_inspector_logical.svg" COMP;
|
||||
image: "focus_inspector_regular.svg" COMP;
|
||||
image: "focus_inspector_redirect.svg" COMP;
|
||||
}
|
||||
group { "focus_inspector/regular";
|
||||
parts {
|
||||
image { "indicator";
|
||||
desc { "default";
|
||||
rel1.to: "widget_name";
|
||||
rel1.offset: -3px -3px;
|
||||
rel2.to: "widget_name";
|
||||
rel2.offset: 3px 3px;
|
||||
|
||||
image {
|
||||
border: 1 1 1 1;
|
||||
normal: "focus_inspector_regular.svg";
|
||||
}
|
||||
}
|
||||
}
|
||||
text { "widget_name";
|
||||
desc { "default";
|
||||
text {
|
||||
font: Sans;
|
||||
text: "<widget-name>";
|
||||
size: 8;
|
||||
min: 1 1;
|
||||
max: 1 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
group { "focus_inspector/logical";
|
||||
inherit: "focus_inspector/regular";
|
||||
parts {
|
||||
image { "indicator";
|
||||
desc { "default";
|
||||
rel1.to: "widget_name";
|
||||
rel1.offset: -3px -3px;
|
||||
rel2.to: "widget_name";
|
||||
rel2.offset: 3px 3px;
|
||||
|
||||
image {
|
||||
border: 1 1 1 1;
|
||||
normal: "focus_inspector_logical.svg";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
group { "focus_inspector/history";
|
||||
inherit: "focus_inspector/regular";
|
||||
parts {
|
||||
image { "indicator";
|
||||
desc { "default";
|
||||
rel1.to: "widget_name";
|
||||
rel1.offset: -3px -3px;
|
||||
rel2.to: "widget_name";
|
||||
rel2.offset: 3px 3px;
|
||||
|
||||
image {
|
||||
border: 1 1 1 1;
|
||||
normal: "focus_inspector_history.svg";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
group { "focus_inspector/redirect";
|
||||
inherit: "focus_inspector/regular";
|
||||
parts {
|
||||
image { "indicator";
|
||||
desc { "default";
|
||||
rel1.to: "widget_name";
|
||||
rel1.offset: -3px -3px;
|
||||
rel2.to: "widget_name";
|
||||
rel2.offset: 3px 3px;
|
||||
|
||||
image {
|
||||
border: 1 1 1 1;
|
||||
normal: "focus_inspector_redirect.svg";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="99.855179mm"
|
||||
height="28.76149mm"
|
||||
viewBox="0 0 99.855179 28.76149"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
|
||||
sodipodi:docname="focus_inspector_history.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="-3.7169149"
|
||||
inkscape:cy="-166.01003"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1057"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-0.58634746,-0.38263321)">
|
||||
<rect
|
||||
style="fill:#484e4d;fill-opacity:1;fill-rule:nonzero;stroke:#259700;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4504"
|
||||
width="98.355179"
|
||||
height="27.26149"
|
||||
x="1.3363475"
|
||||
y="1.1326332"
|
||||
ry="8.5526237"
|
||||
rx="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="99.855179mm"
|
||||
height="28.76149mm"
|
||||
viewBox="0 0 99.855179 28.76149"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
|
||||
sodipodi:docname="focus_inspector_logical.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="-3.7169149"
|
||||
inkscape:cy="-166.01003"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1057"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-0.58634746,-0.38263321)">
|
||||
<rect
|
||||
style="fill:#484e4d;fill-opacity:1;fill-rule:nonzero;stroke:#787878;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4504"
|
||||
width="98.355179"
|
||||
height="27.26149"
|
||||
x="1.3363475"
|
||||
y="1.1326332"
|
||||
ry="8.5526237"
|
||||
rx="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="99.855179mm"
|
||||
height="28.76149mm"
|
||||
viewBox="0 0 99.855179 28.76149"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
|
||||
sodipodi:docname="focus_inspector_redirect.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="-3.7169149"
|
||||
inkscape:cy="-166.01003"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1057"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-0.58634746,-0.38263321)">
|
||||
<rect
|
||||
style="fill:#484e4d;fill-opacity:1;fill-rule:nonzero;stroke:#c0392b;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4504"
|
||||
width="98.355179"
|
||||
height="27.26149"
|
||||
x="1.3363475"
|
||||
y="1.1326332"
|
||||
ry="8.5526237"
|
||||
rx="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="99.855179mm"
|
||||
height="28.76149mm"
|
||||
viewBox="0 0 99.855179 28.76149"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
|
||||
sodipodi:docname="focus_inspector_regular.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="-3.7169149"
|
||||
inkscape:cy="-166.01003"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1057"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-0.58634746,-0.38263321)">
|
||||
<rect
|
||||
style="fill:#484e4d;fill-opacity:1;fill-rule:nonzero;stroke:#2288ee;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4504"
|
||||
width="98.355179"
|
||||
height="27.26149"
|
||||
x="1.3363475"
|
||||
y="1.1326332"
|
||||
ry="8.5526237"
|
||||
rx="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
|
@ -1,20 +0,0 @@
|
|||
cmake_minimum_required(VERSION 2.8.1)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||
|
||||
project(CLOUSEAU)
|
||||
|
||||
#set(EA_GEN_COMMON_DEFINITIONS -DEFL_EO_API_SUPPORT -DEFL_BETA_API_SUPPORT)
|
||||
#add_definitions(${EA_GEN_COMMON_DEFINITIONS})
|
||||
|
||||
find_package(Efl REQUIRED)
|
||||
find_package(Ffi REQUIRED)
|
||||
find_package(Eina REQUIRED)
|
||||
find_package(Eet REQUIRED)
|
||||
find_package(Eolian REQUIRED)
|
||||
find_package(Eo REQUIRED)
|
||||
find_package(Elementary REQUIRED)
|
||||
find_package(Ecore REQUIRED)
|
||||
find_package(Evas REQUIRED)
|
||||
|
||||
add_subdirectory(src/bin)
|
|
@ -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})
|
||||
|
@ -33,11 +30,10 @@ target_link_libraries(clouseau_client
|
|||
${EET_LIBRARIES}
|
||||
${EFREET_LIBRARIES}
|
||||
${EO_LIBRARIES}
|
||||
${EOLIAN_LIBRARIES}
|
||||
${ECORE_LIBRARIES}
|
||||
${EVAS_LIBRARIES}
|
||||
${EDEBUG_LIBRARIES}
|
||||
ecore_file
|
||||
)
|
||||
|
||||
install(TARGETS clouseau_client DESTINATION bin)
|
||||
install(PROGRAMS clouseau DESTINATION bin)
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
echo "Usage: clouseau <executable> [executable parameters]"
|
||||
else
|
||||
# Start the local daemon. In case it is already running, it exits directly.
|
||||
efl_debugd &
|
||||
# Start the application
|
||||
$@ &
|
||||
clouseau_client -l -p $!
|
||||
fi
|
471
src/bin/gui.c
|
@ -8,37 +8,19 @@
|
|||
#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 Gui_Widgets g_pub_widgets;
|
||||
extern void
|
||||
conn_menu_show(void *data, Evas_Object *obj, void *event_info);
|
||||
extern void
|
||||
save_load_perform(void *data, Evas_Object *obj, void *event_info);
|
||||
extern void
|
||||
remote_port_entry_changed(void *data, Evas_Object *obj, void *event_info);
|
||||
|
||||
extern void gui_new_profile_win_create_done(Gui_New_Profile_Win_Widgets *wdgs);
|
||||
|
||||
#ifdef GUI_IMAGES_PATH
|
||||
const char *SCREENSHOT_ICON = GUI_IMAGES_PATH"/show-screenshot.png";
|
||||
#else
|
||||
#error "Please define GUI_IMAGES_PATH"
|
||||
#endif
|
||||
|
||||
extern Eina_Bool
|
||||
_profile_win_close_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
|
||||
extern Eina_Bool
|
||||
_new_profile_save_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
|
||||
extern Eina_Bool
|
||||
_new_profile_cancel_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
|
||||
extern Eina_Bool
|
||||
_profile_del_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
|
||||
extern Eina_Bool
|
||||
screenshot_req_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
|
||||
|
||||
static Eina_Bool
|
||||
_pubs_free_cb(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
static void
|
||||
_pubs_free_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
free(data);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
Gui_Main_Win_Widgets *
|
||||
|
@ -47,364 +29,111 @@ 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 *apps_selector;
|
||||
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 = eo_add(ELM_WIN_CLASS, __main_parent, elm_obj_win_type_set(ELM_WIN_BASIC));
|
||||
main_win = elm_win_add(__main_parent, "Window", ELM_WIN_BASIC);
|
||||
pub_widgets->main_win = main_win;
|
||||
eo_do(main_win, elm_obj_widget_part_text_set(NULL, "Window"));
|
||||
eo_do(main_win, elm_obj_win_autodel_set(EINA_TRUE));
|
||||
eo_do(main_win, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(main_win, efl_gfx_size_set(478, 484));
|
||||
elm_bg1 = eo_add(ELM_BG_CLASS, main_win);
|
||||
eo_do(elm_bg1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_bg1, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_bg1, efl_gfx_position_set(0, 0));
|
||||
elm_box1 = eo_add(ELM_BOX_CLASS, main_win);
|
||||
eo_do(elm_box1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_box1, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_box1, efl_gfx_size_set(643, 598));
|
||||
eo_do(elm_box1, efl_gfx_position_set(-7, -2));
|
||||
eo_do(elm_box1, elm_obj_box_padding_set(0, 0));
|
||||
eo_do(elm_box1, elm_obj_box_align_set(0.000000, 0.000000));
|
||||
eo_do(main_win, elm_obj_win_resize_object_add(elm_bg1));
|
||||
eo_do(main_win, elm_obj_win_resize_object_add(elm_box1));
|
||||
apps_selector = eo_add(ELM_HOVERSEL_CLASS, elm_box1);
|
||||
pub_widgets->apps_selector = apps_selector;
|
||||
eo_do(apps_selector, evas_obj_size_hint_weight_set(1.000000, 0.000000));
|
||||
eo_do(apps_selector, evas_obj_size_hint_align_set(0.500000, 0.000000));
|
||||
eo_do(apps_selector, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(apps_selector, efl_gfx_size_set(1174, 643));
|
||||
eo_do(apps_selector, efl_gfx_position_set(-8, -2));
|
||||
eo_do(apps_selector, elm_obj_widget_part_text_set(NULL, "Select App"));
|
||||
elm_panes1 = eo_add(ELM_PANES_CLASS, elm_box1);
|
||||
eo_do(elm_panes1, elm_obj_panes_content_right_size_set(0.600000));
|
||||
eo_do(elm_panes1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_panes1, efl_gfx_size_set(75, 75));
|
||||
eo_do(elm_panes1, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_panes1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_panes1, evas_obj_size_hint_align_set(-1.000000, -1.000000));
|
||||
eo_do(elm_box1, elm_obj_box_pack_end(apps_selector));
|
||||
eo_do(elm_box1, elm_obj_box_pack_end(elm_panes1));
|
||||
object_infos_list = eo_add(ELM_GENLIST_CLASS, elm_panes1);
|
||||
pub_widgets->object_infos_list = object_infos_list;
|
||||
eo_do(object_infos_list, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(object_infos_list, efl_gfx_visible_set(EINA_TRUE));
|
||||
objects_list = eo_add(ELM_GENLIST_CLASS, elm_panes1);
|
||||
pub_widgets->objects_list = objects_list;
|
||||
eo_do(objects_list, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(objects_list, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_panes1, elm_obj_container_content_set("left", objects_list));
|
||||
eo_do(elm_panes1, elm_obj_container_content_set("right", object_infos_list));
|
||||
eo_do(main_win, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(main_win, eo_event_callback_add(EO_BASE_EVENT_DEL, _pubs_free_cb, pub_widgets));
|
||||
elm_win_autodel_set(main_win, EINA_TRUE);
|
||||
elm_win_title_set(main_win, "Clouseau");
|
||||
efl_gfx_entity_size_set(main_win, EINA_SIZE2D(478, 484));
|
||||
|
||||
bg = elm_bg_add(main_win);
|
||||
evas_object_size_hint_weight_set(bg, 1.000000, 1.000000);
|
||||
efl_gfx_entity_visible_set(bg, EINA_TRUE);
|
||||
efl_gfx_entity_position_set(bg, EINA_POSITION2D(0, 0));
|
||||
elm_win_resize_object_add(main_win, bg);
|
||||
|
||||
main_box = elm_box_add(main_win);
|
||||
evas_object_size_hint_weight_set(main_box, 1.000000, 1.000000);
|
||||
efl_gfx_entity_visible_set(main_box, EINA_TRUE);
|
||||
elm_win_resize_object_add(main_win, main_box);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
pub_widgets->conn_selector_menu = elm_toolbar_item_menu_get(pub_widgets->conn_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);
|
||||
|
||||
pub_widgets->apps_selector_menu = elm_toolbar_item_menu_get(pub_widgets->apps_selector);
|
||||
|
||||
pub_widgets->save_load_bt = elm_toolbar_item_append(tb, "document-export", "Save", save_load_perform, NULL);
|
||||
|
||||
ext_selector = elm_toolbar_item_append(tb, "system-reboot", "Extensions", NULL, NULL);
|
||||
elm_toolbar_item_menu_set(ext_selector, EINA_TRUE);
|
||||
|
||||
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_entity_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_entity_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");
|
||||
|
||||
efl_gfx_entity_visible_set(main_win, EINA_TRUE);
|
||||
efl_event_callback_add(main_win, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
|
||||
|
||||
return pub_widgets;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
profile_delete_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
Gui_Remote_Port_Win_Widgets *
|
||||
gui_remote_port_win_create(Eo *__main_parent)
|
||||
{
|
||||
_profile_del_cb(data, obj, desc, event_info);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
Gui_Remote_Port_Win_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
|
||||
|
||||
static Eina_Bool
|
||||
profile_new_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Gui_New_Profile_Win_Widgets *wdgs = gui_new_profile_win_create(NULL);
|
||||
gui_new_profile_win_create_done(wdgs);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
Eo *inwin;
|
||||
Eo *entry;
|
||||
|
||||
static Eina_Bool
|
||||
profile_ok_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
_profile_win_close_cb(data, obj, desc, event_info);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
inwin = elm_win_inwin_add(__main_parent);
|
||||
pub_widgets->inwin = inwin;
|
||||
|
||||
Gui_Profiles_Win_Widgets *
|
||||
gui_profiles_win_create(Eo *__main_parent)
|
||||
{
|
||||
Gui_Profiles_Win_Widgets *pub_widgets = calloc(1, sizeof(*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");
|
||||
evas_object_smart_callback_add(entry, "activated", remote_port_entry_changed, inwin);
|
||||
evas_object_show(entry);
|
||||
|
||||
Eo *profiles_win;
|
||||
Eo *elm_bg2;
|
||||
Eo *elm_box2;
|
||||
Eo *elm_box3;
|
||||
Eo *profile_delete_button;
|
||||
Eo *profile_ok_button;
|
||||
Eo *profile_cancel_button;
|
||||
Eo *profile_new_button;
|
||||
Eo *profiles_list;
|
||||
elm_win_inwin_content_set(inwin, entry);
|
||||
elm_win_inwin_activate(inwin);
|
||||
|
||||
|
||||
profiles_win = eo_add(ELM_WIN_CLASS, __main_parent, elm_obj_win_name_set("Win"),
|
||||
elm_obj_win_type_set(ELM_WIN_BASIC));
|
||||
pub_widgets->profiles_win = profiles_win;
|
||||
eo_do(profiles_win, elm_obj_win_autodel_set(EINA_TRUE));
|
||||
eo_do(profiles_win, elm_obj_widget_part_text_set(NULL, "Window"));
|
||||
eo_do(profiles_win, efl_gfx_size_set(347, 362));
|
||||
eo_do(profiles_win, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(profiles_win, evas_obj_freeze_events_set(EINA_FALSE));
|
||||
eo_do(profiles_win, evas_obj_repeat_events_set(EINA_FALSE));
|
||||
eo_do(profiles_win, elm_obj_win_title_set("Profiles"));
|
||||
elm_bg2 = eo_add(ELM_BG_CLASS, profiles_win);
|
||||
eo_do(elm_bg2, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_bg2, efl_gfx_visible_set(EINA_TRUE));
|
||||
elm_box2 = eo_add(ELM_BOX_CLASS, profiles_win);
|
||||
eo_do(elm_box2, elm_obj_box_padding_set(7, 0));
|
||||
eo_do(elm_box2, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_box2, efl_gfx_size_set(200, 200));
|
||||
eo_do(elm_box2, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(profiles_win, elm_obj_win_resize_object_add(elm_bg2));
|
||||
eo_do(profiles_win, elm_obj_win_resize_object_add(elm_box2));
|
||||
elm_box3 = eo_add(ELM_BOX_CLASS, elm_box2);
|
||||
eo_do(elm_box3, elm_obj_box_padding_set(7, 0));
|
||||
eo_do(elm_box3, evas_obj_size_hint_align_set(-1.000000, -1.000000));
|
||||
eo_do(elm_box3, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_box3, elm_obj_box_horizontal_set(EINA_TRUE));
|
||||
eo_do(elm_box3, efl_gfx_size_set(200, 139));
|
||||
eo_do(elm_box3, efl_gfx_position_set(289, 742));
|
||||
eo_do(elm_box3, evas_obj_size_hint_weight_set(1.000000, 0.200000));
|
||||
profile_delete_button = eo_add(ELM_BUTTON_CLASS, elm_box3);
|
||||
pub_widgets->profile_delete_button = profile_delete_button;
|
||||
eo_do(profile_delete_button, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(profile_delete_button, elm_obj_widget_disabled_set(EINA_TRUE));
|
||||
eo_do(profile_delete_button, elm_obj_widget_part_text_set(NULL, "Delete profile"));
|
||||
eo_do(profile_delete_button, efl_gfx_size_set(115, 30));
|
||||
eo_do(profile_delete_button, efl_gfx_position_set(-42, 0));
|
||||
eo_do(profile_delete_button, evas_obj_size_hint_align_set(0.500000, 0.500000));
|
||||
eo_do(profile_delete_button, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(profile_delete_button, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, profile_delete_button_clicked, NULL));
|
||||
profile_ok_button = eo_add(ELM_BUTTON_CLASS, elm_box3);
|
||||
pub_widgets->profile_ok_button = profile_ok_button;
|
||||
eo_do(profile_ok_button, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(profile_ok_button, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(profile_ok_button, efl_gfx_size_set(73, 30));
|
||||
eo_do(profile_ok_button, elm_obj_widget_part_text_set(NULL, "Ok"));
|
||||
eo_do(profile_ok_button, elm_obj_widget_disabled_set(EINA_TRUE));
|
||||
eo_do(profile_ok_button, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, profile_ok_button_clicked, NULL));
|
||||
profile_cancel_button = eo_add(ELM_BUTTON_CLASS, elm_box3);
|
||||
pub_widgets->profile_cancel_button = profile_cancel_button;
|
||||
eo_do(profile_cancel_button, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(profile_cancel_button, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(profile_cancel_button, efl_gfx_size_set(73, 30));
|
||||
eo_do(profile_cancel_button, elm_obj_widget_part_text_set(NULL, "Cancel"));
|
||||
profile_new_button = eo_add(ELM_BUTTON_CLASS, elm_box3);
|
||||
eo_do(profile_new_button, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(profile_new_button, efl_gfx_size_set(73, 30));
|
||||
eo_do(profile_new_button, elm_obj_widget_part_text_set(NULL, "New profile"));
|
||||
eo_do(profile_new_button, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(profile_new_button, evas_obj_size_hint_align_set(0.500000, 0.500000));
|
||||
eo_do(profile_new_button, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, profile_new_button_clicked, NULL));
|
||||
eo_do(elm_box3, elm_obj_box_pack_end(profile_ok_button));
|
||||
eo_do(elm_box3, elm_obj_box_pack_end(profile_cancel_button));
|
||||
eo_do(elm_box3, elm_obj_box_pack_end(profile_new_button));
|
||||
eo_do(elm_box3, elm_obj_box_pack_end(profile_delete_button));
|
||||
profiles_list = eo_add(ELM_GENLIST_CLASS, elm_box2);
|
||||
pub_widgets->profiles_list = profiles_list;
|
||||
eo_do(profiles_list, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(profiles_list, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(profiles_list, evas_obj_size_hint_align_set(-1.000000, -1.000000));
|
||||
eo_do(elm_box2, elm_obj_box_pack_end(profiles_list));
|
||||
eo_do(elm_box2, elm_obj_box_pack_end(elm_box3));
|
||||
eo_do(profiles_win, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(profiles_win, eo_event_callback_add(EO_BASE_EVENT_DEL, _pubs_free_cb, pub_widgets));
|
||||
efl_event_callback_add(inwin, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
|
||||
|
||||
return pub_widgets;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
new_profile_save_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
_new_profile_save_cb(data, obj, desc, event_info);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
Gui_New_Profile_Win_Widgets *
|
||||
gui_new_profile_win_create(Eo *__main_parent)
|
||||
{
|
||||
Gui_New_Profile_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 *new_profile_type_selector;
|
||||
Eo *elm_label3;
|
||||
Eo *new_profile_name;
|
||||
Eo *elm_label1;
|
||||
Eo *new_profile_command;
|
||||
Eo *elm_label2;
|
||||
Eo *new_profile_script;
|
||||
|
||||
|
||||
new_profile_win = eo_add(ELM_WIN_CLASS, __main_parent, elm_obj_win_type_set(ELM_WIN_BASIC));
|
||||
pub_widgets->new_profile_win = new_profile_win;
|
||||
eo_do(new_profile_win, elm_obj_win_autodel_set(EINA_TRUE));
|
||||
eo_do(new_profile_win, elm_obj_widget_part_text_set(NULL, "Window"));
|
||||
eo_do(new_profile_win, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(new_profile_win, efl_gfx_size_set(689, 390));
|
||||
eo_do(new_profile_win, elm_obj_win_title_set("New profile..."));
|
||||
eo_do(new_profile_win, elm_obj_win_modal_set(EINA_TRUE));
|
||||
elm_bg4 = eo_add(ELM_BG_CLASS, new_profile_win);
|
||||
eo_do(elm_bg4, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_bg4, efl_gfx_visible_set(EINA_TRUE));
|
||||
elm_box5 = eo_add(ELM_BOX_CLASS, new_profile_win);
|
||||
eo_do(elm_box5, elm_obj_box_padding_set(7, 0));
|
||||
eo_do(elm_box5, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_box5, evas_obj_size_hint_align_set(-1.000000, -1.000000));
|
||||
eo_do(elm_box5, efl_gfx_size_set(200, 200));
|
||||
eo_do(elm_box5, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(new_profile_win, elm_obj_win_resize_object_add(elm_bg4));
|
||||
eo_do(new_profile_win, elm_obj_win_resize_object_add(elm_box5));
|
||||
elm_box4 = eo_add(ELM_BOX_CLASS, elm_box5);
|
||||
eo_do(elm_box4, elm_obj_box_padding_set(7, 0));
|
||||
eo_do(elm_box4, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_box4, evas_obj_size_hint_align_set(-1.000000, -1.000000));
|
||||
eo_do(elm_box4, efl_gfx_size_set(200, 200));
|
||||
eo_do(elm_box4, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_box4, elm_obj_box_horizontal_set(EINA_TRUE));
|
||||
new_profile_cancel_button = eo_add(ELM_BUTTON_CLASS, elm_box4);
|
||||
pub_widgets->new_profile_cancel_button = new_profile_cancel_button;
|
||||
eo_do(new_profile_cancel_button, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(new_profile_cancel_button, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(new_profile_cancel_button, efl_gfx_size_set(73, 30));
|
||||
eo_do(new_profile_cancel_button, elm_obj_widget_part_text_set(NULL, "Cancel"));
|
||||
new_profile_save_button = eo_add(ELM_BUTTON_CLASS, elm_box4);
|
||||
pub_widgets->new_profile_save_button = new_profile_save_button;
|
||||
eo_do(new_profile_save_button, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(new_profile_save_button, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(new_profile_save_button, efl_gfx_size_set(73, 30));
|
||||
eo_do(new_profile_save_button, elm_obj_widget_part_text_set(NULL, "Save"));
|
||||
eo_do(new_profile_save_button, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, new_profile_save_button_clicked, NULL));
|
||||
eo_do(elm_box4, elm_obj_box_pack_end(new_profile_save_button));
|
||||
eo_do(elm_box4, elm_obj_box_pack_end(new_profile_cancel_button));
|
||||
elm_box6 = eo_add(ELM_BOX_CLASS, elm_box5);
|
||||
eo_do(elm_box6, elm_obj_box_padding_set(7, 0));
|
||||
eo_do(elm_box6, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_box6, evas_obj_size_hint_align_set(-1.000000, -1.000000));
|
||||
eo_do(elm_box6, efl_gfx_size_set(200, 200));
|
||||
eo_do(elm_box6, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_box6, elm_obj_box_horizontal_set(EINA_TRUE));
|
||||
new_profile_type_selector = eo_add(ELM_HOVERSEL_CLASS, elm_box6);
|
||||
pub_widgets->new_profile_type_selector = new_profile_type_selector;
|
||||
eo_do(new_profile_type_selector, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(new_profile_type_selector, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(new_profile_type_selector, efl_gfx_size_set(60, 40));
|
||||
eo_do(new_profile_type_selector, evas_obj_size_hint_align_set(0.000000, 0.500000));
|
||||
eo_do(new_profile_type_selector, elm_obj_widget_part_text_set(NULL, "Choose the profile type"));
|
||||
elm_label3 = eo_add(ELM_LABEL_CLASS, elm_box6);
|
||||
eo_do(elm_label3, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_label3, efl_gfx_size_set(60, 30));
|
||||
eo_do(elm_label3, evas_obj_size_hint_align_set(1.000000, -1.000000));
|
||||
eo_do(elm_label3, elm_obj_widget_part_text_set(NULL, "Name: "));
|
||||
eo_do(elm_label3, evas_obj_size_hint_weight_set(0.000000, 1.000000));
|
||||
new_profile_name = eo_add(ELM_ENTRY_CLASS, elm_box6);
|
||||
pub_widgets->new_profile_name = new_profile_name;
|
||||
eo_do(new_profile_name, evas_obj_size_hint_align_set(-1.000000, -1.000000));
|
||||
eo_do(new_profile_name, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(new_profile_name, efl_gfx_size_set(65, 35));
|
||||
eo_do(new_profile_name, elm_obj_entry_scrollable_set(EINA_TRUE));
|
||||
eo_do(new_profile_name, elm_obj_entry_single_line_set(EINA_TRUE));
|
||||
eo_do(new_profile_name, evas_obj_size_hint_weight_set(4.000000, 1.000000));
|
||||
eo_do(new_profile_name, elm_obj_entry_editable_set(EINA_TRUE));
|
||||
eo_do(new_profile_name, elm_obj_widget_part_text_set(NULL, ""));
|
||||
eo_do(elm_box6, elm_obj_box_pack_end(new_profile_type_selector));
|
||||
eo_do(elm_box6, elm_obj_box_pack_end(elm_label3));
|
||||
eo_do(elm_box6, elm_obj_box_pack_end(new_profile_name));
|
||||
elm_label1 = eo_add(ELM_LABEL_CLASS, elm_box5);
|
||||
eo_do(elm_label1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_label1, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_label1, efl_gfx_size_set(115, 30));
|
||||
eo_do(elm_label1, efl_gfx_position_set(847, 0));
|
||||
eo_do(elm_label1, elm_obj_widget_part_text_set(NULL, "Command: "));
|
||||
eo_do(elm_label1, evas_obj_size_hint_align_set(0.000000, 2.000000));
|
||||
new_profile_command = eo_add(ELM_ENTRY_CLASS, elm_box5);
|
||||
pub_widgets->new_profile_command = new_profile_command;
|
||||
eo_do(new_profile_command, elm_obj_entry_scrollable_set(EINA_TRUE));
|
||||
eo_do(new_profile_command, evas_obj_size_hint_align_set(-1.000000, -1.000000));
|
||||
eo_do(new_profile_command, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(new_profile_command, efl_gfx_size_set(65, 35));
|
||||
eo_do(new_profile_command, elm_obj_entry_single_line_set(EINA_TRUE));
|
||||
eo_do(new_profile_command, evas_obj_size_hint_weight_set(1.000000, 2.000000));
|
||||
eo_do(new_profile_command, elm_obj_widget_disabled_set(EINA_TRUE));
|
||||
elm_label2 = eo_add(ELM_LABEL_CLASS, elm_box5);
|
||||
eo_do(elm_label2, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_label2, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_label2, efl_gfx_size_set(60, 30));
|
||||
eo_do(elm_label2, evas_obj_size_hint_align_set(0.000000, 1.000000));
|
||||
eo_do(elm_label2, elm_obj_widget_part_text_set(NULL, "Script: "));
|
||||
new_profile_script = eo_add(ELM_ENTRY_CLASS, elm_box5);
|
||||
pub_widgets->new_profile_script = new_profile_script;
|
||||
eo_do(new_profile_script, elm_obj_entry_scrollable_set(EINA_TRUE));
|
||||
eo_do(new_profile_script, evas_obj_size_hint_align_set(-1.000000, -1.000000));
|
||||
eo_do(new_profile_script, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(new_profile_script, efl_gfx_size_set(65, 35));
|
||||
eo_do(new_profile_script, evas_obj_size_hint_weight_set(1.000000, 8.000000));
|
||||
eo_do(new_profile_script, elm_obj_widget_disabled_set(EINA_TRUE));
|
||||
eo_do(elm_box5, elm_obj_box_pack_end(elm_box6));
|
||||
eo_do(elm_box5, elm_obj_box_pack_end(elm_label1));
|
||||
eo_do(elm_box5, elm_obj_box_pack_end(new_profile_command));
|
||||
eo_do(elm_box5, elm_obj_box_pack_end(elm_label2));
|
||||
eo_do(elm_box5, elm_obj_box_pack_end(new_profile_script));
|
||||
eo_do(elm_box5, elm_obj_box_pack_end(elm_box4));
|
||||
eo_do(new_profile_win, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(new_profile_win, eo_event_callback_add(EO_BASE_EVENT_DEL, _pubs_free_cb, pub_widgets));
|
||||
|
||||
return pub_widgets;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
screenshot_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
screenshot_req_cb(data, obj, desc, event_info);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
Gui_Screenshot_Button_Widgets *
|
||||
gui_screenshot_button_create(Eo *__main_parent)
|
||||
{
|
||||
Gui_Screenshot_Button_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets));
|
||||
|
||||
Eo *screenshot_button;
|
||||
Eo *elm_icon1;
|
||||
|
||||
|
||||
screenshot_button = eo_add(ELM_BUTTON_CLASS, __main_parent);
|
||||
pub_widgets->screenshot_button = screenshot_button;
|
||||
eo_do(screenshot_button, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(screenshot_button, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(screenshot_button, efl_gfx_size_set(73, 30));
|
||||
eo_do(screenshot_button, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, screenshot_button_clicked, NULL));
|
||||
elm_icon1 = eo_add(ELM_ICON_CLASS, screenshot_button);
|
||||
eo_do(elm_icon1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
|
||||
eo_do(elm_icon1, efl_gfx_visible_set(EINA_TRUE));
|
||||
eo_do(elm_icon1, efl_gfx_size_set(40, 40));
|
||||
eo_do(elm_icon1, efl_file_set(SCREENSHOT_ICON, NULL));
|
||||
eo_do(screenshot_button, elm_obj_container_content_set("icon", elm_icon1));
|
||||
eo_do(screenshot_button, eo_event_callback_add(EO_BASE_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;
|
||||
}
|
|
@ -6,51 +6,28 @@
|
|||
typedef struct
|
||||
{
|
||||
Eo *main_win;
|
||||
Eo *ext_box;
|
||||
Eo *conn_selector;
|
||||
Eo *conn_selector_menu;
|
||||
Eo *apps_selector;
|
||||
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 *profiles_win;
|
||||
Eo *profile_delete_button;
|
||||
Eo *profile_ok_button;
|
||||
Eo *profile_cancel_button;
|
||||
Eo *profiles_list;
|
||||
} Gui_Profiles_Win_Widgets;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Eo *new_profile_win;
|
||||
Eo *new_profile_cancel_button;
|
||||
Eo *new_profile_save_button;
|
||||
Eo *new_profile_type_selector;
|
||||
Eo *new_profile_name;
|
||||
Eo *new_profile_command;
|
||||
Eo *new_profile_script;
|
||||
} Gui_New_Profile_Win_Widgets;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Eo *screenshot_button;
|
||||
} Gui_Screenshot_Button_Widgets;
|
||||
|
||||
|
||||
typedef struct {
|
||||
Gui_Main_Win_Widgets *main_win;
|
||||
} Gui_Widgets;
|
||||
Eo *inwin;
|
||||
Eo *cancel_button;
|
||||
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_Profiles_Win_Widgets *gui_profiles_win_create(Eo *parent);
|
||||
Gui_Remote_Port_Win_Widgets *gui_remote_port_win_create(Eo *parent);
|
||||
|
||||
Gui_New_Profile_Win_Widgets *gui_new_profile_win_create(Eo *parent);
|
||||
|
||||
Gui_Screenshot_Button_Widgets *gui_screenshot_button_create(Eo *parent);
|
||||
|
||||
Gui_Widgets *gui_gui_get();
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
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}
|
||||
${EVAS_LIBRARIES}
|
||||
${ELEMENTARY_LIBRARIES}
|
||||
${FFI_LIBRARIES}
|
||||
)
|
||||
|
||||
INSTALL(FILES Clouseau.h DESTINATION include)
|
||||
|
||||
INSTALL(TARGETS clouseau_debug LIBRARY DESTINATION lib)
|
||||
|
||||
add_subdirectory(extensions)
|
|
@ -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
|
|
@ -0,0 +1,178 @@
|
|||
#ifndef _CLOUSEAU_DEBUG_H
|
||||
#define _CLOUSEAU_DEBUG_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 */
|
||||
|
||||
#define EOLIAN_DEBUG_MAXARGS 15
|
||||
|
||||
#include <Eo.h>
|
||||
#include <Eolian.h>
|
||||
#include <Elementary.h>
|
||||
|
||||
typedef void (*Eo_Debug_Class_Extract_Cb)(void *data, uint64_t kl, char *kl_name);
|
||||
|
||||
typedef void (*Eo_Debug_Object_Extract_Cb)(void *data, uint64_t obj, uint64_t kl, uint64_t parent);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
EOLIAN_DEBUG_INVALID_TYPE = 0,
|
||||
EOLIAN_DEBUG_POINTER,
|
||||
EOLIAN_DEBUG_STRING,
|
||||
EOLIAN_DEBUG_CHAR,
|
||||
EOLIAN_DEBUG_INT,
|
||||
EOLIAN_DEBUG_SHORT,
|
||||
EOLIAN_DEBUG_DOUBLE,
|
||||
EOLIAN_DEBUG_BOOLEAN,
|
||||
EOLIAN_DEBUG_LONG,
|
||||
EOLIAN_DEBUG_UINT,
|
||||
EOLIAN_DEBUG_LIST,
|
||||
EOLIAN_DEBUG_OBJECT,
|
||||
EOLIAN_DEBUG_VOID,
|
||||
EOLIAN_DEBUG_STRUCT
|
||||
} Eolian_Debug_Basic_Type;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Eolian_Debug_Basic_Type type;
|
||||
uint64_t value;
|
||||
Eina_List *complex_type_values;
|
||||
} Eolian_Debug_Value;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Eolian_Debug_Value value;
|
||||
const Eolian_Function_Parameter *eparam;
|
||||
} Eolian_Debug_Parameter;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Eolian_Debug_Value value;
|
||||
const Eolian_Type *etype;
|
||||
} Eolian_Debug_Return;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const Eolian_Function *efunc;
|
||||
Eolian_Debug_Return ret;
|
||||
Eina_List *params; /* List of Eolian_Debug_Parameter * */
|
||||
} Eolian_Debug_Function;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const Eolian_Unit *unit;
|
||||
const Eolian_Class *ekl;
|
||||
Eina_List *functions; /* List of Eolian_Debug_Function * */
|
||||
} Eolian_Debug_Class;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint64_t obj; /* Eo * */
|
||||
Eina_List *classes; /* List of Eolian_Debug_Class * */
|
||||
} Eolian_Debug_Object_Information;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint64_t obj;
|
||||
int w;
|
||||
int h;
|
||||
char *img;
|
||||
int img_size;
|
||||
int tm_sec;
|
||||
int tm_min;
|
||||
int tm_hour;
|
||||
} Evas_Debug_Screenshot;
|
||||
|
||||
typedef struct {
|
||||
Eo *redirect_manager;
|
||||
Eo *focused;
|
||||
const char *class_name;
|
||||
Eina_List *relations;
|
||||
} Clouseau_Focus_Manager_Data;
|
||||
|
||||
typedef struct {
|
||||
Efl_Ui_Focus_Relations relation;
|
||||
const char *class_name;
|
||||
Evas_Object *vis;
|
||||
} Clouseau_Focus_Relation;
|
||||
|
||||
typedef struct {
|
||||
uintptr_t ptr;
|
||||
const char *helper_name;
|
||||
} Clouseau_Focus_List_Item;
|
||||
|
||||
typedef struct {
|
||||
Eina_List *managers;
|
||||
} Clouseau_Focus_Managers;
|
||||
|
||||
EAPI void *eo_debug_eoids_request_prepare(int *size, ...);
|
||||
|
||||
EAPI void eo_debug_klids_extract(void *buffer, int size, Eo_Debug_Class_Extract_Cb cb, void *data);
|
||||
|
||||
EAPI void eo_debug_eoids_extract(void *buffer, int size, Eo_Debug_Object_Extract_Cb cb, void *data);
|
||||
|
||||
EAPI void eolian_debug_object_information_free(Eolian_Debug_Object_Information *main);
|
||||
|
||||
EAPI Eolian_Debug_Object_Information *
|
||||
eolian_debug_object_information_decode(char *buffer, unsigned int size);
|
||||
|
||||
EAPI Evas_Debug_Screenshot *
|
||||
evas_debug_screenshot_decode(char *buffer, unsigned int size);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Eina_Debug_Session *session;
|
||||
int srcid;
|
||||
void *buffer;
|
||||
unsigned int size;
|
||||
} Main_Loop_Info;
|
||||
|
||||
#define WRAPPER_TO_XFER_MAIN_LOOP(foo) \
|
||||
static void \
|
||||
_intern_main_loop ## foo(void *data) \
|
||||
{ \
|
||||
Main_Loop_Info *info = data; \
|
||||
_main_loop ## foo(info->session, info->srcid, info->buffer, info->size); \
|
||||
free(info->buffer); \
|
||||
free(info); \
|
||||
} \
|
||||
static Eina_Bool \
|
||||
foo(Eina_Debug_Session *session, int srcid, void *buffer, int size) \
|
||||
{ \
|
||||
Main_Loop_Info *info = calloc(1, sizeof(*info)); \
|
||||
info->session = session; \
|
||||
info->srcid = srcid; \
|
||||
info->size = size; \
|
||||
if (info->size) \
|
||||
{ \
|
||||
info->buffer = malloc(info->size); \
|
||||
memcpy(info->buffer, buffer, info->size); \
|
||||
} \
|
||||
ecore_main_loop_thread_safe_call_async(_intern_main_loop ## foo, info); \
|
||||
return EINA_TRUE; \
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,69 @@
|
|||
|
||||
static void
|
||||
_init_manager_details_descriptors(void)
|
||||
{
|
||||
Eet_Data_Descriptor_Class klass;
|
||||
Eet_Data_Descriptor *relations_eed;
|
||||
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&klass, Clouseau_Focus_Relation);
|
||||
relations_eed = eet_data_descriptor_file_new(&klass);
|
||||
#define BASIC(field, type) EET_DATA_DESCRIPTOR_ADD_BASIC(relations_eed, Clouseau_Focus_Relation, #field , field, type)
|
||||
|
||||
BASIC(class_name, EET_T_STRING);
|
||||
BASIC(relation.next, EET_T_LONG_LONG);
|
||||
BASIC(relation.prev, EET_T_LONG_LONG);
|
||||
BASIC(relation.logical, EET_T_CHAR);
|
||||
BASIC(relation.parent, EET_T_LONG_LONG);
|
||||
BASIC(relation.redirect, EET_T_LONG_LONG);
|
||||
BASIC(relation.node, EET_T_LONG_LONG);
|
||||
BASIC(relation.position_in_history, EET_T_INT);
|
||||
|
||||
#undef BASIC
|
||||
#define LIST(field, type) EET_DATA_DESCRIPTOR_ADD_LIST(relations_eed, Clouseau_Focus_Relation, #field , field, type)
|
||||
|
||||
/*LIST(relation.right, EET_T_UINT);
|
||||
LIST(relation.left, EET_T_UINT);
|
||||
LIST(relation.top, EET_T_UINT);
|
||||
LIST(relation.down, EET_T_UINT);*/
|
||||
|
||||
#undef LIST
|
||||
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&klass, Clouseau_Focus_Manager_Data);
|
||||
manager_details = eet_data_descriptor_file_new(&klass);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(manager_details, Clouseau_Focus_Manager_Data, "redirect_manager", redirect_manager, EET_T_LONG_LONG);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(manager_details, Clouseau_Focus_Manager_Data, "focused", focused, EET_T_LONG_LONG);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(manager_details, Clouseau_Focus_Manager_Data, "class_name", class_name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(manager_details, Clouseau_Focus_Manager_Data, "relations", relations, relations_eed);
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
_init_manager_list_descriptors(void)
|
||||
{
|
||||
Eet_Data_Descriptor_Class klass;
|
||||
Eet_Data_Descriptor *detail_eed;
|
||||
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&klass, Clouseau_Focus_List_Item);
|
||||
detail_eed = eet_data_descriptor_file_new(&klass);
|
||||
#define BASIC(field, type) EET_DATA_DESCRIPTOR_ADD_BASIC(detail_eed, Clouseau_Focus_List_Item, #field , field, type)
|
||||
|
||||
BASIC(helper_name, EET_T_STRING);
|
||||
BASIC(ptr, EET_T_LONG_LONG);
|
||||
|
||||
#undef BASIC
|
||||
|
||||
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&klass, Clouseau_Focus_Managers);
|
||||
manager_list = eet_data_descriptor_file_new(&klass);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(manager_list, Clouseau_Focus_Managers, "managers", managers, detail_eed);
|
||||
}
|
||||
|
||||
static void
|
||||
_init_data_descriptors(void)
|
||||
{
|
||||
_init_manager_list_descriptors();
|
||||
_init_manager_details_descriptors();
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
add_subdirectory(objects_introspection)
|
||||
add_subdirectory(evlog)
|
||||
add_subdirectory(focus_inspector)
|
||||
|
||||
if (${EFL_PROFILER_FOUND})
|
||||
add_subdirectory(profiling_viewer)
|
||||
endif (${EFL_PROFILER_FOUND})
|
|
@ -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)
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
set(CMAKE_BUILD_TYPE Debug)
|
||||
|
||||
add_definitions(${CLI_COMMON_DEFINITIONS} -DEFL_EO_API_SUPPORT
|
||||
-DFOCUS_EDJ="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}/clouseau_focus_inspector.edj")
|
||||
|
||||
add_definitions(-DEFL_EO_API_SUPPORT -DGUI_IMAGES_PATH="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}")
|
||||
|
||||
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_focus_inspector SHARED main.c gui.c tree_view.c)
|
||||
|
||||
target_link_libraries(clouseau_focus_inspector
|
||||
${ELEMENTARY_LIBRARIES}
|
||||
${EVAS_LIBRARIES}
|
||||
${EO_LIBRARIES}
|
||||
${EINA_LIBRARIES}
|
||||
${EET_LIBRARIES}
|
||||
${EOLIAN_LIBRARIES}
|
||||
clouseau_debug
|
||||
)
|
||||
|
||||
add_dependencies(clouseau_focus_inspector focus_inspector_theme)
|
||||
|
||||
INSTALL(TARGETS clouseau_focus_inspector LIBRARY DESTINATION lib)
|
|
@ -0,0 +1,191 @@
|
|||
#include <Elementary.h>
|
||||
#include "../../Clouseau_Debug.h"
|
||||
#include "gui.h"
|
||||
|
||||
static Evas_Object *table, *managers, *redirect, *history, *scroller;
|
||||
static Elm_Genlist_Item_Class *itc;
|
||||
static Clouseau_Focus_List_Item *selected_manager = NULL;
|
||||
|
||||
static char*
|
||||
_text_get(void *data, Elm_Genlist *list EINA_UNUSED, const char *part EINA_UNUSED)
|
||||
{
|
||||
Clouseau_Focus_List_Item *it = data;
|
||||
Eina_Strbuf *res = eina_strbuf_new();
|
||||
|
||||
eina_strbuf_append_printf(res, "%s - %p", it->helper_name, (void*)it->ptr);
|
||||
return eina_strbuf_release(res);
|
||||
}
|
||||
|
||||
static void
|
||||
_sel_relation_func(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Instance *inst = evas_object_data_get(obj, "__instance");
|
||||
tree_view_relation_display(inst, elm_radio_state_value_get(obj));
|
||||
elm_radio_value_set(obj, elm_radio_state_value_get(obj));
|
||||
}
|
||||
|
||||
static void
|
||||
_reload(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
if (selected_manager)
|
||||
com_defailt_manager(data, (void*)selected_manager->ptr);
|
||||
}
|
||||
|
||||
EAPI Evas_Object*
|
||||
ui_create(Instance *inst, Evas_Object *obj)
|
||||
{
|
||||
Evas_Object *o, *ic, *table2, *group = NULL;
|
||||
|
||||
o = table = elm_table_add(obj);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_show(o);
|
||||
|
||||
ic = elm_icon_add(obj);
|
||||
elm_icon_standard_set(ic, "edit-redo");
|
||||
evas_object_show(ic);
|
||||
|
||||
o = elm_button_add(obj);
|
||||
elm_object_part_content_set(o, "icon", ic);
|
||||
evas_object_show(o);
|
||||
elm_table_pack(table, o, 0, 0, 1, 1);
|
||||
evas_object_smart_callback_add(o, "clicked", _reload, inst);
|
||||
|
||||
o = managers = elm_combobox_add(obj);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_object_part_text_set(o, "guide", "Manager to inspect");
|
||||
evas_object_show(o);
|
||||
elm_table_pack(table, o, 1, 0, 1, 1);
|
||||
itc = elm_genlist_item_class_new();
|
||||
itc->func.text_get = _text_get;
|
||||
|
||||
o = elm_label_add(obj);
|
||||
elm_object_text_set(o, "Redirect:");
|
||||
evas_object_show(o);
|
||||
elm_table_pack(table, o, 2, 0, 1, 1);
|
||||
|
||||
o = redirect = elm_label_add(obj);
|
||||
evas_object_show(o);
|
||||
elm_table_pack(table, o, 3, 0, 1, 1);
|
||||
|
||||
o = history = elm_hoversel_add(obj);
|
||||
elm_object_text_set(o, "History");
|
||||
evas_object_show(o);
|
||||
elm_table_pack(table, o, 4, 0, 1, 1);
|
||||
|
||||
o = scroller = elm_scroller_add(table);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_show(o);
|
||||
elm_table_pack(table, o, 0, 1, 5, 1);
|
||||
|
||||
o = table2 = elm_table_add(obj);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_show(o);
|
||||
|
||||
char *text[] = {"Tree","Next","Prev","None"};
|
||||
|
||||
for (int i = 0; i <= RELATION_NONE; ++i)
|
||||
{
|
||||
o = elm_radio_add(table);
|
||||
evas_object_data_set(o, "__instance", inst);
|
||||
evas_object_smart_callback_add(o, "changed", _sel_relation_func, NULL);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_object_text_set(o, text[i]);
|
||||
evas_object_show(o);
|
||||
elm_table_pack(table2, o, i % 5, i/5, 1, 1);
|
||||
|
||||
if (!group)
|
||||
group = o;
|
||||
else
|
||||
elm_radio_group_add(o, group);
|
||||
|
||||
elm_radio_state_value_set(o, i);
|
||||
}
|
||||
|
||||
elm_radio_value_set(group, RELATION_NONE);
|
||||
elm_table_pack(table, table2, 0, 2, 5, 1);
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
static void
|
||||
_sel(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
Clouseau_Focus_List_Item *it = elm_object_item_data_get(event_info);
|
||||
com_defailt_manager(data, (void*)it->ptr);
|
||||
selected_manager = it;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ui_managers_add(Instance *inst, Clouseau_Focus_Managers *clouseau_managers)
|
||||
{
|
||||
Clouseau_Focus_List_Item *it;
|
||||
Eina_List *n;
|
||||
|
||||
elm_genlist_clear(managers);
|
||||
selected_manager = NULL;
|
||||
|
||||
if (!clouseau_managers) return;
|
||||
|
||||
EINA_LIST_FOREACH(clouseau_managers->managers, n, it)
|
||||
{
|
||||
elm_genlist_item_append(managers, itc, it, NULL, 0, _sel, inst);
|
||||
}
|
||||
|
||||
free(clouseau_managers);
|
||||
}
|
||||
|
||||
static int
|
||||
_sort(const void *a_raw, const void *b_raw)
|
||||
{
|
||||
const Clouseau_Focus_Relation *a = a_raw;
|
||||
const Clouseau_Focus_Relation *b = b_raw;
|
||||
|
||||
int val_a, val_b;
|
||||
|
||||
if (a) val_a = a->relation.position_in_history;
|
||||
if (b) val_b = b->relation.position_in_history;
|
||||
|
||||
return val_a - val_b;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ui_manager_data_arrived(Instance *inst, Clouseau_Focus_Manager_Data *data)
|
||||
{
|
||||
Clouseau_Focus_Relation *rel;
|
||||
Evas_Object *o;
|
||||
Eina_List *n, *sorted = NULL;
|
||||
|
||||
EINA_LIST_FREE(inst->realized.objects, o)
|
||||
evas_object_del(o);
|
||||
|
||||
inst->realized.focusable_to_cfr = eina_hash_pointer_new(NULL);
|
||||
|
||||
if (inst->realized.data)
|
||||
free(inst->realized.data);
|
||||
|
||||
inst->realized.data = data;
|
||||
|
||||
elm_hoversel_clear(history);
|
||||
|
||||
if (!inst->realized.data) return;
|
||||
|
||||
EINA_LIST_FOREACH(data->relations, n, rel)
|
||||
{
|
||||
if (rel->relation.position_in_history != -1)
|
||||
sorted = eina_list_sorted_insert(sorted, _sort, rel);
|
||||
eina_hash_add(inst->realized.focusable_to_cfr, &rel->relation.node, rel);
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(sorted, n, rel)
|
||||
{
|
||||
elm_hoversel_item_add(history, rel->class_name, NULL, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
tree_view_update(inst, scroller);
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef GUI_H
|
||||
#define GUI_H
|
||||
|
||||
#include "../../Clouseau.h"
|
||||
#include "../../Clouseau_Debug.h"
|
||||
|
||||
typedef struct {
|
||||
Clouseau_Extension *ext;
|
||||
struct {
|
||||
Eina_Hash *focusable_to_cfr;
|
||||
Eina_List *objects, *relation_objects;
|
||||
Clouseau_Focus_Manager_Data *data;
|
||||
} realized;
|
||||
} Instance;
|
||||
|
||||
typedef enum {
|
||||
RELATION_TREE = 0,
|
||||
RELATION_NEXT = 1,
|
||||
RELATION_PREV = 2,
|
||||
RELATION_NONE = 3
|
||||
} Relations;
|
||||
|
||||
#define PUSH_CLEANUP(inst, o) inst->realized.objects = eina_list_append(inst->realized.objects, o)
|
||||
#define PUSH_RELAION_CLEANUP(inst, o) inst->realized.relation_objects = eina_list_append(inst->realized.relation_objects, o)
|
||||
|
||||
EAPI void tree_view_update(Instance *inst, Evas_Object *scroller);
|
||||
EAPI void tree_view_relation_display(Instance *inst, Relations rel);
|
||||
EAPI void ui_managers_add(Instance *inst, Clouseau_Focus_Managers *clouseau_managers);
|
||||
EAPI void ui_manager_data_arrived(Instance *inst, Clouseau_Focus_Manager_Data *data);
|
||||
EAPI Evas_Object* ui_create(Instance *inst, Evas_Object *obj);
|
||||
|
||||
EAPI void com_refresh_managers(Instance *inst);
|
||||
EAPI void com_defailt_manager(Instance *inst, Efl_Ui_Focus_Manager *manager);
|
||||
#endif
|
|
@ -0,0 +1,126 @@
|
|||
#include <Eina.h>
|
||||
#include <Elementary.h>
|
||||
#include "../../Clouseau.h"
|
||||
#include "../../Clouseau_Debug.h"
|
||||
#include "gui.h"
|
||||
|
||||
static Instance inst;
|
||||
|
||||
static int _focus_manager_list_op = EINA_DEBUG_OPCODE_INVALID;
|
||||
static int _focus_manager_detail_op = EINA_DEBUG_OPCODE_INVALID;
|
||||
|
||||
static Eet_Data_Descriptor *manager_details = NULL, *manager_list = NULL;
|
||||
#include "../../clouseau_focus_serialization.x"
|
||||
|
||||
static Eina_Bool
|
||||
_main_loop_focus_manager_list_cb(Eina_Debug_Session *session, int src EINA_UNUSED, void *buffer, int size)
|
||||
{
|
||||
Clouseau_Extension *ext = eina_debug_session_data_get(session);
|
||||
Clouseau_Focus_Managers *managers;
|
||||
if (!manager_list) _init_manager_list_descriptors();
|
||||
|
||||
managers = eet_data_descriptor_decode(manager_list, buffer, size);
|
||||
|
||||
ui_managers_add(ext->data, managers);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
WRAPPER_TO_XFER_MAIN_LOOP(_focus_manager_list_cb)
|
||||
|
||||
static Eina_Bool
|
||||
_main_loop_focus_manager_detail_cb(Eina_Debug_Session *session, int src EINA_UNUSED, void *buffer, int size)
|
||||
{
|
||||
Clouseau_Extension *ext = eina_debug_session_data_get(session);
|
||||
Clouseau_Focus_Manager_Data *pd;
|
||||
if (!manager_details) _init_data_descriptors();
|
||||
|
||||
pd = eet_data_descriptor_decode(manager_details, buffer, size);
|
||||
|
||||
ui_manager_data_arrived(ext->data, pd);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
WRAPPER_TO_XFER_MAIN_LOOP(_focus_manager_detail_cb)
|
||||
|
||||
EINA_DEBUG_OPCODES_ARRAY_DEFINE(_ops,
|
||||
{"Clouseau/Elementary_Focus/list", &_focus_manager_list_op, &_focus_manager_list_cb},
|
||||
{"Clouseau/Elementary_Focus/detail", &_focus_manager_detail_op, &_focus_manager_detail_cb},
|
||||
{NULL, NULL, NULL}
|
||||
);
|
||||
|
||||
static void
|
||||
_session_changed(Clouseau_Extension *ext)
|
||||
{
|
||||
int i = 0;
|
||||
Eina_Debug_Opcode *ops = _ops();
|
||||
|
||||
while (ops[i].opcode_name)
|
||||
{
|
||||
if (ops[i].opcode_id) *(ops[i].opcode_id) = EINA_DEBUG_OPCODE_INVALID;
|
||||
i++;
|
||||
}
|
||||
if (ext->session)
|
||||
{
|
||||
eina_debug_session_data_set(ext->session, ext);
|
||||
eina_debug_opcodes_register(ext->session, ops, NULL, ext);
|
||||
}
|
||||
|
||||
ui_managers_add(ext->data, NULL);
|
||||
ui_manager_data_arrived(ext->data, NULL);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
_app_changed(Clouseau_Extension *ext)
|
||||
{
|
||||
ui_managers_add(ext->data, NULL);
|
||||
ui_manager_data_arrived(ext->data, NULL);
|
||||
|
||||
com_refresh_managers(ext->data);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
com_refresh_managers(Instance *ext_inst)
|
||||
{
|
||||
eina_debug_session_send(ext_inst->ext->session, ext_inst->ext->app_id, _focus_manager_list_op, NULL, 0);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
com_defailt_manager(Instance *ext_inst, Efl_Ui_Focus_Manager *manager)
|
||||
{
|
||||
void *tmp[1];
|
||||
tmp[0] = manager;
|
||||
|
||||
eina_debug_session_send(ext_inst->ext->session, ext_inst->ext->app_id, _focus_manager_detail_op, tmp, sizeof(void*));
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
extension_name_get()
|
||||
{
|
||||
return "Focus Inspector";
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
extension_start(Clouseau_Extension *ext, Eo *parent)
|
||||
{
|
||||
eina_init();
|
||||
|
||||
inst.ext = ext;
|
||||
ext->data = &inst;
|
||||
ext->ui_object = ui_create(ext->data, parent);
|
||||
ext->session_changed_cb = _session_changed;
|
||||
ext->app_changed_cb = _app_changed;
|
||||
|
||||
return !!ext->ui_object;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
extension_stop(Clouseau_Extension *ext)
|
||||
{
|
||||
efl_del(ext->ui_object);
|
||||
|
||||
eina_shutdown();
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
|
@ -0,0 +1,313 @@
|
|||
#include <Elementary.h>
|
||||
#include "../../Clouseau_Debug.h"
|
||||
#include "gui.h"
|
||||
|
||||
static void
|
||||
find(Instance *pd, void *parent, void (*found)(void *data, Instance *pd, Clouseau_Focus_Relation *relation), void *data)
|
||||
{
|
||||
for (unsigned int i = 0; pd->realized.data->relations && i < eina_list_count(pd->realized.data->relations); ++i)
|
||||
{
|
||||
Clouseau_Focus_Relation *rel;
|
||||
rel = eina_list_nth(pd->realized.data->relations, i);
|
||||
if (rel->relation.parent == parent)
|
||||
found(data, pd, rel);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
tree_level(void *data, Instance *inst, Clouseau_Focus_Relation *relation)
|
||||
{
|
||||
Evas_Object *box, *childbox, *vis;
|
||||
int maxw, maxh, minw, minh;
|
||||
Eina_Strbuf *buf;
|
||||
char group[PATH_MAX];
|
||||
|
||||
box = evas_object_box_add(evas_object_evas_get(data));
|
||||
evas_object_box_padding_set(box, 20, 20);
|
||||
evas_object_show(box);
|
||||
|
||||
PUSH_CLEANUP(inst, box);
|
||||
|
||||
buf = eina_strbuf_new();
|
||||
eina_strbuf_append_printf(buf, "%p", relation->relation.node);
|
||||
|
||||
vis = edje_object_add(evas_object_evas_get(data));
|
||||
evas_object_size_hint_weight_set(vis, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(vis, 0.0, EVAS_HINT_FILL);
|
||||
|
||||
if (relation->relation.position_in_history != -1 )
|
||||
snprintf(group, sizeof(group), "focus_inspector/history");
|
||||
else if (relation->relation.redirect)
|
||||
snprintf(group, sizeof(group), "focus_inspector/redirect");
|
||||
else if (relation->relation.logical)
|
||||
snprintf(group, sizeof(group), "focus_inspector/logical");
|
||||
else
|
||||
snprintf(group, sizeof(group), "focus_inspector/regular");
|
||||
|
||||
edje_object_file_set(vis, FOCUS_EDJ, group);
|
||||
edje_object_part_text_set(vis, "widget_name", relation->class_name);
|
||||
evas_object_show(vis);
|
||||
evas_object_box_append(box, vis);
|
||||
|
||||
edje_object_size_max_get(vis, &maxw, &maxh);
|
||||
edje_object_size_min_get(vis, &minw, &minh);
|
||||
if ((minw <= 0) && (minh <= 0))
|
||||
edje_object_size_min_calc(vis, &minw, &minh);
|
||||
|
||||
evas_object_size_hint_max_set(vis, maxw, maxh);
|
||||
evas_object_size_hint_min_set(vis, minw, minh);
|
||||
|
||||
relation->vis = vis;
|
||||
|
||||
PUSH_CLEANUP(inst, vis);
|
||||
|
||||
childbox = evas_object_box_add(evas_object_evas_get(data));
|
||||
evas_object_box_padding_set(childbox, 20, 20);
|
||||
evas_object_box_layout_set(childbox, evas_object_box_layout_vertical, NULL, NULL);
|
||||
evas_object_box_append(box, childbox);
|
||||
evas_object_show(childbox);
|
||||
|
||||
PUSH_CLEANUP(inst, childbox);
|
||||
|
||||
find(inst, relation->relation.node, tree_level, childbox);
|
||||
|
||||
evas_object_box_append(data, box);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
tree_view_update(Instance *inst, Evas_Object *scroller)
|
||||
{
|
||||
Evas_Object *box;
|
||||
|
||||
box = evas_object_box_add(evas_object_evas_get(scroller));
|
||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_box_layout_set(box, evas_object_box_layout_vertical, NULL, NULL);
|
||||
evas_object_show(box);
|
||||
PUSH_CLEANUP(inst, box);
|
||||
|
||||
if (inst->realized.data)
|
||||
find(inst, NULL, tree_level, box);
|
||||
|
||||
elm_object_content_set(scroller, box);
|
||||
|
||||
tree_view_relation_display(inst, RELATION_NONE);
|
||||
}
|
||||
|
||||
static Evas_Object*
|
||||
_create_arrow(Evas *e)
|
||||
{
|
||||
Evas_Object *vg;
|
||||
Efl_VG *cont, *tail, *front;
|
||||
|
||||
vg = evas_object_vg_add(e);
|
||||
|
||||
cont = evas_vg_container_add(vg);
|
||||
|
||||
tail = evas_vg_shape_add(cont);
|
||||
evas_vg_node_color_set(tail, 0, 0, 0, 255);
|
||||
evas_vg_shape_stroke_color_set(tail, 128, 10,10, 128);
|
||||
evas_vg_shape_stroke_width_set(tail, 2.0);
|
||||
evas_vg_shape_stroke_join_set(tail, EFL_GFX_JOIN_MITER);
|
||||
evas_vg_shape_append_move_to(tail, 0, 0);
|
||||
evas_vg_shape_append_line_to(tail, -100, 0);
|
||||
efl_name_set(tail, "tail");
|
||||
|
||||
front = evas_vg_shape_add(cont);
|
||||
evas_vg_node_color_set(front, 0, 0, 0, 255);
|
||||
evas_vg_shape_stroke_color_set(front, 128, 10,10, 128);
|
||||
evas_vg_shape_stroke_width_set(front, 2.0);
|
||||
evas_vg_shape_stroke_join_set(front, EFL_GFX_JOIN_MITER);
|
||||
evas_vg_shape_append_move_to(front, -6, -6);
|
||||
evas_vg_shape_append_line_to(front, 0, 0);
|
||||
evas_vg_shape_append_line_to(front, -6, 6);
|
||||
evas_vg_shape_append_line_to(front, -6, -6);
|
||||
efl_name_set(front, "front");
|
||||
|
||||
evas_object_vg_root_node_set(vg, cont);
|
||||
|
||||
return vg;
|
||||
}
|
||||
|
||||
static void
|
||||
_arrow_from_to(Evas_Object *vg, Eina_Position2D from, Eina_Position2D to)
|
||||
{
|
||||
Eina_Rect pos;
|
||||
Eina_Matrix3 tmp, root_m;
|
||||
Efl_VG *shape;
|
||||
double distance, deg;
|
||||
|
||||
shape = evas_object_vg_root_node_get(vg);
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(shape);
|
||||
|
||||
pos.x = MIN(from.x, to.x);
|
||||
pos.y = MIN(from.y, to.y);
|
||||
pos.w = MAX(from.x, to.x) - pos.x;
|
||||
pos.h = MAX(from.y, to.y) - pos.y;
|
||||
|
||||
distance = sqrt(pow(pos.w, 2)+pow(pos.h, 2));
|
||||
|
||||
eina_matrix3_identity(&tmp);
|
||||
eina_matrix3_scale(&tmp, distance/100, 1.0);
|
||||
|
||||
evas_vg_node_transformation_set(evas_vg_container_child_get(shape, "tail"), &tmp);
|
||||
|
||||
Eina_Size2D size = EINA_SIZE2D((from.x - to.x), (from.y - to.y));
|
||||
|
||||
if (from.y - to.y == 0)
|
||||
{
|
||||
deg = 0;
|
||||
}
|
||||
else if (from.x - to.x == 0)
|
||||
{
|
||||
if (from.y > to.y)
|
||||
deg = M_PI_2;
|
||||
else
|
||||
deg = M_PI + M_PI_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
double di = ((double)(double)from.y - to.y) / ((double)from.x - to.x);
|
||||
deg = atan(di);
|
||||
}
|
||||
|
||||
if (from.x >= to.x)
|
||||
{
|
||||
size.w = 0;
|
||||
deg += M_PI;
|
||||
}
|
||||
|
||||
if (to.y <= from.y)
|
||||
{
|
||||
size.h = 0;
|
||||
}
|
||||
|
||||
|
||||
size.h = MAX(abs(size.h), 0) + 10;
|
||||
size.w = MAX(abs(size.w), 0) + 10;
|
||||
|
||||
eina_matrix3_identity(&root_m);
|
||||
eina_matrix3_identity(&tmp);
|
||||
eina_matrix3_translate(&tmp, size.w, size.h);
|
||||
eina_matrix3_multiply_copy(&root_m, &root_m, &tmp);
|
||||
eina_matrix3_identity(&tmp);
|
||||
eina_matrix3_rotate(&tmp, deg);
|
||||
eina_matrix3_multiply_copy(&root_m, &root_m, &tmp);
|
||||
|
||||
evas_vg_node_transformation_set(shape, &root_m);
|
||||
|
||||
evas_object_geometry_set(vg, pos.x - 10, pos.y - 10, pos.w + 20, pos.h + 20);
|
||||
}
|
||||
|
||||
static void
|
||||
_geom_change(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Eina_Rectangle pos1, pos2;
|
||||
Eina_Position2D from, to;
|
||||
Evas_Object *line, *vis1, *vis2;
|
||||
|
||||
line = data;
|
||||
vis1 = evas_object_data_get(line, "__from");
|
||||
vis2 = evas_object_data_get(line, "__to");
|
||||
|
||||
evas_object_geometry_get(vis1, &pos1.x, &pos1.y, &pos1.w, &pos1.h);
|
||||
evas_object_geometry_get(vis2, &pos2.x, &pos2.y, &pos2.w, &pos2.h);
|
||||
|
||||
from.x = pos1.x + pos1.w / 2;
|
||||
from.y = pos1.y + pos1.h / 2;
|
||||
to.x = pos2.x + pos2.w / 2;
|
||||
to.y = pos2.y + pos2.h / 2;
|
||||
|
||||
_arrow_from_to(line, from, to);
|
||||
}
|
||||
|
||||
static void
|
||||
_relation_display(Instance *inst, Evas_Object *vis1, Evas_Object *vis2)
|
||||
{
|
||||
Evas_Object *line;
|
||||
Evas_Object *smart;
|
||||
|
||||
line = _create_arrow(evas_object_evas_get(vis1));
|
||||
//evas_object_anti_alias_set(line, EINA_FALSE);
|
||||
evas_object_pass_events_set(line, EINA_TRUE);
|
||||
evas_object_data_set(line, "__from", vis1);
|
||||
evas_object_data_set(line, "__to", vis2);
|
||||
evas_object_show(line);
|
||||
|
||||
smart = evas_object_smart_parent_get(vis1);
|
||||
evas_object_smart_member_add(line, smart);
|
||||
|
||||
_geom_change(line, evas_object_evas_get(vis1), vis1, NULL);
|
||||
|
||||
PUSH_RELAION_CLEANUP(inst, line);
|
||||
|
||||
evas_object_event_callback_add(vis1, EVAS_CALLBACK_MOVE, _geom_change, line);
|
||||
evas_object_event_callback_add(vis1, EVAS_CALLBACK_RESIZE, _geom_change, line);
|
||||
evas_object_event_callback_add(vis2, EVAS_CALLBACK_MOVE, _geom_change, line);
|
||||
evas_object_event_callback_add(vis2, EVAS_CALLBACK_RESIZE, _geom_change, line);
|
||||
|
||||
}
|
||||
|
||||
EAPI void
|
||||
tree_view_relation_display(Instance *inst, Relations rel_type)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
EINA_LIST_FREE(inst->realized.relation_objects, o)
|
||||
{
|
||||
Evas_Object *vis1, *vis2;
|
||||
vis1 = evas_object_data_get(o, "__from");
|
||||
vis2 = evas_object_data_get(o, "__to");
|
||||
|
||||
evas_object_event_callback_del_full(vis1, EVAS_CALLBACK_MOVE, _geom_change, o);
|
||||
evas_object_event_callback_del_full(vis1, EVAS_CALLBACK_RESIZE, _geom_change, o);
|
||||
evas_object_event_callback_del_full(vis2, EVAS_CALLBACK_MOVE, _geom_change, o);
|
||||
evas_object_event_callback_del_full(vis2, EVAS_CALLBACK_RESIZE, _geom_change, o);
|
||||
|
||||
evas_object_del(o);
|
||||
}
|
||||
|
||||
if (rel_type == RELATION_NONE) return;
|
||||
|
||||
if (!inst->realized.data) return;
|
||||
|
||||
Clouseau_Focus_Relation *rel;
|
||||
Eina_List *n;
|
||||
|
||||
EINA_LIST_FOREACH(inst->realized.data->relations, n, rel)
|
||||
{
|
||||
Eo *from;
|
||||
Eo *to;
|
||||
|
||||
if (rel_type == RELATION_TREE)
|
||||
{
|
||||
if (!rel->relation.parent) continue;
|
||||
from = rel->relation.parent;
|
||||
to = rel->relation.node;
|
||||
}
|
||||
else if (rel_type == RELATION_NEXT)
|
||||
{
|
||||
if (!rel->relation.next) continue;
|
||||
to = rel->relation.next;
|
||||
from = rel->relation.node;
|
||||
}
|
||||
else if (rel_type == RELATION_PREV)
|
||||
{
|
||||
if (!rel->relation.prev) continue;
|
||||
to = rel->relation.prev;
|
||||
from = rel->relation.node;
|
||||
}
|
||||
|
||||
Clouseau_Focus_Relation *c_from, *c_to;
|
||||
|
||||
c_from = eina_hash_find(inst->realized.focusable_to_cfr, &from);
|
||||
c_to = eina_hash_find(inst->realized.focusable_to_cfr, &to);
|
||||
EINA_SAFETY_ON_NULL_GOTO(c_from, next);
|
||||
EINA_SAFETY_ON_NULL_GOTO(c_to, next);
|
||||
|
||||
_relation_display(inst, c_from->vis, c_to->vis);
|
||||
next:
|
||||
(void) n;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
set(CMAKE_BUILD_TYPE Debug)
|
||||
|
||||
add_definitions(${CLI_COMMON_DEFINITIONS} -DEFL_EO_API_SUPPORT)
|
||||
|
||||
add_definitions(-DEFL_EO_API_SUPPORT -DGUI_IMAGES_PATH="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}")
|
||||
|
||||
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}
|
||||
clouseau_debug
|
||||
)
|
||||
|
||||
INSTALL(TARGETS clouseau_objects_introspection LIBRARY DESTINATION lib)
|
|
@ -0,0 +1,203 @@
|
|||
#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 <Efl_Ui.h>
|
||||
#include <Elementary.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_entity_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_entity_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);
|
||||
pub_widgets->settings_menu = settings_menu;
|
||||
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(EFL_UI_PANES_CLASS, box);
|
||||
elm_panes_content_right_size_set(panes, 0.600000);
|
||||
evas_object_size_hint_weight_set(panes, 1.000000, 1.000000);
|
||||
efl_gfx_entity_size_set(panes, EINA_SIZE2D(75, 75));
|
||||
efl_gfx_entity_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_entity_visible_set(object_infos_list, EINA_TRUE);
|
||||
objects_list = elm_genlist_add(panes);
|
||||
pub_widgets->objects_list = objects_list;
|
||||
evas_object_size_hint_weight_set(objects_list, 1.000000, 1.000000);
|
||||
efl_gfx_entity_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 = elm_button_add(__main_parent);
|
||||
pub_widgets->bt = bt;
|
||||
evas_object_size_hint_weight_set(bt, 1.000000, 1.000000);
|
||||
evas_object_show(bt);
|
||||
efl_event_callback_add(bt, EFL_INPUT_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_entity_visible_set(elm_icon1, EINA_TRUE);
|
||||
efl_file_set(elm_icon1, TAKE_SCREENSHOT_ICON);
|
||||
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 = elm_button_add(__main_parent);
|
||||
pub_widgets->bt = bt;
|
||||
evas_object_size_hint_weight_set(bt, 1.000000, 1.000000);
|
||||
evas_object_show(bt);
|
||||
evas_object_resize(bt, 73, 30);
|
||||
efl_event_callback_add(bt, EFL_INPUT_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_entity_visible_set(elm_icon1, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(elm_icon1, EINA_SIZE2D(40, 40));
|
||||
efl_file_set(elm_icon1, SHOW_SCREENSHOT_ICON);
|
||||
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_entity_size_set(win, EINA_SIZE2D(300, 300));
|
||||
evas_object_size_hint_weight_set(win, 1.000000, 1.000000);
|
||||
elm_win_title_set(win, "Screenshot");
|
||||
bg = elm_bg_add(win);
|
||||
pub_widgets->bg = bg;
|
||||
evas_object_size_hint_weight_set(bg, 1.000000, 1.000000);
|
||||
efl_gfx_entity_visible_set(bg, EINA_TRUE);
|
||||
elm_win_resize_object_add(win, bg);
|
||||
efl_gfx_entity_visible_set(win, EINA_TRUE);
|
||||
efl_event_callback_add(win, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets);
|
||||
|
||||
return pub_widgets;
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
#ifndef _gui_h_
|
||||
#define _gui_h_
|
||||
#include <Eo.h>
|
||||
#include <Elementary.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Eo *main;
|
||||
Eo *tb;
|
||||
Eo *settings_menu;
|
||||
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
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
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}
|
||||
${EFL_PROFILER_INCLUDE_DIRS}
|
||||
${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_profiling_viewer SHARED main.c)
|
||||
|
||||
target_link_libraries(clouseau_profiling_viewer
|
||||
efl_profiler
|
||||
${ELEMENTARY_LIBRARIES}
|
||||
${EVAS_LIBRARIES}
|
||||
${EO_LIBRARIES}
|
||||
${EINA_LIBRARIES}
|
||||
${EET_LIBRARIES}
|
||||
${EOLIAN_LIBRARIES}
|
||||
)
|
||||
|
||||
INSTALL(TARGETS clouseau_profiling_viewer LIBRARY DESTINATION lib)
|
|
@ -0,0 +1,410 @@
|
|||
#include <Eina.h>
|
||||
#include <Elementary.h>
|
||||
#include <Efl_Profiler.h>
|
||||
|
||||
#include "../../Clouseau.h"
|
||||
|
||||
#define _EET_ENTRY "config"
|
||||
|
||||
|
||||
typedef enum {
|
||||
STREAM_PAUSED = 0,
|
||||
STREAM_PROCESSING
|
||||
} CLOUSEAU_PROFILER_STATUS;
|
||||
|
||||
typedef struct {
|
||||
Evas_Object *profiler;
|
||||
Ecore_Timer *record_get_timer;
|
||||
CLOUSEAU_PROFILER_STATUS status; /*<< 0 - stopped, 1 - processing, 2 - paused */
|
||||
struct {
|
||||
Evas_Object *obj;
|
||||
Evas_Object *status_btn;
|
||||
Evas_Object *follow_btn;
|
||||
Evas_Object *filters_btn;
|
||||
Evas_Object *find_btn;
|
||||
Evas_Object *time_range_btn;
|
||||
Evas_Object *setting_btn;
|
||||
} toolbar;
|
||||
Eina_Bool follow;
|
||||
Eina_Bool block_processed;
|
||||
} Inf;
|
||||
|
||||
static int _clouseau_profiling_extension_log_dom = 0;
|
||||
|
||||
static int _record_on_op = EINA_DEBUG_OPCODE_INVALID;
|
||||
static int _record_off_op = EINA_DEBUG_OPCODE_INVALID;
|
||||
static int _record_get_op = EINA_DEBUG_OPCODE_INVALID;
|
||||
|
||||
static Eina_Bool _record_get_cb(Eina_Debug_Session *, int, void *, int);
|
||||
static void _follow_interval_status_change_cb(void *data, Evas_Object *obj, void *event_info);
|
||||
|
||||
EINA_DEBUG_OPCODES_ARRAY_DEFINE(_ops,
|
||||
{"CPU/Freq/on", &_record_on_op, NULL},
|
||||
{"CPU/Freq/off", &_record_off_op, NULL},
|
||||
{"EvLog/get", &_record_get_op, &_record_get_cb},
|
||||
{NULL, NULL, NULL}
|
||||
);
|
||||
|
||||
EAPI const char *
|
||||
extension_name_get()
|
||||
{
|
||||
return "Profiling viewer";
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_record_request_cb(void *data)
|
||||
{
|
||||
Clouseau_Extension *ext = data;
|
||||
eina_debug_session_send(ext->session, ext->app_id, _record_get_op, NULL, 0);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_stream_processing_resume_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
Clouseau_Extension *ext = data;
|
||||
Inf *inf = ext->data;
|
||||
|
||||
eina_debug_session_send(ext->session, ext->app_id, _record_on_op, NULL, 0);
|
||||
if (!inf->record_get_timer)
|
||||
inf->record_get_timer = ecore_timer_add(0.2, _record_request_cb, ext);
|
||||
}
|
||||
|
||||
static void
|
||||
_session_changed(Clouseau_Extension *ext)
|
||||
{
|
||||
int i = 0;
|
||||
Eina_Debug_Opcode *ops = _ops();
|
||||
Inf *inf = ext->data;
|
||||
|
||||
EINA_LOG_DOM_DBG(_clouseau_profiling_extension_log_dom, "Session changed");
|
||||
|
||||
while (ops[i].opcode_name)
|
||||
{
|
||||
if (ops[i].opcode_id) *(ops[i].opcode_id) = EINA_DEBUG_OPCODE_INVALID;
|
||||
i++;
|
||||
}
|
||||
|
||||
if (ext->session)
|
||||
{
|
||||
eina_debug_session_data_set(ext->session, ext);
|
||||
eina_debug_opcodes_register(ext->session, ops, NULL, NULL);
|
||||
}
|
||||
|
||||
/*disable controls on toolbar */
|
||||
elm_object_disabled_set(inf->toolbar.status_btn, EINA_TRUE);
|
||||
elm_object_disabled_set(inf->toolbar.follow_btn, EINA_TRUE);
|
||||
|
||||
if (!inf->block_processed)
|
||||
{
|
||||
elm_object_disabled_set(inf->toolbar.filters_btn, EINA_TRUE);
|
||||
elm_object_disabled_set(inf->toolbar.time_range_btn, EINA_TRUE);
|
||||
elm_object_disabled_set(inf->toolbar.find_btn, EINA_TRUE);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
_app_changed(Clouseau_Extension *ext)
|
||||
{
|
||||
Inf *inf = ext->data;
|
||||
evas_object_smart_callback_call(inf->profiler, "stream,app,changed", &ext->app_id);
|
||||
EINA_LOG_DOM_DBG(_clouseau_profiling_extension_log_dom, "Application changed");
|
||||
|
||||
/*enable controls on toolbar */
|
||||
elm_object_disabled_set(inf->toolbar.status_btn, EINA_FALSE);
|
||||
elm_object_disabled_set(inf->toolbar.follow_btn, EINA_FALSE);
|
||||
elm_object_disabled_set(inf->toolbar.filters_btn, EINA_TRUE);
|
||||
elm_object_disabled_set(inf->toolbar.time_range_btn, EINA_TRUE);
|
||||
elm_object_disabled_set(inf->toolbar.find_btn, EINA_TRUE);
|
||||
_follow_interval_status_change_cb(ext, inf->toolbar.follow_btn, NULL);
|
||||
|
||||
inf->block_processed = EINA_FALSE;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
_profiling_import(Clouseau_Extension *ext,
|
||||
void *buffer, int size,
|
||||
int version EINA_UNUSED)
|
||||
{
|
||||
EINA_LOG_DOM_DBG(_clouseau_profiling_extension_log_dom, "Data imported");
|
||||
Inf *inf = ext->data;
|
||||
|
||||
Stream_Block_Data block_data = { .size = size, .data = buffer };
|
||||
|
||||
evas_object_smart_callback_call(inf->profiler, "stream,block,process", &block_data);
|
||||
inf->block_processed = EINA_TRUE;
|
||||
_stream_processing_resume_cb(ext,NULL, NULL);
|
||||
if (inf->block_processed)
|
||||
{
|
||||
elm_object_disabled_set(inf->toolbar.filters_btn, EINA_FALSE);
|
||||
elm_object_disabled_set(inf->toolbar.time_range_btn, EINA_FALSE);
|
||||
elm_object_disabled_set(inf->toolbar.find_btn, EINA_FALSE);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_record_get_cb(Eina_Debug_Session *session, int cid EINA_UNUSED, void *buffer, int size)
|
||||
{
|
||||
Clouseau_Extension *ext = eina_debug_session_data_get(session);
|
||||
_profiling_import(ext, buffer, size, -1);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_find_dialog_show_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
Clouseau_Extension *ext = (Clouseau_Extension *)data;
|
||||
Inf *inf = ext->data;
|
||||
evas_object_smart_callback_call(inf->profiler, "find,show", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_time_range_dialog_show_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
Clouseau_Extension *ext = (Clouseau_Extension *)data;
|
||||
Inf *inf = ext->data;
|
||||
evas_object_smart_callback_call(inf->profiler, "time,interval,win", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_filters_dialog_show_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
Clouseau_Extension *ext = (Clouseau_Extension *)data;
|
||||
Inf *inf = ext->data;
|
||||
evas_object_smart_callback_call(inf->profiler, "filters,show", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_unfollow_interval_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
Clouseau_Extension *ext = (Clouseau_Extension *)data;
|
||||
Inf *inf = ext->data;
|
||||
Evas_Object *icon = NULL;
|
||||
|
||||
evas_object_smart_callback_call(inf->profiler, "unfollow,processed,data", NULL);
|
||||
inf->follow = EINA_FALSE;
|
||||
icon = elm_object_part_content_get(inf->toolbar.follow_btn, "icon");
|
||||
elm_icon_standard_set(icon, "go-last");
|
||||
}
|
||||
|
||||
static void
|
||||
_follow_interval_status_change_cb(void *data,
|
||||
Evas_Object *obj,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
Clouseau_Extension *ext = (Clouseau_Extension *)data;
|
||||
Inf *inf = ext->data;
|
||||
char *icon_name = NULL;
|
||||
Evas_Object *icon = NULL;
|
||||
|
||||
if (inf->follow)
|
||||
{
|
||||
evas_object_smart_callback_call(inf->profiler, "unfollow,processed,data", NULL);
|
||||
inf->follow = EINA_FALSE;
|
||||
icon_name = "go-last";
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_smart_callback_call(inf->profiler, "follow,processed,data", NULL);
|
||||
inf->follow = EINA_TRUE;
|
||||
icon_name = "go-bottom";
|
||||
}
|
||||
icon = elm_object_part_content_get(obj, "icon");
|
||||
elm_icon_standard_set(icon, icon_name);
|
||||
}
|
||||
|
||||
static void
|
||||
_profiling_status_change_cb(void *data,
|
||||
Evas_Object *obj,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
Clouseau_Extension *ext = (Clouseau_Extension *)data;
|
||||
Inf *inf = ext->data;
|
||||
char *icon_name = NULL;
|
||||
Evas_Object *icon = NULL;
|
||||
|
||||
switch (inf->status)
|
||||
{
|
||||
case STREAM_PROCESSING:
|
||||
{
|
||||
eina_debug_session_send(ext->session, ext->app_id, _record_off_op, NULL, 0);
|
||||
ecore_timer_del(inf->record_get_timer);
|
||||
inf->status = STREAM_PAUSED;
|
||||
icon_name = "media-playback-start";
|
||||
break;
|
||||
}
|
||||
case STREAM_PAUSED:
|
||||
{
|
||||
eina_debug_session_send(ext->session, ext->app_id, _record_on_op, NULL, 0);
|
||||
inf->record_get_timer = NULL;
|
||||
_stream_processing_resume_cb(ext,NULL, NULL);
|
||||
inf->status = STREAM_PROCESSING;
|
||||
icon_name = "media-playback-pause";
|
||||
break;
|
||||
}
|
||||
}
|
||||
icon = elm_object_part_content_get(obj, "icon");
|
||||
elm_icon_standard_set(icon, icon_name);
|
||||
}
|
||||
|
||||
static Eo *
|
||||
_ui_get(Clouseau_Extension *ext, Eo *parent)
|
||||
{
|
||||
Inf *inf = ext->data;
|
||||
Evas_Object *toolbar = NULL;
|
||||
Evas_Object *box = NULL;
|
||||
Evas_Object *button = NULL, *icon = NULL;
|
||||
Elm_Object_Item *item = NULL;
|
||||
|
||||
box = elm_box_add(parent);
|
||||
evas_object_size_hint_weight_set(box, 1, 1);
|
||||
evas_object_size_hint_align_set(box, -1, -1);
|
||||
evas_object_show(box);
|
||||
|
||||
toolbar = elm_toolbar_add(parent);
|
||||
inf->toolbar.obj = toolbar;
|
||||
elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_SCROLL);
|
||||
elm_toolbar_select_mode_set(toolbar, ELM_OBJECT_SELECT_MODE_NONE);
|
||||
elm_toolbar_homogeneous_set(toolbar, EINA_TRUE);
|
||||
elm_object_style_set(toolbar, "transparent");
|
||||
elm_toolbar_menu_parent_set(toolbar, parent);
|
||||
evas_object_size_hint_weight_set(toolbar, 0, 0);
|
||||
evas_object_size_hint_align_set(toolbar, -1, 0);
|
||||
evas_object_show(toolbar);
|
||||
|
||||
item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
|
||||
button = elm_button_add(toolbar);
|
||||
elm_object_item_part_content_set(item, "object", button);
|
||||
evas_object_smart_callback_add(button, "clicked", _profiling_status_change_cb, ext);
|
||||
icon = elm_icon_add(button);
|
||||
elm_image_resizable_set(icon, EINA_FALSE, EINA_FALSE);
|
||||
elm_icon_standard_set(icon, "media-playback-start");
|
||||
elm_object_part_content_set(button, "icon", icon);
|
||||
inf->toolbar.status_btn = button;
|
||||
evas_object_show(button);
|
||||
elm_object_disabled_set(button, EINA_TRUE);
|
||||
|
||||
item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
|
||||
button = elm_button_add(toolbar);
|
||||
elm_object_item_part_content_set(item, "object", button);
|
||||
evas_object_smart_callback_add(button, "clicked", _follow_interval_status_change_cb, ext);
|
||||
icon = elm_icon_add(button);
|
||||
elm_icon_standard_set(icon, "go-last");
|
||||
elm_object_part_content_set(button, "icon", icon);
|
||||
evas_object_show(button);
|
||||
inf->toolbar.follow_btn = button;
|
||||
elm_object_disabled_set(button, EINA_TRUE);
|
||||
|
||||
item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
|
||||
button = elm_button_add(toolbar);
|
||||
elm_object_item_part_content_set(item, "object", button);
|
||||
evas_object_smart_callback_add(button, "clicked", _filters_dialog_show_cb, ext);
|
||||
icon = elm_icon_add(button);
|
||||
elm_icon_standard_set(icon, "view-list-details");
|
||||
elm_object_part_content_set(button, "icon", icon);
|
||||
evas_object_show(button);
|
||||
inf->toolbar.filters_btn = button;
|
||||
elm_object_disabled_set(button, EINA_TRUE);
|
||||
|
||||
item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
|
||||
button = elm_button_add(toolbar);
|
||||
elm_object_item_part_content_set(item, "object", button);
|
||||
evas_object_smart_callback_add(button, "clicked", _find_dialog_show_cb, ext);
|
||||
icon = elm_icon_add(button);
|
||||
elm_icon_standard_set(icon, "system-search");
|
||||
elm_object_part_content_set(button, "icon", icon);
|
||||
evas_object_show(button);
|
||||
inf->toolbar.find_btn = button;
|
||||
|
||||
item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
|
||||
button = elm_button_add(toolbar);
|
||||
elm_object_item_part_content_set(item, "object", button);
|
||||
evas_object_smart_callback_add(button, "clicked", _time_range_dialog_show_cb, ext);
|
||||
icon = elm_icon_add(button);
|
||||
elm_icon_standard_set(icon, "clock");
|
||||
elm_object_part_content_set(button, "icon", icon);
|
||||
evas_object_show(button);
|
||||
inf->toolbar.time_range_btn = button;
|
||||
elm_object_disabled_set(button, EINA_TRUE);
|
||||
|
||||
item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
|
||||
button = elm_button_add(toolbar);
|
||||
elm_object_item_part_content_set(item, "object", button);
|
||||
icon = elm_icon_add(button);
|
||||
elm_icon_standard_set(icon, "preferences-other");
|
||||
elm_object_part_content_set(button, "icon", icon);
|
||||
evas_object_show(button);
|
||||
inf->toolbar.setting_btn= button;
|
||||
elm_object_disabled_set(button, EINA_TRUE);
|
||||
|
||||
|
||||
inf->profiler = efl_profiling_viewer_init(parent);
|
||||
evas_object_size_hint_weight_set(inf->profiler, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(inf->profiler, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_smart_callback_add(inf->profiler, "unfollow", _unfollow_interval_cb, ext);
|
||||
|
||||
elm_box_pack_end(box, toolbar);
|
||||
elm_box_pack_end(box, inf->profiler);
|
||||
|
||||
return box;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
extension_start(Clouseau_Extension *ext, Eo *parent)
|
||||
{
|
||||
Inf *inf;
|
||||
|
||||
eina_init();
|
||||
const char *log_dom = "clouseau_profiling_extension";
|
||||
_clouseau_profiling_extension_log_dom = eina_log_domain_register(log_dom, EINA_COLOR_ORANGE);
|
||||
if (_clouseau_profiling_extension_log_dom < 0)
|
||||
{
|
||||
EINA_LOG_ERR("Could not register log domain: %s", log_dom);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EINA_LOG_DOM_DBG(_clouseau_profiling_extension_log_dom, "Extension started");
|
||||
|
||||
inf = calloc(1, sizeof(Inf));
|
||||
ext->data = inf;
|
||||
ext->session_changed_cb = _session_changed;
|
||||
ext->app_changed_cb = _app_changed;
|
||||
ext->import_data_cb = _profiling_import;
|
||||
|
||||
ext->ui_object = _ui_get(ext, parent);
|
||||
return !!ext->ui_object;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
extension_stop(Clouseau_Extension *ext)
|
||||
{
|
||||
Inf *inf = ext->data;
|
||||
|
||||
evas_object_smart_callback_call(inf->profiler, "log,close", NULL);
|
||||
|
||||
efl_profiling_viewer_shutdown(inf->profiler);
|
||||
free(inf);
|
||||
efl_del(ext->ui_object);
|
||||
|
||||
EINA_LOG_DOM_DBG(_clouseau_profiling_extension_log_dom, "Extension stopped");
|
||||
eina_log_domain_unregister(_clouseau_profiling_extension_log_dom);
|
||||
eina_shutdown();
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|