forked from enlightenment/efl
Merge branch 'master' into devs/hermet/lottie
This commit is contained in:
commit
11fb20f40a
|
@ -78,8 +78,8 @@ else
|
|||
RELEASE_READY_LINUX_COPTS=" --with-profile=release"
|
||||
|
||||
MINGW_COPTS=" --prefix=/ewpi-64-install --host=x86_64-w64-mingw32 --with-eolian-gen=/usr/bin/eolian_gen \
|
||||
--with-edje-cc=/usr/local/bin/edje_cc --with-eet-eet=/usr/local/bin/eet \
|
||||
--with-bin-elm-prefs-cc=/usr/local/bin/elm_prefs_cc \
|
||||
--with-edje-cc=/usr/bin/edje_cc --with-eet-eet=/usr/bin/eet \
|
||||
--with-bin-elm-prefs-cc=/usr/bin/elm_prefs_cc \
|
||||
--disable-static --with-tests=regular --with-crypto=openssl \
|
||||
--disable-libmount --disable-valgrind --disable-avahi --disable-spectre --disable-libraw \
|
||||
--disable-librsvg --disable-pulseaudio --disable-cxx-bindings"
|
||||
|
|
|
@ -34,6 +34,7 @@ tags
|
|||
*.eo.h
|
||||
*.eot.h
|
||||
*.eo.legacy.h
|
||||
*.eo.legacy.c
|
||||
*.eo.hh
|
||||
*.eo.impl.hh
|
||||
*.eo.js.cc
|
||||
|
|
|
@ -37,3 +37,4 @@ install_subdir('fdo',
|
|||
join_paths('actions', '128-svg'),
|
||||
]
|
||||
)
|
||||
elementary_img_data = join_paths(meson.current_source_dir())
|
||||
|
|
|
@ -287,12 +287,12 @@ subprojects = [
|
|||
['efreet' ,[] , false, false, true, false, false, false, ['eina', 'efl', 'eo'], []],
|
||||
['ecore_imf_evas' ,[] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []],
|
||||
['ephysics' ,['physics'] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []],
|
||||
['edje' ,[] , false, true, true, false, true, true, ['evas', 'eo', 'efl', 'luajit'], []],
|
||||
['edje' ,[] , false, true, true, false, true, true, ['evas', 'eo', 'efl', get_option('lua-interpreter')], []],
|
||||
['emotion' ,[] , true, true, false, false, true, true, ['eina', 'efl', 'eo'], []],
|
||||
['ethumb' ,[] , true, true, true, false, false, false, ['eina', 'efl', 'eo'], []],
|
||||
['ethumb_client' ,[] , false, true, true, false, false, true, ['eina', 'efl', 'eo', 'ethumb'], []],
|
||||
['elocation' ,[] , false, true, false, false, false, false, ['ecore', 'eldbus'], []],
|
||||
['elementary' ,[] , true, true, true, true, true, false, ['eina', 'efl', 'eo', 'eet', 'evas', 'ecore', 'ecore-evas', 'ecore-file', 'ecore-input', 'edje', 'ethumb-client', 'emotion', 'ecore-imf', 'ecore-con', 'eldbus', 'efreet', 'efreet-mime', 'efreet-trash', 'eio', 'elocation'], ['atspi']],
|
||||
['elementary' ,[] , true, true, true, true, true, true, ['eina', 'efl', 'eo', 'eet', 'evas', 'ecore', 'ecore-evas', 'ecore-file', 'ecore-input', 'edje', 'ethumb-client', 'emotion', 'ecore-imf', 'ecore-con', 'eldbus', 'efreet', 'efreet-mime', 'efreet-trash', 'eio', 'elocation'], ['atspi']],
|
||||
['efl_wl' ,['wl'] , false, true, true, false, false, false, ['evas', 'ecore'], []],
|
||||
['elua' ,['elua'] , false, true, true, false, true, false, ['eina', 'luajit'], []],
|
||||
['ecore_wayland' ,['wl-deprecated'] , false, true, false, false, false, false, ['eina'], []],
|
||||
|
|
|
@ -323,6 +323,13 @@ option('mono-beta',
|
|||
description: 'Flag for enabling @beta Eo methods in the api'
|
||||
)
|
||||
|
||||
option('lua-interpreter',
|
||||
type: 'combo',
|
||||
choices: ['luajit', 'lua'],
|
||||
value: 'luajit',
|
||||
description: 'Select a type of lua interpreter to use it for edje and evas'
|
||||
)
|
||||
|
||||
option('native-arch-optimization',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
|
|
|
@ -354,7 +354,7 @@ tests/ecore/efl_app_test_env.c \
|
|||
tests/ecore/efl_app_suite.c \
|
||||
tests/ecore/efl_app_suite.h
|
||||
|
||||
tests_ecore_efl_app_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
||||
tests_ecore_efl_app_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl -I$(top_builddir)/src/tests/ecore \
|
||||
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
|
||||
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore\" \
|
||||
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore\" \
|
||||
|
|
|
@ -47,9 +47,8 @@ efl_eolian_files = \
|
|||
lib/efl/interfaces/efl_gfx_gradient_radial.eo \
|
||||
lib/efl/interfaces/efl_gfx_filter.eo \
|
||||
lib/efl/interfaces/efl_gfx_blur.eo \
|
||||
lib/efl/interfaces/efl_gfx_size_hint.eo \
|
||||
lib/efl/interfaces/efl_gfx_hint.eo \
|
||||
lib/efl/interfaces/efl_model.eo \
|
||||
lib/efl/interfaces/efl_animator.eo \
|
||||
lib/efl/interfaces/efl_orientation.eo \
|
||||
lib/efl/interfaces/efl_container.eo \
|
||||
lib/efl/interfaces/efl_content.eo \
|
||||
|
|
|
@ -59,7 +59,6 @@ elm_public_eolian_files = \
|
|||
lib/elementary/efl_ui_textpath_legacy.eo \
|
||||
lib/elementary/efl_ui_l10n.eo \
|
||||
lib/elementary/efl_ui_clock.eo \
|
||||
lib/elementary/efl_ui_cursor.eo \
|
||||
lib/elementary/efl_ui_image_factory.eo \
|
||||
lib/elementary/efl_ui_focus_manager.eo \
|
||||
lib/elementary/efl_ui_focus_manager_calc.eo \
|
||||
|
@ -134,6 +133,7 @@ elm_public_eolian_files = \
|
|||
lib/elementary/efl_ui_text_part.eo \
|
||||
lib/elementary/efl_ui_caching_factory.eo \
|
||||
lib/elementary/efl_ui_widget_factory.eo \
|
||||
lib/elementary/efl_ui_relative_layout.eo \
|
||||
$(NULL)
|
||||
|
||||
# More public files -- FIXME
|
||||
|
@ -458,7 +458,8 @@ includesunstable_HEADERS = \
|
|||
lib/elementary/efl_page_indicator_icon.h \
|
||||
lib/elementary/efl_ui_tab_pager_private.h \
|
||||
lib/elementary/efl_ui_tab_bar_private.h \
|
||||
lib/elementary/efl_ui_tab_page_private.h
|
||||
lib/elementary/efl_ui_tab_page_private.h \
|
||||
lib/elementary/efl_ui_relative_layout_private.h
|
||||
includesunstabledir = $(includedir)/elementary-@VMAJ@
|
||||
|
||||
nodist_includesunstable_HEADERS = \
|
||||
|
@ -901,6 +902,7 @@ lib_elementary_libelementary_la_SOURCES = \
|
|||
lib/elementary/efl_ui_homogeneous_model.c \
|
||||
lib/elementary/efl_ui_exact_model.c \
|
||||
lib/elementary/efl_ui_average_model.c \
|
||||
lib/elementary/efl_ui_relative_layout.c \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
@ -1011,7 +1013,7 @@ bin/elementary/test_entry_anchor2.c \
|
|||
bin/elementary/test_events.c \
|
||||
bin/elementary/test_evas_mask.c \
|
||||
bin/elementary/test_evas_map.c \
|
||||
bin/elementary/test_efl_gfx_map.c \
|
||||
bin/elementary/test_efl_gfx_mapping.c \
|
||||
bin/elementary/test_evas_snapshot.c \
|
||||
bin/elementary/test_external.c \
|
||||
bin/elementary/test_fileselector_button.c \
|
||||
|
@ -1119,6 +1121,7 @@ bin/elementary/test_gesture_framework.c \
|
|||
bin/elementary/test_ui_tab_pager.c \
|
||||
bin/elementary/test_ui_pager.c \
|
||||
bin/elementary/test_ui_pager_scroll.c \
|
||||
bin/elementary/test_ui_relative_layout.c \
|
||||
bin/elementary/test.h
|
||||
|
||||
bin_elementary_elementary_test_LDADD = @USE_ELEMENTARY_LIBS@
|
||||
|
@ -1628,6 +1631,7 @@ tests_elementary_efl_ui_suite_SOURCES = \
|
|||
tests/elementary/efl_ui_test_focus.c \
|
||||
tests/elementary/efl_ui_test_focus_sub.c \
|
||||
tests/elementary/efl_ui_test_box.c \
|
||||
tests/elementary/efl_ui_test_relative_layout.c \
|
||||
tests/elementary/efl_ui_test_grid.c \
|
||||
tests/elementary/efl_ui_test_image.c \
|
||||
tests/elementary/efl_ui_test_image_zoomable.c \
|
||||
|
|
|
@ -123,13 +123,14 @@ tests/elua/elua_suite.c \
|
|||
tests/elua/elua_suite.h
|
||||
|
||||
tests_elua_elua_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
||||
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/elua\" \
|
||||
-DTESTS_BUILD_DIR=\"$(abs_top_builddir)/src/tests/elua\" \
|
||||
-DTESTS_SRC_DIR=\"$(abs_top_srcdir)/src/tests/elua\" \
|
||||
-DPACKAGE_DATA_DIR=\"$(top_srcdir)/src/tests/elua\" \
|
||||
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
|
||||
-DELUA_BINDINGS_DIR=\"$(ELUA_BINDINGS_DIR)\" \
|
||||
-DELUA_CORE_DIR=\"$(ELUA_CORE_DIR)\" \
|
||||
-DELUA_MODULES_DIR=\"$(ELUA_MODULES_DIR)\" \
|
||||
-DELUA_APPS_DIR=\"$(top_srcdir)/src/tests/elua/data/apps\" \
|
||||
-DELUA_APPS_DIR=\"$(abs_top_srcdir)/src/tests/elua/data/apps\" \
|
||||
@CHECK_CFLAGS@ \
|
||||
@ELUA_CFLAGS@
|
||||
|
||||
|
|
|
@ -159,6 +159,7 @@ tests/eolian/data/struct_ref.h \
|
|||
tests/eolian/data/struct_ref_stub.h \
|
||||
tests/eolian/data/owning.eo.c \
|
||||
tests/eolian/data/class_simple_ref.c \
|
||||
tests/eolian/data/class_simple_ref.legacy.c \
|
||||
tests/eolian/data/override_ref.c \
|
||||
tests/eolian/data/class_simple_ref_eo.h \
|
||||
tests/eolian/data/class_simple_ref_legacy.h \
|
||||
|
|
|
@ -42,7 +42,7 @@ evas_canvas_eolian_pub_files = \
|
|||
lib/evas/canvas/efl_input_pointer.eo \
|
||||
lib/evas/canvas/efl_input_hold.eo \
|
||||
lib/evas/canvas/efl_input_focus.eo \
|
||||
lib/evas/canvas/efl_gfx_map.eo \
|
||||
lib/evas/canvas/efl_gfx_mapping.eo \
|
||||
lib/evas/canvas/efl_canvas_animation.eo \
|
||||
lib/evas/canvas/efl_canvas_animation_alpha.eo \
|
||||
lib/evas/canvas/efl_canvas_animation_rotate.eo \
|
||||
|
@ -264,7 +264,7 @@ lib/evas/canvas/efl_canvas_surface.c \
|
|||
lib/evas/canvas/efl_canvas_surface_tbm.c \
|
||||
lib/evas/canvas/efl_canvas_surface_x11.c \
|
||||
lib/evas/canvas/efl_canvas_surface_wayland.c \
|
||||
lib/evas/canvas/efl_gfx_map.c \
|
||||
lib/evas/canvas/efl_gfx_mapping.c \
|
||||
lib/evas/canvas/efl_input_event.c \
|
||||
lib/evas/canvas/efl_input_key.c \
|
||||
lib/evas/canvas/efl_input_pointer.c \
|
||||
|
|
|
@ -2,7 +2,7 @@ subdir('epp')
|
|||
|
||||
edje_bin_deps = [
|
||||
eina, eo, efl, m,
|
||||
luajit, eet, evas,
|
||||
lua, eet, evas,
|
||||
ecore_file, ecore_input,
|
||||
ecore_imf, ecore_imf_evas,
|
||||
embryo, efreet, eio,
|
||||
|
|
|
@ -47,7 +47,7 @@ elementary_test_src = [
|
|||
'test_events.c',
|
||||
'test_evas_mask.c',
|
||||
'test_evas_map.c',
|
||||
'test_efl_gfx_map.c',
|
||||
'test_efl_gfx_mapping.c',
|
||||
'test_evas_snapshot.c',
|
||||
'test_external.c',
|
||||
'test_fileselector_button.c',
|
||||
|
@ -155,6 +155,7 @@ elementary_test_src = [
|
|||
'test_win_indicator.c',
|
||||
'test_gesture_framework.c',
|
||||
'test_ui_tab_pager.c',
|
||||
'test_ui_relative_layout.c',
|
||||
'test.h'
|
||||
]
|
||||
|
||||
|
@ -214,6 +215,13 @@ elementary_codegen = executable('elementary_codegen',
|
|||
link_args: link_args
|
||||
)
|
||||
|
||||
if meson.is_cross_build()
|
||||
elementary_codegen_exe = [find_program('elementary_codegen', native: true)]
|
||||
else
|
||||
env = find_program('env', native: true)
|
||||
elementary_codegen_exe = [env, 'EFL_RUN_IN_TREE=1', elementary_codegen.full_path()]
|
||||
endif
|
||||
|
||||
elm_prefs_cc_src = [
|
||||
'elm_prefs_cc.h',
|
||||
'elm_prefs_cc.c',
|
||||
|
|
|
@ -128,7 +128,7 @@ anim_tick(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
ecore_animator_del(animator);
|
||||
animator = NULL;
|
||||
#else
|
||||
efl_event_callback_del(win, EFL_EVENT_ANIMATOR_TICK, anim_tick, data);
|
||||
efl_event_callback_del(win, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, anim_tick, data);
|
||||
#endif
|
||||
ecore_timer_add(0.5, next_test_delay, data);
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ all_tests(Evas *e)
|
|||
#ifdef ANIMATOR
|
||||
animator = ecore_animator_add(anim_tick, e);
|
||||
#else
|
||||
efl_event_callback_add(win, EFL_EVENT_ANIMATOR_TICK, anim_tick, e);
|
||||
efl_event_callback_add(win, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, anim_tick, e);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -351,7 +351,7 @@ void test_evas_mask(void *data, Edje_Object *obj, void *event_info);
|
|||
void test_gfx_filters(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_evas_snapshot(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_evas_map(void *data, Edje_Object *obj, void *event_info);
|
||||
void test_efl_gfx_map(void *data, Edje_Object *obj, void *event_info);
|
||||
void test_efl_gfx_mapping(void *data, Edje_Object *obj, void *event_info);
|
||||
void test_ui_textpath(void *data, Edje_Object *obj, void *event_info);
|
||||
|
||||
void test_efl_anim_alpha(void *data, Evas_Object *obj, void *event_info);
|
||||
|
@ -377,6 +377,8 @@ void test_ui_tab_pager(void *data, Evas_Object *obj, void *event_info);
|
|||
void test_ui_pager(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_ui_pager_scroll(void *data, Evas_Object *obj, void *event_info);
|
||||
|
||||
void test_ui_relative_layout(void *data, Evas_Object *obj, void *event_info);
|
||||
|
||||
static void _list_udpate(void);
|
||||
|
||||
static Evas_Object *win, *tbx, *entry; // TODO: refactoring
|
||||
|
@ -842,6 +844,7 @@ add_tests:
|
|||
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table", test_ui_table);
|
||||
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, "Events", "Event Refeed", test_events);
|
||||
|
@ -1210,7 +1213,7 @@ add_tests:
|
|||
ADD_TEST(NULL, "Evas", "Gfx Filters", test_gfx_filters);
|
||||
ADD_TEST(NULL, "Evas", "Snapshot", test_evas_snapshot);
|
||||
ADD_TEST(NULL, "Evas", "Map", test_evas_map);
|
||||
ADD_TEST_EO(NULL, "Evas", "Efl.Gfx.Map", test_efl_gfx_map);
|
||||
ADD_TEST_EO(NULL, "Evas", "Efl.Gfx.Mapping", test_efl_gfx_mapping);
|
||||
|
||||
//------------------------------//
|
||||
ADD_TEST(NULL, "Widgets Disable/Enable", "Box", test_box_disable);
|
||||
|
|
|
@ -92,5 +92,5 @@ test_anim(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info
|
|||
evas_object_resize(win, 480, 800);
|
||||
evas_object_show(win);
|
||||
|
||||
efl_event_callback_add(win, EFL_EVENT_ANIMATOR_TICK, _anim_tick, NULL);
|
||||
efl_event_callback_add(win, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _anim_tick, NULL);
|
||||
}
|
||||
|
|
|
@ -337,7 +337,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1, 1),
|
||||
efl_gfx_hint_weight_set(efl_added, 1, 1),
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
cs = elm_colorselector_add(win);
|
||||
|
@ -354,16 +354,16 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
|
||||
efl_add(EFL_UI_IMAGE_CLASS, win,
|
||||
efl_file_set(efl_added, buf, NULL),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(64, 64)),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0.5, 0.5),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
|
||||
efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _file_cb, win),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", elm_app_data_dir_get());
|
||||
efl_add(EFL_UI_IMAGE_CLASS, win,
|
||||
efl_file_set(efl_added, buf, NULL),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(64, 64)),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0.5, 0.5),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
|
||||
efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _image_cb, win),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
|
@ -409,32 +409,32 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
efl_ui_win_alpha_set(efl_added, EINA_FALSE));
|
||||
|
||||
efl_add(EFL_UI_BG_CLASS, win,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
|
||||
|
||||
o_bg = efl_add(EFL_UI_BG_CLASS, box,
|
||||
efl_file_set(efl_added, buf, NULL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, box,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, 0.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
rdg = rd = efl_add(EFL_UI_RADIO_CLASS, hbox,
|
||||
efl_ui_radio_state_value_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FILL),
|
||||
efl_text_set(efl_added, "Fill"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0),
|
||||
efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, _cb_radio_changed_scale_type, o_bg),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
|
@ -442,7 +442,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
efl_ui_radio_state_value_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_INSIDE),
|
||||
efl_ui_radio_group_add(efl_added, rdg),
|
||||
efl_text_set(efl_added, "Fit Inside"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0),
|
||||
efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, _cb_radio_changed_scale_type, o_bg),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
|
@ -451,7 +451,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
efl_ui_radio_state_value_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE),
|
||||
efl_ui_radio_group_add(efl_added, rdg),
|
||||
efl_text_set(efl_added, "Fit Outside"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0),
|
||||
efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, _cb_radio_changed_scale_type, o_bg),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
|
@ -459,7 +459,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
efl_ui_radio_state_value_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_NONE),
|
||||
efl_ui_radio_group_add(efl_added, rdg),
|
||||
efl_text_set(efl_added, "None"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0),
|
||||
efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, _cb_radio_changed_scale_type, o_bg),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
|
@ -467,7 +467,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
efl_ui_radio_state_value_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_TILE),
|
||||
efl_ui_radio_group_add(efl_added, rdg),
|
||||
efl_text_set(efl_added, "Tile"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0),
|
||||
efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, _cb_radio_changed_scale_type, o_bg),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
|
@ -475,7 +475,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
|
||||
efl_add(EFL_UI_CHECK_CLASS, hbox,
|
||||
efl_text_set(efl_added, "Bg Color"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0),
|
||||
efl_event_callback_add(efl_added, EFL_UI_CHECK_EVENT_CHANGED, _cb_check_changed_scale_type, o_bg),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
|
|
|
@ -909,13 +909,13 @@ test_box_stack(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
/* rectangle with a max size */
|
||||
o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win,
|
||||
efl_gfx_color_set(efl_added, 64, 128, 64, 255),
|
||||
efl_gfx_size_hint_max_set(efl_added, EINA_SIZE2D(128, 20)));
|
||||
efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(128, 20)));
|
||||
efl_pack(bx, o);
|
||||
|
||||
/* image with a forced min size */
|
||||
snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
|
||||
o = efl_add(EFL_UI_IMAGE_CLASS, win,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(64, 64)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
|
||||
efl_file_set(efl_added, buf, NULL));
|
||||
efl_pack(bx, o);
|
||||
|
||||
|
|
|
@ -6,29 +6,29 @@
|
|||
static void
|
||||
_map_set(Evas_Object *obj)
|
||||
{
|
||||
efl_gfx_map_reset(obj);
|
||||
efl_gfx_map_point_count_set(obj, 8);
|
||||
efl_gfx_mapping_reset(obj);
|
||||
efl_gfx_mapping_point_count_set(obj, 8);
|
||||
//1st rect
|
||||
efl_gfx_map_coord_absolute_set(obj, 0, 100, 0, 0);
|
||||
efl_gfx_map_coord_absolute_set(obj, 1, 200, 0, 0);
|
||||
efl_gfx_map_coord_absolute_set(obj, 2, 200, 100, 0);
|
||||
efl_gfx_map_coord_absolute_set(obj, 3, 100, 100, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(obj, 0, 100, 0, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(obj, 1, 200, 0, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(obj, 2, 200, 100, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(obj, 3, 100, 100, 0);
|
||||
//2nd rect
|
||||
efl_gfx_map_coord_absolute_set(obj, 4, 200, 0, 0);
|
||||
efl_gfx_map_coord_absolute_set(obj, 5, 100, 200, 0);
|
||||
efl_gfx_map_coord_absolute_set(obj, 6, 100, 300, 0);
|
||||
efl_gfx_map_coord_absolute_set(obj, 7, 200, 100, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(obj, 4, 200, 0, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(obj, 5, 100, 200, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(obj, 6, 100, 300, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(obj, 7, 200, 100, 0);
|
||||
|
||||
//uv: 1st rect: uv: [0-1]
|
||||
efl_gfx_map_uv_set(obj, 0, 0, 0);
|
||||
efl_gfx_map_uv_set(obj, 1, 0.5, 0);
|
||||
efl_gfx_map_uv_set(obj, 2, 0.5, 1);
|
||||
efl_gfx_map_uv_set(obj, 3, 0, 1);
|
||||
efl_gfx_mapping_uv_set(obj, 0, 0, 0);
|
||||
efl_gfx_mapping_uv_set(obj, 1, 0.5, 0);
|
||||
efl_gfx_mapping_uv_set(obj, 2, 0.5, 1);
|
||||
efl_gfx_mapping_uv_set(obj, 3, 0, 1);
|
||||
//uv: 2nd rect
|
||||
efl_gfx_map_uv_set(obj, 4, 0.5, 0);
|
||||
efl_gfx_map_uv_set(obj, 5, 1, 0);
|
||||
efl_gfx_map_uv_set(obj, 6, 1, 1);
|
||||
efl_gfx_map_uv_set(obj, 7, 0.5, 1);
|
||||
efl_gfx_mapping_uv_set(obj, 4, 0.5, 0);
|
||||
efl_gfx_mapping_uv_set(obj, 5, 1, 0);
|
||||
efl_gfx_mapping_uv_set(obj, 6, 1, 1);
|
||||
efl_gfx_mapping_uv_set(obj, 7, 0.5, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -38,7 +38,7 @@ _image_resize_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj,
|
|||
}
|
||||
|
||||
void
|
||||
test_efl_gfx_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||
test_efl_gfx_mapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
const Evas_Coord W = 300, H = 300;
|
||||
|
@ -52,7 +52,7 @@ test_efl_gfx_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
/* image with a min size */
|
||||
snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", elm_app_data_dir_get());
|
||||
img = efl_add(EFL_UI_IMAGE_CLASS, win,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(64, 64)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
|
||||
efl_file_set(efl_added, buf, NULL));
|
||||
efl_gfx_image_scale_type_set(img, EFL_GFX_IMAGE_SCALE_TYPE_FILL);
|
||||
evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE,
|
|
@ -150,7 +150,7 @@ test_efl_ui_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win);
|
||||
efl_gfx_size_hint_weight_set(bx, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(bx, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_content_set(win, bx);
|
||||
|
||||
en = efl_add(EFL_UI_TEXT_CLASS, bx,
|
||||
|
@ -174,24 +174,24 @@ test_efl_ui_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
"occaecat cupidatat non proident, sunt in culpa qui officia deserunt\n"
|
||||
"mollit anim id est laborum");
|
||||
|
||||
efl_gfx_size_hint_min_set(en, EINA_SIZE2D(300, 100));
|
||||
efl_gfx_hint_size_min_set(en, EINA_SIZE2D(300, 100));
|
||||
efl_pack(bx, en);
|
||||
|
||||
bx2 = efl_add(EFL_UI_BOX_CLASS, bx);
|
||||
efl_gfx_size_hint_weight_set(bx2, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(bx2, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_ui_direction_set(bx2, EFL_UI_DIR_HORIZONTAL);
|
||||
|
||||
bt = efl_add(EFL_UI_BUTTON_CLASS, bx2);
|
||||
efl_text_set(bt, "Sel");
|
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _on_bt3_clicked, en);
|
||||
efl_gfx_size_hint_weight_set(bt, EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
efl_gfx_hint_weight_set(bt, EFL_GFX_HINT_EXPAND, 0.0);
|
||||
efl_pack(bx2, bt);
|
||||
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||
|
||||
bt = efl_add(EFL_UI_BUTTON_CLASS, bx2);
|
||||
efl_text_set(bt, "Wr");
|
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _on_bt6_clicked, en);
|
||||
efl_gfx_size_hint_weight_set(bt, EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
efl_gfx_hint_weight_set(bt, EFL_GFX_HINT_EXPAND, 0.0);
|
||||
efl_pack(bx2, bt);
|
||||
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||
|
||||
|
@ -209,7 +209,7 @@ test_efl_ui_text_inputfield(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED
|
|||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win);
|
||||
efl_gfx_size_hint_weight_set(bx, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(bx, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_content_set(win, bx);
|
||||
|
||||
en = efl_add(EFL_UI_TEXT_CLASS, bx,
|
||||
|
@ -370,27 +370,27 @@ test_ui_text_item_factory(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
elm_object_focus_set(en, EINA_TRUE);
|
||||
|
||||
bx2 = efl_add(EFL_UI_BOX_CLASS, bx);
|
||||
efl_gfx_size_hint_weight_set(bx2, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(bx2, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_ui_direction_set(bx2, EFL_UI_DIR_HORIZONTAL);
|
||||
|
||||
bt = efl_add(EFL_UI_BUTTON_CLASS, bx2);
|
||||
efl_text_set(bt, "Image");
|
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _on_factory_bt_image_clicked, en);
|
||||
efl_gfx_size_hint_weight_set(bt, EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
efl_gfx_hint_weight_set(bt, EFL_GFX_HINT_EXPAND, 0.0);
|
||||
efl_pack(bx2, bt);
|
||||
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||
|
||||
bt = efl_add(EFL_UI_BUTTON_CLASS, bx2);
|
||||
efl_text_set(bt, "Emoticon");
|
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _on_factory_bt_emoticon_clicked, en);
|
||||
efl_gfx_size_hint_weight_set(bt, EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
efl_gfx_hint_weight_set(bt, EFL_GFX_HINT_EXPAND, 0.0);
|
||||
efl_pack(bx2, bt);
|
||||
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||
|
||||
bt = efl_add(EFL_UI_BUTTON_CLASS, bx2);
|
||||
efl_text_set(bt, "Factory");
|
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _on_factory_bt_factory_clicked, en);
|
||||
efl_gfx_size_hint_weight_set(bt, EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
efl_gfx_hint_weight_set(bt, EFL_GFX_HINT_EXPAND, 0.0);
|
||||
efl_pack(bx2, bt);
|
||||
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ test_evas_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
/* image with a min size */
|
||||
snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", elm_app_data_dir_get());
|
||||
img = efl_add(EFL_UI_IMAGE_CLASS, win,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(64, 64)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
|
||||
efl_file_set(efl_added, buf, NULL));
|
||||
efl_gfx_image_scale_type_set(img, EFL_GFX_IMAGE_SCALE_TYPE_FILL);
|
||||
evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE,
|
||||
|
|
|
@ -81,12 +81,12 @@ _toggle_map(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
{
|
||||
Eo *ly = data;
|
||||
|
||||
if (!efl_gfx_map_has(ly))
|
||||
if (!efl_gfx_mapping_has(ly))
|
||||
{
|
||||
efl_gfx_map_zoom(ly, 0.8, 0.8, NULL, 0.5, 0.5);
|
||||
efl_gfx_map_rotate(ly, 45, NULL, 0.5, 0.5);
|
||||
efl_gfx_mapping_zoom(ly, 0.8, 0.8, NULL, 0.5, 0.5);
|
||||
efl_gfx_mapping_rotate(ly, 45, NULL, 0.5, 0.5);
|
||||
}
|
||||
else efl_gfx_map_reset(ly);
|
||||
else efl_gfx_mapping_reset(ly);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -129,8 +129,8 @@ test_evas_mask(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
// FIXME: No genlist in EO API
|
||||
o = gl = elm_genlist_add(win);
|
||||
elm_genlist_homogeneous_set(gl, 1);
|
||||
efl_gfx_size_hint_align_set(o, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, -1, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
|
||||
itc = elm_genlist_item_class_new();
|
||||
itc->item_style = "default";
|
||||
|
@ -154,26 +154,26 @@ test_evas_mask(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
|
||||
box2 = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_LTR),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
// FIXME: button EO API
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Toggle mask"),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _toggle_mask, ly),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_pack(box2, efl_added));
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Toggle map"),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _toggle_map, ly),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_pack(box2, efl_added));
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Rotate Window"),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _rotate_win, win),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_pack(box2, efl_added));
|
||||
|
||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(500, 600));
|
||||
|
|
|
@ -30,7 +30,7 @@ _image_create(Eo *win, const char *path)
|
|||
{
|
||||
return efl_add(EFL_UI_IMAGE_CLASS, win,
|
||||
efl_file_set(efl_added, path, NULL),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(20, 20)));
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(20, 20)));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -104,12 +104,12 @@ _toggle_map(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
Eo *snap;
|
||||
|
||||
snap = efl_key_wref_get(win, "snap");
|
||||
if (!efl_gfx_map_has(snap))
|
||||
if (!efl_gfx_mapping_has(snap))
|
||||
{
|
||||
efl_gfx_map_zoom(snap, 0.8, 0.8, NULL, 0.5, 0.5);
|
||||
efl_gfx_map_rotate(snap, 20.0, NULL, 0.5, 0.5);
|
||||
efl_gfx_mapping_zoom(snap, 0.8, 0.8, NULL, 0.5, 0.5);
|
||||
efl_gfx_mapping_rotate(snap, 20.0, NULL, 0.5, 0.5);
|
||||
}
|
||||
else efl_gfx_map_reset(snap);
|
||||
else efl_gfx_mapping_reset(snap);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -169,36 +169,36 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
elm_slider_min_max_set(efl_added, 0, 64),
|
||||
elm_slider_value_set(efl_added, 5),
|
||||
elm_slider_unit_format_set(efl_added, "%.0f px"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_pack_table(table, efl_added, 0, TABLE_SIZE, TABLE_SIZE, 1),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _radius_set, win));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack_table(table, efl_added, 0, TABLE_SIZE + 1, TABLE_SIZE, 1));
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Toggle animation"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_pack(box, efl_added),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _anim_toggle, win));
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Save to file"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_pack(box, efl_added),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _save_image, win));
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Map"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_pack(box, efl_added),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _toggle_map, win));
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Close"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_pack(box, efl_added),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _close_do, win));
|
||||
|
||||
|
|
|
@ -88,34 +88,34 @@ _slice_apply(State *st, Slice *sl,
|
|||
Evas_Coord x EINA_UNUSED, Evas_Coord y EINA_UNUSED, Evas_Coord w, Evas_Coord h EINA_UNUSED,
|
||||
Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh)
|
||||
{
|
||||
efl_gfx_map_reset(sl->obj);
|
||||
efl_gfx_map_smooth_set(sl->obj, EINA_TRUE);
|
||||
efl_gfx_map_color_set(sl->obj, -1, 255, 255, 255, 255);
|
||||
efl_gfx_mapping_reset(sl->obj);
|
||||
efl_gfx_mapping_smooth_set(sl->obj, EINA_TRUE);
|
||||
efl_gfx_mapping_color_set(sl->obj, -1, 255, 255, 255, 255);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (st->dir == 0)
|
||||
{
|
||||
int p[4] = { 0, 1, 2, 3 };
|
||||
efl_gfx_map_coord_absolute_set(sl->obj, i, ox + sl->x[p[i]], oy + sl->y[p[i]], sl->z[p[i]]);
|
||||
efl_gfx_map_uv_set(sl->obj, i, sl->u[p[i]] , sl->v[p[i]]);
|
||||
efl_gfx_mapping_coord_absolute_set(sl->obj, i, ox + sl->x[p[i]], oy + sl->y[p[i]], sl->z[p[i]]);
|
||||
efl_gfx_mapping_uv_set(sl->obj, i, sl->u[p[i]] , sl->v[p[i]]);
|
||||
}
|
||||
else if (st->dir == 1)
|
||||
{
|
||||
int p[4] = { 1, 0, 3, 2 };
|
||||
efl_gfx_map_coord_absolute_set(sl->obj, i, ox + (w - sl->x[p[i]]), oy + sl->y[p[i]], sl->z[p[i]]);
|
||||
efl_gfx_map_uv_set(sl->obj, i, 1. - sl->u[p[i]] , sl->v[p[i]]);
|
||||
efl_gfx_mapping_coord_absolute_set(sl->obj, i, ox + (w - sl->x[p[i]]), oy + sl->y[p[i]], sl->z[p[i]]);
|
||||
efl_gfx_mapping_uv_set(sl->obj, i, 1. - sl->u[p[i]] , sl->v[p[i]]);
|
||||
}
|
||||
else if (st->dir == 2)
|
||||
{
|
||||
int p[4] = { 1, 0, 3, 2 };
|
||||
efl_gfx_map_coord_absolute_set(sl->obj, i, ox + sl->y[p[i]], oy + sl->x[p[i]], sl->z[p[i]]);
|
||||
efl_gfx_map_uv_set(sl->obj, i, sl->v[p[i]] , sl->u[p[i]]);
|
||||
efl_gfx_mapping_coord_absolute_set(sl->obj, i, ox + sl->y[p[i]], oy + sl->x[p[i]], sl->z[p[i]]);
|
||||
efl_gfx_mapping_uv_set(sl->obj, i, sl->v[p[i]] , sl->u[p[i]]);
|
||||
}
|
||||
else if (st->dir == 3)
|
||||
{
|
||||
int p[4] = { 0, 1, 2, 3 };
|
||||
efl_gfx_map_coord_absolute_set(sl->obj, i, ox + sl->y[p[i]], oy + (w - sl->x[p[i]]), sl->z[p[i]]);
|
||||
efl_gfx_map_uv_set(sl->obj, i, sl->v[p[i]] , 1. - sl->u[p[i]]);
|
||||
efl_gfx_mapping_coord_absolute_set(sl->obj, i, ox + sl->y[p[i]], oy + (w - sl->x[p[i]]), sl->z[p[i]]);
|
||||
efl_gfx_mapping_uv_set(sl->obj, i, sl->v[p[i]] , 1. - sl->u[p[i]]);
|
||||
}
|
||||
}
|
||||
evas_object_image_fill_set(sl->obj, 0, 0, ow, oh);
|
||||
|
@ -125,22 +125,22 @@ static void
|
|||
_slice_3d(State *st EINA_UNUSED, Slice *sl, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
|
||||
{
|
||||
// vanishing point is center of page, and focal dist is 1024
|
||||
efl_gfx_map_perspective_3d_absolute(sl->obj, x + (w / 2), y + (h / 2), 0, 1024);
|
||||
efl_gfx_mapping_perspective_3d_absolute(sl->obj, x + (w / 2), y + (h / 2), 0, 1024);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
double xx, yy;
|
||||
|
||||
efl_gfx_map_coord_absolute_get(sl->obj, i, &xx, &yy, NULL);
|
||||
efl_gfx_map_coord_absolute_set(sl->obj, i, xx, yy, 0);
|
||||
efl_gfx_mapping_coord_absolute_get(sl->obj, i, &xx, &yy, NULL);
|
||||
efl_gfx_mapping_coord_absolute_set(sl->obj, i, xx, yy, 0);
|
||||
}
|
||||
efl_gfx_entity_visible_set(sl->obj, efl_gfx_map_clockwise_get(sl->obj));
|
||||
efl_gfx_entity_visible_set(sl->obj, efl_gfx_mapping_clockwise_get(sl->obj));
|
||||
}
|
||||
|
||||
static void
|
||||
_slice_light(State *st EINA_UNUSED, Slice *sl, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
|
||||
{
|
||||
efl_gfx_map_lightning_3d_absolute(sl->obj,
|
||||
efl_gfx_mapping_lighting_3d_absolute(sl->obj,
|
||||
// light position
|
||||
// (centered over page 10 * h toward camera)
|
||||
x + (w / 2), y + (h / 2), -10000,
|
||||
|
@ -153,11 +153,11 @@ _slice_light(State *st EINA_UNUSED, Slice *sl, Evas_Coord x, Evas_Coord y, Evas_
|
|||
{
|
||||
int r, g, b, a;
|
||||
|
||||
efl_gfx_map_color_get(sl->obj, i, &r, &g, &b, &a);
|
||||
efl_gfx_mapping_color_get(sl->obj, i, &r, &g, &b, &a);
|
||||
r = (double)r * 1.2; if (r > 255) r = 255;
|
||||
g = (double)g * 1.2; if (g > 255) g = 255;
|
||||
b = (double)b * 1.2; if (b > 255) b = 255;
|
||||
efl_gfx_map_color_set(sl->obj, i, r, g, b, a);
|
||||
efl_gfx_mapping_color_set(sl->obj, i, r, g, b, a);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ _slice_obj_color_sum(Slice *s, int p, int *r, int *g, int *b, int *a)
|
|||
int rr = 0, gg = 0, bb = 0, aa = 0;
|
||||
|
||||
if (!s) return 0;
|
||||
efl_gfx_map_color_get(s->obj, p, &rr, &gg, &bb, &aa);
|
||||
efl_gfx_mapping_color_get(s->obj, p, &rr, &gg, &bb, &aa);
|
||||
*r += rr; *g += gg; *b += bb; *a += aa;
|
||||
return 1;
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ static void
|
|||
_slice_obj_color_set(Slice *s, int p, int r, int g, int b, int a)
|
||||
{
|
||||
if (!s) return;
|
||||
efl_gfx_map_color_set(s->obj, p, r, g, b, a);
|
||||
efl_gfx_mapping_color_set(s->obj, p, r, g, b, a);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -248,7 +248,7 @@ _text_resize(void *data EINA_UNUSED, const Efl_Event *ev)
|
|||
Eina_Size2D sz;
|
||||
|
||||
sz = efl_gfx_entity_size_get(ev->object);
|
||||
efl_gfx_size_hint_min_set(ev->object, sz);
|
||||
efl_gfx_hint_size_min_set(ev->object, sz);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -258,7 +258,7 @@ _textblock_resize(void *data EINA_UNUSED, const Efl_Event *ev)
|
|||
|
||||
evas_object_textblock_size_native_get(ev->object, &w, &h);
|
||||
evas_object_textblock_style_insets_get(ev->object, &l, &r, &t, &b);
|
||||
efl_gfx_size_hint_min_set(ev->object, EINA_SIZE2D(w + l + r, h + t + b));
|
||||
efl_gfx_hint_size_min_set(ev->object, EINA_SIZE2D(w + l + r, h + t + b));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -345,28 +345,28 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
{
|
||||
box2 = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0.5, 0.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE));
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_align_set(efl_added, 0.5, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE));
|
||||
efl_pack(box, box2);
|
||||
|
||||
/* FIXME: Efl.Ui.Text doesn't work as expected. */
|
||||
o = efl_add(EFL_UI_TEXT_CLASS, win,
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0.0, 1.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, 1.0, 0.5));
|
||||
efl_gfx_hint_weight_set(efl_added, 0.0, 1.0),
|
||||
efl_gfx_hint_align_set(efl_added, 1.0, 0.5));
|
||||
efl_text_set(o, "Filter:");
|
||||
efl_pack(box2, o);
|
||||
|
||||
o = spinner = elm_spinner_add(win);
|
||||
efl_gfx_size_hint_weight_set(o, 1.0, 1.0);
|
||||
efl_gfx_size_hint_align_set(o, -1.0, 0.5);
|
||||
efl_gfx_hint_weight_set(o, 1.0, 1.0);
|
||||
efl_gfx_hint_align_set(o, -1.0, 0.5);
|
||||
_spinner_fill(o);
|
||||
efl_pack(box2, o);
|
||||
evas_object_show(o);
|
||||
|
||||
o = elm_spinner_add(win);
|
||||
efl_gfx_size_hint_weight_set(o, 0.0, 1.0);
|
||||
efl_gfx_size_hint_align_set(o, -1.0, 0.5);
|
||||
efl_gfx_hint_weight_set(o, 0.0, 1.0);
|
||||
efl_gfx_hint_align_set(o, -1.0, 0.5);
|
||||
elm_spinner_min_max_set(o, 6, 120);
|
||||
elm_spinner_value_set(o, default_font_size);
|
||||
efl_event_callback_add(o, ELM_SPINNER_EVENT_DELAY_CHANGED, _font_size_change, win);
|
||||
|
@ -375,8 +375,8 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
o = efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Flip"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0.0, 1.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_gfx_hint_weight_set(efl_added, 0.0, 1.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _flip_click, win));
|
||||
efl_pack(box2, o);
|
||||
}
|
||||
|
@ -384,10 +384,10 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
{
|
||||
box2 = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_pack_padding_set(efl_added, 5, 5, 1),
|
||||
efl_gfx_size_hint_margin_set(efl_added, 5, 5, 5, 5),
|
||||
efl_gfx_hint_margin_set(efl_added, 5, 5, 5, 5),
|
||||
efl_pack_align_set(efl_added, 0, 0.5));
|
||||
efl_pack(box, box2);
|
||||
|
||||
|
@ -399,10 +399,10 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
if (!images[k].path) break;
|
||||
snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), images[k].path);
|
||||
o = efl_add(EFL_UI_IMAGE_CLASS, win,
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0.5, 0.5),
|
||||
efl_gfx_size_hint_max_set(efl_added, size),
|
||||
efl_gfx_size_hint_min_set(efl_added, size),
|
||||
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
|
||||
efl_gfx_hint_size_max_set(efl_added, size),
|
||||
efl_gfx_hint_size_min_set(efl_added, size),
|
||||
efl_file_set(efl_added, buf, NULL),
|
||||
efl_name_set(efl_added, images[k].src_name),
|
||||
elm_object_tooltip_text_set(efl_added, images[k].src_name));
|
||||
|
@ -429,10 +429,10 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
};
|
||||
|
||||
o = elm_colorselector_add(win);
|
||||
efl_gfx_size_hint_weight_set(o, 1.0, 0);
|
||||
efl_gfx_size_hint_align_set(o, -1.0, 0);
|
||||
efl_gfx_hint_weight_set(o, 1.0, 0);
|
||||
efl_gfx_hint_align_set(o, -1.0, 0);
|
||||
elm_colorselector_mode_set(o, ELM_COLORSELECTOR_PALETTE);
|
||||
efl_gfx_size_hint_max_set(o, maxsz);
|
||||
efl_gfx_hint_size_max_set(o, maxsz);
|
||||
efl_name_set(o, "myColor");
|
||||
elm_object_tooltip_text_set(o, "Pick a color to use as variable 'myColor'");
|
||||
evas_object_smart_callback_add(o, "changed", _colsel_cb, win);
|
||||
|
@ -453,14 +453,14 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
box2 = efl_add(EFL_UI_BOX_STACK_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack_align_set(efl_added, 0.5, 0.5));
|
||||
efl_pack(flip, box2);
|
||||
|
||||
// Note: No TEXT object with EO APIs
|
||||
o = text = evas_object_text_add(evas_object_evas_get(win));
|
||||
efl_event_callback_add(o, EFL_GFX_ENTITY_EVENT_RESIZE, _text_resize, NULL);
|
||||
efl_event_callback_add(o, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _text_resize, NULL);
|
||||
efl_text_font_set(o, "Sans:style=Bold", default_font_size);
|
||||
efl_gfx_entity_scale_set(text, elm_config_scale_get());
|
||||
efl_text_set(o, "EFL");
|
||||
|
@ -469,8 +469,8 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
o = box2 = efl_add(EFL_UI_BOX_STACK_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack_align_set(efl_added, 0.5, 0.5));
|
||||
efl_pack(flip, box2);
|
||||
|
||||
|
@ -492,7 +492,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
// Experimental textblock support
|
||||
o = tb = evas_object_textblock_add(evas_object_evas_get(win));
|
||||
efl_event_callback_add(o, EFL_CANVAS_TEXT_EVENT_STYLE_INSETS_CHANGED, _textblock_resize, NULL);
|
||||
efl_event_callback_add(o, EFL_GFX_ENTITY_EVENT_RESIZE, _textblock_resize, NULL);
|
||||
efl_event_callback_add(o, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _textblock_resize, NULL);
|
||||
Evas_Textblock_Style *st = evas_textblock_style_new();
|
||||
evas_textblock_style_set(st, "DEFAULT='font=Sans font_size=20 color=#FFF wrap=word'");
|
||||
for (size_t k = 0; k < EINA_C_ARRAY_LENGTH(programs); k++)
|
||||
|
|
|
@ -63,12 +63,12 @@ _create_box_contents(Evas_Object *box)
|
|||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, box,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1, 1),
|
||||
efl_gfx_hint_weight_set(efl_added, 1, 1),
|
||||
efl_pack_end(box, efl_added));
|
||||
|
||||
radio_group = radio = efl_add(EFL_UI_RADIO_CLASS, hbox,
|
||||
efl_pack_end(hbox, efl_added),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0, 0),
|
||||
efl_gfx_hint_weight_set(efl_added, 0, 0),
|
||||
efl_ui_radio_state_value_set(efl_added, 0));
|
||||
|
||||
content = efl_add(EFL_UI_BOX_CLASS, hbox,
|
||||
|
@ -92,7 +92,7 @@ _create_box_contents(Evas_Object *box)
|
|||
efl_ui_radio_group_add(efl_added, radio_group),
|
||||
efl_pack_end(hbox, efl_added),
|
||||
efl_ui_radio_state_value_set(efl_added, i + 1),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0, 0));
|
||||
efl_gfx_hint_weight_set(efl_added, 0, 0));
|
||||
|
||||
content = efl_add(content_class[i], hbox,
|
||||
efl_pack_end(hbox, efl_added));
|
||||
|
@ -147,12 +147,12 @@ test_part_background(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||
|
||||
vbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1, 1),
|
||||
efl_gfx_hint_weight_set(efl_added, 1, 1),
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_pack_end(vbox, efl_added));
|
||||
|
||||
reset_btn = efl_add(EFL_UI_BUTTON_CLASS, hbox,
|
||||
|
@ -172,7 +172,7 @@ test_part_background(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_pack_end(vbox, scr);
|
||||
|
||||
vbox = efl_add(EFL_UI_BOX_CLASS, scr,
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1, 1),
|
||||
efl_gfx_hint_weight_set(efl_added, 1, 1),
|
||||
efl_content_set(scr, efl_added));
|
||||
|
||||
radio_group = _create_box_contents(vbox);
|
||||
|
|
|
@ -45,7 +45,7 @@ pulse_start(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_widget_disabled_set(td->btn_start, EINA_TRUE);
|
||||
efl_ui_widget_disabled_set(td->btn_stop, EINA_FALSE);
|
||||
|
||||
efl_event_callback_add(td->ico, EFL_EVENT_ANIMATOR_TICK, animate, td);
|
||||
efl_event_callback_add(td->ico, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, animate, td);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -62,7 +62,7 @@ pulse_stop(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_widget_disabled_set(td->btn_start, EINA_FALSE);
|
||||
efl_ui_widget_disabled_set(td->btn_stop, EINA_TRUE);
|
||||
|
||||
efl_event_callback_del(td->ico, EFL_EVENT_ANIMATOR_TICK, animate, td);
|
||||
efl_event_callback_del(td->ico, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, animate, td);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -94,7 +94,7 @@ test_part_shadow(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
efl_content_set(win, bx);
|
||||
|
||||
pb = efl_add(EFL_UI_PROGRESSBAR_CLASS, win);
|
||||
efl_gfx_size_hint_weight_set(pb, EFL_GFX_SIZE_HINT_EXPAND, 0);
|
||||
efl_gfx_hint_weight_set(pb, EFL_GFX_HINT_EXPAND, 0);
|
||||
efl_ui_progressbar_pulse_mode_set(pb, EINA_TRUE);
|
||||
efl_pack(bx, pb);
|
||||
td->pb1 = pb;
|
||||
|
@ -122,7 +122,7 @@ test_part_shadow(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
pb = efl_add(EFL_UI_PROGRESSBAR_CLASS, win);
|
||||
efl_ui_progressbar_pulse_mode_set(pb, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(pb, EFL_GFX_SIZE_HINT_EXPAND, 0);
|
||||
efl_gfx_hint_weight_set(pb, EFL_GFX_HINT_EXPAND, 0);
|
||||
efl_pack(bx, pb);
|
||||
td->pb4 = pb;
|
||||
|
||||
|
@ -143,7 +143,7 @@ test_part_shadow(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
hbx = efl_add(EFL_UI_BOX_CLASS, win);
|
||||
efl_ui_direction_set(hbx, EFL_UI_DIR_HORIZONTAL);
|
||||
efl_gfx_size_hint_weight_set(hbx, EFL_GFX_SIZE_HINT_EXPAND, 0);
|
||||
efl_gfx_hint_weight_set(hbx, EFL_GFX_HINT_EXPAND, 0);
|
||||
efl_pack(bx, hbx);
|
||||
|
||||
// FIXME: Needs wheel progressbar class
|
||||
|
@ -176,7 +176,7 @@ test_part_shadow(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
bt_bx = efl_add(EFL_UI_BOX_CLASS, win);
|
||||
efl_ui_direction_set(bt_bx, EFL_UI_DIR_HORIZONTAL);
|
||||
efl_gfx_size_hint_weight_set(bt_bx, EFL_GFX_SIZE_HINT_EXPAND, 0);
|
||||
efl_gfx_hint_weight_set(bt_bx, EFL_GFX_HINT_EXPAND, 0);
|
||||
efl_pack(bx, bt_bx);
|
||||
|
||||
bt = efl_add(EFL_UI_BUTTON_CLASS, win, efl_text_set(efl_added, "Start"));
|
||||
|
|
|
@ -816,7 +816,7 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
|
|||
efl_add(EFL_UI_TEXT_CLASS, bx,
|
||||
efl_text_set(efl_added, "Clicking the image will play/pause animation."),
|
||||
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1, 0),
|
||||
efl_gfx_hint_weight_set(efl_added, 1, 0),
|
||||
efl_canvas_text_style_set(efl_added, NULL, "DEFAULT='align=center font=Sans font_size=10 color=#fff wrap=word'"),
|
||||
efl_pack(bx, efl_added)
|
||||
);
|
||||
|
@ -842,8 +842,8 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
|
|||
);
|
||||
|
||||
// add move/resize callbacks to resize rect manually
|
||||
efl_event_callback_add(zoomable, EFL_GFX_ENTITY_EVENT_RESIZE, _zoomable_move_resize_cb, rect);
|
||||
efl_event_callback_add(zoomable, EFL_GFX_ENTITY_EVENT_MOVE, _zoomable_move_resize_cb, rect);
|
||||
efl_event_callback_add(zoomable, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _zoomable_move_resize_cb, rect);
|
||||
efl_event_callback_add(zoomable, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _zoomable_move_resize_cb, rect);
|
||||
|
||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 320));
|
||||
}
|
||||
|
|
|
@ -26,36 +26,36 @@ weights_cb(void *data, const Efl_Event *event)
|
|||
switch (mode)
|
||||
{
|
||||
case NONE:
|
||||
efl_gfx_size_hint_align_set(data, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(data, 0.5, 0.5);
|
||||
for (int i = 0; i < CNT; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_hint_weight_set(objects[i], 0, 0);
|
||||
break;
|
||||
case NONE_BUT_FILL:
|
||||
efl_gfx_size_hint_align_set(data, -1, -1);
|
||||
efl_gfx_hint_align_set(data, -1, -1);
|
||||
for (int i = 0; i < CNT; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_hint_weight_set(objects[i], 0, 0);
|
||||
break;
|
||||
case EQUAL:
|
||||
efl_gfx_size_hint_align_set(data, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(data, 0.5, 0.5);
|
||||
for (int i = 0; i < CNT; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 1, 1);
|
||||
efl_gfx_hint_weight_set(objects[i], 1, 1);
|
||||
break;
|
||||
case ONE:
|
||||
efl_gfx_size_hint_align_set(data, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(data, 0.5, 0.5);
|
||||
for (int i = 0; i < 6; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_size_hint_weight_set(objects[6], 1, 1);
|
||||
efl_gfx_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_hint_weight_set(objects[6], 1, 1);
|
||||
for (int i = 7; i < CNT; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_hint_weight_set(objects[i], 0, 0);
|
||||
break;
|
||||
case TWO:
|
||||
efl_gfx_size_hint_align_set(data, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(data, 0.5, 0.5);
|
||||
for (int i = 0; i < 5; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_size_hint_weight_set(objects[5], 1, 1);
|
||||
efl_gfx_size_hint_weight_set(objects[6], 1, 1);
|
||||
efl_gfx_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_hint_weight_set(objects[5], 1, 1);
|
||||
efl_gfx_hint_weight_set(objects[6], 1, 1);
|
||||
for (int i = 7; i < CNT; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_hint_weight_set(objects[i], 0, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ user_min_slider_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
|||
{
|
||||
int val = elm_slider_value_get(event->object);
|
||||
|
||||
efl_gfx_size_hint_min_set(objects[3], EINA_SIZE2D(val, val));
|
||||
efl_gfx_hint_size_min_set(objects[3], EINA_SIZE2D(val, val));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -85,7 +85,7 @@ margin_slider_cb(void *data, const Efl_Event *event)
|
|||
Eo *win = data, *box;
|
||||
|
||||
box = efl_key_wref_get(win, "box");
|
||||
efl_gfx_size_hint_margin_set(box, val, val, val, val);
|
||||
efl_gfx_hint_margin_set(box, val, val, val, val);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -120,8 +120,8 @@ alignh_btn_slider_cb(void *data, const Efl_Event *event)
|
|||
|
||||
btn = efl_key_wref_get(win, "button");
|
||||
val = elm_slider_value_get(event->object);
|
||||
efl_gfx_size_hint_align_get(btn, NULL, &av);
|
||||
efl_gfx_size_hint_align_set(btn, val, av);
|
||||
efl_gfx_hint_align_get(btn, NULL, &av);
|
||||
efl_gfx_hint_align_set(btn, val, av);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -132,8 +132,8 @@ alignv_btn_slider_cb(void *data, const Efl_Event *event)
|
|||
|
||||
btn = efl_key_wref_get(win, "button");
|
||||
val = elm_slider_value_get(event->object);
|
||||
efl_gfx_size_hint_align_get(btn, &ah, NULL);
|
||||
efl_gfx_size_hint_align_set(btn, ah, val);
|
||||
efl_gfx_hint_align_get(btn, &ah, NULL);
|
||||
efl_gfx_hint_align_set(btn, ah, val);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -209,7 +209,7 @@ _custom_layout_update(Eo *pack, const void *data EINA_UNUSED)
|
|||
|
||||
r.x = (rp.w / count) * i;
|
||||
r.y = (rp.h / count) * i;
|
||||
r.size = efl_gfx_size_hint_combined_min_get(sobj);
|
||||
r.size = efl_gfx_hint_size_combined_min_get(sobj);
|
||||
efl_gfx_entity_geometry_set(sobj, r);
|
||||
i++;
|
||||
}
|
||||
|
@ -248,15 +248,15 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
vbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
|
||||
efl_gfx_size_hint_margin_set(vbox, 5, 5, 5, 5);
|
||||
efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
|
||||
elm_win_resize_object_add(win, vbox);
|
||||
|
||||
|
||||
/* controls */
|
||||
f = elm_frame_add(win);
|
||||
elm_object_text_set(f, "Controls");
|
||||
efl_gfx_size_hint_align_set(f, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(f, 1, 0);
|
||||
efl_gfx_hint_align_set(f, -1, -1);
|
||||
efl_gfx_hint_weight_set(f, 1, 0);
|
||||
efl_pack(vbox, f);
|
||||
efl_gfx_entity_visible_set(f, 1);
|
||||
|
||||
|
@ -269,14 +269,14 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* weights radio group */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
chk = o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "No weight");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, win);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, NONE);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
@ -284,7 +284,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "No weight + box fill");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, win);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, NONE_BUT_FILL);
|
||||
elm_radio_group_add(o, chk);
|
||||
efl_pack(bx, o);
|
||||
|
@ -293,7 +293,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "Equal weights");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, win);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, EQUAL);
|
||||
elm_radio_group_add(o, chk);
|
||||
efl_pack(bx, o);
|
||||
|
@ -302,7 +302,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "One weight only");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, win);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, ONE);
|
||||
elm_radio_group_add(o, chk);
|
||||
efl_pack(bx, o);
|
||||
|
@ -311,7 +311,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "Two weights");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, win);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, TWO);
|
||||
elm_radio_group_add(o, chk);
|
||||
efl_pack(bx, o);
|
||||
|
@ -323,9 +323,9 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* misc */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -337,7 +337,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_check_selected_set(o, 0);
|
||||
elm_object_text_set(o, "Flow");
|
||||
efl_event_callback_add(o, EFL_UI_CHECK_EVENT_CHANGED, flow_check_cb, win);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0);
|
||||
efl_gfx_hint_align_set(o, 0, 0);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
@ -345,7 +345,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_check_selected_set(o, 1);
|
||||
elm_object_text_set(o, "Horizontal");
|
||||
efl_event_callback_add(o, EFL_UI_CHECK_EVENT_CHANGED, horiz_check_cb, win);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0);
|
||||
efl_gfx_hint_align_set(o, 0, 0);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
@ -353,7 +353,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_check_selected_set(o, 0);
|
||||
elm_object_text_set(o, "Homogenous");
|
||||
efl_event_callback_add(o, EFL_UI_CHECK_EVENT_CHANGED, homo_check_cb, win);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0);
|
||||
efl_gfx_hint_align_set(o, 0, 0);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
@ -361,7 +361,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_check_selected_set(o, 0);
|
||||
elm_object_text_set(o, "Homogenous + Max");
|
||||
efl_event_callback_add(o, EFL_UI_CHECK_EVENT_CHANGED, max_size_check_cb, win);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0);
|
||||
efl_gfx_hint_align_set(o, 0, 0);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
@ -369,8 +369,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_check_selected_set(o, 0);
|
||||
elm_object_text_set(o, "Custom layout");
|
||||
efl_event_callback_add(o, EFL_UI_CHECK_EVENT_CHANGED, custom_check_cb, win);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0);
|
||||
efl_gfx_size_hint_weight_set(o, 0, 1);
|
||||
efl_gfx_hint_align_set(o, 0, 0);
|
||||
efl_gfx_hint_weight_set(o, 0, 1);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
@ -378,9 +378,9 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* user min size setter */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -392,8 +392,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_slider_indicator_format_set(o, "%.0fpx");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, user_min_slider_cb, NULL);
|
||||
elm_slider_min_max_set(o, 0, 250);
|
||||
elm_slider_inverted_set(o, 1);
|
||||
|
@ -405,9 +405,9 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* inner box padding */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -419,8 +419,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_slider_indicator_format_set(o, "%.0fpx");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, padding_slider_cb, win);
|
||||
elm_slider_min_max_set(o, 0, 40);
|
||||
elm_slider_inverted_set(o, 1);
|
||||
|
@ -432,9 +432,9 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* outer margin */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -446,8 +446,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_slider_indicator_format_set(o, "%.0fpx");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, margin_slider_cb, win);
|
||||
elm_slider_min_max_set(o, 0, 40);
|
||||
elm_slider_inverted_set(o, 1);
|
||||
|
@ -459,9 +459,9 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* Box align */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -473,8 +473,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_slider_indicator_format_set(o, "%.1f");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignv_slider_cb, win);
|
||||
elm_slider_min_max_set(o, -0.1, 1.0);
|
||||
elm_slider_step_set(o, 0.1);
|
||||
|
@ -486,9 +486,9 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_slider_indicator_format_set(o, "%.1f");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 1);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 0);
|
||||
efl_gfx_size_hint_min_set(o, EINA_SIZE2D(100, 0));
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 0);
|
||||
efl_gfx_hint_size_min_set(o, EINA_SIZE2D(100, 0));
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignh_slider_cb, win);
|
||||
elm_slider_min_max_set(o, -0.1, 1.0);
|
||||
elm_slider_step_set(o, 0.1);
|
||||
|
@ -499,9 +499,9 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* Button align */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -513,8 +513,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_slider_indicator_format_set(o, "%.1f");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignv_btn_slider_cb, win);
|
||||
elm_slider_min_max_set(o, 0.0, 1.0);
|
||||
elm_slider_step_set(o, 0.1);
|
||||
|
@ -526,9 +526,9 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
elm_slider_indicator_format_set(o, "%.1f");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 1);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 0);
|
||||
efl_gfx_size_hint_min_set(o, EINA_SIZE2D(100, 0));
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 0);
|
||||
efl_gfx_hint_size_min_set(o, EINA_SIZE2D(100, 0));
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignh_btn_slider_cb, win);
|
||||
elm_slider_min_max_set(o, -0.1, 1.0);
|
||||
elm_slider_step_set(o, 0.1);
|
||||
|
@ -540,8 +540,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* contents */
|
||||
f = elm_frame_add(win);
|
||||
elm_object_text_set(f, "Contents");
|
||||
efl_gfx_size_hint_align_set(f, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(f, 1, 1);
|
||||
efl_gfx_hint_align_set(f, -1, -1);
|
||||
efl_gfx_hint_weight_set(f, 1, 1);
|
||||
efl_pack(vbox, f);
|
||||
efl_gfx_entity_visible_set(f, 1);
|
||||
|
||||
|
@ -549,82 +549,82 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
|
||||
efl_key_wref_set(win, "box", bx);
|
||||
efl_pack_padding_set(bx, 10, 10, EINA_TRUE);
|
||||
efl_gfx_size_hint_align_set(bx, 0.5, 0.5);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_gfx_hint_align_set(bx, 0.5, 0.5);
|
||||
efl_gfx_hint_weight_set(bx, 1, 1);
|
||||
efl_content_set(f, bx);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "Btn1");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, 0.5);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_align_set(o, 0.5, 0.5);
|
||||
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "Button 2");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_label_add(win);
|
||||
elm_label_line_wrap_set(o, ELM_WRAP_WORD);
|
||||
elm_object_text_set(o, "This label is not marked as fill");
|
||||
efl_gfx_size_hint_align_set(o, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0.5, 0.5);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "Min size");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, 1.0);
|
||||
efl_gfx_size_hint_aspect_set(o, EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 1));
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_hint_align_set(o, 0.5, 1.0);
|
||||
efl_gfx_hint_aspect_set(o, EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 1));
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "Quit!");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, 0.0);
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_hint_align_set(o, 0.5, 0.0);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_label_add(win);
|
||||
elm_label_line_wrap_set(o, ELM_WRAP_WORD);
|
||||
elm_object_text_set(o, "This label on the other hand<br/>is marked as align=fill.");
|
||||
efl_gfx_size_hint_align_set(o, -1, -1);
|
||||
efl_gfx_hint_align_set(o, -1, -1);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_key_wref_set(win, "button", o);
|
||||
efl_text_set(o, "Button with a quite long text.");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_max_set(o, EINA_SIZE2D(200, 100));
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_size_max_set(o, EINA_SIZE2D(200, 100));
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "BtnA");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_size_hint_aspect_set(o, EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 2));
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_hint_aspect_set(o, EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 2));
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "BtnB");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "BtnC");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
|
|
@ -54,11 +54,11 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_content_set(win, efl_added),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(360, 240)));
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
|
||||
|
||||
dt1 = efl_add(EFL_UI_CLOCK_CLASS, bx,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_HOUR, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_MINUTE, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_AMPM, EINA_FALSE),
|
||||
|
@ -69,8 +69,8 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
efl_pack(bx, efl_added));
|
||||
|
||||
dt2 = efl_add(EFL_UI_CLOCK_CLASS, bx,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_YEAR, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_MONTH, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_DATE, EINA_FALSE),
|
||||
|
@ -80,21 +80,21 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
elm_object_disabled_set(dt2, EINA_TRUE);
|
||||
|
||||
dt3 = efl_add(EFL_UI_CLOCK_CLASS, bx,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, bx,
|
||||
efl_text_set(efl_added, "Editable Clock:"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_FALSE, EINA_TRUE),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 25)),
|
||||
efl_gfx_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_gfx_hint_align_set(efl_added, 0, 0.5),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_TRUE),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 25)),
|
||||
efl_pack(bx, efl_added));
|
||||
|
||||
dt4 = efl_add(EFL_UI_CLOCK_CLASS, bx,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_ui_clock_edit_mode_set(efl_added, EINA_TRUE),
|
||||
efl_ui_clock_pause_set(efl_added, EINA_TRUE),
|
||||
efl_pack(bx, efl_added));
|
||||
|
|
|
@ -80,7 +80,7 @@ static Eo *page_add(Page_Type p, Eo *parent)
|
|||
page = efl_add(EFL_UI_LAYOUT_CLASS, parent,
|
||||
efl_file_set(efl_added, buf, "page"),
|
||||
efl_text_set(efl_part(efl_added, "text"), "Layout Page"));
|
||||
efl_gfx_size_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
break;
|
||||
case LIST:
|
||||
page = elm_list_add(parent);
|
||||
|
@ -98,7 +98,7 @@ static Eo *page_add(Page_Type p, Eo *parent)
|
|||
case BUTTON:
|
||||
page = efl_add(EFL_UI_BUTTON_CLASS, parent,
|
||||
efl_text_set(efl_added, "Button Page"));
|
||||
efl_gfx_size_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
break;
|
||||
default:
|
||||
snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj",
|
||||
|
@ -106,7 +106,7 @@ static Eo *page_add(Page_Type p, Eo *parent)
|
|||
page = efl_add(EFL_UI_LAYOUT_CLASS, parent,
|
||||
efl_file_set(efl_added, buf, "page"),
|
||||
efl_text_set(efl_part(efl_added, "text"), "Layout Page"));
|
||||
efl_gfx_size_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -339,8 +339,8 @@ static void page_size_cb(void *data,
|
|||
// Width
|
||||
fr = elm_frame_add(box);
|
||||
elm_object_text_set(fr, "Width");
|
||||
efl_gfx_size_hint_align_set(fr, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(fr, 1, 1);
|
||||
efl_gfx_hint_align_set(fr, -1, -1);
|
||||
efl_gfx_hint_weight_set(fr, 1, 1);
|
||||
efl_pack(box, fr);
|
||||
efl_gfx_entity_visible_set(fr, 1);
|
||||
|
||||
|
@ -355,7 +355,7 @@ static void page_size_cb(void *data,
|
|||
sl = efl_add(EFL_UI_SLIDER_CLASS, inbox,
|
||||
efl_ui_range_min_max_set(efl_added, 100, 200),
|
||||
efl_ui_range_value_set(efl_added, params->w),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED,
|
||||
width_slider_cb, params),
|
||||
efl_pack_end(inbox, efl_added));
|
||||
|
@ -380,8 +380,8 @@ static void page_size_cb(void *data,
|
|||
// Height
|
||||
fr = elm_frame_add(box);
|
||||
elm_object_text_set(fr, "Height");
|
||||
efl_gfx_size_hint_align_set(fr, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(fr, 1, 1);
|
||||
efl_gfx_hint_align_set(fr, -1, -1);
|
||||
efl_gfx_hint_weight_set(fr, 1, 1);
|
||||
efl_pack(box, fr);
|
||||
efl_gfx_entity_visible_set(fr, 1);
|
||||
|
||||
|
@ -396,7 +396,7 @@ static void page_size_cb(void *data,
|
|||
sl = efl_add(EFL_UI_SLIDER_CLASS, inbox,
|
||||
efl_ui_range_min_max_set(efl_added, 100, 300),
|
||||
efl_ui_range_value_set(efl_added, params->h),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED,
|
||||
height_slider_cb, params),
|
||||
efl_pack_end(inbox, efl_added));
|
||||
|
@ -610,7 +610,7 @@ static void current_page_cb(void *data,
|
|||
efl_pack_end(box, efl_added));
|
||||
|
||||
sp = efl_add(EFL_UI_SPIN_BUTTON_CLASS, box,
|
||||
efl_gfx_size_hint_align_set(efl_added, -1, -1),
|
||||
efl_gfx_hint_align_set(efl_added, -1, -1),
|
||||
efl_pack_end(box, efl_added));
|
||||
|
||||
if (efl_content_count(pager) > 0)
|
||||
|
@ -679,7 +679,7 @@ void test_ui_pager(void *data EINA_UNUSED,
|
|||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||
|
||||
panes = efl_add(EFL_UI_PANES_CLASS, win,
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1, 1),
|
||||
efl_gfx_hint_weight_set(efl_added, 1, 1),
|
||||
efl_ui_panes_split_ratio_set(efl_added, 0.3),
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ static Eo *page_add(Page_Type p, Eo *parent)
|
|||
page = efl_add(EFL_UI_LAYOUT_CLASS, parent,
|
||||
efl_file_set(efl_added, buf, "page"),
|
||||
efl_text_set(efl_part(efl_added, "text"), "Layout Page"));
|
||||
efl_gfx_size_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
break;
|
||||
case LIST:
|
||||
page = elm_list_add(parent);
|
||||
|
@ -103,7 +103,7 @@ static Eo *page_add(Page_Type p, Eo *parent)
|
|||
case BUTTON:
|
||||
page = efl_add(EFL_UI_BUTTON_CLASS, parent,
|
||||
efl_text_set(efl_added, "Button Page"));
|
||||
efl_gfx_size_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
break;
|
||||
default:
|
||||
snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj",
|
||||
|
@ -111,7 +111,7 @@ static Eo *page_add(Page_Type p, Eo *parent)
|
|||
page = efl_add(EFL_UI_LAYOUT_CLASS, parent,
|
||||
efl_file_set(efl_added, buf, "page"),
|
||||
efl_text_set(efl_part(efl_added, "text"), "Layout Page"));
|
||||
efl_gfx_size_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -395,8 +395,8 @@ static void page_size_cb(void *data,
|
|||
// Width
|
||||
fr = elm_frame_add(box);
|
||||
elm_object_text_set(fr, "Width");
|
||||
efl_gfx_size_hint_align_set(fr, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(fr, 1, 1);
|
||||
efl_gfx_hint_align_set(fr, -1, -1);
|
||||
efl_gfx_hint_weight_set(fr, 1, 1);
|
||||
efl_pack(box, fr);
|
||||
efl_gfx_entity_visible_set(fr, 1);
|
||||
|
||||
|
@ -411,7 +411,7 @@ static void page_size_cb(void *data,
|
|||
sl = efl_add(EFL_UI_SLIDER_CLASS, inbox,
|
||||
efl_ui_range_min_max_set(efl_added, 100, 200),
|
||||
efl_ui_range_value_set(efl_added, params->w),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED,
|
||||
width_slider_cb, params),
|
||||
efl_pack_end(inbox, efl_added));
|
||||
|
@ -436,8 +436,8 @@ static void page_size_cb(void *data,
|
|||
// Height
|
||||
fr = elm_frame_add(box);
|
||||
elm_object_text_set(fr, "Height");
|
||||
efl_gfx_size_hint_align_set(fr, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(fr, 1, 1);
|
||||
efl_gfx_hint_align_set(fr, -1, -1);
|
||||
efl_gfx_hint_weight_set(fr, 1, 1);
|
||||
efl_pack(box, fr);
|
||||
efl_gfx_entity_visible_set(fr, 1);
|
||||
|
||||
|
@ -452,7 +452,7 @@ static void page_size_cb(void *data,
|
|||
sl = efl_add(EFL_UI_SLIDER_CLASS, inbox,
|
||||
efl_ui_range_min_max_set(efl_added, 100, 300),
|
||||
efl_ui_range_value_set(efl_added, params->h),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED,
|
||||
height_slider_cb, params),
|
||||
efl_pack_end(inbox, efl_added));
|
||||
|
@ -496,7 +496,7 @@ static void padding_cb(void *data,
|
|||
efl_add(EFL_UI_SLIDER_CLASS, box,
|
||||
efl_ui_range_min_max_set(efl_added, 0, 50),
|
||||
efl_ui_range_value_set(efl_added, params->padding),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED,
|
||||
padding_slider_cb, params),
|
||||
efl_pack_end(box, efl_added));
|
||||
|
@ -526,8 +526,8 @@ static void side_page_num_cb(void *data,
|
|||
efl_ui_range_min_max_set(efl_added, 0, 3),
|
||||
efl_ui_range_value_set(efl_added, params->side_page_num),
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1, 1),
|
||||
efl_gfx_size_hint_align_set(efl_added, -1, -1),
|
||||
efl_gfx_hint_weight_set(efl_added, 1, 1),
|
||||
efl_gfx_hint_align_set(efl_added, -1, -1),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED,
|
||||
side_page_num_slider_cb, params),
|
||||
efl_pack_end(box, efl_added));
|
||||
|
@ -724,7 +724,7 @@ static void current_page_cb(void *data,
|
|||
efl_pack_end(box, efl_added));
|
||||
|
||||
sp = efl_add(EFL_UI_SPIN_BUTTON_CLASS, box,
|
||||
efl_gfx_size_hint_align_set(efl_added, -1, -1),
|
||||
efl_gfx_hint_align_set(efl_added, -1, -1),
|
||||
efl_pack_end(box, efl_added));
|
||||
|
||||
if (efl_content_count(pager) > 0)
|
||||
|
@ -860,7 +860,7 @@ void test_ui_pager_scroll(void *data EINA_UNUSED,
|
|||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||
|
||||
panes = efl_add(EFL_UI_PANES_CLASS, win,
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1, 1),
|
||||
efl_gfx_hint_weight_set(efl_added, 1, 1),
|
||||
efl_ui_panes_split_ratio_set(efl_added, 0.3),
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ test_ui_panel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
|
||||
efl_add(EFL_UI_IMAGE_CLASS, table,
|
||||
efl_file_set(efl_added, buf, NULL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
|
||||
efl_pack_table(table, efl_added, 0, 0, 4, 5));
|
||||
|
||||
// Top Panel
|
||||
|
@ -114,17 +114,17 @@ test_ui_panel2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
efl_ui_check_selected_set(efl_added, elm_config_scroll_thumbscroll_enabled_get()),
|
||||
efl_text_set(efl_added, "Enable thumb scroll (temporarily"),
|
||||
efl_event_callback_add(efl_added, EFL_UI_NSTATE_EVENT_CHANGED, _check_changed, NULL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
check = efl_add(EFL_UI_CHECK_CLASS, box,
|
||||
efl_text_set(efl_added, "Reset content on toggle"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, box,
|
||||
efl_text_set(efl_added, "toggle"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
table = efl_add(EFL_UI_TABLE_CLASS, box,
|
||||
|
|
|
@ -21,7 +21,7 @@ test_panes_minsize(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Left - user set min size(110,110)"),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(110, 110)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(110, 110)),
|
||||
efl_content_set(efl_part(panes, "first"), efl_added)
|
||||
);
|
||||
|
||||
|
@ -31,14 +31,14 @@ test_panes_minsize(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
);
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Up - user set min size(10,0)"),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(10, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(10, 0)),
|
||||
efl_content_set(efl_part(panes_h, "first"), efl_added)
|
||||
);
|
||||
efl_ui_panes_part_hint_min_allow_set(efl_part(panes_h, "first"), EINA_TRUE);
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Down - min size 50 40"),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(50, 40)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(50, 40)),
|
||||
efl_content_set(efl_part(panes_h, "second"), efl_added)
|
||||
);
|
||||
|
||||
|
|
|
@ -1009,7 +1009,7 @@ test_ui_anchor_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win);
|
||||
snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
|
||||
efl_file_set(layout, buf, "efl_ui_anchor_popup_layout");
|
||||
efl_gfx_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_content_set(win, layout);
|
||||
|
||||
Eo *efl_ui_popup = efl_add(EFL_UI_ANCHOR_POPUP_CLASS, win);
|
||||
|
@ -1034,7 +1034,7 @@ test_ui_anchor_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
{
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, win);
|
||||
efl_text_set(btn, "anchor");
|
||||
efl_gfx_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _anchor_set_cb, efl_ui_popup);
|
||||
|
||||
snprintf(buf, sizeof(buf), "anchor%d", i+1);
|
||||
|
@ -1043,52 +1043,52 @@ test_ui_anchor_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, win);
|
||||
efl_text_set(btn, "anchor none");
|
||||
efl_gfx_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _anchor_unset_cb, efl_ui_popup);
|
||||
efl_content_set(efl_part(layout, "anchor_none"), btn);
|
||||
|
||||
Eo *table = efl_add(EFL_UI_TABLE_CLASS, efl_ui_popup);
|
||||
efl_gfx_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
|
||||
efl_text_set(btn, "Center Align");
|
||||
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(70, 35));
|
||||
efl_gfx_hint_size_min_set(btn, EINA_SIZE2D(70, 35));
|
||||
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _center_align_cb, p_data);
|
||||
efl_pack_table(table, btn, 0, 0, 2, 1);
|
||||
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
|
||||
efl_text_set(btn, "Top Align");
|
||||
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(70, 35));
|
||||
efl_gfx_hint_size_min_set(btn, EINA_SIZE2D(70, 35));
|
||||
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _top_align_cb, p_data);
|
||||
efl_pack_table(table, btn, 2, 0, 2, 1);
|
||||
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
|
||||
efl_text_set(btn, "Bottom Align");
|
||||
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(70, 35));
|
||||
efl_gfx_hint_size_min_set(btn, EINA_SIZE2D(70, 35));
|
||||
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _bottom_align_cb, p_data);
|
||||
efl_pack_table(table, btn, 4, 0, 2, 1);
|
||||
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
|
||||
efl_text_set(btn, "Left Align");
|
||||
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(100, 35));
|
||||
efl_gfx_hint_size_min_set(btn, EINA_SIZE2D(100, 35));
|
||||
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _left_align_cb, p_data);
|
||||
efl_pack_table(table, btn, 0, 1, 3, 1);
|
||||
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
|
||||
efl_text_set(btn, "Right Align");
|
||||
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(100, 35));
|
||||
efl_gfx_hint_size_min_set(btn, EINA_SIZE2D(100, 35));
|
||||
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _right_align_cb, p_data);
|
||||
efl_pack_table(table, btn, 3, 1, 3, 1);
|
||||
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
|
||||
efl_text_set(btn, "Position Set");
|
||||
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(100, 35));
|
||||
efl_gfx_hint_size_min_set(btn, EINA_SIZE2D(100, 35));
|
||||
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _position_set_cb, p_data);
|
||||
efl_pack_table(table, btn, 0, 2, 3, 1);
|
||||
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
|
||||
efl_text_set(btn, "Resize");
|
||||
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(100, 35));
|
||||
efl_gfx_hint_size_min_set(btn, EINA_SIZE2D(100, 35));
|
||||
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _popup_resize_cb, p_data);
|
||||
efl_pack_table(table, btn, 3, 2, 3, 1);
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ test_ui_progressbar(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_inf
|
|||
efl_pack(bx, efl_added),
|
||||
efl_text_set(efl_added, "percent"),
|
||||
efl_ui_range_min_max_set(efl_added, 0, 100),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(250, 20))
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(250, 20))
|
||||
);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||
|
@ -146,7 +146,7 @@ test_ui_progressbar(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_inf
|
|||
efl_pack(bx, efl_added),
|
||||
efl_text_set(efl_added, "10-100"),
|
||||
efl_ui_progressbar_pulse_set(efl_added, EINA_TRUE),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(250, 20)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(250, 20)),
|
||||
efl_ui_range_min_max_set(efl_added, 10, 100),
|
||||
efl_ui_range_value_set(efl_added, 10)
|
||||
);
|
||||
|
|
|
@ -0,0 +1,319 @@
|
|||
#include "test.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
|
||||
#include <Elementary.h>
|
||||
|
||||
static Eo *layout, *btn1, *btn2, *btn3;
|
||||
|
||||
typedef enum {
|
||||
LEFT,
|
||||
RIGHT,
|
||||
TOP,
|
||||
BOTTOM
|
||||
} Options;
|
||||
|
||||
static void
|
||||
_btn_clicked_to_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
Eo *to, *btn, *obj = event->object;
|
||||
Options opt = (Options)data;
|
||||
double relative;
|
||||
|
||||
btn = efl_key_wref_get(obj, "btn");
|
||||
to = efl_key_wref_get(obj, "to");
|
||||
|
||||
do
|
||||
{
|
||||
if (to == layout)
|
||||
to = btn1;
|
||||
else if (to == btn1)
|
||||
to = btn2;
|
||||
else if (to == btn2)
|
||||
to = btn3;
|
||||
else if (to == btn3)
|
||||
to = layout;
|
||||
}
|
||||
while (btn == to);
|
||||
efl_key_wref_set(obj, "to", to);
|
||||
|
||||
switch (opt)
|
||||
{
|
||||
case LEFT:
|
||||
efl_ui_relative_layout_relation_left_get(layout, btn, NULL, &relative);
|
||||
efl_ui_relative_layout_relation_left_set(layout, btn, to, relative);
|
||||
break;
|
||||
case RIGHT:
|
||||
efl_ui_relative_layout_relation_right_get(layout, btn, NULL, &relative);
|
||||
efl_ui_relative_layout_relation_right_set(layout, btn, to, relative);
|
||||
break;
|
||||
case TOP:
|
||||
efl_ui_relative_layout_relation_top_get(layout, btn, NULL, &relative);
|
||||
efl_ui_relative_layout_relation_top_set(layout, btn, to, relative);
|
||||
break;
|
||||
case BOTTOM:
|
||||
efl_ui_relative_layout_relation_bottom_get(layout, btn, NULL, &relative);
|
||||
efl_ui_relative_layout_relation_bottom_set(layout, btn, to, relative);
|
||||
break;
|
||||
}
|
||||
efl_text_set(obj, ((to == layout) ? "parent" : (char *)efl_text_get(to)));
|
||||
efl_pack_layout_request(layout);
|
||||
}
|
||||
|
||||
static void
|
||||
_slider_changed_relative_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
Options opt = (Options)data;
|
||||
Eo *btn, *slider = event->object;
|
||||
double val;
|
||||
|
||||
btn = efl_key_wref_get(slider, "btn");
|
||||
val = efl_ui_range_value_get(slider);
|
||||
|
||||
switch (opt)
|
||||
{
|
||||
case LEFT:
|
||||
efl_ui_relative_layout_relation_left_set(layout, btn, NULL, val);
|
||||
break;
|
||||
case RIGHT:
|
||||
efl_ui_relative_layout_relation_right_set(layout, btn, NULL, val);
|
||||
break;
|
||||
case TOP:
|
||||
efl_ui_relative_layout_relation_top_set(layout, btn, NULL, val);
|
||||
break;
|
||||
case BOTTOM:
|
||||
efl_ui_relative_layout_relation_bottom_set(layout, btn, NULL, val);
|
||||
break;
|
||||
}
|
||||
efl_pack_layout_request(layout);
|
||||
}
|
||||
|
||||
static void
|
||||
_slider_changed_align_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
char opt = (char)(uintptr_t)data;
|
||||
Eo *btn, *slider = event->object;
|
||||
double val, x, y;
|
||||
|
||||
btn = efl_key_wref_get(slider, "btn");
|
||||
val = efl_ui_range_value_get(slider);
|
||||
|
||||
efl_gfx_hint_align_get(btn, &x, &y);
|
||||
if (opt == 'x')
|
||||
efl_gfx_hint_align_set(btn, val, y);
|
||||
else if (opt == 'y')
|
||||
efl_gfx_hint_align_set(btn, x, val);
|
||||
|
||||
efl_pack_layout_request(layout);
|
||||
}
|
||||
|
||||
static void
|
||||
_setter_add(Eo *vbox, Eo *btn, Options option)
|
||||
{
|
||||
Eo *to, *hbox;
|
||||
char *text = NULL, *btn_text;
|
||||
double relative;
|
||||
|
||||
switch (option)
|
||||
{
|
||||
case LEFT:
|
||||
text = "left";
|
||||
efl_ui_relative_layout_relation_left_get(layout, btn, &to, &relative);
|
||||
break;
|
||||
case RIGHT:
|
||||
text = "right";
|
||||
efl_ui_relative_layout_relation_right_get(layout, btn, &to, &relative);
|
||||
break;
|
||||
case TOP:
|
||||
text = "top";
|
||||
efl_ui_relative_layout_relation_top_get(layout, btn, &to, &relative);
|
||||
break;
|
||||
case BOTTOM:
|
||||
text = "bottom";
|
||||
efl_ui_relative_layout_relation_bottom_get(layout, btn, &to, &relative);
|
||||
break;
|
||||
}
|
||||
btn_text = ((to == layout) ? "parent" : (char *)efl_text_get(to));
|
||||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_pack(vbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, hbox,
|
||||
efl_text_set(efl_added, text),
|
||||
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
|
||||
efl_text_valign_set(efl_added, 0.5),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(40, 0)),
|
||||
efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, hbox,
|
||||
efl_text_set(efl_added, btn_text),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(60, 0)),
|
||||
efl_key_wref_set(efl_added, "to", to),
|
||||
efl_key_wref_set(efl_added, "btn", btn),
|
||||
efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_clicked_to_cb, (void *)option),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, hbox,
|
||||
efl_ui_range_min_max_set(efl_added, 0.0, 1.0),
|
||||
efl_ui_range_step_set(efl_added, 0.1),
|
||||
efl_ui_range_value_set(efl_added, relative),
|
||||
efl_key_wref_set(efl_added, "btn", btn),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _slider_changed_relative_cb, (void *)option),
|
||||
efl_pack(hbox, efl_added));
|
||||
}
|
||||
|
||||
static void
|
||||
_button_frame_add(Eo *box, Eo *btn)
|
||||
{
|
||||
Eo *f, *vbox, *hbox;
|
||||
double align_x, align_y;
|
||||
|
||||
f = efl_add(EFL_UI_FRAME_CLASS, box,
|
||||
efl_text_set(efl_added, efl_text_get(btn)),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
vbox = efl_add(EFL_UI_BOX_CLASS, f,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
|
||||
efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_gfx_hint_margin_set(efl_added, 2, 2, 2, 2),
|
||||
efl_content_set(f, efl_added));
|
||||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_pack(vbox, efl_added));
|
||||
|
||||
efl_add(EFL_CANVAS_RECTANGLE_CLASS, hbox,
|
||||
efl_gfx_color_set(efl_added, 0, 0, 0, 0),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(40, 0)),
|
||||
efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, hbox,
|
||||
efl_text_set(efl_added, "to"),
|
||||
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
|
||||
efl_text_halign_set(efl_added, 0.5),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(60, 0)),
|
||||
efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, hbox,
|
||||
efl_text_set(efl_added, "relative"),
|
||||
efl_text_halign_set(efl_added, 0.5),
|
||||
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
_setter_add(vbox, btn, LEFT);
|
||||
_setter_add(vbox, btn, RIGHT);
|
||||
_setter_add(vbox, btn, TOP);
|
||||
_setter_add(vbox, btn, BOTTOM);
|
||||
|
||||
/* align setter */
|
||||
efl_gfx_hint_align_get(btn, &align_x, &align_y);
|
||||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_pack(vbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, hbox,
|
||||
efl_text_set(efl_added, "align_x"),
|
||||
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(40, 0)),
|
||||
efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, hbox,
|
||||
efl_ui_range_min_max_set(efl_added, 0.0, 1.0),
|
||||
efl_ui_range_step_set(efl_added, 0.1),
|
||||
efl_ui_range_value_set(efl_added, align_x),
|
||||
efl_key_wref_set(efl_added, "btn", btn),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _slider_changed_align_cb, (void *)'x'),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_pack(vbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, hbox,
|
||||
efl_text_set(efl_added, "align_y"),
|
||||
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(40, 0)),
|
||||
efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND),
|
||||
efl_pack(hbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, hbox,
|
||||
efl_ui_range_min_max_set(efl_added, 0.0, 1.0),
|
||||
efl_ui_range_step_set(efl_added, 0.1),
|
||||
efl_ui_range_value_set(efl_added, align_y),
|
||||
efl_key_wref_set(efl_added, "btn", btn),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _slider_changed_align_cb, (void *)'y'),
|
||||
efl_pack(hbox, efl_added));
|
||||
}
|
||||
|
||||
void
|
||||
test_ui_relative_layout(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Eo *win, *vbox, *f, *hbox;
|
||||
|
||||
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||
efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
|
||||
efl_text_set(efl_added, "Efl.Ui.Relative_Layout"),
|
||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||
|
||||
vbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_hint_margin_set(efl_added, 5, 5, 5, 5),
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
/* controls */
|
||||
f = efl_add(EFL_UI_FRAME_CLASS, vbox,
|
||||
efl_text_set(efl_added, "Controls"),
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
|
||||
efl_pack(vbox, efl_added));
|
||||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, f,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_padding_set(efl_added, 10, 0, EINA_TRUE),
|
||||
efl_content_set(f, efl_added));
|
||||
|
||||
/* contents */
|
||||
f = efl_add(EFL_UI_FRAME_CLASS, vbox,
|
||||
efl_text_set(efl_added, "Contents"),
|
||||
efl_pack(vbox, efl_added));
|
||||
|
||||
layout = efl_add(EFL_UI_RELATIVE_LAYOUT_CLASS, f,
|
||||
efl_content_set(f, efl_added));
|
||||
|
||||
btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout,
|
||||
efl_text_set(efl_added, "button1"),
|
||||
efl_gfx_hint_align_set(efl_added, 0.0, 0.0),
|
||||
efl_ui_relative_layout_relation_right_set(layout, efl_added, layout, 0.0),
|
||||
efl_ui_relative_layout_relation_bottom_set(layout, efl_added, layout, 0.0));
|
||||
|
||||
btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout,
|
||||
efl_text_set(efl_added, "button2"),
|
||||
efl_gfx_hint_align_set(efl_added, 0.5, 0.0),
|
||||
efl_ui_relative_layout_relation_left_set(layout, efl_added, btn1, 1.0),
|
||||
efl_ui_relative_layout_relation_bottom_set(layout, efl_added, layout, 0.0));
|
||||
|
||||
btn3 = efl_add(EFL_UI_BUTTON_CLASS, layout,
|
||||
efl_text_set(efl_added, "button3"),
|
||||
efl_ui_relative_layout_relation_left_set(layout, efl_added, btn2, 0.0),
|
||||
efl_ui_relative_layout_relation_top_set(layout, efl_added, btn2, 1.0));
|
||||
|
||||
_button_frame_add(hbox, btn1);
|
||||
_button_frame_add(hbox, btn2);
|
||||
_button_frame_add(hbox, btn3);
|
||||
|
||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(600, 400));
|
||||
efl_gfx_entity_visible_set(win, EINA_TRUE);
|
||||
}
|
|
@ -37,28 +37,28 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 400));
|
||||
|
||||
sc = efl_add(EFL_UI_SCROLLER_CLASS, win,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_SCROLL_START, _scroll_start_cb, NULL),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_SCROLL_STOP, _scroll_stop_cb, NULL),
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, sc,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0.5, 0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
|
||||
efl_gfx_hint_align_set(efl_added, 0.5, 0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_content_set(sc, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, bx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(160, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(160, 0)),
|
||||
efl_pack(bx, efl_added));
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
efl_add(EFL_UI_BUTTON_CLASS, bx,
|
||||
efl_text_set(efl_added, "Vertical"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _bt_clicked, NULL),
|
||||
efl_pack(bx, efl_added));
|
||||
}
|
||||
|
@ -83,25 +83,25 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
{
|
||||
efl_add(EFL_UI_BUTTON_CLASS, bx,
|
||||
efl_text_set(efl_added, "Vertical"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _bt_clicked, NULL),
|
||||
efl_pack(bx, efl_added));
|
||||
}
|
||||
|
||||
gd = efl_add(EFL_UI_TABLE_CLASS, bx,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0.5, 0),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_align_set(efl_added, 0.5, 0),
|
||||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_CANVAS_RECTANGLE_CLASS, win,
|
||||
efl_gfx_color_set(efl_added, 0, 0, 0, 0),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(200, 120)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(200, 120)),
|
||||
efl_pack_table(gd, efl_added, 0, 0, 1, 1));
|
||||
|
||||
sc3 = efl_add(EFL_UI_SCROLLER_CLASS, win,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack_table(gd, efl_added, 0, 0, 1, 1));
|
||||
|
||||
gd2 = efl_add(EFL_UI_TABLE_CLASS, sc3,
|
||||
|
@ -122,8 +122,8 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
{
|
||||
efl_add(EFL_UI_BUTTON_CLASS, bx,
|
||||
efl_text_set(efl_added, "Vertical"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _bt_clicked, NULL),
|
||||
efl_pack(bx, efl_added));
|
||||
}
|
||||
|
|
|
@ -46,8 +46,8 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, bx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(160, 0)),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(160, 0)),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, bx,
|
||||
|
@ -56,8 +56,8 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, bx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(160, 0)),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(160, 0)),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_LEFT),
|
||||
efl_pack(bx, efl_added));
|
||||
|
||||
|
@ -68,8 +68,8 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
|
||||
step = _step_size_calculate(0, 9);
|
||||
efl_add(EFL_UI_SLIDER_CLASS, bx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(120, 0)),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0.5, 0.5),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(120, 0)),
|
||||
efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
efl_pack(bx, efl_added));
|
||||
|
||||
|
@ -79,7 +79,7 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, bx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(120, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(120, 0)),
|
||||
efl_ui_range_min_max_set(efl_added, 10, 145),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
elm_object_disabled_set(efl_added, EINA_TRUE),
|
||||
|
@ -95,7 +95,7 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, hbx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(0, 160)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 160)),
|
||||
efl_ui_range_min_max_set(efl_added, 10, 145),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
efl_ui_range_value_set(efl_added, 70),
|
||||
|
@ -103,7 +103,7 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
efl_pack(hbx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, hbx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(0, 160)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 160)),
|
||||
efl_ui_range_min_max_set(efl_added, 10, 145),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
|
||||
|
@ -111,7 +111,7 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
efl_pack(hbx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, hbx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(0, 160)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 160)),
|
||||
efl_ui_range_min_max_set(efl_added, 10, 145),
|
||||
efl_ui_range_value_set(efl_added, 35),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
|
@ -124,7 +124,7 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
|||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, bx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(260, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(260, 0)),
|
||||
efl_ui_range_min_max_set(efl_added, 0, 150),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _slider_changed_cb, NULL),
|
||||
|
|
|
@ -46,7 +46,7 @@ test_slider_interval(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_INTERVAL_CLASS, bx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(160, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(160, 0)),
|
||||
efl_ui_slider_interval_value_set(efl_added, 0.4, 0.9),
|
||||
efl_pack(bx, efl_added));
|
||||
|
||||
|
@ -57,7 +57,7 @@ test_slider_interval(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
|
||||
step = _step_size_calculate(0, 9);
|
||||
efl_add(EFL_UI_SLIDER_INTERVAL_CLASS, bx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(120, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(120, 0)),
|
||||
efl_ui_slider_interval_value_set(efl_added, 0.4, 0.9),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
efl_pack(bx, efl_added));
|
||||
|
@ -68,7 +68,7 @@ test_slider_interval(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_INTERVAL_CLASS, bx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(120, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(120, 0)),
|
||||
efl_ui_range_min_max_set(efl_added, 10, 145),
|
||||
efl_ui_slider_interval_value_set(efl_added, 50, 100),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
|
@ -85,7 +85,7 @@ test_slider_interval(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_INTERVAL_CLASS, hbx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(0, 160)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 160)),
|
||||
efl_ui_range_min_max_set(efl_added, 10, 145),
|
||||
efl_ui_slider_interval_value_set(efl_added, 50, 100),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
|
@ -93,7 +93,7 @@ test_slider_interval(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_pack(hbx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_INTERVAL_CLASS, hbx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(0, 160)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 160)),
|
||||
efl_ui_range_min_max_set(efl_added, 10, 145),
|
||||
efl_ui_slider_interval_value_set(efl_added, 50, 100),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
|
@ -107,7 +107,7 @@ test_slider_interval(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_INTERVAL_CLASS, bx,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(260, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(260, 0)),
|
||||
efl_ui_range_min_max_set(efl_added, 0, 600),
|
||||
efl_ui_slider_interval_value_set(efl_added, 100, 500),
|
||||
efl_ui_range_step_set(efl_added, step),
|
||||
|
|
|
@ -88,8 +88,8 @@ content_add(Eo *parent, char *text)
|
|||
page = efl_add(EFL_UI_LAYOUT_CLASS, parent,
|
||||
efl_file_set(efl_added, buf, "page_layout"),
|
||||
efl_text_set(efl_part(efl_added, "text"), text),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE));
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE));
|
||||
|
||||
return page;
|
||||
}
|
||||
|
@ -133,20 +133,20 @@ test_ui_tab_pager(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
|
|||
efl_content_set(win, efl_added));
|
||||
|
||||
navi = elm_naviframe_add(layout);
|
||||
efl_gfx_size_hint_weight_set(navi, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(navi, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_hint_weight_set(navi, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_align_set(navi, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_content_set(efl_part(layout, "menu"), navi);
|
||||
|
||||
list = elm_list_add(navi);
|
||||
efl_gfx_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
|
||||
elm_naviframe_item_push(navi, "Properties", NULL, NULL, list, NULL);
|
||||
efl_gfx_entity_visible_set(list, EINA_TRUE);
|
||||
|
||||
tp = efl_add(EFL_UI_TAB_PAGER_CLASS, layout,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_ui_pager_page_size_set(efl_added, EINA_SIZE2D(-1, -1)),
|
||||
efl_ui_pager_padding_set(efl_added, 20),
|
||||
efl_content_set(efl_part(layout, "tab_pager"), efl_added));
|
||||
|
|
|
@ -33,32 +33,32 @@ weights_cb(void *data, const Efl_Event *event)
|
|||
switch (mode)
|
||||
{
|
||||
case NONE:
|
||||
efl_gfx_size_hint_align_set(table, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(table, 0.5, 0.5);
|
||||
for (int i = 0; i < 7; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_hint_weight_set(objects[i], 0, 0);
|
||||
break;
|
||||
case NONE_BUT_FILL:
|
||||
efl_gfx_size_hint_fill_set(table, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_fill_set(table, EINA_TRUE, EINA_TRUE);
|
||||
for (int i = 0; i < 7; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_hint_weight_set(objects[i], 0, 0);
|
||||
break;
|
||||
case EQUAL:
|
||||
efl_gfx_size_hint_align_set(table, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(table, 0.5, 0.5);
|
||||
for (int i = 0; i < 7; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 1, 1);
|
||||
efl_gfx_hint_weight_set(objects[i], 1, 1);
|
||||
break;
|
||||
case ONE:
|
||||
efl_gfx_size_hint_align_set(table, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(table, 0.5, 0.5);
|
||||
for (int i = 0; i < 6; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_size_hint_weight_set(objects[6], 1, 1);
|
||||
efl_gfx_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_hint_weight_set(objects[6], 1, 1);
|
||||
break;
|
||||
case TWO:
|
||||
efl_gfx_size_hint_align_set(table, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(table, 0.5, 0.5);
|
||||
for (int i = 0; i < 5; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_size_hint_weight_set(objects[5], 1, 1);
|
||||
efl_gfx_size_hint_weight_set(objects[6], 1, 1);
|
||||
efl_gfx_hint_weight_set(objects[i], 0, 0);
|
||||
efl_gfx_hint_weight_set(objects[5], 1, 1);
|
||||
efl_gfx_hint_weight_set(objects[6], 1, 1);
|
||||
break;
|
||||
case CUSTOM:
|
||||
efl_object_override(table, &custom_layout_ops);
|
||||
|
@ -71,7 +71,7 @@ user_min_slider_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
|||
{
|
||||
int val = elm_slider_value_get(event->object);
|
||||
for (int i = 0; i < 6; i++)
|
||||
efl_gfx_size_hint_min_set(objects[i], EINA_SIZE2D(val, val));
|
||||
efl_gfx_hint_size_min_set(objects[i], EINA_SIZE2D(val, val));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -85,7 +85,7 @@ static void
|
|||
margin_slider_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
int val = elm_slider_value_get(event->object);
|
||||
efl_gfx_size_hint_margin_set(data, val, val, val, val);
|
||||
efl_gfx_hint_margin_set(data, val, val, val, val);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -93,7 +93,7 @@ btnmargins_slider_cb(void *data, const Efl_Event *event)
|
|||
{
|
||||
int val = elm_slider_value_get(event->object);
|
||||
for (int i = 1; i < 7; i++)
|
||||
efl_gfx_size_hint_margin_set(data, val, val, val, val);
|
||||
efl_gfx_hint_margin_set(data, val, val, val, val);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -102,8 +102,8 @@ alignv_slider_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
|||
double ax, val;
|
||||
|
||||
val = elm_slider_value_get(event->object);
|
||||
efl_gfx_size_hint_align_get(objects[1], &ax, NULL);
|
||||
efl_gfx_size_hint_align_set(objects[1], ax, val);
|
||||
efl_gfx_hint_align_get(objects[1], &ax, NULL);
|
||||
efl_gfx_hint_align_set(objects[1], ax, val);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -112,8 +112,8 @@ alignh_slider_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
|||
double ay, val;
|
||||
|
||||
val = elm_slider_value_get(event->object);
|
||||
efl_gfx_size_hint_align_get(objects[1], NULL, &ay);
|
||||
efl_gfx_size_hint_align_set(objects[1], val, ay);
|
||||
efl_gfx_hint_align_get(objects[1], NULL, &ay);
|
||||
efl_gfx_hint_align_set(objects[1], val, ay);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -173,7 +173,7 @@ _custom_layout_update(Eo *pack, void *_pd EINA_UNUSED)
|
|||
|
||||
m.x = g.x + c * g.w / cols + (cs * g.w / cols - g.x) / 2;
|
||||
m.y = g.y + r * g.h / rows + (rs * g.h / rows - g.y) / 2;
|
||||
m.size = efl_gfx_size_hint_combined_min_get(item);
|
||||
m.size = efl_gfx_hint_size_combined_min_get(item);
|
||||
efl_gfx_entity_geometry_set(item, m);
|
||||
|
||||
gmw = MAX(gmw, m.w);
|
||||
|
@ -183,7 +183,7 @@ _custom_layout_update(Eo *pack, void *_pd EINA_UNUSED)
|
|||
eina_iterator_free(it);
|
||||
|
||||
end:
|
||||
efl_gfx_size_hint_min_set(pack, EINA_SIZE2D(gmw * cols, gmh * rows));
|
||||
efl_gfx_hint_size_min_set(pack, EINA_SIZE2D(gmw * cols, gmh * rows));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -199,8 +199,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
vbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(vbox, 1, 1);
|
||||
efl_gfx_size_hint_margin_set(vbox, 5, 5, 5, 5);
|
||||
efl_gfx_hint_weight_set(vbox, 1, 1);
|
||||
efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
|
||||
elm_win_resize_object_add(win, vbox);
|
||||
|
||||
|
||||
|
@ -211,8 +211,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* controls */
|
||||
f = elm_frame_add(win);
|
||||
elm_object_text_set(f, "Controls");
|
||||
efl_gfx_size_hint_align_set(f, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(f, 1, 0);
|
||||
efl_gfx_hint_align_set(f, -1, -1);
|
||||
efl_gfx_hint_weight_set(f, 1, 0);
|
||||
efl_pack(vbox, f);
|
||||
efl_gfx_entity_visible_set(f, 1);
|
||||
|
||||
|
@ -225,14 +225,14 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* weights radio group */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
chk = o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "No weight");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, NONE);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
@ -240,7 +240,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "No weight + table fill");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, NONE_BUT_FILL);
|
||||
elm_radio_group_add(o, chk);
|
||||
efl_pack(bx, o);
|
||||
|
@ -249,7 +249,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "Equal weights");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, EQUAL);
|
||||
elm_radio_group_add(o, chk);
|
||||
efl_pack(bx, o);
|
||||
|
@ -258,7 +258,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "One weight only");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, ONE);
|
||||
elm_radio_group_add(o, chk);
|
||||
efl_pack(bx, o);
|
||||
|
@ -267,7 +267,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "Two weights");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, TWO);
|
||||
elm_radio_group_add(o, chk);
|
||||
efl_pack(bx, o);
|
||||
|
@ -276,7 +276,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
o = elm_radio_add(win);
|
||||
elm_object_text_set(o, "Custom layout");
|
||||
efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
|
||||
efl_gfx_size_hint_align_set(o, 0, 0.5);
|
||||
efl_gfx_hint_align_set(o, 0, 0.5);
|
||||
elm_radio_state_value_set(o, CUSTOM);
|
||||
elm_radio_group_add(o, chk);
|
||||
efl_pack(bx, o);
|
||||
|
@ -288,8 +288,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* min size setter */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -301,8 +301,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
elm_slider_indicator_format_set(o, "%.0fpx");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, user_min_slider_cb, NULL);
|
||||
elm_slider_min_max_set(o, 0, 250);
|
||||
elm_slider_inverted_set(o, 1);
|
||||
|
@ -314,9 +314,9 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* inner box padding */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -328,8 +328,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
elm_slider_indicator_format_set(o, "%.0fpx");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, padding_slider_cb, table);
|
||||
elm_slider_min_max_set(o, 0, 40);
|
||||
elm_slider_inverted_set(o, 1);
|
||||
|
@ -341,8 +341,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* outer margin */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -354,8 +354,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
elm_slider_indicator_format_set(o, "%.0fpx");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, margin_slider_cb, table);
|
||||
elm_slider_min_max_set(o, 0, 40);
|
||||
elm_slider_inverted_set(o, 1);
|
||||
|
@ -367,9 +367,9 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* button margins */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -381,8 +381,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
elm_slider_indicator_format_set(o, "%.0fpx");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, btnmargins_slider_cb, table);
|
||||
elm_slider_min_max_set(o, 0, 40);
|
||||
elm_slider_inverted_set(o, 1);
|
||||
|
@ -394,9 +394,9 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* button1 aligns */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -408,8 +408,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
elm_slider_indicator_format_set(o, "%.1f");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignv_slider_cb, NULL);
|
||||
elm_slider_min_max_set(o, 0, 1);
|
||||
elm_slider_value_set(o, 0.3);
|
||||
|
@ -420,8 +420,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
elm_slider_indicator_format_set(o, "%.1f");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 1);
|
||||
efl_gfx_size_hint_align_set(o, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 0);
|
||||
efl_gfx_hint_align_set(o, -1, -1);
|
||||
efl_gfx_hint_weight_set(o, 1, 0);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignh_slider_cb, NULL);
|
||||
elm_slider_min_max_set(o, 0, 1);
|
||||
elm_slider_value_set(o, 0.3);
|
||||
|
@ -431,9 +431,9 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* ro info */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
|
@ -449,8 +449,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
o = elm_label_add(win);
|
||||
efl_event_callback_add(table, EFL_CONTAINER_EVENT_CONTENT_ADDED, child_evt_cb, o);
|
||||
efl_event_callback_add(table, EFL_CONTAINER_EVENT_CONTENT_REMOVED, child_evt_cb, o);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, 0);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, 0);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
@ -458,61 +458,61 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* contents */
|
||||
f = elm_frame_add(win);
|
||||
elm_object_text_set(f, "Contents");
|
||||
efl_gfx_size_hint_align_set(f, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(f, 1, 1);
|
||||
efl_gfx_hint_align_set(f, -1, -1);
|
||||
efl_gfx_hint_weight_set(f, 1, 1);
|
||||
efl_pack(vbox, f);
|
||||
efl_gfx_entity_visible_set(f, 1);
|
||||
|
||||
efl_gfx_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_object_content_set(f, table);
|
||||
efl_gfx_entity_visible_set(table, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win);
|
||||
efl_gfx_size_hint_min_set(o, EINA_SIZE2D(10, 10));
|
||||
efl_gfx_hint_size_min_set(o, EINA_SIZE2D(10, 10));
|
||||
efl_gfx_color_set(o, 64, 96, 128, 255);
|
||||
efl_pack_table(table, o, 0, 0, 3, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 1");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_size_hint_align_set(o, 0.3, 0.3);
|
||||
efl_gfx_size_hint_max_set(o, EINA_SIZE2D(100, 100));
|
||||
efl_gfx_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_align_set(o, 0.3, 0.3);
|
||||
efl_gfx_hint_size_max_set(o, EINA_SIZE2D(100, 100));
|
||||
efl_pack_table(table, o, 0, 0, 1, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 2");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_pack_table(table, o, 1, 0, 1, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 3");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_pack_table(table, o, 2, 0, 1, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 4");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_pack_table(table, o, 0, 1, 2, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 5");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_pack_table(table, o, 2, 1, 1, 2);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 6");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_pack_table(table, o, 0, 2, 2, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
@ -540,8 +540,8 @@ append_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
Eo *table = data;
|
||||
Eo *o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, btn_text("appended"));
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
|
||||
elm_object_tooltip_text_set(o, "Click to unpack");
|
||||
efl_pack_end(table, o);
|
||||
|
@ -568,7 +568,7 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
vbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
|
||||
efl_gfx_size_hint_margin_set(vbox, 5, 5, 5, 5);
|
||||
efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
|
||||
elm_win_resize_object_add(win, vbox);
|
||||
efl_gfx_entity_visible_set(vbox, 1);
|
||||
|
||||
|
@ -580,8 +580,8 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
/* controls */
|
||||
f = elm_frame_add(win);
|
||||
elm_object_text_set(f, "Controls");
|
||||
efl_gfx_size_hint_align_set(f, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(f, 1, 0);
|
||||
efl_gfx_hint_align_set(f, -1, -1);
|
||||
efl_gfx_hint_weight_set(f, 1, 0);
|
||||
efl_pack(vbox, f);
|
||||
efl_gfx_entity_visible_set(f, 1);
|
||||
|
||||
|
@ -613,9 +613,9 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
/* ro info */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_gfx_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
efl_gfx_entity_visible_set(bx, 1);
|
||||
|
||||
|
@ -632,8 +632,8 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
o = elm_label_add(win);
|
||||
efl_event_callback_add(table, EFL_CONTAINER_EVENT_CONTENT_ADDED, child_evt_cb, o);
|
||||
efl_event_callback_add(table, EFL_CONTAINER_EVENT_CONTENT_REMOVED, child_evt_cb, o);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, 0);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_gfx_hint_align_set(o, 0.5, 0);
|
||||
efl_gfx_hint_weight_set(o, 1, 1);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
@ -641,37 +641,37 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
/* contents */
|
||||
f = elm_frame_add(win);
|
||||
elm_object_text_set(f, "Contents");
|
||||
efl_gfx_size_hint_align_set(f, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(f, 1, 1);
|
||||
efl_gfx_hint_align_set(f, -1, -1);
|
||||
efl_gfx_hint_weight_set(f, 1, 1);
|
||||
efl_pack(vbox, f);
|
||||
efl_gfx_entity_visible_set(f, 1);
|
||||
|
||||
efl_pack_table_columns_set(table, 4);
|
||||
efl_pack_table_direction_set(table, EFL_UI_DIR_RIGHT, EFL_UI_DIR_DOWN);
|
||||
efl_gfx_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_object_content_set(f, table);
|
||||
efl_gfx_entity_visible_set(table, 1);
|
||||
|
||||
o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, btn_text(NULL));
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
|
||||
efl_pack(table, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, btn_text(NULL));
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
|
||||
efl_pack(table, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, btn_text(NULL));
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
|
||||
efl_pack(table, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
|
|
@ -99,8 +99,8 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
box = elm_box_add(win);
|
||||
elm_box_horizontal_set(box, EINA_FALSE);
|
||||
efl_gfx_size_hint_weight_set(box, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_hint_weight_set(box, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_gfx_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_entity_visible_set(box, EINA_TRUE);
|
||||
|
||||
txtpath = efl_add(EFL_UI_TEXTPATH_CLASS, win);
|
||||
|
@ -114,8 +114,8 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
hbox = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbox, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(hbox, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_hint_weight_set(hbox, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_gfx_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_entity_visible_set(hbox, EINA_TRUE);
|
||||
elm_box_pack_end(box, hbox);
|
||||
|
||||
|
@ -141,8 +141,8 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
hbox = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbox, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(hbox, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_hint_weight_set(hbox, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_gfx_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_entity_visible_set(hbox, EINA_TRUE);
|
||||
elm_box_pack_end(box, hbox);
|
||||
|
||||
|
@ -150,9 +150,9 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
elm_object_text_set(sld, "Angle");
|
||||
elm_slider_min_max_set(sld, 0, 360);
|
||||
elm_slider_value_set(sld, 0);
|
||||
efl_gfx_size_hint_align_set(sld, 0.5, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_weight_set(sld, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_min_set(sld, EINA_SIZE2D(150, 0));
|
||||
efl_gfx_hint_align_set(sld, 0.5, EVAS_HINT_FILL);
|
||||
efl_gfx_hint_weight_set(sld, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_gfx_hint_size_min_set(sld, EINA_SIZE2D(150, 0));
|
||||
efl_event_callback_add(sld, EFL_UI_SLIDER_EVENT_CHANGED, _angle_changed_cb, txtpath);
|
||||
elm_box_pack_end(hbox, sld);
|
||||
efl_gfx_entity_visible_set(sld, EINA_TRUE);
|
||||
|
@ -162,9 +162,9 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
elm_object_text_set(sld, "Slice No");
|
||||
elm_slider_min_max_set(sld, 20, 300);
|
||||
elm_slider_value_set(sld, 99);
|
||||
efl_gfx_size_hint_align_set(sld, 0.5, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_weight_set(sld, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_min_set(sld, EINA_SIZE2D(150, 0));
|
||||
efl_gfx_hint_align_set(sld, 0.5, EVAS_HINT_FILL);
|
||||
efl_gfx_hint_weight_set(sld, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_gfx_hint_size_min_set(sld, EINA_SIZE2D(150, 0));
|
||||
efl_event_callback_add(sld, EFL_UI_SLIDER_EVENT_CHANGED, _slice_no_changed_cb, txtpath);
|
||||
elm_box_pack_end(hbox, sld);
|
||||
efl_gfx_entity_visible_set(sld, EINA_TRUE);
|
||||
|
@ -172,8 +172,8 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
hbox = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbox, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(hbox, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_hint_weight_set(hbox, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_gfx_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_entity_visible_set(hbox, EINA_TRUE);
|
||||
elm_box_pack_end(box, hbox);
|
||||
|
||||
|
|
|
@ -36,14 +36,14 @@ _bt2_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_
|
|||
|
||||
// Notes:
|
||||
// - All objects have 0 weight, this makes the window not resizable.
|
||||
// - With EO APIs, efl_gfx_size_hint_min_set() is safe to call as EFL will
|
||||
// - With EO APIs, efl_gfx_hint_size_min_set() is safe to call as EFL will
|
||||
// only set the restricted min size (and combine them for calculation).
|
||||
|
||||
lb = efl_add(EFL_UI_TEXT_CLASS, dia,
|
||||
efl_text_set(efl_added, "This is a non-resizable dialog."),
|
||||
efl_gfx_size_hint_min_set(efl_added, size),
|
||||
efl_gfx_size_hint_max_set(efl_added, size),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0, 0));
|
||||
efl_gfx_hint_size_min_set(efl_added, size),
|
||||
efl_gfx_hint_size_max_set(efl_added, size),
|
||||
efl_gfx_hint_weight_set(efl_added, 0, 0));
|
||||
|
||||
// Swallow in the label as the default content, this will make it visible.
|
||||
efl_content_set(dia, lb);
|
||||
|
@ -57,9 +57,9 @@ _size_update(void *data, const Efl_Event *ev)
|
|||
Eo *dia = ev->object;
|
||||
Eo *lbl = data;
|
||||
|
||||
cmin = efl_gfx_size_hint_combined_min_get(dia);
|
||||
min = efl_gfx_size_hint_min_get(dia);
|
||||
max = efl_gfx_size_hint_max_get(dia);
|
||||
cmin = efl_gfx_hint_size_combined_min_get(dia);
|
||||
min = efl_gfx_hint_size_min_get(dia);
|
||||
max = efl_gfx_hint_size_max_get(dia);
|
||||
sz = efl_gfx_entity_size_get(dia);
|
||||
|
||||
sprintf(buf, "This is a dialog with min/max size<br>"
|
||||
|
@ -83,17 +83,17 @@ _bt3_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_
|
|||
|
||||
//lb = efl_add(EFL_UI_TEXT_CLASS, dia);,
|
||||
lb = elm_label_add(dia);
|
||||
efl_event_callback_add(dia, EFL_GFX_ENTITY_EVENT_CHANGE_SIZE_HINTS, _size_update, lb);
|
||||
efl_event_callback_add(dia, EFL_GFX_ENTITY_EVENT_RESIZE, _size_update, lb);
|
||||
efl_event_callback_add(dia, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _size_update, lb);
|
||||
efl_event_callback_add(dia, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _size_update, lb);
|
||||
elm_object_text_set(lb, "This is a Dialog Window");
|
||||
efl_gfx_size_hint_weight_set(lb, 1.0, 1.0);
|
||||
efl_gfx_hint_weight_set(lb, 1.0, 1.0);
|
||||
|
||||
// Swallow in the label as the default content, this will make it visible.
|
||||
efl_content_set(dia, lb);
|
||||
|
||||
// Set min & max size (app-side)
|
||||
efl_gfx_size_hint_min_set(dia, EINA_SIZE2D(ELM_SCALE_SIZE(0), ELM_SCALE_SIZE(100)));
|
||||
efl_gfx_size_hint_max_set(dia, EINA_SIZE2D(ELM_SCALE_SIZE(800), ELM_SCALE_SIZE(600)));
|
||||
efl_gfx_hint_size_min_set(dia, EINA_SIZE2D(ELM_SCALE_SIZE(0), ELM_SCALE_SIZE(100)));
|
||||
efl_gfx_hint_size_max_set(dia, EINA_SIZE2D(ELM_SCALE_SIZE(800), ELM_SCALE_SIZE(600)));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -110,17 +110,17 @@ _bt4_clicked_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *even
|
|||
|
||||
//lb = efl_add(EFL_UI_TEXT_CLASS, dia);,
|
||||
lb = elm_label_add(dia);
|
||||
efl_event_callback_add(dia, EFL_GFX_ENTITY_EVENT_CHANGE_SIZE_HINTS, _size_update, lb);
|
||||
efl_event_callback_add(dia, EFL_GFX_ENTITY_EVENT_RESIZE, _size_update, lb);
|
||||
efl_event_callback_add(dia, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _size_update, lb);
|
||||
efl_event_callback_add(dia, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _size_update, lb);
|
||||
elm_object_text_set(lb, "This is a Centered Dialog Window");
|
||||
efl_gfx_size_hint_weight_set(lb, 1.0, 1.0);
|
||||
efl_gfx_hint_weight_set(lb, 1.0, 1.0);
|
||||
|
||||
// Swallow in the label as the default content, this will make it visible.
|
||||
efl_content_set(dia, lb);
|
||||
|
||||
// Set min & max size (app-side)
|
||||
efl_gfx_size_hint_min_set(dia, EINA_SIZE2D(ELM_SCALE_SIZE(0), ELM_SCALE_SIZE(100)));
|
||||
efl_gfx_size_hint_max_set(dia, EINA_SIZE2D(ELM_SCALE_SIZE(800), ELM_SCALE_SIZE(600)));
|
||||
efl_gfx_hint_size_min_set(dia, EINA_SIZE2D(ELM_SCALE_SIZE(0), ELM_SCALE_SIZE(100)));
|
||||
efl_gfx_hint_size_max_set(dia, EINA_SIZE2D(ELM_SCALE_SIZE(800), ELM_SCALE_SIZE(600)));
|
||||
|
||||
efl_ui_win_center(dia, EINA_TRUE, EINA_TRUE);
|
||||
}
|
||||
|
|
|
@ -38,8 +38,8 @@ _create_indicator(void)
|
|||
efl_content_set(win, efl_added));
|
||||
|
||||
efl_add(EFL_UI_CLOCK_CLASS, bx,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0.5, 0.5),
|
||||
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_HOUR, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_MINUTE, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_AMPM, EINA_FALSE),
|
||||
|
@ -94,13 +94,13 @@ test_win_indicator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
||||
efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
|
||||
efl_text_set(efl_added, "Efl.Win.Indicator"),
|
||||
efl_gfx_size_hint_max_set(efl_added, EINA_SIZE2D(300, -1)),
|
||||
efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(300, -1)),
|
||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||
efl_event_callback_add(win, EFL_EVENT_DEL, _win_del, indicator);
|
||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 360));
|
||||
|
||||
Eo *bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(300, 0)),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(300, 0)),
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
|
|
|
@ -235,7 +235,7 @@ test_win_inline(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *even
|
|||
elm_win_alpha_set(win2, EINA_TRUE);
|
||||
evas_object_size_hint_weight_set(elm_win_inlined_image_object_get(win2), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(elm_win_inlined_image_object_get(win2), EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_margin_set(elm_win_inlined_image_object_get(win2), 20, 20, 20, 20);
|
||||
efl_gfx_hint_margin_set(elm_win_inlined_image_object_get(win2), 20, 20, 20, 20);
|
||||
efl_pack(box, elm_win_inlined_image_object_get(win2));
|
||||
|
||||
evas_object_resize(win2, 300, 200);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
executable('elua',
|
||||
'main.c',
|
||||
dependencies: [eina, ecore, elua, intl],
|
||||
link_args : bin_linker_args,
|
||||
install: true,
|
||||
)
|
||||
|
|
|
@ -28,6 +28,13 @@ _generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf,
|
|||
char *n = strdup(eolian_object_name_get(decl));
|
||||
char *p = n;
|
||||
while ((p = strchr(p, '.'))) *p = '_';
|
||||
if (eolian_object_type_get(decl) == EOLIAN_OBJECT_VARIABLE)
|
||||
{
|
||||
const Eolian_Variable *v = (const Eolian_Variable *)decl;
|
||||
/* constants are emitted as macros */
|
||||
if (eolian_variable_type_get(v) == EOLIAN_VAR_CONSTANT)
|
||||
eina_str_toupper(&n);
|
||||
}
|
||||
eina_strbuf_append(wbuf, n);
|
||||
free(n);
|
||||
return;
|
||||
|
|
|
@ -396,21 +396,48 @@ _write_source(const Eolian_State *eos, const char *ofname,
|
|||
{
|
||||
INF("generating source: %s", ofname);
|
||||
Eina_Strbuf *buf = eina_strbuf_new();
|
||||
Eina_Strbuf *lbuf = eina_strbuf_new();
|
||||
Eina_Strbuf *oflname = eina_strbuf_new();
|
||||
Eina_Bool ret = EINA_FALSE;
|
||||
|
||||
const char *lext = strrchr(ofname, '.');
|
||||
if (!lext)
|
||||
{
|
||||
eina_strbuf_append(oflname, ofname);
|
||||
eina_strbuf_append(oflname, ".legacy.c");
|
||||
}
|
||||
else
|
||||
{
|
||||
eina_strbuf_append_length(oflname, ofname, strlen(ofname) - strlen(lext));
|
||||
eina_strbuf_append(oflname, ".legacy");
|
||||
eina_strbuf_append(oflname, lext);
|
||||
}
|
||||
const char *lfname = eina_strbuf_string_get(oflname);
|
||||
{
|
||||
const char *p1 = strrchr(lfname, '/');
|
||||
const char *p2 = strrchr(lfname, '\\');
|
||||
lfname = (p1 || p2) ? ((p1 > p2) ? (p1 + 1) : (p2 + 1)) : lfname;
|
||||
}
|
||||
const Eolian_Class *cl = eolian_state_class_by_file_get(eos, ifname);
|
||||
eo_gen_types_source_gen(eolian_state_objects_by_file_get(eos, ifname), buf);
|
||||
eo_gen_source_gen(cl, buf);
|
||||
eo_gen_source_gen(cl, buf, lbuf, lfname);
|
||||
if (cl || (eot && eina_strbuf_length_get(buf)))
|
||||
{
|
||||
if (_write_file(ofname, buf))
|
||||
if (!_write_file(ofname, buf))
|
||||
goto done;
|
||||
if (eina_strbuf_length_get(lbuf))
|
||||
{
|
||||
eina_strbuf_free(buf);
|
||||
return EINA_TRUE;
|
||||
if (!_write_file(eina_strbuf_string_get(oflname), lbuf))
|
||||
goto done;
|
||||
}
|
||||
ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
done:
|
||||
eina_strbuf_free(buf);
|
||||
return EINA_FALSE;
|
||||
eina_strbuf_free(lbuf);
|
||||
eina_strbuf_free(oflname);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
|
|
@ -408,23 +408,30 @@ _gen_reflect_set(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt,
|
|||
else
|
||||
eina_hash_set(refh, &fid, (void *)EOLIAN_PROP_SET);
|
||||
|
||||
eina_strbuf_append(buf, "\nstatic void\n");
|
||||
eina_strbuf_append(buf, "\nstatic Eina_Error\n");
|
||||
eina_strbuf_append_printf(buf, "__eolian_%s_%s_set_reflect(Eo *obj, Eina_Value val)\n",
|
||||
cnamel, eolian_function_name_get(fid));
|
||||
eina_strbuf_append(buf, "{\n");
|
||||
eina_strbuf_append(buf, " Eina_Error r = 0;");
|
||||
|
||||
Eina_Stringshare *ct = eolian_type_c_type_get(valt, EOLIAN_C_TYPE_PARAM);
|
||||
const char *starsp = (ct[strlen(ct) - 1] != '*') ? " " : "";
|
||||
eina_strbuf_append_printf(buf, " %s%scval;\n", ct, starsp);
|
||||
eina_stringshare_del(ct);
|
||||
|
||||
eina_strbuf_append_printf(buf, " eina_value_%s_convert(&val, &cval);\n", initf);
|
||||
eina_strbuf_append_printf(buf, " if (!eina_value_%s_convert(&val, &cval))\n", initf);
|
||||
eina_strbuf_append(buf, " {\n");
|
||||
eina_strbuf_append(buf, " r = EINA_ERROR_VALUE_FAILED;\n");
|
||||
eina_strbuf_append(buf, " goto end;\n");
|
||||
eina_strbuf_append(buf, " }\n");
|
||||
|
||||
Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_SET, EINA_FALSE);
|
||||
eina_strbuf_append_printf(buf, " %s(obj, cval);\n", fcn);
|
||||
eina_stringshare_del(fcn);
|
||||
|
||||
eina_strbuf_append(buf, " end:\n");
|
||||
eina_strbuf_append(buf, " eina_value_flush(&val);\n");
|
||||
eina_strbuf_append(buf, " return r;\n");
|
||||
|
||||
eina_strbuf_append(buf, "}\n\n");
|
||||
}
|
||||
|
@ -1091,7 +1098,8 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Hash *refh)
|
|||
}
|
||||
|
||||
void
|
||||
eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
|
||||
eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf,
|
||||
const char *lfname)
|
||||
{
|
||||
if (!cl)
|
||||
return;
|
||||
|
@ -1122,8 +1130,6 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
|
|||
eina_iterator_free(itr);
|
||||
}
|
||||
|
||||
Eina_Strbuf *lbuf = eina_strbuf_new();
|
||||
|
||||
/* Eolian_Function -> Eolian_Function_Type
|
||||
* maps which parts of which functions are qualified for reflection
|
||||
*/
|
||||
|
@ -1236,10 +1242,9 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
|
|||
/* terminate inherits */
|
||||
eina_strbuf_append(buf, ", NULL);\n");
|
||||
|
||||
/* append legacy if there */
|
||||
eina_strbuf_append(buf, eina_strbuf_string_get(lbuf));
|
||||
|
||||
eina_strbuf_free(lbuf);
|
||||
/* append legacy include if there */
|
||||
if (eina_strbuf_length_get(lbuf))
|
||||
eina_strbuf_append_printf(buf, "\n#include \"%s\"\n", lfname);
|
||||
|
||||
/* and we're done */
|
||||
free(cnamel);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "main.h"
|
||||
|
||||
void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf);
|
||||
void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf, const char *lfname);
|
||||
void eo_gen_impl_gen(const Eolian_Class *cl, Eina_Strbuf *buf);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -252,6 +252,12 @@ struct documentation_generator
|
|||
return generate_tag(sink, "returns", text, context);
|
||||
}
|
||||
|
||||
template<typename OutputIterator, typename Context>
|
||||
bool generate_tag_value(OutputIterator sink, std::string const& text, Context const& context) const
|
||||
{
|
||||
return generate_tag(sink, "value", text, context);
|
||||
}
|
||||
|
||||
// Actual exported generators
|
||||
template<typename OutputIterator, typename Attribute, typename Context>
|
||||
bool generate(OutputIterator sink, Attribute const& attr, Context const& context) const
|
||||
|
@ -259,6 +265,23 @@ struct documentation_generator
|
|||
return generate(sink, attr.documentation, context);
|
||||
}
|
||||
|
||||
template<typename OutputIterator, typename Context>
|
||||
bool generate(OutputIterator sink, attributes::property_def const& prop, Context const& context) const
|
||||
{
|
||||
if (!generate(sink, prop.documentation, context))
|
||||
return false;
|
||||
|
||||
std::string text;
|
||||
if (prop.setter.is_engaged())
|
||||
text = prop.setter->parameters[0].documentation.full_text;
|
||||
else if (prop.getter.is_engaged())
|
||||
text = prop.getter->return_documentation.full_text;
|
||||
// If there are no docs at all, do not generate <value> tag
|
||||
else return true;
|
||||
|
||||
return generate_tag_value(sink, text, context);
|
||||
}
|
||||
|
||||
template<typename OutputIterator, typename Context>
|
||||
bool generate(OutputIterator sink, attributes::function_def const& func, Context const& context) const
|
||||
{
|
||||
|
|
|
@ -76,7 +76,7 @@ struct unpack_event_args_visitor
|
|||
}
|
||||
bool operator()(attributes::complex_type_def const&) const
|
||||
{
|
||||
return as_generator("UNSUPPORTED").generate(sink, attributes::unused, *context);
|
||||
return as_generator("new " << eolian_mono::type << "(evt.Info, false, false)").generate(sink, type, *context);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -142,15 +142,19 @@ ffi.cdef [[
|
|||
|
||||
EOLIAN_TYPE_BUILTIN_BOOL,
|
||||
|
||||
EOLIAN_TYPE_BUILTIN_SLICE,
|
||||
EOLIAN_TYPE_BUILTIN_RW_SLICE,
|
||||
|
||||
EOLIAN_TYPE_BUILTIN_VOID,
|
||||
|
||||
EOLIAN_TYPE_BUILTIN_ACCESSOR,
|
||||
EOLIAN_TYPE_BUILTIN_ARRAY,
|
||||
EOLIAN_TYPE_BUILTIN_FUTURE,
|
||||
EOLIAN_TYPE_BUILTIN_ITERATOR,
|
||||
EOLIAN_TYPE_BUILTIN_HASH,
|
||||
EOLIAN_TYPE_BUILTIN_LIST,
|
||||
|
||||
EOLIAN_TYPE_BUILTIN_FUTURE,
|
||||
EOLIAN_TYPE_BUILTIN_INARRAY,
|
||||
EOLIAN_TYPE_BUILTIN_INLIST,
|
||||
|
||||
EOLIAN_TYPE_BUILTIN_ANY_VALUE,
|
||||
EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR,
|
||||
|
@ -158,6 +162,7 @@ ffi.cdef [[
|
|||
EOLIAN_TYPE_BUILTIN_MSTRING,
|
||||
EOLIAN_TYPE_BUILTIN_STRING,
|
||||
EOLIAN_TYPE_BUILTIN_STRINGSHARE,
|
||||
EOLIAN_TYPE_BUILTIN_STRBUF,
|
||||
|
||||
EOLIAN_TYPE_BUILTIN_VOID_PTR,
|
||||
EOLIAN_TYPE_BUILTIN_FREE_CB
|
||||
|
@ -822,25 +827,30 @@ M.type_builtin_type = {
|
|||
|
||||
BOOL = 30,
|
||||
|
||||
VOID = 31,
|
||||
SLICE = 31,
|
||||
RW_SLICE = 32,
|
||||
|
||||
ACCESSOR = 32,
|
||||
ARRAY = 33,
|
||||
ITERATOR = 34,
|
||||
HASH = 35,
|
||||
LIST = 36,
|
||||
VOID = 33,
|
||||
|
||||
FUTURE = 37,
|
||||
ACCESSOR = 34,
|
||||
ARRAY = 35,
|
||||
FUTURE = 36,
|
||||
ITERATOR = 37,
|
||||
HASH = 38,
|
||||
LIST = 39,
|
||||
INARRAY = 40,
|
||||
INLIST = 41,
|
||||
|
||||
ANY_VALUE = 38,
|
||||
ANY_VALUE_PTR = 39,
|
||||
ANY_VALUE = 42,
|
||||
ANY_VALUE_PTR = 43,
|
||||
|
||||
MSTRING = 40,
|
||||
STRING = 41,
|
||||
STRINGSHARE = 42,
|
||||
MSTRING = 44,
|
||||
STRING = 45,
|
||||
STRINGSHARE = 46,
|
||||
STRBUF = 47.
|
||||
|
||||
VOID_PTR = 43,
|
||||
FREE_CB = 44
|
||||
VOID_PTR = 48,
|
||||
FREE_CB = 49
|
||||
}
|
||||
|
||||
M.typedecl_type = {
|
||||
|
|
|
@ -125,7 +125,9 @@ 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_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 \
|
||||
|
@ -344,7 +346,9 @@ 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_theme_example_02 \
|
||||
elementary/efl_ui_relative_layout_example_01 \
|
||||
elementary/efl_ui_relative_layout_example_02
|
||||
#benchmark3d
|
||||
#sphere-hunter
|
||||
|
||||
|
|
|
@ -169,3 +169,5 @@
|
|||
/efl_ui_list_view_example_3
|
||||
/efl_ui_theme_example_01
|
||||
/efl_ui_theme_example_02
|
||||
/efl_ui_relative_layout_example_01
|
||||
/efl_ui_relative_layout_example_02
|
||||
|
|
|
@ -27,7 +27,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
|
||||
efl::ui::Box box_initial(instantiate, win);
|
||||
box_initial.direction_set(EFL_UI_DIR_HORIZONTAL);
|
||||
box_initial.hint_weight_set(EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
box_initial.hint_weight_set(EFL_GFX_HINT_EXPAND, 0.0);
|
||||
box.pack_end(box_initial);
|
||||
|
||||
efl::ui::Button btn(instantiate, win);
|
||||
|
@ -78,7 +78,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
|
||||
efl::ui::Box box_gap(instantiate, win);
|
||||
box_gap.direction_set(EFL_UI_DIR_HORIZONTAL);
|
||||
box_gap.hint_weight_set(EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
box_gap.hint_weight_set(EFL_GFX_HINT_EXPAND, 0.0);
|
||||
box.pack_end(box_gap);
|
||||
|
||||
efl::ui::Button btn4(instantiate, win);
|
||||
|
@ -99,7 +99,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
up.autorepeat_enabled_set(true);
|
||||
up.autorepeat_initial_timeout_set(1.0);
|
||||
up.autorepeat_gap_timeout_set(0.5);
|
||||
up.hint_weight_set(EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
up.hint_weight_set(EFL_GFX_HINT_EXPAND, 0.0);
|
||||
up.hint_fill_set(true, false);
|
||||
up.hint_align_set(0.5, 0.0);
|
||||
box.pack_end(up);
|
||||
|
@ -180,7 +180,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
left.autorepeat_enabled_set(true);
|
||||
left.autorepeat_initial_timeout_set(1.0);
|
||||
left.autorepeat_gap_timeout_set(0.5);
|
||||
left.hint_weight_set(0.0, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
left.hint_weight_set(0.0, EFL_GFX_HINT_EXPAND);
|
||||
left.hint_fill_set(false, true);
|
||||
left.hint_align_set(0.0, 0.5);
|
||||
box_inferior.pack_end(left);
|
||||
|
@ -200,7 +200,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
right.autorepeat_enabled_set(true);
|
||||
right.autorepeat_initial_timeout_set(1.0);
|
||||
right.autorepeat_gap_timeout_set(0.5);
|
||||
right.hint_weight_set(0.0, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
right.hint_weight_set(0.0, EFL_GFX_HINT_EXPAND);
|
||||
right.hint_fill_set(false, true);
|
||||
right.hint_align_set(0.0, 0.5);
|
||||
box_inferior.pack_end(right);
|
||||
|
@ -214,7 +214,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
down.autorepeat_enabled_set(true);
|
||||
down.autorepeat_initial_timeout_set(1.0);
|
||||
down.autorepeat_gap_timeout_set(0.5);
|
||||
down.hint_weight_set(EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
down.hint_weight_set(EFL_GFX_HINT_EXPAND, 0.0);
|
||||
down.hint_fill_set(true, false);
|
||||
down.hint_align_set(0.5, 0.0);
|
||||
box.pack_end(down);
|
||||
|
|
|
@ -23,8 +23,8 @@ EoGenerate(const Efl_Class *klass, Eo *parent, Efl_Ui_Dir dir)
|
|||
{
|
||||
Eo* obj = efl_add(klass, parent);
|
||||
if (dir != EFL_UI_DIR_DEFAULT) efl_ui_direction_set(obj, dir);
|
||||
efl_gfx_size_hint_weight_set(obj, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_fill_set(obj, EINA_TRUE, EINA_TRUE);
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -47,8 +47,8 @@ elm_main(int argc, char **argv)
|
|||
elm_win_resize_object_add(win, box);
|
||||
|
||||
Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, box);
|
||||
efl_gfx_size_hint_weight_set(btn, 0.3, 0.3);
|
||||
efl_gfx_size_hint_fill_set(btn, EINA_TRUE, EINA_TRUE);
|
||||
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);
|
||||
|
||||
|
|
|
@ -115,15 +115,15 @@ elm_main(int argc, char **argv)
|
|||
|
||||
wbox = efl_add(EFL_UI_BOX_CLASS, win);
|
||||
efl_ui_direction_set(wbox, EFL_UI_DIR_VERTICAL);
|
||||
efl_gfx_size_hint_weight_set(wbox, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_fill_set(wbox, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(wbox, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
|
||||
efl_gfx_hint_fill_set(wbox, EINA_TRUE, EINA_TRUE);
|
||||
|
||||
if ((argv[1] != NULL) &&
|
||||
(!strcmp(argv[1], "empty")))
|
||||
emptystyle = EINA_TRUE;
|
||||
|
||||
priv_d.list = list = efl_add(EFL_UI_LIST_CLASS, wbox);
|
||||
efl_gfx_size_hint_weight_set(list, EFL_GFX_SIZE_HINT_EXPAND, 0.9);
|
||||
efl_gfx_hint_weight_set(list, EFL_GFX_HINT_EXPAND, 0.9);
|
||||
|
||||
efl_event_callback_add(list, EFL_UI_EVENT_SELECTED, _list_selected, NULL);
|
||||
efl_event_callback_add(list, EFL_UI_EVENT_UNSELECTED, _list_unselected, NULL);
|
||||
|
@ -145,7 +145,7 @@ elm_main(int argc, char **argv)
|
|||
efl_ui_direction_set(ibox, EFL_UI_DIR_HORIZONTAL);
|
||||
|
||||
txt = efl_add(EFL_UI_TEXT_CLASS, ibox);
|
||||
efl_gfx_size_hint_weight_set(txt, 0.95, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(txt, 0.95, EFL_GFX_HINT_EXPAND);
|
||||
efl_text_halign_set(txt, 0.2);
|
||||
efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
|
||||
snprintf(buf, sizeof(buf), "empty style item [%d]", i);
|
||||
|
@ -153,7 +153,7 @@ elm_main(int argc, char **argv)
|
|||
efl_pack_end(ibox, txt);
|
||||
|
||||
check = efl_add(EFL_UI_CHECK_CLASS, ibox);
|
||||
efl_gfx_size_hint_weight_set(check, 0.05, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_hint_weight_set(check, 0.05, EFL_GFX_HINT_EXPAND);
|
||||
efl_pack_end(ibox, check);
|
||||
|
||||
if (i % 2)
|
||||
|
@ -223,7 +223,7 @@ elm_main(int argc, char **argv)
|
|||
|
||||
/*select mode */
|
||||
txt = efl_add(EFL_UI_TEXT_CLASS, wbox);
|
||||
efl_gfx_size_hint_weight_set(txt, EFL_GFX_SIZE_HINT_EXPAND, 0.01);
|
||||
efl_gfx_hint_weight_set(txt, EFL_GFX_HINT_EXPAND, 0.01);
|
||||
efl_text_halign_set(txt, 0.02);
|
||||
efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
|
||||
efl_text_set(txt, "Select Mode");
|
||||
|
@ -231,7 +231,7 @@ elm_main(int argc, char **argv)
|
|||
|
||||
bbox = efl_add(EFL_UI_BOX_CLASS, wbox);
|
||||
efl_ui_direction_set(bbox, EFL_UI_DIR_HORIZONTAL);
|
||||
efl_gfx_size_hint_weight_set(bbox, EFL_GFX_SIZE_HINT_EXPAND, 0.05);
|
||||
efl_gfx_hint_weight_set(bbox, EFL_GFX_HINT_EXPAND, 0.05);
|
||||
|
||||
select_radio = radio = efl_add(EFL_UI_RADIO_CLASS, wbox);
|
||||
efl_text_set(radio, "SINGLE");
|
||||
|
@ -260,7 +260,7 @@ elm_main(int argc, char **argv)
|
|||
|
||||
/* scroll mode */
|
||||
txt = efl_add(EFL_UI_TEXT_CLASS, wbox);
|
||||
efl_gfx_size_hint_weight_set(txt, EFL_GFX_SIZE_HINT_EXPAND, 0.01);
|
||||
efl_gfx_hint_weight_set(txt, EFL_GFX_HINT_EXPAND, 0.01);
|
||||
efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
|
||||
efl_text_halign_set(txt, 0.02);
|
||||
efl_text_set(txt, "Item Scroll");
|
||||
|
@ -268,27 +268,27 @@ elm_main(int argc, char **argv)
|
|||
|
||||
priv_d.slider = slider = efl_add(EFL_UI_SLIDER_CLASS, wbox);
|
||||
efl_ui_direction_set(slider, EFL_UI_DIR_HORIZONTAL);
|
||||
efl_gfx_size_hint_weight_set(slider, 0.0, 0.05);
|
||||
efl_gfx_size_hint_align_set(slider, 0.5, 0.5);
|
||||
efl_gfx_size_hint_min_set(slider, EINA_SIZE2D(380, 20));
|
||||
efl_gfx_hint_weight_set(slider, 0.0, 0.05);
|
||||
efl_gfx_hint_align_set(slider, 0.5, 0.5);
|
||||
efl_gfx_hint_size_min_set(slider, EINA_SIZE2D(380, 20));
|
||||
efl_ui_range_min_max_set(slider, 0.0, 1.0);
|
||||
efl_pack_end(wbox, slider);
|
||||
|
||||
bbox = efl_add(EFL_UI_BOX_CLASS, wbox);
|
||||
efl_ui_direction_set(bbox, EFL_UI_DIR_HORIZONTAL);
|
||||
efl_gfx_size_hint_weight_set(bbox, EFL_GFX_SIZE_HINT_EXPAND, 0.05);
|
||||
efl_gfx_hint_weight_set(bbox, EFL_GFX_HINT_EXPAND, 0.05);
|
||||
|
||||
rbox = efl_add(EFL_UI_BOX_CLASS, bbox);
|
||||
efl_ui_direction_set(rbox, EFL_UI_DIR_VERTICAL);
|
||||
|
||||
anim_radio = radio = efl_add(EFL_UI_RADIO_CLASS, rbox);
|
||||
efl_gfx_size_hint_align_set(radio, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(radio, 0.5, 0.5);
|
||||
efl_text_set(radio, "ANIMATION OFF");
|
||||
efl_ui_radio_state_value_set(radio, 0);
|
||||
efl_event_callback_add(radio, EFL_UI_RADIO_EVENT_CHANGED, _anim_radio_changed, NULL);
|
||||
efl_pack_end(rbox, radio);
|
||||
radio = efl_add(EFL_UI_RADIO_CLASS, rbox);
|
||||
efl_gfx_size_hint_align_set(radio, 0.5, 0.5);
|
||||
efl_gfx_hint_align_set(radio, 0.5, 0.5);
|
||||
efl_text_set(radio, "ANIMATION ON");
|
||||
efl_ui_radio_state_value_set(radio, 1);
|
||||
efl_ui_radio_group_add(radio, anim_radio);
|
||||
|
@ -301,15 +301,15 @@ elm_main(int argc, char **argv)
|
|||
|
||||
scrl_btn = efl_add(EFL_UI_BUTTON_CLASS, rbox);
|
||||
efl_text_set(scrl_btn, "Scroll Item");
|
||||
efl_gfx_size_hint_align_set(scrl_btn, 0.5, 0.5);
|
||||
efl_gfx_size_hint_min_set(scrl_btn, EINA_SIZE2D(200, 25));
|
||||
efl_gfx_hint_align_set(scrl_btn, 0.5, 0.5);
|
||||
efl_gfx_hint_size_min_set(scrl_btn, EINA_SIZE2D(200, 25));
|
||||
efl_event_callback_add(scrl_btn, EFL_UI_EVENT_CLICKED, _scrl_btn_clicked, NULL);
|
||||
efl_pack_end(rbox, scrl_btn);
|
||||
|
||||
scrl_btn = efl_add(EFL_UI_BUTTON_CLASS, rbox);
|
||||
efl_text_set(scrl_btn, "Scroll Item Align");
|
||||
efl_gfx_size_hint_align_set(scrl_btn, 0.5, 0.5);
|
||||
efl_gfx_size_hint_min_set(scrl_btn, EINA_SIZE2D(200, 25));
|
||||
efl_gfx_hint_align_set(scrl_btn, 0.5, 0.5);
|
||||
efl_gfx_hint_size_min_set(scrl_btn, EINA_SIZE2D(200, 25));
|
||||
efl_event_callback_add(scrl_btn, EFL_UI_EVENT_CLICKED, _scrl_align_btn_clicked, NULL);
|
||||
efl_pack_end(rbox, scrl_btn);
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
elm_box_pack_end(vbx, bt);
|
||||
|
||||
elm_box_pack_end(bx, priv->list2);
|
||||
efl_event_callback_add(priv->list2, EFL_UI_FOCUS_MANAGER_EVENT_FOCUS_CHANGED, _focused ,priv);
|
||||
efl_event_callback_add(priv->list2, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _focused ,priv);
|
||||
|
||||
evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, priv);
|
||||
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
// gcc -o efl_ui_relative_layout_example_01 efl_ui_relative_layout_example_01.c `pkg-config --cflags --libs elementary`
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "elementary_config.h"
|
||||
#else
|
||||
#define EFL_BETA_API_SUPPORT 1
|
||||
#define EFL_EO_API_SUPPORT 1
|
||||
#endif
|
||||
|
||||
#include <Elementary.h>
|
||||
#include <Efl.h>
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main(int argc, char **argv)
|
||||
{
|
||||
Eo *win, *layout, *btn1, *btn2, *btn3;
|
||||
|
||||
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||
efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
|
||||
efl_text_set(efl_added, "Efl.Ui.Relative_Layout"),
|
||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||
|
||||
layout = efl_add(EFL_UI_RELATIVE_LAYOUT_CLASS, win,
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout,
|
||||
efl_text_set(efl_added, "btn1"),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)),
|
||||
efl_gfx_hint_align_set(efl_added, 0, 0),
|
||||
efl_gfx_hint_margin_set(efl_added, 10, 30, 20, 40),
|
||||
efl_ui_relative_layout_relation_right_set(layout, efl_added, layout, 0.0),
|
||||
efl_ui_relative_layout_relation_bottom_set(layout, efl_added, layout, 0.0));
|
||||
|
||||
btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout,
|
||||
efl_text_set(efl_added, "btn2"),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 200)),
|
||||
efl_gfx_hint_align_set(efl_added, 0.5, 0),
|
||||
efl_ui_relative_layout_relation_left_set(layout, efl_added, btn1, 1.0),
|
||||
efl_ui_relative_layout_relation_bottom_set(layout, efl_added, layout, 0.0));
|
||||
|
||||
btn3 = efl_add(EFL_UI_BUTTON_CLASS, layout,
|
||||
efl_text_set(efl_added, "btn3"),
|
||||
efl_ui_relative_layout_relation_left_set(layout, efl_added, btn2, 0.0),
|
||||
efl_ui_relative_layout_relation_top_set(layout, efl_added, btn2, 1.0));
|
||||
|
||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 300));
|
||||
|
||||
elm_run();
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
|
@ -0,0 +1,45 @@
|
|||
// gcc -o efl_ui_relative_layout_example_02 efl_ui_relative_layout_example_02.c `pkg-config --cflags --libs elementary`
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "elementary_config.h"
|
||||
#else
|
||||
#define EFL_BETA_API_SUPPORT 1
|
||||
#define EFL_EO_API_SUPPORT 1
|
||||
#endif
|
||||
|
||||
#include <Elementary.h>
|
||||
#include <Efl.h>
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main(int argc, char **argv)
|
||||
{
|
||||
Eo *win, *layout, *btn1, *btn2;
|
||||
|
||||
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||
efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
|
||||
efl_text_set(efl_added, "Efl.Ui.Relative_Layout"),
|
||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||
|
||||
layout = efl_add(EFL_UI_RELATIVE_LAYOUT_CLASS, win,
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout,
|
||||
efl_text_set(efl_added, "btn1"),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)));
|
||||
|
||||
btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout,
|
||||
efl_text_set(efl_added, "btn2"),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 100)));
|
||||
|
||||
efl_ui_relative_layout_relation_right_set(layout, btn1, btn2, 0.0);
|
||||
efl_ui_relative_layout_relation_bottom_set(layout, btn1, btn2, 0.0);
|
||||
|
||||
efl_ui_relative_layout_relation_left_set(layout, btn2, btn1, 1.0);
|
||||
efl_ui_relative_layout_relation_top_set(layout, btn2, btn1, 1.0);
|
||||
|
||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 300));
|
||||
|
||||
elm_run();
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
|
@ -16,7 +16,7 @@ _btn_extension_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
|||
static Eina_Bool loaded = EINA_TRUE;
|
||||
Efl_Ui_Theme *default_theme;
|
||||
|
||||
default_theme = efl_ui_theme_default_get(efl_ui_theme_class_get());
|
||||
default_theme = efl_ui_theme_default_get();
|
||||
|
||||
if (loaded)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_exit(0);
|
||||
}
|
||||
|
||||
default_theme = efl_ui_theme_default_get(efl_ui_theme_class_get());
|
||||
default_theme = efl_ui_theme_default_get();
|
||||
efl_ui_theme_extension_add(default_theme, EXAMPLE_EDJ_FILE_PATH);
|
||||
|
||||
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||
|
|
|
@ -16,7 +16,7 @@ _btn_overlay_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
|||
static Eina_Bool loaded = EINA_TRUE;
|
||||
Efl_Ui_Theme *default_theme;
|
||||
|
||||
default_theme = efl_ui_theme_default_get(efl_ui_theme_class_get());
|
||||
default_theme = efl_ui_theme_default_get();
|
||||
|
||||
if (loaded)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_exit(0);
|
||||
}
|
||||
|
||||
default_theme = efl_ui_theme_default_get(efl_ui_theme_class_get());
|
||||
default_theme = efl_ui_theme_default_get();
|
||||
efl_ui_theme_overlay_add(default_theme, EXAMPLE_EDJ_FILE_PATH);
|
||||
|
||||
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||
|
|
|
@ -129,11 +129,11 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
/*Label widget */
|
||||
_label_init(win, bxr, "FILENAME:");
|
||||
priv->label = _label_init(win, bxr, "");
|
||||
efl_ui_model_connect(priv->label, "default", "path"); //connect "default" to "filename" property
|
||||
efl_ui_property_bind(priv->label, "default", "path"); //connect "default" to "filename" property
|
||||
|
||||
/* Entry widget */
|
||||
priv->entry = elm_entry_add(win);
|
||||
efl_ui_model_connect(priv->entry, "elm.text", "path"); //connect "elm.text" to "path" property
|
||||
efl_ui_property_bind(priv->entry, "elm.text", "path"); //connect "elm.text" to "path" property
|
||||
elm_entry_single_line_set(priv->entry, EINA_TRUE);
|
||||
elm_box_pack_end(bxr, priv->entry);
|
||||
evas_object_size_hint_weight_set(priv->entry, EVAS_HINT_FILL, 0);
|
||||
|
@ -146,13 +146,13 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
elm_object_text_set(priv->bt, "update model");
|
||||
evas_object_smart_callback_add(priv->bt, "clicked", _update_cb, priv);
|
||||
edje_object_signal_callback_add(priv->bt, "test*" , "*", _signal_cb, priv);
|
||||
efl_ui_model_connect(priv->bt, "signal/test-%v", "size");
|
||||
efl_ui_property_bind(priv->bt, "signal/test-%v", "size");
|
||||
evas_object_show(priv->bt);
|
||||
|
||||
/* Image widget */
|
||||
img_factory = efl_add(EFL_UI_IMAGE_FACTORY_CLASS, win);
|
||||
efl_ui_model_connect(img_factory, "", "path"); //connect to "path" property
|
||||
efl_ui_factory_model_connect(priv->bt, "icon", img_factory);
|
||||
efl_ui_property_bind(img_factory, "", "path"); //connect to "path" property
|
||||
efl_ui_factory_bind(priv->bt, "icon", img_factory);
|
||||
|
||||
priv->img = efl_ui_factory_create(img_factory, NULL, win);
|
||||
elm_box_pack_end(bxr, priv->img);
|
||||
|
|
|
@ -0,0 +1,164 @@
|
|||
examples = [
|
||||
'actionslider_example_01',
|
||||
'bg_example_01',
|
||||
'bg_example_02',
|
||||
'bg_example_03',
|
||||
'box_example_02',
|
||||
'bubble_example_01',
|
||||
'button_example_00',
|
||||
'button_example_01',
|
||||
'calendar_example_01',
|
||||
'calendar_example_02',
|
||||
'calendar_example_03',
|
||||
'calendar_example_04',
|
||||
'calendar_example_05',
|
||||
'calendar_example_06',
|
||||
'check_example_01',
|
||||
'clock_example',
|
||||
'colorselector_example_01',
|
||||
'conformant_example_01',
|
||||
'conformant_example_02',
|
||||
'combobox_example_01',
|
||||
'ctxpopup_example_01',
|
||||
'datetime_example',
|
||||
'dayselector_example',
|
||||
'diskselector_example_01',
|
||||
'diskselector_example_02',
|
||||
'entry_example',
|
||||
'fileselector_button_example',
|
||||
'fileselector_entry_example',
|
||||
'fileselector_example',
|
||||
'fileviewlist',
|
||||
'filemvc',
|
||||
'flip_example_01',
|
||||
'flipselector_example',
|
||||
'frame_example_01',
|
||||
'general_funcs_example',
|
||||
'gengrid_example',
|
||||
'genlist_example_01',
|
||||
'genlist_example_02',
|
||||
'genlist_example_03',
|
||||
'genlist_example_04',
|
||||
'genlist_example_05',
|
||||
'glview_example_01',
|
||||
'hover_example_01',
|
||||
'hoversel_example_01',
|
||||
'icon_example_01',
|
||||
'image_example_01',
|
||||
'index_example_01',
|
||||
'index_example_02',
|
||||
'inwin_example',
|
||||
'label_example_01',
|
||||
'label_example_02',
|
||||
'label_example_03',
|
||||
'layout_example_01',
|
||||
'layout_example_02',
|
||||
'layout_example_03',
|
||||
'layout_property_bind',
|
||||
'list_example_01',
|
||||
'list_example_02',
|
||||
'list_example_03',
|
||||
'location_example_01',
|
||||
'map_example_01',
|
||||
'map_example_02',
|
||||
'map_example_03',
|
||||
'mapbuf_example',
|
||||
'menu_example_01',
|
||||
'naviframe_example',
|
||||
'notify_example_01',
|
||||
'panes_example',
|
||||
'panel_example_01',
|
||||
'photocam_example_01',
|
||||
'prefs_example_01',
|
||||
'prefs_example_02',
|
||||
'prefs_example_03',
|
||||
'popup_example_01',
|
||||
'popup_example_02',
|
||||
'popup_example_03',
|
||||
'progressbar_example',
|
||||
'radio_example_01',
|
||||
'radio_example_02',
|
||||
'segment_control_example',
|
||||
'separator_example_01',
|
||||
'slider_example',
|
||||
'slideshow_example',
|
||||
'spinner_example',
|
||||
'scroller_example_01',
|
||||
'table_example_01',
|
||||
'table_example_02',
|
||||
'theme_example_01',
|
||||
'theme_example_02',
|
||||
'thumb_example_01',
|
||||
'toolbar_example_01',
|
||||
'toolbar_example_02',
|
||||
'toolbar_example_03',
|
||||
'transit_example_01',
|
||||
'transit_example_02',
|
||||
'transit_example_03',
|
||||
'transit_example_04',
|
||||
'web_example_01',
|
||||
'web_example_02',
|
||||
'win_example',
|
||||
'track_example_01',
|
||||
'evas3d_object_on_button_example',
|
||||
'evas3d_scene_on_button_example',
|
||||
'evas3d_map_example',
|
||||
'efl_thread_1',
|
||||
'efl_thread_2',
|
||||
'efl_thread_3',
|
||||
'efl_thread_4',
|
||||
'efl_thread_5',
|
||||
'efl_thread_6',
|
||||
'efl_ui_list_example_1',
|
||||
'efl_ui_list_view_example_1',
|
||||
'efl_ui_list_view_example_2',
|
||||
'efl_ui_list_view_example_3',
|
||||
'efl_canvas_layout_text',
|
||||
'efl_ui_theme_example_01',
|
||||
'efl_ui_theme_example_02'
|
||||
]
|
||||
|
||||
foreach example : examples
|
||||
executable(example, example + '.c', dependencies: [elementary, ecore, eio])
|
||||
endforeach
|
||||
|
||||
edc_files = [
|
||||
'codegen_example.edc',
|
||||
'efl_ui_theme_example.edc'
|
||||
]
|
||||
|
||||
themes = []
|
||||
|
||||
foreach edc_file : edc_files
|
||||
themes += custom_target('edje_cc_' + edc_file,
|
||||
depends : edje_cc,
|
||||
input : edc_file,
|
||||
output : '@BASENAME@.edj',
|
||||
command : edje_cc_exe + ['-beta',
|
||||
'-id', meson.current_source_dir(),
|
||||
'-fd', meson.current_source_dir(),
|
||||
'-sd', meson.current_source_dir(),
|
||||
'-vd', meson.current_source_dir(),
|
||||
'-dd', meson.current_source_dir(),
|
||||
'-md', meson.current_source_dir(),
|
||||
'-td', meson.current_source_dir(),
|
||||
'@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
endforeach
|
||||
|
||||
|
||||
codegen = custom_target('elementary_codegen_examples',
|
||||
depends : themes,
|
||||
input : themes[0],
|
||||
output : ['codegen_example_generated.c', 'codegen_example_generated.h'],
|
||||
command : elementary_codegen_exe + ['-p=codegen_example', '@INPUT@', 'elm/example/mylayout/default', '@OUTPUT0@', '@OUTPUT1@'],
|
||||
)
|
||||
|
||||
executable('codegen_example',
|
||||
['codegen_example.c'] + [codegen],
|
||||
dependencies: [elementary],
|
||||
include_directories : include_directories('..')
|
||||
)
|
||||
|
||||
subdir('sphere_hunter')
|
||||
subdir('performance')
|
|
@ -0,0 +1,31 @@
|
|||
examples = [
|
||||
'performance.c',
|
||||
'camera_light.c',
|
||||
'graphical.c',
|
||||
]
|
||||
|
||||
edc_files = [
|
||||
'layout.edc'
|
||||
]
|
||||
|
||||
themes = []
|
||||
|
||||
foreach edc_file : edc_files
|
||||
themes += custom_target('edje_cc_' + edc_file,
|
||||
depends : edje_cc,
|
||||
input : edc_file,
|
||||
output : '@BASENAME@.edj',
|
||||
command : edje_cc_exe + ['-beta',
|
||||
'-id', meson.current_source_dir(),
|
||||
'-fd', meson.current_source_dir(),
|
||||
'-sd', meson.current_source_dir(),
|
||||
'-vd', meson.current_source_dir(),
|
||||
'-dd', meson.current_source_dir(),
|
||||
'-md', meson.current_source_dir(),
|
||||
'-td', meson.current_source_dir(),
|
||||
'@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
endforeach
|
||||
|
||||
executable(example, [examples] + themes, dependencies: [elementary, ecore])
|
||||
|
|
@ -38,7 +38,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
|
||||
efl::ui::Slider sl3(instantiate, win);
|
||||
sl3.range_value_set(1);
|
||||
sl3.hint_min_set({220, 0});
|
||||
sl3.hint_size_min_set({220, 0});
|
||||
sl3.hint_fill_set(true, false);
|
||||
bx.pack_end(sl3);
|
||||
|
||||
|
@ -52,14 +52,14 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
sl5.range_step_set(1);
|
||||
sl5.direction_set(EFL_UI_DIR_UP);
|
||||
sl5.hint_fill_set(true, false);
|
||||
sl5.hint_min_set({0, 120});
|
||||
sl5.hint_size_min_set({0, 120});
|
||||
bx.pack_end(sl5);
|
||||
|
||||
efl::ui::Slider sl6(instantiate, win);
|
||||
sl6.direction_set(EFL_UI_DIR_HORIZONTAL);
|
||||
sl6.range_min_max_set(0, 10);
|
||||
sl6.hint_fill_set(false, true);
|
||||
sl6.hint_weight_set(0, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
sl6.hint_weight_set(0, EFL_GFX_HINT_EXPAND);
|
||||
bx.pack_end(sl6);
|
||||
|
||||
efl::ui::Slider sl7(instantiate, win);
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
examples = [
|
||||
'evas_3d_sphere_hunter'
|
||||
]
|
||||
|
||||
edc_files = [
|
||||
'sphere_hunter.edc'
|
||||
]
|
||||
|
||||
themes = []
|
||||
|
||||
foreach edc_file : edc_files
|
||||
themes += custom_target('edje_cc_' + edc_file,
|
||||
depends : edje_cc,
|
||||
input : edc_file,
|
||||
output : '@BASENAME@.edj',
|
||||
command : edje_cc_exe + ['-beta',
|
||||
'-id', elementary_img_data,
|
||||
'-id', meson.current_source_dir(),
|
||||
'-fd', meson.current_source_dir(),
|
||||
'-sd', meson.current_source_dir(),
|
||||
'-vd', meson.current_source_dir(),
|
||||
'-dd', meson.current_source_dir(),
|
||||
'-md', meson.current_source_dir(),
|
||||
'-td', meson.current_source_dir(),
|
||||
'@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
endforeach
|
||||
|
||||
foreach example : examples
|
||||
executable(example, [example + '.c'] + themes, dependencies: [elementary, ecore])
|
||||
endforeach
|
|
@ -20,22 +20,22 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
|
||||
efl::canvas::Rectangle rect(instantiate, win);
|
||||
rect.color_set(255, 0, 0, 255);
|
||||
rect.hint_min_set({100, 50});
|
||||
rect.hint_size_min_set({100, 50});
|
||||
table.pack_table(rect, 0, 0, 2, 1);
|
||||
|
||||
efl::canvas::Rectangle rect2(instantiate, win);
|
||||
rect2.color_set(0, 255, 0, 255);
|
||||
rect2.hint_min_set({50, 100});
|
||||
rect2.hint_size_min_set({50, 100});
|
||||
table.pack_table(rect2, 0, 1, 1, 2);
|
||||
|
||||
efl::canvas::Rectangle rect3(instantiate, win);
|
||||
rect3.color_set(0, 0, 255, 255);
|
||||
rect3.hint_min_set({50, 50});
|
||||
rect3.hint_size_min_set({50, 50});
|
||||
table.pack_table(rect3, 1, 1, 1, 1);
|
||||
|
||||
efl::canvas::Rectangle rect4(instantiate, win);
|
||||
rect4.color_set(255, 255, 0, 255);
|
||||
rect4.hint_min_set({50, 50});
|
||||
rect4.hint_size_min_set({50, 50});
|
||||
table.pack_table(rect4, 1, 2, 1, 1);
|
||||
}
|
||||
EFL_MAIN()
|
||||
|
|
|
@ -119,7 +119,7 @@ _print_rect_stats(Evas_Object *rect)
|
|||
printf("\talign hints: h(%f), v(%f)\n",
|
||||
x, y);
|
||||
|
||||
cmin = efl_gfx_size_hint_combined_min_get(rect);
|
||||
cmin = efl_gfx_hint_size_combined_min_get(rect);
|
||||
printf("\tmin. size hints: h(%d), v(%d)\n",
|
||||
cmin.w, cmin.h);
|
||||
|
||||
|
|
|
@ -60,15 +60,15 @@ static struct example_data d =
|
|||
static void
|
||||
update(void)
|
||||
{
|
||||
efl_gfx_map_coord_absolute_set(d.target1, 0, d.px1, d.py1, 0);
|
||||
efl_gfx_map_coord_absolute_set(d.target1, 1, d.px2, d.py2, 0);
|
||||
efl_gfx_map_coord_absolute_set(d.target1, 2, d.px3, d.py3, 0);
|
||||
efl_gfx_map_coord_absolute_set(d.target1, 3, d.px4, d.py4, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(d.target1, 0, d.px1, d.py1, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(d.target1, 1, d.px2, d.py2, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(d.target1, 2, d.px3, d.py3, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(d.target1, 3, d.px4, d.py4, 0);
|
||||
|
||||
efl_gfx_map_coord_absolute_set(d.target2, 0, d.px1 + 400, d.py1, 0);
|
||||
efl_gfx_map_coord_absolute_set(d.target2, 1, d.px2 + 400, d.py2, 0);
|
||||
efl_gfx_map_coord_absolute_set(d.target2, 2, d.px3 + 400, d.py3, 0);
|
||||
efl_gfx_map_coord_absolute_set(d.target2, 3, d.px4 + 400, d.py4, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(d.target2, 0, d.px1 + 400, d.py1, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(d.target2, 1, d.px2 + 400, d.py2, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(d.target2, 2, d.px3 + 400, d.py3, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(d.target2, 3, d.px4 + 400, d.py4, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -83,68 +83,68 @@ _anim_cb(void *data)
|
|||
evas_output_size_get(ad->canvas, &win_w, &win_h);
|
||||
|
||||
o = evas_object_name_find(ad->canvas, "obj1");
|
||||
efl_gfx_map_reset(o);
|
||||
efl_gfx_map_rotate(o, 3 * f, NULL, 0.5, 0.5);
|
||||
efl_gfx_map_smooth_set(o, ad->smooth);
|
||||
efl_gfx_map_alpha_set(o, ad->alpha);
|
||||
efl_gfx_map_color_set(o, -1, r, g, b, a);
|
||||
efl_gfx_mapping_reset(o);
|
||||
efl_gfx_mapping_rotate(o, 3 * f, NULL, 0.5, 0.5);
|
||||
efl_gfx_mapping_smooth_set(o, ad->smooth);
|
||||
efl_gfx_mapping_alpha_set(o, ad->alpha);
|
||||
efl_gfx_mapping_color_set(o, -1, r, g, b, a);
|
||||
|
||||
|
||||
o = evas_object_name_find(ad->canvas, "obj2");
|
||||
size = efl_gfx_entity_size_get(o);
|
||||
efl_gfx_map_reset(o);
|
||||
efl_gfx_map_smooth_set(o, ad->smooth);
|
||||
efl_gfx_map_alpha_set(o, ad->alpha);
|
||||
efl_gfx_map_color_set(o, -1, r, g, b, a);
|
||||
efl_gfx_map_translate(o, 0, 0, 100);
|
||||
efl_gfx_map_rotate_3d(o, f * 6, f * 6, f * 6, NULL, 1./3., 10. / size.h, 0);
|
||||
efl_gfx_mapping_reset(o);
|
||||
efl_gfx_mapping_smooth_set(o, ad->smooth);
|
||||
efl_gfx_mapping_alpha_set(o, ad->alpha);
|
||||
efl_gfx_mapping_color_set(o, -1, r, g, b, a);
|
||||
efl_gfx_mapping_translate(o, 0, 0, 100);
|
||||
efl_gfx_mapping_rotate_3d(o, f * 6, f * 6, f * 6, NULL, 1./3., 10. / size.h, 0);
|
||||
if (ad->apply_lighting)
|
||||
{
|
||||
efl_gfx_map_lightning_3d(o, ad->canvas, 0.5, 0.5, -100.,
|
||||
efl_gfx_mapping_lighting_3d(o, ad->canvas, 0.5, 0.5, -100.,
|
||||
255, 255, 255, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
o = evas_object_name_find(ad->canvas, "obj3");
|
||||
size = efl_gfx_entity_size_get(o);
|
||||
efl_gfx_map_reset(o);
|
||||
efl_gfx_map_smooth_set(o, ad->smooth);
|
||||
efl_gfx_map_alpha_set(o, ad->alpha);
|
||||
efl_gfx_map_color_set(o, -1, r, g, b, a);
|
||||
efl_gfx_map_translate(o, 0, size.h/2, -20);
|
||||
efl_gfx_map_rotate_3d(o, 20, f * 6, 0, NULL, 0.5, 0.5, size.w / 2);
|
||||
efl_gfx_mapping_reset(o);
|
||||
efl_gfx_mapping_smooth_set(o, ad->smooth);
|
||||
efl_gfx_mapping_alpha_set(o, ad->alpha);
|
||||
efl_gfx_mapping_color_set(o, -1, r, g, b, a);
|
||||
efl_gfx_mapping_translate(o, 0, size.h/2, -20);
|
||||
efl_gfx_mapping_rotate_3d(o, 20, f * 6, 0, NULL, 0.5, 0.5, size.w / 2);
|
||||
if (ad->apply_perspective)
|
||||
efl_gfx_map_perspective_3d(o, NULL, 0.5, 0.5, 0, 256);
|
||||
efl_gfx_mapping_perspective_3d(o, NULL, 0.5, 0.5, 0, 256);
|
||||
if (ad->apply_lighting)
|
||||
{
|
||||
evas_pointer_canvas_xy_get(ad->canvas, &mx, &my);
|
||||
efl_gfx_map_lightning_3d(o, ad->canvas,
|
||||
efl_gfx_mapping_lighting_3d(o, ad->canvas,
|
||||
(double) mx / win_w, (double) my / win_h,
|
||||
-256, 255, 255, 255, 0, 0, 0);
|
||||
}
|
||||
if (ad->backface_culling)
|
||||
efl_gfx_entity_visible_set(o, efl_gfx_map_clockwise_get(o));
|
||||
efl_gfx_entity_visible_set(o, efl_gfx_mapping_clockwise_get(o));
|
||||
else
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
||||
o = evas_object_name_find(ad->canvas, "obj4");
|
||||
rect = efl_gfx_entity_geometry_get(o);
|
||||
efl_gfx_map_reset(o);
|
||||
efl_gfx_map_smooth_set(o, ad->smooth);
|
||||
efl_gfx_map_alpha_set(o, ad->alpha);
|
||||
efl_gfx_map_coord_absolute_set(o, 0, rect.x, rect.y + rect.h, 0);
|
||||
efl_gfx_map_coord_absolute_set(o, 1, rect.x + rect.w, rect.y + rect.h, 0);
|
||||
efl_gfx_map_coord_absolute_set(o, 2, win_w - 10, win_h - 30, 0);
|
||||
efl_gfx_map_coord_absolute_set(o, 3, (win_w / 2) + 10, win_h - 30, 0);
|
||||
efl_gfx_map_uv_set(o, 0, 0, 1);
|
||||
efl_gfx_map_uv_set(o, 1, 1, 1);
|
||||
efl_gfx_map_uv_set(o, 2, 1, 2. / 3.);
|
||||
efl_gfx_map_uv_set(o, 3, 0, 2. / 3.);
|
||||
efl_gfx_map_color_set(o, 0, 200, 200, 200, 150);
|
||||
efl_gfx_map_color_set(o, 1, 200, 200, 200, 150);
|
||||
efl_gfx_map_color_set(o, 2, 0, 0, 0, 0);
|
||||
efl_gfx_map_color_set(o, 3, 0, 0, 0, 0);
|
||||
efl_gfx_mapping_reset(o);
|
||||
efl_gfx_mapping_smooth_set(o, ad->smooth);
|
||||
efl_gfx_mapping_alpha_set(o, ad->alpha);
|
||||
efl_gfx_mapping_coord_absolute_set(o, 0, rect.x, rect.y + rect.h, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(o, 1, rect.x + rect.w, rect.y + rect.h, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(o, 2, win_w - 10, win_h - 30, 0);
|
||||
efl_gfx_mapping_coord_absolute_set(o, 3, (win_w / 2) + 10, win_h - 30, 0);
|
||||
efl_gfx_mapping_uv_set(o, 0, 0, 1);
|
||||
efl_gfx_mapping_uv_set(o, 1, 1, 1);
|
||||
efl_gfx_mapping_uv_set(o, 2, 1, 2. / 3.);
|
||||
efl_gfx_mapping_uv_set(o, 3, 0, 2. / 3.);
|
||||
efl_gfx_mapping_color_set(o, 0, 200, 200, 200, 150);
|
||||
efl_gfx_mapping_color_set(o, 1, 200, 200, 200, 150);
|
||||
efl_gfx_mapping_color_set(o, 2, 0, 0, 0, 0);
|
||||
efl_gfx_mapping_color_set(o, 3, 0, 0, 0, 0);
|
||||
|
||||
|
||||
ad->frame = (ad->frame + 1) % 60;
|
||||
|
|
|
@ -43,7 +43,7 @@ class TestMain
|
|||
rect.SetColor(255, 0, 0, 255);
|
||||
hint.W = 100;
|
||||
hint.H = 50;
|
||||
rect.SetHintMin(hint);
|
||||
rect.SetHintSizeMin(hint);
|
||||
rect.SetVisible(true);
|
||||
table.Pack(rect, 1, 1, 2, 1);
|
||||
|
||||
|
@ -51,7 +51,7 @@ class TestMain
|
|||
rect.SetColor(0, 255, 0, 255);
|
||||
hint.W = 50;
|
||||
hint.H = 100;
|
||||
rect.SetHintMin(hint);
|
||||
rect.SetHintSizeMin(hint);
|
||||
rect.SetVisible(true);
|
||||
table.Pack(rect, 1, 2, 1, 2);
|
||||
|
||||
|
@ -59,13 +59,13 @@ class TestMain
|
|||
rect.SetColor(0, 0, 255, 255);
|
||||
hint.W = 50;
|
||||
hint.H = 50;
|
||||
rect.SetHintMin(hint);
|
||||
rect.SetHintSizeMin(hint);
|
||||
rect.SetVisible(true);
|
||||
table.Pack(rect, 2, 2, 1, 1);
|
||||
|
||||
rect = new Efl.Canvas.Rectangle(canvas);
|
||||
rect.SetColor(255, 255, 0, 255);
|
||||
rect.SetHintMin(hint);
|
||||
rect.SetHintSizeMin(hint);
|
||||
rect.SetVisible(true);
|
||||
table.Pack(rect, 2, 3, 1, 1);
|
||||
|
||||
|
|
|
@ -86,10 +86,12 @@ _ecore_event_filters_call(Eo *obj, Efl_Loop_Data *pd)
|
|||
{
|
||||
Filter *f;
|
||||
Ecore_Event_Message_Handler_Data *eemhd;
|
||||
Eo *ecore_event_handler = efl_loop_message_handler_get
|
||||
(obj, ECORE_EVENT_MESSAGE_HANDLER_CLASS);
|
||||
|
||||
Eo *ecore_event_handler = efl_provider_find(obj, ECORE_EVENT_MESSAGE_HANDLER_CLASS);
|
||||
/* If this is not != NULL, then _ecore_event_init was not called yet, which means,
|
||||
there cannot be any registered events yet
|
||||
*/
|
||||
if (!ecore_event_handler) return;
|
||||
|
||||
eemhd = efl_data_scope_get(ecore_event_handler, MY_CLASS);
|
||||
if (!eemhd) return;
|
||||
if (!eemhd->filters) return;
|
||||
|
|
|
@ -245,9 +245,9 @@ _ecore_event_init(void)
|
|||
const char *choice = getenv("EINA_MEMPOOL");
|
||||
if ((!choice) || (!choice[0])) choice = "chained_mempool";
|
||||
|
||||
_event_msg_handler =
|
||||
efl_loop_message_handler_get(_mainloop_singleton,
|
||||
ECORE_EVENT_MESSAGE_HANDLER_CLASS);
|
||||
_event_msg_handler = efl_add(ECORE_EVENT_MESSAGE_HANDLER_CLASS, _mainloop_singleton);
|
||||
efl_loop_register(_mainloop_singleton, ECORE_EVENT_MESSAGE_HANDLER_CLASS, _event_msg_handler);
|
||||
|
||||
if (!_event_msg_handler)
|
||||
{
|
||||
ERR("Cannot create legacy ecore event message handler");
|
||||
|
|
|
@ -94,15 +94,8 @@ typedef struct _Efl_Loop_Data Efl_Loop_Data;
|
|||
typedef struct _Efl_Task_Data Efl_Task_Data;
|
||||
typedef struct _Efl_Appthread_Data Efl_Appthread_Data;
|
||||
|
||||
typedef struct _Message_Handler Message_Handler;
|
||||
typedef struct _Message Message;
|
||||
|
||||
struct _Message_Handler
|
||||
{
|
||||
Eo *handler;
|
||||
const Eo *klass;
|
||||
};
|
||||
|
||||
struct _Message
|
||||
{
|
||||
EINA_INLIST;
|
||||
|
@ -150,7 +143,6 @@ struct _Efl_Loop_Data
|
|||
Eina_List *win32_handlers_to_delete;
|
||||
# endif
|
||||
|
||||
Eina_Inarray *message_handlers;
|
||||
Eina_Inlist *message_queue;
|
||||
unsigned int message_walking;
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define EFL_LOOP_PROTECTED
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <Ecore.h>
|
||||
|
||||
#include "ecore_private.h"
|
||||
#include "eo_internal.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <sys/resource.h>
|
||||
|
@ -12,13 +13,15 @@
|
|||
|
||||
#define MY_CLASS EFL_APP_CLASS
|
||||
|
||||
EFL_CLASS_SIMPLE_CLASS(efl_app, "Efl.App", EFL_APP_CLASS)
|
||||
|
||||
Efl_Version _app_efl_version = { 0, 0, 0, 0, NULL, NULL };
|
||||
|
||||
EOLIAN static Efl_App*
|
||||
_efl_app_app_main_get(void)
|
||||
{
|
||||
if (_mainloop_singleton) return _mainloop_singleton;
|
||||
_mainloop_singleton = efl_add_ref(EFL_APP_CLASS, NULL);
|
||||
_mainloop_singleton = efl_add_ref(efl_app_realized_class_get(), NULL);
|
||||
_mainloop_singleton_data = efl_data_scope_get(_mainloop_singleton, EFL_LOOP_CLASS);
|
||||
return _mainloop_singleton;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import efl_types;
|
||||
|
||||
class @beta Efl.App extends Efl.Loop implements Efl.Core.Command_Line
|
||||
abstract @beta Efl.App extends Efl.Loop implements Efl.Core.Command_Line
|
||||
{
|
||||
[[ ]]
|
||||
[[Object representing the application itself]]
|
||||
data: null;
|
||||
methods {
|
||||
@property app_main @class {
|
||||
|
@ -23,7 +23,7 @@ class @beta Efl.App extends Efl.Loop implements Efl.Core.Command_Line
|
|||
]]
|
||||
get {}
|
||||
values {
|
||||
@cref version: Efl.Version; [[Efl version]]
|
||||
@cref version: Efl.Version; [[Efl build version]]
|
||||
}
|
||||
}
|
||||
@property efl_version {
|
||||
|
|
|
@ -139,7 +139,7 @@ _efl_appthread_efl_io_reader_can_read_set(Eo *obj, Efl_Appthread_Data *pd, Eina_
|
|||
else
|
||||
efl_loop_handler_active_set(pd->fd.in_handler,
|
||||
EFL_LOOP_HANDLER_FLAGS_READ);
|
||||
efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
|
||||
efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
@ -231,7 +231,7 @@ _efl_appthread_efl_io_writer_can_write_set(Eo *obj, Efl_Appthread_Data *pd, Eina
|
|||
else
|
||||
efl_loop_handler_active_set(pd->fd.in_handler,
|
||||
EFL_LOOP_HANDLER_FLAGS_WRITE);
|
||||
efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);
|
||||
efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
|
|
@ -193,11 +193,14 @@ _efl_composite_model_then(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
|
|||
|
||||
// First set the Model to be used as a source so that we the newly object
|
||||
// can know if it needs to retain the information regarding its index.
|
||||
composite = efl_add(req->self, req->parent,
|
||||
efl_ui_view_model_set(efl_added, target),
|
||||
efl_composite_model_index_set(efl_added, req->start + i));
|
||||
composite = efl_add_ref(req->self, req->parent,
|
||||
efl_ui_view_model_set(efl_added, target),
|
||||
efl_composite_model_index_set(efl_added, req->start + i),
|
||||
efl_loop_model_volatile_make(efl_added));
|
||||
|
||||
eina_value_array_append(&r, composite);
|
||||
// Dropping this scope reference
|
||||
efl_unref(composite);
|
||||
}
|
||||
|
||||
return r;
|
||||
|
|
|
@ -759,7 +759,7 @@ _efl_exe_efl_io_reader_can_read_set(Eo *obj, Efl_Exe_Data *pd, Eina_Bool can_rea
|
|||
else
|
||||
efl_loop_handler_active_set(pd->fd.out_handler,
|
||||
EFL_LOOP_HANDLER_FLAGS_READ);
|
||||
efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
|
||||
efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
@ -857,7 +857,7 @@ _efl_exe_efl_io_writer_can_write_set(Eo *obj, Efl_Exe_Data *pd, Eina_Bool can_wr
|
|||
else
|
||||
efl_loop_handler_active_set(pd->fd.in_handler,
|
||||
EFL_LOOP_HANDLER_FLAGS_WRITE);
|
||||
efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);
|
||||
efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
|
|
@ -273,7 +273,7 @@ _efl_io_buffered_stream_efl_io_reader_can_read_set(Eo *o, Efl_Io_Buffered_Stream
|
|||
EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o));
|
||||
if (pd->can_read == can_read) return;
|
||||
pd->can_read = can_read;
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
@ -339,7 +339,7 @@ _efl_io_buffered_stream_efl_io_writer_can_write_set(Eo *o, Efl_Io_Buffered_Strea
|
|||
EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o));
|
||||
if (pd->can_write == can_write) return;
|
||||
pd->can_write = can_write;
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
|
|
@ -79,7 +79,7 @@ _efl_io_reader_fd_efl_io_reader_can_read_set(Eo *o, Efl_Io_Reader_Fd_Data *pd, E
|
|||
EINA_SAFETY_ON_TRUE_RETURN(efl_io_reader_fd_get(o) < 0 && can_read);
|
||||
if (pd->can_read == can_read) return;
|
||||
pd->can_read = can_read;
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
|
|
@ -83,7 +83,7 @@ _efl_io_writer_fd_efl_io_writer_can_write_set(Eo *o, Efl_Io_Writer_Fd_Data *pd,
|
|||
EINA_SAFETY_ON_TRUE_RETURN(efl_io_writer_fd_get(o) < 0 && can_write);
|
||||
if (pd->can_write == can_write) return;
|
||||
pd->can_write = can_write;
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write);
|
||||
}
|
||||
|
||||
#include "efl_io_writer_fd.eo.c"
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define EFL_LOOP_PROTECTED
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -28,26 +30,6 @@ struct _Efl_Loop_Promise_Simple_Data
|
|||
};
|
||||
GENERIC_ALLOC_SIZE_DECLARE(Efl_Loop_Promise_Simple_Data);
|
||||
|
||||
EOLIAN static Efl_Loop_Message_Handler *
|
||||
_efl_loop_message_handler_get(Efl_Loop *loop, const Efl_Class *klass)
|
||||
{
|
||||
Message_Handler mh = { 0 }, *mh2;
|
||||
Efl_Loop_Data *ld = efl_data_scope_get(loop, EFL_LOOP_CLASS);
|
||||
unsigned int i, n;
|
||||
|
||||
if (!ld) return NULL;
|
||||
n = eina_inarray_count(ld->message_handlers);
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
mh2 = eina_inarray_nth(ld->message_handlers, i);
|
||||
if (mh2->klass == klass) return mh2->handler;
|
||||
}
|
||||
mh.klass = klass;
|
||||
mh.handler = efl_add(klass, loop);
|
||||
eina_inarray_push(ld->message_handlers, &mh);
|
||||
return mh.handler;
|
||||
}
|
||||
|
||||
Eo *_mainloop_singleton = NULL;
|
||||
Efl_Loop_Data *_mainloop_singleton_data = NULL;
|
||||
|
||||
|
@ -305,11 +287,11 @@ _efl_loop_efl_object_constructor(Eo *obj, Efl_Loop_Data *pd)
|
|||
|
||||
pd->loop_time = ecore_time_get();
|
||||
pd->providers = eina_hash_pointer_new(EINA_FREE_CB(efl_unref));
|
||||
pd->message_handlers = eina_inarray_new(sizeof(Message_Handler), 32);
|
||||
pd->epoll_fd = -1;
|
||||
pd->timer_fd = -1;
|
||||
pd->future_message_handler = efl_loop_message_handler_get
|
||||
(obj, EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS);
|
||||
pd->future_message_handler = efl_add(EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS, obj);
|
||||
efl_loop_register(obj, EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS, pd->future_message_handler);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -328,12 +310,6 @@ _efl_loop_efl_object_invalidate(Eo *obj, Efl_Loop_Data *pd)
|
|||
pd->poll_medium = NULL;
|
||||
pd->poll_high = NULL;
|
||||
|
||||
if (pd->message_handlers)
|
||||
{
|
||||
eina_inarray_free(pd->message_handlers);
|
||||
pd->message_handlers = NULL;
|
||||
}
|
||||
|
||||
// After invalidate, it won't be possible to parent to the singleton anymore
|
||||
if (obj == _mainloop_singleton)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ struct Efl.Loop_Arguments {
|
|||
initialization: bool; [[Set to $true when the program should initialize its internal state. This happen once per process instance.]]
|
||||
}
|
||||
|
||||
class @beta Efl.Loop extends Efl.Task
|
||||
abstract @beta Efl.Loop extends Efl.Task
|
||||
{
|
||||
[[The Efl Main Loop
|
||||
|
||||
|
@ -59,11 +59,26 @@ class @beta Efl.Loop extends Efl.Task
|
|||
}
|
||||
}
|
||||
@property time {
|
||||
[[The time point when the loop was logically woken.]]
|
||||
set {}
|
||||
get {}
|
||||
[[Retrieves the time at which the last loop stopped waiting for timeouts or events.]]
|
||||
set @protected {
|
||||
[[You should never need/call this, unless you are implementing a custom
|
||||
tick source for an animator.
|
||||
|
||||
Note: The time point must match whatever zero time you get from ecore_time_get() and @.time.get() (same 0 point).
|
||||
What this point is is undefined, so unless your source uses the same 0 time, then you may have to adjust and do some guessing.
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[This gets the time that the main loop ceased waiting for timouts and/or
|
||||
events to come in or for signals or any other interrupt source. This should
|
||||
be considered a reference point for all time based activity that should
|
||||
calculate its timepoint from the return of ecore_loop_time_get(). Note that this
|
||||
time is meant to be used as relative to other times obtained on this run.
|
||||
If you need absolute time references, use a unix timestamp instead.
|
||||
]]
|
||||
}
|
||||
values {
|
||||
timepoint: double; [[Time in seconds since process specific start point]]
|
||||
timepoint: double; [[Time in seconds]]
|
||||
}
|
||||
}
|
||||
idle {
|
||||
|
@ -98,17 +113,6 @@ class @beta Efl.Loop extends Efl.Task
|
|||
}
|
||||
return: bool; [[$true if successfully unregistered, $false otherwise.]]
|
||||
}
|
||||
message_handler_get @class {
|
||||
[[Get a message handler object that is created by and owned by
|
||||
the Efl.Loop object, so you can listen to this message type by
|
||||
listening to message events on the handler as well as send
|
||||
objects as events.]]
|
||||
params {
|
||||
@in loop: Efl.Loop; [[The loop to get the object from.]]
|
||||
@in klass: const(Efl.Class); [[The class of the message object.]]
|
||||
}
|
||||
return: Efl.Loop_Message_Handler; [[The message handler to use.]]
|
||||
}
|
||||
}
|
||||
events {
|
||||
idle,enter @restart: void; [[Event occurs once the main loop enters the idle state.]]
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <Ecore.h>
|
||||
#include "Eo.h"
|
||||
|
||||
#include "ecore_private.h"
|
||||
#include "efl_loop_model.eo.h"
|
||||
|
||||
typedef struct _Efl_Loop_Model_Watcher_Data Efl_Loop_Model_Watcher_Data;
|
||||
|
@ -106,4 +107,30 @@ _efl_loop_model_efl_model_property_ready_get(Eo *obj, void *pd EINA_UNUSED, cons
|
|||
return efl_future_then(obj, f);
|
||||
}
|
||||
|
||||
static void
|
||||
_noref_death(void *data EINA_UNUSED, const Efl_Event *event)
|
||||
{
|
||||
efl_event_callback_del(event->object, EFL_EVENT_NOREF, _noref_death, NULL);
|
||||
// For safety reason and in case multiple call to volatile has been made
|
||||
// we check that there is still a parent at this point in EFL_EVENT_NOREF
|
||||
efl_del(event->object);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_loop_model_volatile_make(Eo *obj, void *pd EINA_UNUSED)
|
||||
{
|
||||
// Just to make sure we do not double register this callback, we first remove
|
||||
// any potentially previous one.
|
||||
efl_event_callback_del(obj, EFL_EVENT_NOREF, _noref_death, NULL);
|
||||
efl_event_callback_add(obj, EFL_EVENT_NOREF, _noref_death, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_loop_model_efl_object_invalidate(Eo *obj, void *pd EINA_UNUSED)
|
||||
{
|
||||
efl_event_callback_del(obj, EFL_EVENT_NOREF, _noref_death, NULL);
|
||||
|
||||
efl_invalidate(efl_super(obj, EFL_LOOP_MODEL_CLASS));
|
||||
}
|
||||
|
||||
#include "efl_loop_model.eo.c"
|
||||
|
|
|
@ -1,7 +1,18 @@
|
|||
abstract @beta Efl.Loop_Model extends Efl.Loop_Consumer implements Efl.Model
|
||||
{
|
||||
data: null;
|
||||
methods {
|
||||
volatile_make {
|
||||
[[To be called when a Child model is created by @Efl.Model.children_slice_get by the one creating the child object.
|
||||
|
||||
This function is used to properly define the lifecycle of the new Child Model object
|
||||
and make sure that once it has 0 ref except its parent Model, it will be destroyed.
|
||||
This function should only be called once per child. It is useful for @Efl.Model who
|
||||
have a lot of children and shouldn't keep more than what is used in memory.]]
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Object.invalidate;
|
||||
Efl.Model.property_ready_get;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ class @beta Efl.Loop_Timer extends Efl.Loop_Consumer
|
|||
Timers require the ecore main loop to be running and functioning
|
||||
properly. They do not guarantee exact timing but try to work on a
|
||||
"best effort" basis.
|
||||
|
||||
The @Efl.Object.event_freeze and @Efl.Object.event_thaw calls are used to pause and unpause the timer.
|
||||
]]
|
||||
legacy_prefix: ecore_timer;
|
||||
methods {
|
||||
|
@ -27,15 +29,11 @@ class @beta Efl.Loop_Timer extends Efl.Loop_Consumer
|
|||
}
|
||||
}
|
||||
reset {
|
||||
/* FIXME-doc:
|
||||
* @note This is equivalent to (but faster than)
|
||||
* @code
|
||||
* ecore_timer_delay(timer, ecore_timer_interval_get(timer) - ecore_timer_pending_get(timer));
|
||||
* @endcode
|
||||
*/
|
||||
[[Resets a timer to its full interval. This effectively makes the
|
||||
timer start ticking off from zero now.
|
||||
|
||||
This is equal to delaying the timer by the already passed time, since the timer started ticking
|
||||
|
||||
@since 1.2
|
||||
]]
|
||||
}
|
||||
|
@ -65,34 +63,7 @@ class @beta Efl.Loop_Timer extends Efl.Loop_Consumer
|
|||
Efl.Object.finalize;
|
||||
Efl.Object.event_freeze;
|
||||
Efl.Object.parent { set; }
|
||||
/* XXX: can't document overridden methods
|
||||
* Pauses a running timer.
|
||||
*
|
||||
* @param timer The timer to be paused.
|
||||
*
|
||||
* The timer callback won't be called while the timer is paused. The remaining
|
||||
* time until the timer expires will be saved so the timer can be resumed with
|
||||
* that same remaining time to expire, instead of expiring instantly. Use
|
||||
* ecore_timer_thaw() to resume.
|
||||
*
|
||||
* @note Nothing happens if the timer was already paused.
|
||||
*
|
||||
* @see ecore_timer_thaw()
|
||||
*/
|
||||
Efl.Object.event_freeze_count { get; }
|
||||
Efl.Object.event_thaw;
|
||||
/* XXX: can't document overridden methods
|
||||
* Resumes a frozen (paused) timer.
|
||||
*
|
||||
* @param timer The timer to be resumed.
|
||||
*
|
||||
* The timer will be resumed from its previous relative position. This
|
||||
* means if it had X seconds remaining until expiry when paused, it will
|
||||
* now start with those same X seconds remaining.
|
||||
* The interval time won't be affected by this call nor by
|
||||
* ecore_timer_freeze().
|
||||
*
|
||||
* @see ecore_timer_freeze()
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ _clear_child(Eo *child,
|
|||
void *data EINA_UNUSED,
|
||||
const Eina_Future *dead_future EINA_UNUSED)
|
||||
{
|
||||
efl_del(child);
|
||||
efl_unref(child);
|
||||
}
|
||||
|
||||
static Efl_Model *
|
||||
|
@ -125,7 +125,9 @@ _check_child_change(Efl_Model *child, Eina_Bool value)
|
|||
else
|
||||
{
|
||||
r = efl_model_property_set(child, "selected", eina_value_bool_new(!!value));
|
||||
r = efl_future_then(child, r, .success = _commit_change, .free = _clear_child);
|
||||
r = efl_future_then(efl_ref(child), r,
|
||||
.success = _commit_change,
|
||||
.free = _clear_child);
|
||||
}
|
||||
|
||||
return r;
|
||||
|
@ -229,6 +231,15 @@ _untangle_error(void *data, Eina_Error err)
|
|||
return eina_future_as_value(f);
|
||||
}
|
||||
|
||||
static void
|
||||
_untangle_free(void *data,
|
||||
const Eina_Future *dead_future EINA_UNUSED)
|
||||
{
|
||||
Eo *obj = data;
|
||||
|
||||
efl_unref(obj);
|
||||
}
|
||||
|
||||
static Eina_Iterator *
|
||||
_efl_select_model_efl_model_properties_get(const Eo *obj,
|
||||
Efl_Select_Model_Data *pd EINA_UNUSED)
|
||||
|
@ -271,9 +282,10 @@ _efl_select_model_efl_model_property_set(Eo *obj,
|
|||
if (!eina_value_ulong_convert(value, &l))
|
||||
return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_INCORRECT_VALUE);
|
||||
|
||||
return efl_future_then(obj, efl_model_children_slice_get(obj, l, 1),
|
||||
return efl_future_then(efl_ref(obj), efl_model_children_slice_get(obj, l, 1),
|
||||
.success = _select_slice_then,
|
||||
.success_type = EINA_VALUE_TYPE_ARRAY);
|
||||
.success_type = EINA_VALUE_TYPE_ARRAY,
|
||||
.free = _clear_child);
|
||||
}
|
||||
|
||||
if (pd->parent && !strcmp("self.selected", property))
|
||||
|
@ -326,18 +338,23 @@ _efl_select_model_efl_model_property_set(Eo *obj,
|
|||
// There was, need to unselect the previous one along setting the new value
|
||||
parent = efl_parent_get(obj);
|
||||
chain = eina_future_all(chain,
|
||||
efl_future_then(parent, efl_model_children_slice_get(parent, selected, 1),
|
||||
efl_future_then(efl_ref(parent),
|
||||
efl_model_children_slice_get(parent, selected, 1),
|
||||
.success = _unselect_slice_then,
|
||||
.success_type = EINA_VALUE_TYPE_ARRAY));
|
||||
.success_type = EINA_VALUE_TYPE_ARRAY,
|
||||
.free = _clear_child));
|
||||
chain = eina_future_then_easy(chain,
|
||||
.success_type = EINA_VALUE_TYPE_ARRAY,
|
||||
.success = _untangle_array,
|
||||
.data = obj,
|
||||
.error = _untangle_error);
|
||||
.data = efl_ref(obj),
|
||||
.error = _untangle_error,
|
||||
.free = _untangle_free);
|
||||
}
|
||||
}
|
||||
|
||||
return efl_future_then(obj, chain, .success = _commit_change);
|
||||
return efl_future_then(efl_ref(obj), chain,
|
||||
.success = _commit_change,
|
||||
.free = _clear_child);
|
||||
}
|
||||
|
||||
return efl_model_property_set(efl_super(obj, EFL_SELECT_MODEL_CLASS),
|
||||
|
|
|
@ -892,7 +892,7 @@ _efl_thread_efl_io_reader_can_read_set(Eo *obj, Efl_Thread_Data *pd, Eina_Bool c
|
|||
else
|
||||
efl_loop_handler_active_set(pd->fd.out_handler,
|
||||
EFL_LOOP_HANDLER_FLAGS_READ);
|
||||
efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
|
||||
efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
@ -986,7 +986,7 @@ _efl_thread_efl_io_writer_can_write_set(Eo *obj, Efl_Thread_Data *pd, Eina_Bool
|
|||
else
|
||||
efl_loop_handler_active_set(pd->fd.in_handler,
|
||||
EFL_LOOP_HANDLER_FLAGS_WRITE);
|
||||
efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);
|
||||
efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
|
|
@ -1626,7 +1626,7 @@ _efl_net_dialer_http_efl_io_reader_can_read_set(Eo *o, Efl_Net_Dialer_Http_Data
|
|||
EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o));
|
||||
if (pd->can_read == can_read) return;
|
||||
pd->can_read = can_read;
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
@ -1714,7 +1714,7 @@ _efl_net_dialer_http_efl_io_writer_can_write_set(Eo *o, Efl_Net_Dialer_Http_Data
|
|||
EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o));
|
||||
if (pd->can_write == can_write) return;
|
||||
pd->can_write = can_write;
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write);
|
||||
}
|
||||
|
||||
static Eina_Value _efl_net_dialer_http_pending_close(Eo *o, void *data, Eina_Value value);
|
||||
|
|
|
@ -1297,7 +1297,7 @@ _efl_net_dialer_websocket_efl_io_reader_can_read_set(Eo *o, Efl_Net_Dialer_Webso
|
|||
if (pd->streaming_mode == EFL_NET_DIALER_WEBSOCKET_STREAMING_MODE_DISABLED) return;
|
||||
if (pd->can_read == can_read) return;
|
||||
pd->can_read = can_read;
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -1350,7 +1350,7 @@ _efl_net_dialer_websocket_efl_io_writer_can_write_set(Eo *o, Efl_Net_Dialer_Webs
|
|||
can_write = EINA_FALSE;
|
||||
if (pd->can_write == can_write) return;
|
||||
pd->can_write = can_write;
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Error
|
||||
|
|
|
@ -234,7 +234,7 @@ _efl_net_server_udp_client_efl_io_reader_can_read_set(Eo *o, Efl_Net_Server_Udp_
|
|||
EINA_SAFETY_ON_TRUE_RETURN(pd->fd == INVALID_SOCKET);
|
||||
if (pd->can_read == can_read) return;
|
||||
pd->can_read = can_read;
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
@ -265,7 +265,7 @@ _efl_net_server_udp_client_efl_io_writer_can_write_set(Eo *o, Efl_Net_Server_Udp
|
|||
EINA_SAFETY_ON_TRUE_RETURN(pd->fd == INVALID_SOCKET);
|
||||
if (pd->can_write == can_write) return;
|
||||
pd->can_write = can_write;
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
|
|
@ -536,7 +536,7 @@ _efl_net_socket_ssl_efl_io_reader_can_read_set(Eo *o, Efl_Net_Socket_Ssl_Data *p
|
|||
EINA_SAFETY_ON_NULL_RETURN(pd->sock);
|
||||
if (pd->can_read == can_read) return;
|
||||
pd->can_read = can_read;
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
@ -599,7 +599,7 @@ _efl_net_socket_ssl_efl_io_writer_can_write_set(Eo *o, Efl_Net_Socket_Ssl_Data *
|
|||
EINA_SAFETY_ON_NULL_RETURN(pd->sock);
|
||||
if (pd->can_write == can_write) return;
|
||||
pd->can_write = can_write;
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
|
|
@ -816,7 +816,7 @@ _efl_net_socket_windows_efl_io_reader_can_read_set(Eo *o, Efl_Net_Socket_Windows
|
|||
EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o) && can_read);
|
||||
if (pd->can_read == can_read) return;
|
||||
pd->can_read = can_read;
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
@ -899,7 +899,7 @@ _efl_net_socket_windows_efl_io_writer_can_write_set(Eo *o, Efl_Net_Socket_Window
|
|||
EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o) && can_write);
|
||||
if (pd->can_write == can_write) return;
|
||||
pd->can_write = can_write;
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);
|
||||
efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
|
|
@ -263,6 +263,11 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
|
|||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
|
||||
|
||||
if (output->flip_timeout)
|
||||
{
|
||||
ecore_timer_del(output->flip_timeout);
|
||||
output->flip_timeout = NULL;
|
||||
}
|
||||
if (output->current.fb && (output->current.fb != output->pending.fb))
|
||||
_ecore_drm2_fb_buffer_release(output, &output->current);
|
||||
|
||||
|
@ -428,6 +433,21 @@ err:
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static int _fb_atomic_flip(Ecore_Drm2_Output *output);
|
||||
static int _fb_flip(Ecore_Drm2_Output *output);
|
||||
|
||||
static Eina_Bool
|
||||
_cb_flip_timeout(void *data)
|
||||
{
|
||||
Ecore_Drm2_Output *output = data;
|
||||
|
||||
output->flip_timeout = NULL;
|
||||
ERR("flip event callback timout 0.05sec - try again");
|
||||
if (_ecore_drm2_use_atomic) _fb_atomic_flip(output);
|
||||
else _fb_flip(output);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
_fb_atomic_flip(Ecore_Drm2_Output *output)
|
||||
{
|
||||
|
@ -453,6 +473,11 @@ _fb_atomic_flip(Ecore_Drm2_Output *output)
|
|||
ERR("Failed Atomic Commit: %m");
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (output->flip_timeout) ecore_timer_del(output->flip_timeout);
|
||||
output->flip_timeout = ecore_timer_add(0.05, _cb_flip_timeout, output);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -526,6 +551,11 @@ _fb_flip(Ecore_Drm2_Output *output)
|
|||
}
|
||||
usleep(100);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (output->flip_timeout) ecore_timer_del(output->flip_timeout);
|
||||
output->flip_timeout = ecore_timer_add(0.05, _cb_flip_timeout, output);
|
||||
}
|
||||
}
|
||||
while (repeat);
|
||||
|
||||
|
|
|
@ -916,6 +916,8 @@ _output_destroy(Ecore_Drm2_Device *dev EINA_UNUSED, Ecore_Drm2_Output *output)
|
|||
eina_stringshare_del(output->serial);
|
||||
eina_stringshare_del(output->relative.to);
|
||||
|
||||
if (output->flip_timeout) ecore_timer_del(output->flip_timeout);
|
||||
|
||||
sym_drmModeFreeProperty(output->dpms);
|
||||
free(output->edid.blob);
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue