Compare commits
35 Commits
master
...
devs/jackd
Author | SHA1 | Date |
---|---|---|
|
ee7396c007 | 5 years ago |
|
4bb2424f9e | 5 years ago |
|
962a0b5067 | 5 years ago |
|
94e32a55dd | 5 years ago |
|
1fc93e92ae | 5 years ago |
|
fbf83cc256 | 5 years ago |
|
45a804aad1 | 5 years ago |
|
1012d73b8c | 5 years ago |
|
daaba2c6c1 | 5 years ago |
|
7e894d1e69 | 5 years ago |
|
dc659a2566 | 5 years ago |
|
3efc1b954e | 5 years ago |
|
dec2755b2e | 5 years ago |
|
4cd8a71e05 | 5 years ago |
|
a35cbb82ea | 5 years ago |
|
5d4e377378 | 5 years ago |
|
ddf3c0b1d7 | 5 years ago |
|
92eb15ef8e | 5 years ago |
|
01b061c9b2 | 5 years ago |
|
290a43b377 | 5 years ago |
|
2388fde7ed | 5 years ago |
|
ec13d9020f | 5 years ago |
|
ee6fbd81ea | 5 years ago |
|
4b2c77e47b | 5 years ago |
|
8a53045b0d | 5 years ago |
|
0f4a910465 | 5 years ago |
|
6160da735f | 5 years ago |
|
7d65920fbd | 5 years ago |
|
7db88770c7 | 5 years ago |
|
6865c7f810 | 5 years ago |
|
67a9ff31ee | 5 years ago |
|
a2dab74f46 | 5 years ago |
|
20dd69752c | 5 years ago |
|
0d4673d08f | 5 years ago |
|
fcffa64078 | 5 years ago |
19 changed files with 5079 additions and 1476 deletions
@ -0,0 +1,15 @@ |
||||
add_custom_command ( |
||||
OUTPUT clouseau_evlog.edj |
||||
COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_SOURCE_DIR}/evlog.edc clouseau_evlog.edj |
||||
DEPENDS evlog.edc |
||||
) |
||||
|
||||
add_custom_target ( |
||||
clouseau_evlog_edj |
||||
DEPENDS clouseau_evlog.edj evlog.edc |
||||
) |
||||
|
||||
install ( |
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/clouseau_evlog.edj images/show-screenshot.png images/take-screenshot.png |
||||
DESTINATION share/${PROJECT_NAME_LOWER} |
||||
) |
@ -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; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,26 @@ |
||||
set(CMAKE_BUILD_TYPE Debug) |
||||
|
||||
include_directories( |
||||
${CMAKE_CURRENT_BINARY_DIR} |
||||
${EINA_INCLUDE_DIRS} |
||||
${EOLIAN_INCLUDE_DIRS} |
||||
${EO_INCLUDE_DIRS} |
||||
${FFI_INCLUDE_DIRS} |
||||
${EVAS_INCLUDE_DIRS} |
||||
${ELEMENTARY_INCLUDE_DIRS} |
||||
) |
||||
|
||||
add_library(clouseau_debug SHARED clouseau_debug.c) |
||||
|
||||
target_link_libraries(clouseau_debug |
||||
${EINA_LIBRARIES} |
||||
${EO_LIBRARIES} |
||||
${EOLIAN_LIBRARIES} |
||||
${FFI_LIBRARIES} |
||||
) |
||||
|
||||
INSTALL(FILES Clouseau.h DESTINATION include) |
||||
|
||||
INSTALL(TARGETS clouseau_debug LIBRARY DESTINATION lib) |
||||
|
||||
add_subdirectory(extensions) |
@ -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 |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,2 @@ |
||||
add_subdirectory(objects_introspection) |
||||
add_subdirectory(evlog) |
@ -0,0 +1,29 @@ |
||||
set(CMAKE_BUILD_TYPE Debug) |
||||
|
||||
add_definitions(-DEFL_EO_API_SUPPORT -DEVLOG_EDJ="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}/clouseau_evlog.edj") |
||||
|
||||
set(EOLIAN_INCLUDE_FLAG -I \"${EOLIAN_EO_DIR}/eo-1\" -I${CMAKE_CURRENT_SOURCE_DIR}) |
||||
|
||||
include_directories( |
||||
${CMAKE_CURRENT_BINARY_DIR} |
||||
${ELEMENTARY_INCLUDE_DIRS} |
||||
${EVAS_INCLUDE_DIRS} |
||||
${EO_INCLUDE_DIRS} |
||||
${EINA_INCLUDE_DIRS} |
||||
${EET_INCLUDE_DIRS} |
||||
) |
||||
|
||||
link_directories (${PC_LIBELEMENTARY_LIBRARY_DIRS}) |
||||
|
||||
add_library(clouseau_evlog SHARED main.c) |
||||
|
||||
target_link_libraries(clouseau_evlog |
||||
${ELEMENTARY_LIBRARIES} |
||||
${EVAS_LIBRARIES} |
||||
${EO_LIBRARIES} |
||||
${EINA_LIBRARIES} |
||||
${EET_LIBRARIES} |
||||
) |
||||
|
||||
INSTALL(TARGETS clouseau_evlog LIBRARY DESTINATION lib) |
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,35 @@ |
||||
set(CMAKE_BUILD_TYPE Debug) |
||||
|
||||
STRING(REGEX REPLACE "\n" "" EOLIAN_EO_DIR ${EOLIAN_EO_DIR}) |
||||
STRING(REGEX REPLACE " " "" EOLIAN_EO_DIR ${EOLIAN_EO_DIR}) |
||||
add_definitions(${CLI_COMMON_DEFINITIONS} -DEFL_EO_API_SUPPORT |
||||
-DEOLIAN_EO_DIR="${EOLIAN_EO_DIR}") |
||||
|
||||
add_definitions(-DEFL_EO_API_SUPPORT -DGUI_IMAGES_PATH="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}") |
||||
|
||||
set(EOLIAN_INCLUDE_FLAG -I \"${EOLIAN_EO_DIR}/eo-1\" -I${CMAKE_CURRENT_SOURCE_DIR}) |
||||
|
||||
include_directories( |
||||
${CMAKE_CURRENT_BINARY_DIR} |
||||
${ELEMENTARY_INCLUDE_DIRS} |
||||
${EVAS_INCLUDE_DIRS} |
||||
${EO_INCLUDE_DIRS} |
||||
${EINA_INCLUDE_DIRS} |
||||
${EET_INCLUDE_DIRS} |
||||
${EOLIAN_INCLUDE_DIRS} |
||||
) |
||||
|
||||
link_directories (${PC_LIBELEMENTARY_LIBRARY_DIRS}) |
||||
|
||||
add_library(clouseau_objects_introspection SHARED main.c gui.c) |
||||
|
||||
target_link_libraries(clouseau_objects_introspection |
||||
${ELEMENTARY_LIBRARIES} |
||||
${EVAS_LIBRARIES} |
||||
${EO_LIBRARIES} |
||||
${EINA_LIBRARIES} |
||||
${EET_LIBRARIES} |
||||
${EOLIAN_LIBRARIES} |
||||
) |
||||
|
||||
INSTALL(TARGETS clouseau_objects_introspection LIBRARY DESTINATION lib) |
@ -0,0 +1,205 @@ |
||||
#ifndef EFL_BETA_API_SUPPORT |
||||
#define EFL_BETA_API_SUPPORT |
||||
#endif |
||||
#ifndef EFL_EO_API_SUPPORT |
||||
#define EFL_EO_API_SUPPORT |
||||
#endif |
||||
#ifndef ELM_INTERNAL_API_ARGESFSDFEFC |
||||
#define ELM_INTERNAL_API_ARGESFSDFEFC |
||||
#endif |
||||
#include <Elementary.h> |
||||
#include "elm_widget_container.h" |
||||
#include "elm_interface_scrollable.h" |
||||
#include "elm_interface_fileselector.h" |
||||
#include "gui.h" |
||||
|
||||
static const char* objs_types_strings[] = |
||||
{ |
||||
"Show all canvas objects", |
||||
"Only show Elementary widgets", |
||||
NULL |
||||
}; |
||||
|
||||
#ifdef GUI_IMAGES_PATH |
||||
const char *SHOW_SCREENSHOT_ICON = GUI_IMAGES_PATH"/show-screenshot.png"; |
||||
const char *TAKE_SCREENSHOT_ICON = GUI_IMAGES_PATH"/take-screenshot.png"; |
||||
#else |
||||
#error "Please define GUI_IMAGES_PATH" |
||||
#endif |
||||
|
||||
extern void |
||||
screenshot_req_cb(void *data, const Efl_Event *event); |
||||
extern void |
||||
reload_perform(void *data, Evas_Object *obj, void *event_info); |
||||
extern void |
||||
take_screenshot_button_clicked(void *data, const Efl_Event *event); |
||||
extern void |
||||
show_screenshot_button_clicked(void *data, const Efl_Event *event); |
||||
extern void |
||||
snapshot_do(void *data, Evas_Object *fs, void *event_info); |
||||
extern void |
||||
objs_type_changed(void *data, Evas_Object *obj, void *event_info); |
||||
extern void |
||||
highlight_changed(void *data, Evas_Object *obj, void *event_info); |
||||
extern void |
||||
jump_to_ptr_inwin_show(void *data, Evas_Object *obj, void *event_info); |
||||
|
||||
static void |
||||
_pubs_free_cb(void *data, const Efl_Event *event EINA_UNUSED) |
||||
{ |
||||
free(data); |
||||
} |
||||
|
||||
Gui_Win_Widgets * |
||||
gui_win_create(Eo *__main_parent) |
||||
{ |
||||
Gui_Win_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets)); |
||||
|
||||
Eo *box, *tb; |
||||
Eo *panes; |
||||
Eo *object_infos_list; |
||||
Eo *objects_list; |
||||
|
||||
box = elm_box_add(__main_parent); |
||||
pub_widgets->main = box; |
||||
evas_object_size_hint_weight_set(box, 1, 1); |
||||
evas_object_size_hint_align_set(box, -1, -1); |
||||
efl_gfx_visible_set(box, EINA_TRUE); |
||||
efl_event_callback_add(box, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets); |
||||
|
||||
tb = elm_toolbar_add(__main_parent); |
||||
pub_widgets->tb = tb; |
||||
elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_MENU); |
||||
elm_toolbar_menu_parent_set(tb, __main_parent); |
||||
evas_object_size_hint_weight_set(tb, 0, 0); |
||||
evas_object_size_hint_align_set(tb, -1, 0); |
||||
efl_gfx_visible_set(tb, EINA_TRUE); |
||||
|
||||
pub_widgets->reload_button = elm_toolbar_item_append(tb, "view-refresh", "Reload", reload_perform, NULL); |
||||
|
||||
elm_toolbar_item_append(tb, "edit-find", "Jump To Pointer", jump_to_ptr_inwin_show, NULL); |
||||
|
||||
{ |
||||
int i = 0; |
||||
Eo *settings_it = elm_toolbar_item_append(tb, "system-run", "Settings", NULL, NULL); |
||||
elm_toolbar_item_menu_set(settings_it, EINA_TRUE); |
||||
|
||||
Eo *settings_menu = elm_toolbar_item_menu_get(settings_it); |
||||
Eo *objs_type_it = elm_menu_item_add(settings_menu, NULL, NULL, |
||||
"Objects types display", NULL, NULL); |
||||
while (objs_types_strings[i]) |
||||
{ |
||||
Eo *it = elm_menu_item_add(settings_menu, objs_type_it, NULL, |
||||
objs_types_strings[i], objs_type_changed, (void *)(uintptr_t)i); |
||||
Eo *rd = elm_radio_add(settings_menu); |
||||
elm_radio_state_value_set(rd, i); |
||||
if (!i) pub_widgets->objs_type_radio = rd; |
||||
else elm_radio_group_add(rd, pub_widgets->objs_type_radio); |
||||
elm_object_item_content_set(it, rd); |
||||
i++; |
||||
} |
||||
Eo *highlight_it = elm_menu_item_add(settings_menu, NULL, NULL, |
||||
"Hightlight", highlight_changed, NULL); |
||||
Eo *ck = elm_check_add(settings_menu); |
||||
elm_object_item_content_set(highlight_it, ck); |
||||
pub_widgets->highlight_ck = ck; |
||||
} |
||||
|
||||
panes = efl_add(ELM_PANES_CLASS, box); |
||||
elm_obj_panes_content_right_size_set(panes, 0.600000); |
||||
evas_object_size_hint_weight_set(panes, 1.000000, 1.000000); |
||||
efl_gfx_size_set(panes, 75, 75); |
||||
efl_gfx_visible_set(panes, EINA_TRUE); |
||||
evas_object_size_hint_weight_set(panes, 1.000000, 1.000000); |
||||
evas_object_size_hint_align_set(panes, -1.000000, -1.000000); |
||||
elm_box_pack_end(box, tb); |
||||
elm_box_pack_end(box, panes); |
||||
object_infos_list = elm_genlist_add(panes); |
||||
pub_widgets->object_infos_list = object_infos_list; |
||||
evas_object_size_hint_weight_set(object_infos_list, 1.000000, 1.000000); |
||||
efl_gfx_visible_set(object_infos_list, EINA_TRUE); |
||||
objects_list = efl_add(ELM_GENLIST_CLASS, panes); |
||||
pub_widgets->objects_list = objects_list; |
||||
evas_object_size_hint_weight_set(objects_list, 1.000000, 1.000000); |
||||
efl_gfx_visible_set(objects_list, EINA_TRUE); |
||||
elm_object_part_content_set(panes, "left", objects_list); |
||||
elm_object_part_content_set(panes, "right", object_infos_list); |
||||
|
||||
return pub_widgets; |
||||
} |
||||
|
||||
Gui_Take_Screenshot_Button_Widgets * |
||||
gui_take_screenshot_button_create(Eo *__main_parent) |
||||
{ |
||||
Gui_Take_Screenshot_Button_Widgets *pub_widgets = calloc(1, sizeof(*pub_widgets)); |
||||
|
||||
Eo *bt; |
||||
Eo *elm_icon1; |
||||
|
||||
bt = efl_add(EFL_UI_BUTTON_CLASS, __main_parent); |
||||
pub_widgets->bt = bt; |
||||
evas_object_size_hint_weight_set(bt, 1.000000, 1.000000); |
||||
efl_gfx_visible_set(bt, EINA_TRUE); |
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, take_screenshot_button_clicked, NULL); |
||||
|
||||
elm_icon1 = elm_icon_add(bt); |
||||
evas_object_size_hint_weight_set(elm_icon1, 1.000000, 1.000000); |
||||
efl_gfx_visible_set(elm_icon1, EINA_TRUE); |
||||
efl_file_set(elm_icon1, TAKE_SCREENSHOT_ICON, NULL); |
||||
elm_object_part_content_set(bt, "icon", elm_icon1); |
||||
efl_event_callback_add(bt, EFL_EVENT_DEL, _pubs_free_cb, pub_widgets); |
||||
|
||||
return pub_widgets; |
||||
} |
||||