2005-03-13 03:17:27 -08:00
|
|
|
#include "e.h"
|
|
|
|
|
2015-01-05 12:27:41 -08:00
|
|
|
static void _e_test_internal(void);
|
2005-03-13 03:17:27 -08:00
|
|
|
|
2013-04-25 03:21:22 -07:00
|
|
|
#ifdef DESKMIRROR_TEST
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
deskmirror_test(void *d EINA_UNUSED)
|
|
|
|
{
|
|
|
|
E_Zone *zone;
|
2013-08-30 08:17:34 -07:00
|
|
|
Evas_Object *o;
|
2013-04-25 03:21:22 -07:00
|
|
|
|
2015-03-13 14:47:36 -07:00
|
|
|
zone = e_zone_current_get();
|
2013-08-30 08:17:34 -07:00
|
|
|
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);
|
2013-09-10 04:17:31 -07:00
|
|
|
evas_object_move(o, zone->x, zone->y + zone->h / 2);
|
2013-08-30 08:17:34 -07:00
|
|
|
evas_object_resize(o, zone->w / 2, zone->h / 2);
|
|
|
|
evas_object_layer_set(o, E_LAYER_POPUP);
|
|
|
|
evas_object_show(o);
|
2013-04-25 03:21:22 -07:00
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API void
|
2005-03-13 03:17:27 -08:00
|
|
|
e_test(void)
|
|
|
|
{
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal();
|
2013-04-25 03:21:22 -07:00
|
|
|
|
|
|
|
#ifdef DESKMIRROR_TEST
|
2017-02-03 13:52:28 -08:00
|
|
|
ecore_timer_loop_add(2.0, deskmirror_test, NULL);
|
2013-04-25 03:21:22 -07:00
|
|
|
#endif
|
2005-03-13 03:17:27 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
#if 0
|
2005-03-31 03:40:38 -08:00
|
|
|
static int
|
|
|
|
_e_test_timer(void *data)
|
|
|
|
{
|
|
|
|
E_Menu *m;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-03-31 03:40:38 -08:00
|
|
|
m = data;
|
|
|
|
if (m)
|
|
|
|
{
|
2013-01-11 02:34:29 -08:00
|
|
|
e_menu_deactivate(m);
|
|
|
|
e_object_del(E_OBJECT(m));
|
2017-02-03 13:52:28 -08:00
|
|
|
ecore_timer_loop_add(0.05, _e_test_timer, NULL);
|
2013-01-11 02:34:29 -08:00
|
|
|
return 0;
|
2005-03-31 03:40:38 -08:00
|
|
|
}
|
2015-03-19 13:03:51 -07:00
|
|
|
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);
|
2017-02-03 13:52:28 -08:00
|
|
|
ecore_timer_loop_add(0.05, _e_test_timer, m);
|
2005-03-31 03:40:38 -08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2005-03-31 03:40:38 -08:00
|
|
|
{
|
|
|
|
_e_test_timer(NULL);
|
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2005-07-11 02:19:17 -07:00
|
|
|
#elif 0
|
|
|
|
static void
|
|
|
|
_e_test_resize(E_Win *win)
|
|
|
|
{
|
|
|
|
Evas_Object *o;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-07-11 02:19:17 -07:00
|
|
|
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
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2005-07-11 02:19:17 -07:00
|
|
|
{
|
|
|
|
E_Win *win;
|
|
|
|
Evas_Object *o;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2015-01-05 12:27:41 -08:00
|
|
|
win = e_win_new(e_comp);
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_resize_callback_set(win, _e_test_resize);
|
2005-07-11 02:19:17 -07:00
|
|
|
e_win_delete_callback_set(win, _e_test_delete);
|
|
|
|
e_win_placed_set(win, 0);
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_geometry_set(win, 10, 80, 400, 200);
|
2005-07-11 02:19:17 -07:00
|
|
|
e_win_name_class_set(win, "E", "_test_window");
|
|
|
|
e_win_title_set(win, "A test window");
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_raise(win);
|
|
|
|
evas_object_show(win);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
o = evas_object_rectangle_add(evas_object_evas_get(win));
|
2005-07-11 02:19:17 -07:00
|
|
|
evas_object_color_set(o, 255, 200, 100, 255);
|
|
|
|
evas_object_resize(o, 400, 200);
|
|
|
|
evas_object_show(o);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-07-11 02:19:17 -07:00
|
|
|
win->data = o;
|
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2005-07-22 03:28:11 -07:00
|
|
|
#elif 0
|
|
|
|
static int
|
|
|
|
_e_test_timer(void *data)
|
|
|
|
{
|
|
|
|
E_Menu *m;
|
|
|
|
static int y = 0;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-07-22 03:28:11 -07:00
|
|
|
m = data;
|
|
|
|
ecore_x_pointer_warp(m->evas_win, 20, y);
|
|
|
|
y += 10;
|
|
|
|
if (y > m->cur.h) y = 0;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2005-07-22 03:28:11 -07:00
|
|
|
{
|
|
|
|
E_Menu *m;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2015-03-19 13:03:51 -07:00
|
|
|
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);
|
2017-02-03 13:52:28 -08:00
|
|
|
ecore_timer_loop_add(0.02, _e_test_timer, m);
|
2005-07-22 03:28:11 -07:00
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2005-09-17 23:30:19 -07:00
|
|
|
#elif 0
|
2005-07-27 21:35:45 -07:00
|
|
|
static void
|
|
|
|
_e_test_dialog_del(void *obj)
|
|
|
|
{
|
|
|
|
E_Dialog *dia;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-07-27 21:35:45 -07:00
|
|
|
dia = obj;
|
|
|
|
printf("dialog delete hook!\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2005-07-27 21:35:45 -07:00
|
|
|
{
|
|
|
|
E_Dialog *dia;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
dia = e_dialog_new(c, "E", "_test");
|
2005-07-27 21:35:45 -07:00
|
|
|
e_object_del_attach_func_set(E_OBJECT(dia), _e_test_dialog_del);
|
|
|
|
e_dialog_title_set(dia, "A Test Dialog");
|
2020-05-13 12:03:23 -07:00
|
|
|
e_dialog_text_set(dia, "A Test Dialog<ps/>And another line<ps/><hilight>Highlighted Text</hilight>");
|
2009-03-04 18:39:50 -08:00
|
|
|
e_dialog_icon_set(dia, "preference-plugin", 64);
|
2005-07-27 21:35:45 -07:00
|
|
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
2009-03-06 14:18:15 -08:00
|
|
|
e_dialog_button_add(dia, "Apply", "system-restart", NULL, NULL);
|
|
|
|
e_dialog_button_add(dia, "Cancel", "application-exit", NULL, NULL);
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(dia->win, 1, 1);
|
2005-07-27 21:35:45 -07:00
|
|
|
e_dialog_show(dia);
|
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2005-10-29 04:51:19 -07:00
|
|
|
#elif 0
|
2005-10-29 08:56:51 -07:00
|
|
|
static void
|
|
|
|
_e_test_click(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|
|
|
{
|
2005-11-03 03:34:55 -08:00
|
|
|
#if 1
|
2005-10-29 08:56:51 -07:00
|
|
|
double size;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-10-29 08:56:51 -07:00
|
|
|
size = (double)(rand() % 1000) / 999;
|
|
|
|
evas_object_resize(obj, size * 1024, size * 768);
|
2005-11-03 03:34:55 -08:00
|
|
|
#else
|
|
|
|
e_scrollframe_child_region_show(data, 1024, 768, 100, 100);
|
|
|
|
#endif
|
2005-10-29 08:56:51 -07:00
|
|
|
}
|
|
|
|
|
2005-10-29 04:51:19 -07:00
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2005-10-29 04:51:19 -07:00
|
|
|
{
|
|
|
|
E_Dialog *dia;
|
2005-10-29 08:56:51 -07:00
|
|
|
Evas_Object *o, *o2, *o3;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
dia = e_dialog_new(c, "E", "_test");
|
2005-10-29 04:51:19 -07:00
|
|
|
e_dialog_title_set(dia, "A Test Dialog");
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-10-29 04:51:19 -07:00
|
|
|
o = e_icon_add(dia->win->evas);
|
2008-09-16 19:21:00 -07:00
|
|
|
e_icon_file_set(o, "/home/raster/scroll.png");
|
2005-10-29 04:51:19 -07:00
|
|
|
evas_object_resize(o, 1024, 768);
|
2005-10-29 22:20:14 -07:00
|
|
|
evas_object_focus_set(o, 1);
|
2005-10-29 04:51:19 -07:00
|
|
|
evas_object_show(o);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-10-29 04:51:19 -07:00
|
|
|
o2 = e_scrollframe_add(dia->win->evas);
|
2005-11-03 03:34:55 -08:00
|
|
|
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_test_click, o2);
|
2006-08-22 20:39:02 -07:00
|
|
|
// e_scrollframe_custom_theme_set(o2, "base/theme/widgets", "e/widgets/scrollframe");
|
2005-10-29 04:51:19 -07:00
|
|
|
evas_object_show(o2);
|
2012-06-20 23:19:43 -07:00
|
|
|
#if 0
|
2005-10-29 08:56:51 -07:00
|
|
|
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
|
2005-10-29 04:51:19 -07:00
|
|
|
e_scrollframe_child_set(o2, o);
|
2005-10-29 08:56:51 -07:00
|
|
|
#endif
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-10-29 04:51:19 -07:00
|
|
|
e_dialog_content_set(dia, o2, 500, 300);
|
|
|
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(dia->win, 1, 1);
|
2005-10-29 04:51:19 -07:00
|
|
|
e_dialog_show(dia);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-10-29 22:20:14 -07:00
|
|
|
evas_object_focus_set(o, 1);
|
2005-10-29 04:51:19 -07:00
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2005-10-31 18:41:58 -08:00
|
|
|
#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
2014-01-14 17:19:12 -08:00
|
|
|
_e_test_dia(E_Comp *c)
|
2005-10-31 18:41:58 -08:00
|
|
|
{
|
2005-11-01 01:49:03 -08:00
|
|
|
E_Config_Dialog *dia;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
dia = e_int_config_modules(c);
|
2005-10-31 18:41:58 -08:00
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
static E_Comp *tcon = NULL;
|
2005-10-31 18:41:58 -08:00
|
|
|
|
|
|
|
static int
|
|
|
|
_e_test_timer(void *data)
|
|
|
|
{
|
2005-11-01 01:49:03 -08:00
|
|
|
E_Config_Dialog *dia;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-10-31 18:41:58 -08:00
|
|
|
if (data == NULL)
|
|
|
|
{
|
2013-01-11 02:34:29 -08:00
|
|
|
dia = _e_test_dia(tcon);
|
2017-02-03 13:52:28 -08:00
|
|
|
ecore_timer_loop_add(0.2, _e_test_timer, dia);
|
2005-10-31 18:41:58 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-01-11 02:34:29 -08:00
|
|
|
dia = data;
|
|
|
|
e_object_del(E_OBJECT(dia));
|
2017-02-03 13:52:28 -08:00
|
|
|
ecore_timer_loop_add(0.2, _e_test_timer, NULL);
|
2005-10-31 18:41:58 -08:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2005-10-31 18:41:58 -08:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
tcon = c;
|
2005-10-31 18:41:58 -08:00
|
|
|
_e_test_timer(NULL);
|
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2005-11-05 05:46:02 -08:00
|
|
|
#elif 0
|
2005-11-05 04:12:17 -08:00
|
|
|
|
|
|
|
struct _tmp
|
|
|
|
{
|
|
|
|
Evas_Object *ilist, *scrollframe;
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct _tmp tmp = {NULL, NULL};
|
|
|
|
|
|
|
|
static void
|
2005-11-05 05:54:43 -08:00
|
|
|
_e_test_sel(void *data, void *data2)
|
2005-11-05 04:12:17 -08:00
|
|
|
{
|
|
|
|
Evas_Coord x, y, w, h;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-05 04:12:17 -08:00
|
|
|
e_ilist_selected_geometry_get(tmp.ilist, &x, &y, &w, &h);
|
|
|
|
e_scrollframe_child_region_show(tmp.scrollframe, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
2005-11-05 19:40:24 -08:00
|
|
|
static void
|
|
|
|
_e_test_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|
|
|
{
|
|
|
|
Evas_Coord mw, mh, vw, vh, w, h;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-05 19:40:24 -08:00
|
|
|
e_scrollframe_child_viewport_size_get(obj, &vw, &vh);
|
2009-09-01 09:39:10 -07:00
|
|
|
e_ilist_size_min_get(data, &mw, &mh);
|
2005-11-05 19:40:24 -08:00
|
|
|
evas_object_geometry_get(data, NULL, NULL, &w, &h);
|
|
|
|
if (vw >= mw)
|
|
|
|
{
|
2013-01-11 02:34:29 -08:00
|
|
|
if (w != vw) evas_object_resize(data, vw, h);
|
2005-11-05 19:40:24 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-11-05 04:12:17 -08:00
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2005-11-05 04:12:17 -08:00
|
|
|
{
|
|
|
|
E_Dialog *dia;
|
|
|
|
Evas_Coord mw, mh, vw, vh;
|
2005-11-05 21:48:51 -08:00
|
|
|
Evas_Object *o, *o2, *o3, *o4;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
dia = e_dialog_new(c, "E", "_test");
|
2005-11-05 04:12:17 -08:00
|
|
|
e_dialog_title_set(dia, "A Test Dialog");
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-05 04:12:17 -08:00
|
|
|
o = e_ilist_add(dia->win->evas);
|
2005-11-05 21:48:51 -08:00
|
|
|
e_ilist_icon_size_set(o, 80, 48);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-06 01:59:12 -08:00
|
|
|
o3 = e_livethumb_add(dia->win->evas);
|
2005-11-05 21:48:51 -08:00
|
|
|
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",
|
2013-01-11 02:34:29 -08:00
|
|
|
"e/widgets/border/default/border");
|
2005-11-05 21:48:51 -08:00
|
|
|
e_livethumb_thumb_set(o3, o4);
|
2006-03-27 06:46:26 -08:00
|
|
|
e_ilist_append(o, o3, "Item 1", 0, _e_test_sel, NULL, NULL, NULL);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-05 04:12:17 -08:00
|
|
|
o3 = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(o3, "/home/raster/C/stuff/icons/palette.png");
|
2006-03-27 06:46:26 -08:00
|
|
|
e_ilist_append(o, o3, "Item 2 (Some really long text goes here for testing)", 0, _e_test_sel, NULL, NULL, NULL);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-05 04:12:17 -08:00
|
|
|
o3 = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(o3, "/home/raster/C/stuff/icons/mozilla.png");
|
2006-03-27 06:46:26 -08:00
|
|
|
e_ilist_append(o, o3, "Item 3 (Medium length)", 0, _e_test_sel, NULL, NULL, NULL);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-05 04:12:17 -08:00
|
|
|
o3 = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(o3, "/home/raster/C/stuff/icons/trash_open.png");
|
2006-03-27 06:46:26 -08:00
|
|
|
e_ilist_append(o, o3, "Item POOP", 0, _e_test_sel, NULL, NULL, NULL);
|
2005-11-05 04:12:17 -08:00
|
|
|
|
|
|
|
o3 = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(o3, "/home/raster/C/stuff/icons/watch.png");
|
2006-03-27 06:46:26 -08:00
|
|
|
e_ilist_append(o, o3, "Item BLING BLING", 0, _e_test_sel, NULL, NULL, NULL);
|
2005-11-05 04:12:17 -08:00
|
|
|
|
|
|
|
o3 = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(o3, "/home/raster/C/stuff/icons/quake3.png");
|
2006-03-27 06:46:26 -08:00
|
|
|
e_ilist_append(o, o3, "Sukebelinth", 0, _e_test_sel, NULL, NULL, NULL);
|
2005-11-05 04:12:17 -08:00
|
|
|
|
|
|
|
o3 = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(o3, "/home/raster/C/stuff/icons/opera6.png");
|
2006-03-27 06:46:26 -08:00
|
|
|
e_ilist_append(o, o3, "A header", 1, NULL, NULL, NULL, NULL);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-03-27 06:46:26 -08:00
|
|
|
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);
|
2005-11-05 04:12:17 -08:00
|
|
|
|
|
|
|
o3 = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(o3, "/home/raster/C/stuff/icons/drawer_open.png");
|
2006-03-27 06:46:26 -08:00
|
|
|
e_ilist_append(o, o3, "Flimbert the cagey", 0, _e_test_sel, NULL, NULL, NULL);
|
2005-11-05 04:12:17 -08:00
|
|
|
|
|
|
|
o3 = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(o3, "/home/raster/C/stuff/icons/cd.png");
|
2006-03-27 06:46:26 -08:00
|
|
|
e_ilist_append(o, o3, "Norbert", 0, _e_test_sel, NULL, NULL, NULL);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2009-09-01 09:39:10 -07:00
|
|
|
e_ilist_size_min_get(o, &mw, &mh);
|
2005-11-05 04:12:17 -08:00
|
|
|
evas_object_resize(o, mw, mh);
|
|
|
|
evas_object_focus_set(o, 1);
|
|
|
|
evas_object_show(o);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-05 04:12:17 -08:00
|
|
|
o2 = e_scrollframe_add(dia->win->evas);
|
2005-11-05 19:40:24 -08:00
|
|
|
evas_object_event_callback_add(o2, EVAS_CALLBACK_RESIZE, _e_test_resize, o);
|
2005-11-05 04:12:17 -08:00
|
|
|
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);
|
2005-11-05 19:40:24 -08:00
|
|
|
e_dialog_content_set(dia, o2, 200, 150);
|
2005-11-05 04:12:17 -08:00
|
|
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(dia->win, 1, 1);
|
2005-11-05 19:40:24 -08:00
|
|
|
e_dialog_resizable_set(dia, 1);
|
2005-11-05 04:12:17 -08:00
|
|
|
e_dialog_show(dia);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-05 04:12:17 -08:00
|
|
|
tmp.ilist = o;
|
|
|
|
tmp.scrollframe = o2;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-05 04:12:17 -08:00
|
|
|
evas_object_focus_set(o, 1);
|
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2005-11-17 00:34:33 -08:00
|
|
|
#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
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2005-11-17 00:34:33 -08:00
|
|
|
{
|
|
|
|
E_Dialog *dia;
|
|
|
|
Evas_Object *o;
|
2005-11-18 07:25:38 -08:00
|
|
|
Evas_Coord mw, mh;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
dia = e_dialog_new(c, "E", "_test");
|
2005-11-17 00:34:33 -08:00
|
|
|
e_dialog_title_set(dia, "A Test Dialog");
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-17 00:34:33 -08:00
|
|
|
o = e_slider_add(dia->win->evas);
|
2005-11-18 19:22:06 -08:00
|
|
|
e_slider_orientation_set(o, 1);
|
2005-11-17 00:34:33 -08:00
|
|
|
e_slider_value_set(o, 0.5);
|
|
|
|
e_slider_value_step_count_set(o, 4);
|
2005-11-18 19:22:06 -08:00
|
|
|
e_slider_value_format_display_set(o, "%1.2f V");
|
2009-09-01 09:47:09 -07:00
|
|
|
e_slider_size_min_get(o, &mw, &mh);
|
2005-11-17 00:34:33 -08:00
|
|
|
evas_object_smart_callback_add(o, "changed", _e_test_cb_e_smart_pan_changed_hook, NULL);
|
|
|
|
evas_object_show(o);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-18 19:22:06 -08:00
|
|
|
e_dialog_content_set(dia, o, 240 + mw, mh);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-17 00:34:33 -08:00
|
|
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(dia->win, 1, 1);
|
2005-11-17 00:34:33 -08:00
|
|
|
e_dialog_show(dia);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-11-17 00:34:33 -08:00
|
|
|
evas_object_focus_set(o, 1);
|
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2006-01-25 01:28:12 -08:00
|
|
|
#elif 0
|
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2006-01-25 01:28:12 -08:00
|
|
|
{
|
|
|
|
E_Dialog *dia;
|
|
|
|
Evas_Object *o;
|
|
|
|
Evas_Coord mw, mh;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
dia = e_dialog_new(c, "E", "_test");
|
2006-01-25 01:28:12 -08:00
|
|
|
e_dialog_title_set(dia, "A Test Dialog");
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-01-25 01:28:12 -08:00
|
|
|
o = e_widget_textblock_add(dia->win->evas);
|
2006-01-25 02:20:02 -08:00
|
|
|
#if 0
|
2006-01-25 01:28:12 -08:00
|
|
|
e_widget_textblock_markup_set(o,
|
2013-01-11 02:34:29 -08:00
|
|
|
"<title>A title</title>"
|
2017-08-21 07:16:30 -07:00
|
|
|
"This is some text<ps/>"
|
|
|
|
"Blah blah<ps/>"
|
2020-05-13 12:03:23 -07:00
|
|
|
"<hilight>highlighted text</hilight><ps/>"
|
2017-08-21 07:16:30 -07:00
|
|
|
"<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/>"
|
2013-01-11 02:34:29 -08:00
|
|
|
"Whatever."
|
|
|
|
);
|
2006-01-25 02:20:02 -08:00
|
|
|
#else
|
|
|
|
e_widget_textblock_plain_set(o,
|
2013-01-11 02:34:29 -08:00
|
|
|
"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"
|
|
|
|
);
|
2012-06-20 23:19:43 -07:00
|
|
|
#endif
|
2006-01-25 01:28:12 -08:00
|
|
|
evas_object_show(o);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-01-25 01:28:12 -08:00
|
|
|
e_dialog_content_set(dia, o, 160, 160);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-01-25 01:28:12 -08:00
|
|
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(dia->win, 1, 1);
|
2006-01-25 01:28:12 -08:00
|
|
|
e_dialog_show(dia);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-01-25 01:28:12 -08:00
|
|
|
evas_object_focus_set(o, 1);
|
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2006-07-15 10:12:53 -07:00
|
|
|
#elif 0
|
2006-07-19 12:38:29 -07:00
|
|
|
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);
|
|
|
|
}
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-21 13:16:46 -07:00
|
|
|
static void
|
|
|
|
_e_test_cb_favorites_selected(void *data, Evas_Object *obj, void *event_info)
|
|
|
|
{
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *selected;
|
2006-07-22 14:48:24 -07:00
|
|
|
E_Fm2_Icon_Info *ici;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-22 14:48:24 -07:00
|
|
|
printf("FAV SELECTED\n");
|
|
|
|
selected = e_fm2_selected_list_get(obj);
|
|
|
|
if (!selected) return;
|
2009-08-21 08:08:49 -07:00
|
|
|
ici = eina_list_data_get(selected);
|
2006-07-22 14:48:24 -07:00
|
|
|
if ((ici->link) && (ici->mount))
|
2006-08-21 08:52:58 -07:00
|
|
|
e_fm2_path_set(data, ici->link, "/");
|
2006-07-22 14:48:24 -07:00
|
|
|
else if (ici->link)
|
2006-08-21 08:52:58 -07:00
|
|
|
e_fm2_path_set(data, NULL, ici->link);
|
2012-06-20 23:19:43 -07:00
|
|
|
// FIXME: this should happen on the scrollframe not the fm obj
|
2006-07-22 14:48:24 -07:00
|
|
|
// e_widget_scrollframe_child_pos_set(data, 0, 0);
|
2008-10-22 04:49:33 -07:00
|
|
|
eina_list_free(selected);
|
2006-07-22 14:48:24 -07:00
|
|
|
}
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-22 14:48:24 -07:00
|
|
|
static void
|
|
|
|
_e_test_cb_favorites_files_changed(void *data, Evas_Object *obj, void *event_info)
|
|
|
|
{
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *icons, *l;
|
2006-07-22 14:48:24 -07:00
|
|
|
E_Fm2_Icon_Info *ici;
|
|
|
|
const char *realpath;
|
|
|
|
char *p1, *p2;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-22 14:48:24 -07:00
|
|
|
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;
|
2009-08-21 08:08:49 -07:00
|
|
|
EINA_LIST_FOREACH(icons, l, ici)
|
2006-07-22 14:48:24 -07:00
|
|
|
{
|
2013-01-11 02:34:29 -08:00
|
|
|
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);
|
|
|
|
}
|
2006-07-22 14:48:24 -07:00
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
done:
|
2006-07-22 14:48:24 -07:00
|
|
|
E_FREE(p1);
|
2008-10-22 04:49:33 -07:00
|
|
|
eina_list_free(icons);
|
2006-07-21 13:16:46 -07:00
|
|
|
}
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-19 12:38:29 -07:00
|
|
|
static void
|
|
|
|
_e_test_cb_selected(void *data, Evas_Object *obj, void *event_info)
|
|
|
|
{
|
|
|
|
printf("SELECTED!\n");
|
|
|
|
}
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-13 09:35:46 -07:00
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2006-07-13 09:35:46 -07:00
|
|
|
{
|
|
|
|
E_Dialog *dia;
|
2006-07-21 13:16:46 -07:00
|
|
|
Evas_Object *ofm, *ofm2, *of, *ob, *ot;
|
|
|
|
Evas_Coord mw, mh;
|
|
|
|
E_Fm2_Config fmc;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
dia = e_dialog_new(c, "E", "_test");
|
2006-07-13 09:35:46 -07:00
|
|
|
e_dialog_title_set(dia, "A Test Dialog");
|
2006-07-19 12:38:29 -07:00
|
|
|
|
2006-07-21 13:16:46 -07:00
|
|
|
/* a table for layout */
|
|
|
|
ot = e_widget_table_add(dia->win->evas, 0);
|
|
|
|
|
|
|
|
/* actual files */
|
|
|
|
ofm = e_fm2_add(dia->win->evas);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-22 14:48:24 -07:00
|
|
|
memset(&fmc, 0, sizeof(E_Fm2_Config));
|
|
|
|
fmc.view.mode = E_FM2_VIEW_MODE_LIST;
|
|
|
|
fmc.view.open_dirs_in_place = 1;
|
|
|
|
fmc.view.selector = 1;
|
|
|
|
fmc.view.single_click = 0;
|
|
|
|
fmc.view.no_subdir_jump = 0;
|
|
|
|
fmc.icon.list.w = 24;
|
|
|
|
fmc.icon.list.h = 24;
|
|
|
|
fmc.icon.fixed.w = 1;
|
|
|
|
fmc.icon.fixed.h = 1;
|
|
|
|
fmc.icon.extension.show = 0;
|
2006-08-26 04:06:05 -07:00
|
|
|
fmc.icon.key_hint = NULL;
|
2006-07-22 14:48:24 -07:00
|
|
|
fmc.list.sort.no_case = 1;
|
|
|
|
fmc.list.sort.dirs.first = 1;
|
|
|
|
fmc.list.sort.dirs.last = 0;
|
|
|
|
fmc.selection.single = 1;
|
|
|
|
fmc.selection.windows_modifiers = 0;
|
|
|
|
e_fm2_config_set(ofm, &fmc);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-22 14:48:24 -07:00
|
|
|
e_fm2_path_set(ofm, "~/", "/");
|
2006-07-21 13:16:46 -07:00
|
|
|
ob = e_widget_button_add(dia->win->evas, "Up a directory", NULL,
|
2013-01-11 02:34:29 -08:00
|
|
|
_e_test_cb_button, ofm, NULL);
|
2006-07-21 13:16:46 -07:00
|
|
|
e_widget_table_object_append(ot, ob, 1, 0, 1, 1, 0, 0, 1, 0);
|
|
|
|
evas_object_show(ob);
|
|
|
|
evas_object_smart_callback_add(ofm, "changed", _e_test_cb_changed, ob);
|
|
|
|
evas_object_smart_callback_add(ofm, "selected", _e_test_cb_selected, NULL);
|
|
|
|
of = e_widget_scrollframe_pan_add(dia->win->evas, ofm,
|
2013-01-11 02:34:29 -08:00
|
|
|
e_fm2_pan_set, e_fm2_pan_get,
|
|
|
|
e_fm2_pan_max_get, e_fm2_pan_child_size_get);
|
2009-09-01 06:34:42 -07:00
|
|
|
e_widget_size_min_set(of, 128, 128);
|
2006-07-21 13:16:46 -07:00
|
|
|
e_widget_table_object_append(ot, of, 1, 1, 1, 1, 1, 1, 1, 1);
|
|
|
|
evas_object_show(ofm);
|
|
|
|
evas_object_show(of);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-21 13:16:46 -07:00
|
|
|
ofm2 = ofm;
|
|
|
|
|
|
|
|
/* shortcut list */
|
|
|
|
ofm = e_fm2_add(dia->win->evas);
|
2006-07-22 14:48:24 -07:00
|
|
|
|
|
|
|
memset(&fmc, 0, sizeof(E_Fm2_Config));
|
|
|
|
fmc.view.mode = E_FM2_VIEW_MODE_LIST;
|
|
|
|
fmc.view.open_dirs_in_place = 1;
|
|
|
|
fmc.view.selector = 1;
|
|
|
|
fmc.view.single_click = 1;
|
|
|
|
fmc.view.no_subdir_jump = 1;
|
|
|
|
fmc.icon.list.w = 24;
|
|
|
|
fmc.icon.list.h = 24;
|
|
|
|
fmc.icon.fixed.w = 1;
|
|
|
|
fmc.icon.fixed.h = 1;
|
|
|
|
fmc.icon.extension.show = 0;
|
2006-08-26 04:06:05 -07:00
|
|
|
fmc.icon.key_hint = NULL;
|
2006-07-22 14:48:24 -07:00
|
|
|
fmc.list.sort.no_case = 1;
|
|
|
|
fmc.list.sort.dirs.first = 0;
|
|
|
|
fmc.list.sort.dirs.last = 0;
|
|
|
|
fmc.selection.single = 1;
|
|
|
|
fmc.selection.windows_modifiers = 0;
|
|
|
|
e_fm2_config_set(ofm, &fmc);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-22 14:48:24 -07:00
|
|
|
e_fm2_path_set(ofm, "favorites", "/");
|
|
|
|
evas_object_smart_callback_add(ofm, "files_changed", _e_test_cb_favorites_files_changed, ofm2);
|
2006-07-21 13:16:46 -07:00
|
|
|
evas_object_smart_callback_add(ofm, "selected", _e_test_cb_favorites_selected, ofm2);
|
|
|
|
of = e_widget_scrollframe_pan_add(dia->win->evas, ofm,
|
2013-01-11 02:34:29 -08:00
|
|
|
e_fm2_pan_set, e_fm2_pan_get,
|
|
|
|
e_fm2_pan_max_get, e_fm2_pan_child_size_get);
|
2009-09-01 06:34:42 -07:00
|
|
|
e_widget_size_min_set(of, 128, 128);
|
2006-07-21 13:16:46 -07:00
|
|
|
e_widget_table_object_append(ot, of, 0, 1, 1, 1, 0, 1, 0, 1);
|
|
|
|
evas_object_show(ofm);
|
|
|
|
evas_object_show(of);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-21 13:16:46 -07:00
|
|
|
/* show and pack table */
|
|
|
|
evas_object_show(ot);
|
2009-09-01 06:34:42 -07:00
|
|
|
e_widget_size_min_get(ot, &mw, &mh);
|
2006-07-21 13:16:46 -07:00
|
|
|
e_dialog_content_set(dia, ot, mw, mh);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-21 13:16:46 -07:00
|
|
|
/* buttons at the bottom */
|
2006-07-13 09:35:46 -07:00
|
|
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
2006-07-15 09:29:14 -07:00
|
|
|
e_dialog_resizable_set(dia, 1);
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(dia->win, 1, 1);
|
2006-07-13 09:35:46 -07:00
|
|
|
e_dialog_show(dia);
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_resize(dia->win, 400, 300);
|
2006-07-23 03:24:30 -07:00
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2006-07-29 02:28:50 -07:00
|
|
|
#elif 0
|
2006-07-23 03:24:30 -07:00
|
|
|
static void
|
2006-07-23 04:22:13 -07:00
|
|
|
_e_test_cb_changed(void *data, Evas_Object *obj)
|
2006-07-23 03:24:30 -07:00
|
|
|
{
|
2006-07-29 02:26:18 -07:00
|
|
|
// printf("CHANGED \"%s\"\n", e_widget_fsel_selection_path_get(obj));
|
2006-07-23 04:22:13 -07:00
|
|
|
}
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-23 04:22:13 -07:00
|
|
|
static void
|
|
|
|
_e_test_cb_selected(void *data, Evas_Object *obj)
|
|
|
|
{
|
|
|
|
printf("SELECTED \"%s\"\n", e_widget_fsel_selection_path_get(obj));
|
|
|
|
e_object_del(E_OBJECT(data));
|
2006-07-23 03:24:30 -07:00
|
|
|
}
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-23 03:24:30 -07:00
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2006-07-23 03:24:30 -07:00
|
|
|
{
|
|
|
|
E_Dialog *dia;
|
|
|
|
Evas_Object *o;
|
|
|
|
Evas_Coord mw, mh;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
dia = e_dialog_new(c, "E", "_test");
|
2006-07-23 03:24:30 -07:00
|
|
|
e_dialog_title_set(dia, "A Test Dialog");
|
|
|
|
|
2012-06-20 23:19:43 -07:00
|
|
|
o = e_widget_fsel_add(dia->win->evas, "~/", "/tst", NULL, NULL,
|
2013-01-11 02:34:29 -08:00
|
|
|
_e_test_cb_selected, dia,
|
|
|
|
_e_test_cb_changed, dia, 0);
|
2006-07-23 03:24:30 -07:00
|
|
|
evas_object_show(o);
|
2009-09-01 06:34:42 -07:00
|
|
|
e_widget_size_min_get(o, &mw, &mh);
|
2006-07-23 03:24:30 -07:00
|
|
|
e_dialog_content_set(dia, o, mw, mh);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2006-07-23 03:24:30 -07:00
|
|
|
/* buttons at the bottom */
|
|
|
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
|
|
|
e_dialog_resizable_set(dia, 1);
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(dia->win, 1, 1);
|
2006-07-23 03:24:30 -07:00
|
|
|
e_dialog_show(dia);
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_resize(dia->win, 400, 300);
|
2006-07-13 09:35:46 -07:00
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2006-08-13 21:38:49 -07:00
|
|
|
#elif 0
|
2006-08-14 00:05:31 -07:00
|
|
|
|
|
|
|
static void
|
2006-08-20 14:18:30 -07:00
|
|
|
_e_test_cb_ok(E_Color_Dialog *dia, E_Color *color, void *data)
|
2006-08-14 00:05:31 -07:00
|
|
|
{
|
2006-08-20 14:18:30 -07:00
|
|
|
printf("Current color: %d, %d, %d\n", color->r, color->g, color->b);
|
2006-08-14 00:05:31 -07:00
|
|
|
}
|
|
|
|
|
2006-08-13 21:38:49 -07:00
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2006-08-13 21:38:49 -07:00
|
|
|
{
|
2006-08-20 14:18:30 -07:00
|
|
|
E_Color_Dialog *d;
|
2006-08-14 00:05:31 -07:00
|
|
|
|
2015-03-18 13:10:35 -07:00
|
|
|
d = e_color_dialog_new(NULL, EINA_FALSE);
|
2006-08-20 14:18:30 -07:00
|
|
|
e_color_dialog_show(d);
|
2006-10-13 21:50:00 -07:00
|
|
|
e_color_dialog_select_callback_set(d, _e_test_cb_ok, NULL);
|
2006-08-13 21:38:49 -07:00
|
|
|
}
|
|
|
|
|
2008-02-01 21:26:07 -08:00
|
|
|
#elif 0
|
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2008-02-01 21:26:07 -08:00
|
|
|
{
|
|
|
|
E_Dialog *dia;
|
|
|
|
Evas_Object *o, *ob, *of;
|
|
|
|
Evas_Coord mw, mh;
|
|
|
|
int i;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
dia = e_dialog_new(c, "E", "_test");
|
2008-02-01 21:26:07 -08:00
|
|
|
e_dialog_title_set(dia, "A Test Dialog");
|
|
|
|
|
|
|
|
of = e_scrollframe_add(dia->win->evas);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2015-01-01 14:29:25 -08:00
|
|
|
ob = elm_box_add(dia->win->evas);
|
|
|
|
elm_box_horizontal_set(ob, 0);
|
2008-02-01 21:26:07 -08:00
|
|
|
|
|
|
|
for (i = 0; i < 8; i++)
|
|
|
|
{
|
2013-01-11 02:34:29 -08:00
|
|
|
o = e_slidesel_add(dia->win->evas);
|
|
|
|
e_slidesel_item_distance_set(o, 64);
|
|
|
|
e_slidesel_item_add(o, "blah / item 1",
|
|
|
|
"/home/raster/pix/OLD/Download/Crystalline____a.jpg",
|
|
|
|
NULL, NULL);
|
|
|
|
e_slidesel_item_add(o, "blah / smelly fish",
|
|
|
|
"/home/raster/pix/OLD/Download/Reluctant_Sunrise.jpg",
|
|
|
|
NULL, NULL);
|
|
|
|
e_slidesel_item_add(o, "blah / pong",
|
|
|
|
"/home/raster/pix/OLD/Download/Soft_Wings.jpg",
|
|
|
|
NULL, NULL);
|
|
|
|
e_slidesel_item_add(o, "blah / on a stick",
|
|
|
|
"/home/raster/pix/OLD/Download/Stock_rose_1.jpg",
|
|
|
|
NULL, NULL);
|
|
|
|
e_slidesel_item_add(o, "blah / oath",
|
|
|
|
"/home/raster/pix/OLD/Download/The_Eyes_Of_A_Killer.jpg",
|
|
|
|
NULL, NULL);
|
|
|
|
e_slidesel_item_add(o, "blah / yiiihaaaaa",
|
|
|
|
"/home/raster/pix/OLD/Download/lady_bug.jpg",
|
|
|
|
NULL, NULL);
|
|
|
|
e_slidesel_item_add(o, "blah / blah blah blah",
|
|
|
|
"/home/raster/pix/OLD/Download/ocean_rocks_covered_by_ash.jpg",
|
|
|
|
NULL, NULL);
|
|
|
|
e_slidesel_item_add(o, "blah / bing bing bing",
|
|
|
|
"/home/raster/pix/OLD/Download/orange_chair_heaven_falling.jpg",
|
|
|
|
NULL, NULL);
|
|
|
|
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_pack_end(ob, o);
|
|
|
|
elm_box_pack_options_set(o, 1, 1, 1, 0, 0.5, 0.5, 300, 100, 300, 100);
|
2013-01-11 02:34:29 -08:00
|
|
|
evas_object_show(o);
|
2008-02-01 21:26:07 -08:00
|
|
|
}
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2008-02-01 21:26:07 -08:00
|
|
|
/* fixme... more */
|
2015-01-01 14:29:25 -08:00
|
|
|
evas_object_size_hint_min_get(ob, &mw, &mh);
|
2008-02-01 21:26:07 -08:00
|
|
|
evas_object_resize(ob, mw, mh);
|
|
|
|
|
|
|
|
e_scrollframe_child_set(of, ob);
|
|
|
|
evas_object_show(ob);
|
2009-09-01 06:34:42 -07:00
|
|
|
// e_widget_size_min_get(o, &mw, &mh);
|
2008-02-01 21:26:07 -08:00
|
|
|
mw = 300; mh = 300;
|
|
|
|
e_dialog_content_set(dia, of, mw, mh);
|
|
|
|
evas_object_show(of);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2008-02-01 21:26:07 -08:00
|
|
|
/* buttons at the bottom */
|
|
|
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
|
|
|
e_dialog_resizable_set(dia, 1);
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(dia->win, 1, 1);
|
2008-02-01 21:26:07 -08:00
|
|
|
e_dialog_show(dia);
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_resize(dia->win, 400, 400);
|
2008-02-01 21:26:07 -08:00
|
|
|
}
|
2009-08-27 02:26:13 -07:00
|
|
|
|
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2009-08-27 02:26:13 -07:00
|
|
|
{
|
2017-02-03 13:52:28 -08:00
|
|
|
ecore_timer_loop_add(1.0, _e_test_timer, c);
|
2009-08-27 02:26:13 -07:00
|
|
|
}
|
|
|
|
|
2008-11-20 19:59:30 -08:00
|
|
|
#elif 0
|
2009-08-27 02:26:13 -07:00
|
|
|
|
2008-11-20 19:59:30 -08:00
|
|
|
static int
|
|
|
|
_e_test_timer(void *data)
|
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Comp *c;
|
2008-11-20 19:59:30 -08:00
|
|
|
E_Dialog *dia;
|
|
|
|
Evas_Object *o, *ic;
|
|
|
|
Evas_Coord mw, mh;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
c = data;
|
|
|
|
dia = e_dialog_new(c, "E", "_test");
|
2008-11-20 19:59:30 -08:00
|
|
|
e_dialog_title_set(dia, "A Test Dialog");
|
|
|
|
|
|
|
|
o = e_widget_toolbar_add(dia->win->evas, 48, 48);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_hdd.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, "HDD", NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_cd.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, "CD", NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_desktop.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, "Desktop", NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_home.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, "Home", NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_root.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, "Root", NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_tmp.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, "Temp", NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_globe.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, "World", NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_mixer.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, "Mixer", NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_performance.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, "Perform", NULL, NULL, NULL);
|
|
|
|
|
|
|
|
e_widget_toolbar_scrollable_set(o, 1);
|
|
|
|
e_widget_toolbar_item_select(o, 1);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2008-11-20 19:59:30 -08:00
|
|
|
/* fixme... more */
|
2009-09-01 06:34:42 -07:00
|
|
|
e_widget_size_min_get(o, &mw, &mh);
|
2008-11-20 19:59:30 -08:00
|
|
|
e_dialog_content_set(dia, o, mw, mh);
|
|
|
|
evas_object_show(o);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2008-11-20 19:59:30 -08:00
|
|
|
/* buttons at the bottom */
|
|
|
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
|
|
|
e_dialog_resizable_set(dia, 1);
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(dia->win, 1, 1);
|
2008-11-20 19:59:30 -08:00
|
|
|
e_dialog_show(dia);
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_resize(dia->win, 400, 200);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2008-11-20 19:59:30 -08:00
|
|
|
return 0;
|
|
|
|
}
|
2009-08-27 02:26:13 -07:00
|
|
|
|
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2009-08-27 02:26:13 -07:00
|
|
|
{
|
2017-02-03 13:52:28 -08:00
|
|
|
ecore_timer_loop_add(1.0, _e_test_timer, c);
|
2009-08-27 02:26:13 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#elif 0
|
|
|
|
|
|
|
|
static int
|
|
|
|
_e_test_timer(void *data)
|
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Comp *c;
|
2009-08-27 02:26:13 -07:00
|
|
|
E_Dialog *dia;
|
|
|
|
Evas_Object *o, *ic;
|
|
|
|
Evas_Coord mw, mh;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
c = data;
|
|
|
|
dia = e_dialog_new(c, "E", "_test");
|
2009-08-27 02:26:13 -07:00
|
|
|
e_dialog_title_set(dia, "A Test Dialog");
|
|
|
|
|
|
|
|
o = e_widget_toolbar_add(dia->win->evas, 48, 48);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_hdd.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_cd.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_desktop.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_home.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_root.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_tmp.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_globe.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_mixer.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
|
|
|
|
ic = e_icon_add(dia->win->evas);
|
|
|
|
e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_performance.png");
|
|
|
|
e_widget_toolbar_item_append(o, ic, "x", NULL, NULL, NULL);
|
|
|
|
|
|
|
|
e_widget_toolbar_scrollable_set(o, 1);
|
|
|
|
e_widget_toolbar_item_select(o, 1);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2009-08-27 02:26:13 -07:00
|
|
|
/* fixme... more */
|
2009-09-01 06:34:42 -07:00
|
|
|
e_widget_size_min_get(o, &mw, &mh);
|
2009-08-27 02:26:13 -07:00
|
|
|
e_dialog_content_set(dia, o, mw, mh);
|
|
|
|
evas_object_show(o);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2009-08-27 02:26:13 -07:00
|
|
|
/* buttons at the bottom */
|
|
|
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
|
|
|
e_dialog_resizable_set(dia, 1);
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(dia->win, 1, 1);
|
2009-08-27 02:26:13 -07:00
|
|
|
e_dialog_show(dia);
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_resize(dia->win, 400, 200);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2009-08-27 02:26:13 -07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-11-20 19:59:30 -08:00
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2010-08-02 23:10:33 -07:00
|
|
|
{
|
2017-02-03 13:52:28 -08:00
|
|
|
ecore_timer_loop_add(1.0, _e_test_timer, c);
|
2010-08-02 23:10:33 -07:00
|
|
|
}
|
|
|
|
|
2019-07-31 17:25:44 -07:00
|
|
|
#elif 0
|
|
|
|
static Eina_Bool
|
|
|
|
_e_test_timer(void *data EINA_UNUSED)
|
|
|
|
{
|
|
|
|
static int showhide = 0;
|
|
|
|
static E_Menu *m = NULL;
|
|
|
|
|
|
|
|
if (showhide & 0x1)
|
|
|
|
{
|
|
|
|
printf("del menu\n");
|
|
|
|
e_menu_deactivate(m);
|
|
|
|
e_object_del(E_OBJECT(m));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
E_Zone *zone = e_zone_current_get();
|
|
|
|
printf("add menu\n");
|
|
|
|
m = e_int_menus_main_new();
|
|
|
|
m->zone = zone;
|
|
|
|
ecore_evas_pointer_xy_get(e_comp->ee, &x, &y);
|
|
|
|
e_menu_activate_mouse(m, zone, x, y, 1, 1,
|
|
|
|
E_MENU_POP_DIRECTION_DOWN, 0);
|
|
|
|
}
|
|
|
|
showhide++;
|
|
|
|
printf("%i\n", showhide);
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_e_test_internal(void)
|
|
|
|
{
|
|
|
|
ecore_timer_loop_add(2.0, _e_test_timer, NULL);
|
|
|
|
}
|
|
|
|
|
2005-03-13 03:17:27 -08:00
|
|
|
#else
|
|
|
|
static void
|
2015-01-05 12:27:41 -08:00
|
|
|
_e_test_internal(void)
|
2012-06-20 23:19:43 -07:00
|
|
|
{
|
2005-03-13 03:17:27 -08:00
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|
2005-03-13 03:17:27 -08:00
|
|
|
#endif
|