You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

926 lines
26 KiB

#include "e.h"
static void _e_test_internal(void);
#ifdef DESKMIRROR_TEST
static Eina_Bool
deskmirror_test(void *d EINA_UNUSED)
{
E_Zone *zone;
Evas_Object *o;
zone = e_zone_current_get();
o = e_deskmirror_add(e_desk_current_get(zone), 0, 0);
evas_object_move(o, zone->x + zone->w - (zone->w / 4), zone->y + zone->h / 2);
evas_object_resize(o, zone->w / 4, zone->h / 4);
evas_object_layer_set(o, E_LAYER_POPUP);
evas_object_show(o);
o = e_deskmirror_add(e_desk_current_get(zone), 0, 0);
evas_object_move(o, zone->x, zone->y + zone->h / 2);
evas_object_resize(o, zone->w / 2, zone->h / 2);
evas_object_layer_set(o, E_LAYER_POPUP);
evas_object_show(o);
return EINA_FALSE;
}
#endif
E_API void
e_test(void)
{
_e_test_internal();
#ifdef DESKMIRROR_TEST
ecore_timer_loop_add(2.0, deskmirror_test, NULL);
#endif
}
#if 0
static int
_e_test_timer(void *data)
{
E_Menu *m;
m = data;
if (m)
{
e_menu_deactivate(m);
e_object_del(E_OBJECT(m));
ecore_timer_loop_add(0.05, _e_test_timer, NULL);
return 0;
}
m = e_int_menus_main_new();
e_menu_activate_mouse(m,
eina_list_data_get(e_comp->zones),
0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
ecore_timer_loop_add(0.05, _e_test_timer, m);
return 0;
}
static void
_e_test_internal(void)
{
_e_test_timer(NULL);
}
#elif 0
static void
_e_test_resize(E_Win *win)
{
Evas_Object *o;
o = win->data;
printf("RESIZE %i %i\n", win->w, win->h);
evas_object_resize(o, win->w, win->h);
evas_object_color_set(o, rand() & 0xff, rand() & 0xff, rand() & 0xff, 255);
}
static void
_e_test_delete(E_Win *win)
{
printf("DEL!\n");
e_object_del(E_OBJECT(win));
}
static void
_e_test_internal(void)
{
E_Win *win;
Evas_Object *o;
win = e_win_new(e_comp);
evas_object_resize_callback_set(win, _e_test_resize);
e_win_delete_callback_set(win, _e_test_delete);
e_win_placed_set(win, 0);
evas_object_geometry_set(win, 10, 80, 400, 200);
e_win_name_class_set(win, "E", "_test_window");
e_win_title_set(win, "A test window");
elm_win_raise(win);
evas_object_show(win);
o = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_color_set(o, 255, 200, 100, 255);
evas_object_resize(o, 400, 200);
evas_object_show(o);
win->data = o;
}
#elif 0
static int
_e_test_timer(void *data)
{
E_Menu *m;
static int y = 0;
m = data;
ecore_x_pointer_warp(m->evas_win, 20, y);
y += 10;
if (y > m->cur.h) y = 0;
return 1;
}
static void
_e_test_internal(void)
{
E_Menu *m;
m = e_int_menus_main_new();
e_menu_activate_mouse(m,
eina_list_data_get(e_comp->zones),
0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
ecore_timer_loop_add(0.02, _e_test_timer, m);
}
#elif 0
static void
_e_test_dialog_del(void *obj)
{
E_Dialog *dia;
dia = obj;
printf("dialog delete hook!\n");
}
static void
_e_test_internal(void)
{
E_Dialog *dia;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
9 years ago
dia = e_dialog_new(c, "E", "_test");
e_object_del_attach_func_set(E_OBJECT(dia), _e_test_dialog_del);
e_dialog_title_set(dia, "A Test Dialog");
e_dialog_text_set(dia, "A Test Dialog<ps/>And another line<ps/><hilight>Highlighted Text</hilight>");
e_dialog_icon_set(dia, "preference-plugin", 64);
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
e_dialog_button_add(dia, "Apply", "system-restart", NULL, NULL);
e_dialog_button_add(dia, "Cancel", "application-exit", NULL, NULL);
elm_win_center(dia->win, 1, 1);
e_dialog_show(dia);
}
#elif 0
static void
_e_test_click(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
#if 1
double size;
size = (double)(rand() % 1000) / 999;
evas_object_resize(obj, size * 1024, size * 768);
#else
e_scrollframe_child_region_show(data, 1024, 768, 100, 100);
#endif
}
static void
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Object *o, *o2, *o3;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
9 years ago
dia = e_dialog_new(c, "E", "_test");
e_dialog_title_set(dia, "A Test Dialog");
o = e_icon_add(dia->win->evas);
e_icon_file_set(o, "/home/raster/scroll.png");
evas_object_resize(o, 1024, 768);
evas_object_focus_set(o, 1);
evas_object_show(o);
o2 = e_scrollframe_add(dia->win->evas);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_test_click, o2);
// e_scrollframe_custom_theme_set(o2, "base/theme/widgets", "e/widgets/scrollframe");
evas_object_show(o2);
#if 0
o3 = e_pan_add(dia->win->evas);
e_pan_child_set(o3, o);
e_scrollframe_extern_pan_set(o2, o3, e_pan_set, e_pan_get, e_pan_max_get, e_pan_child_size_get);
#else
e_scrollframe_child_set(o2, o);
#endif
e_dialog_content_set(dia, o2, 500, 300);
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
elm_win_center(dia->win, 1, 1);
e_dialog_show(dia);
evas_object_focus_set(o, 1);
}
#elif 0
static E_Dialog *
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
9 years ago
_e_test_dia(E_Comp *c)
{
E_Config_Dialog *dia;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
9 years ago
dia = e_int_config_modules(c);
return dia;
}
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
9 years ago
static E_Comp *tcon = NULL;
static int
_e_test_timer(void *data)
{
E_Config_Dialog *dia;
if (data == NULL)
{
dia = _e_test_dia(tcon);
ecore_timer_loop_add(0.2, _e_test_timer, dia);
}
else
{
dia = data;
e_object_del(E_OBJECT(dia));
ecore_timer_loop_add(0.2, _e_test_timer, NULL);
}
return 0;
}
static void
_e_test_internal(void)
{
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
9 years ago
tcon = c;
_e_test_timer(NULL);
}
#elif 0
struct _tmp
{
Evas_Object *ilist, *scrollframe;
};
static struct _tmp tmp = {NULL, NULL};
static void
_e_test_sel(void *data, void *data2)
{
Evas_Coord x, y, w, h;
e_ilist_selected_geometry_get(tmp.ilist, &x, &y, &w, &h);
e_scrollframe_child_region_show(tmp.scrollframe, x, y, w, h);
}
static void
_e_test_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Coord mw, mh, vw, vh, w, h;
e_scrollframe_child_viewport_size_get(obj, &vw, &vh);
e_ilist_size_min_get(data, &mw, &mh);
evas_object_geometry_get(data, NULL, NULL, &w, &h);
if (vw >= mw)
{
if (w != vw) evas_object_resize(data, vw, h);
}
}
static void
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Coord mw, mh, vw, vh;
Evas_Object *o, *o2, *o3, *o4;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
9 years ago
dia = e_dialog_new(c, "E", "_test");
e_dialog_title_set(dia, "A Test Dialog");
o = e_ilist_add(dia->win->evas);
e_ilist_icon_size_set(o, 80, 48);
o3 = e_livethumb_add(dia->win->evas);
e_livethumb_vsize_set(o3, 160, 96);
o4 = edje_object_add(e_livethumb_evas_get(o3));
e_theme_edje_object_set(o4, "base/theme/borders",
"e/widgets/border/default/border");
e_livethumb_thumb_set(o3, o4);
e_ilist_append(o, o3, "Item 1", 0, _e_test_sel, NULL, NULL, NULL);
o3 = e_icon_add(dia->win->evas);
e_icon_file_set(o3, "/home/raster/C/stuff/icons/palette.png");
e_ilist_append(o, o3, "Item 2 (Some really long text goes here for testing)", 0, _e_test_sel, NULL, NULL, NULL);
o3 = e_icon_add(dia->win->evas);
e_icon_file_set(o3, "/home/raster/C/stuff/icons/mozilla.png");
e_ilist_append(o, o3, "Item 3 (Medium length)", 0, _e_test_sel, NULL, NULL, NULL);
o3 = e_icon_add(dia->win->evas);
e_icon_file_set(o3, "/home/raster/C/stuff/icons/trash_open.png");
e_ilist_append(o, o3, "Item POOP", 0, _e_test_sel, NULL, NULL, NULL);
o3 = e_icon_add(dia->win->evas);
e_icon_file_set(o3, "/home/raster/C/stuff/icons/watch.png");
e_ilist_append(o, o3, "Item BLING BLING", 0, _e_test_sel, NULL, NULL, NULL);
o3 = e_icon_add(dia->win->evas);
e_icon_file_set(o3, "/home/raster/C/stuff/icons/quake3.png");
e_ilist_append(o, o3, "Sukebelinth", 0, _e_test_sel, NULL, NULL, NULL);
o3 = e_icon_add(dia->win->evas);
e_icon_file_set(o3, "/home/raster/C/stuff/icons/opera6.png");
e_ilist_append(o, o3, "A header", 1, NULL, NULL, NULL, NULL);
o3 = e_icon_add(dia->win->evas);
e_icon_file_set(o3, "/home/raster/C/stuff/icons/opera6.png");
e_ilist_append(o, o3, "Panties", 0, _e_test_sel, NULL, NULL, NULL);
o3 = e_icon_add(dia->win->evas);
e_icon_file_set(o3, "/home/raster/C/stuff/icons/drawer_open.png");
e_ilist_append(o, o3, "Flimbert the cagey", 0, _e_test_sel, NULL, NULL, NULL);
o3 = e_icon_add(dia->win->evas);
e_icon_file_set(o3, "/home/raster/C/stuff/icons/cd.png");
e_ilist_append(o, o3, "Norbert", 0, _e_test_sel, NULL, NULL, NULL);
e_ilist_size_min_get(o, &mw, &mh);
evas_object_resize(o, mw, mh);
evas_object_focus_set(o, 1);
evas_object_show(o);
o2 = e_scrollframe_add(dia->win->evas);
evas_object_event_callback_add(o2, EVAS_CALLBACK_RESIZE, _e_test_resize, o);
evas_object_resize(o2, mw, 150);
evas_object_show(o2);
e_scrollframe_child_set(o2, o);
e_scrollframe_child_viewport_size_get(o2, &vw, &vh);
e_dialog_content_set(dia, o2, 200, 150);
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
elm_win_center(dia->win, 1, 1);
e_dialog_resizable_set(dia, 1);
e_dialog_show(dia);
tmp.ilist = o;
tmp.scrollframe = o2;
evas_object_focus_set(o, 1);
}
#elif 0
static void
_e_test_cb_e_smart_pan_changed_hook(void *data, Evas_Object *obj, void *event_info)
{
printf("VAL: %3.3f\n", e_slider_value_get(obj));
}
static void
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Object *o;
Evas_Coord mw, mh;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
9 years ago
dia = e_dialog_new(c, "E", "_test");
e_dialog_title_set(dia, "A Test Dialog");
o = e_slider_add(dia->win->evas);
e_slider_orientation_set(o, 1);
e_slider_value_set(o, 0.5);
e_slider_value_step_count_set(o, 4);
e_slider_value_format_display_set(o, "%1.2f V");
e_slider_size_min_get(o, &mw, &mh);
evas_object_smart_callback_add(o, "changed", _e_test_cb_e_smart_pan_changed_hook, NULL);
evas_object_show(o);
e_dialog_content_set(dia, o, 240 + mw, mh);
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
elm_win_center(dia->win, 1, 1);
e_dialog_show(dia);
evas_object_focus_set(o, 1);
}
#elif 0
static void
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Object *o;
Evas_Coord mw, mh;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
9 years ago
dia = e_dialog_new(c, "E", "_test");
e_dialog_title_set(dia, "A Test Dialog");
o = e_widget_textblock_add(dia->win->evas);
#if 0
e_widget_textblock_markup_set(o,
"<title>A title</title>"
"This is some text<ps/>"
"Blah blah<ps/>"
"<hilight>highlighted text</hilight><ps/>"
"<ps/>"
"More lines of text<ps/>"
"And yet more lines of text<ps/>"
"A very very long line of text that SHOULD be getting word wrapped because it is so long.<ps/>"
"And another line<ps/>"
"Some more<ps/>"
"Smelly fish on a stick<ps/>"
"Whatever."
);
#else
e_widget_textblock_plain_set(o,
"And here is some plaintext\n"
"with some newlines & other special characters\n"
"that should get escaped like < and >.\n"
"\n"
"\tTabs should become 8 spaces too.\n"
);
#endif
evas_object_show(o);
e_dialog_content_set(dia, o, 160, 160);
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
elm_win_center(dia->win, 1, 1);
e_dialog_show(dia);
evas_object_focus_set(o, 1);
}
#elif 0
static void
_e_test_cb_button(void *data1, void *data2)
{
e_fm2_parent_go(data1);
}
static void
_e_test_cb_changed(void *data, Evas_Object *obj, void *event_info)
{
if (!e_fm2_has_parent_get(obj)) e_widget_disabled_set(data, 1);
else e_widget_disabled_set(data, 0);
}
static void
_e_test_cb_favorites_selected(void *data, Evas_Object *obj, void *event_info)
{
Eina_List *selected;
E_Fm2_Icon_Info *ici;
printf("FAV SELECTED\n");
selected = e_fm2_selected_list_get(obj);
if (!selected) return;
ici = eina_list_data_get(selected);
if ((ici->link) && (ici->mount))
e_fm2_path_set(data, ici->link, "/");
else if (ici->link)
e_fm2_path_set(data, NULL, ici->link);
// FIXME: this should happen on the scrollframe not the fm obj
// e_widget_scrollframe_child_pos_set(data, 0, 0);
eina_list_free(selected);
}
static void
_e_test_cb_favorites_files_changed(void *data, Evas_Object *obj, void *event_info)
{
Eina_List *icons, *l;
E_Fm2_Icon_Info *ici;
const char *realpath;
char *p1, *p2;
printf("FAV LIST CHANGE!\n");
icons = e_fm2_all_list_get(obj);
if (!icons) return;
realpath = e_fm2_real_path_get(data);
p1 = ecore_file_realpath(realpath);
if (!p1) goto done;
EINA_LIST_FOREACH(icons, l, ici)
{
if (ici->link)
{
p2 = ecore_file_realpath(ici->link);
if (!strcmp(p1, p2))
{
e_fm2_select_set(obj, ici->file);
E_FREE(p2);
goto done;
}
E_FREE(p2);
}
}
done:
E_FREE(p1);
eina_list_free(icons);
}
static void
_e_test_cb_selected(void *data, Evas_Object *obj, void *event_info)
{
printf("SELECTED!\n");
}
static void
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Object *ofm, *ofm2, *of, *ob, *ot;
Evas_Coord mw, mh;
E_Fm2_Config fmc;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
9 years ago
dia = e_dialog_new(c, "E", "_test");
e_dialog_title_set(dia, "A Test Dialog");
/* a table for layout */