Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2019-07-25 11:10:20 +09:00
commit c5d756d780
69 changed files with 2940 additions and 4984 deletions

View File

@ -207,4 +207,5 @@ collections {
#include "edc/efl/tab_pager.edc"
#include "edc/efl/tab_bar.edc"
#include "edc/efl/tab_page.edc"
#include "edc/efl/item_container.edc"
}

View File

@ -0,0 +1,3 @@
group { "efl/item_container";
inherit: "efl/scroller";
}

View File

@ -3,6 +3,12 @@ apiRules:
uidRegex: ^.*NativeMethods$
- exclude:
uidRegex: ^.*NativeStruct$
- exclude:
uidRegex: ^.*ConstructingHandle.*$
- exclude:
uidRegex: ^.*WrappingHandle.*$
- exclude:
uidRegex: ^.*#ctor\(IntPtr.*$
- exclude:
uidRegex: ^.*Concrete$
- include:

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,100 @@
#include <Efl_Ui.h>
static Eo *first, *last, *middle;
static int timer = 15;
static int frames = 0;
static double start_time;
static void
_timer_tick(void *data, const Efl_Event *ev)
{
if (timer % 2 == 0)
{
efl_ui_item_container_item_scroll(data, last, EINA_TRUE);
}
else
{
efl_ui_item_container_item_scroll(data, first, EINA_TRUE);
}
timer--;
if (timer == 0)
{
double runtime = ecore_time_get() - start_time;
efl_loop_quit(efl_app_main_get(), EINA_VALUE_EMPTY);
efl_del(ev->object);
printf("We did %d frames in %f s seconds\n", frames, runtime);
printf("FPS: %f\n", ((double)frames / runtime));
}
}
static void
_caputure(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
frames ++;
}
static void
_started_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
efl_loop_timer_interval_set(efl_added, 1.0),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _timer_tick, data)
);
start_time = ecore_time_get();
efl_event_callback_add(evas_object_evas_get(data), EFL_CANVAS_SCENE_EVENT_RENDER_POST, _caputure, data);
efl_del(ev->object);
}
static void
_first_frame_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
efl_ui_item_container_item_scroll(data, middle, EINA_FALSE);
//give time to stabelize
efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
efl_loop_timer_interval_set(efl_added, 15.0),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _started_cb, data)
);
efl_event_callback_del(ev->object, EFL_CANVAS_SCENE_EVENT_RENDER_POST, _first_frame_cb, data);
}
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
Eo *win, *item_container, *list;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Efl.Ui.Item_Container benchmark"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE)
);
list = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS);
item_container = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win,
efl_ui_item_container_position_manager_set(efl_added, list));
efl_content_set(win, item_container);
printf("Building 5000 objects\n");
for (int i = 0; i < 5000; ++i)
{
Eo *il = efl_add(EFL_UI_LIST_DEFAULT_ITEM_CLASS, item_container);
double r = 10+((double)190/(double)10)*(i%10);
if (i == 0)
first = il;
else if (i == 2500)
middle = il;
else if (i == 4999)
last = il;
efl_gfx_color_set(il, r, 10, 10, 255);
efl_gfx_hint_size_min_set(il, EINA_SIZE2D(40, 40+(i%2)*40));
efl_pack_end(item_container, il);
}
printf("Done!\n");
efl_gfx_entity_size_set(win, EINA_SIZE2D(200, 200));
efl_event_callback_add(evas_object_evas_get(win), EFL_CANVAS_SCENE_EVENT_RENDER_POST, _first_frame_cb, item_container);
}
EFL_MAIN()

View File

@ -6,3 +6,10 @@ focus_widget_tree_bench = executable('focus_widget_tree_bench',
benchmark('focus_widget_tree', focus_widget_tree_bench,
args: ['5'],
)
item_container = executable('item_container',
'item_container.c',
dependencies: [elementary, ecore_input_evas, eio],
)
benchmark('item_container', item_container)

View File

@ -156,6 +156,7 @@ elementary_test_src = [
'test_gesture_framework.c',
'test_ui_tab_pager.c',
'test_ui_relative_layout.c',
'test_ui_item_container.c',
'test.h'
]

View File

@ -394,7 +394,8 @@ void test_ui_spotlight_scroll(void *data, Evas_Object *obj, void *event_info);
void test_ui_relative_layout(void *data, Evas_Object *obj, void *event_info);
void test_efl_ui_radio(void *data, Evas_Object *obj, void *event_info);
void test_efl_ui_item_container_list(void *data, Evas_Object *obj, void *event_info );
void test_efl_ui_item_container_grid(void *data, Evas_Object *obj, void *event_info);
static void _list_udpate(void);
static Evas_Object *win, *tbx, *entry; // TODO: refactoring
@ -868,6 +869,8 @@ add_tests:
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table (Linear API)", test_ui_table_linear);
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table_Static", test_ui_table_static);
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Relative_Layout", test_ui_relative_layout);
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Item_Container List", test_efl_ui_item_container_list);
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Item_Container Grid", test_efl_ui_item_container_grid);
//------------------------------//
ADD_TEST_EO(NULL, "Events", "Event Refeed", test_events);

View File

@ -0,0 +1,272 @@
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#include <Efl_Ui.h>
static void
_selection_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
if (efl_ui_check_selected_get(ev->object))
efl_ui_layout_orientation_set(data, EFL_UI_LAYOUT_ORIENTATION_VERTICAL);
else
efl_ui_layout_orientation_set(data, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL);
}
static void
_scroll_to_animated_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
Efl_Ui_Widget *element_1154 = efl_pack_content_get(data, 1154);
EINA_SAFETY_ON_NULL_RETURN(element_1154);
efl_ui_item_container_item_scroll(data, element_1154, EINA_TRUE);
}
static void
_scroll_to_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
Efl_Ui_Widget *element_10 = efl_pack_content_get(data, 10);
EINA_SAFETY_ON_NULL_RETURN(element_10);
efl_ui_item_container_item_scroll(data, element_10, EINA_FALSE);
}
static void
_change_min_size_cb(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
static Eina_Bool b = EINA_FALSE;
Efl_Ui_Widget *element_0 = efl_pack_content_get(data, 0);
EINA_SAFETY_ON_NULL_RETURN(element_0);
if (!b)
{
efl_gfx_hint_size_min_set(element_0, EINA_SIZE2D(40, 200));
}
else
{
efl_gfx_hint_size_min_set(element_0, EINA_SIZE2D(40, 40));
}
b = !b;
}
typedef struct {
Efl_Ui_Check *v, *h;
Efl_Ui_Item_Container *c;
} Match_Content_Ctx;
static void
_selection_changed_match_content_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
Match_Content_Ctx *c = data;
Eina_Bool v,h;
v = efl_ui_check_selected_get(c->v);
h = efl_ui_check_selected_get(c->h);
efl_ui_scrollable_match_content_set(c->c, v, h);
}
static void
_widget_del_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
free(data);
}
static void
_add_item(Efl_Ui_Item_Container *c)
{
Efl_Class *itc = efl_key_data_get(c, "__item_class");
char buf[PATH_MAX];
int r = 0, g = 0, b = 0;
int i = efl_content_count(c);
Eo *rect;
Eo *il;
il = efl_add(itc, c);
snprintf(buf, sizeof(buf), "%d - Test %d", i, i%13);
efl_text_set(il, buf);
rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas_object_evas_get(c));
switch (i % 5)
{
case 0:
r = 255;
break;
case 1:
g = 255;
break;
case 2:
b = 255;
break;
case 3:
r = g = b = 255;
break;
case 4:
r = g = b = 0;
break;
}
efl_gfx_color_set(rect, r, g, b, 255);
efl_content_set(il, rect);
if (itc == EFL_UI_GRID_DEFAULT_ITEM_CLASS)
efl_gfx_hint_size_min_set(il, EINA_SIZE2D(100, 180));
else
efl_gfx_hint_size_min_set(il, EINA_SIZE2D(40, 40+(i%2)*40));
efl_pack_end(c, il);
}
static void
_remove_all_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
efl_pack_clear(data);
}
static void
_add_one_item(void *data, const Efl_Event *ev EINA_UNUSED)
{
_add_item(data);
}
static void
_add_thousend_items(void *data, const Efl_Event *ev EINA_UNUSED)
{
for (int i = 0; i < 1000; ++i)
{
_add_item(data);
}
}
static void
_select_value_cb(void *data, const Efl_Event *ev)
{
Efl_Ui_Item_Container *c = data;
efl_ui_select_mode_set(c, efl_ui_radio_group_selected_value_get(ev->object));
}
void create_item_container_ui(Efl_Ui_Position_Manager_Entity *manager, const Efl_Class *item, const char *name)
{
Efl_Ui_Win *win, *o, *tbl, *item_container, *bx;
Match_Content_Ctx *ctx = calloc(1, sizeof(*ctx));
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, name),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
tbl = efl_add(EFL_UI_TABLE_CLASS, win);
efl_content_set(win, tbl);
item_container = o = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win,
efl_ui_item_container_position_manager_set(efl_added, manager));
efl_key_data_set(o, "__item_class", item);
efl_event_callback_add(o, EFL_EVENT_DEL, _widget_del_cb, ctx);
for (int i = 0; i < 2000; ++i)
{
_add_item(o);
}
efl_pack_table(tbl, o, 1, 0, 1, 11);
ctx->c = o;
o = efl_add(EFL_UI_BUTTON_CLASS, tbl,
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
efl_gfx_hint_align_set(efl_added, 0, 0.5));
efl_text_set(o, "Scroll to 1154 ANIMATED");
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, _scroll_to_animated_cb, item_container);
efl_pack_table(tbl, o, 0, 1, 1, 1);
o = efl_add(EFL_UI_BUTTON_CLASS, tbl,
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
efl_gfx_hint_align_set(efl_added, 0, 0.5));
efl_text_set(o, "Scroll to 10");
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, _scroll_to_cb, item_container);
efl_pack_table(tbl, o, 0, 2, 1, 1);
o = efl_add(EFL_UI_BUTTON_CLASS, tbl,
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
efl_gfx_hint_align_set(efl_added, 0, 0.5));
efl_text_set(o, "Change min size of 0");
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, _change_min_size_cb, item_container);
efl_pack_table(tbl, o, 0, 3, 1, 1);
o = efl_add(EFL_UI_CHECK_CLASS, tbl,
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
efl_gfx_hint_align_set(efl_added, 0, 0.5));
efl_text_set(o, "Vertical");
efl_event_callback_add(o, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _selection_changed_cb, item_container);
efl_ui_check_selected_set(o, EINA_TRUE);
efl_pack_table(tbl, o, 0, 4, 1, 1);
o = efl_add(EFL_UI_CHECK_CLASS, tbl,
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
efl_gfx_hint_align_set(efl_added, 0, 0.5));
efl_text_set(o, "Match Vertical");
efl_event_callback_add(o, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _selection_changed_match_content_cb, ctx);
efl_pack_table(tbl, o, 0, 5, 1, 1);
ctx->v = o;
o = efl_add(EFL_UI_CHECK_CLASS, tbl,
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
efl_gfx_hint_align_set(efl_added, 0, 0.5));
efl_text_set(o, "Match Horizontal");
efl_event_callback_add(o, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _selection_changed_match_content_cb, ctx);
efl_pack_table(tbl, o, 0, 6, 1, 1);
efl_gfx_entity_size_set(win, EINA_SIZE2D(260, 200));
ctx->h = o;
o = efl_add(EFL_UI_BUTTON_CLASS, tbl,
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
efl_gfx_hint_align_set(efl_added, 0, 0.5));
efl_text_set(o, "Remove all items");
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, _remove_all_cb, item_container);
efl_pack_table(tbl, o, 0, 7, 1, 1);
o = efl_add(EFL_UI_BUTTON_CLASS, tbl,
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
efl_gfx_hint_align_set(efl_added, 0, 0.5));
efl_text_set(o, "Add 1 item");
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, _add_one_item, item_container);
efl_pack_table(tbl, o, 0, 8, 1, 1);
o = efl_add(EFL_UI_BUTTON_CLASS, tbl,
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
efl_gfx_hint_align_set(efl_added, 0, 0.5));
efl_text_set(o, "Add 1000 item");
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, _add_thousend_items, item_container);
efl_pack_table(tbl, o, 0, 9, 1, 1);
bx = efl_add(EFL_UI_RADIO_BOX_CLASS, tbl,
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
efl_gfx_hint_align_set(efl_added, 0, 0.5));
efl_event_callback_add(bx, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, _select_value_cb, item_container);
efl_pack_table(tbl, bx, 0, 10, 1, 1);
o = efl_add(EFL_UI_RADIO_CLASS, bx,
efl_ui_radio_state_value_set(efl_added, EFL_UI_SELECT_MODE_SINGLE));
efl_text_set(o, "Singleselect");
efl_pack_end(bx, o);
o = efl_add(EFL_UI_RADIO_CLASS, bx,
efl_ui_radio_state_value_set(efl_added, EFL_UI_SELECT_MODE_SINGLE_ALWAYS));
efl_text_set(o, "Singleselect Always");
efl_pack_end(bx, o);
o = efl_add(EFL_UI_RADIO_CLASS, bx,
efl_ui_radio_state_value_set(efl_added, EFL_UI_SELECT_MODE_MULTI));
efl_text_set(o, "Multiselect");
efl_pack_end(bx, o);
}
void test_efl_ui_item_container_grid(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
create_item_container_ui(efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS), EFL_UI_GRID_DEFAULT_ITEM_CLASS, "Efl.Ui.Item_Container Grid");
}
void test_efl_ui_item_container_list(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
create_item_container_ui(efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS), EFL_UI_LIST_DEFAULT_ITEM_CLASS, "Efl.Ui.Item_Container List");
}

View File

@ -1,499 +0,0 @@
ECORE_COMMON_CPPFLAGS = \
-DPACKAGE_EXAMPLES_DIR=\".\"
if HAVE_ECORE_BUFFER
ECORE_COMMON_CPPFLAGS += -I$(top_srcdir)/src/lib/ecore_buffer
LDADD += $(top_builddir)/src/lib/ecore_buffer/libecore_buffer.la
endif
EXTRA_PROGRAMS += \
ecore/ecore_animator_example \
ecore/ecore_client_bench \
ecore/ecore_compose_get_example \
ecore/ecore_con_client_example \
ecore/ecore_con_client_simple_example \
ecore/ecore_con_lookup_example \
ecore/ecore_con_server_example \
ecore/ecore_con_server_http_example \
ecore/ecore_con_server_simple_example \
ecore/ecore_con_url_cookies_example \
ecore/ecore_con_url_download_example \
ecore/ecore_con_url_headers_example \
ecore/ecore_con_url_ftp_example \
ecore/ecore_evas_basics_example \
ecore/ecore_evas_buffer_example_01 \
ecore/ecore_evas_buffer_example_02 \
ecore/ecore_evas_callbacks \
ecore/ecore_evas_cursor_example \
ecore/ecore_evas_extn_socket_example \
ecore/ecore_evas_extn_plug_example \
ecore/ecore_evas_ews_example \
ecore/ecore_evas_object_example \
ecore/ecore_evas_wayland_multiseat_example \
ecore/ecore_evas_window_sizes_example \
ecore/ecore_evas_vnc_example \
ecore/ecore_event_example_01 \
ecore/ecore_event_example_02 \
ecore/ecore_exe_example \
ecore/ecore_exe_example_child \
ecore/ecore_fd_handler_example \
ecore/ecore_file_download_example \
ecore/ecore_idler_example \
ecore/ecore_imf_example \
ecore/ecore_input_joystick_example \
ecore/ecore_job_example \
ecore/ecore_poller_example \
ecore/ecore_promise2_example \
ecore/ecore_server_bench \
ecore/ecore_thread_example \
ecore/ecore_time_functions_example \
ecore/ecore_timer_example \
ecore/ecore_getopt_example \
ecore/ecore_con_eet_client_example \
ecore/ecore_con_eet_server_example \
ecore/efl_io_copier_example \
ecore/efl_io_copier_simple_example \
ecore/efl_io_queue_example \
ecore/efl_io_buffered_stream_example \
ecore/efl_net_server_example \
ecore/efl_net_server_simple_example \
ecore/efl_net_dialer_http_example \
ecore/efl_net_dialer_websocket_example \
ecore/efl_net_dialer_websocket_autobahntestee \
ecore/efl_net_dialer_udp_example \
ecore/efl_net_dialer_simple_example \
ecore/efl_net_socket_ssl_dialer_example \
ecore/efl_net_socket_ssl_server_example \
ecore/efl_net_session_example \
ecore/efl_net_control_example \
ecore/efl_net_ip_address_example \
ecore/ecore_ipc_server_example \
ecore/ecore_ipc_client_example
if HAVE_ECORE_AUDIO
#EXTRA_PROGRAMS += \
#ecore_audio_playback \
#ecore_audio_to_ogg \
#ecore_audio_custom
#
#$(top_builddir)/src/lib/ecore_audio/libecore_audio.la \
#$(LDADD)
#
#ecore_audio_custom_SOURCES = ecore/ecore_audio_custom.c
#ecore_audio_custom_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
#
#ecore_audio_playback_SOURCES = ecore/ecore_audio_playback.c
#ecore_audio_playback_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
#
#ecore_audio_to_ogg_SOURCES = ecore/ecore_audio_to_ogg.c
#ecore_audio_to_ogg_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
endif
ecore_ecore_animator_example_SOURCES = ecore/ecore_animator_example.c
ecore_ecore_animator_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
if HAVE_ECORE_BUFFER
EXTRA_PROGRAMS += ecore/ecore_buffer_example \
ecore/ecore_buffer_consumer_example \
ecore/ecore_buffer_provider_example
ecore_ecore_buffer_example_SOURCES = ecore/ecore_buffer_example.c
ecore_ecore_buffer_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_buffer_consumer_example_SOURCES = ecore/ecore_buffer_consumer_example.c
ecore_ecore_buffer_consumer_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_buffer_provider_example_SOURCES = ecore/ecore_buffer_provider_example.c
ecore_ecore_buffer_provider_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
endif
ecore_ecore_client_bench_SOURCES = ecore/ecore_client_bench.c
ecore_ecore_client_bench_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_compose_get_example_SOURCES = ecore/ecore_compose_get_example.c
ecore_ecore_compose_get_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_client_example_SOURCES = ecore/ecore_con_client_example.c
ecore_ecore_con_client_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_client_simple_example_SOURCES = ecore/ecore_con_client_simple_example.c
ecore_ecore_con_client_simple_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_lookup_example_SOURCES = ecore/ecore_con_lookup_example.c
ecore_ecore_con_lookup_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_server_example_SOURCES = ecore/ecore_con_server_example.c
ecore_ecore_con_server_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_server_http_example_SOURCES = ecore/ecore_con_server_http_example.c
ecore_ecore_con_server_http_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_server_simple_example_SOURCES = ecore/ecore_con_server_simple_example.c
ecore_ecore_con_server_simple_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_url_cookies_example_SOURCES = ecore/ecore_con_url_cookies_example.c
ecore_ecore_con_url_cookies_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_url_download_example_SOURCES = ecore/ecore_con_url_download_example.c
ecore_ecore_con_url_download_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_url_headers_example_SOURCES = ecore/ecore_con_url_headers_example.c
ecore_ecore_con_url_headers_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_url_ftp_example_SOURCES = ecore/ecore_con_url_ftp_example.c
ecore_ecore_con_url_ftp_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_basics_example_SOURCES = ecore/ecore_evas_basics_example.c
ecore_ecore_evas_basics_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_buffer_example_01_SOURCES = ecore/ecore_evas_buffer_example_01.c
ecore_ecore_evas_buffer_example_01_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_buffer_example_02_SOURCES = ecore/ecore_evas_buffer_example_02.c
ecore_ecore_evas_buffer_example_02_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_callbacks_SOURCES = ecore/ecore_evas_callbacks.c
ecore_ecore_evas_callbacks_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_cursor_example_SOURCES = ecore/ecore_evas_cursor_example.c
ecore_ecore_evas_cursor_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_extn_socket_example_SOURCES = ecore/ecore_evas_extn_socket_example.c
ecore_ecore_evas_extn_socket_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_extn_plug_example_SOURCES = ecore/ecore_evas_extn_plug_example.c
ecore_ecore_evas_extn_plug_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_ews_example_SOURCES = ecore/ecore_evas_ews_example.c
ecore_ecore_evas_ews_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_object_example_SOURCES = ecore/ecore_evas_object_example.c
ecore_ecore_evas_object_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_wayland_multiseat_example_SOURCES = ecore/ecore_evas_wayland_multiseat_example.c
ecore_ecore_evas_wayland_multiseat_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_window_sizes_example_SOURCES = ecore/ecore_evas_window_sizes_example.c
ecore_ecore_evas_window_sizes_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_evas_vnc_example_SOURCES = ecore/ecore_evas_vnc_example.c
ecore_ecore_evas_vnc_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_event_example_01_SOURCES = ecore/ecore_event_example_01.c
ecore_ecore_event_example_01_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_event_example_02_SOURCES = ecore/ecore_event_example_02.c
ecore_ecore_event_example_02_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_exe_example_SOURCES = ecore/ecore_exe_example.c
ecore_ecore_exe_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_exe_example_child_SOURCES = ecore/ecore_exe_example_child.c
ecore_ecore_exe_example_child_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_fd_handler_example_SOURCES = ecore/ecore_fd_handler_example.c
ecore_ecore_fd_handler_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
if HAVE_CRYPTO_GNUTLS
EXTRA_PROGRAMS += ecore/ecore_fd_handler_gnutls_example
ecore_ecore_fd_handler_gnutls_example_SOURCES = ecore/ecore_fd_handler_gnutls_example.c
ecore_ecore_fd_handler_gnutls_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
endif
ecore_ecore_file_download_example_SOURCES = ecore/ecore_file_download_example.c
ecore_ecore_file_download_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_idler_example_SOURCES = ecore/ecore_idler_example.c
ecore_ecore_idler_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_imf_example_SOURCES = ecore/ecore_imf_example.c
ecore_ecore_imf_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_job_example_SOURCES = ecore/ecore_job_example.c
ecore_ecore_job_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
if HAVE_GSTREAMER
EXTRA_PROGRAMS += ecore/ecore_pipe_gstreamer_example
ecore_ecore_pipe_gstreamer_example_SOURCES = ecore/ecore_pipe_gstreamer_example.c
ecore_ecore_pipe_gstreamer_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS) @GSTREAMER_CFLAGS@
ecore_ecore_pipe_gstreamer_example_LDADD = $(LDADD) @GSTREAMER_LIBS@
endif
if ! HAVE_WINDOWS
EXTRA_PROGRAMS += ecore/ecore_pipe_simple_example
ecore_ecore_pipe_simple_example_SOURCES = ecore/ecore_pipe_simple_example.c
ecore_ecore_pipe_simple_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
endif
ecore_ecore_poller_example_SOURCES = ecore/ecore_poller_example.c
ecore_ecore_poller_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_promise2_example_SOURCES = ecore/ecore_promise2_example.c
ecore_ecore_promise2_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_server_bench_SOURCES = ecore/ecore_server_bench.c
ecore_ecore_server_bench_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_thread_example_SOURCES = ecore/ecore_thread_example.c
ecore_ecore_thread_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_time_functions_example_SOURCES = ecore/ecore_time_functions_example.c
ecore_ecore_time_functions_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_timer_example_SOURCES = ecore/ecore_timer_example.c
ecore_ecore_timer_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_getopt_example_SOURCES = ecore/ecore_getopt_example.c
ecore_ecore_getopt_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_eet_client_example_SOURCES = ecore/ecore_con_eet_client_example.c \
ecore/ecore_con_eet_descriptor_example.c \
ecore/ecore_con_eet_descriptor_example.h
ecore_ecore_con_eet_client_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_con_eet_server_example_SOURCES = ecore/ecore_con_eet_server_example.c \
ecore/ecore_con_eet_descriptor_example.c \
ecore/ecore_con_eet_descriptor_example.h
ecore_ecore_con_eet_server_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_io_copier_example_SOURCES = ecore/efl_io_copier_example.c
ecore_efl_io_copier_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_io_copier_simple_example_SOURCES = ecore/efl_io_copier_simple_example.c
ecore_efl_io_copier_simple_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_io_queue_example_SOURCES = ecore/efl_io_queue_example.c
ecore_efl_io_queue_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_io_buffered_stream_example_SOURCES = ecore/efl_io_buffered_stream_example.c
ecore_efl_io_buffered_stream_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_server_example_SOURCES = ecore/efl_net_server_example.c
ecore_efl_net_server_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_server_simple_example_SOURCES = ecore/efl_net_server_simple_example.c
ecore_efl_net_server_simple_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_dialer_http_example_SOURCES = ecore/efl_net_dialer_http_example.c
ecore_efl_net_dialer_http_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_dialer_websocket_example_SOURCES = ecore/efl_net_dialer_websocket_example.c
ecore_efl_net_dialer_websocket_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_dialer_websocket_autobahntestee_SOURCES = ecore/efl_net_dialer_websocket_autobahntestee.c
ecore_efl_net_dialer_websocket_autobahntestee_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_dialer_udp_example_SOURCES = ecore/efl_net_dialer_udp_example.c
ecore_efl_net_dialer_udp_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_dialer_simple_example_SOURCES = ecore/efl_net_dialer_simple_example.c
ecore_efl_net_dialer_simple_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
if HAVE_WINDOWS
EXTRA_PROGRAMS += ecore/efl_net_dialer_windows_example
ecore_efl_net_dialer_windows_example_SOURCES = ecore/efl_net_dialer_windows_example.c
ecore_efl_net_dialer_windows_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
else
EXTRA_PROGRAMS += ecore/efl_net_dialer_unix_example
ecore_efl_net_dialer_unix_example_SOURCES = ecore/efl_net_dialer_unix_example.c
ecore_efl_net_dialer_unix_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
endif
ecore_efl_net_socket_ssl_dialer_example_SOURCES = ecore/efl_net_socket_ssl_dialer_example.c
ecore_efl_net_socket_ssl_dialer_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_socket_ssl_server_example_SOURCES = ecore/efl_net_socket_ssl_server_example.c
ecore_efl_net_socket_ssl_server_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_session_example_SOURCES = ecore/efl_net_session_example.c
ecore_efl_net_session_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_control_example_SOURCES = ecore/efl_net_control_example.c
ecore_efl_net_control_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_efl_net_ip_address_example_SOURCES = ecore/efl_net_ip_address_example.c
ecore_efl_net_ip_address_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_ipc_server_example_SOURCES = ecore/ecore_ipc_server_example.c
ecore_ecore_ipc_server_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
ecore_ecore_ipc_client_example_SOURCES = ecore/ecore_ipc_client_example.c
ecore_ecore_ipc_client_example_CPPFLAGS = $(ECORE_COMMON_CPPFLAGS) $(AM_CPPFLAGS)
if HAVE_CSHARP
if HAVE_WIN32
MCSFLAGS ?=
MCSFLAGS += -define:WIN32
endif
EXTRA_PROGRAMS += \
ecore/efl_mono_loop_timer_example
ecore_efl_mono_loop_timer_example_SOURCES = \
ecore/efl_mono_loop_timer_example.cs
ecore/efl_mono_loop_timer_example$(EXEEXT): $(ecore_efl_mono_loop_timer_example_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll
@rm -f ecore/efl_mono_loop_timer_example$(EXEEXT)
$(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
endif
ECORE_SRCS = \
ecore/ecore_animator_example.c \
ecore/ecore_buffer_example.c \
ecore/ecore_buffer_consumer_example.c \
ecore/ecore_buffer_provider_example.c \
ecore/ecore_client_bench.c \
ecore/ecore_compose_get_example.c \
ecore/ecore_con_client_example.c \
ecore/ecore_con_client_simple_example.c \
ecore/ecore_con_lookup_example.c \
ecore/ecore_con_server_example.c \
ecore/ecore_con_server_http_example.c \
ecore/ecore_con_server_simple_example.c \
ecore/ecore_con_url_cookies_example.c \
ecore/ecore_con_url_download_example.c \
ecore/ecore_con_url_headers_example.c \
ecore/ecore_con_url_ftp_example.c \
ecore/ecore_evas_basics_example.c \
ecore/ecore_evas_buffer_example_01.c \
ecore/ecore_evas_buffer_example_02.c \
ecore/ecore_evas_extn_socket_example.c \
ecore/ecore_evas_extn_plug_example.c \
ecore/ecore_evas_callbacks.c \
ecore/ecore_evas_ews_example.c \
ecore/ecore_evas_object_example.c \
ecore/ecore_evas_wayland_multiseat_example.c \
ecore/ecore_evas_window_sizes_example.c \
ecore/ecore_evas_vnc_example.c \
ecore/ecore_event_example_01.c \
ecore/ecore_event_example_02.c \
ecore/ecore_exe_example.c \
ecore/ecore_exe_example_child.c \
ecore/ecore_fd_handler_example.c \
ecore/ecore_fd_handler_gnutls_example.c \
ecore/ecore_file_download_example.c \
ecore/ecore_idler_example.c \
ecore/ecore_imf_example.c \
ecore/ecore_input_joystick_example.c \
ecore/ecore_job_example.c \
ecore/ecore_pipe_gstreamer_example.c \
ecore/ecore_pipe_simple_example.c \
ecore/ecore_poller_example.c \
ecore/ecore_promise2_example.c \
ecore/ecore_server_bench.c \
ecore/ecore_thread_example.c \
ecore/ecore_time_functions_example.c \
ecore/ecore_timer_example.c \
ecore/ecore_getopt_example.c \
ecore/ecore_con_eet_client_example.c \
ecore/ecore_con_eet_server_example.c \
ecore/ecore_con_eet_descriptor_example.c \
ecore/efl_io_copier_example.c \
ecore/efl_io_copier_simple_example.c \
ecore/efl_io_queue_example.c \
ecore/efl_io_buffered_stream_example.c \
ecore/efl_net_server_example.c \
ecore/efl_net_server_simple_example.c \
ecore/efl_net_dialer_http_example.c \
ecore/efl_net_dialer_websocket_example.c \
ecore/efl_net_dialer_websocket_autobahntestee.c \
ecore/efl_net_dialer_udp_example.c \
ecore/efl_net_dialer_simple_example.c \
ecore/efl_net_socket_ssl_dialer_example.c \
ecore/efl_net_socket_ssl_server_example.c \
ecore/efl_net_session_example.c \
ecore/efl_net_control_example.c \
ecore/ecore_ipc_server_example.c \
ecore/ecore_ipc_client_example.c
ECORE_DATA_FILES = \
ecore/red.png \
ecore/Makefile.examples
DATA_FILES += $(ECORE_DATA_FILES)
install-examples-ecore:
$(MKDIR_P) $(DESTDIR)$(datadir)/ecore/examples
cd $(srcdir) && $(install_sh_DATA) -c $(ECORE_SRCS) $(ECORE_DATA_FILES) $(DESTDIR)$(datadir)/ecore/examples
uninstall-local-ecore:
for f in $(ECORE_SRCS) $(ECORE_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/ecore/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-ecore
UNINSTALL_EXAMPLES += uninstall-local-ecore

View File

@ -1,5 +1,3 @@
#define EFL_BETA_API_SUPPORT
#include <stdio.h>
#include <string.h>
@ -62,7 +60,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
efl_unref(env);
char *buf2 = "sample-input\n";
Eina_Slice slice = { strlen(buf2), buf2 };
Eina_Slice slice = { strlen(buf2), .mem = buf2 };
Eina_Error err = efl_io_writer_write(obj, &slice, NULL);
if (!err) printf("--- WRITE [%p] [%s] ok %i bytes\n", obj, efl_core_command_line_command_get(obj), (int)slice.len);
}

View File

@ -1,5 +1,3 @@
#define EFL_BETA_API_SUPPORT
#include <stdio.h>
#include <string.h>
@ -15,7 +13,7 @@ static Eina_Value _task_exit(void *data, Eina_Value v, const Eina_Future *dead E
////////////////////////////////////////////////////////////////////////////
//// thread side of code
static void
_th_timeout(void *data EINA_UNUSED, const Efl_Event *ev)
_th_timeout(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
Eo *obj = data;
@ -41,7 +39,7 @@ _th_read_change(void *data EINA_UNUSED, const Efl_Event *ev)
printf("--- TH READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf);
char *buf2 = "yes-im-here ";
Eina_Slice slice = { strlen(buf2), buf2 };
Eina_Slice slice = { strlen(buf2), .mem = buf2 };
Eina_Error err = efl_io_writer_write(obj, &slice, NULL);
if (!err)
{
@ -73,7 +71,7 @@ _th_main(void *data EINA_UNUSED, const Efl_Event *ev)
void *s = "", *ss = "";
eina_accessor_data_get(args_access, 0, &s);
eina_accessor_data_get(args_access, 1, &ss);
printf("--- TH main %p, '%s' '%s' indata=%p\n", obj, s, ss, efl_threadio_indata_get(obj));
printf("--- TH main %p, '%s' '%s' indata=%p\n", obj, (char *)s, (char *)ss, efl_threadio_indata_get(obj));
efl_event_callback_add
(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, _th_read_change, NULL);
if (!strcmp(s, "one"))
@ -91,7 +89,7 @@ _th_main(void *data EINA_UNUSED, const Efl_Event *ev)
);
char *buf2 = "hello-out-there2 ";
Eina_Slice slice = { strlen(buf2), buf2 };
Eina_Slice slice = { strlen(buf2), .mem = buf2 };
Eina_Error err = efl_io_writer_write(obj2, &slice, NULL);
if (!err) printf("--- WRITE [%p] [%s] ok %i bytes\n", obj2, efl_core_command_line_command_get(obj), (int)slice.len);
}
@ -184,7 +182,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
);
char *buf2 = "hello-out-there ";
Eina_Slice slice = { strlen(buf2), buf2 };
Eina_Slice slice = { strlen(buf2), .mem = buf2 };
Eina_Error err = efl_io_writer_write(obj, &slice, NULL);
if (!err) printf("--- WRITE [%p] [%s] ok %i bytes\n", obj, efl_core_command_line_command_get(obj), (int)slice.len);
}

View File

@ -86,4 +86,13 @@ foreach example : examples
)
endforeach
examples = [
'efl_exe',
'efl_thread',
]
foreach example : examples
executable(example, example + '.c', dependencies: [eina, ecore, ecore_con])
endforeach
# 'ecore_imf_example',

View File

@ -1,22 +0,0 @@
ECORE_AVAHI_SRCS = \
ecore_avahi/ecore_avahi_browse_example.c \
ecore_avahi/ecore_avahi_example.c
EXTRA_PROGRAMS += \
ecore_avahi/ecore_avahi_example \
ecore_avahi/ecore_avahi_browse_example
install-examples-ecoreavahi: examples
$(MKDIR_P) $(DESTDIR)$(datadir)/ecore_avahi/examples
cd $(srcdir) && $(install_sh_DATA) -c $(ECORE_AVAHI_SRCS) $(DESTDIR)$(datadir)/ecore_avahi/examples
uninstall-local-ecoreavahi:
for f in $(ECORE_AVAHI_SRCS); do \
rm -f $(DESTDIR)$(datadir)/ecore_avahi/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-ecoreavahi
UNINSTALL_EXAMPLES += uninstall-local-ecoreavahi
LDADD += @AVAHI_CLIENT_LIBS@

View File

@ -1,230 +0,0 @@
EDJE_CODEGEN = EFL_RUN_IN_TREE=1 $(top_builddir)/src/bin/edje/edje_codegen
EDJE_CODEGEN_FLAGS = --prefix=codegen_example
#put here all EDCs one needs to the examples
EDJE_EDCS = \
edje/animations.edc \
edje/animations2.edc \
edje/basic.edc \
edje/basic2.edc \
edje/bezier-transition-example.edc \
edje/box.edc \
edje/box_example.edc \
edje/codegen.edc \
edje/color-class.edc \
edje/drag.edc \
edje/dynamic_multiseat.edc \
edje/edje-anchors.edc \
edje/edje-group.edc \
edje/edje-nested.edc \
edje/edje-threshold.edc \
edje/edje_example.edc \
edje/embryo_custom_state.edc \
edje/embryo_pong.edc \
edje/embryo_run_program.edc \
edje/embryo_set_state.edc \
edje/embryo_set_state_anim.edc \
edje/embryo_set_text.edc \
edje/embryo_timer.edc \
edje/embryo_tween_anim.edc \
edje/entry.edc \
edje/external_elm_anchorblock.edc \
edje/external_elm_button.edc \
edje/external_elm_check.edc \
edje/external_elm_panes.edc \
edje/external_emotion_elm.edc \
edje/focus.edc \
edje/lua_script.edc \
edje/messages_echo.edc \
edje/multiseat.edc \
edje/multiseat_custom_names.edc \
edje/multiseat_filter.edc \
edje/perspective.edc \
edje/signals-messages.edc \
edje/signalsBubble.edc \
edje/sigtest.edc \
edje/svg.edc \
edje/swallow.edc \
edje/table.edc \
edje/text.edc \
edje/textblock-hyphen.edc \
edje/toggle_using_filter.edc \
edje/center_zoom.edc
MULTISENSE_EDCS = edje/multisense.edc
if ENABLE_MULTISENSE
EDJE_EDCS += $(MULTISENSE_EDCS)
endif
PHYSICS_EDCS = \
edje/physics_3d.edc \
edje/physics_actions.edc \
edje/physics_backcull.edc \
edje/physics_basic.edc \
edje/physics_complex.edc \
edje/physics_soft_bodies.edc
if HAVE_EPHYSICS
EDJE_EDCS += $(PHYSICS_EDCS)
endif
EDJE_DATA_FILES = \
edje/bubble.png \
edje/bubble-blue.png \
edje/red.png \
edje/test.png \
edje/Vera.ttf \
edje/duck.wav \
edje/dst.svg \
edje/atom.svg \
edje/bojo.svg \
edje/bzrfeed.svg \
edje/yinyang.svg \
edje/ubuntu.svg \
edje/duke.svg \
edje/cartman.svg \
edje/ibm.svg \
edje/hg0.svg \
edje/fsm.svg \
edje/osa.svg \
edje/wikimedia.svg \
edje/scion.svg \
edje/eee.svg \
edje/google.svg \
edje/tiger.svg \
edje/venus.svg \
edje/lineargrad1.svg \
edje/radialgrad1.svg \
edje/yadis.svg \
edje/favorite_on.svg \
edje/favorite_off.svg \
edje/batman1.svg \
edje/batman2.svg \
edje/en_IN/domain_name.po \
edje/hi_IN/domain_name.po \
edje/ta_IN/domain_name.mo \
edje/Makefile.examples
EDJE_SRCS = \
edje/animations2.c \
edje/edje-anchors.c \
edje/edje-animations.c \
edje/edje-basic.c \
edje/edje-basic2.c \
edje/edje-box.c \
edje/edje-box2.c \
edje/edje-codegen-example.c \
edje/edje-color-class.c \
edje/edje-drag.c \
edje/edje-dynamic-multiseat.c \
edje/edje-edit-part-box.c \
edje/edje-entry.c \
edje/edje-focus.c \
edje/edje-multiseat.c \
edje/edje-multiseat-custom-names.c \
edje/edje-multiseat-filter.c \
edje/edje-multisense.c \
edje/edje-perspective.c \
edje/edje-signals-messages.c \
edje/edje-swallow.c \
edje/edje-swallow2.c \
edje/edje-table.c \
edje/edje-text.c \
edje/edje-textblock-hyphenation.c \
edje/edje_example.c \
edje/signals2.c \
edje/sigtest.c \
edje/svg-test.c
EDJE_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_builddir)/src/examples/edje \
-DPACKAGE_DATA_DIR=\"$(datadir)/edje/examples\"
CODEGEN_GENERATED = \
edje/codegen_example_generated.c \
edje/codegen_example_generated.h
DISTCLEANFILES += $(CODEGEN_GENERATED)
$(CODEGEN_GENERATED): edje/codegen.edj
$(AM_V_GEN)$(EDJE_CODEGEN) $(EDJE_CODEGEN_FLAGS) edje/codegen.edj example_group $(builddir)/edje/codegen_example_generated.c $(builddir)/edje/codegen_example_generated.h
edje_edje_codegen_example_SOURCES = \
edje/edje-codegen-example.c
edje_edje_codegen_example_CPPFLAGS = $(EDJE_CPPFLAGS)
nodist_edje_edje_codegen_example_CPPFLAGS = $(EDJE_CPPFLAGS)
nodist_edje_edje_codegen_example_SOURCES = \
$(CODEGEN_GENERATED)
if HAVE_AM_16
edje/edje_codegen_example-edje-codegen-example.$(OBJEXT): $(CODEGEN_GENERATED)
else
edje/edje_edje_codegen_example-edje-codegen-example.$(OBJEXT): $(CODEGEN_GENERATED)
endif
if BUILD_LOADER_PNG
EXTRA_PROGRAMS += \
edje/animations2 \
edje/edje-anchors \
edje/edje-animations \
edje/edje-basic \
edje/edje-basic2 \
edje/edje-box \
edje/edje-box2 \
edje/edje-codegen-example \
edje/edje-color-class \
edje/edje-drag \
edje/edje-dynamic-multiseat \
edje/edje-edit-part-box \
edje/edje-entry \
edje/edje-focus \
edje/edje-multiseat \
edje/edje-multiseat-custom-names \
edje/edje-multiseat-filter \
edje/edje-perspective \
edje/edje-signals-messages \
edje/edje-swallow \
edje/edje-swallow2 \
edje/edje-table \
edje/edje-text \
edje/edje-textblock-hyphenation \
edje/edje_example \
edje/signals2 \
edje/sigtest \
edje/svg-test
if ENABLE_MULTISENSE
EXTRA_PROGRAMS += edje/edje-multisense
endif
endif
DATA_FILES += $(EDJE_DATA_FILES)
EDJE_EDJS = $(EDJE_EDCS:%.edc=%.edj)
EDCS += $(EDJE_EDCS)
if ! HAVE_EPHYSICS
EXTRA_DIST += $(PHYSICS_EDCS)
endif
if ENABLE_MULTISENSE
EDJE_CC_FLAGS += -sd $(top_srcdir)/src/examples/edje
endif
EDJE_CC_FLAGS += -id $(top_srcdir)/src/examples/edje -md $(top_srcdir)/src/examples/edje -fd $(top_srcdir)/src/examples/edje -beta
CLEANFILES += \
$(top_builddir)/src/examples/edje/en_IN/domain_name.mo \
$(top_builddir)/src/examples/edje/hi_IN/domain_name.mo
install-examples-edje: examples
$(MKDIR_P) $(DESTDIR)$(datadir)/edje/examples
cd $(srcdir) && $(install_sh_DATA) -c $(EDJE_SRCS) $(EDJE_EDCS) $(EDJE_DATA_FILES) $(DESTDIR)$(datadir)/edje/examples
cd $(builddir) && $(install_sh_DATA) -c $(EDJE_EDJS) $(DESTDIR)$(datadir)/edje/examples
uninstall-local-edje:
for f in $(EDJE_SRCS) $(EDJE_EDCS) $(EDJE_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/edje/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-edje
UNINSTALL_EXAMPLES += uninstall-local-edje

View File

@ -1,32 +0,0 @@
EXTRA_PROGRAMS += \
eet/eet-basic \
eet/eet-file \
eet/eet-data-simple \
eet/eet-data-nested \
eet/eet-data-file_descriptor_01 \
eet/eet-data-file_descriptor_02 \
eet/eet-data-cipher_decipher
EET_SRCS = \
eet/eet-basic.c \
eet/eet-file.c \
eet/eet-data-simple.c \
eet/eet-data-nested.c \
eet/eet-data-file_descriptor_01.c \
eet/eet-data-file_descriptor_02.c \
eet/eet-data-cipher_decipher.c
EET_DATA_FILES = eet/Makefile.examples
DATA_FILES += $(EET_DATA_FILES)
install-examples-eet:
$(MKDIR_P) $(DESTDIR)$(datadir)/eet/examples
cd $(srcdir) && $(install_sh_DATA) -c $(EET_SRCS) $(EET_DATA_FILES) $(DESTDIR)$(datadir)/eet/examples
uninstall-local-eet:
for f in $(EET_SRCS) $(EET_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/eet/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-eet
UNINSTALL_EXAMPLES += uninstall-local-eet

View File

@ -1,103 +0,0 @@
include $(top_srcdir)/src/Makefile_Eolian_Mono_Helper.am
EFL_MONO_SRCS = efl_mono/example_numberwrapper.c
EFL_MONO_DATA_FILES = efl_mono/example_numberwrapper.eo
EFL_MONO_GENERATED =
if HAVE_CSHARP
# Simple object used by the examples
COMMON_FLAGS = \
@EINA_CFLAGS@ @EINA_LDFLAGS@ \
-L$(top_builddir)/src/lib/eina/.libs -leina \
@EO_CFLAGS@ @EO_LDFLAGS@ \
-L$(top_builddir)/src/lib/eo/.libs -leo \
@EFL_CFLAGS@ @EFL_LDFLAGS@ \
-L$(top_builddir)/src/lib/efl/.libs -lefl \
-I$(abs_top_builddir)/src/examples/efl_mono
if HAVE_WIN32
COMMON_FLAGS += \
@EVIL_CFLAGS@ @EVIL_LDFLAGS@ \
@EFL_WINDOWS_VERSION_CFLAGS@ \
-L$(top_builddir)/src/lib/evil/.libs -levil
else
COMMON_FLAGS += \
-fPIC -DPIC
endif
efl_mono/example_numberwrapper.c: efl_mono/example_numberwrapper.eo.h efl_mono/example_numberwrapper.eo.c
noinst_lib_LTLIBRARIES = efl_mono/libexample_numberwrapper.la
noinst_libdir = $(abs_top_builddir)
efl_mono_libexample_numberwrapper_la_SOURCES = efl_mono/example_numberwrapper.c
efl_mono_libexample_numberwrapper_la_LDFLAGS = -shared @EFL_LTMODULE_FLAGS@
efl_mono_libexample_numberwrapper_la_CFLAGS = $(COMMON_FLAGS) -DEFL_BETA_API_SUPPORT
EFL_MONO_GENERATED += efl_mono/example_numberwrapper.eo.h efl_mono/example_numberwrapper.eo.c efl_mono/EoInherit01$(EXEEXT).config
# CSharp examples
EXTRA_PROGRAMS += \
efl_mono/EoInherit01 \
efl_mono/FunctionPointer01
efl_mono/example_numberwrapper.eo.cs: efl_mono/example_numberwrapper.eo
$(AM_V_EOLMONO) \
$(EOLIAN_MONO) $(EOLIAN_FLAGS) $(EOLIAN_MONO_FLAGS) --dllimport efl_mono/example_numberwrapper -o $@ -r $(top_builddir)/src/bindings/mono/efl_mono/efl_libs.csv $<
efl_mono_EoInherit01_SOURCES = efl_mono/EoInherit01.cs
#efl_mono_EoInherit01_files = $(EoInherit01_exe_srcs) efl_mono/example_numberwrapper.eo.cs
efl_mono/EoInherit01$(EXEEXT): $(efl_mono_EoInherit01_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll efl_mono/libexample_numberwrapper.la efl_mono/EoInherit01$(EXEEXT).config efl_mono/example_numberwrapper.eo.cs
@rm -f $@
$(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
efl_mono/EoInherit01.csproj: $(efl_mono_EoInherit01_SOURCES) $(am_dirstamp) efl_mono/libexample_numberwrapper.la
@rm -f $@
$(EFL_MONO_MSBUILD_GEN) $(MSBUILD_GEN_FLAGS) -o $@ -a efl_mono/EoInherit01$(EXEEXT) -r libefl_mono.dll -t exe $(patsubst %.cs,src/examples/efl_mono/%.cs,$(filter %.cs, $(^)))
efl_mono/EoInherit01$(EXEEXT).config:
echo "<configuration>" > $@
echo " <dllmap dll=\"example_numberwrapper\" target=\"$(abs_top_builddir)/src/examples/efl_mono/.libs/libexample_numberwrapper.so\"/>" >> $@
echo " <dllmap dll=\"efl_mono\" target=\"$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll\"/>" >> $@
echo " <runtime>" >> $@
echo " <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">" >> $@
echo " <probing privatePath=\"$(abs_top_builddir)/src/lib/efl_mono\" />" >> $@
echo " </assemblyBinding>" >> $@
echo " </runtime>" >> $@
echo "</configuration>" >> $@
efl_mono_FunctionPointer01_SOURCES = efl_mono/FunctionPointer01.cs
efl_mono/FunctionPointer01$(EXEEXT): $(efl_mono_FunctionPointer01_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll efl_mono/libexample_numberwrapper.la efl_mono/example_numberwrapper.eo.cs
@rm -f $@
$(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
efl_mono/FunctionPointer01.csproj: $(efl_mono_FunctionPointer01_SOURCES) $(am_dirstamp) efl_mono/libexample_numberwrapper.la
@rm -f $@
$(EFL_MONO_MSBUILD_GEN) $(MSBUILD_GEN_FLAGS) -o $@ -a efl_mono/FunctionPointer01$(EXEEXT) -r libefl_mono.dll -t exe $(patsubst %.cs,src/examples/efl_mono/%.cs,$(filter %.cs, $(^)))
msbuildcsprojs: efl_mono/EoInherit01.csproj $(abs_top_builddir)/FunctionPointer01.csproj
EFL_MONO_GENERATED += efl_mono/example_numberwrapper.eo.cs
# Finishing
CLEANFILES += $(EFL_MONO_GENERATED)
endif
DATA_FILES += $(EFL_MONO_DATA_FILES)
install-examples-eflmono:
$(MKDIR_P) $(DESTDIR)$(datadir)/efl_mono/examples
cd $(srcdir) && $(install_sh_DATA) -c $(EFL_MONO_SRCS) $(EFL_MONO_DATA_FILES) $(DESTDIR)$(datadir)/efl_mono/examples
uninstall-local-eflmono:
for f in $(EFL_MONO_SRCS) $(EFL_MONO_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/efl_mono/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-eflmono
UNINSTALL_EXAMPLES += uninstall-local-eflmono

View File

@ -1,160 +0,0 @@
EINA_SRCS = \
eina/eina_accessor_01.c \
eina/eina_array_01.c \
eina/eina_array_02.c \
eina/eina_error_01.c \
eina/eina_file_01.c \
eina/eina_file_02.c \
eina/eina_hash_01.c \
eina/eina_hash_02.c \
eina/eina_hash_03.c \
eina/eina_hash_04.c \
eina/eina_hash_05.c \
eina/eina_hash_06.c \
eina/eina_hash_07.c \
eina/eina_hash_08.c \
eina/eina_iterator_01.c \
eina/eina_list_01.c \
eina/eina_list_02.c \
eina/eina_list_03.c \
eina/eina_list_04.c \
eina/eina_log_01.c \
eina/eina_log_02.c \
eina/eina_log_03.c \
eina/eina_inlist_01.c \
eina/eina_inlist_02.c \
eina/eina_inlist_03.c \
eina/eina_str_01.c \
eina/eina_strbuf_01.c \
eina/eina_strbuf_02.c \
eina/eina_stringshare_01.c \
eina/eina_tmpstr_01.c \
eina/eina_tiler_01.c \
eina/eina_tiler_02.c \
eina/eina_simple_xml_parser_01.c \
eina/eina_simple_xml_parser_02.c \
eina/eina_value_01.c \
eina/eina_value_02.c \
eina/eina_value_03.c \
eina/eina_value_04.c \
eina/eina_inarray_01.c \
eina/eina_inarray_02.c \
eina/eina_inarray_03.c \
eina/eina_magic_01.c \
eina/eina_xattr_01.c \
eina/eina_xattr_02.c
EXTRA_PROGRAMS += \
eina/eina_accessor_01 \
eina/eina_array_01 \
eina/eina_array_02 \
eina/eina_error_01 \
eina/eina_file_01 \
eina/eina_file_02 \
eina/eina_hash_01 \
eina/eina_hash_02 \
eina/eina_hash_03 \
eina/eina_hash_04 \
eina/eina_hash_05 \
eina/eina_hash_06 \
eina/eina_hash_07 \
eina/eina_hash_08 \
eina/eina_iterator_01 \
eina/eina_list_01 \
eina/eina_list_02 \
eina/eina_list_03 \
eina/eina_list_04 \
eina/eina_log_01 \
eina/eina_log_02 \
eina/eina_log_03 \
eina/eina_inlist_01 \
eina/eina_inlist_02 \
eina/eina_inlist_03 \
eina/eina_str_01 \
eina/eina_strbuf_01 \
eina/eina_strbuf_02 \
eina/eina_stringshare_01 \
eina/eina_tmpstr_01 \
eina/eina_magic_01 \
eina/eina_simple_xml_parser_01 \
eina/eina_simple_xml_parser_02 \
eina/eina_value_01 \
eina/eina_value_02 \
eina/eina_value_03 \
eina/eina_value_04 \
eina/eina_inarray_01 \
eina/eina_inarray_02 \
eina/eina_inarray_03 \
eina/eina_xattr_01 \
eina/eina_xattr_02 \
eina/eina_tiler_01 \
eina/eina_tiler_02
if HAVE_CSHARP
EXTRA_PROGRAMS += \
eina/EinaArray01Mono \
eina/EinaBinbuf01Mono \
eina/EinaError01Mono \
eina/EinaHash01Mono
eina_EinaArray01Mono_SOURCES = eina/EinaArray01.cs
eina_EinaBinbuf01Mono_SOURCES = eina/EinaBinbuf01.cs
eina_EinaError01Mono_SOURCES = eina/EinaError01.cs
eina_EinaHash01Mono_SOURCES = eina/EinaHash01.cs
eina/EinaArray01Mono$(EXEEXT): $(eina_EinaArray01Mono_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll
@rm -f $@
$(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
eina/EinaArray01.csproj: $(eina_EinaArray01Mono_SOURCES) $(am_dirstamp)
@rm -f $@
$(EFL_MONO_MSBUILD_GEN) $(MSBUILD_GEN_FLAGS) -o $@ -a eina/EinaArray01Mono$(EXEEXT) -r libefl_mono.dll -t exe $(patsubst %.cs,src/examples/eina/%.cs,$(filter %.cs, $(^)))
eina/EinaBinbuf01Mono$(EXEEXT): $(eina_EinaBinbuf01Mono_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll
@rm -f $@
$(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
eina/EinaBinbuf01.csproj: $(eina_EinaBinbuf01Mono_SOURCES) $(am_dirstamp)
@rm -f $@
$(EFL_MONO_MSBUILD_GEN) $(MSBUILD_GEN_FLAGS) -o $@ -a eina/EinaBinbuf01Mono$(EXEEXT) -r libefl_mono.dll -t exe $(patsubst %.cs,src/examples/eina/%.cs,$(filter %.cs, $(^)))
eina/EinaError01Mono$(EXEEXT): $(eina_EinaError01Mono_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll
@rm -f $@
$(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
eina/EinaError01.csproj: $(eina_EinaError01Mono_SOURCES) $(am_dirstamp)
@rm -f $@
$(EFL_MONO_MSBUILD_GEN) $(MSBUILD_GEN_FLAGS) -o $@ -a eina/EinaError01Mono$(EXEEXT) -r libefl_mono.dll -t exe $(patsubst %.cs,src/examples/eina/%.cs,$(filter %.cs, $(^)))
eina/EinaHash01Mono$(EXEEXT): $(eina_EinaHash01Mono_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll
@rm -f $@
$(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
eina/EinaHash01.csproj: $(eina_EinaHash01Mono_SOURCES) $(am_dirstamp)
@rm -f $@
$(EFL_MONO_MSBUILD_GEN) $(MSBUILD_GEN_FLAGS) -o $@ -a eina/EinaHash01Mono$(EXEEXT) -r libefl_mono.dll -t exe $(patsubst %.cs,src/examples/eina/%.cs,$(filter %.cs, $(^)))
msbuildcsprojs: $(abs_top_builddir)/EinaArray01.csproj $(abs_top_builddir)/EinaBinbuf01.csproj $(abs_top_builddir)/EinaError01.csproj $(abs_top_builddir)/EinaHash01.csproj
endif
EINA_DATA_FILES = \
eina/addr_book.txt \
eina/chat.xml \
eina/exia.xml \
eina/Makefile.examples
DATA_FILES += $(EINA_DATA_FILES)
install-examples-eina:
$(MKDIR_P) $(DESTDIR)$(datadir)/eina/examples
cd $(srcdir) && $(install_sh_DATA) -c $(EINA_SRCS) $(EINA_DATA_FILES) $(DESTDIR)$(datadir)/eina/examples
uninstall-local-eina:
for f in $(EINA_SRCS) $(EINA_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/eina/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-eina
UNINSTALL_EXAMPLES += uninstall-local-eina

View File

@ -1,29 +0,0 @@
EINA_CXX_SRCS = \
eina_cxx/eina_cxx_list_01.cc \
eina_cxx/eina_cxx_thread_01.cc
if HAVE_CXX
EXTRA_PROGRAMS += \
eina_cxx/eina_cxx_list_01 \
eina_cxx/eina_cxx_thread_01
eina_cxx_eina_cxx_list_01_SOURCES = \
eina_cxx/eina_cxx_list_01.cc
eina_cxx_eina_cxx_thread_01_SOURCES = \
eina_cxx/eina_cxx_thread_01.cc
endif
install-examples-einacxx:
$(MKDIR_P) $(DESTDIR)$(datadir)/eina_cxx/examples
cd $(srcdir) && $(install_sh_DATA) -c $(EINA_CXX_SRCS) $(DESTDIR)$(datadir)/eina_cxx/examples
uninstall-local-einacxx:
for f in $(EINA_CXX_SRCS); do \
rm -f $(DESTDIR)$(datadir)/eina_cxx/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-einacxx
UNINSTALL_EXAMPLES += uninstall-local-einacxx

View File

@ -1,38 +0,0 @@
EXTRA_PROGRAMS += \
eio/eio_file_ls \
eio/eio_file_copy \
eio/efl_io_manager_open \
eio/efl_io_manager_open_multi \
eio/efl_io_manager_ls \
eio/eio_sentry
eio_eio_file_ls_SOURCES = eio/eio_file_ls.c
eio_eio_file_copy_SOURCES = eio/eio_file_copy.c
eio_efl_io_manager_open_SOURCES = eio/efl_io_manager_open.c
eio_efl_io_manager_open_multi_SOURCES = eio/efl_io_manager_open_multi.c
eio_efl_io_manager_ls_SOURCES = eio/efl_io_manager_ls.c
eio_eio_sentry_SOURCES = eio/eio_sentry.c
EIO_SRCS = \
eio/eio_file_ls.c \
eio/eio_file_copy.c \
eio/efl_io_manager_open.c \
eio/efl_io_manager_open_multi.c \
eio/efl_io_manager_ls.c \
eio/eio_sentry.c
EIO_DATA_FILES = eio/Makefile.examples
DATA_FILES += $(EIO_DATA_FILES)
install-examples-eio:
$(MKDIR_P) $(DESTDIR)$(datadir)/eio/examples
cd $(srcdir) && $(install_sh_DATA) -c $(EIO_SRCS) $(EIO_DATA_FILES) $(DESTDIR)$(datadir)/eio/examples
uninstall-local-eio:
for f in $(EIO_SRCS) $(DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/eio/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-eio
UNINSTALL_EXAMPLES += uninstall-local-eio

View File

@ -1,41 +0,0 @@
ELDBUS_SRCS = \
eldbus/connman-list-services.c \
eldbus/ofono-dial.c \
eldbus/banshee.c \
eldbus/complex-types.c \
eldbus/complex-types-server.c \
eldbus/server.c \
eldbus/client.c \
eldbus/simple-signal-emit.c \
eldbus/complex-types-client-eina-value.c \
eldbus/connect-address.c \
eldbus/dbusmodel.c
EXTRA_PROGRAMS += \
eldbus/connman-list-services \
eldbus/ofono-dial \
eldbus/banshee \
eldbus/complex-types \
eldbus/complex-types-server \
eldbus/server \
eldbus/client \
eldbus/simple-signal-emit \
eldbus/complex-types-client-eina-value \
eldbus/connect-address \
eldbus/dbusmodel
ELDBUS_DATA_FILES = eldbus/Makefile.examples
DATA_FILES += $(ELDBUS_DATA_FILES)
install-examples-eldbus:
$(MKDIR_P) $(DESTDIR)$(datadir)/eldbus/examples
cd $(srcdir) && $(install_sh_DATA) -c $(ELDBUS_SRCS) $(ELDBUS_DATA_FILES) $(DESTDIR)$(datadir)/eldbus/examples
uninstall-local-eldbus:
for f in $(ELDBUS_SRCS) $(ELDBUS_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/eldbus/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-eldbus
UNINSTALL_EXAMPLES += uninstall-local-eldbus

View File

@ -1,589 +0,0 @@
DISTCLEANFILES += \
elementary/codegen_example_generated.c \
elementary/codegen_example_generated.h \
elementary/codegen_example.edj
include ../../Makefile_Elm_Helpers.am
PHONIES += elementary/screenshots
ELM_SRCS = \
elementary/actionslider_example_01.c \
elementary/bg_example_01.c \
elementary/bg_example_02.c \
elementary/bg_example_03.c \
elementary/box_example_02.c \
elementary/bubble_example_01.c \
elementary/button_example_00.c \
elementary/button_example_01.c \
elementary/calendar_example_01.c \
elementary/calendar_example_02.c \
elementary/calendar_example_03.c \
elementary/calendar_example_04.c \
elementary/calendar_example_05.c \
elementary/calendar_example_06.c \
elementary/check_example_01.c \
elementary/clock_example.c \
elementary/colorselector_example_01.c \
elementary/conformant_example_01.c \
elementary/conformant_example_02.c \
elementary/combobox_example_01.c \
elementary/ctxpopup_example_01.c \
elementary/datetime_example.c \
elementary/dayselector_example.c \
elementary/diskselector_example_01.c \
elementary/diskselector_example_02.c \
elementary/entry_example.c \
elementary/fileselector_button_example.c \
elementary/fileselector_entry_example.c \
elementary/fileselector_example.c \
elementary/fileviewlist.c \
elementary/filemvc.c \
elementary/flip_example_01.c \
elementary/flipselector_example.c \
elementary/frame_example_01.c \
elementary/general_funcs_example.c \
elementary/gengrid_example.c \
elementary/genlist_example_01.c \
elementary/genlist_example_02.c \
elementary/genlist_example_03.c \
elementary/genlist_example_04.c \
elementary/genlist_example_05.c \
elementary/glview_example_01.c \
elementary/hover_example_01.c \
elementary/hoversel_example_01.c \
elementary/icon_example_01.c \
elementary/image_example_01.c \
elementary/index_example_01.c \
elementary/index_example_02.c \
elementary/inwin_example.c \
elementary/label_example_01.c \
elementary/label_example_02.c \
elementary/label_example_03.c \
elementary/layout_example_01.c \
elementary/layout_example_02.c \
elementary/layout_example_03.c \
elementary/layout_property_bind.c \
elementary/list_example_01.c \
elementary/list_example_02.c \
elementary/list_example_03.c \
elementary/location_example_01.c \
elementary/map_example_01.c \
elementary/map_example_02.c \
elementary/map_example_03.c \
elementary/mapbuf_example.c \
elementary/menu_example_01.c \
elementary/naviframe_example.c \
elementary/notify_example_01.c \
elementary/panes_example.c \
elementary/panel_example_01.c \
elementary/photocam_example_01.c \
elementary/prefs_example_01.c \
elementary/prefs_example_02.c \
elementary/prefs_example_03.c \
elementary/popup_example_01.c \
elementary/popup_example_02.c \
elementary/popup_example_03.c \
elementary/progressbar_example.c \
elementary/radio_example_01.c \
elementary/radio_example_02.c \
elementary/segment_control_example.c \
elementary/separator_example_01.c \
elementary/slider_example.c \
elementary/slideshow_example.c \
elementary/spinner_example.c \
elementary/scroller_example_01.c \
elementary/table_example_01.c \
elementary/table_example_02.c \
elementary/theme_example_01.c \
elementary/theme_example_02.c \
elementary/thumb_example_01.c \
elementary/toolbar_example_01.c \
elementary/toolbar_example_02.c \
elementary/toolbar_example_03.c \
elementary/transit_example_01.c \
elementary/transit_example_02.c \
elementary/transit_example_03.c \
elementary/transit_example_04.c \
elementary/web_example_01.c \
elementary/web_example_02.c \
elementary/win_example.c \
elementary/track_example_01.c \
elementary/evas3d_object_on_button_example.c \
elementary/evas3d_scene_on_button_example.c \
elementary/evas3d_map_example.c \
elementary/efl_thread_1.c \
elementary/efl_thread_2.c \
elementary/efl_thread_3.c \
elementary/efl_thread_4.c \
elementary/efl_thread_5.c \
elementary/efl_thread_6.c \
elementary/efl_ui_list_example_1.c \
elementary/efl_ui_list_view_example_1.c \
elementary/efl_ui_list_view_example_2.c \
elementary/efl_ui_list_view_example_3.c \
elementary/efl_canvas_layout_text.c \
elementary/efl_ui_theme_example_01.c \
elementary/efl_ui_theme_example_02.c \
elementary/efl_ui_relative_layout_example_01.c \
elementary/efl_ui_relative_layout_example_02.c
ELM_SRCS += \
elementary/bg_cxx_example_01.cc \
elementary/bg_cxx_example_02.cc \
elementary/box_cxx_example_02.cc \
elementary/button_cxx_example_00.cc \
elementary/button_cxx_example_01.cc \
elementary/calendar_cxx_example_01.cc \
elementary/calendar_cxx_example_02.cc \
elementary/calendar_cxx_example_03.cc \
elementary/calendar_cxx_example_04.cc \
elementary/calendar_cxx_example_05.cc \
elementary/clock_cxx_example.cc \
elementary/icon_cxx_example_01.cc \
elementary/menu_cxx_example_01.cc \
elementary/popup_cxx_example.cc \
elementary/radio_cxx_example_01.cc \
elementary/slider_cxx_example.cc \
elementary/spinner_cxx_example.cc \
elementary/table_cxx_example_01.cc \
elementary/table_cxx_example_02.cc \
elementary/toolbar_cxx_example_01.cc \
$(NULL)
ELM_EDCS = \
elementary/twitter_example_01.edc \
elementary/evas3d_map_example.edc \
elementary/theme_example.edc \
elementary/layout_example.edc \
elementary/codegen_example.edc \
elementary/efl_ui_list_view_example.edc \
elementary/prefs_example_03.edc \
elementary/efl_canvas_layout_text.edc \
elementary/efl_ui_theme_example.edc
ELM_EPCS = \
elementary/prefs_example_01.epc \
elementary/prefs_example_02.epc \
elementary/prefs_example_03.epc
.epc.epb:
$(AM_V_EPB)$(ELM_PREFS_CC) $< $@
ELM_DATA_FILES = \
elementary/sky_01.jpg \
elementary/dict.txt \
$(ELM_EDCS) \
$(ELM_EPCS)
clean-local-elm:
rm -f elementary/*.epb elementary/*.cfg elementary/*.cfg.bkp elementary/*.edj
ELEMENTARY_CODEGEN_FLAGS = --prefix=codegen_example
ELEMENTARY_CODEGEN_FILES = \
elementary/codegen_example_generated.c \
elementary/codegen_example_generated.h
$(ELEMENTARY_CODEGEN_FILES): elementary/codegen_example.edj
$(AM_V_CODEGEN)$(ELEMENTARY_CODEGEN) $(ELEMENTARY_CODEGEN_FLAGS) $(<) elm/example/mylayout/default $(ELEMENTARY_CODEGEN_FILES)
elementary_codegen_example_SOURCES = \
elementary/codegen_example.c
elementary_codegen_example_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_builddir)/src/examples/elementary
nodist_elementary_codegen_example_SOURCES = \
$(ELEMENTARY_CODEGEN_FILES)
if HAVE_AM_16
elementary/codegen_example-codegen_example.$(OBJEXT): $(ELEMENTARY_CODEGEN_FILES)
else
elementary/elementary_codegen_example-codegen_example.$(OBJEXT): $(ELEMENTARY_CODEGEN_FILES)
endif
if HAVE_CSHARP
if HAVE_WIN32
MCSFLAGS ?=
MCSFLAGS += -define:WIN32
endif
elementary_efl_ui_slider_mono_SOURCES = \
elementary/efl_ui_slider_mono.cs
elementary/efl_ui_slider_mono$(EXEEXT): $(elementary_efl_ui_slider_mono_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll
@rm -f elementary/efl_ui_slider_mono$(EXEEXT)
$(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
elementary_efl_ui_unit_converter_SOURCES = \
elementary/efl_ui_unit_converter.cs
elementary/efl_ui_unit_converter$(EXEEXT): $(elementary_efl_ui_unit_converter_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll
@rm -f elementary/efl_ui_unit_converter$(EXEEXT)
$(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
endif
EXTRA_PROGRAMS += \
elementary/actionslider_example_01 \
elementary/bg_example_01 \
elementary/bg_example_02 \
elementary/bg_example_03 \
elementary/box_example_02 \
elementary/bubble_example_01 \
elementary/button_example_00 \
elementary/button_example_01 \
elementary/calendar_example_01 \
elementary/calendar_example_02 \
elementary/calendar_example_03 \
elementary/calendar_example_04 \
elementary/calendar_example_05 \
elementary/calendar_example_06 \
elementary/check_example_01 \
elementary/clock_example \
elementary/codegen_example \
elementary/colorselector_example_01 \
elementary/conformant_example_01 \
elementary/conformant_example_02 \
elementary/combobox_example_01 \
elementary/ctxpopup_example_01 \
elementary/datetime_example \
elementary/dayselector_example \
elementary/diskselector_example_01 \
elementary/diskselector_example_02 \
elementary/entry_example \
elementary/fileselector_button_example \
elementary/fileselector_entry_example \
elementary/fileselector_example \
elementary/fileviewlist \
elementary/filemvc \
elementary/flip_example_01 \
elementary/flipselector_example \
elementary/frame_example_01 \
elementary/general_funcs_example \
elementary/gengrid_example \
elementary/genlist_example_01 \
elementary/genlist_example_02 \
elementary/genlist_example_03 \
elementary/genlist_example_04 \
elementary/genlist_example_05 \
elementary/glview_example_01 \
elementary/hover_example_01 \
elementary/hoversel_example_01 \
elementary/icon_example_01 \
elementary/image_example_01 \
elementary/index_example_01 \
elementary/index_example_02 \
elementary/inwin_example \
elementary/label_example_01 \
elementary/label_example_02 \
elementary/label_example_03 \
elementary/layout_example_01 \
elementary/layout_example_02 \
elementary/layout_example_03 \
elementary/layout_property_bind \
elementary/list_example_01 \
elementary/list_example_02 \
elementary/list_example_03 \
elementary/location_example_01 \
elementary/map_example_01 \
elementary/map_example_02 \
elementary/map_example_03 \
elementary/mapbuf_example \
elementary/menu_example_01 \
elementary/naviframe_example \
elementary/notify_example_01 \
elementary/panes_example \
elementary/panel_example_01 \
elementary/photocam_example_01 \
elementary/prefs_example_01 \
elementary/prefs_example_02 \
elementary/prefs_example_03 \
elementary/popup_example_01 \
elementary/popup_example_02 \
elementary/popup_example_03 \
elementary/progressbar_example \
elementary/radio_example_01 \
elementary/radio_example_02 \
elementary/segment_control_example \
elementary/separator_example_01 \
elementary/slider_example \
elementary/slideshow_example \
elementary/spinner_example \
elementary/scroller_example_01 \
elementary/table_example_01 \
elementary/table_example_02 \
elementary/theme_example_01 \
elementary/theme_example_02 \
elementary/thumb_example_01 \
elementary/toolbar_example_01 \
elementary/toolbar_example_02 \
elementary/toolbar_example_03 \
elementary/transit_example_01 \
elementary/transit_example_02 \
elementary/transit_example_03 \
elementary/transit_example_04 \
elementary/web_example_01 \
elementary/web_example_02 \
elementary/win_example \
elementary/track_example_01 \
elementary/evas3d_object_on_button_example \
elementary/evas3d_scene_on_button_example \
elementary/evas3d_map_example \
elementary/efl_thread_1 \
elementary/efl_thread_2 \
elementary/efl_thread_3 \
elementary/efl_thread_4 \
elementary/efl_thread_5 \
elementary/efl_thread_6 \
elementary/efl_ui_list_example_1 \
elementary/efl_ui_list_view_example_1 \
elementary/efl_ui_list_view_example_2 \
elementary/efl_ui_list_view_example_3 \
elementary/efl_canvas_layout_text \
elementary/efl_ui_theme_example_01 \
elementary/efl_ui_theme_example_02 \
elementary/efl_ui_relative_layout_example_01 \
elementary/efl_ui_relative_layout_example_02
#benchmark3d
#sphere-hunter
# benchmark3d_SOURCES = \
performance/performance.c \
performance/camera_light.c \
performance/tools_private.h \
performance/graphical_struct.h \
performance/Tools.h \
performance/graphical.c
# sphere_hunter_SOURCES = \
sphere_hunter/evas_3d_sphere_hunter.c
# files_DATA += performance/layout.edj sphere_hunter/sphere_hunter.edj
# performance/layout.edj: performance/layout.edc
# $(AM_V_EDJ) \
$(MKDIR_P) performance/; \
$(EDJE_CC) $(EDJE_CC_FLAGS) -id performance/ $< $@
# sphere_hunter/sphere_hunter.edj: sphere_hunter/sphere_hunter.edc
# $(AM_V_EDJ) \
$(MKDIR_P) sphere_hunter/; \
$(EDJE_CC) $(EDJE_CC_FLAGS) -id sphere_hunter/ -id $(top_srcdir)/data/elementary/themes $< $@
if HAVE_CXX
EXTRA_PROGRAMS += \
elementary/bg_cxx_example_01 \
elementary/bg_cxx_example_02 \
elementary/box_cxx_example_02 \
elementary/button_cxx_example_00 \
elementary/button_cxx_example_01 \
elementary/calendar_cxx_example_01 \
elementary/calendar_cxx_example_02 \
elementary/calendar_cxx_example_03 \
elementary/calendar_cxx_example_04 \
elementary/calendar_cxx_example_05 \
elementary/clock_cxx_example \
elementary/icon_cxx_example_01 \
elementary/menu_cxx_example_01 \
elementary/popup_cxx_example \
elementary/radio_cxx_example_01 \
elementary/slider_cxx_example \
elementary/spinner_cxx_example \
elementary/table_cxx_example_01 \
elementary/table_cxx_example_02 \
elementary/toolbar_cxx_example_01 \
$(NULL)
elementary_bg_cxx_example_01_SOURCES = elementary/bg_cxx_example_01.cc
elementary_bg_cxx_example_02_SOURCES = elementary/bg_cxx_example_02.cc
elementary_box_cxx_example_02_SOURCES = elementary/box_cxx_example_02.cc
elementary_button_cxx_example_00_SOURCES = elementary/button_cxx_example_00.cc
elementary_button_cxx_example_01_SOURCES = elementary/button_cxx_example_01.cc
elementary_calendar_cxx_example_01_SOURCES = elementary/calendar_cxx_example_01.cc
elementary_calendar_cxx_example_02_SOURCES = elementary/calendar_cxx_example_02.cc
elementary_calendar_cxx_example_03_SOURCES = elementary/calendar_cxx_example_03.cc
elementary_calendar_cxx_example_04_SOURCES = elementary/calendar_cxx_example_04.cc
elementary_calendar_cxx_example_05_SOURCES = elementary/calendar_cxx_example_05.cc
elementary_clock_cxx_example_SOURCES = elementary/clock_cxx_example.cc
elementary_icon_cxx_example_01_SOURCES = elementary/icon_cxx_example_01.cc
elementary_menu_cxx_example_01_SOURCES = elementary/menu_cxx_example_01.cc
elementary_radio_cxx_example_01_SOURCES = elementary/radio_cxx_example_01.cc
elementary_popup_cxx_example_SOURCES = elementary/popup_cxx_example.cc
elementary_slider_cxx_example_SOURCES = elementary/slider_cxx_example.cc
elementary_spinner_cxx_example_SOURCES = elementary/spinner_cxx_example.cc
elementary_table_cxx_example_01_SOURCES = elementary/table_cxx_example_01.cc
elementary_table_cxx_example_02_SOURCES = elementary/table_cxx_example_02.cc
elementary_toolbar_cxx_example_01_SOURCES = elementary/toolbar_cxx_example_01.cc
endif
if HAVE_CSHARP
EXTRA_PROGRAMS += \
elementary/efl_ui_slider_mono \
elementary/efl_ui_unit_converter
endif
# This variable will hold the list of screenshots that will be made
# by "make screenshots". Each item in the list is of the form:
# <example executable>:<screenshot filename>:<delay in seconds>
SCREENSHOTS = \
elementary/actionslider_example_01:actionslider_01.png:0.0 \
elementary/bg_example_02:bg_01.png:0.0 \
elementary/box_example_02:box_example_02.png:1.3 \
elementary/bubble_example_01:bubble_example_01.png:0.0 \
elementary/button_example_00:button_00.png:0.0 \
elementary/button_example_01:button_01.png:0.0 \
elementary/check_example_01:check_example_01.png:0.0 \
elementary/colorselector_example_01:colorselector_example_01.png:0.0 \
elementary/animator_example_01:animator_example_01.png:0.2 \
elementary/animator_example_01:animator_example_02.png:0.5 \
elementary/animator_example_01:animator_example_03.png:0.9 \
elementary/flip_example_01:flip_example_01.png:0.0 \
elementary/frame_example_01:frame_example_01.png:0.0 \
elementary/hover_example_01:hover_example_01.png:0.0 \
elementary/hoversel_example_01:hoversel_example_01.png:0.0 \
elementary/label_example_01:label_example_01.png:0.0 \
elementary/theme_example_01:theme_example_01.png:0.0 \
elementary/conformant_example_01:conformant_example_01.png:0.0 \
elementary/conformant_example_02:conformant_example_02.png:0.0 \
elementary/combobox_example_01:combobox_example_01.png:0.0 \
elementary/calendar_example_01:calendar_example_01.png:0.0 \
elementary/calendar_example_02:calendar_example_02.png:0.0 \
elementary/calendar_example_03:calendar_example_03.png:0.0 \
elementary/calendar_example_04:calendar_example_04.png:0.0 \
elementary/calendar_example_05:calendar_example_05.png:0.0 \
elementary/calendar_example_06:calendar_example_06.png:0.0 \
elementary/datetime_example:datetime_example.png:0.0 \
elementary/map_example_01:map_example_01.png:2 \
elementary/map_example_02:map_example_02.png:2.5 \
elementary/map_example_03:map_example_03.png:2 \
elementary/toolbar_example_01:toolbar_example_01.png:0.0 \
elementary/toolbar_example_02:toolbar_example_02.png:1 \
elementary/toolbar_example_03:toolbar_example_03.png:1 \
elementary/spinner_example:spinner_example.png:0.0 \
elementary/clock_example:clock_example.png:0.5 \
elementary/dayselector_example:dayselector_example.png:0.0 \
elementary/mapbuf_example:mapbuf_example.png:0.0 \
elementary/image_example_01:image_example_01.png:0.0 \
elementary/diskselector_example_01:diskselector_example_01.png:0.2 \
elementary/diskselector_example_02:diskselector_example_02.png:0.2 \
elementary/icon_example_01:icon_example_01.png:0.0 \
elementary/layout_example_01:layout_example_01.png:0.0 \
elementary/layout_example_02:layout_example_02.png:0.0 \
elementary/layout_example_03:layout_example_03.png:0.0 \
elementary/list_example_01:list_example_01.png:0.0 \
elementary/list_example_02:list_example_02.png:0.0 \
elementary/list_example_03:list_example_03.png:0.0 \
elementary/segment_control_example:segment_control_example.png:0.0 \
elementary/flipselector_example:flipselector_example.png:0.0 \
elementary/fileselector_example:fileselector_example.png:0.0 \
elementary/index_example_02:index_example_03.png:0.3 \
elementary/slider_example:slider_example.png:0.0 \
elementary/panes_example:panes_example.png:0.0 \
elementary/ctxpopup_example_01:ctxpopup_example_01.png:0.0 \
elementary/separator_example_01:separator_example_01.png:0.0 \
elementary/radio_example_01:radio_example_01.png:0.0 \
elementary/radio_example_02:radio_example_02.png:0.0 \
elementary/panel_example_01:panel_example_01.png:0.0 \
elementary/gengrid_example:gengrid_example.png:0.0 \
elementary/genlist_example_01:genlist_example_01.png:0.1 \
elementary/genlist_example_02:genlist_example_02.png:0.1 \
elementary/genlist_example_03:genlist_example_03.png:0.1 \
elementary/genlist_example_04:genlist_example_04.png:0.1 \
elementary/genlist_example_05:genlist_example_05.png:0.1 \
elementary/thumb_example_01:thumb_example_01.png:0.5 \
elementary/entry_example:entry_example.png:0.0 \
elementary/progressbar_example:progressbar_example.png:0.0 \
elementary/notify_example_01:notify_example_01.png:0.0 \
elementary/notify_example_01:notify_example_01_a.png:6.0 \
elementary/popup_example_01:popup_example_01.png:1.0 \
elementary/popup_example_01:popup_example_01_a.png:6.0 \
elementary/popup_example_02:popup_example_02.png:0.2 \
elementary/popup_example_03:popup_example_03.png:0.2 \
elementary/slideshow_example:slideshow_example.png:1.0 \
elementary/photocam_example_01:photocam_example_01.png:3 \
elementary/scroller_example_01:scroller_example_01.png:0.0 \
elementary/inwin_example:inwin_example.png:0.0 \
elementary/inwin_example:inwin_example_a.png:0.2 \
elementary/table_example_01:table_example_01.png:0.0 \
elementary/table_example_02:table_example_02.png:0.0 \
elementary/menu_example_01:menu_example_01.png:0.5
if HAVE_CXX
SCREENSHOTS += \
elementary/bg_cxx_example_01:bg_cxx_example_01.png:0.0 \
elementary/bg_cxx_example_02:bg_cxx_example_02.png:0.0 \
elementary/box_cxx_example_02:box_cxx_example_02.png:1.3 \
elementary/button_cxx_example_00:button_cxx_example_00.png:0.0 \
elementary/button_cxx_example_01:button_cxx_example_01.png:0.0 \
elementary/calendar_cxx_example_01:calendar_cxx_example_01.png:0.0 \
elementary/calendar_cxx_example_02:calendar_cxx_example_02.png:0.0 \
elementary/calendar_cxx_example_03:calendar_cxx_example_03.png:0.0 \
elementary/calendar_cxx_example_04:calendar_cxx_example_04.png:0.0 \
elementary/calendar_cxx_example_05:calendar_cxx_example_05.png:0.0 \
elementary/clock_cxx_example:clock_cxx_example.png:0.5 \
elementary/icon_cxx_example_01:icon_cxx_example_01.png:0.0 \
elementary/menu_cxx_example_01:menu_cxx_example_01.png:0.5 \
elementary/popup_cxx_example_01:popup_cxx_example_01_a.png:6.0 \
elementary/radio_cxx_example_01:radio_cxx_example_01.png:0.0 \
elementary/slider_cxx_example:slider_cxx_example.png:0.0 \
elementary/spinner_cxx_example:spinner_cxx_example.png:0.0 \
elementary/table_cxx_example_01:table_cxx_example_01.png:0.0 \
elementary/table_cxx_example_02:table_cxx_example_02.png:0.0 \
elementary/toolbar_cxx_example_01:toolbar_cxx_example_01.png:0.0 \
$(NULL)
endif
HTML_SS_DIR=$(top_builddir)/doc/html/screenshots
LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots
screenshots: examples
@mkdir -p $(HTML_SS_DIR)
@mkdir -p $(LATEX_SS_DIR)
@for ss in $(SCREENSHOTS); do \
SS_ENTRY=($${ss//:/ }) ; \
EXAMPLE=$${SS_ENTRY[0]} ; \
SS_FILE=$${SS_ENTRY[1]} ; \
SS_DELAY=$${SS_ENTRY[2]} ; \
ILLUME_KBD=0,0,240,123 ILLUME_IND=0,0,240,32 ILLUME_STK=0,288,240,32 ELM_ENGINE="shot:delay=$${SS_DELAY}:file=$(HTML_SS_DIR)/$${SS_FILE}" ./$${EXAMPLE} ; \
convert $(HTML_SS_DIR)/$${SS_FILE} $(LATEX_SS_DIR)/$${SS_FILE/.png/.eps} ; \
done
ELM_DATA_FILES += \
elementary/performance/layout.edc \
elementary/performance/background.png \
elementary/performance/target_texture.png \
elementary/sphere_hunter/sphere_hunter.edc \
elementary/sphere_hunter/score.jpg \
elementary/sphere_hunter/EFL_victory.png \
elementary/sphere_hunter/EFL_defeat.png
ELM_EDJS = $(ELM_EDCS:%.edc=%.edj)
ELM_EPBS = $(ELM_EPCS:%.epc=%.epb)
EDCS += $(ELM_EDCS)
if HAVE_CSHARP
ELM_DATA_FILES += $(MONO_SRCS)
endif
DATA_FILES += $(ELM_DATA_FILES)
install-examples-elm:
$(MKDIR_P) $(DESTDIR)$(datadir)/elementary/examples
cd $(srcdir) && $(install_sh_DATA) -c $(ELM_SRCS) $(ELM_EDCS) $(ELM_DATA_FILES) $(DESTDIR)$(datadir)/elementary/examples
cd $(builddir) && $(install_sh_DATA) -c $(ELM_EDJS) $(DESTDIR)$(datadir)/elementary/examples
uninstall-local-elm:
for f in $(ELM_SRCS); do \
rm -f $(DESTDIR)$(datadir)/elementary/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-elm
UNINSTALL_EXAMPLES += uninstall-local-elm

View File

@ -13,92 +13,66 @@
#define IMAX 500;
typedef struct _Grid_Event_Data {
Eo *grid;
Eo *item;
} Grid_Event_Data;
Eo *
EoGenerate(const Efl_Class *klass, Eo *parent, Efl_Ui_Layout_Orientation dir)
{
Eo* obj = efl_add(klass, parent);
if (dir != EFL_UI_LAYOUT_ORIENTATION_DEFAULT) efl_ui_layout_orientation_set(obj, dir);
efl_gfx_hint_weight_set(obj, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
efl_gfx_hint_fill_set(obj, EINA_TRUE, EINA_TRUE);
return obj;
}
EAPI_MAIN int
elm_main(int argc, char **argv)
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
int itemmax = IMAX;
int i = 0;
if (argv[1]) itemmax = atoi(argv[1]);
Eo *win, *box, *bbx, *upbtn, *allbtn, *clrbtn;
Eo *grid, *gitem;
Grid_Event_Data *gd = calloc(sizeof(Grid_Event_Data *), 1);
int i = 0, itemmax = IMAX;
Efl_Ui_Win *win;
Efl_Ui_Box *box;
Efl_Ui_Grid *grid;
Efl_Ui_Item *gitem;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Efl.Ui.Grid"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Efl.Ui.Grid"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
box = EoGenerate(EFL_UI_BOX_CLASS, win, EFL_UI_LAYOUT_ORIENTATION_VERTICAL);
box = efl_add(EFL_UI_BOX_CLASS, win);
efl_gfx_hint_weight_set(box, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
elm_win_resize_object_add(win, box);
Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, box);
efl_gfx_hint_weight_set(btn, 0.3, 0.3);
efl_gfx_hint_fill_set(btn, EINA_TRUE, EINA_TRUE);
efl_text_set(btn, "BUTTON");
efl_pack_end(box, btn);
Eina_Bool horiz = 0;
// TEST#1 : Create Grid
gd->grid = grid = EoGenerate(EFL_UI_GRID_CLASS, box, (horiz ? EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL : EFL_UI_LAYOUT_ORIENTATION_VERTICAL));
efl_ui_grid_item_size_set(grid, EINA_SIZE2D(100, 120)); // 4X4
efl_gfx_arrangement_content_padding_set(grid, 5.0, 5.0, EINA_TRUE);
efl_gfx_arrangement_content_align_set(grid, 0.5, 0.5);
grid = efl_add(EFL_UI_GRID_CLASS, box);
efl_gfx_hint_weight_set(grid, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
efl_pack_end(box, grid);
// TEST#2 : Set Item Default Size
Efl_Ui_Grid_Item *target = NULL;
for (i = 0; i < itemmax; i++)
{
int r = 0, g = 0, b = 0;
// TEST#3 : Create Grid Item
gitem = efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, grid);
if (i == 300) target = gitem;
if (i == 0) gd->item = gitem;
Eo *rect = evas_object_rectangle_add(evas_object_evas_get(win));
switch (i % 5)
{
case 0:
r = 255;
break;
case 1:
g = 255;
break;
case 2:
b = 255;
break;
case 3:
r = g = b = 255;
break;
case 4:
r = g = b = 0;
break;
}
efl_gfx_color_set(rect, r, g, b, 255);
efl_content_set(gitem, rect);
// TEST#4 : Pack end
efl_pack_end(grid, gitem);
}
{
int r = 0, g = 0, b = 0;
gitem = efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, grid);
efl_gfx_hint_size_min_set(gitem, EINA_SIZE2D(100, 120));
Eo *rect = evas_object_rectangle_add(evas_object_evas_get(win));
switch (i % 5)
{
case 0:
r = 255;
break;
case 1:
g = 255;
break;
case 2:
b = 255;
break;
case 3:
r = g = b = 255;
break;
case 4:
r = g = b = 0;
break;
}
efl_gfx_color_set(rect, r, g, b, 255);
efl_content_set(gitem, rect);
efl_pack_end(grid, gitem);
}
efl_gfx_entity_size_set(win, EINA_SIZE2D(417, 600));
elm_run();
return 0;
}
ELM_MAIN()

View File

@ -30,7 +30,7 @@ _list_selected(void *data EINA_UNUSED, const Efl_Event *ev)
Eo *item = ev->info, *tmp;
printf("list item [%p:%d] is %s\n", item, efl_ui_item_index_get(item), (efl_ui_item_selected_get(item)? "selected" : "unselected"));
Eina_Iterator *selects = efl_ui_list_selected_items_get(list);
Eina_Iterator *selects = efl_ui_item_container_selected_items_get(list);
EINA_ITERATOR_FOREACH(selects, tmp)
printf("selected [%p:%d] ", tmp, efl_ui_item_index_get(tmp));
@ -82,18 +82,18 @@ _anim_radio_changed(void *data, const Efl_Event *ev EINA_UNUSED)
static void
_scrl_btn_clicked(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
Efl_Ui_List_Item *item = efl_ui_list_last_selected_item_get(priv_d.list);
Efl_Ui_List_Item *item = efl_ui_item_container_last_selected_item_get(priv_d.list);
printf("show [%d:%p] [%d]\n", efl_ui_item_index_get(item), item, priv_d.anim);
efl_ui_list_item_scroll(priv_d.list, item, priv_d.anim);
efl_ui_item_container_item_scroll(priv_d.list, item, priv_d.anim);
}
static void
_scrl_align_btn_clicked(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
Efl_Ui_List_Item *item = efl_ui_list_last_selected_item_get(priv_d.list);
Efl_Ui_List_Item *item = efl_ui_item_container_last_selected_item_get(priv_d.list);
double align = efl_ui_range_value_get(priv_d.slider);
printf("show [%d:%p] [%.2lf], [%d]\n", efl_ui_item_index_get(item), item, align, priv_d.anim);
efl_ui_list_item_scroll_align(priv_d.list, item, align, priv_d.anim);
efl_ui_item_container_item_scroll_align(priv_d.list, item, align, priv_d.anim);
}
EAPI_MAIN int
@ -108,10 +108,12 @@ elm_main(int argc EINA_UNUSED, char **argv)
char buf[256];
Eina_Bool placeholder = EINA_FALSE;
win = elm_win_util_standard_add("list", "list");
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
elm_win_autodel_set(win, EINA_TRUE);
efl_gfx_entity_size_set(win, EINA_SIZE2D(400, 800));
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Efl.Ui.List"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
wbox = efl_add(EFL_UI_BOX_CLASS, win);
efl_ui_layout_orientation_set(wbox, EFL_UI_LAYOUT_ORIENTATION_VERTICAL);
@ -286,8 +288,10 @@ elm_main(int argc EINA_UNUSED, char **argv)
efl_ui_radio_state_value_set(radio, 1);
efl_pack_end(rbox, radio);
efl_pack_end(bbox, rbox);
efl_ui_radio_group_selected_value_set(rbox, 0);
efl_event_callback_add(rbox, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, _anim_radio_changed, rbox);
rbox = efl_add(EFL_UI_BOX_CLASS, bbox);
efl_ui_layout_orientation_set(rbox, EFL_UI_LAYOUT_ORIENTATION_VERTICAL);

View File

@ -119,6 +119,7 @@ examples = [
'efl_ui_theme_example_02',
'efl_ui_slideshow_example',
'efl_ui_radio_example_01',
'efl_ui_grid_example_1'
]
foreach example : examples

View File

@ -1,25 +0,0 @@
EXTRA_PROGRAMS += \
elocation/elocation
elocation_elocation_SOURCES = \
elocation/elocation.c
ELOCATION_SRCS = \
elocation/elocation.c
ELOCATION_DATA_FILES = elocation/Makefile.examples
DATA_FILES += $(ELOCATION_DATA_FILES)
install-examples-elocation:
$(MKDIR_P) $(DESTDIR)$(datadir)/elocation/examples
cd $(srcdir) && $(install_sh_DATA) -c $(ELOCATION_SRCS) $(ELOCATION_DATA_FILES) $(DESTDIR)$(datadir)/elocation/examples
uninstall-local-elocation:
for f in $(ELOCATION_SRCS) $(ELOCATION_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/elocation/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-elocation
UNINSTALL_EXAMPLES += uninstall-local-elocation

View File

@ -1,20 +0,0 @@
EMILE_SRCS = \
emile/emile_base64.c
EXTRA_PROGRAMS += \
emile/emile_base64
DATA_FILES += \
emile/Makefile.examples
install-examples-emile:
$(MKDIR_P) $(DESTDIR)$(datadir)/emile/examples
cd $(srcdir) && $(install_sh_DATA) -c $(EMILE_SRCS) $(DESTDIR)$(datadir)/emile/examples
uninstall-local-emile:
for f in $(EMILE_SRCS); do \
rm -f $(DESTDIR)$(datadir)/emile/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-emile
UNINSTALL_EXAMPLES += uninstall-local-emile

View File

@ -1,29 +0,0 @@
EXTRA_PROGRAMS += \
emotion/emotion_basic_example \
emotion/emotion_generic_example \
emotion/emotion_generic_subtitle_example \
emotion/emotion_border_example \
emotion/emotion_signals_example
EMOTION_SRCS = \
emotion/emotion_basic_example.c \
emotion/emotion_generic_example.c \
emotion/emotion_generic_subtitle_example.c \
emotion/emotion_border_example.c \
emotion/emotion_signals_example.c
EMOTION_DATA_FILES = emotion/Makefile.examples
DATA_FILES += $(EMOTION_DATA_FILES)
install-examples-emotion:
$(MKDIR_P) $(DESTDIR)$(datadir)/emotion/examples
cd $(srcdir) && $(install_sh_DATA) -c $(EMOTION_SRCS) $(EMOTION_DATA_FILES) $(DESTDIR)$(datadir)/emotion/examples
uninstall-local-emotion:
for f in $(EMOTION_SRCS) $(EMOTION_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/emotion/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-emotion
UNINSTALL_EXAMPLES += uninstall-local-emotion

View File

@ -1,94 +0,0 @@
EOL_CXX_SRCS = \
eolian_cxx/eolian_cxx_simple_01.cc \
eolian_cxx/eolian_cxx_callbacks_01.cc \
eolian_cxx/ns_colourable.eo \
eolian_cxx/ns_colourablesquare.eo \
$(IMPL)
if HAVE_CXX
EOL_CXX_GENERATED = \
eolian_cxx/ns_colourable.eo.c \
eolian_cxx/ns_colourable.eo.h \
eolian_cxx/ns_colourable.eo.hh \
eolian_cxx/ns_colourable.eo.impl.hh \
eolian_cxx/ns_colourablesquare.eo.c \
eolian_cxx/ns_colourablesquare.eo.h \
eolian_cxx/ns_colourablesquare.eo.hh \
eolian_cxx/ns_colourablesquare.eo.impl.hh
DISTCLEANFILES += $(EOL_CXX_GENERATED)
EXTRA_PROGRAMS += \
eolian_cxx_eolian_cxx_simple_01 \
eolian_cxx_eolian_cxx_simple_01_cxx_impl \
eolian_cxx_eolian_cxx_callbacks_01
eolian_cxx_eolian_cxx_simple_01_SOURCES = \
eolian_cxx/eolian_cxx_simple_01.cc \
eolian_cxx/colourable.c \
eolian_cxx/colourablesquare.c
eolian_cxx_eolian_cxx_simple_01_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_builddir)/src/examples/eolian_cxx
eolian_cxx_eolian_cxx_simple_01_cxx_impl_SOURCES = \
eolian_cxx/eolian_cxx_simple_01.cc \
eolian_cxx/colourable.c \
eolian_cxx/colourablesquare.c \
eolian_cxx/colourable_cxx.cc \
eolian_cxx/colourablesquare_stub.h \
eolian_cxx/colourable_stub.h \
eolian_cxx/colourablesquare_cxx.cc
eolian_cxx_eolian_cxx_simple_01_cxx_impl_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_builddir)/src/examples/eolian_cxx
eolian_cxx_eolian_cxx_callbacks_01_SOURCES = \
eolian_cxx/eolian_cxx_callbacks_01.cc
eolian_cxx_eolian_cxx_callbacks_01_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_builddir)/src/examples/eolian_cxx
if HAVE_AM_16
eolian_cxx/eolian_cxx_simple_01-eolian_cxx_simple_01.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_simple_01-colourable.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_simple_01-colourablesquare.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_simple_01_cxx_impl-eolian_cxx_simple_01.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_simple_01_cxx_impl-colourable.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_simple_01_cxx_impl-colourable_cxx.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_simple_01_cxx_impl-colourablesquare.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_simple_01_cxx_impl-colourablesquare_cxx.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_callbacks_01-eolian_cxx_callbacks_01.$(OBJEXT): $(EOL_CXX_GENERATED)
else
eolian_cxx/eolian_cxx_eolian_cxx_simple_01-eolian_cxx_simple_01.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_eolian_cxx_simple_01-colourable.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_eolian_cxx_simple_01-colourablesquare.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_eolian_cxx_simple_01_cxx_impl-eolian_cxx_simple_01.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_eolian_cxx_simple_01_cxx_impl-colourable.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_eolian_cxx_simple_01_cxx_impl-colourable_cxx.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_eolian_cxx_simple_01_cxx_impl-colourablesquare.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_eolian_cxx_simple_01_cxx_impl-colourablesquare_cxx.$(OBJEXT): $(EOL_CXX_GENERATED)
eolian_cxx/eolian_cxx_eolian_cxx_callbacks_01-eolian_cxx_callbacks_01.$(OBJEXT): $(EOL_CXX_GENERATED)
endif
endif
EOL_CXX_DATA_FILES = eolian_cxx/Makefile.examples $(ECXX_EXAMPLE_EOS) $(EOL_CXX_SRCS)
DATA_FILES += $(EOL_CXX_DATA_FILES)
install-examples-eolcxx:
$(MKDIR_P) $(DESTDIR)$(datadir)/eolian_cxx/examples
cd $(abs_srcdir) && $(install_sh_DATA) -c $(EOL_CXX_SRCS) $(EOL_CXX_DATA_FILES) $(DESTDIR)$(datadir)/eolian_cxx/examples
uninstall-local-eolcxx:
for f in $(EOL_CXX_SRCS) $(EOL_CXX_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/eolian_cxx/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-eolcxx
UNINSTALL_EXAMPLES += uninstall-local-eolcxx

View File

@ -1,60 +0,0 @@
EPHYSICS_SRCS = \
ephysics/ephysics_logo.c \
ephysics/ephysics_test.h \
ephysics/test_bouncing_ball.c \
ephysics/test_bouncing_text.c \
ephysics/test.c \
ephysics/test_camera.c \
ephysics/test_camera_track.c \
ephysics/test_colliding_balls.c \
ephysics/test_collision_detection.c \
ephysics/test_collision_filter.c \
ephysics/test_constraint.c \
ephysics/test_delete.c \
ephysics/test_forces.c \
ephysics/test_growing_balls.c \
ephysics/test_no_gravity.c \
ephysics/test_rotating_forever.c \
ephysics/test_shapes.c \
ephysics/test_sleeping_threshold.c \
ephysics/test_slider.c \
ephysics/test_velocity.c
# NOTE: neither ephysics_test or ephysics_logo won't be built as they needs Elementary
# TODO: convert these to bare ecore_evas, at least a reduced set to have compile-able examples
# TODO: when EXTRA_PROGRAMS is populated, remove EPHYSICS_SRCS from here
DATA_FILES += $(EPHYSICS_SRCS)
# ephysics_test_SOURCES = \
# ephysics_test.h \
# test_bouncing_ball.c \
# test_bouncing_text.c \
# test.c \
# test_camera.c \
# test_camera_track.c \
# test_colliding_balls.c \
# test_collision_detection.c \
# test_collision_filter.c \
# test_constraint.c \
# test_delete.c \
# test_forces.c \
# test_growing_balls.c \
# test_no_gravity.c \
# test_rotating_forever.c \
# test_shapes.c \
# test_sleeping_threshold.c \
# test_slider.c \
# test_velocity.c
install-examples-ephysics:
$(MKDIR_P) $(DESTDIR)$(datadir)/ephysics/examples
cd $(srcdir) && $(install_sh_DATA) -c $(EPHYSICS_SRCS) $(DESTDIR)$(datadir)/ephysics/examples
uninstall-local-ephysics:
for f in $(EPHYSICS_SRCS) ; do \
rm -f $(DESTDIR)$(datadir)/ephysics/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-ephysics
UNINSTALL_EXAMPLES += uninstall-local-ephysics

View File

@ -1,21 +0,0 @@
EXTRA_PROGRAMS += \
ethumb_client/ethumb_dbus
ETHUMB_CLIENT_SRCS = \
ethumb_client/ethumb_dbus.c
ETHUMB_CLIENT_DATA_FILES = ethumb_client/Makefile.examples
DATA_FILES += $(ETHUMB_CLIENT_DATA_FILES)
install-examples-ethumb-client:
$(MKDIR_P) $(DESTDIR)$(datadir)/ethumb_client/examples
cd $(srcdir) && $(install_sh_DATA) -c $(ETHUMB_CLIENT_SRCS) $(ETHUMB_CLIENT_DATA_FILES) $(DESTDIR)$(datadir)/ethumb_client/examples
uninstall-local-ethumb-client:
for f in $(ETHUMB_CLIENT_SRCS) $(ETHUMB_CLIENT_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/ethumb_client/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-ethumb-client
UNINSTALL_EXAMPLES += uninstall-local-ethumb-client

View File

@ -1,354 +0,0 @@
EVAS_EDCS = evas/aspect.edc
EVAS_BUFFER_COMMON_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir)/src/modules/evas/engines/buffer
EXTRA_PROGRAMS += evas/evas_buffer_simple
evas_evas_buffer_simple_SOURCES = evas/evas-buffer-simple.c
evas_evas_buffer_simple_CPPFLAGS = $(EVAS_BUFFER_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_init_shutdown
evas_evas_init_shutdown_SOURCES = evas/evas-init-shutdown.c
ECORE_EVAS_COMMON_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DPACKAGE_EXAMPLES_DIR=\"$(top_srcdir)/src/examples/evas\"
EXTRA_PROGRAMS += evas/evas_images
evas_evas_images_SOURCES = evas/evas-images.c
evas_evas_images_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_events
evas_evas_events_SOURCES = evas/evas-events.c
evas_evas_events_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_event_filter
evas_evas_event_filter_SOURCES = evas/evas-event-filter.c
evas_evas_event_filter_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_multiseat_events
evas_evas_multiseat_events_SOURCES = evas/evas-multiseat-events.c
evas_evas_multiseat_events_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_object_manipulation
evas_evas_object_manipulation_SOURCES = evas/evas-object-manipulation.c
evas_evas_object_manipulation_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_object_manipulation-eo
evas_evas_object_manipulation_eo_SOURCES = evas/evas-object-manipulation-eo.c
evas_evas_object_manipulation_eo_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_hints
evas_evas_hints_SOURCES = evas/evas-hints.c
evas_evas_hints_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_stacking
evas_evas_stacking_SOURCES = evas/evas-stacking.c
evas_evas_stacking_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_images2
evas_evas_images2_SOURCES = evas/evas-images2.c
evas_evas_images2_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_images3
evas_evas_images3_SOURCES = evas/evas-images3.c
evas_evas_images3_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_images4
evas_evas_images4_SOURCES = evas/evas-images4.c
evas_evas_images4_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_images5
evas_evas_images5_SOURCES = evas/evas-images5.c
evas_evas_images5_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_text
evas_evas_text_SOURCES = evas/evas-text.c
evas_evas_text_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_textblock_obstacles
evas_evas_textblock_obstacles_SOURCES = evas/evas-textblock-obstacles.c
evas_evas_textblock_obstacles_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_smart_object
evas_evas_smart_object_SOURCES = evas/evas-smart-object.c
evas_evas_smart_object_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_smart_interface
evas_evas_smart_interface_SOURCES = evas/evas-smart-interface.c
evas_evas_smart_interface_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_box
evas_evas_box_SOURCES = evas/evas-box.c
evas_evas_box_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_map_utils
evas_evas_map_utils_SOURCES = evas/evas-map-utils.c
evas_evas_map_utils_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_map_aa
evas_evas_map_aa_SOURCES = evas/evas-map-aa.c
evas_evas_map_aa_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_map_utils_eo
evas_evas_map_utils_eo_SOURCES = evas/evas-map-utils-eo.c
evas_evas_map_utils_eo_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_map_aa_eo
evas_evas_map_aa_eo_SOURCES = evas/evas-map-aa-eo.c
evas_evas_map_aa_eo_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_table
evas_evas_table_SOURCES = evas/evas-table.c
evas_evas_table_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_transparent
evas_evas_transparent_SOURCES = evas/evas-transparent.c
evas_evas_transparent_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_multi_touch
evas_evas_multi_touch_SOURCES = evas/evas-multi-touch.c
evas_evas_multi_touch_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_cube
evas_evas_canvas3d_cube_SOURCES = evas/evas-3d-cube.c
evas_evas_canvas3d_cube_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_cube2
evas_evas_canvas3d_cube2_SOURCES = evas/evas-3d-cube2.c
evas_evas_canvas3d_cube2_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_proxy
evas_evas_canvas3d_proxy_SOURCES = evas/evas-3d-proxy.c
evas_evas_canvas3d_proxy_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_pick
evas_evas_canvas3d_pick_SOURCES = evas/evas-3d-pick.c
evas_evas_canvas3d_pick_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_md2
evas_evas_canvas3d_md2_SOURCES = evas/evas-3d-md2.c
evas_evas_canvas3d_md2_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_eet
evas_evas_canvas3d_eet_SOURCES = evas/evas-3d-eet.c
evas_evas_canvas3d_eet_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_ply
evas_evas_canvas3d_ply_SOURCES = evas/evas-3d-ply.c
evas_evas_canvas3d_ply_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_hull
evas_evas_canvas3d_hull_SOURCES = evas/evas-3d-hull.c
evas_evas_canvas3d_hull_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_fog
evas_evas_canvas3d_fog_SOURCES = evas/evas-3d-fog.c
evas_evas_canvas3d_fog_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_frustum
evas_evas_canvas3d_frustum_SOURCES = evas/evas-3d-frustum.c
evas_evas_canvas3d_frustum_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_aabb
evas_evas_canvas3d_aabb_SOURCES = evas/evas-3d-aabb.c
evas_evas_canvas3d_aabb_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_cube_rotate
evas_evas_canvas3d_cube_rotate_SOURCES = evas/evas-3d-cube-rotate.c
evas_evas_canvas3d_cube_rotate_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_shadows
evas_evas_canvas3d_shadows_SOURCES = evas/evas-3d-shadows.c
evas_evas_canvas3d_shadows_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_shooter
evas_evas_canvas3d_shooter_SOURCES = evas/shooter/evas-3d-shooter.c \
evas/shooter/evas-3d-shooter-header.c \
evas/shooter/evas-3d-shooter-header.h \
evas/shooter/evas-3d-shooter-macros.h
evas_evas_canvas3d_shooter_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_obj
evas_evas_canvas3d_obj_SOURCES = evas/evas-3d-obj.c
evas_evas_canvas3d_obj_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_blending
evas_evas_canvas3d_blending_SOURCES = evas/evas-3d-blending.c
evas_evas_canvas3d_blending_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_mmap
evas_evas_canvas3d_mmap_SOURCES = evas/evas-3d-mmap-set.c
evas_evas_canvas3d_mmap_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_colorpick
evas_evas_canvas3d_colorpick_SOURCES = evas/evas-3d-colorpick.c
evas_evas_canvas3d_colorpick_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_parallax_occlusion
evas_evas_canvas3d_parallax_occlusion_SOURCES = evas/evas-3d-parallax-occlusion.c
evas_evas_canvas3d_parallax_occlusion_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_canvas3d_static_lod
evas_evas_canvas3d_static_lod_SOURCES = evas/evas-3d-static-lod.c
evas_evas_canvas3d_static_lod_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_gl
evas_evas_gl_SOURCES = evas/evas-gl.c
evas_evas_gl_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_vg_simple
evas_evas_vg_simple_SOURCES = evas/evas-vg-simple.c
evas_evas_vg_simple_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_vg_batman
evas_evas_vg_batman_SOURCES = evas/evas-vg-batman.c
evas_evas_vg_batman_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
EXTRA_PROGRAMS += evas/evas_aspect_hints
evas_evas_aspect_hints_DEPS = $(srcdir)/aspect.edc
evas_evas_aspect_hints_SOURCES = evas/evas-aspect-hints.c
evas_evas_aspect_hints_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
if HAVE_CXX
EXTRA_PROGRAMS += evas/evas_cxx_rectangle
evas_evas_cxx_rectangle_SOURCES = evas/evas_cxx_rectangle.cc
evas_evas_cxx_rectangle_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS) @EINA_CXX_CFLAGS@ @EO_CXX_CFLAGS@ @EVAS_CXX_CFLAGS@ \
-I$(top_builddir)/src/lib/evas/canvas/ \
$(AM_CPPFLAGS) @EVAS_CFLAGS@
endif
EVAS_SRCS = \
evas/evas-aspect-hints.c \
evas/evas-box.c \
evas/evas-buffer-simple.c \
evas/evas-events.c \
evas/evas-event-filter.c \
evas/evas-hints.c \
evas/evas-images.c \
evas/evas-images2.c \
evas/evas-images3.c \
evas/evas-images4.c \
evas/evas-images5.c \
evas/evas-init-shutdown.c \
evas/evas-map-utils.c \
evas/evas-map-aa.c \
evas/evas-object-manipulation-eo.c \
evas/evas-object-manipulation.c \
evas/evas-smart-interface.c \
evas/evas-smart-object.c \
evas/evas-stacking.c \
evas/evas-table.c \
evas/evas-multi-touch.c \
evas/evas-text.c \
evas/evas-vg-simple.c \
evas/evas-vg-batman.c
EVAS_DATA_FILES = \
evas/resources/images/enlightenment.png \
evas/resources/images/red.png \
evas/resources/images/im1.png \
evas/resources/images/cube1.png \
evas/resources/images/normal_lego.png \
evas/resources/images/sonic.png \
evas/resources/images/sweet_home_reversed.png \
evas/resources/images/wood.jpg \
evas/resources/images/rocks.jpg \
evas/resources/images/four_NM_height.tga \
evas/resources/images/rocks_NM_height.tga \
evas/resources/images/star.jpg \
evas/resources/images/grid.png \
evas/resources/images/grid_n.png \
evas/resources/images/billboard.png \
evas/resources/models/mesh_for_mmap.eet \
evas/resources/models/mesh_for_mmap.md2 \
evas/resources/models/mesh_for_mmap.obj \
evas/resources/models/mesh_for_mmap.ply \
evas/resources/models/Normal_UVs_Colors.ply \
evas/resources/models/Normal_UVs_NoColors.ply \
evas/resources/models/Normal_NoUVs_Colors.ply \
evas/resources/models/Normal_NoUVs_NoColors.ply \
evas/resources/models/NoNormal_UVs_Colors.ply \
evas/resources/models/NoNormal_UVs_NoColors.ply \
evas/resources/models/NoNormal_NoUVs_Colors.ply \
evas/resources/models/NoNormal_NoUVs_NoColors.ply \
evas/resources/models/sonic.md2 \
evas/resources/models/sweet_home.obj \
evas/resources/models/sweet_home_only_vertex_coords.obj \
evas/resources/models/sweet_home_without_normals.obj \
evas/resources/models/sweet_home_without_tex_coords.obj \
evas/resources/models/lod/iso_sphere0.obj \
evas/resources/models/lod/iso_sphere1.obj \
evas/resources/models/lod/iso_sphere2.obj \
evas/resources/models/convex_hull/column_blender_ch.ply \
evas/resources/models/convex_hull/column_blender_ch_test.ply \
evas/resources/models/convex_hull/column.ply \
evas/resources/models/convex_hull/cube_blender_ch.ply \
evas/resources/models/convex_hull/cube_blender_ch_test.ply \
evas/resources/models/convex_hull/eagle_blender_ch.ply \
evas/resources/models/convex_hull/eagle_blender_ch_test.ply \
evas/resources/models/convex_hull/home_blender_ch.obj \
evas/resources/models/convex_hull/home_blender_ch_test.ply \
evas/resources/models/convex_hull/plain.ply \
evas/resources/models/convex_hull/plain_blender_ch.ply \
evas/resources/models/convex_hull/plain_blender_ch_test.ply \
evas/resources/models/convex_hull/sonic_blender_ch.ply \
evas/resources/models/convex_hull/sonic_blender_ch_test.ply \
evas/resources/models/convex_hull/sphere_blender_ch.ply \
evas/resources/models/convex_hull/sphere_blender_ch_test.ply \
evas/resources/models/convex_hull/torus_blender_ch.ply \
evas/resources/models/convex_hull/torus_blender_ch_test.ply \
evas/shooter/assets/images/brick-stone_n.jpg \
evas/shooter/assets/images/brick-stone.jpg \
evas/shooter/assets/images/bricks_n.jpg \
evas/shooter/assets/images/eagle.png \
evas/shooter/assets/images/snake.png \
evas/shooter/assets/images/snake_n.png \
evas/shooter/assets/images/bricks.jpg \
evas/shooter/assets/images/soldier.png \
evas/shooter/assets/images/gazebo.png \
evas/shooter/assets/images/warrior.png \
evas/shooter/assets/images/gazebo_t.png \
evas/shooter/assets/images/gazebo_t_t.png \
evas/shooter/assets/images/gazebo_t_n.png \
evas/shooter/assets/images/gazebo_b_n.png \
evas/shooter/assets/models/warrior.md2 \
evas/shooter/assets/models/gazebo_b.md2 \
evas/shooter/assets/models/gazebo_t.md2 \
evas/shooter/assets/models/eagle.md2 \
evas/shooter/assets/models/snake.md2 \
evas/shooter/assets/models/soldier_jump.md2 \
evas/shooter/assets/models/soldier.md2 \
evas/shooter/assets/models/tommy.ply \
evas/filters/filter_blend.lua \
evas/filters/filter_blur.lua \
evas/filters/filter_bump.lua \
evas/filters/filter_curve.lua \
evas/filters/filter_example_1.lua \
evas/filters/filter_grow.lua \
evas/filters/filter_mask.lua \
evas/filters/filter_padding.lua \
evas/filters/filter_transform.lua \
evas/Makefile.examples \
evas/README \
evas/evas-common.h
DATA_FILES += $(EVAS_DATA_FILES)
EVAS_EDJS = $(EVAS_EDCS:%.edc=%.edj)
EDCS += $(EVAS_EDCS)
install-examples-evas: examples
$(MKDIR_P) $(DESTDIR)$(datadir)/evas/examples
cd $(srcdir) && $(install_sh_DATA) -c $(EVAS_SRCS) $(EVAS_EDCS) $(EVAS_DATA_FILES) $(DESTDIR)$(datadir)/evas/examples
cd $(builddir) && $(install_sh_DATA) -c $(EVAS_EDJS) $(DESTDIR)$(datadir)/evas/examples
uninstall-local-evas:
for f in $(EVAS_SRCS) $(EVAS_EDCS) $(EVAS_DATA_FILES); do \
rm -f $(DESTDIR)$(datadir)/evas/examples/$$f ; \
done
INSTALL_EXAMPLES += install-examples-evas
UNINSTALL_EXAMPLES += uninstall-local-evas

View File

@ -1,17 +0,0 @@
#ifndef EFL_CONFIG_H
#define EFL_CONFIG_H
/* Add -DEFL_API_OVERRIDE ot your CFLAGS to override the default
* installed api set and then fter that -DEFL_NOLEGACY_API_SUPPORT
* as desired
*/
#ifndef EFL_API_OVERRIDE
#cmakedefine EFL_API_LEGACY_DEF
#cmakedefine EFL_BETA_API_SUPPORT
#endif
#define EFL_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define EFL_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define EFL_BUILD_ID "@PROJECT_VERSION_TWEAK@"
#endif

View File

@ -1,17 +0,0 @@
#ifndef CONFIG_H
#define CONFIG_H
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include "config_gen.h"
#if defined (HAVE_LISTXATTR) && defined (HAVE_SETXATTR) && defined (HAVE_GETXATTR)
#define HAVE_XATTR
#endif
//for now statically define that to one
#define STRERROR_R_CHAR_P 1
#endif

View File

@ -1,48 +0,0 @@
/* EINA - EFL data type library
* Copyright (C) 2008 Cedric Bail
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library;
* if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EINA_CONFIG_H_
#define EINA_CONFIG_H_
#ifdef HAVE_EXOTIC
# include <Exotic.h>
#endif
#include "eina_config_gen.h"
#include <limits.h>
#ifndef __WORDSIZE
# if defined(__OPENBSD__) && (INTPTR_MAX == INT32_MAX)
# define __WORDSIZE 32
# else
# define __WORDSIZE 64
# endif
#endif
/* Do not turn the following #define as meaning EFL64. We are only
interested to know if sizeof (void*) == 64bits or not. Those means
something else.
defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || defined(__amd64)
*/
#if defined(_WIN64) || defined(__LP64__) || defined(_LP64) || defined(__ppc64__)
# define EFL64
#endif
#endif /* EINA_CONFIG_H_ */

View File

@ -250,6 +250,15 @@ typedef Eo Efl_Ui_Spotlight_Indicator;
# include <efl_ui_spin.eo.h>
# include <efl_ui_spin_button.eo.h>
# include <efl_ui_slider.eo.h>
# include <efl_ui_item.eo.h>
# include <efl_ui_position_manager_entity.eo.h>
# include <efl_ui_item_container.eo.h>
# include <efl_ui_position_manager_list.eo.h>
# include <efl_ui_position_manager_grid.eo.h>
# include <efl_ui_list_item.eo.h>
# include <efl_ui_list_default_item.eo.h>
# include <efl_ui_grid_item.eo.h>
# include <efl_ui_grid_default_item.eo.h>
/**
* Initialize Elementary

File diff suppressed because it is too large Load Diff

View File

@ -1,100 +1,10 @@
import efl_ui_grid_item;
class @beta Efl.Ui.Grid extends Efl.Ui.Layout_Base implements
Efl.Ui.Scrollable_Interactive,
Efl.Ui.Scrollbar,
Efl.Pack_Linear, Efl.Pack_Layout,
Efl.Ui.Layout_Orientable,
Efl.Ui.Selectable,
Efl.Ui.Multi_Selectable,
Efl.Gfx.Arrangement
class @beta Efl.Ui.Grid extends Efl.Ui.Item_Container
{
[[Simple grid widget with Pack interface.]]
methods {
@property item_size {
[[Property data of item size.]]
set {}
get {}
values {
size: Eina.Size2D; [[last selected item of grid.]]
}
}
item_scroll {
[[scroll move the item to show in the viewport.]]
params {
@in item: Efl.Ui.Grid_Item; [[Target item.]]
@in animation: bool; [[Boolean value for animation of scroll move.]]
}
}
item_scroll_align {
[[scroll move the item to show at the align position of the viewport.]]
params {
@in item: Efl.Ui.Grid_Item; [[Target item.]]
@in align: double; [[align value in Viewport.]]
@in animation: bool; [[Boolean value for animation of scroll move.]]
}
}
@property last_selected_item {
[[Property data of last selected item.]]
get {}
values {
item: Efl.Ui.Grid_Item; [[last selected item of grid.]]
}
}
selected_items_get {
[[Get the selected items iterator. The iterator sequence will be decided by selection.]]
return: iterator<Efl.Ui.Grid_Item> @owned @no_unused; [[Iterator covered by selected items list.
user have to free the iterator after used.]]
}
}
implements {
//Efl.Object
Efl.Object.constructor;
Efl.Object.finalize;
Efl.Object.destructor;
Efl.Object.invalidate;
//Efl.Canvas
Efl.Canvas.Group.group_calculate;
//Efl.Container
Efl.Container.content_iterate;
Efl.Container.content_count;
Efl.Ui.Layout_Orientable.orientation { get; set; }
//Efl.Ui.Widget
Efl.Ui.Widget.theme_apply;
//Efl.Ui.Focus
//Efl.Ui.Focus.Object.on_focus_update;
//Efl.Pack
Efl.Pack.pack_clear;
Efl.Pack.unpack_all;
Efl.Pack.unpack;
Efl.Pack.pack;
Efl.Pack_Linear.pack_end;
Efl.Pack_Linear.pack_begin;
Efl.Pack_Linear.pack_before;
Efl.Pack_Linear.pack_after;
Efl.Pack_Linear.pack_at;
Efl.Pack_Linear.pack_unpack_at;
Efl.Pack_Linear.pack_index_get;
Efl.Pack_Linear.pack_content_get;
Efl.Pack_Layout.layout_update;
Efl.Pack_Layout.layout_request;
Efl.Gfx.Arrangement.content_padding { get; set; }
Efl.Gfx.Arrangement.content_align { get; set; }
//Efl.Ui.Scrollable
Efl.Ui.Scrollable_Interactive.match_content { set; }
//Efl.Ui.Multi_Selectable
Efl.Ui.Multi_Selectable.select_mode {get; set;}
}
composite {
Efl.Ui.Scrollable_Interactive;
Efl.Ui.Scrollbar;
}
}

View File

@ -1,83 +0,0 @@
#ifndef EFL_UI_GRID_PRIVATE_H
#define EFL_UI_GRID_PRIVATE_H
#include "Elementary.h"
typedef struct _Efl_Ui_Grid_Data
{
// Eo Objects
Eo *obj;
Eo *pan; /* Internal pan for scroll */
Eo *content;
Eo *smanager; /* Scroll Manager for support scroll with pan */
Eina_Rect geo;
Eina_Position2D pre_pos;
Efl_Ui_Layout_Orientation dir;
struct {
Efl_Ui_Grid_Item *item; /* Scroll target item */
double align; /* Item scroll aligned position.
-1 is for default case of scroll in */
Eina_Bool anim : 1; /* boolean data for animation on scroll */
} scroll; /* Item scroll values for deferred operation */
struct {
Eina_Size2D size;
Eina_Size2D pad;
struct {
double w;
double h;
} align;
int count;
int row;
int col;
} item;
int linemax;
Eina_List *items; /* All item list for internal maintaining */
Eina_List *selected; /* Selected items list */
Efl_Ui_Grid_Item *last_selected; /* latest selected item */
Efl_Ui_Select_Mode select_mode; /* Select mode for items
with single or multiple seleciton */
// Boolean Data
Eina_Bool freeze_want : 1; /* Flag for Scroll freezing */
Eina_Bool match_content_w: 1; /* Flag for size matching on content width.
it will disable horizontal scroll */
Eina_Bool match_content_h: 1; /* Flag for size matching on content height.
it will disable vertical scroll */
Eina_Bool pan_resized : 1; /* Flag for pan resized.
This value is used for checking scroll is
calculated after initialized */
Eina_Bool need_update: 1;
Eina_Bool pad_scalable: 1;
} Efl_Ui_Grid_Data;
typedef struct _Item_Iterator
{
Eina_Iterator iterator;
Eina_List *list;
Eina_Iterator *real_iterator;
Eo *object;
} Item_Iterator;
#define EFL_UI_GRID_DATA_GET(o, pd) \
Efl_Ui_Grid_Data * pd = efl_data_scope_safe_get(o, EFL_UI_GRID_CLASS)
#define EFL_UI_GRID_DATA_GET_OR_RETURN(o, ptr, ...) \
EFL_UI_GRID_DATA_GET(o, ptr); \
if (EINA_UNLIKELY(!ptr)) \
{ \
ERR("No widget data for object %p (%s)", \
o, evas_object_type_get(o)); \
return __VA_ARGS__; \
}
#define EFL_UI_GRID_CHECK(obj) \
if (EINA_UNLIKELY(!efl_isa((obj), EFL_UI_GRID_CLASS))) \
return
#endif

View File

@ -0,0 +1,857 @@
#ifdef HAVE_CONFIG_H
#include "elementary_config.h"
#endif
#define ELM_LAYOUT_PROTECTED
#define EFL_UI_SCROLL_MANAGER_PROTECTED
#define EFL_UI_SCROLLBAR_PROTECTED
#define EFL_UI_WIDGET_FOCUS_MANAGER_PROTECTED
#include <Efl_Ui.h>
#include <Elementary.h>
#include "elm_widget.h"
#include "elm_priv.h"
#define MY_CLASS EFL_UI_ITEM_CONTAINER_CLASS
#define MY_DATA_GET(obj, pd) \
Efl_Ui_Item_Container_Data *pd = efl_data_scope_get(obj, MY_CLASS);
typedef struct {
Efl_Ui_Scroll_Manager *smanager;
Efl_Ui_Pan *pan;
Eina_List *selected;
Eina_List *items;
Efl_Ui_Select_Mode mode;
Efl_Ui_Layout_Orientation dir;
Eina_Size2D content_min_size;
Efl_Ui_Position_Manager_Entity *pos_man;
struct {
Eina_Accessor pass_on;
unsigned int last_index;
const Eina_List *current;
} obj_accessor;
struct {
Eina_Bool w;
Eina_Bool h;
} match_content;
Eina_Accessor size_accessor;
Efl_Gfx_Entity *sizer;
} Efl_Ui_Item_Container_Data;
static Eina_Bool register_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item);
static Eina_Bool unregister_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item);
static void
flush_min_size(Eo *obj, Efl_Ui_Item_Container_Data *pd)
{
Eina_Size2D tmp = pd->content_min_size;
if (!pd->match_content.w)
tmp.w = -1;
if (!pd->match_content.h)
tmp.h = -1;
efl_gfx_hint_size_min_set(obj, tmp);
}
static int
clamp_index(Efl_Ui_Item_Container_Data *pd, int index)
{
if (index < ((int)eina_list_count(pd->items)) * -1)
return -1;
else if (index > (int)eina_list_count(pd->items) - 1)
return 1;
return 0;
}
static int
index_adjust(Efl_Ui_Item_Container_Data *pd, int index)
{
int c = eina_list_count(pd->items);
if (index < c * -1)
return 0;
else if (index > c - 1)
return c - 1;
else if (index < 0)
return index + c;
return index;
}
static Eina_Bool
_obj_accessor_get_at(Eina_Accessor *accessor, unsigned int idx, void **data)
{
ptrdiff_t offset = offsetof(Efl_Ui_Item_Container_Data, obj_accessor);
Efl_Ui_Item_Container_Data *pd = (void*)accessor - offset;
const Eina_List *over;
unsigned int middle;
unsigned int i;
if (idx >= eina_list_count(pd->items))
return EINA_FALSE;
if (pd->obj_accessor.last_index == idx)
over = pd->obj_accessor.current;
else if (idx > pd->obj_accessor.last_index)
{
/* After current position. */
middle = ((eina_list_count(pd->items) - pd->obj_accessor.last_index))/2;
if (idx > middle)
/* Go backward from the end. */
for (i = eina_list_count(pd->items) - 1,
over = eina_list_last(pd->items);
i > idx && over;
--i, over = eina_list_prev(over))
;
else
/* Go forward from current. */
for (i = pd->obj_accessor.last_index, over = pd->obj_accessor.current;
i < idx && over;
++i, over = eina_list_next(over))
;
}
else
{
/* Before current position. */
middle = pd->obj_accessor.last_index/2;
if (idx > middle)
/* Go backward from current. */
for (i = pd->obj_accessor.last_index, over = pd->obj_accessor.current;
i > idx && over;
--i, over = eina_list_prev(over))
;
else
/* Go forward from start. */
for (i = 0, over = pd->items;
i < idx && over;
++i, over = eina_list_next(over))
;
}
if (!over)
return EINA_FALSE;
pd->obj_accessor.last_index = idx;
pd->obj_accessor.current = over;
*data = eina_list_data_get(over);
return EINA_TRUE;
}
static Eina_Accessor*
_obj_clone(Eina_Accessor *accessor)
{
ptrdiff_t offset = offsetof(Efl_Ui_Item_Container_Data, obj_accessor);
Efl_Ui_Item_Container_Data *pd = (void*)accessor - offset;
return eina_list_accessor_new(pd->items);
}
static Eina_List *
_null_container(Eina_Accessor *accessor EINA_UNUSED)
{
ERR("Not allowed to get a container!");
return NULL;
}
static void
_free(Eina_Accessor *accessor EINA_UNUSED)
{
ERR("Freeing this accessor is not supported");
}
static void
_obj_accessor_init(Eina_Accessor *accessor)
{
//this is the accessor for accessing the items
//we have to workarround here the problem that
//no accessor can be created for a not yet created list.
accessor->version = EINA_ACCESSOR_VERSION;
accessor->get_at = FUNC_ACCESSOR_GET_AT(_obj_accessor_get_at);
accessor->clone = FUNC_ACCESSOR_CLONE(_obj_clone);
accessor->get_container = FUNC_ACCESSOR_GET_CONTAINER(_null_container);
accessor->free = FUNC_ACCESSOR_FREE(_free);
EINA_MAGIC_SET(accessor, EINA_MAGIC_ACCESSOR);
}
static Eina_Bool
_size_accessor_get_at(Eina_Accessor *accessor, unsigned int idx, void **data)
{
Eina_Size2D *size = (Eina_Size2D*)data;
ptrdiff_t offset = offsetof(Efl_Ui_Item_Container_Data, size_accessor);
Efl_Ui_Item_Container_Data *pd = (void*)accessor - offset;
if (idx > eina_list_count(pd->items))
return EINA_FALSE;
Eo *subobj = eina_list_nth(pd->items, idx);
*size = efl_gfx_hint_size_combined_min_get(subobj);
return EINA_TRUE;
}
static Eina_Accessor*
_size_clone(Eina_Accessor *accessor EINA_UNUSED)
{
return NULL;
}
static void
_size_accessor_init(Eina_Accessor *accessor)
{
accessor->version = EINA_ACCESSOR_VERSION;
accessor->get_at = FUNC_ACCESSOR_GET_AT(_size_accessor_get_at);
accessor->clone = FUNC_ACCESSOR_CLONE(_size_clone);
accessor->get_container = FUNC_ACCESSOR_GET_CONTAINER(_null_container);
accessor->free = FUNC_ACCESSOR_FREE(_free);
EINA_MAGIC_SET(accessor, EINA_MAGIC_ACCESSOR);
}
static void
_pan_viewport_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
MY_DATA_GET(data, pd);
Eina_Rect rect = efl_ui_scrollable_viewport_geometry_get(data);
efl_ui_position_manager_entity_viewport_set(pd->pos_man, rect);
}
static void
_pan_position_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
MY_DATA_GET(data, pd);
Eina_Position2D pos = efl_ui_pan_position_get(pd->pan);
Eina_Position2D max = efl_ui_pan_position_max_get(pd->pan);
Eina_Vector2 rpos = {0.0, 0.0};
if (max.x > 0.0)
rpos.x = (double)pos.x/(double)max.x;
if (max.y > 0.0)
rpos.y = (double)pos.y/(double)max.y;
efl_ui_position_manager_entity_scroll_position_set(pd->pos_man, rpos.x, rpos.y);
}
EFL_CALLBACKS_ARRAY_DEFINE(pan_events_cb,
{EFL_UI_PAN_EVENT_PAN_POSITION_CHANGED, _pan_position_changed_cb},
{EFL_UI_PAN_EVENT_PAN_VIEWPORT_CHANGED, _pan_viewport_changed_cb},
)
static void
_item_scroll_internal(Eo *obj EINA_UNUSED,
Efl_Ui_Item_Container_Data *pd,
Efl_Ui_Item *item,
double align,
Eina_Bool anim)
{
Eina_Rect ipos, view;
Eina_Position2D vpos;
if (!pd->smanager) return;
ipos = efl_ui_position_manager_entity_position_single_item(pd->pos_man, eina_list_data_idx(pd->items, item));
view = efl_ui_scrollable_viewport_geometry_get(pd->smanager);
vpos = efl_ui_scrollable_content_pos_get(pd->smanager);
ipos.x = ipos.x + vpos.x - view.x;
ipos.y = ipos.y + vpos.y - view.y;
//FIXME scrollable needs some sort of align, the docs do not even garantee to completly move in the element
efl_ui_scrollable_scroll(pd->smanager, ipos, anim);
}
EOLIAN static void
_efl_ui_item_container_item_scroll(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item, Eina_Bool animation)
{
_item_scroll_internal(obj, pd, item, -1.0, animation);
}
EOLIAN static void
_efl_ui_item_container_item_scroll_align(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item, double align, Eina_Bool animation)
{
_item_scroll_internal(obj, pd, item, align, animation);
}
EOLIAN static Efl_Ui_Item*
_efl_ui_item_container_last_selected_item_get(const Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd)
{
return eina_list_last_data_get(pd->selected);
}
EOLIAN static Eina_Iterator*
_efl_ui_item_container_selected_items_get(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd)
{
return eina_list_iterator_new(pd->selected);
}
EOLIAN static Efl_Object*
_efl_ui_item_container_efl_object_constructor(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED)
{
Eo *o;
pd->dir = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
_obj_accessor_init(&pd->obj_accessor.pass_on);
_size_accessor_init(&pd->size_accessor);
if (!elm_widget_theme_klass_get(obj))
elm_widget_theme_klass_set(obj, "item_container");
o = efl_constructor(efl_super(obj, MY_CLASS));
pd->sizer = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas_object_evas_get(obj));
efl_gfx_color_set(pd->sizer, 0, 0, 0, 0);
pd->pan = efl_add(EFL_UI_PAN_CLASS, obj);
efl_content_set(pd->pan, pd->sizer);
efl_event_callback_array_add(pd->pan, pan_events_cb(), obj);
pd->smanager = efl_add(EFL_UI_SCROLL_MANAGER_CLASS, obj);
efl_composite_attach(obj, pd->smanager);
efl_ui_mirrored_set(pd->smanager, efl_ui_mirrored_get(obj));
efl_ui_scroll_manager_pan_set(pd->smanager, pd->pan);
efl_ui_scroll_connector_bind(obj, pd->smanager);
return o;
}
EOLIAN static Efl_Object*
_efl_ui_item_container_efl_object_finalize(Eo *obj, Efl_Ui_Item_Container_Data *pd)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(pd->pos_man, NULL);
return efl_finalize(efl_super(obj, MY_CLASS));
}
EOLIAN static Eina_Error
_efl_ui_item_container_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Item_Container_Data *pd)
{
Eina_Error res;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
res = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (res == EFL_UI_THEME_APPLY_ERROR_GENERIC) return res;
efl_ui_mirrored_set(pd->smanager, efl_ui_mirrored_get(obj));
efl_content_set(efl_part(wd->resize_obj, "efl.content"), pd->pan);
return res;
}
EOLIAN static void
_efl_ui_item_container_efl_object_destructor(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED)
{
efl_destructor(efl_super(obj, MY_CLASS));
}
static void
deselect_all(Efl_Ui_Item_Container_Data *pd)
{
while(pd->selected)
{
Eo *item = eina_list_data_get(pd->selected);
efl_ui_item_selected_set(item, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN(eina_list_data_get(pd->selected) == item);
}
}
EOLIAN static void
_efl_ui_item_container_efl_object_invalidate(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED)
{
efl_ui_item_container_position_manager_set(obj, NULL);
deselect_all(pd);
while(pd->items)
efl_del(pd->items->data);
efl_invalidate(efl_super(obj, MY_CLASS));
}
EOLIAN static Eina_Iterator*
_efl_ui_item_container_efl_container_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd)
{
return eina_list_iterator_new(pd->items);
}
EOLIAN static int
_efl_ui_item_container_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd)
{
return eina_list_count(pd->items);
}
EOLIAN static void
_efl_ui_item_container_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Layout_Orientation dir)
{
if (pd->dir == dir) return;
pd->dir = dir;
if (pd->pos_man)
efl_ui_layout_orientation_set(pd->pos_man, dir);
}
EOLIAN static Efl_Ui_Layout_Orientation
_efl_ui_item_container_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd)
{
return pd->dir;
}
EOLIAN static void
_efl_ui_item_container_efl_ui_scrollable_interactive_match_content_set(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, Eina_Bool w, Eina_Bool h)
{
if (pd->match_content.w == w && pd->match_content.h == h)
return;
pd->match_content.w = w;
pd->match_content.h = h;
efl_ui_scrollable_match_content_set(pd->smanager, w, h);
flush_min_size(obj, pd);
}
EOLIAN static void
_efl_ui_item_container_efl_ui_multi_selectable_select_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Select_Mode mode)
{
pd->mode = mode;
if ((mode == EFL_UI_SELECT_MODE_SINGLE_ALWAYS || mode == EFL_UI_SELECT_MODE_SINGLE) &&
eina_list_count(pd->selected) > 0)
{
Efl_Ui_Item *last = eina_list_last_data_get(pd->selected);
pd->selected = eina_list_remove_list(pd->selected, eina_list_last(pd->selected));
deselect_all(pd);
pd->selected = eina_list_append(pd->selected, last);
}
else if (mode == EFL_UI_SELECT_MODE_NONE && pd->selected)
{
deselect_all(pd);
}
}
EOLIAN static Efl_Ui_Select_Mode
_efl_ui_item_container_efl_ui_multi_selectable_select_mode_get(const Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd)
{
return pd->mode;
}
static void
_selected_cb(void *data, const Efl_Event *ev)
{
Eo *obj = data;
MY_DATA_GET(obj, pd);
if (pd->mode == EFL_UI_SELECT_MODE_SINGLE_ALWAYS || pd->mode == EFL_UI_SELECT_MODE_SINGLE)
{
//we might get the situation that the item is already in the list and selected again, so just free the list, it will be rebuild below
if (eina_list_data_get(pd->selected) == ev->object)
{
pd->selected = eina_list_free(pd->selected);
}
else
{
deselect_all(pd);
}
}
else if (pd->mode == EFL_UI_SELECT_MODE_NONE)
{
ERR("Selection while mode is NONE, uncaught state!");
return;
}
pd->selected = eina_list_append(pd->selected, ev->object);
efl_event_callback_call(obj, EFL_UI_EVENT_ITEM_SELECTED, ev->object);
}
static void
_unselected_cb(void *data, const Efl_Event *ev)
{
Eo *obj = data;
MY_DATA_GET(obj, pd);
pd->selected = eina_list_remove(pd->selected, ev->object);
efl_event_callback_call(obj, EFL_UI_EVENT_ITEM_UNSELECTED, ev->object);
}
static void
_invalidate_cb(void *data, const Efl_Event *ev)
{
Eo *obj = data;
MY_DATA_GET(obj, pd);
unregister_item(obj, pd, ev->object);
}
static void
_hints_changed_cb(void *data, const Efl_Event *ev)
{
Eo *obj = data;
MY_DATA_GET(obj, pd);
int idx = eina_list_data_idx(pd->items, ev->object);
efl_ui_position_manager_entity_item_size_changed(pd->pos_man, idx, idx);
}
static void
_redirect_cb(void *data, const Efl_Event *ev)
{
Eo *obj = data;
#define REDIRECT_EVT(item_evt, item) \
if (item_evt == ev->desc) efl_event_callback_call(obj, item, ev->object);
REDIRECT_EVT(EFL_UI_EVENT_PRESSED, EFL_UI_EVENT_ITEM_PRESSED);
REDIRECT_EVT(EFL_UI_EVENT_UNPRESSED, EFL_UI_EVENT_ITEM_UNPRESSED);
REDIRECT_EVT(EFL_UI_EVENT_LONGPRESSED, EFL_UI_EVENT_ITEM_LONGPRESSED);
REDIRECT_EVT(EFL_UI_EVENT_CLICKED_ANY, EFL_UI_EVENT_ITEM_CLICKED_ANY);
REDIRECT_EVT(EFL_UI_EVENT_CLICKED, EFL_UI_EVENT_ITEM_CLICKED);
#undef REDIRECT_EVT
}
EFL_CALLBACKS_ARRAY_DEFINE(active_item,
{EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _hints_changed_cb},
{EFL_UI_EVENT_ITEM_SELECTED, _selected_cb},
{EFL_UI_EVENT_ITEM_UNSELECTED, _unselected_cb},
{EFL_UI_EVENT_PRESSED, _redirect_cb},
{EFL_UI_EVENT_UNPRESSED, _redirect_cb},
{EFL_UI_EVENT_LONGPRESSED, _redirect_cb},
{EFL_UI_EVENT_CLICKED, _redirect_cb},
{EFL_UI_EVENT_CLICKED_ANY, _redirect_cb},
{EFL_EVENT_INVALIDATE, _invalidate_cb},
)
static Eina_Bool
register_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item)
{
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(item, EFL_UI_ITEM_CLASS), EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL(!!eina_list_data_find(pd->items, item), EINA_FALSE);
if (!efl_ui_widget_sub_object_add(obj, item))
return EINA_FALSE;
efl_ui_item_container_set(item, obj);
efl_canvas_group_member_add(pd->pan, item);
efl_event_callback_array_add(item, active_item(), obj);
efl_ui_mirrored_set(item, efl_ui_mirrored_get(obj));
return EINA_TRUE;
}
static Eina_Bool
unregister_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item)
{
Eina_List *elem = eina_list_data_find_list(pd->items, item);
if (!elem)
{
ERR("Item %p is not part of this widget", item);
return EINA_FALSE;
}
if (!efl_ui_widget_sub_object_del(obj, item))
return EINA_FALSE;
unsigned int id = eina_list_data_idx(pd->items, item);
if (pd->obj_accessor.last_index == id)
{
if (eina_list_next(elem))
{
pd->obj_accessor.current = eina_list_next(elem);
}
else if (eina_list_prev(elem))
{
pd->obj_accessor.last_index = id-1;
pd->obj_accessor.current = eina_list_prev(elem);
}
else
{
//everything >= length is invalid, and we need that.
pd->obj_accessor.last_index = eina_list_count(pd->items);
pd->obj_accessor.current = NULL;
}
}
pd->items = eina_list_remove(pd->items, item);
pd->selected = eina_list_remove(pd->selected, item);
efl_event_callback_array_del(item, active_item(), obj);
efl_ui_position_manager_entity_item_removed(pd->pos_man, id, item);
return EINA_TRUE;
}
static void
update_pos_man(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj)
{
int id = eina_list_data_idx(pd->items, subobj);
if (id == 0)
{
pd->obj_accessor.last_index = id;
pd->obj_accessor.current = pd->items;
}
efl_ui_position_manager_entity_item_added(pd->pos_man, id, subobj);
}
EOLIAN static Eina_Bool
_efl_ui_item_container_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd)
{
while(pd->items)
{
efl_del(pd->items->data);
}
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_item_container_efl_pack_unpack_all(Eo *obj, Efl_Ui_Item_Container_Data *pd)
{
while(pd->items)
{
if (!unregister_item(obj, pd, pd->items->data))
return EINA_FALSE;
}
return EINA_TRUE;
}
EOLIAN static Efl_Gfx_Entity*
_efl_ui_item_container_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Item_Container_Data *pd, int index)
{
Efl_Ui_Item *it = eina_list_nth(pd->items, index_adjust(pd, index));
EINA_SAFETY_ON_NULL_RETURN_VAL(it, NULL);
if (!unregister_item(obj, pd, it))
return NULL;
return it;
}
EOLIAN static Eina_Bool
_efl_ui_item_container_efl_pack_unpack(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj)
{
return unregister_item(obj, pd, subobj);
}
EOLIAN static Eina_Bool
_efl_ui_item_container_efl_pack_pack(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj)
{
return efl_pack_end(obj, subobj);
}
EOLIAN static Eina_Bool
_efl_ui_item_container_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj)
{
if (!register_item(obj, pd, subobj))
return EINA_FALSE;
pd->items = eina_list_append(pd->items, subobj);
update_pos_man(obj, pd, subobj);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_item_container_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj)
{
if (!register_item(obj, pd, subobj))
return EINA_FALSE;
pd->items = eina_list_prepend(pd->items, subobj);
update_pos_man(obj, pd, subobj);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_item_container_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing)
{
Eina_List *subobj_list = eina_list_data_find_list(pd->items, existing);
EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE);
if (!register_item(obj, pd, subobj))
return EINA_FALSE;
pd->items = eina_list_prepend_relative_list(pd->items, subobj, subobj_list);
update_pos_man(obj, pd, subobj);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_item_container_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing)
{
Eina_List *subobj_list = eina_list_data_find_list(pd->items, existing);
EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE);
if (!register_item(obj, pd, subobj))
return EINA_FALSE;
pd->items = eina_list_append_relative_list(pd->items, subobj, subobj_list);
update_pos_man(obj, pd, subobj);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_item_container_efl_pack_linear_pack_at(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj, int index)
{
Eina_List *subobj_list;
int clamp;
clamp = clamp_index(pd, index);
index = index_adjust(pd, index);
subobj_list = eina_list_nth_list(pd->items, index);
EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE);
if (!register_item(obj, pd, subobj))
return EINA_FALSE;
if (clamp == 0)
pd->items = eina_list_prepend_relative_list(pd->items, subobj, subobj_list);
else if (clamp == 1)
pd->items = eina_list_append(pd->items, subobj);
else
pd->items = eina_list_prepend(pd->items, subobj);
update_pos_man(obj, pd, subobj);
return EINA_TRUE;
}
EOLIAN static int
_efl_ui_item_container_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, const Efl_Gfx_Entity *subobj)
{
return eina_list_data_idx(pd->items, (void*)subobj);
}
EOLIAN static Efl_Gfx_Entity*
_efl_ui_item_container_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, int index)
{
return eina_list_nth(pd->items, index_adjust(pd, index));
}
static void
_pos_content_size_changed_cb(void *data, const Efl_Event *ev)
{
Eina_Size2D *size = ev->info;
MY_DATA_GET(data, pd);
efl_gfx_entity_size_set(pd->sizer, *size);
}
static void
_pos_content_min_size_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev)
{
Eina_Size2D *size = ev->info;
MY_DATA_GET(data, pd);
pd->content_min_size = *size;
flush_min_size(data, pd);
}
EFL_CALLBACKS_ARRAY_DEFINE(pos_manager_cbs,
{EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_SIZE_CHANGED, _pos_content_size_changed_cb},
{EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_MIN_SIZE_CHANGED, _pos_content_min_size_changed_cb},
)
EOLIAN static void
_efl_ui_item_container_position_manager_set(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Position_Manager_Entity *layouter)
{
if (layouter)
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(layouter, EFL_UI_POSITION_MANAGER_ENTITY_INTERFACE));
if (pd->pos_man)
{
efl_event_callback_array_del(pd->pos_man, pos_manager_cbs(), obj);
efl_ui_position_manager_entity_data_access_set(pd->pos_man, NULL, NULL, 0);
efl_del(pd->pos_man);
}
pd->pos_man = layouter;
if (pd->pos_man)
{
efl_parent_set(pd->pos_man, obj);
efl_event_callback_array_add(pd->pos_man, pos_manager_cbs(), obj);
efl_ui_position_manager_entity_data_access_set(pd->pos_man, &pd->obj_accessor.pass_on, &pd->size_accessor, eina_list_count(pd->items));
efl_ui_position_manager_entity_viewport_set(pd->pos_man, efl_ui_scrollable_viewport_geometry_get(obj));
efl_ui_layout_orientation_set(pd->pos_man, pd->dir);
}
}
EOLIAN static Efl_Ui_Position_Manager_Entity*
_efl_ui_item_container_position_manager_get(const Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd)
{
return pd->pos_man;
}
EOLIAN static Efl_Ui_Focus_Manager*
_efl_ui_item_container_efl_ui_widget_focus_manager_focus_manager_create(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *root)
{
return efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, obj,
efl_ui_focus_manager_root_set(efl_added, root));
}
EOLIAN static Eina_Bool
_efl_ui_item_container_efl_ui_widget_focus_state_apply(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect EINA_UNUSED)
{
return efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, obj);
}
EOLIAN static Efl_Ui_Focus_Object*
_efl_ui_item_container_efl_ui_focus_manager_move(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Focus_Direction direction)
{
Eo *new_obj, *focus;
Eina_Size2D step;
new_obj = efl_ui_focus_manager_move(efl_super(obj, MY_CLASS), direction);
focus = efl_ui_focus_manager_focus_get(obj);
step = efl_gfx_hint_size_min_get(focus);
if (!new_obj)
{
Eina_Rect pos = efl_gfx_entity_geometry_get(focus);
Eina_Rect view = efl_ui_scrollable_viewport_geometry_get(pd->smanager);
Eina_Position2D vpos = efl_ui_scrollable_content_pos_get(pd->smanager);
pos.x = pos.x + vpos.x - view.x;
pos.y = pos.y + vpos.y - view.y;
Eina_Position2D max = efl_ui_pan_position_max_get(pd->pan);
if (direction == EFL_UI_FOCUS_DIRECTION_RIGHT)
{
if (pos.x < max.x)
{
pos.x = MIN(max.x, pos.x + step.w);
efl_ui_scrollable_scroll(obj, pos, EINA_TRUE);
new_obj = focus;
}
}
else if (direction == EFL_UI_FOCUS_DIRECTION_LEFT)
{
if (pos.x > 0)
{
pos.x = MAX(0, pos.x - step.w);
efl_ui_scrollable_scroll(obj, pos, EINA_TRUE);
new_obj = focus;
}
}
else if (direction == EFL_UI_FOCUS_DIRECTION_UP)
{
if (pos.y > 0)
{
pos.y = MAX(0, pos.y - step.h);
efl_ui_scrollable_scroll(obj, pos, EINA_TRUE);
new_obj = focus;
}
}
else if (direction == EFL_UI_FOCUS_DIRECTION_DOWN)
{
if (pos.y < max.y)
{
pos.y = MAX(0, pos.y + step.h);
efl_ui_scrollable_scroll(obj, pos, EINA_TRUE);
new_obj = focus;
}
}
}
else
{
_item_scroll_internal(obj, pd, new_obj, .0, EINA_TRUE);
}
return new_obj;
}
#include "efl_ui_item_container.eo.c"

View File

@ -0,0 +1,94 @@
class @beta Efl.Ui.Item_Container extends Efl.Ui.Layout_Base implements
Efl.Ui.Scrollable_Interactive,
Efl.Ui.Scrollbar,
Efl.Pack_Linear, Efl.Pack_Layout,
Efl.Ui.Layout_Orientable,
Efl.Ui.Selectable,
Efl.Ui.Multi_Selectable,
Efl.Ui.Focus.Manager_Sub,
Efl.Ui.Widget_Focus_Manager
{
[[This widget displays a list of items in an arrangement controlled by an external $position_manager object. By using different $position_manager objects this widget can show lists of items or two-dimensional grids of items, for example.
Items inside this widget can be selected according to the $select_mode policy, and retrieved with $selected_items_get.
]]
event_prefix:efl_ui;
methods {
item_scroll {
[[Bring the passed item into the viewport.]]
params {
@in item: Efl.Ui.Item; [[The target to move in.]]
@in animation: bool; [[If you want to have an animation or not.]]
}
}
item_scroll_align {
[[Bring the passed item into the viewport, place the item accordingly to align in the viewport.
$align selects the final position of the object inside the viewport. 0.0 will move the object to the first visible position inside the viewport, 1.0 will move it to the last visible position, and values in between will move it accordingly to positions in between, along the scrolling axis.
]]
params {
@in item: Efl.Ui.Item; [[The target to move in.]]
@in align: double; [[0.0 to have this item at the upper or left side of the viewport, 1.0 to have this item at the lower or right side of the viewport]]
@in animation: bool; [[If you want to have an animation or not.]]
}
}
@property last_selected_item {
[[The item that was selected most recently.
]]
get {}
values {
item: Efl.Ui.Item; [[The latest selected item.]]
}
}
selected_items_get {
[[Get the selected items iterator. The iterator sequence will be decided by selection.]]
return: iterator<Efl.Ui.Item> @owned @no_unused; [[User has to free the iterator after usage.]]
}
@property position_manager {
[[Position manager object that handles placement of items.]]
values {
position_manager : Efl.Ui.Position_Manager.Entity @owned; [[The objects ownership is passed to the item container.]]
}
}
}
implements {
Efl.Object.constructor;
Efl.Object.finalize;
Efl.Object.destructor;
Efl.Object.invalidate;
Efl.Container.content_iterate;
Efl.Container.content_count;
Efl.Ui.Layout_Orientable.orientation { get; set; }
Efl.Ui.Widget.theme_apply;
Efl.Pack.pack_clear;
Efl.Pack.unpack_all;
Efl.Pack.unpack;
Efl.Pack.pack;
Efl.Pack_Linear.pack_end;
Efl.Pack_Linear.pack_begin;
Efl.Pack_Linear.pack_before;
Efl.Pack_Linear.pack_after;
Efl.Pack_Linear.pack_at;
Efl.Pack_Linear.pack_unpack_at;
Efl.Pack_Linear.pack_index_get;
Efl.Pack_Linear.pack_content_get;
Efl.Ui.Scrollable_Interactive.match_content { set; }
Efl.Ui.Multi_Selectable.select_mode {get; set;}
Efl.Ui.Widget_Focus_Manager.focus_manager_create;
Efl.Ui.Widget.focus_state_apply;
Efl.Ui.Focus.Manager.move;
}
events {
item,pressed : Efl.Ui.Item; [[A $press event occurred over an item.]]
item,unpressed : Efl.Ui.Item; [[A $unpress event occurred over an item.]]
item,longpressed : Efl.Ui.Item; [[A $longpressed event occurred over an item.]]
item,clicked : Efl.Ui.Item; [[A $clicked event occurred over an item.]]
item,clicked,any : Efl.Ui.Item; [[A $clicked,any event occurred over an item.]]
}
composite {
Efl.Ui.Scrollable_Interactive;
Efl.Ui.Scrollbar;
Efl.Ui.Focus.Manager;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,89 +1,9 @@
import efl_ui_list_item;
class @beta Efl.Ui.List extends Efl.Ui.Layout_Base implements
Efl.Ui.Scrollable_Interactive,
Efl.Ui.Scrollbar,
Efl.Pack_Linear, Efl.Pack_Layout,
Efl.Ui.Selectable,
Efl.Ui.Multi_Selectable,
Efl.Gfx.Arrangement
class @beta Efl.Ui.List extends Efl.Ui.Item_Container
{
[[Simple list widget with Pack interface.]]
methods {
item_scroll {
[[scroll move the item to show in the viewport.]]
params {
@in item: Efl.Ui.List_Item; [[Target item.]]
@in animation: bool; [[Boolean value for animation of scroll move.]]
}
}
item_scroll_align {
[[scroll move the item to show at the align position of the viewport.]]
params {
@in item: Efl.Ui.List_Item; [[Target item.]]
@in align: double; [[align value in Viewport.]]
@in animation: bool; [[Boolean value for animation of scroll move.]]
}
}
@property last_selected_item {
[[Property data of last selected item.]]
get {}
values {
return: Efl.Ui.List_Item; [[last selected item of list.]]
}
}
selected_items_get {
[[Get the selected items iterator. The iterator sequence will be decided by selection.]]
return: iterator<Efl.Ui.List_Item> @owned @no_unused; [[Iterator covered by selected items list.
user have to free the iterator after used.]]
}
}
implements {
//Efl.Object
Efl.Object.constructor;
Efl.Object.finalize;
Efl.Object.invalidate;
//Efl.Canvas
Efl.Canvas.Group.group_calculate;
//Efl.Container
Efl.Container.content_iterate;
Efl.Container.content_count;
//Efl.Ui.Layout_Orientable.orientation { get; set; } //TODO
//Efl.Ui.Widget
Efl.Ui.Widget.theme_apply;
//Efl.Ui.Focus
//Efl.Ui.Focus.Object.on_focus_update;
//Efl.Pack
Efl.Pack.pack_clear;
Efl.Pack.unpack_all;
Efl.Pack.unpack;
Efl.Pack.pack;
Efl.Pack_Linear.pack_begin;
Efl.Pack_Linear.pack_end;
Efl.Pack_Linear.pack_before;
Efl.Pack_Linear.pack_after;
Efl.Pack_Linear.pack_at;
Efl.Pack_Linear.pack_content_get;
Efl.Pack_Linear.pack_unpack_at;
Efl.Pack_Linear.pack_index_get;
Efl.Pack_Layout.layout_update;
Efl.Pack_Layout.layout_request;
Efl.Gfx.Arrangement.content_padding { get; set; }
//Efl.Ui.Scrollable
Efl.Ui.Scrollable_Interactive.match_content { set; }
//Efl.Ui.Multi_Selectable
Efl.Ui.Multi_Selectable.select_mode {get; set;}
}
composite {
Efl.Ui.Scrollable_Interactive;
Efl.Ui.Scrollbar;
}
}

View File

@ -1,63 +0,0 @@
#ifndef EFL_UI_LIST_PRIVATE_H
#define EFL_UI_LIST_PRIVATE_H
#include "Elementary.h"
typedef struct _Efl_Ui_List_Data
{
// Eo Objects
Eo *box; /* Internal box for Efl.Pack support */
Eo *pan; /* Internal pan for scroll */
Eo *smanager; /* Scroll Manager for support scroll with pan */
struct {
Efl_Ui_List_Item *item; /* Scroll target item */
double align; /* Item scroll aligned position.
-1 is for default case of scroll in */
Eina_Bool anim : 1; /* boolean data for animation on scroll */
} scroll; /* Item scroll values for deferred operation */
Eina_List *items; /* All item list for internal maintaining */
Eina_List *selected; /* Selected items list */
Efl_Ui_List_Item *last_selected; /* latest selected item */
Efl_Ui_Select_Mode select_mode; /* Select mode for items
with single or multiple seleciton */
// Boolean Data
Eina_Bool freeze_want : 1; /* Flag for Scroll freezing */
Eina_Bool match_content_w: 1; /* Flag for size matching on content width.
it will disable horizontal scroll */
Eina_Bool match_content_h: 1; /* Flag for size matching on content height.
it will disable vertical scroll */
Eina_Bool pan_resized : 1; /* Flag for pan resized.
This value is used for checking scroll is
calculated after initialized */
} Efl_Ui_List_Data;
typedef struct _Item_Iterator
{
Eina_Iterator iterator;
Eina_List *list;
Eina_Iterator *real_iterator;
Eo *object;
} Item_Iterator;
#define EFL_UI_LIST_DATA_GET(o, pd) \
Efl_Ui_List_Data * pd = efl_data_scope_safe_get(o, EFL_UI_LIST_CLASS)
#define EFL_UI_LIST_DATA_GET_OR_RETURN(o, ptr, ...) \
EFL_UI_LIST_DATA_GET(o, ptr); \
if (EINA_UNLIKELY(!ptr)) \
{ \
ERR("No widget data for object %p (%s)", \
o, evas_object_type_get(o)); \
return __VA_ARGS__; \
}
#define EFL_UI_LIST_CHECK(obj) \
if (EINA_UNLIKELY(!efl_isa((obj), EFL_UI_LIST_CLASS))) \
return
#endif

View File

@ -0,0 +1,14 @@
#ifdef HAVE_CONFIG_H
#include "elementary_config.h"
#endif
#define ELM_LAYOUT_PROTECTED
#define EFL_UI_SCROLL_MANAGER_PROTECTED
#define EFL_UI_SCROLLBAR_PROTECTED
#include <Efl_Ui.h>
#include "elm_priv.h"
#define MY_CLASS EFL_UI_POSITION_MANAGER_ENTITY_CLASS
#include "efl_ui_position_manager_entity.eo.c"

View File

@ -0,0 +1,96 @@
interface @beta Efl.Ui.Position_Manager.Entity extends Efl.Ui.Layout_Orientable
{
[[
This abstracts the basic placement of items in a not defined form under a viewport.
The interface gets a defined set of elements that is meant to be displayed. The implementation provides a way to calculate the size that is required to display all items. Every time this absolut size of items is changed, content_size,changed is called.
]]
methods {
@property data_access {
[[This gives access to items to be managed. The manager reads this information and modifies the retrieved items' positions and sizes.
$obj_access gives access to the graphical entitites to manage. Some of them might be NULL, meaning they are not yet ready to be displayed. Their size in the $size_access array will be correct, though, so other entities can still be positioned correctly.
Typically, only entities inside the viewport will be retrieved.
$size_access gives access to the 2D sizes for the items to manage. All sizes will always be valid, and might change over time (indicated through the @.item_size_changed method).
The whole range might need to be traversed in order to calculate the position of all items in some arrangements.
]]
set {
}
values {
obj_access : accessor<Efl.Gfx.Entity>; [[The accessor for canvas obejcts, even if the id is valid, the returned object may be NULL]]
size_access : accessor<Eina.Size2D>; [[Accessor for the size, returned values are always valid, but might be changed / updated]]
size : int; [[valid size for accessors, 0 <= i < size]]
}
}
@property viewport {
[[This is the position and size of the viewport, where elements are displayed in.
Entities outside this viewport will not be shown.]]
set {
}
values {
viewport : Eina.Rect;
}
}
@property scroll_position {
[[Move the items relative to the viewport.
The items that are managed with this position manager might be bigger than the actual viewport.
The positioning of the layer where all items are on is described by these values.
0.0,0.0 means that layer is moved that the top left items are shown,
1.0,1.0 means, that the lower right items are shown.
]]
set {
}
values {
x : double; [[X position of the scroller, valid form 0 to 1.0]]
y : double; [[Y position of the scroller, valid form 0 to 1.0]]
}
}
position_single_item {
[[Return the position and size of item idx
This method returns the size and position of the item at $idx.
Even if the item is outside the viewport, the returned rectangle must be valid. The result can be used for scrolling calculations.
]]
params {
idx : int; [[The id for the item]]
}
return : Eina.Rect; [[Position and Size in canvas coordinations]]
}
item_added {
[[The new item $subobj has been added at the $added_index field.
The accessor provided through @.data_access will contain updated Entities.]]
params {
added_index : int;
subobj : Efl.Gfx.Entity;
}
}
item_removed {
[[The item $subobj previously at position $removed_index has been removed.
The accessor provided through @.data_access will contain updated Entities.
]]
params {
removed_index : int;
subobj : Efl.Gfx.Entity;
}
}
item_size_changed {
[[The size of the items from $start_id to $end_id have been changed.
The positioning and sizing of all items will be updated]]
params {
start_id : int; [[The first item that has a new size]]
end_id : int; [[The last item that has a new size]]
}
}
}
events {
content_size,changed : Eina.Size2D; [[Emitted when the aggregate size of all items has changed. This can be used to resize an enclosing Pan object.]]
content_min_size,changed : Eina.Size2D; [[Emitted when the minimum size of all items has changed. The minimum size is the size, that this position_manager needs at *least* to display a single item.]]
}
}

View File

@ -0,0 +1,321 @@
#ifdef HAVE_CONFIG_H
#include "elementary_config.h"
#endif
#include <Efl_Ui.h>
#include <Elementary.h>
#include "elm_widget.h"
#include "elm_priv.h"
#define MY_CLASS EFL_UI_POSITION_MANAGER_GRID_CLASS
#define MY_DATA_GET(obj, pd) \
Efl_Ui_Position_Manager_Grid_Data *pd = efl_data_scope_get(obj, MY_CLASS);
typedef struct {
Eina_Accessor *content_acc, *size_acc;
unsigned int size;
Eina_Rect viewport;
Eina_Vector2 scroll_position;
Efl_Ui_Layout_Orientation dir;
struct {
unsigned int start_id, end_id;
} prev_run;
Eina_Size2D max_min_size;
Eina_Size2D last_viewport_size;
Eina_Size2D prev_min_size;
struct {
int columns;
int rows;
} current_display_table;
} Efl_Ui_Position_Manager_Grid_Data;
static inline void
vis_change_segment(Efl_Ui_Position_Manager_Grid_Data *pd, int a, int b, Eina_Bool flag)
{
for (int i = MIN(a, b); i < MAX(a, b); ++i)
{
Efl_Gfx_Entity *ent;
EINA_SAFETY_ON_FALSE_RETURN(eina_accessor_data_get(pd->content_acc, i, (void**) &ent));
if (ent && !efl_ui_focus_object_focus_get(ent))
{
efl_gfx_entity_visible_set(ent, flag);
}
}
}
static void
_reposition_content(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd)
{
Eina_Size2D space_size;
int relevant_space_size, relevant_viewport;
unsigned int start_id, end_id, step;
if (!pd->size) return;
if (pd->max_min_size.w <= 0 || pd->max_min_size.h <= 0) return;
if (pd->current_display_table.columns <= 0 || pd->current_display_table.rows <= 0) return;
//space size contains the amount of space that is outside the viewport (either to the top or to the left)
space_size.w = (MAX(pd->last_viewport_size.w - pd->viewport.w, 0))*pd->scroll_position.x;
space_size.h = (MAX(pd->last_viewport_size.h - pd->viewport.h, 0))*pd->scroll_position.y;
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
relevant_space_size = space_size.h;
relevant_viewport = pd->viewport.h;
step = pd->max_min_size.h;
}
else
{
relevant_space_size = space_size.w;
relevant_viewport = pd->viewport.w;
step = pd->max_min_size.w;
}
start_id = MIN((MAX(relevant_space_size,0) / step)*pd->current_display_table.columns, pd->size);
end_id = MIN((((MAX(relevant_space_size,0) + relevant_viewport + step) / step)*pd->current_display_table.columns)+1, pd->size);
EINA_SAFETY_ON_FALSE_RETURN(start_id <= end_id);
EINA_SAFETY_ON_FALSE_RETURN(start_id <= pd->size);
//to performance optimize the whole widget, we are setting the objects that are outside the viewport to visibility false
//The code below ensures that things outside the viewport are always hidden, and things inside the viewport are visible
if (end_id < pd->prev_run.start_id || start_id > pd->prev_run.end_id)
{
//it is important to first make the segment visible here, and then hide the rest
//otherwise we get a state where item_container has 0 subchildren, which triggers a lot of focus logic.
vis_change_segment(pd, start_id, end_id, EINA_TRUE);
vis_change_segment(pd, pd->prev_run.start_id, pd->prev_run.end_id, EINA_FALSE);
}
else
{
vis_change_segment(pd, pd->prev_run.start_id, start_id, (pd->prev_run.start_id > start_id));
vis_change_segment(pd, pd->prev_run.end_id, end_id, (pd->prev_run.end_id < end_id));
}
for (unsigned int i = start_id; i < end_id; ++i)
{
Eina_Rect geom;
Efl_Gfx_Entity *ent;
geom.size = pd->max_min_size;
geom.pos = pd->viewport.pos;
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
geom.x += pd->max_min_size.w*(i%pd->current_display_table.columns);
geom.y += pd->max_min_size.h*(i/pd->current_display_table.columns);
geom.y -= (relevant_space_size);
}
else
{
geom.x += pd->max_min_size.w*(i/pd->current_display_table.columns);
geom.y += pd->max_min_size.h*(i%pd->current_display_table.columns);
geom.x -= (relevant_space_size);
}
EINA_SAFETY_ON_FALSE_RETURN(eina_accessor_data_get(pd->content_acc, i, (void**) &ent));
//printf(">%d (%d, %d, %d, %d) %p\n", i, geom.x, geom.y, geom.w, geom.h, ent);
efl_gfx_entity_geometry_set(ent, geom);
}
pd->prev_run.start_id = start_id;
pd->prev_run.end_id = end_id;
}
static inline void
_flush_abs_size(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd)
{
int minor, major;
Eina_Size2D vp_size;
if (!pd->size) return;
if (pd->max_min_size.w <= 0 || pd->max_min_size.h <= 0) return;
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
major = pd->viewport.w/pd->max_min_size.w;
pd->current_display_table.columns = major;
}
else
{
major = pd->viewport.h/pd->max_min_size.h;
pd->current_display_table.columns = major;
}
if (major <= 0) return;
minor = ceil((double)pd->size/(double)major);
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
pd->current_display_table.rows = minor;
else
pd->current_display_table.rows = minor;
/*
* calculate how much size we need with major in the given orientation.
* The
*/
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
vp_size.w = pd->viewport.w;
vp_size.h = minor*pd->max_min_size.h;
}
else
{
vp_size.h = pd->viewport.h;
vp_size.w = minor*pd->max_min_size.w;
}
if (vp_size.h != pd->last_viewport_size.h || vp_size.w != pd->last_viewport_size.w)
{
pd->last_viewport_size = vp_size;
efl_event_callback_call(obj, EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_SIZE_CHANGED, &vp_size);
}
}
static inline void
_update_min_size(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, int added_index)
{
Eina_Size2D elemsize;
EINA_SAFETY_ON_FALSE_RETURN(eina_accessor_data_get(pd->size_acc, added_index, (void*)&elemsize));
pd->max_min_size.w = MAX(pd->max_min_size.w, elemsize.w);
pd->max_min_size.h = MAX(pd->max_min_size.h, elemsize.h);
}
static inline void
_flush_min_size(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd)
{
Eina_Size2D min_size = pd->max_min_size;
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
min_size.h = -1;
else
min_size.w = -1;
if (pd->prev_min_size.w != min_size.w || pd->prev_min_size.h != min_size.h)
{
pd->prev_min_size = min_size;
efl_event_callback_call(obj, EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_MIN_SIZE_CHANGED, &min_size);
}
}
EOLIAN static void
_efl_ui_position_manager_grid_efl_ui_position_manager_entity_data_access_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, Eina_Accessor *obj_access, Eina_Accessor *size_access, int size)
{
pd->size_acc = size_access;
pd->content_acc = obj_access;
pd->size = size;
}
EOLIAN static void
_efl_ui_position_manager_grid_efl_ui_position_manager_entity_viewport_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, Eina_Rect viewport)
{
pd->viewport = viewport;
_flush_abs_size(obj, pd);
_reposition_content(obj, pd);
}
EOLIAN static void
_efl_ui_position_manager_grid_efl_ui_position_manager_entity_scroll_position_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, double x, double y)
{
pd->scroll_position.x = x;
pd->scroll_position.y = y;
_reposition_content(obj, pd);
}
EOLIAN static void
_efl_ui_position_manager_grid_efl_ui_position_manager_entity_item_added(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd, int added_index, Efl_Gfx_Entity *subobj EINA_UNUSED)
{
pd->size ++;
efl_gfx_entity_visible_set(subobj, EINA_FALSE);
_update_min_size(obj, pd, added_index);
_flush_min_size(obj, pd);
_flush_abs_size(obj, pd);
_reposition_content(obj, pd); //FIXME we might can skip that
}
EOLIAN static void
_efl_ui_position_manager_grid_efl_ui_position_manager_entity_item_removed(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, int removed_index EINA_UNUSED, Efl_Gfx_Entity *subobj EINA_UNUSED)
{
EINA_SAFETY_ON_FALSE_RETURN(pd->size > 0);
pd->size --;
pd->prev_run.start_id = MIN(pd->prev_run.start_id, pd->size);
pd->prev_run.end_id = MIN(pd->prev_run.end_id, pd->size);
//we ignore here that we might loose the item giving the current max min size
_flush_abs_size(obj, pd);
_reposition_content(obj, pd); //FIXME we might can skip that
efl_gfx_entity_visible_set(subobj, EINA_TRUE);
}
EOLIAN static void
_efl_ui_position_manager_grid_efl_ui_position_manager_entity_item_size_changed(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd, int start_id, int end_id)
{
for (int i = start_id; i <= end_id; ++i)
{
_update_min_size(obj, pd, i);
}
_flush_min_size(obj, pd);
_flush_abs_size(obj, pd);
_reposition_content(obj, pd); //FIXME we could check if this is needed or not
}
EOLIAN static void
_efl_ui_position_manager_grid_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, Efl_Ui_Layout_Orientation dir)
{
pd->dir = dir;
_flush_min_size(obj, pd);
_flush_abs_size(obj, pd);
_reposition_content(obj, pd); //FIXME we could check if this is needed or not
}
EOLIAN static Efl_Ui_Layout_Orientation
_efl_ui_position_manager_grid_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd)
{
return pd->dir;
}
EOLIAN static Eina_Rect
_efl_ui_position_manager_grid_efl_ui_position_manager_entity_position_single_item(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, int idx)
{
Eina_Rect geom;
Eina_Size2D space_size;
unsigned int relevant_space_size;
if (!pd->size) return EINA_RECT(0, 0, 0, 0);
if (pd->max_min_size.w <= 0 || pd->max_min_size.h <= 0) return EINA_RECT(0, 0, 0, 0);
if (pd->current_display_table.columns <= 0 || pd->current_display_table.rows <= 0) return EINA_RECT(0, 0, 0, 0);
//space size contains the amount of space that is outside the viewport (either to the top or to the left)
space_size.w = (MAX(pd->last_viewport_size.w - pd->viewport.w, 0))*pd->scroll_position.x;
space_size.h = (MAX(pd->last_viewport_size.h - pd->viewport.h, 0))*pd->scroll_position.y;
EINA_SAFETY_ON_FALSE_RETURN_VAL(space_size.w >= 0 && space_size.h >= 0, EINA_RECT(0, 0, 0, 0));
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
relevant_space_size = space_size.h;
}
else
{
relevant_space_size = space_size.w;
}
geom.size = pd->max_min_size;
geom.pos = pd->viewport.pos;
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
geom.x += pd->max_min_size.w*(idx%pd->current_display_table.columns);
geom.y += pd->max_min_size.h*(idx/pd->current_display_table.columns);
geom.y -= (relevant_space_size);
}
else
{
geom.x += pd->max_min_size.w*(idx/pd->current_display_table.columns);
geom.y += pd->max_min_size.h*(idx%pd->current_display_table.columns);
geom.x -= (relevant_space_size);
}
return geom;
}
#include "efl_ui_position_manager_grid.eo.c"

View File

@ -0,0 +1,17 @@
class @beta Efl.Ui.Position_Manager.Grid extends Efl.Object implements Efl.Ui.Position_Manager.Entity
{
[[Implementation of @Efl.Ui.Position_Manager.Entity for two-dimensional grids.
Every item in the grid has the same size, which is the biggest minimum size of all items.
]]
implements {
Efl.Ui.Position_Manager.Entity.data_access {set;}
Efl.Ui.Position_Manager.Entity.viewport {set;}
Efl.Ui.Position_Manager.Entity.scroll_position {set;}
Efl.Ui.Position_Manager.Entity.item_added;
Efl.Ui.Position_Manager.Entity.item_removed;
Efl.Ui.Position_Manager.Entity.position_single_item;
Efl.Ui.Position_Manager.Entity.item_size_changed;
Efl.Ui.Layout_Orientable.orientation {set; get;}
}
}

View File

@ -0,0 +1,389 @@
#ifdef HAVE_CONFIG_H
#include "elementary_config.h"
#endif
#include <Efl_Ui.h>
#include <Elementary.h>
#include "elm_widget.h"
#include "elm_priv.h"
#define MY_CLASS EFL_UI_POSITION_MANAGER_LIST_CLASS
#define MY_DATA_GET(obj, pd) \
Efl_Ui_Position_Manager_List_Data *pd = efl_data_scope_get(obj, MY_CLASS);
typedef struct {
Eina_Accessor *content_acc, *size_acc;
unsigned int size;
Eina_Future *rebuild_absolut_size;
Eina_Rect viewport;
Eina_Size2D abs_size;
Eina_Vector2 scroll_position;
Efl_Ui_Layout_Orientation dir;
int *size_cache;
int average_item_size;
int maximum_min_size;
struct {
unsigned int start_id, end_id;
} prev_run;
} Efl_Ui_Position_Manager_List_Data;
/*
* The here used cache is a sum map
* Every element in the cache contains the sum of the previous element, and the size of the current item
* This is usefull as a lookup of all previous items is O(1).
* The tradeoff that makes the cache performant here is, that we only need to walk the whole list of items once in the beginning.
* Every other walk of the items is at max the maximum number of items you get into the maximum distance between the average item size and a actaul item size.
*/
static void
cache_require(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd)
{
unsigned int i;
if (pd->size_cache) return;
if (pd->size == 0)
{
pd->size_cache = NULL;
pd->average_item_size = 0;
return;
}
pd->size_cache = calloc(pd->size + 1, sizeof(int));
pd->size_cache[0] = 0;
pd->maximum_min_size = 0;
for (i = 0; i < pd->size; ++i)
{
Eina_Size2D size;
int step;
int min;
eina_accessor_data_get(pd->size_acc, i, (void**) &size);
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
step = size.h;
min = size.w;
}
else
{
step = size.w;
min = size.h;
}
pd->size_cache[i + 1] = pd->size_cache[i] + step;
pd->maximum_min_size = MAX(pd->maximum_min_size, min);
}
pd->average_item_size = pd->size_cache[pd->size]/pd->size;
}
static void
cache_invalidate(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd)
{
if (pd->size_cache)
free(pd->size_cache);
pd->size_cache = NULL;
}
static inline int
cache_access(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, unsigned int idx)
{
EINA_SAFETY_ON_FALSE_RETURN_VAL(idx <= pd->size, 0);
return pd->size_cache[idx];
}
static void
recalc_absolut_size(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd)
{
Eina_Size2D min_size = EINA_SIZE2D(-1, -1);
cache_require(obj, pd);
pd->abs_size = pd->viewport.size;
if (pd->size)
{
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
pd->abs_size.h = MAX(cache_access(obj, pd, pd->size), pd->abs_size.h);
else
pd->abs_size.w = MAX(cache_access(obj, pd, pd->size), pd->abs_size.w);
}
efl_event_callback_call(obj, EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_SIZE_CHANGED, &pd->abs_size);
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
min_size.w = pd->maximum_min_size;
}
else
{
min_size.h = pd->maximum_min_size;
}
efl_event_callback_call(obj, EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_MIN_SIZE_CHANGED, &min_size);
}
static inline void
vis_change_segment(Efl_Ui_Position_Manager_List_Data *pd, int a, int b, Eina_Bool flag)
{
for (int i = MIN(a, b); i < MAX(a, b); ++i)
{
Efl_Gfx_Entity *ent = NULL;
eina_accessor_data_get(pd->content_acc, i, (void**) &ent);
if (ent && !efl_ui_focus_object_focus_get(ent))
{
efl_gfx_entity_visible_set(ent, flag);
}
}
}
static void
position_content(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd)
{
Eina_Rect geom;
Eina_Size2D space_size;
unsigned int start_id = 0, end_id = 0, i;
int relevant_space_size, relevant_viewport;
if (!pd->size) return;
if (pd->average_item_size <= 0) return;
//space size contains the amount of space that is outside the viewport (either to the top or to the left)
space_size.w = (MAX(pd->abs_size.w - pd->viewport.w, 0))*pd->scroll_position.x;
space_size.h = (MAX(pd->abs_size.h - pd->viewport.h, 0))*pd->scroll_position.y;
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
relevant_space_size = space_size.h;
relevant_viewport = pd->viewport.h;
}
else
{
relevant_space_size = space_size.w;
relevant_viewport = pd->viewport.w;
}
//based on the average item size, we jump somewhere into the sum cache.
//After beeing in there, we are walking back, until we have less space then viewport size
start_id = MIN((unsigned int)(relevant_space_size / pd->average_item_size), pd->size);
for (; cache_access(obj, pd, start_id) >= relevant_space_size && start_id > 0; start_id --) { }
//starting on the start id, we are walking down until the sum of elements is bigger than the lower part of the viewport.
end_id = start_id;
for (; end_id <= pd->size && cache_access(obj, pd, end_id) <= relevant_space_size + relevant_viewport ; end_id ++) { }
end_id = MAX(end_id, start_id + 1);
end_id = MIN(end_id, pd->size);
#ifdef DEBUG
printf("space_size %d : starting point : %d : cached_space_starting_point %d end point : %d cache_space_end_point %d\n", space_size.h, start_id, pd->size_cache[start_id], end_id, pd->size_cache[end_id]);
#endif
if (relevant_space_size > 0)
EINA_SAFETY_ON_FALSE_RETURN(cache_access(obj, pd, start_id) <= relevant_space_size);
if (end_id != pd->size)
EINA_SAFETY_ON_FALSE_RETURN(cache_access(obj, pd, end_id) >= relevant_space_size + relevant_viewport);
EINA_SAFETY_ON_FALSE_RETURN(start_id <= end_id);
//to performance optimize the whole widget, we are setting the objects that are outside the viewport to visibility false
//The code below ensures that things outside the viewport are always hidden, and things inside the viewport are visible
if (end_id <= pd->prev_run.start_id || start_id >= pd->prev_run.end_id)
{
//it is important to first make the segment visible here, and then hide the rest
//otherwise we get a state where item_container has 0 subchildren, which triggers a lot of focus logic.
vis_change_segment(pd, start_id, end_id, EINA_TRUE);
vis_change_segment(pd, pd->prev_run.start_id, pd->prev_run.end_id, EINA_FALSE);
}
else
{
vis_change_segment(pd, pd->prev_run.start_id, start_id, (pd->prev_run.start_id > start_id));
vis_change_segment(pd, pd->prev_run.end_id, end_id, (pd->prev_run.end_id < end_id));
}
geom = pd->viewport;
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
geom.y -= (relevant_space_size - cache_access(obj, pd, start_id));
else
geom.x -= (relevant_space_size - cache_access(obj, pd, start_id));
for (i = start_id; i < end_id; ++i)
{
Eina_Size2D size;
Efl_Gfx_Entity *ent = NULL;
EINA_SAFETY_ON_FALSE_RETURN(eina_accessor_data_get(pd->size_acc, i, (void**) &size));
EINA_SAFETY_ON_FALSE_RETURN(eina_accessor_data_get(pd->content_acc, i, (void**) &ent));
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
geom.h = size.h;
else
geom.w = size.w;
if (ent)
efl_gfx_entity_geometry_set(ent, geom);
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
geom.y += size.h;
else
geom.x += size.w;
}
pd->prev_run.start_id = start_id;
pd->prev_run.end_id = end_id;
}
static Eina_Value
_rebuild_job_cb(void *data, Eina_Value v EINA_UNUSED, const Eina_Future *f EINA_UNUSED)
{
MY_DATA_GET(data, pd);
if (!efl_alive_get(data)) return EINA_VALUE_EMPTY;
cache_require(data, pd);
recalc_absolut_size(data, pd);
position_content(data, pd);
pd->rebuild_absolut_size = NULL;
return EINA_VALUE_EMPTY;
}
static void
schedule_recalc_absolut_size(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd)
{
if (pd->rebuild_absolut_size) return;
pd->rebuild_absolut_size = efl_loop_job(efl_app_main_get());
eina_future_then(pd->rebuild_absolut_size, _rebuild_job_cb, obj);
}
EOLIAN static void
_efl_ui_position_manager_list_efl_ui_position_manager_entity_data_access_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, Eina_Accessor *content_access, Eina_Accessor *size_access, int size)
{
cache_invalidate(obj, pd);
pd->content_acc = content_access;
pd->size_acc = size_access;
pd->size = size;
}
EOLIAN static void
_efl_ui_position_manager_list_efl_ui_position_manager_entity_viewport_set(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, Eina_Rect size)
{
pd->viewport = size;
recalc_absolut_size(obj, pd);
position_content(obj, pd);
}
EOLIAN static void
_efl_ui_position_manager_list_efl_ui_position_manager_entity_scroll_position_set(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, double x, double y)
{
pd->scroll_position.x = x;
pd->scroll_position.y = y;
position_content(obj, pd);
}
EOLIAN static void
_efl_ui_position_manager_list_efl_ui_position_manager_entity_item_added(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, int added_index EINA_UNUSED, Efl_Gfx_Entity *subobj)
{
if (pd->size == 0)
{
pd->prev_run.start_id = 0;
pd->prev_run.end_id = 0;
}
pd->size ++;
if (subobj)
{
efl_gfx_entity_visible_set(subobj, EINA_FALSE);
}
cache_invalidate(obj, pd);
schedule_recalc_absolut_size(obj, pd);
}
EOLIAN static void
_efl_ui_position_manager_list_efl_ui_position_manager_entity_item_removed(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, int removed_index EINA_UNUSED, Efl_Gfx_Entity *subobj)
{
pd->size --;
if (subobj)
{
efl_gfx_entity_visible_set(subobj, EINA_TRUE);
}
cache_invalidate(obj, pd);
schedule_recalc_absolut_size(obj, pd);
}
EOLIAN static Eina_Rect
_efl_ui_position_manager_list_efl_ui_position_manager_entity_position_single_item(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, int idx)
{
Eina_Rect geom;
Eina_Size2D space_size;
int relevant_space_size;
Eina_Size2D size;
if (!pd->size) return EINA_RECT(0,0,0,0);
//space size contains the amount of space that is outside the viewport (either to the top or to the left)
space_size.w = (MAX(pd->abs_size.w - pd->viewport.w, 0))*pd->scroll_position.x;
space_size.h = (MAX(pd->abs_size.h - pd->viewport.h, 0))*pd->scroll_position.y;
EINA_SAFETY_ON_FALSE_RETURN_VAL(space_size.w >= 0 && space_size.h >= 0, EINA_RECT(0, 0, 0, 0));
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
relevant_space_size = space_size.h;
}
else
{
relevant_space_size = space_size.w;
}
geom = pd->viewport;
eina_accessor_data_get(pd->size_acc, idx, (void**)&size);
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
geom.y -= (relevant_space_size - cache_access(obj, pd, idx));
geom.h = size.h;
}
else
{
geom.x -= (relevant_space_size - cache_access(obj, pd, idx));
geom.w = size.w;
}
return geom;
}
EOLIAN static void
_efl_ui_position_manager_list_efl_ui_position_manager_entity_item_size_changed(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, int start_id EINA_UNUSED, int end_id EINA_UNUSED)
{
cache_invalidate(obj, pd);
schedule_recalc_absolut_size(obj, pd);
}
EOLIAN static void
_efl_ui_position_manager_list_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, Efl_Ui_Layout_Orientation dir)
{
pd->dir = dir;
//in order to reset the state of the visible items, just hide everything and set the old segment accordingly
vis_change_segment(pd, pd->prev_run.start_id, pd->prev_run.end_id, EINA_FALSE);
pd->prev_run.start_id = 0;
pd->prev_run.end_id = 0;
cache_invalidate(obj, pd);
cache_require(obj,pd);
recalc_absolut_size(obj, pd);
position_content(obj, pd);
}
EOLIAN static Efl_Ui_Layout_Orientation
_efl_ui_position_manager_list_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd)
{
return pd->dir;
}
EOLIAN static void
_efl_ui_position_manager_list_efl_object_destructor(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd)
{
if (pd->rebuild_absolut_size)
eina_future_cancel(pd->rebuild_absolut_size);
efl_destructor(efl_super(obj, MY_CLASS));
}
#include "efl_ui_position_manager_list.eo.c"

View File

@ -0,0 +1,18 @@
class @beta Efl.Ui.Position_Manager.List extends Efl.Object implements Efl.Ui.Position_Manager.Entity
{
[[Implementation of @Efl.Ui.Position_Manager.Entity for a list
Every item in the list will get at least his minsize applied, changes to the misize are listend to and change the layouting of all items. This supports the vertical and horizontal orientation.
]]
implements {
Efl.Object.destructor;
Efl.Ui.Position_Manager.Entity.data_access {set;}
Efl.Ui.Position_Manager.Entity.viewport {set;}
Efl.Ui.Position_Manager.Entity.scroll_position {set;}
Efl.Ui.Position_Manager.Entity.item_added;
Efl.Ui.Position_Manager.Entity.item_removed;
Efl.Ui.Position_Manager.Entity.position_single_item;
Efl.Ui.Position_Manager.Entity.item_size_changed;
Efl.Ui.Layout_Orientable.orientation {set; get;}
}
}

View File

@ -971,6 +971,7 @@ elm_textpath_circle_set(Eo *obj, double x, double y, double radius, double start
double sweep_length;
EFL_UI_TEXTPATH_DATA_GET(obj, pd);
if (!pd) return;
if (pd->circle.x == x && pd->circle.y == y &&
pd->circle.radius == radius &&

View File

@ -1,6 +1,6 @@
enum @beta Efl.Ui.Win_Type
{
[[Defines the types of window that can be created
[[Defines the types of window that can be created.
These are hints set on a window so that a running Window Manager knows
how the window should be handled and/or what kind of decorations it
@ -9,7 +9,7 @@ enum @beta Efl.Ui.Win_Type
Currently, only the X11 backed engines use them.
]]
unknown = -1, [[Default, unknown, type]]
unknown = -1, [[Default, unknown type.]]
basic, [[A normal window. Indicates a normal, top-level window. Almost every
window will be created with this type.]]
dialog_basic, [[Used for simple dialog windows.]]
@ -17,23 +17,23 @@ enum @beta Efl.Ui.Win_Type
desktop icons.]]
dock, [[The window is used as a dock or panel. Usually would be kept on top
of any other window by the Window Manager.]]
toolbar, [[The window is used to hold a floating toolbar, or similar.]]
menu, [[Similar to @.toolbar.]]
toolbar, [[The window is used to hold a floating toolbar or similar.]]
menu, [[Similar to @Efl.Ui.Win_Type.toolbar.]]
utility, [[A persistent utility window, like a toolbox or palette.]]
splash, [[Splash window for a starting up application.]]
dropdown_menu, [[The window is a dropdown menu, as when an entry in a
menubar is clicked.
This hint exists for completion only, as the EFL way of
menu bar is clicked.
This hint exists for completeness' sake, as the EFL way of
implementing a menu would not normally use a separate
window for its contents.]]
popup_menu, [[Like @.dropdown_menu, but for the menu triggered by
popup_menu, [[Like @Efl.Ui.Win_Type.dropdown_menu, but for the menu triggered by
right-clicking an object.]]
tooltip, [[The window is a tooltip. A short piece of explanatory text that
typically appear after the mouse cursor hovers over an object
for a while. Typically not very commonly used in the EFL.]]
for a while. Not commonly used in the EFL.]]
notification, [[A notification window, like a warning about battery life or
a new E-Mail received.]]
combo, [[A window holding the contents of a combo box. Not usually used in
combo, [[A window holding the contents of a combo box. Not commonly used in
the EFL.]]
dnd, [[Internal use.]]
inlined_image, [[Internal use.]]
@ -73,27 +73,27 @@ enum @beta Efl.Ui.Win_Keyboard_Mode
enum Efl.Ui.Win_Indicator_Mode
{
[[Defines the type indicator that can be shown
[[Defines the type indicator that can be shown.
@since 1.22
]]
off, [[Request to deactivate the indicator]]
off, [[Request to deactivate the indicator.]]
bg_opaque, [[The indicator icon is opaque, as is the indicator background.
The content of window is located at the end of the indicator.
The area of indicator and window content are not overlapped]]
The area of indicator and window content are not overlapped.]]
bg_transparent, [[The icon of indicator is opaque, but the background is transparent.
The content of window is located under the indicator in Z-order.
The area of indicator and window content are overlapped]]
The area of indicator and window content are overlapped.]]
hidden [[The indicator is hidden so user can see only the content of window such as in video mode.
If user flicks the upper side of window, the indicator is shown temporarily.]]
}
enum @beta Efl.Ui.Win_Modal_Mode
{
[[Defines the mode of a modal window]]
[[Defines the mode of a modal window.]]
none, [[The window is not modal window.]]
modal [[The window is modal window.]]
none, [[The window is not a modal window.]]
modal [[The window is a modal window.]]
}
enum @beta Efl.Ui.Win_Urgent_Mode
@ -106,7 +106,7 @@ enum @beta Efl.Ui.Win_Urgent_Mode
enum Efl.Ui.Win_Move_Resize_Mode
{
[[Define the move or resize mode of window.
[[Define the move or resize mode of a window.
The user can request the display server to start moving or resizing
the window by combining these modes. However only limited combinations
@ -140,7 +140,7 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
Efl.Text, Efl.Config,
Efl.Ui.Widget_Focus_Manager, Efl.Ui.Focus.Manager_Window_Root
{
[[Efl UI window class
[[Efl UI window class.
@since 1.22
]]

View File

@ -1285,10 +1285,7 @@ _elm_interface_scrollable_content_viewport_geometry_get(const Eo *obj EINA_UNUSE
{
if (!sid->pan_obj || !sid->edje_obj) return;
/* we want to trigger any pending edje recalcs here but we don't strictly need to
* trigger one if it isn't necessary
*/
efl_canvas_group_calculate(sid->edje_obj);
edje_object_calc_force(sid->edje_obj);
evas_object_geometry_get(sid->pan_obj, x, y, w, h);
}

View File

@ -182,6 +182,10 @@ pub_eo_files = [
'efl_ui_clickable.eo',
'efl_ui_clickable_util.eo',
'efl_ui_format.eo',
'efl_ui_item_container.eo',
'efl_ui_position_manager_entity.eo',
'efl_ui_position_manager_list.eo',
'efl_ui_position_manager_grid.eo',
]
foreach eo_file : pub_eo_files
@ -353,9 +357,7 @@ elementary_headers_unstable = [
'efl_ui_video_private.h',
'efl_ui_item_private.h',
'efl_ui_list_item_private.h',
'efl_ui_list_private.h',
'efl_ui_grid_item_private.h',
'efl_ui_grid_private.h',
'efl_ui_list_view_private.h',
'efl_ui_list_view_seg_array.h',
'elm_widget_web.h',
@ -944,6 +946,10 @@ elementary_src = [
'efl_ui_clickable_util.c',
'efl_ui_format.c',
'efl_ui_scroll_util.c',
'efl_ui_item_container.c',
'efl_ui_position_manager_entity.c',
'efl_ui_position_manager_list.c',
'efl_ui_position_manager_grid.c',
]
elementary_deps = [emile, eo, efl, edje, ethumb, ethumb_client, emotion, ecore_imf, ecore_con, eldbus, efreet, efreet_mime, efreet_trash, eio, atspi, dl, intl]

View File

@ -32,6 +32,9 @@ static const Efl_Test_Case etc[] = {
{ "efl_ui_win", efl_ui_test_win },
{ "efl_ui_spin", efl_ui_test_spin },
{ "efl_ui_spin_button", efl_ui_test_spin_button },
{ "efl_ui_item_container", efl_ui_test_item_container },
{ "efl_ui_grid_container", efl_ui_test_grid_container },
{ "efl_ui_list_container", efl_ui_test_list_container },
{ NULL, NULL }
};

View File

@ -43,6 +43,9 @@ void efl_ui_test_slider(TCase *tc);
void efl_ui_test_win(TCase *tc);
void efl_ui_test_spin(TCase *tc);
void efl_ui_test_spin_button(TCase *tc);
void efl_ui_test_item_container(TCase *tc);
void efl_ui_test_list_container(TCase *tc);
void efl_ui_test_grid_container(TCase *tc);
void loop_timer_interval_set(Eo *obj, double in);

View File

@ -17,7 +17,6 @@ grid_setup()
grid = efl_add(EFL_UI_GRID_CLASS, win);
efl_ui_grid_item_size_set(grid, EINA_SIZE2D(100, 100));
efl_gfx_entity_size_set(grid, EINA_SIZE2D(500, 50));
efl_gfx_entity_size_set(win, EINA_SIZE2D(500, 50));
efl_gfx_entity_visible_set(win, EINA_TRUE);
@ -31,6 +30,7 @@ grid_item_pack(Eo *grid, int count, Eina_List **l)
for (i = 0; i < count; i++)
{
item = efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, grid);
efl_gfx_hint_size_min_set(item, EINA_SIZE2D(100, 100));
if (!item) return EINA_FALSE;
if (l) *l = eina_list_append(*l, item);
efl_pack(grid, item);
@ -282,14 +282,14 @@ EFL_START_TEST(efl_ui_grid_scroll)
ck_assert(grid_item_pack(grid, 100, NULL) != EINA_FALSE);
item = efl_pack_content_get(grid, 50);
timer = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
timer = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, grid_timer_cb, NULL),
efl_loop_timer_loop_reset(efl_added),
efl_loop_timer_interval_set(efl_added, 3.0));
efl_event_callback_array_add(grid, grid_scroll_callbacks(), timer);
/*FIXME: efl_ui_scroll_interface only emit scroll event when animation exist */
efl_ui_grid_item_scroll(grid, item, EINA_TRUE);
efl_ui_item_container_item_scroll(grid, item, EINA_TRUE);
ecore_main_loop_begin();
}
EFL_END_TEST

View File

@ -0,0 +1,36 @@
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#include <Efl_Ui.h>
#include "efl_ui_suite.h"
#include "efl_ui_test_item_container_common.h"
static Eo *win;
static void
item_container_setup()
{
Eo * list = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS);
position_manager = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS);
win = win_add();
item_container = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win,
efl_ui_item_container_position_manager_set(efl_added, list));
}
static void
item_container_teardown()
{
item_container = NULL;
position_manager = NULL;
win = NULL;
}
void efl_ui_test_grid_container(TCase *tc)
{
tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown);
tcase_add_checked_fixture(tc, item_container_setup, item_container_teardown);
efl_ui_test_item_container_common_add(tc);
efl_ui_test_position_manager_common_add(tc);
}

View File

@ -0,0 +1,54 @@
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#include <Efl_Ui.h>
#include "efl_ui_suite.h"
#include "efl_ui_test_item_container_common.h"
static Eo* win;
static void
item_container_setup()
{
win = win_add();
}
static void
item_container_teardown()
{
win = NULL;
}
EFL_START_TEST(finalizer_check)
{
Eo *grid = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS);
Eo *list = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS);
Eo *random_obj = efl_add(EFL_UI_BUTTON_CLASS, win);
Eo *o;
EXPECT_ERROR_START;
ck_assert_ptr_eq(efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win), NULL);
EXPECT_ERROR_END;
EXPECT_ERROR_START;
ck_assert_ptr_eq(efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win, efl_ui_item_container_position_manager_set(efl_added, random_obj)), NULL);
EXPECT_ERROR_END;
o = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win, efl_ui_item_container_position_manager_set(efl_added, grid));
ck_assert_ptr_ne(o, NULL);
ck_assert_ptr_eq(efl_parent_get(grid), o);
efl_del(o);
o = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win, efl_ui_item_container_position_manager_set(efl_added, list));
ck_assert_ptr_ne(o, NULL);
ck_assert_ptr_eq(efl_parent_get(list), o);
efl_del(o);
}
EFL_END_TEST
void efl_ui_test_item_container(TCase *tc)
{
tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown);
tcase_add_checked_fixture(tc, item_container_setup, item_container_teardown);
tcase_add_test(tc, finalizer_check);
}

View File

@ -0,0 +1,233 @@
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#include <Efl_Ui.h>
#include "efl_ui_suite.h"
#include "efl_ui_test_item_container_common.h"
Eo *item_container;
void
fill_items(const Efl_Class *klass)
{
for (int i = 0; i < 3; ++i)
{
char buf[PATH_MAX];
Eo *it = efl_add(klass, item_container);
snprintf(buf, sizeof(buf), "%d - Test %d", i, i%13);
efl_text_set(it, buf);
efl_pack_end(item_container, it);
}
}
static void
_set_pointer_quit(void *data, const Efl_Event *ev)
{
Efl_Ui_Item **b = data;
ck_assert_ptr_eq(*b, NULL);
*b = ev->info;
}
static void
_iterator_to_array(Eina_Array **arr, Eina_Iterator *iter)
{
Efl_Ui_Widget *widget;
*arr = eina_array_new(10);
EINA_ITERATOR_FOREACH(iter, widget)
{
eina_array_push(*arr, widget);
}
eina_iterator_free(iter);
}
EFL_START_TEST(test_multi_select)
{
Efl_Ui_Item *selected = NULL;
Efl_Ui_Item *unselected = NULL;
Eina_Array *arr_selected;
efl_ui_select_mode_set(item_container, EFL_UI_SELECT_MODE_MULTI);
efl_event_callback_add(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
efl_event_callback_add(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
fill_items(EFL_UI_LIST_DEFAULT_ITEM_CLASS);
efl_ui_item_selected_set(efl_pack_content_get(item_container, 0), EINA_TRUE);
ck_assert_ptr_eq(selected, efl_pack_content_get(item_container, 0));
ck_assert_ptr_eq(unselected, NULL);
selected = NULL;
unselected = NULL;
efl_ui_item_selected_set(efl_pack_content_get(item_container, 2), EINA_TRUE);
ck_assert_ptr_eq(selected, efl_pack_content_get(item_container, 2));
ck_assert_ptr_eq(unselected, NULL);
selected = NULL;
unselected = NULL;
ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_TRUE);
ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_TRUE);
ck_assert_ptr_eq(efl_ui_item_container_last_selected_item_get(item_container), efl_pack_content_get(item_container, 2));
_iterator_to_array(&arr_selected, efl_ui_item_container_selected_items_get(item_container));
ck_assert_int_eq(eina_array_count(arr_selected), 2);
ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(item_container, 0));
ck_assert_ptr_eq(eina_array_data_get(arr_selected, 1), efl_pack_content_get(item_container, 2));
efl_ui_item_selected_set(efl_pack_content_get(item_container, 2), EINA_TRUE);
ck_assert_ptr_eq(selected, NULL);
ck_assert_ptr_eq(unselected, NULL);
selected = NULL;
unselected = NULL;
efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
}
EFL_END_TEST
EFL_START_TEST(test_multi_select_removal)
{
Efl_Ui_Item *selected = NULL;
Efl_Ui_Item *unselected = NULL;
Eina_Array *arr_selected;
efl_ui_select_mode_set(item_container, EFL_UI_SELECT_MODE_MULTI);
efl_event_callback_add(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
efl_event_callback_add(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
fill_items(EFL_UI_LIST_DEFAULT_ITEM_CLASS);
efl_ui_item_selected_set(efl_pack_content_get(item_container, 0), EINA_TRUE);
selected = NULL;//No need to ckeck the flag, we asserted in the tcase before
efl_ui_item_selected_set(efl_pack_content_get(item_container, 2), EINA_TRUE);
selected = NULL;//No need to ckeck the flag, we asserted in the tcase before
unselected = NULL;
efl_ui_item_selected_set(efl_pack_content_get(item_container, 0), EINA_FALSE);
ck_assert_ptr_eq(selected, NULL);
ck_assert_ptr_eq(unselected, efl_pack_content_get(item_container, 0));
selected = NULL;
unselected = NULL;
efl_ui_item_selected_set(efl_pack_content_get(item_container, 2), EINA_FALSE);
ck_assert_ptr_eq(selected, NULL);
ck_assert_ptr_eq(unselected, efl_pack_content_get(item_container, 2));
selected = NULL;
unselected = NULL;
ck_assert_ptr_eq(efl_ui_item_container_last_selected_item_get(item_container), NULL);
_iterator_to_array(&arr_selected, efl_ui_item_container_selected_items_get(item_container));
ck_assert_int_eq(eina_array_count(arr_selected), 0);
efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
}
EFL_END_TEST
EFL_START_TEST(test_single_select)
{
Efl_Ui_Item *selected = NULL;
Efl_Ui_Item *unselected = NULL;
Eina_Array *arr_selected;
efl_ui_select_mode_set(item_container, EFL_UI_SELECT_MODE_SINGLE);
efl_event_callback_add(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
efl_event_callback_add(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
fill_items(EFL_UI_LIST_DEFAULT_ITEM_CLASS);
efl_ui_item_selected_set(efl_pack_content_get(item_container, 0), EINA_TRUE);
ck_assert_ptr_eq(selected, efl_pack_content_get(item_container, 0));
ck_assert_ptr_eq(unselected, NULL);
selected = NULL;
unselected = NULL;
efl_ui_item_selected_set(efl_pack_content_get(item_container, 2), EINA_TRUE);
ck_assert_ptr_eq(selected, efl_pack_content_get(item_container, 2));
ck_assert_ptr_eq(unselected, efl_pack_content_get(item_container, 0));
selected = NULL;
unselected = NULL;
ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_FALSE);
ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_TRUE);
ck_assert_ptr_eq(efl_ui_item_container_last_selected_item_get(item_container), efl_pack_content_get(item_container, 2));
_iterator_to_array(&arr_selected, efl_ui_item_container_selected_items_get(item_container));
ck_assert_int_eq(eina_array_count(arr_selected), 1);
ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(item_container, 2));
efl_ui_item_selected_set(efl_pack_content_get(item_container, 2), EINA_TRUE);
ck_assert_ptr_eq(selected, NULL);
ck_assert_ptr_eq(unselected, NULL);
selected = NULL;
unselected = NULL;
efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
}
EFL_END_TEST
EFL_START_TEST(test_single_select_always)
{
Efl_Ui_Item *selected = NULL;
Efl_Ui_Item *unselected = NULL;
Eina_Array *arr_selected;
efl_ui_select_mode_set(item_container, EFL_UI_SELECT_MODE_SINGLE_ALWAYS);
efl_event_callback_add(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
efl_event_callback_add(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
fill_items(EFL_UI_LIST_DEFAULT_ITEM_CLASS);
efl_ui_item_selected_set(efl_pack_content_get(item_container, 0), EINA_TRUE);
ck_assert_ptr_eq(selected, efl_pack_content_get(item_container, 0));
ck_assert_ptr_eq(unselected, NULL);
selected = NULL;
unselected = NULL;
efl_ui_item_selected_set(efl_pack_content_get(item_container, 2), EINA_TRUE);
ck_assert_ptr_eq(selected, efl_pack_content_get(item_container, 2));
ck_assert_ptr_eq(unselected, efl_pack_content_get(item_container, 0));
selected = NULL;
unselected = NULL;
efl_ui_item_selected_set(efl_pack_content_get(item_container, 2), EINA_TRUE);
ck_assert_ptr_eq(selected, efl_pack_content_get(item_container, 2));
ck_assert_ptr_eq(unselected, NULL);
selected = NULL;
unselected = NULL;
ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_FALSE);
ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_TRUE);
ck_assert_ptr_eq(efl_ui_item_container_last_selected_item_get(item_container), efl_pack_content_get(item_container, 2));
_iterator_to_array(&arr_selected, efl_ui_item_container_selected_items_get(item_container));
ck_assert_int_eq(eina_array_count(arr_selected), 1);
ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(item_container, 2));
efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
}
EFL_END_TEST
EFL_START_TEST(test_none_select)
{
Efl_Ui_Item *selected = NULL;
Efl_Ui_Item *unselected = NULL;
Eina_Array *arr_selected;
efl_ui_select_mode_set(item_container, EFL_UI_SELECT_MODE_NONE);
efl_event_callback_add(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
efl_event_callback_add(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
fill_items(EFL_UI_LIST_DEFAULT_ITEM_CLASS);
efl_ui_item_selected_set(efl_pack_content_get(item_container, 0), EINA_TRUE);
ck_assert_ptr_eq(selected, NULL);
ck_assert_ptr_eq(unselected, NULL);
selected = NULL;
unselected = NULL;
efl_ui_item_selected_set(efl_pack_content_get(item_container, 2), EINA_TRUE);
ck_assert_ptr_eq(selected, NULL);
ck_assert_ptr_eq(unselected, NULL);
selected = NULL;
unselected = NULL;
ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_FALSE);
ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_FALSE);
ck_assert_ptr_eq(efl_ui_item_container_last_selected_item_get(item_container), NULL);
_iterator_to_array(&arr_selected, efl_ui_item_container_selected_items_get(item_container));
ck_assert_int_eq(eina_array_count(arr_selected), 0);
efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
}
EFL_END_TEST
void efl_ui_test_item_container_common_add(TCase *tc)
{
tcase_add_test(tc, test_multi_select);
tcase_add_test(tc, test_multi_select_removal);
tcase_add_test(tc, test_single_select);
tcase_add_test(tc, test_none_select);
tcase_add_test(tc, test_single_select_always);
}

View File

@ -0,0 +1,11 @@
#ifndef EFL_UI_TEST_ITEM_CONTAINER_COMMON_H
#define EFL_UI_TEST_ITEM_CONTAINER_COMMON_H 1
extern Eo *item_container;
extern Eo *position_manager;
void fill_items(const Efl_Class *klass);
void efl_ui_test_item_container_common_add(TCase *tc);
void efl_ui_test_position_manager_common_add(TCase *tc);
#endif

View File

@ -0,0 +1,36 @@
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#include <Efl_Ui.h>
#include "efl_ui_suite.h"
#include "efl_ui_test_item_container_common.h"
static Eo *win;
static void
item_container_setup()
{
Eo * list = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS);
position_manager = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS);
win = win_add();
item_container = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win,
efl_ui_item_container_position_manager_set(efl_added, list));
}
static void
item_container_teardown()
{
item_container = NULL;
position_manager = NULL;
win = NULL;
}
void efl_ui_test_list_container(TCase *tc)
{
tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown);
tcase_add_checked_fixture(tc, item_container_setup, item_container_teardown);
efl_ui_test_item_container_common_add(tc);
efl_ui_test_position_manager_common_add(tc);
}

View File

@ -0,0 +1,192 @@
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#include <Efl_Ui.h>
#include "efl_ui_suite.h"
#include "efl_ui_test_item_container_common.h"
Eo *position_manager;
static Eo* win;
static Eina_Array *arr_obj;
static Eina_Inarray *arr_size;
static Eina_Accessor inner_size_acc;
static Eina_Accessor *size_acc;
static void
item_container_setup()
{
win = win_add();
}
static void
item_container_teardown()
{
win = NULL;
}
static Eina_Bool
_get_at(Eina_Accessor *it EINA_UNUSED, unsigned int idx, void **data)
{
Eina_Size2D *result_ptr = (void*)data;
Eina_Size2D *inner_result;
if (!eina_accessor_data_get(size_acc, idx, (void*)&inner_result))
return EINA_FALSE;
*result_ptr = *inner_result;
return EINA_TRUE;
}
static void
_free_cb(Eina_Accessor *it EINA_UNUSED)
{
eina_accessor_free(size_acc);
}
static Eina_Bool
_lock_cb(Eina_Accessor *it EINA_UNUSED)
{
return eina_accessor_lock(size_acc);
}
static Eina_Accessor*
_clone_cb(Eina_Accessor *it EINA_UNUSED)
{
return eina_accessor_clone(size_acc);
}
static void
_initial_setup(void)
{
arr_obj = eina_array_new(10);
arr_size = eina_inarray_new(sizeof(Eina_Size2D), 10);
size_acc = eina_inarray_accessor_new(arr_size);
inner_size_acc.version = EINA_ACCESSOR_VERSION;
EINA_MAGIC_SET(&inner_size_acc, EINA_MAGIC_ACCESSOR);
inner_size_acc.get_at = _get_at;
inner_size_acc.free = _free_cb;
inner_size_acc.lock = _lock_cb;
inner_size_acc.clone = _clone_cb;
efl_ui_position_manager_entity_data_access_set(position_manager,
eina_array_accessor_new(arr_obj),
&inner_size_acc, 0);
}
static int
_add_item(Eo *obj, Eina_Size2D size)
{
int idx = eina_array_count(arr_obj);
EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_array_count(arr_obj) == eina_inarray_count(arr_size), -1);
eina_array_push(arr_obj, (void*)0x1); //wtf
eina_array_data_set(arr_obj, idx, obj);
eina_inarray_push(arr_size, &size);
efl_ui_position_manager_entity_item_added(position_manager, idx, obj);
return idx;
}
static void
_update_item(int index, Eo *obj, Eina_Size2D size)
{
Eina_Size2D *s;
eina_array_data_set(arr_obj, index, obj);
s = eina_inarray_nth(arr_size, index);
*s = size;
}
static void
_ticker(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
efl_loop_quit(efl_main_loop_get(), EINA_VALUE_EMPTY);
}
static void
_iterate_a_few(void)
{
efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _ticker, NULL),
efl_loop_timer_interval_set(efl_added, 0.1));
efl_loop_begin(efl_main_loop_get());
}
EFL_START_TEST(no_crash1)
{
_initial_setup();
//try to resize the viewport while we have no item
efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200));
_iterate_a_few();
efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0));
_iterate_a_few();
_add_item(efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 20));
_iterate_a_few();
efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200));
_iterate_a_few();
efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0));
_iterate_a_few();
}
EFL_END_TEST
EFL_START_TEST(no_crash2)
{
_initial_setup();
//try to resize the viewport while we have no item
efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200));
_iterate_a_few();
efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0));
_iterate_a_few();
_add_item(NULL, EINA_SIZE2D(20, 20));
_iterate_a_few();
efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0));
_iterate_a_few();
efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200));
_iterate_a_few();
_update_item(0, efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 20));
_iterate_a_few();
}
EFL_END_TEST
static void
_content_size_cb(void *data, const Efl_Event *ev)
{
Eina_Size2D *size = data;
*size = *((Eina_Size2D*)ev->info);
}
EFL_START_TEST(viewport_newsize_event_result)
{
Eina_Size2D size = EINA_SIZE2D(-2, -2), min_size = EINA_SIZE2D(-2, -2);
efl_event_callback_add(position_manager,
EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_SIZE_CHANGED, _content_size_cb, &size);
efl_event_callback_add(position_manager,
EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_MIN_SIZE_CHANGED, _content_size_cb, &min_size);
_initial_setup();
_add_item(efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 20));
_add_item(efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 30));
efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(0, 0, 200, 200));
_iterate_a_few();
ck_assert_int_ne(size.w, -2);
ck_assert_int_ne(size.h, -2);
ck_assert_int_ne(min_size.w, -2);
ck_assert_int_ne(min_size.h, -2);
}
EFL_END_TEST
void efl_ui_test_position_manager_common_add(TCase *tc)
{
tcase_add_checked_fixture(tc, item_container_setup, item_container_teardown);
tcase_add_test(tc, no_crash1);
tcase_add_test(tc, no_crash2);
tcase_add_test(tc, viewport_newsize_event_result);
}

View File

@ -146,6 +146,11 @@ efl_ui_suite_src = [
'efl_ui_test_spin.c',
'efl_ui_test_spin_button.c',
'efl_ui_test_slider.c',
'efl_ui_test_item_container_common.c',
'efl_ui_test_item_container.c',
'efl_ui_test_list_container.c',
'efl_ui_test_grid_container.c',
'efl_ui_test_position_manager_common.c',
]
efl_ui_suite = executable('efl_ui_suite',

View File

@ -9,9 +9,10 @@
/* spec-meta-start
{"test-interface":"Efl.Pack_Linear",
"test-widgets": ["Efl.Ui.Box", "Efl.Ui.Grid", "Efl.Ui.Spotlight.Container"],
"test-widgets": ["Efl.Ui.Box", "Efl.Ui.Grid", "Efl.Ui.Spotlight.Container", "Test.Efl.Ui.Item_Container_List"],
"custom-mapping" : {
"Efl.Ui.Grid" : "EFL_UI_GRID_DEFAULT_ITEM_CLASS"
"Efl.Ui.Grid" : "EFL_UI_GRID_DEFAULT_ITEM_CLASS",
"Test.Efl.Ui.Item_Container_List" : "EFL_UI_LIST_DEFAULT_ITEM_CLASS"
}
}
spec-meta-end */

View File

@ -8,6 +8,16 @@
#include "suite_helpers.h"
#include "eo_internal.h"
//helper functions for custom widget intialization
EOLIAN static Efl_Object*
_test_efl_ui_item_container_list_efl_object_constructor(Eo *obj, void *pd EINA_UNUSED)
{
efl_constructor(efl_super(obj, TEST_EFL_UI_ITEM_CONTAINER_LIST_CLASS));
efl_ui_item_container_position_manager_set(obj, efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS));
return obj;
}
Evas_Object *win = NULL;
Evas_Object *widget = NULL;
const Efl_Class *test_content_klass = NULL;
@ -63,3 +73,5 @@ main(int argc, char **argv)
return (failed_count == 0) ? 0 : 255;
}
#include "test_efl_ui_item_container_list.eo.c"

View File

@ -5,6 +5,7 @@
#define EFL_NOLEGACY_API_SUPPORT
#include <Efl_Ui.h>
#include "test_efl_ui_item_container_list.eo.h"
#include "../efl_check.h"
extern Evas_Object *win;

View File

@ -1,3 +1,6 @@
priv_eo_files = [
'test_efl_ui_item_container_list.eo',
]
efl_ui_suite_behavior_test_files = files([
'efl_test_pack.c',
@ -21,6 +24,20 @@ efl_ui_suite_behavior_src = files([
test_generator = find_program('generator.py')
priv_eo_file_target = []
foreach eo_file : priv_eo_files
priv_eo_file_target += custom_target('eolian_gen_' + eo_file,
input : eo_file,
output : [eo_file + '.h'],
depfile : eo_file + '.d',
command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
'-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
'-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
'-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
'-gchd', '@INPUT@'])
endforeach
generated_test_parts = custom_target('generate_test_suite',
input: efl_ui_suite_behavior_test_files,
output: 'efl_ui_spec_suite_gen.x',
@ -28,7 +45,7 @@ generated_test_parts = custom_target('generate_test_suite',
)
efl_ui_behavior_suite = executable('efl_ui_spec_suite',
efl_ui_suite_behavior_src + [generated_test_parts],
efl_ui_suite_behavior_src + [generated_test_parts] + [priv_eo_file_target],
dependencies: [check, eina, elementary, elementary_deps],
include_directories : [config_dir] + [elementary_config_dir] + [include_directories('../')],
c_args : [

View File

@ -0,0 +1,6 @@
class @beta Test.Efl.Ui.Item_Container_List extends Efl.Ui.Item_Container {
data: null;
implements {
Efl.Object.constructor;
}
}