forked from enlightenment/efl
Merge branch 'master' into devs/hermet/lottie
This commit is contained in:
commit
29a81476e7
|
@ -49,7 +49,7 @@ PROJECT_LOGO =
|
|||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = .
|
||||
OUTPUT_DIRECTORY = @top_builddir@/
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||
|
@ -594,7 +594,8 @@ WARN_LOGFILE =
|
|||
# with spaces.
|
||||
|
||||
INPUT = @top_srcdir@/src/lib \
|
||||
@top_srcdir@/elm_intro.h \
|
||||
@top_builddir@/src/lib \
|
||||
@top_builddir@/elm_intro.h \
|
||||
@srcdir@/index_elm.dox \
|
||||
@srcdir@/main.dox \
|
||||
@srcdir@/pkgconfig.dox \
|
||||
|
|
|
@ -3,6 +3,8 @@ apiRules:
|
|||
uidRegex: ^.*NativeMethods$
|
||||
- exclude:
|
||||
uidRegex: ^.*NativeStruct$
|
||||
- exclude:
|
||||
uidRegex: ^.*Concrete$
|
||||
- include:
|
||||
uidRegex: ^Efl
|
||||
- include:
|
||||
|
|
|
@ -0,0 +1,202 @@
|
|||
doc_target = []
|
||||
|
||||
text_filter_properties= [
|
||||
['Blend Example', 'Sans', '24', 'blend'],
|
||||
['Blur', 'Sans:style=bold', '32', 'blur'],
|
||||
['Bump', 'Sans:style=bold', '64', 'bump'],
|
||||
['Curve', 'Sans:style=bold', '64', 'curve'],
|
||||
['Grow - Contour', 'Sans:style=bold', '32', 'grow'],
|
||||
['Mask', 'Sans:style=bold', '64', 'mask'],
|
||||
['Transform - Mirror effect', 'Sans', '50', 'transform'],
|
||||
]
|
||||
widget_previews = [
|
||||
['actionslider', 'preview-00.png', 'widget_preview_actionslider', '120', '30'],
|
||||
['bg', 'preview-00.png', 'widget_preview_bg', '50', '50'],
|
||||
['box', 'preview-00.png', 'widget_preview_box', '200', '160'],
|
||||
['bubble', 'preview-00.png', 'widget_preview_bubble1', '160', '50'],
|
||||
['bubble', 'preview-01.png', 'widget_preview_bubble2', '160', '50'],
|
||||
['bubble', 'preview-02.png', 'widget_preview_bubble3', '160', '50'],
|
||||
['button', 'preview-00.png', 'widget_preview_button1', '160', '50'],
|
||||
['button', 'preview-01.png', 'widget_preview_button2', '160', '50'],
|
||||
['button', 'preview-02.png', 'widget_preview_button3', '160', '50'],
|
||||
['calendar', 'preview-00.png', 'widget_preview_calendar', '300', '300'],
|
||||
['check', 'preview-00.png', 'widget_preview_check1', '160', '50'],
|
||||
['check', 'preview-01.png', 'widget_preview_check2', '160', '50'],
|
||||
['check', 'preview-02.png', 'widget_preview_check3', '160', '50'],
|
||||
['clock', 'preview-00.png', 'widget_preview_clock', '200', '100'],
|
||||
['colorselector', 'preview-00.png', 'widget_preview_colorselector', '320', '300'],
|
||||
['conformant', 'preview-00.png', 'widget_preview_conformant', '200', '400'],
|
||||
['combobox', 'preview-00.png', 'widget_preview_combobox', '300', '300'],
|
||||
['ctxpopup', 'preview-00.png', 'widget_preview_ctxpopup', '200', '130'],
|
||||
['datetime', 'preview-00.png', 'widget_preview_datetime1', '360', '60'],
|
||||
['datetime', 'preview-01.png', 'widget_preview_datetime2', '200', '60'],
|
||||
['datetime', 'preview-02.png', 'widget_preview_datetime3', '200', '60'],
|
||||
['dayselector', 'preview-00.png', 'widget_preview_dayselector', '350', '50'],
|
||||
['diskselector', 'preview-00.png', 'widget_preview_diskselector', '120', '50'],
|
||||
['entry', 'preview-00.png', 'widget_preview_entry1', '160', '50'],
|
||||
['entry', 'preview-01.png', 'widget_preview_entry2', '160', '50'],
|
||||
['entry', 'preview-02.png', 'widget_preview_entry3', '160', '50'],
|
||||
['entry', 'preview-03.png', 'widget_preview_entry4', '160', '50'],
|
||||
['fileselector', 'preview-00.png', 'widget_preview_fileselector', '300', '300'],
|
||||
['fileselector_button', 'preview-00.png', 'widget_preview_fileselector_button1', '200', '50'],
|
||||
['fileselector_button', 'preview-01.png', 'widget_preview_fileselector_button2', '200', '50'],
|
||||
['fileselector_button', 'preview-02.png', 'widget_preview_fileselector_button3', '160', '50'],
|
||||
['fileselector_entry', 'preview-00.png', 'widget_preview_fileselector_entry', '70', '50'],
|
||||
['flip', 'preview-00.png', 'widget_preview_flip', '100', '100'],
|
||||
['flipselector', 'preview-00.png', 'widget_preview_flipselector', '100', '60'],
|
||||
['frame', 'preview-00.png', 'widget_preview_frame', '100', '50'],
|
||||
['gengrid', 'preview-00.png', 'widget_preview_gengrid', '200', '160'],
|
||||
['genlist', 'preview-00.png', 'widget_preview_genlist1', '200', '200'],
|
||||
['genlist', 'preview-01.png', 'widget_preview_genlist2', '200', '160'],
|
||||
['genlist', 'preview-02.png', 'widget_preview_genlist3', '200', '160'],
|
||||
['genlist', 'preview-03.png', 'widget_preview_genlist4', '200', '160'],
|
||||
['genlist', 'preview-04.png', 'widget_preview_genlist5', '200', '160'],
|
||||
['hover', 'preview-00.png', 'widget_preview_hover', '90', '170'],
|
||||
['hoversel', 'preview-00.png', 'widget_preview_hoversel', '90', '170'],
|
||||
['icon', 'preview-00.png', 'widget_preview_icon', '50', '50'],
|
||||
['image', 'preview-00.png', 'widget_preview_image', '50', '50'],
|
||||
['index', 'preview-00.png', 'widget_preview_index', '200', '160'],
|
||||
['inwin', 'preview-00.png', 'widget_preview_inwin1', '200', '160'],
|
||||
['inwin', 'preview-01.png', 'widget_preview_inwin2', '200', '160'],
|
||||
['inwin', 'preview-02.png', 'widget_preview_inwin3', '200', '160'],
|
||||
['label', 'preview-00.png', 'widget_preview_label', '70', '30'],
|
||||
['layout', 'preview-00.png', 'widget_preview_layout', '200', '160'],
|
||||
['list', 'preview-00.png', 'widget_preview_list', '200', '200'],
|
||||
['map', 'preview-00.png', 'widget_preview_map', '256', '256'],
|
||||
['mapbuf', 'preview-00.png', 'widget_preview_mapbuf', '200', '200'],
|
||||
['menu', 'preview-00.png', 'widget_preview_menu', '100', '100'],
|
||||
['notify', 'preview-00.png', 'widget_preview_notify', '60', '30'],
|
||||
['nstate', 'preview-00.png', 'widget_preview_nstate', '45', '28'],
|
||||
['panel', 'preview-00.png', 'widget_preview_panel', '150', '50'],
|
||||
['panes', 'preview-00.png', 'widget_preview_panes', '200', '100'],
|
||||
['photocam', 'preview-00.png', 'widget_preview_photocam', '243', '162'],
|
||||
['popup', 'preview-00.png', 'widget_preview_popup', '480', '400'],
|
||||
['prefs', 'preview-00.png', 'widget_preview_prefs', '200', '160'],
|
||||
['prefs', 'preview-00.png', 'widget_preview_prefs', '280', '250'],
|
||||
['progressbar', 'preview-00.png', 'widget_preview_progressbar', '150', '50'],
|
||||
['radio', 'preview-00.png', 'widget_preview_radio', '60', '20'],
|
||||
['scroller', 'preview-00.png', 'widget_preview_scroller', '100', '30'],
|
||||
['segment_control', 'preview-00.png', 'widget_preview_segment_control', '240', '120'],
|
||||
['separator', 'preview-00.png', 'widget_preview_separator', '10', '80'],
|
||||
['slider', 'preview-00.png', 'widget_preview_slider', '200', '100'],
|
||||
['slideshow', 'preview-00.png', 'widget_preview_slideshow', '50', '50'],
|
||||
['spinner', 'preview-00.png', 'widget_preview_spinner', '160', '30'],
|
||||
['table', 'preview-00.png', 'widget_preview_table', '100', '100'],
|
||||
['thumb', 'preview-00.png', 'widget_preview_thumb', '100', '100'],
|
||||
['toolbar', 'preview-00.png', 'widget_preview_toolbar', '300', '100'],
|
||||
['web', 'preview-00.png', 'widget_preview_web', '300', '300'],
|
||||
['win', 'preview-00.png', 'widget_preview_win', '200', '200'],
|
||||
]
|
||||
|
||||
preview_text_filter = executable('preview_text_filter',
|
||||
join_paths('previews', 'preview_text_filter.c'),
|
||||
include_directories : config_dir,
|
||||
dependencies: [ecore_evas],
|
||||
build_by_default: false,
|
||||
)
|
||||
|
||||
widget_preview_eps = custom_target('widget_preview_prefs_epc',
|
||||
input: join_paths('widgets', 'widget_preview_prefs.epc'),
|
||||
output: 'widget_preview_prefs.epb',
|
||||
command: elm_prefs_cc_exe + ['@INPUT@', '@OUTPUT@'],
|
||||
build_by_default: false,
|
||||
depends: [elm_prefs_cc]
|
||||
)
|
||||
|
||||
shot_sh = find_program('shot.sh')
|
||||
tar = find_program('tar')
|
||||
convert = find_program('convert')
|
||||
|
||||
foreach text_filter_property : text_filter_properties
|
||||
text = text_filter_property[0]
|
||||
font = text_filter_property[1]
|
||||
size = text_filter_property[2]
|
||||
name = text_filter_property[3]
|
||||
filter_code = run_command('cat', join_paths(meson.source_root(), 'src', 'examples', 'evas', 'filters', 'filter_'+name+'.lua'))
|
||||
|
||||
doc_target += custom_target('preview_text_filters_'+name,
|
||||
command: [env, 'EFL_RUN_IN_TREE=1', preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size],
|
||||
depends: preview_text_filter,
|
||||
output: 'filter_'+name+'.png',
|
||||
build_by_default: false
|
||||
)
|
||||
endforeach
|
||||
|
||||
foreach widget_preview : widget_previews
|
||||
binary = widget_preview[2]
|
||||
|
||||
if get_variable(binary, preview_text_filter) == preview_text_filter
|
||||
tmp = executable(binary,
|
||||
join_paths('widgets', binary+'.c'),
|
||||
dependencies: elementary,
|
||||
build_by_default: false,
|
||||
c_args : [
|
||||
'-DPACKAGE_DATA_DIR="'+meson.current_build_dir()+'"',
|
||||
'-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
|
||||
'-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"',
|
||||
'-DDOCW_DIR="'+meson.current_build_dir()+'"']
|
||||
)
|
||||
set_variable(binary, tmp)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
foreach widget_preview : widget_previews
|
||||
directory = widget_preview[0]
|
||||
ss = widget_preview[1]
|
||||
binary = widget_preview[2]
|
||||
x = widget_preview[3]
|
||||
y = widget_preview[4]
|
||||
|
||||
widget_executable = get_variable(binary)
|
||||
|
||||
screen_shot_dir = join_paths(meson.build_root(), 'html', 'img', 'widget', directory)
|
||||
|
||||
create_preview = custom_target('widget_preview_'+('_'.join([directory, ss, x, y])),
|
||||
command: [shot_sh, screen_shot_dir, ss, widget_executable.full_path(), x, y],
|
||||
output: '-'.join([directory, ss, x, y]),
|
||||
depends: [widget_executable, widget_preview_eps],
|
||||
build_by_default: false,
|
||||
)
|
||||
convert_preview = []
|
||||
#
|
||||
# This does not work see https://github.com/the-paperless-project/paperless/issues/439 for more details
|
||||
# for now this means that no images will be in the latex documentation
|
||||
#
|
||||
#convert_preview = custom_target('convert_preview_'+('_'.join([directory, ss, x, y])),
|
||||
# command: [convert, join_paths(screen_shot_dir, ss), join_paths(screen_shot_dir, ss.split('.')[0]+'.eps')],
|
||||
# output: '-'.join([directory, ss, x, y])+'.eps',
|
||||
# depends: [create_preview],
|
||||
# build_by_default: false,
|
||||
#)
|
||||
doc_target += [create_preview, convert_preview]
|
||||
endforeach
|
||||
|
||||
doc_target += custom_target('doxygen',
|
||||
command: [doxygen, join_paths(meson.current_build_dir(), 'Doxyfile')],
|
||||
output: ['empty'],
|
||||
build_by_default: false
|
||||
)
|
||||
|
||||
compress_target = custom_target('package_doc_tar',
|
||||
command: [tar, '-C', meson.build_root(), '-cf', 'efl-'+meson.version()+'.tar', 'html', 'man'],
|
||||
output: 'efl-'+meson.version()+'.tar',
|
||||
depends: doc_target,
|
||||
build_by_default: false
|
||||
)
|
||||
|
||||
run_target('doc',
|
||||
command: ['echo', 'Documentation sucessfully build!'],
|
||||
depends: compress_target,
|
||||
)
|
||||
|
||||
doxyfile_conf = configuration_data()
|
||||
doxyfile_conf.merge_from(config_h)
|
||||
doxyfile_conf.set('srcdir', meson.current_source_dir())
|
||||
doxyfile_conf.set('top_builddir', meson.build_root())
|
||||
doxyfile_conf.set('top_srcdir', meson.source_root())
|
||||
|
||||
configure_file(
|
||||
input: 'Doxyfile.in',
|
||||
output: 'Doxyfile',
|
||||
configuration: doxyfile_conf,
|
||||
)
|
|
@ -12,6 +12,7 @@ export ELM_DISPLAY=shot
|
|||
export ILLUME_KBD=0,0,240,123
|
||||
export ILLUME_IND=0,0,240,32
|
||||
export ILLUME_STK=0,288,240,32
|
||||
export EFL_RUN_IN_TREE=1
|
||||
|
||||
mkdir -p $DIR || true
|
||||
|
||||
|
|
|
@ -231,4 +231,6 @@ config_h.set('SIZEOF_LONG', cc.sizeof('long'))
|
|||
if sys_windows == true
|
||||
config_h.set('HAVE_DLSYM', '1')
|
||||
config_h.set('HAVE_NOTIFY_WIN32', '1')
|
||||
config_h.set10('HAVE_WINDOWS_H', true)
|
||||
config_h.set10('HAVE_DDRAW_H', true)
|
||||
endif
|
||||
|
|
11
meson.build
11
meson.build
|
@ -291,6 +291,7 @@ subprojects = [
|
|||
['ecore_fb' ,['fb'] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_wl2' ,['wl'] , true, true, false, false, false, false, ['eina'], ['libdrm']],
|
||||
['ecore_sdl' ,['sdl'] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_win32' ,[] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_ipc' ,[] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_buffer' ,['buffer'] , true, true, true, false, false, false, ['eina'], []],
|
||||
['ector' ,[] , false, true, false, false, true, false, ['eina', 'efl'], ['draw', 'triangulator', 'freetype']],
|
||||
|
@ -438,7 +439,9 @@ if get_option('eolian-bootstrap') == false
|
|||
subdir(join_paths('src', 'bin', 'efl'))
|
||||
|
||||
subdir(join_paths('src', 'generic', 'evas'))
|
||||
subdir(join_paths('src', 'generic', 'emotion'))
|
||||
if sys_windows == false
|
||||
subdir(join_paths('src', 'generic', 'emotion'))
|
||||
endif
|
||||
|
||||
bindings = get_option('bindings')
|
||||
bindings_order = ['luajit', 'cxx', 'mono']
|
||||
|
@ -478,6 +481,12 @@ foreach evas_loader_map_inst : evas_loader_map
|
|||
meson.add_install_script('meson/evas_loader_conf.sh', evas_loader_original, evas_loader_link_types)
|
||||
endforeach
|
||||
|
||||
doxygen = find_program('doxygen', required : false)
|
||||
|
||||
if get_option('eolian-bootstrap') == false and doxygen.found()
|
||||
subdir('doc')
|
||||
endif
|
||||
|
||||
#
|
||||
# Configure files
|
||||
#
|
||||
|
|
|
@ -13,10 +13,10 @@ loader_name="$(echo "$loader" | cut -f 1 -d '.')"
|
|||
|
||||
original_ext="$(echo "$loader" | tail -c 4)"
|
||||
if test "$original_ext" = "$ext" ; then
|
||||
mv "$DESTDIR"/"$original_loader" "$DESTDIR"/"$loader_dir"/"$original_name"
|
||||
mv "$DESTDIR""$original_loader" "$DESTDIR""$loader_dir"/"$original_name"
|
||||
fi
|
||||
|
||||
shift
|
||||
for x in "$@"; do
|
||||
ln -sf "$original_name" "$DESTDIR"/"$loader_dir"/"$loader_name"."$x"
|
||||
ln -sf "$original_name" "$DESTDIR""$loader_dir"/"$loader_name"."$x"
|
||||
done
|
||||
|
|
|
@ -4,5 +4,5 @@ for x in "$@" ; do
|
|||
dir="$(dirname $x)"
|
||||
filename="$(basename $x)"
|
||||
ext="${filename##*.}"
|
||||
mv "$DESTDIR"/"$x" "$DESTDIR"/"$dir"/module."$ext"
|
||||
mv "$DESTDIR""$x" "$DESTDIR""$dir"/module."$ext"
|
||||
done
|
||||
|
|
|
@ -26,7 +26,7 @@ installed_eflcxxextraheadersdir = $(includedir)/efl-cxx-@VMAJ@/cxx
|
|||
dist_installed_eflcxxextraheaders_DATA = lib/efl/cxx/efl_part_impl.hh
|
||||
|
||||
installed_elementarycxxmainheadersdir = $(includedir)/elementary-cxx-@VMAJ@/
|
||||
dist_installed_elementarycxxmainheaders_DATA = lib/elementary/Elementary.hh
|
||||
dist_installed_elementarycxxmainheaders_DATA = lib/elementary/Efl_Ui.hh
|
||||
|
||||
installed_evascxxmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/
|
||||
dist_installed_evascxxmainheaders_DATA = lib/evas/Evas.hh
|
||||
|
@ -218,18 +218,18 @@ TESTS_EINA_CXX_OBJNAME = tests_eina_cxx_
|
|||
endif
|
||||
|
||||
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrlist.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_iterator.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrlist.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_iterator.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
|
||||
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-simple.$(OBJEXT): tests/eina_cxx/simple.eo.c tests/eina_cxx/simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-simple.$(OBJEXT): tests/eina_cxx/eina_simple.eo.c tests/eina_cxx/eina_simple.eo.h
|
||||
|
||||
CLEANFILES += \
|
||||
tests/eina_cxx/simple.eo.c \
|
||||
tests/eina_cxx/simple.eo.h \
|
||||
tests/eina_cxx/simple.eo.hh \
|
||||
tests/eina_cxx/simple.eo.impl.hh
|
||||
tests/eina_cxx/eina_simple.eo.c \
|
||||
tests/eina_cxx/eina_simple.eo.h \
|
||||
tests/eina_cxx/eina_simple.eo.hh \
|
||||
tests/eina_cxx/eina_simple.eo.impl.hh
|
||||
|
||||
tests_eina_cxx_eina_cxx_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
||||
-DTESTS_WD=\"`pwd`\" \
|
||||
|
@ -407,4 +407,4 @@ endif
|
|||
endif
|
||||
|
||||
EXTRA_DIST2 += \
|
||||
tests/eina_cxx/simple.eo
|
||||
tests/eina_cxx/eina_simple.eo
|
||||
|
|
|
@ -81,7 +81,7 @@ tests/eolian/data/class_simple.eo \
|
|||
tests/eolian/data/complex_type.eo \
|
||||
tests/eolian/data/consts.eo \
|
||||
tests/eolian/data/ctor_dtor.eo \
|
||||
tests/eolian/data/docs.eo \
|
||||
tests/eolian/data/eo_docs.eo \
|
||||
tests/eolian/data/enum.eo \
|
||||
tests/eolian/data/events.eo \
|
||||
tests/eolian/data/extern.eo \
|
||||
|
|
|
@ -81,6 +81,7 @@ static void
|
|||
eina_bench_e17_stringshare(Eina_Stringshare_Test *str)
|
||||
{
|
||||
Eina_Counter *cnt;
|
||||
char *result;
|
||||
|
||||
cnt = eina_counter_new(str->name);
|
||||
|
||||
|
@ -96,7 +97,9 @@ eina_bench_e17_stringshare(Eina_Stringshare_Test *str)
|
|||
|
||||
eina_counter_stop(cnt, 1);
|
||||
|
||||
fprintf(stderr, "For `%s`:\n%s\n", str->name,eina_counter_dump(cnt));
|
||||
result = eina_counter_dump(cnt);
|
||||
fprintf(stderr, "For `%s`:\n%s\n", str->name, result);
|
||||
free(result);
|
||||
|
||||
eina_counter_free(cnt);
|
||||
}
|
||||
|
|
|
@ -36,8 +36,12 @@ if meson.is_cross_build()
|
|||
edje_cc_exe = [_edje_cc]
|
||||
edje_depends = []
|
||||
else
|
||||
env = find_program('env', native: true)
|
||||
edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
|
||||
if sys_windows == true
|
||||
edje_cc_exe = [edje_cc.full_path()]
|
||||
else
|
||||
env = find_program('env', native: true)
|
||||
edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
|
||||
endif
|
||||
edje_depends = [edje_cc, epp]
|
||||
endif
|
||||
|
||||
|
|
|
@ -11,14 +11,16 @@ config_h.set('STRICT_SPEC', '1')
|
|||
|
||||
efreetd = executable('efreetd',
|
||||
efreetd_src,
|
||||
dependencies: [efreet, ecore, ecore_ipc, ecore_file, eio],
|
||||
dependencies: [efreet, ecore, ecore_ipc, ecore_file, eio, intl],
|
||||
install: true,
|
||||
c_args : package_c_args,
|
||||
)
|
||||
|
||||
efreet_bin_deps = [efreet, ecore, eet, ecore_file, intl]
|
||||
|
||||
efreet_desktop_cache_create = executable('efreet_desktop_cache_create',
|
||||
'efreet_desktop_cache_create.c',
|
||||
dependencies: [efreet, ecore, eet, ecore_file],
|
||||
dependencies: efreet_bin_deps,
|
||||
install: true,
|
||||
install_dir : join_paths(dir_lib, 'efreet', version_name),
|
||||
c_args : package_c_args,
|
||||
|
@ -26,7 +28,7 @@ efreet_desktop_cache_create = executable('efreet_desktop_cache_create',
|
|||
|
||||
efreet_icon_cache_create = executable('efreet_icon_cache_create',
|
||||
'efreet_icon_cache_create.c',
|
||||
dependencies: [efreet, ecore, eet, ecore_file],
|
||||
dependencies: efreet_bin_deps,
|
||||
install: true,
|
||||
install_dir : join_paths(dir_lib, 'efreet', version_name),
|
||||
c_args : package_c_args,
|
||||
|
@ -34,7 +36,7 @@ efreet_icon_cache_create = executable('efreet_icon_cache_create',
|
|||
|
||||
efreet_mime_cache_create = executable('efreet_mime_cache_create',
|
||||
'efreet_mime_cache_create.c',
|
||||
dependencies: [efreet, ecore, eet, ecore_file],
|
||||
dependencies: efreet_bin_deps,
|
||||
install: true,
|
||||
install_dir : join_paths(dir_lib, 'efreet', version_name),
|
||||
c_args : package_c_args,
|
||||
|
|
|
@ -194,7 +194,7 @@ _atos(const char *prog, const char *bin_dir, const char *bin_name, unsigned long
|
|||
if ((spaces == func_space_count) && (func_done == EINA_FALSE))
|
||||
{
|
||||
*s = '\0';
|
||||
*func_name = strndup(buf, (int)(s - &(buf[0])));
|
||||
*func_name = eina_strndup(buf, (int)(s - &(buf[0])));
|
||||
func_done = EINA_TRUE;
|
||||
}
|
||||
else if (*s == '(')
|
||||
|
@ -208,7 +208,7 @@ _atos(const char *prog, const char *bin_dir, const char *bin_name, unsigned long
|
|||
else if ((*s == ':') && (func_done == EINA_TRUE))
|
||||
{
|
||||
*s = '\0';
|
||||
*file_name = strndup(f1, (int)(s - f1));
|
||||
*file_name = eina_strndup(f1, (int)(s - f1));
|
||||
s++;
|
||||
len = strlen(s);
|
||||
s[len - 1] = '\0'; /* Remove the closing parenthesis */
|
||||
|
@ -266,7 +266,7 @@ bt_input_translate(const char *line, char **comment)
|
|||
(int)(fileend - filestart), filestart,
|
||||
(int)(addrend - addrstart), addrstart,
|
||||
(int)(baseend - basestart), basestart);
|
||||
*comment = strndup(line, addrstart - line);
|
||||
*comment = eina_strndup(line, addrstart - line);
|
||||
return local;
|
||||
}
|
||||
|
||||
|
|
|
@ -201,25 +201,6 @@ _grid_item_getcb(Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *xposret, int
|
|||
return item;
|
||||
}
|
||||
|
||||
static inline char *
|
||||
_strndup(const char *str, size_t len)
|
||||
{
|
||||
const char *p;
|
||||
char *ret;
|
||||
size_t slen;
|
||||
|
||||
for (slen = 0, p = str;
|
||||
(slen < len) && (*p);
|
||||
p++, slen++);
|
||||
|
||||
ret = malloc(slen + 1);
|
||||
if (!ret) return NULL;
|
||||
|
||||
if (slen > 0) memcpy(ret, str, slen);
|
||||
ret[slen] = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_gl_poscb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, Evas_Coord x, Evas_Coord y, int xposret, int yposret, Elm_Xdnd_Action action EINA_UNUSED)
|
||||
{
|
||||
|
@ -237,7 +218,7 @@ _gl_dropcb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, Elm_Se
|
|||
if (ev->len <= 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
char *dd = _strndup(ev->data, ev->len);
|
||||
char *dd = eina_strndup(ev->data, ev->len);
|
||||
if (!dd) return EINA_FALSE;
|
||||
char *p = dd;
|
||||
|
||||
|
@ -292,7 +273,7 @@ _grid_dropcb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, Elm_
|
|||
if (ev->len <= 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
char *dd = _strndup(ev->data, ev->len);
|
||||
char *dd = eina_strndup(ev->data, ev->len);
|
||||
if (!dd) return EINA_FALSE;
|
||||
char *p = dd;
|
||||
char *s = _drag_data_extract(&p);
|
||||
|
@ -1000,7 +981,7 @@ static Eina_Bool _drop_box_button_new_cb(void *data, Evas_Object *obj, Elm_Selec
|
|||
if (ev->len <= 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
char *dd = _strndup(ev->data, ev->len);
|
||||
char *dd = eina_strndup(ev->data, ev->len);
|
||||
if (!dd) return EINA_FALSE;
|
||||
char *p = dd;
|
||||
char *s = _drag_data_extract(&p);
|
||||
|
@ -1034,7 +1015,7 @@ static Eina_Bool _drop_but_icon_change_cb(void *data, Evas_Object *obj, Elm_Sele
|
|||
if (ev->len <= 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
char *dd = _strndup(ev->data, ev->len);
|
||||
char *dd = eina_strndup(ev->data, ev->len);
|
||||
if (!dd) return EINA_FALSE;
|
||||
char *p = dd;
|
||||
char *s = _drag_data_extract(&p);
|
||||
|
@ -1062,7 +1043,7 @@ static Eina_Bool _drop_bg_change_cb(void *data EINA_UNUSED, Evas_Object *obj, El
|
|||
if (ev->len <= 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
char *dd = _strndup(ev->data, ev->len);
|
||||
char *dd = eina_strndup(ev->data, ev->len);
|
||||
if (!dd) return EINA_FALSE;
|
||||
char *p = dd;
|
||||
char *s = _drag_data_extract(&p);
|
||||
|
|
|
@ -95,7 +95,7 @@ _generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf)
|
|||
}
|
||||
if (cl)
|
||||
{
|
||||
char *meth = strndup(mname + 1, sfx - mname - 1);
|
||||
char *meth = eina_strndup(mname + 1, sfx - mname - 1);
|
||||
fn = eolian_class_function_by_name_get(cl, meth, ftype);
|
||||
if (ftype == EOLIAN_UNRESOLVED)
|
||||
ftype = eolian_function_type_get(fn);
|
||||
|
|
|
@ -618,7 +618,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if (!eolian_state_file_parse(eos, input))
|
||||
if (!eolian_state_file_path_parse(eos, input))
|
||||
{
|
||||
fprintf(stderr, "eolian: could not parse file '%s'\n", input);
|
||||
goto end;
|
||||
|
|
|
@ -315,7 +315,7 @@ run(options_type const& opts)
|
|||
|
||||
for(auto&& name : opts.in_files)
|
||||
{
|
||||
Eolian_Unit const* unit = ::eolian_state_file_parse(opts.state, name.c_str());
|
||||
Eolian_Unit const* unit = ::eolian_state_file_path_parse(opts.state, name.c_str());
|
||||
if(!unit)
|
||||
{
|
||||
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
|
||||
|
@ -398,7 +398,7 @@ database_load(options_type const& opts)
|
|||
<< "No input file.";
|
||||
assert(false && "Error parsing input file");
|
||||
}
|
||||
if (!opts.main_header && !::eolian_state_file_parse(opts.state, opts.in_files[0].c_str()))
|
||||
if (!opts.main_header && !::eolian_state_file_path_parse(opts.state, opts.in_files[0].c_str()))
|
||||
{
|
||||
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
|
||||
<< "Failed parsing: " << opts.in_files[0] << ".";
|
||||
|
|
|
@ -33,21 +33,34 @@ struct alias_definition_generator
|
|||
if (!name_helpers::open_namespaces(sink, alias.namespaces, context))
|
||||
return false;
|
||||
|
||||
std::string alias_type;
|
||||
if (!as_generator(eolian_mono::type).generate(std::back_inserter(alias_type), alias.base_type, context))
|
||||
return false;
|
||||
|
||||
std::string const alias_name = utils::remove_all(alias.eolian_name, '_');
|
||||
if (!as_generator(
|
||||
"public struct " << alias_name << "\n"
|
||||
documentation
|
||||
<< "public struct " << alias_name << "\n"
|
||||
<< "{\n"
|
||||
<< scope_tab << "private " << type << " payload;\n"
|
||||
<< scope_tab << "public static implicit operator " << alias_name << "(" << type << " x)\n"
|
||||
<< scope_tab << "private " << alias_type << " payload;\n\n"
|
||||
|
||||
<< scope_tab << "/// <summary>Converts an instance of " << alias_type << " to this struct.</summary>\n"
|
||||
<< scope_tab << "/// <param name=\"value\">The value to be converted.</param>\n"
|
||||
<< scope_tab << "/// <returns>A struct with the given value.</returns>\n"
|
||||
<< scope_tab << "public static implicit operator " << alias_name << "(" << alias_type << " value)\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "return new " << alias_name << "{payload=x};\n"
|
||||
<< scope_tab << scope_tab << "return new " << alias_name << "{payload=value};\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
<< scope_tab << "public static implicit operator " << type << "(" << alias_name << " x)\n"
|
||||
|
||||
<< scope_tab << "/// <summary>Converts an instance of this struct to " << alias_type << ".</summary>\n"
|
||||
<< scope_tab << "/// <param name=\"value\">The value to be converted packed in this struct.</param>\n"
|
||||
<< scope_tab << "/// <returns>The actual value the alias is wrapping.</returns>\n"
|
||||
<< scope_tab << "public static implicit operator " << alias_type << "(" << alias_name << " value)\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "return x.payload;\n"
|
||||
<< scope_tab << scope_tab << "return value.payload;\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
<< "}\n\n"
|
||||
).generate(sink, std::make_tuple(alias.base_type, alias.base_type, alias.base_type), context))
|
||||
).generate(sink, alias, context))
|
||||
return false;
|
||||
|
||||
if (!name_helpers::close_namespaces(sink, alias.namespaces, context))
|
||||
|
|
|
@ -54,8 +54,20 @@ struct async_function_declaration_generator
|
|||
return true;
|
||||
|
||||
if (!as_generator(
|
||||
scope_tab << "System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") <<
|
||||
" System.Threading.CancellationToken token = default(System.Threading.CancellationToken));\n"
|
||||
scope_tab << "/// <summary>Async wrapper for <see cref=\"" << name_helpers::managed_method_name(f) << "\" />.</summary>\n"
|
||||
).generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
|
||||
// generate_parameter is not a proper as_generator-compatible generator, so we had to do an old fashioned loop
|
||||
for (auto&& param : f.parameters)
|
||||
if (!documentation(1).generate_parameter(sink, param, context))
|
||||
return false;
|
||||
|
||||
if (!as_generator(
|
||||
scope_tab << "/// <param name=\"token\">Token to notify the async operation of external request to cancel.</param>\n"
|
||||
<< scope_tab << "/// <returns>An async task wrapping the result of the operation.</returns>\n"
|
||||
<< scope_tab << "System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") <<
|
||||
" System.Threading.CancellationToken token = default(System.Threading.CancellationToken));\n\n"
|
||||
).generate(sink, f.parameters, context))
|
||||
return false;
|
||||
|
||||
|
@ -88,12 +100,24 @@ struct async_function_definition_generator
|
|||
|
||||
std::transform(f.parameters.begin(), f.parameters.end(), std::back_inserter(param_forwarding), parameter_forwarding);
|
||||
|
||||
if (!as_generator(
|
||||
scope_tab << "/// <summary>Async wrapper for <see cref=\"" << name_helpers::managed_method_name(f) << "\" />.</summary>\n"
|
||||
).generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
|
||||
// generate_parameter is not a proper as_generator-compatible generator, so we had to do an old fashioned loop
|
||||
for (auto&& param : f.parameters)
|
||||
if (!documentation(1).generate_parameter(sink, param, context))
|
||||
return false;
|
||||
|
||||
if(!as_generator(
|
||||
scope_tab << "public System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << " System.Threading.CancellationToken token = default(System.Threading.CancellationToken))\n"
|
||||
scope_tab << "/// <param name=\"token\">Token to notify the async operation of external request to cancel.</param>\n"
|
||||
<< scope_tab << "/// <returns>An async task wrapping the result of the operation.</returns>\n"
|
||||
<< scope_tab << "public System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << " System.Threading.CancellationToken token = default(System.Threading.CancellationToken))\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "Eina.Future future = " << name_helpers::managed_method_name(f) << "(" << (string % ",") << ");\n"
|
||||
<< scope_tab << scope_tab << "return Efl.Eo.Globals.WrapAsync(future, token);\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
).generate(sink, std::make_tuple(f.parameters, param_forwarding), context))
|
||||
return false;
|
||||
return true;
|
||||
|
|
|
@ -268,7 +268,7 @@ struct property_wrapper_definition_generator
|
|||
std::string managed_name = name_helpers::property_managed_name(property);
|
||||
|
||||
if (!as_generator(
|
||||
scope_tab << documentation
|
||||
documentation(1)
|
||||
<< scope_tab << (interface ? "" : "public ") << (is_static ? "static " : "") << type(true) << " " << managed_name << " {\n"
|
||||
).generate(sink, std::make_tuple(property, prop_type), context))
|
||||
return false;
|
||||
|
|
|
@ -465,9 +465,9 @@ struct klass
|
|||
|
||||
// Native method definitions
|
||||
if(!as_generator(
|
||||
indent << scope_tab << "#pragma warning disable CA1707, SA1300, SA1600\n\n"
|
||||
indent << scope_tab << "#pragma warning disable CA1707, CS1591, SA1300, SA1600\n\n"
|
||||
<< *(native_function_definition(cls))
|
||||
<< indent << scope_tab << "#pragma warning restore CA1707, SA1300, SA1600\n\n")
|
||||
<< indent << scope_tab << "#pragma warning restore CA1707, CS1591, SA1300, SA1600\n\n")
|
||||
.generate(sink, implementable_methods, change_indentation(indent.inc(), inative_cxt))) return false;
|
||||
|
||||
if(!as_generator("}\n").generate(sink, attributes::unused, inative_cxt)) return false;
|
||||
|
@ -516,15 +516,19 @@ struct klass
|
|||
return true;
|
||||
|
||||
if (cls.get_all_events().size() > 0)
|
||||
if (!as_generator(scope_tab << visibility << "Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)> eoEvents = new Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)>();\n"
|
||||
<< scope_tab << visibility << "readonly object eventLock = new object();\n")
|
||||
if (!as_generator(
|
||||
scope_tab << "/// <summary>Internal usage by derived classes to track native events.</summary>\n"
|
||||
<< scope_tab << visibility << "Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)> eoEvents = new Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)>();\n"
|
||||
<< scope_tab << "/// <summary>Internal usage by derived classes to lock native event handlers.</summary>\n"
|
||||
<< scope_tab << visibility << "readonly object eventLock = new object();\n")
|
||||
.generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
|
||||
if (is_inherit)
|
||||
{
|
||||
if (!as_generator(
|
||||
scope_tab << "protected bool inherited;\n"
|
||||
scope_tab << "/// <summary>Internal usage to detect whether this instance is from a generated class or not.</summary>\n"
|
||||
<< scope_tab << "protected bool inherited;\n"
|
||||
).generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ struct part_definition_generator
|
|||
return true;
|
||||
|
||||
auto part_klass_name = name_helpers::klass_full_concrete_or_interface_name(part.klass);
|
||||
return as_generator(scope_tab << documentation
|
||||
return as_generator(documentation(1)
|
||||
<< scope_tab << "public " << part_klass_name << " " << name_helpers::managed_part_name(part) << "\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "get\n"
|
||||
|
|
|
@ -267,7 +267,8 @@ struct struct_internal_definition_generator
|
|||
auto const& indent = current_indentation(context);
|
||||
if (!as_generator
|
||||
(
|
||||
indent << "///<summary>Internal wrapper for struct " << string << ".</summary>\n"
|
||||
indent << "#pragma warning disable CS1591\n\n"
|
||||
<< indent << "///<summary>Internal wrapper for struct " << string << ".</summary>\n"
|
||||
<< indent << "[StructLayout(LayoutKind.Sequential)]\n"
|
||||
<< indent << "public struct " << string << "\n"
|
||||
<< indent << "{\n"
|
||||
|
@ -367,7 +368,9 @@ struct struct_internal_definition_generator
|
|||
return false;
|
||||
|
||||
// close internal class
|
||||
if(!as_generator(indent << "}\n\n").generate(sink, attributes::unused, context)) return false;
|
||||
if(!as_generator(indent << "}\n\n"
|
||||
<< indent << "#pragma warning restore CS1591\n\n"
|
||||
).generate(sink, attributes::unused, context)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -400,7 +403,7 @@ struct struct_definition_generator
|
|||
field_name[0] = std::toupper(field_name[0]); // Hack to allow 'static' as a field name
|
||||
if (!as_generator
|
||||
(
|
||||
indent << scope_tab << documentation
|
||||
documentation(indent.n + 1)
|
||||
<< indent << scope_tab << "public " << type << " " << string << ";\n"
|
||||
)
|
||||
.generate(sink, std::make_tuple(field, field.type, name_helpers::to_field_name(field.name)), context))
|
||||
|
@ -435,7 +438,9 @@ struct struct_definition_generator
|
|||
}
|
||||
|
||||
if(!as_generator(
|
||||
indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n"
|
||||
indent << scope_tab << "///<summary>Implicit conversion to the managed representation from a native pointer.</summary>\n"
|
||||
<< indent << scope_tab << "///<param name=\"ptr\">Native pointer to be converted.</param>\n"
|
||||
<< indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n"
|
||||
<< indent << scope_tab << "{\n"
|
||||
<< indent << scope_tab << scope_tab << "var tmp = (" << struct_name << ".NativeStruct)Marshal.PtrToStructure(ptr, typeof(" << struct_name << ".NativeStruct));\n"
|
||||
<< indent << scope_tab << scope_tab << "return tmp;\n"
|
||||
|
|
|
@ -58,11 +58,12 @@ struct constant_definition_generator
|
|||
}
|
||||
|
||||
// declare variable
|
||||
if (!as_generator(scope_tab(1)
|
||||
if (!as_generator(documentation(1)
|
||||
<< scope_tab(1)
|
||||
<< "public static readonly " << type
|
||||
<< " " << utils::remove_all(constant.name, '_')
|
||||
<< " = " << literal << ";\n")
|
||||
.generate(sink, constant.base_type, context))
|
||||
.generate(sink, std::make_tuple(constant, constant.base_type), context))
|
||||
return false;
|
||||
|
||||
// FIXME missing documentation generator
|
||||
|
|
|
@ -261,7 +261,7 @@ database_load(options_type const& opts)
|
|||
<< "No input file.";
|
||||
assert(false && "Error parsing input file");
|
||||
}
|
||||
if (!::eolian_state_file_parse(opts.state, opts.in_file.c_str()))
|
||||
if (!::eolian_state_file_path_parse(opts.state, opts.in_file.c_str()))
|
||||
{
|
||||
EINA_CXX_DOM_LOG_ERR(eolian_mono::domain)
|
||||
<< "Failed parsing: " << opts.in_file << ".";
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
cxx_header_src += files(join_paths('..', file_location, 'Efl_Ui.hh'))
|
|
@ -11,7 +11,7 @@ cxx_sublibs = [
|
|||
['Evas', false, true, true, []],
|
||||
['Edje', false, false, true, []],
|
||||
['Eldbus', true, true, true, []],
|
||||
['Elementary', false, true, true, []]
|
||||
['Elementary', true, true, true, []]
|
||||
]
|
||||
|
||||
increased_dependency = []
|
||||
|
|
|
@ -310,7 +310,8 @@ ffi.cdef [[
|
|||
Eina_Iterator *eolian_state_eot_file_paths_get(const Eolian_State *state);
|
||||
Eina_Iterator *eolian_state_eo_files_get(const Eolian_State *state);
|
||||
Eina_Iterator *eolian_state_eot_files_get(const Eolian_State *state);
|
||||
const Eolian_Unit *eolian_state_file_parse(Eolian_State *state, const char *filepath);
|
||||
const Eolian_Unit *eolian_state_file_parse(Eolian_State *state, const char *filename);
|
||||
const Eolian_Unit *eolian_state_file_path_parse(Eolian_State *state, const char *filepath);
|
||||
Eina_Bool eolian_state_all_eo_files_parse(Eolian_State *state);
|
||||
Eina_Bool eolian_state_all_eot_files_parse(Eolian_State *state);
|
||||
Eina_Bool eolian_state_check(const Eolian_State *state);
|
||||
|
@ -755,8 +756,16 @@ ffi.metatype("Eolian_State", {
|
|||
return eolian.eolian_state_system_directory_add(self) ~= 0
|
||||
end,
|
||||
|
||||
file_parse = function(self, fpath)
|
||||
local v = eolian.eolian_state_file_parse(self, fpath)
|
||||
file_parse = function(self, fname)
|
||||
local v = eolian.eolian_state_file_parse(self, fname)
|
||||
if v == nil then
|
||||
return nil
|
||||
end
|
||||
return v
|
||||
end,
|
||||
|
||||
file_path_parse = function(self, fpath)
|
||||
local v = eolian.eolian_state_file_path_parse(self, fpath)
|
||||
if v == nil then
|
||||
return nil
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ static class UnsafeNativeMethods
|
|||
|
||||
static UnsafeNativeMethods()
|
||||
{
|
||||
_evas_init = new Efl.Eo.FunctionWrapper<init_func_delegate>("evas", "evas_init");
|
||||
_evas_init = new Efl.Eo.FunctionWrapper<init_func_delegate>(efl.Libs.Evas, "evas_init");
|
||||
}
|
||||
|
||||
public static void evas_init()
|
||||
|
|
|
@ -7,7 +7,6 @@ examples = [
|
|||
'ecore_file_download_example',
|
||||
'ecore_idler_example',
|
||||
'ecore_job_example',
|
||||
'ecore_pipe_simple_example',
|
||||
'ecore_poller_example',
|
||||
'ecore_thread_example',
|
||||
'ecore_time_functions_example',
|
||||
|
@ -15,6 +14,10 @@ examples = [
|
|||
'ecore_getopt_example'
|
||||
]
|
||||
|
||||
if config_h.has('HAVE_FORK')
|
||||
examples += 'ecore_pipe_simple_example'
|
||||
endif
|
||||
|
||||
gnutls = dependency('gnutls', required : false)
|
||||
if gnutls.found()
|
||||
examples += ['ecore_fd_handler_gnutls_example']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define EFL_CXXPERIMENTAL // for background part
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` box_cxx_example_02.cc -o box_cxx_example_02
|
||||
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
#include <iostream>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define EFL_CXXPERIMENTAL
|
||||
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using namespace std::placeholders;
|
||||
using efl::eo::add;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
#warning This example can not be implemented with EO APIs... FIXME
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
#warning This example can not be implemented with EO APIs... FIXME
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
* gcc -g filter_example.c -o filter_example `pkg-config --cflags --libs elementary`
|
||||
*/
|
||||
#define EFL_BETA_API_SUPPORT 1
|
||||
#include <Elementary.h>
|
||||
|
||||
typedef struct _Filter
|
||||
{
|
||||
const char *name;
|
||||
const char *code;
|
||||
} Filter;
|
||||
|
||||
static Filter filters[] = {
|
||||
{ "no", NULL },
|
||||
{ "blend",
|
||||
"blend { color = '#fff8' }" },
|
||||
{ "blur",
|
||||
"blur { 15 }" },
|
||||
{ "grow",
|
||||
"a = buffer { 'rgba' }\n"
|
||||
"blend { dst = a }\n"
|
||||
"grow { 6, src = a }" },
|
||||
{ "curve",
|
||||
"a = buffer ('alpha')\n"
|
||||
"blur ({ 4, dst = a })\n"
|
||||
"p = {}\n"
|
||||
"p[0] = 0\n"
|
||||
"p[20] = 0\n"
|
||||
"p[60] = 255\n"
|
||||
"p[160] = 255\n"
|
||||
"p[200] = 0\n"
|
||||
"p[255] = 0\n"
|
||||
"curve ({ points = p, src = a, dst = a })\n"
|
||||
"blend ({ src = a, color = 'white' })\n" },
|
||||
{ "fill",
|
||||
"fill { color = 'darkblue' }" },
|
||||
{ "mask",
|
||||
"a = buffer ('alpha')\n"
|
||||
"blur ({ 6, dst = a })\n"
|
||||
"p = {}\n"
|
||||
"p[0] = 255\n"
|
||||
"p[128] = 255\n"
|
||||
"p[255] = 0\n"
|
||||
"curve ({ points = p, src = a, dst = a })\n"
|
||||
"blend ({ color = 'black' })\n"
|
||||
"mask ({ mask = a, color = 'cyan' })" },
|
||||
{ "bump",
|
||||
"a = buffer { 'alpha' }\n"
|
||||
"grow { 5, dst = a }\n"
|
||||
"blur { 6, src = a , dst = a }\n"
|
||||
"bump { map = a, color = '#f60', specular = 1, compensate = true }" },
|
||||
{ "trans",
|
||||
"t = buffer ('alpha')\n"
|
||||
"transform ({ oy = 20, dst = t })\n"
|
||||
"blend ({ src = t, color = '#fff8' })\n"
|
||||
"blend ({ color = 'white' })" },
|
||||
};
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
||||
{
|
||||
Filter *f;
|
||||
unsigned int i;
|
||||
char buf[PATH_MAX];
|
||||
Eo *win, *scroller, *hbox, *box, *text, *img;
|
||||
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||
elm_app_info_set(elm_main, "elementary", "images");
|
||||
|
||||
win = elm_win_util_standard_add("Gfx Filter Test", "Gfx Filter Test");
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
|
||||
scroller = elm_scroller_add(win);
|
||||
evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, scroller);
|
||||
evas_object_show(scroller);
|
||||
|
||||
hbox = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbox, EINA_TRUE);
|
||||
evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_object_content_set(scroller, hbox);
|
||||
evas_object_show(hbox);
|
||||
|
||||
box = elm_box_add(win);
|
||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_box_pack_end(hbox, box);
|
||||
evas_object_show(box);
|
||||
|
||||
for (i = 0; i < EINA_C_ARRAY_LENGTH(filters); i++)
|
||||
{
|
||||
f = &filters[i];
|
||||
text = evas_object_text_add(evas_object_evas_get(win));
|
||||
evas_object_size_hint_align_set(text, 0, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_min_set(text, 100, 100);
|
||||
evas_object_text_font_set(text, "Sans:style=Bold", 50);
|
||||
evas_object_text_text_set(text, f->name);
|
||||
elm_box_pack_end(box, text);
|
||||
evas_object_show(text);
|
||||
|
||||
efl_gfx_filter_program_set(text, f->code, f->name);
|
||||
}
|
||||
|
||||
box = elm_box_add(win);
|
||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_box_pack_end(hbox, box);
|
||||
evas_object_show(box);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
|
||||
for (i = 0; i < EINA_C_ARRAY_LENGTH(filters); i++)
|
||||
{
|
||||
f = &filters[i];
|
||||
img = evas_object_image_filled_add(evas_object_evas_get(win));
|
||||
evas_object_size_hint_align_set(img, 0, EVAS_HINT_FILL);
|
||||
evas_object_image_file_set(img, buf, 0);
|
||||
evas_object_size_hint_min_set(img, 100, 100);
|
||||
elm_box_pack_end(box, img);
|
||||
evas_object_show(img);
|
||||
|
||||
efl_gfx_filter_program_set(img, f->code, f->name);
|
||||
}
|
||||
|
||||
evas_object_resize(win, 400, 400);
|
||||
evas_object_show(win);
|
||||
|
||||
elm_run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
#warning This example can not be implemented with EO APIs... FIXME
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ examples = [
|
|||
'fileselector_example',
|
||||
'fileviewlist',
|
||||
'filemvc',
|
||||
'filter_example',
|
||||
'flip_example_01',
|
||||
'flipselector_example',
|
||||
'frame_example_01',
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
#define EFL_CXXPERIMENTAL
|
||||
|
||||
#include <Evas.hh>
|
||||
#include <Efl_Ui.h>
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
#include <iostream>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
#include <iostream>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using namespace std::placeholders;
|
||||
using efl::eo::instantiate;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define ELM_WIDGET_PROTECTED
|
||||
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
#include <iostream>
|
||||
|
||||
#warning FIXME: This example requires proper EO API usage (not legacy spinner)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` table_cxx_example_01.cc -o table_cxx_example_01
|
||||
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` table_cxx_example_01.cc -o table_cxx_example_01
|
||||
|
||||
#include <Evas.hh>
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#warning This example requires yet unfinished EO APIs
|
||||
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
EAPI int
|
||||
elm_main(int argc, char* argv[])
|
||||
|
|
|
@ -112,7 +112,7 @@ ecore_cocoa_clipboard_get(int *size,
|
|||
NSString *str = [items objectAtIndex: 0];
|
||||
data = (void *)[str UTF8String];
|
||||
len = [str lengthOfBytesUsingEncoding: NSUTF8StringEncoding];
|
||||
data = strndup((const char *)data, len);
|
||||
data = eina_strndup((const char *)data, len);
|
||||
|
||||
if (EINA_UNLIKELY(!data))
|
||||
{
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "ecore_drm2_private.h"
|
||||
|
||||
#define FLIP_TIMEOUT 0.05
|
||||
|
||||
static Eina_Bool
|
||||
_fb2_create(Ecore_Drm2_Fb *fb)
|
||||
{
|
||||
|
@ -255,6 +257,15 @@ _ecore_drm2_fb_buffer_release(Ecore_Drm2_Output *output EINA_UNUSED, Ecore_Drm2_
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_mainloop_async_timer_del(void *data)
|
||||
{
|
||||
Ecore_Drm2_Output *output = data;
|
||||
|
||||
ecore_timer_del(output->flip_timeout);
|
||||
output->flip_timeout = NULL;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
|
||||
{
|
||||
|
@ -265,9 +276,11 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
|
|||
|
||||
if (output->flip_timeout)
|
||||
{
|
||||
ecore_timer_del(output->flip_timeout);
|
||||
output->flip_timeout = NULL;
|
||||
// XXX: output ref++
|
||||
ecore_main_loop_thread_safe_call_async
|
||||
(_cb_mainloop_async_timer_del, output);
|
||||
}
|
||||
if (!output->pending.fb) fprintf(stderr, "XXX--XXX eeeeek pending fb is NULL so current would become null ----------------------------------\n");
|
||||
if (output->current.fb && (output->current.fb != output->pending.fb))
|
||||
_ecore_drm2_fb_buffer_release(output, &output->current);
|
||||
|
||||
|
@ -470,12 +483,20 @@ _cb_flip_timeout(void *data)
|
|||
Ecore_Drm2_Output *output = data;
|
||||
|
||||
output->flip_timeout = NULL;
|
||||
ERR("flip event callback timout 0.05sec - try again");
|
||||
ERR("flip event callback timout %0.2fsec - try again", FLIP_TIMEOUT);
|
||||
if (_ecore_drm2_use_atomic) _fb_atomic_flip(output);
|
||||
else _fb_flip(output);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_mainloop_async_timer_reset(void *data)
|
||||
{
|
||||
Ecore_Drm2_Output *output = data;
|
||||
if (output->flip_timeout) ecore_timer_del(output->flip_timeout);
|
||||
output->flip_timeout = ecore_timer_add(FLIP_TIMEOUT, _cb_flip_timeout, output);
|
||||
}
|
||||
|
||||
static int
|
||||
_fb_atomic_flip(Ecore_Drm2_Output *output)
|
||||
{
|
||||
|
@ -493,9 +514,18 @@ _fb_atomic_flip(Ecore_Drm2_Output *output)
|
|||
/* Still no req is a bad situation */
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(output->prep.atomic_req, -1);
|
||||
|
||||
res =
|
||||
sym_drmModeAtomicCommit(output->fd, output->prep.atomic_req, flags,
|
||||
output);
|
||||
// sometimes we get a EBUSY ... so try again a few times.
|
||||
int i;
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
res =
|
||||
sym_drmModeAtomicCommit(output->fd, output->prep.atomic_req, flags,
|
||||
output);
|
||||
if (res == 0) break;
|
||||
else ERR("DRM atomic commit failed - retry #%i", i + 1);
|
||||
usleep(100);
|
||||
}
|
||||
|
||||
if (res < 0)
|
||||
{
|
||||
ERR("Failed Atomic Commit: %m");
|
||||
|
@ -503,8 +533,9 @@ _fb_atomic_flip(Ecore_Drm2_Output *output)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (output->flip_timeout) ecore_timer_del(output->flip_timeout);
|
||||
output->flip_timeout = ecore_timer_add(0.05, _cb_flip_timeout, output);
|
||||
// XXX: output ref++
|
||||
ecore_main_loop_thread_safe_call_async
|
||||
(_cb_mainloop_async_timer_reset, output);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -591,8 +622,9 @@ _fb_flip(Ecore_Drm2_Output *output)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (output->flip_timeout) ecore_timer_del(output->flip_timeout);
|
||||
output->flip_timeout = ecore_timer_add(0.05, _cb_flip_timeout, output);
|
||||
// XXX: output ref++
|
||||
ecore_main_loop_thread_safe_call_async
|
||||
(_cb_mainloop_async_timer_reset, output);
|
||||
}
|
||||
}
|
||||
while (repeat);
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
if sys_windows == true
|
||||
ecore_win32_deps = [evil, eina, ecore, ecore_input]
|
||||
ecore_win32_pub_deps = []
|
||||
|
||||
ecore_win32_src = [
|
||||
'ecore_win32.c',
|
||||
'ecore_win32_clipboard.c',
|
||||
'ecore_win32_cursor.c',
|
||||
'ecore_win32_dnd.c',
|
||||
'ecore_win32_dnd_data_object.cpp',
|
||||
'ecore_win32_dnd_drop_source.cpp',
|
||||
'ecore_win32_dnd_drop_target.cpp',
|
||||
'ecore_win32_dnd_enumformatetc.cpp',
|
||||
'ecore_win32_event.c',
|
||||
'ecore_win32_monitor.c',
|
||||
'ecore_win32_window.c',
|
||||
]
|
||||
|
||||
ecore_win32_header_src = [
|
||||
'Ecore_Win32.h'
|
||||
]
|
||||
|
||||
ecore_win32_lib = library('ecore_win32',
|
||||
ecore_win32_src,
|
||||
dependencies: ecore_win32_deps + ecore_win32_pub_deps,
|
||||
include_directories : config_dir,
|
||||
install: true,
|
||||
c_args : package_c_args,
|
||||
)
|
||||
|
||||
ecore_win32 = declare_dependency(
|
||||
include_directories: [include_directories('.')],
|
||||
link_with: ecore_win32_lib,
|
||||
dependencies: ecore_win32_pub_deps,
|
||||
)
|
||||
|
||||
install_headers(ecore_win32_header_src,
|
||||
install_dir : dir_package_include,
|
||||
)
|
||||
else
|
||||
automatic_pkgfile = false
|
||||
endif
|
|
@ -96,16 +96,16 @@ _ecore_wl2_surface_modules_init(void)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
supplied_modules = eina_module_arch_list_get(NULL,
|
||||
PACKAGE_LIB_DIR"/ecore_wl2/engines",
|
||||
MODULE_ARCH);
|
||||
supplied_modules =
|
||||
eina_module_arch_list_get(NULL, PACKAGE_LIB_DIR"/ecore_wl2/engines",
|
||||
MODULE_ARCH);
|
||||
eina_module_list_load(supplied_modules);
|
||||
|
||||
mod_dir = getenv("ECORE_WL2_SURFACE_MODULE_DIR");
|
||||
if (mod_dir)
|
||||
{
|
||||
local_modules = eina_module_list_get(NULL, mod_dir,
|
||||
EINA_TRUE, NULL, NULL);
|
||||
local_modules =
|
||||
eina_module_list_get(NULL, mod_dir, EINA_TRUE, NULL, NULL);
|
||||
eina_module_list_load(local_modules);
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,8 @@ _aux_hints_supported_aux_hints(void *data, struct efl_aux_hints *aux_hints EINA_
|
|||
ev->win = win;
|
||||
ev->display = ewd;
|
||||
ewd->refs++;
|
||||
ecore_event_add(ECORE_WL2_EVENT_AUX_HINT_SUPPORTED, ev, _display_event_free, ewd);
|
||||
ecore_event_add(ECORE_WL2_EVENT_AUX_HINT_SUPPORTED, ev,
|
||||
_display_event_free, ewd);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -168,7 +169,8 @@ _aux_hints_allowed_aux_hint(void *data, struct efl_aux_hints *aux_hints EINA_UN
|
|||
ev->id = id;
|
||||
ev->display = ewd;
|
||||
ewd->refs++;
|
||||
ecore_event_add(ECORE_WL2_EVENT_AUX_HINT_ALLOWED, ev, _display_event_free, ewd);
|
||||
ecore_event_add(ECORE_WL2_EVENT_AUX_HINT_ALLOWED, ev,
|
||||
_display_event_free, ewd);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -182,7 +184,7 @@ _cb_aux_message_free(void *data EINA_UNUSED, void *event)
|
|||
eina_stringshare_del(ev->key);
|
||||
eina_stringshare_del(ev->val);
|
||||
EINA_LIST_FREE(ev->options, str)
|
||||
eina_stringshare_del(str);
|
||||
eina_stringshare_del(str);
|
||||
free(ev);
|
||||
}
|
||||
|
||||
|
|
|
@ -671,6 +671,7 @@ _ecore_wl2_input_ungrab(Ecore_Wl2_Input *input)
|
|||
input->grab.window = NULL;
|
||||
input->grab.button = 0;
|
||||
input->grab.count = 0;
|
||||
input->grab.touch_count = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1210,6 +1211,7 @@ _touch_cb_down(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int seri
|
|||
|
||||
input->focus.touch = window;
|
||||
input->timestamp = timestamp;
|
||||
input->grab.touch_count++;
|
||||
|
||||
_pointer_cb_enter(data, NULL, serial, surface, x, y);
|
||||
|
||||
|
@ -1239,11 +1241,13 @@ _touch_cb_up(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int serial
|
|||
BTN_LEFT, timestamp);
|
||||
|
||||
if (input->grab.count) input->grab.count--;
|
||||
if (input->grab.touch_count) input->grab.touch_count--;
|
||||
if ((input->grab.window) && (input->grab.button == BTN_LEFT) &&
|
||||
(!input->grab.count))
|
||||
_ecore_wl2_input_ungrab(input);
|
||||
|
||||
input->focus.touch = NULL;
|
||||
if (input->grab.touch_count == 0) input->focus.touch = NULL;
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -473,6 +473,7 @@ struct _Ecore_Wl2_Input
|
|||
{
|
||||
unsigned int button, count, timestamp;
|
||||
Ecore_Wl2_Window *window;
|
||||
unsigned int touch_count;
|
||||
} grab;
|
||||
|
||||
struct
|
||||
|
|
|
@ -80,6 +80,39 @@ struct _Edje_Size_Class
|
|||
Evas_Coord maxh;
|
||||
};
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Object_Communication_Interface_Message Edje Communication Interface: Message
|
||||
* @ingroup Edje_Object_Group
|
||||
*
|
||||
* @brief Functions that deal with messages.
|
||||
*
|
||||
* Edje has two communication interfaces between @b code and @b theme.
|
||||
* Signals and messages.
|
||||
*
|
||||
* Edje messages are one of the communication interfaces between
|
||||
* @b code and a given Edje object's @b theme. With messages, one can
|
||||
* communicate values like strings, float numbers and integer
|
||||
* numbers. Moreover, messages can be identified by integer
|
||||
* numbers. See #Edje_Message_Type for the full list of message types.
|
||||
*
|
||||
* @note Messages must be handled by scripts.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Processes all queued up edje messages.
|
||||
*
|
||||
* This function triggers the processing of messages addressed to any
|
||||
* (alive) edje objects.
|
||||
*
|
||||
*/
|
||||
EAPI void edje_message_signal_process (void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Object_Communication_Interface_Signal Edje Communication Interface: Signal
|
||||
* @ingroup Edje_Object_Group
|
||||
|
@ -112,6 +145,98 @@ typedef Efl_Signal_Cb Edje_Signal_Cb;
|
|||
*/
|
||||
EAPI void * edje_object_signal_callback_extra_data_get(void);
|
||||
|
||||
|
||||
#ifdef EFL_BETA_API_SUPPORT
|
||||
/**
|
||||
* @brief Gets seat data passed to callbacks.
|
||||
*
|
||||
* @return The seat data for that callback.
|
||||
*
|
||||
* When a callback is initiated by an input event from a seat, we try to
|
||||
* provide seat information with it.
|
||||
*
|
||||
* Signals fired as programmed responses to these signals will also try
|
||||
* to carry the seat data along.
|
||||
*
|
||||
* This returns an opaque pointer to the seat data.
|
||||
*
|
||||
* @see edje_object_signal_callback_add() for more on Edje signals.
|
||||
* @since 1.21
|
||||
*/
|
||||
EAPI void *edje_object_signal_callback_seat_data_get(void);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Audio Edje Audio
|
||||
* @ingroup Edje
|
||||
*
|
||||
* @brief Functions to manipulate audio abilities in edje.
|
||||
*
|
||||
* Perspective is a graphical tool that makes objects represented in 2D
|
||||
* look like they have a 3D appearance.
|
||||
*
|
||||
* Edje allows us to use perspective on any edje object. This group of
|
||||
* functions deal with the use of perspective, by creating and configuring
|
||||
* a perspective object that must set to a edje object or a canvas,
|
||||
* affecting all the objects inside that have no particular perspective
|
||||
* set already.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Identifiers of Edje message types, which can be sent back and forth
|
||||
* code and a given Edje object's theme file/group.
|
||||
*
|
||||
* @see edje_audio_channel_mute_set()
|
||||
* @see edje_audio_channel_mute_get()
|
||||
*
|
||||
* @since 1.9
|
||||
*/
|
||||
typedef enum _Edje_Channel
|
||||
{
|
||||
EDJE_CHANNEL_EFFECT = 0, /**< Standard audio effects */
|
||||
EDJE_CHANNEL_BACKGROUND = 1, /**< Background audio sounds */
|
||||
EDJE_CHANNEL_MUSIC = 2, /**< Music audio */
|
||||
EDJE_CHANNEL_FOREGROUND = 3, /**< Foreground audio sounds */
|
||||
EDJE_CHANNEL_INTERFACE = 4, /**< Sounds related to the interface */
|
||||
EDJE_CHANNEL_INPUT = 5, /**< Sounds related to regular input */
|
||||
EDJE_CHANNEL_ALERT = 6, /**< Sounds for major alerts */
|
||||
EDJE_CHANNEL_ALL = 7 /**< All audio channels (convenience) */
|
||||
} Edje_Channel;
|
||||
|
||||
/**
|
||||
* @brief Sets the mute state of audio for the process as a whole.
|
||||
*
|
||||
* @param channel The channel to set the mute state of
|
||||
* @param mute The mute state
|
||||
*
|
||||
* This sets the mute (no output) state of audio for the given channel.
|
||||
*
|
||||
* @see edje_audio_channel_mute_get()
|
||||
*
|
||||
* @since 1.9
|
||||
*/
|
||||
EAPI void edje_audio_channel_mute_set(Edje_Channel channel, Eina_Bool mute);
|
||||
|
||||
/**
|
||||
* @brief Gets the mute state of the given channel.
|
||||
*
|
||||
* @param channel The channel to get the mute state of
|
||||
* @return The mute state of the channel
|
||||
*
|
||||
* @see edje_audio_channel_mute_set()
|
||||
*
|
||||
* @since 1.9
|
||||
*/
|
||||
EAPI Eina_Bool edje_audio_channel_mute_get(Edje_Channel channel);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -917,6 +1042,48 @@ EAPI const Edje_External_Type *edje_external_type_get (const char
|
|||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Edje_Aspect_Control
|
||||
*
|
||||
* All Edje aspect control values.
|
||||
*
|
||||
*/
|
||||
typedef enum _Edje_Aspect_Control
|
||||
{
|
||||
EDJE_ASPECT_CONTROL_NONE = 0, /*< None aspect control value */
|
||||
EDJE_ASPECT_CONTROL_NEITHER = 1, /*< Neither aspect control value */
|
||||
EDJE_ASPECT_CONTROL_HORIZONTAL = 2, /*< Horizontal aspect control value */
|
||||
EDJE_ASPECT_CONTROL_VERTICAL = 3, /*< Vertical aspect control value */
|
||||
EDJE_ASPECT_CONTROL_BOTH = 4 /*< Both aspect control value */
|
||||
} Edje_Aspect_Control;
|
||||
|
||||
/**
|
||||
* @brief Gets the part name of an edje part object.
|
||||
* @param obj An edje part object
|
||||
* @return The name of the part, if the object is an edje part, or @c NULL
|
||||
* @note If this function returns @c NULL, @p obj was not an Edje part object
|
||||
* @see edje_object_part_object_get()
|
||||
* @since 1.10
|
||||
*/
|
||||
EAPI const char *edje_object_part_object_name_get(const Evas_Object *obj);
|
||||
|
||||
#ifdef EFL_BETA_API_SUPPORT
|
||||
|
||||
/**
|
||||
* @brief Creates scene and root node which contains all 3D parts of edje object.
|
||||
* @param obj An edje part object
|
||||
* @param root node to collect all 3D parts
|
||||
* @param scene
|
||||
* @return scene and root node which contains all 3D parts of edje object
|
||||
* @note If this function returns @c EINA_FALSE, @p the scene or the root
|
||||
* node wasn't made
|
||||
* @since 1.18
|
||||
*/
|
||||
EAPI Eina_Bool edje_3d_object_add(Evas_Object *obj, Eo **root_node, Eo *scene);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -1254,245 +1421,113 @@ EAPI Eina_Iterator *edje_color_class_active_iterator_new(void);
|
|||
*/
|
||||
EAPI Eina_Iterator *edje_mmap_color_class_iterator_new(Eina_File *f);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Object_Part Edje Part
|
||||
* @defgroup Edje_Object_Size_Class Edje Class: Size
|
||||
* @ingroup Edje_Object_Group
|
||||
*
|
||||
* @brief Functions that deal with layout components
|
||||
* @brief Functions that deal with Size Classes
|
||||
*
|
||||
* Parts are layout components, but as a layout, they are objects too.
|
||||
* Sometimes we want to change the size of two or more parts equally and
|
||||
* that's when we use size classes.
|
||||
*
|
||||
* There are several types of parts, these types can be divided into two
|
||||
* main categories, the first being containers. Containers are parts
|
||||
* that are in effect a group of elements. The second group is that of
|
||||
* the elements, these part types may not contain others.
|
||||
*
|
||||
* This section has some functions specific for some types and others that
|
||||
* could be applied to any type.
|
||||
* If one or more parts are assigned with a size class, when we set attributes
|
||||
* (minw etc.) to this class will update all these parts with the new attributes.
|
||||
* Setting values to a size class at a process level will affect
|
||||
* all parts with that size class, while at object level will affect only
|
||||
* the parts inside an specified object.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Part_Text Edje Text Part
|
||||
* @ingroup Edje_Object_Part
|
||||
* @brief Sets the Edje size class.
|
||||
*
|
||||
* @brief Functions that deal with parts of type text
|
||||
* @param size_class The size class name
|
||||
* @param minw The min width
|
||||
* @param minh The min height
|
||||
* @param maxw The max width
|
||||
* @param maxh The max height
|
||||
*
|
||||
* Text is an element type for parts. It's basic functionality is to
|
||||
* display a string on the layout, but a lot more things can be done
|
||||
* with texts, like string selection, setting the cursor and include
|
||||
* a input panel, where one can set a virtual keyboard to handle
|
||||
* keyboard entry easily.
|
||||
* @return @c EINA_TRUE on success, or @c EINA_FALSE on error
|
||||
*
|
||||
* @{
|
||||
* This function updates all Edje members at the process level which
|
||||
* belong to this size class with the new min and max attributes.
|
||||
*
|
||||
* @see edje_size_class_get().
|
||||
*
|
||||
* @since 1.17
|
||||
*/
|
||||
|
||||
#define EDJE_TEXT_EFFECT_MASK_BASIC 0xf
|
||||
#define EDJE_TEXT_EFFECT_BASIC_SET(x, s) \
|
||||
do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_BASIC) | (s); } while (0)
|
||||
|
||||
#define EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION (0x7 << 4)
|
||||
#define EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(x, s) \
|
||||
do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) | (s); } while (0)
|
||||
EAPI Eina_Bool edje_size_class_set (const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh);
|
||||
|
||||
/**
|
||||
* @typedef Edje_Text_Effect
|
||||
* @brief Gets the Edje size class.
|
||||
*
|
||||
* All possible text effects in Edje.
|
||||
* @param size_class The size class name
|
||||
* @param minw The min width
|
||||
* @param minh The min height
|
||||
* @param maxw The max width
|
||||
* @param maxh The max height
|
||||
*
|
||||
* @return @c EINA_TRUE on success, or @c EINA_FALSE on error
|
||||
*
|
||||
* This function gets the min and max size from the specified Edje
|
||||
* size class.
|
||||
*
|
||||
* @since 1.17
|
||||
*/
|
||||
typedef enum _Edje_Text_Effect
|
||||
{
|
||||
EDJE_TEXT_EFFECT_NONE = 0, /**< None text effect value */
|
||||
EDJE_TEXT_EFFECT_PLAIN = 1, /**< Plain text effect value */
|
||||
EDJE_TEXT_EFFECT_OUTLINE = 2, /**< Outline text effect value */
|
||||
EDJE_TEXT_EFFECT_SOFT_OUTLINE = 3, /**< Soft outline text effect value */
|
||||
EDJE_TEXT_EFFECT_SHADOW = 4, /**< Shadown text effect value */
|
||||
EDJE_TEXT_EFFECT_SOFT_SHADOW = 5, /**< Soft shadow text effect value */
|
||||
EDJE_TEXT_EFFECT_OUTLINE_SHADOW = 6, /**< Outline shadow text effect value */
|
||||
EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW = 7, /**< Outline soft shadow text effect value */
|
||||
EDJE_TEXT_EFFECT_FAR_SHADOW = 8, /**< Far shadow text effect value */
|
||||
EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW = 9, /**< Far soft shadow text effect value */
|
||||
EDJE_TEXT_EFFECT_GLOW = 10, /**< Glow text effect value */
|
||||
|
||||
EDJE_TEXT_EFFECT_LAST = 11, /**< Last text effect value */
|
||||
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4), /**< Bottom right shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM = (0x1 << 4), /**< Bottom shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4), /**< Bottom left shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT = (0x3 << 4), /**< Left shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4), /**< Top left shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP = (0x5 << 4), /**< Top shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4), /**< Top right shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT = (0x7 << 4) /**< right shadow direction value */
|
||||
} Edje_Text_Effect;
|
||||
|
||||
EAPI Eina_Bool edje_size_class_get (const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh);
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Text_Selection Edje Text Selection
|
||||
* @ingroup Edje_Part_Text
|
||||
* @brief Deletes the size class.
|
||||
*
|
||||
* @brief Functions that deal with selection in text parts.
|
||||
* @param size_class The size class name
|
||||
*
|
||||
* Selection is a known functionality for texts in the whole computational
|
||||
* world. It is a block of text marked for further manipulation.
|
||||
* This function deletes any values at the process level for the
|
||||
* specified size class.
|
||||
*
|
||||
* Edje is responsible for handling this functionality through the
|
||||
* following functions.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @}
|
||||
* @since 1.17
|
||||
*/
|
||||
EAPI void edje_size_class_del (const char *size_class);
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Text_Cursor Edje Text Cursor
|
||||
* @ingroup Edje_Part_Text
|
||||
* @brief Lists size classes.
|
||||
*
|
||||
* @brief Functions that deal with cursor in text parts.
|
||||
* @return A list of size class names (strings). These strings are
|
||||
* stringshares and the list must be eina_stringshare_del()'ed by the caller.
|
||||
*
|
||||
* Cursor is a known functionality for texts in the whole computational
|
||||
* world. It marks a position in the text from where one may want
|
||||
* to make a insertion, deletion or selection.
|
||||
* This function lists all size classes known about by the current
|
||||
* process.
|
||||
*
|
||||
* Edje is responsible for handling this functionality through the
|
||||
* following functions.
|
||||
*
|
||||
* @{
|
||||
* @since 1.17
|
||||
*/
|
||||
EAPI Eina_List *edje_size_class_list (void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @brief Iterates over all active classes of an application.
|
||||
*
|
||||
* @return An iterator of Edje_Size_Class of the currently active size class
|
||||
*
|
||||
* This function only iterates over the Edje_Size_Class in use by
|
||||
* an application.
|
||||
*
|
||||
* @since 1.17
|
||||
*/
|
||||
EAPI Eina_Iterator *edje_size_class_active_iterator_new(void);
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Part_Swallow Edje Swallow Part
|
||||
* @ingroup Edje_Object_Part
|
||||
* @brief Iterates over all size classes provided by an Edje file.
|
||||
*
|
||||
* @brief Functions that deal with parts of type swallow and swallowed objects.
|
||||
* @param f The mapped edje file.
|
||||
*
|
||||
* A important feature of Edje is to be able to create Evas_Objects
|
||||
* in code and place them in a layout. And that is what swallowing
|
||||
* is all about.
|
||||
* @return an iterator of Edje_Size_Class provided by the Edje file.
|
||||
*
|
||||
* Swallow parts are place holders defined in the EDC file for
|
||||
* objects that one may want to include in the layout later, or for
|
||||
* objects that are not native of Edje. In this last case, Edje will
|
||||
* only treat the Evas_Object properties of the swallowed objects.
|
||||
*
|
||||
*
|
||||
* @{
|
||||
* @since 1.17
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Edje_Aspect_Control
|
||||
*
|
||||
* All Edje aspect control values.
|
||||
*
|
||||
*/
|
||||
typedef enum _Edje_Aspect_Control
|
||||
{
|
||||
EDJE_ASPECT_CONTROL_NONE = 0, /*< None aspect control value */
|
||||
EDJE_ASPECT_CONTROL_NEITHER = 1, /*< Neither aspect control value */
|
||||
EDJE_ASPECT_CONTROL_HORIZONTAL = 2, /*< Horizontal aspect control value */
|
||||
EDJE_ASPECT_CONTROL_VERTICAL = 3, /*< Vertical aspect control value */
|
||||
EDJE_ASPECT_CONTROL_BOTH = 4 /*< Both aspect control value */
|
||||
} Edje_Aspect_Control;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Object_Geometry_Group Edje Object Geometry
|
||||
* @ingroup Edje_Object_Group
|
||||
*
|
||||
* @brief Functions that deal with object's geometry.
|
||||
*
|
||||
* By geometry we mean size and position. So in this groups there are
|
||||
* functions to manipulate object's geometry or retrieve information
|
||||
* about it.
|
||||
*
|
||||
* Keep in mind that by changing an object's geometry, it may affect
|
||||
* the appearance in the screen of the parts inside. Most times
|
||||
* that is what you want.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Part_Box Edje Box Part
|
||||
* @ingroup Edje_Object_Part
|
||||
*
|
||||
* @brief Functions that deal with parts of type box.
|
||||
*
|
||||
* Box is a container type for parts, that means it can contain
|
||||
* other parts.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Registers a custom layout to be used in edje boxes.
|
||||
*
|
||||
* @param name The name of the layout
|
||||
* @param func The function defining the layout
|
||||
* @param layout_data_get This function gets the custom data pointer
|
||||
* for func
|
||||
* @param layout_data_free Passed to func to free its private data
|
||||
* when needed
|
||||
* @param free_data Frees data
|
||||
* @param data Private pointer passed to layout_data_get
|
||||
*
|
||||
* This function registers custom layouts that can be referred from
|
||||
* themes by the registered name. The Evas_Object_Box_Layout
|
||||
* functions receive two pointers for internal use, one being private
|
||||
* data, and the other the function to free that data when it's not
|
||||
* longer needed. From Edje, this private data will be retrieved by
|
||||
* calling layout_data_get, and layout_data_free will be the free
|
||||
* function passed to func. layout_data_get will be called with data
|
||||
* as its parameter, and this one will be freed by free_data whenever
|
||||
* the layout is unregistered from Edje.
|
||||
*/
|
||||
EAPI void edje_box_layout_register (const char *name, Evas_Object_Box_Layout func, void *(*layout_data_get)(void *), void (*layout_data_free)(void *), void (*free_data)(void *), void *data);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Part_Table Edje Table Part
|
||||
* @ingroup Edje_Object_Part
|
||||
*
|
||||
* @brief Functions that deal with parts of type table.
|
||||
*
|
||||
* Table is a container type for parts, that means it can contain
|
||||
* other parts.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Edje_Object_Table_Homogeneous_Mode
|
||||
*
|
||||
* Table homogeneous modes.
|
||||
*
|
||||
*/
|
||||
typedef enum _Edje_Object_Table_Homogeneous_Mode
|
||||
{
|
||||
EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, /*< None homogeneous mode */
|
||||
EDJE_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, /*< Table homogeneous mode */
|
||||
EDJE_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 /*< Item homogeneous mode */
|
||||
} Edje_Object_Table_Homogeneous_Mode;
|
||||
EAPI Eina_Iterator *edje_mmap_size_class_iterator_new(Eina_File *f);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@ -1603,114 +1638,6 @@ EAPI Eina_Iterator *edje_text_class_active_iterator_new(void);
|
|||
*/
|
||||
EAPI Eina_Iterator *edje_mmap_text_class_iterator_new(Eina_File *f);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Object_Size_Class Edje Class: Size
|
||||
* @ingroup Edje_Object_Group
|
||||
*
|
||||
* @brief Functions that deal with Size Classes
|
||||
*
|
||||
* Sometimes we want to change the size of two or more parts equally and
|
||||
* that's when we use size classes.
|
||||
*
|
||||
* If one or more parts are assigned with a size class, when we set attributes
|
||||
* (minw etc.) to this class will update all these parts with the new attributes.
|
||||
* Setting values to a size class at a process level will affect
|
||||
* all parts with that size class, while at object level will affect only
|
||||
* the parts inside an specified object.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Sets the Edje size class.
|
||||
*
|
||||
* @param size_class The size class name
|
||||
* @param minw The min width
|
||||
* @param minh The min height
|
||||
* @param maxw The max width
|
||||
* @param maxh The max height
|
||||
*
|
||||
* @return @c EINA_TRUE on success, or @c EINA_FALSE on error
|
||||
*
|
||||
* This function updates all Edje members at the process level which
|
||||
* belong to this size class with the new min and max attributes.
|
||||
*
|
||||
* @see edje_size_class_get().
|
||||
*
|
||||
* @since 1.17
|
||||
*/
|
||||
EAPI Eina_Bool edje_size_class_set (const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh);
|
||||
|
||||
/**
|
||||
* @brief Gets the Edje size class.
|
||||
*
|
||||
* @param size_class The size class name
|
||||
* @param minw The min width
|
||||
* @param minh The min height
|
||||
* @param maxw The max width
|
||||
* @param maxh The max height
|
||||
*
|
||||
* @return @c EINA_TRUE on success, or @c EINA_FALSE on error
|
||||
*
|
||||
* This function gets the min and max size from the specified Edje
|
||||
* size class.
|
||||
*
|
||||
* @since 1.17
|
||||
*/
|
||||
EAPI Eina_Bool edje_size_class_get (const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh);
|
||||
|
||||
/**
|
||||
* @brief Deletes the size class.
|
||||
*
|
||||
* @param size_class The size class name
|
||||
*
|
||||
* This function deletes any values at the process level for the
|
||||
* specified size class.
|
||||
*
|
||||
* @since 1.17
|
||||
*/
|
||||
EAPI void edje_size_class_del (const char *size_class);
|
||||
|
||||
/**
|
||||
* @brief Lists size classes.
|
||||
*
|
||||
* @return A list of size class names (strings). These strings are
|
||||
* stringshares and the list must be eina_stringshare_del()'ed by the caller.
|
||||
*
|
||||
* This function lists all size classes known about by the current
|
||||
* process.
|
||||
*
|
||||
* @since 1.17
|
||||
*/
|
||||
EAPI Eina_List *edje_size_class_list (void);
|
||||
|
||||
/**
|
||||
* @brief Iterates over all active classes of an application.
|
||||
*
|
||||
* @return An iterator of Edje_Size_Class of the currently active size class
|
||||
*
|
||||
* This function only iterates over the Edje_Size_Class in use by
|
||||
* an application.
|
||||
*
|
||||
* @since 1.17
|
||||
*/
|
||||
EAPI Eina_Iterator *edje_size_class_active_iterator_new(void);
|
||||
|
||||
/**
|
||||
* @brief Iterates over all size classes provided by an Edje file.
|
||||
*
|
||||
* @param f The mapped edje file.
|
||||
*
|
||||
* @return an iterator of Edje_Size_Class provided by the Edje file.
|
||||
*
|
||||
* @since 1.17
|
||||
*/
|
||||
EAPI Eina_Iterator *edje_mmap_size_class_iterator_new(Eina_File *f);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -2002,147 +1929,233 @@ EAPI double edje_transition_duration_factor_get (void);
|
|||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Object_Communication_Interface_Message Edje Communication Interface: Message
|
||||
* @defgroup Edje_Object_Geometry_Group Edje Object Geometry
|
||||
* @ingroup Edje_Object_Group
|
||||
*
|
||||
* @brief Functions that deal with messages.
|
||||
* @brief Functions that deal with object's geometry.
|
||||
*
|
||||
* Edje has two communication interfaces between @b code and @b theme.
|
||||
* Signals and messages.
|
||||
* By geometry we mean size and position. So in this groups there are
|
||||
* functions to manipulate object's geometry or retrieve information
|
||||
* about it.
|
||||
*
|
||||
* Edje messages are one of the communication interfaces between
|
||||
* @b code and a given Edje object's @b theme. With messages, one can
|
||||
* communicate values like strings, float numbers and integer
|
||||
* numbers. Moreover, messages can be identified by integer
|
||||
* numbers. See #Edje_Message_Type for the full list of message types.
|
||||
*
|
||||
* @note Messages must be handled by scripts.
|
||||
* Keep in mind that by changing an object's geometry, it may affect
|
||||
* the appearance in the screen of the parts inside. Most times
|
||||
* that is what you want.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Processes all queued up edje messages.
|
||||
*
|
||||
* This function triggers the processing of messages addressed to any
|
||||
* (alive) edje objects.
|
||||
*
|
||||
*/
|
||||
EAPI void edje_message_signal_process (void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Audio Edje Audio
|
||||
* @ingroup Edje
|
||||
* @defgroup Edje_Object_Part Edje Part
|
||||
* @ingroup Edje_Object_Group
|
||||
*
|
||||
* @brief Functions to manipulate audio abilities in edje.
|
||||
* @brief Functions that deal with layout components
|
||||
*
|
||||
* Perspective is a graphical tool that makes objects represented in 2D
|
||||
* look like they have a 3D appearance.
|
||||
* Parts are layout components, but as a layout, they are objects too.
|
||||
*
|
||||
* Edje allows us to use perspective on any edje object. This group of
|
||||
* functions deal with the use of perspective, by creating and configuring
|
||||
* a perspective object that must set to a edje object or a canvas,
|
||||
* affecting all the objects inside that have no particular perspective
|
||||
* set already.
|
||||
* There are several types of parts, these types can be divided into two
|
||||
* main categories, the first being containers. Containers are parts
|
||||
* that are in effect a group of elements. The second group is that of
|
||||
* the elements, these part types may not contain others.
|
||||
*
|
||||
* This section has some functions specific for some types and others that
|
||||
* could be applied to any type.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Identifiers of Edje message types, which can be sent back and forth
|
||||
* code and a given Edje object's theme file/group.
|
||||
* @defgroup Edje_Part_Text Edje Text Part
|
||||
* @ingroup Edje_Object_Part
|
||||
*
|
||||
* @see edje_audio_channel_mute_set()
|
||||
* @see edje_audio_channel_mute_get()
|
||||
* @brief Functions that deal with parts of type text
|
||||
*
|
||||
* @since 1.9
|
||||
* Text is an element type for parts. It's basic functionality is to
|
||||
* display a string on the layout, but a lot more things can be done
|
||||
* with texts, like string selection, setting the cursor and include
|
||||
* a input panel, where one can set a virtual keyboard to handle
|
||||
* keyboard entry easily.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
typedef enum _Edje_Channel
|
||||
|
||||
#define EDJE_TEXT_EFFECT_MASK_BASIC 0xf
|
||||
#define EDJE_TEXT_EFFECT_BASIC_SET(x, s) \
|
||||
do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_BASIC) | (s); } while (0)
|
||||
|
||||
#define EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION (0x7 << 4)
|
||||
#define EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(x, s) \
|
||||
do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) | (s); } while (0)
|
||||
|
||||
/**
|
||||
* @typedef Edje_Text_Effect
|
||||
*
|
||||
* All possible text effects in Edje.
|
||||
*/
|
||||
typedef enum _Edje_Text_Effect
|
||||
{
|
||||
EDJE_CHANNEL_EFFECT = 0, /**< Standard audio effects */
|
||||
EDJE_CHANNEL_BACKGROUND = 1, /**< Background audio sounds */
|
||||
EDJE_CHANNEL_MUSIC = 2, /**< Music audio */
|
||||
EDJE_CHANNEL_FOREGROUND = 3, /**< Foreground audio sounds */
|
||||
EDJE_CHANNEL_INTERFACE = 4, /**< Sounds related to the interface */
|
||||
EDJE_CHANNEL_INPUT = 5, /**< Sounds related to regular input */
|
||||
EDJE_CHANNEL_ALERT = 6, /**< Sounds for major alerts */
|
||||
EDJE_CHANNEL_ALL = 7 /**< All audio channels (convenience) */
|
||||
} Edje_Channel;
|
||||
EDJE_TEXT_EFFECT_NONE = 0, /**< None text effect value */
|
||||
EDJE_TEXT_EFFECT_PLAIN = 1, /**< Plain text effect value */
|
||||
EDJE_TEXT_EFFECT_OUTLINE = 2, /**< Outline text effect value */
|
||||
EDJE_TEXT_EFFECT_SOFT_OUTLINE = 3, /**< Soft outline text effect value */
|
||||
EDJE_TEXT_EFFECT_SHADOW = 4, /**< Shadown text effect value */
|
||||
EDJE_TEXT_EFFECT_SOFT_SHADOW = 5, /**< Soft shadow text effect value */
|
||||
EDJE_TEXT_EFFECT_OUTLINE_SHADOW = 6, /**< Outline shadow text effect value */
|
||||
EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW = 7, /**< Outline soft shadow text effect value */
|
||||
EDJE_TEXT_EFFECT_FAR_SHADOW = 8, /**< Far shadow text effect value */
|
||||
EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW = 9, /**< Far soft shadow text effect value */
|
||||
EDJE_TEXT_EFFECT_GLOW = 10, /**< Glow text effect value */
|
||||
|
||||
EDJE_TEXT_EFFECT_LAST = 11, /**< Last text effect value */
|
||||
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4), /**< Bottom right shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM = (0x1 << 4), /**< Bottom shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4), /**< Bottom left shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT = (0x3 << 4), /**< Left shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4), /**< Top left shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP = (0x5 << 4), /**< Top shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4), /**< Top right shadow direction value */
|
||||
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT = (0x7 << 4) /**< right shadow direction value */
|
||||
} Edje_Text_Effect;
|
||||
|
||||
/**
|
||||
* @brief Sets the mute state of audio for the process as a whole.
|
||||
* @defgroup Edje_Text_Selection Edje Text Selection
|
||||
* @ingroup Edje_Part_Text
|
||||
*
|
||||
* @param channel The channel to set the mute state of
|
||||
* @param mute The mute state
|
||||
* @brief Functions that deal with selection in text parts.
|
||||
*
|
||||
* This sets the mute (no output) state of audio for the given channel.
|
||||
* Selection is a known functionality for texts in the whole computational
|
||||
* world. It is a block of text marked for further manipulation.
|
||||
*
|
||||
* @see edje_audio_channel_mute_get()
|
||||
* Edje is responsible for handling this functionality through the
|
||||
* following functions.
|
||||
*
|
||||
* @since 1.9
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
EAPI void edje_audio_channel_mute_set(Edje_Channel channel, Eina_Bool mute);
|
||||
|
||||
/**
|
||||
* @brief Gets the mute state of the given channel.
|
||||
* @defgroup Edje_Text_Cursor Edje Text Cursor
|
||||
* @ingroup Edje_Part_Text
|
||||
*
|
||||
* @param channel The channel to get the mute state of
|
||||
* @return The mute state of the channel
|
||||
* @brief Functions that deal with cursor in text parts.
|
||||
*
|
||||
* @see edje_audio_channel_mute_set()
|
||||
* Cursor is a known functionality for texts in the whole computational
|
||||
* world. It marks a position in the text from where one may want
|
||||
* to make a insertion, deletion or selection.
|
||||
*
|
||||
* @since 1.9
|
||||
* Edje is responsible for handling this functionality through the
|
||||
* following functions.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
EAPI Eina_Bool edje_audio_channel_mute_get(Edje_Channel channel);
|
||||
|
||||
/**
|
||||
* @brief Gets the part name of an edje part object.
|
||||
* @param obj An edje part object
|
||||
* @return The name of the part, if the object is an edje part, or @c NULL
|
||||
* @note If this function returns @c NULL, @p obj was not an Edje part object
|
||||
* @see edje_object_part_object_get()
|
||||
* @since 1.10
|
||||
*/
|
||||
EAPI const char *edje_object_part_object_name_get(const Evas_Object *obj);
|
||||
|
||||
#ifdef EFL_BETA_API_SUPPORT
|
||||
|
||||
/**
|
||||
* @brief Creates scene and root node which contains all 3D parts of edje object.
|
||||
* @param obj An edje part object
|
||||
* @param root node to collect all 3D parts
|
||||
* @param scene
|
||||
* @return scene and root node which contains all 3D parts of edje object
|
||||
* @note If this function returns @c EINA_FALSE, @p the scene or the root
|
||||
* node wasn't made
|
||||
* @since 1.18
|
||||
*/
|
||||
EAPI Eina_Bool edje_3d_object_add(Evas_Object *obj, Eo **root_node, Eo *scene);
|
||||
|
||||
/**
|
||||
* @brief Gets seat data passed to callbacks.
|
||||
*
|
||||
* @return The seat data for that callback.
|
||||
*
|
||||
* When a callback is initiated by an input event from a seat, we try to
|
||||
* provide seat information with it.
|
||||
*
|
||||
* Signals fired as programmed responses to these signals will also try
|
||||
* to carry the seat data along.
|
||||
*
|
||||
* This returns an opaque pointer to the seat data.
|
||||
*
|
||||
* @see edje_object_signal_callback_add() for more on Edje signals.
|
||||
* @since 1.21
|
||||
*/
|
||||
EAPI void *edje_object_signal_callback_seat_data_get(void);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Part_Swallow Edje Swallow Part
|
||||
* @ingroup Edje_Object_Part
|
||||
*
|
||||
* @brief Functions that deal with parts of type swallow and swallowed objects.
|
||||
*
|
||||
* A important feature of Edje is to be able to create Evas_Objects
|
||||
* in code and place them in a layout. And that is what swallowing
|
||||
* is all about.
|
||||
*
|
||||
* Swallow parts are place holders defined in the EDC file for
|
||||
* objects that one may want to include in the layout later, or for
|
||||
* objects that are not native of Edje. In this last case, Edje will
|
||||
* only treat the Evas_Object properties of the swallowed objects.
|
||||
*
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Part_Box Edje Box Part
|
||||
* @ingroup Edje_Object_Part
|
||||
*
|
||||
* @brief Functions that deal with parts of type box.
|
||||
*
|
||||
* Box is a container type for parts, that means it can contain
|
||||
* other parts.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Registers a custom layout to be used in edje boxes.
|
||||
*
|
||||
* @param name The name of the layout
|
||||
* @param func The function defining the layout
|
||||
* @param layout_data_get This function gets the custom data pointer
|
||||
* for func
|
||||
* @param layout_data_free Passed to func to free its private data
|
||||
* when needed
|
||||
* @param free_data Frees data
|
||||
* @param data Private pointer passed to layout_data_get
|
||||
*
|
||||
* This function registers custom layouts that can be referred from
|
||||
* themes by the registered name. The Evas_Object_Box_Layout
|
||||
* functions receive two pointers for internal use, one being private
|
||||
* data, and the other the function to free that data when it's not
|
||||
* longer needed. From Edje, this private data will be retrieved by
|
||||
* calling layout_data_get, and layout_data_free will be the free
|
||||
* function passed to func. layout_data_get will be called with data
|
||||
* as its parameter, and this one will be freed by free_data whenever
|
||||
* the layout is unregistered from Edje.
|
||||
*/
|
||||
EAPI void edje_box_layout_register (const char *name, Evas_Object_Box_Layout func, void *(*layout_data_get)(void *), void (*layout_data_free)(void *), void (*free_data)(void *), void *data);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Part_Table Edje Table Part
|
||||
* @ingroup Edje_Object_Part
|
||||
*
|
||||
* @brief Functions that deal with parts of type table.
|
||||
*
|
||||
* Table is a container type for parts, that means it can contain
|
||||
* other parts.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Edje_Object_Table_Homogeneous_Mode
|
||||
*
|
||||
* Table homogeneous modes.
|
||||
*
|
||||
*/
|
||||
typedef enum _Edje_Object_Table_Homogeneous_Mode
|
||||
{
|
||||
EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, /*< None homogeneous mode */
|
||||
EDJE_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, /*< Table homogeneous mode */
|
||||
EDJE_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 /*< Item homogeneous mode */
|
||||
} Edje_Object_Table_Homogeneous_Mode;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
|
@ -1533,25 +1533,6 @@ EAPI double edje_object_base_scale_get(const Evas_Object *obj);
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Part_Drag Edje Drag
|
||||
*
|
||||
* @brief Functions that deal with dragable parts.
|
||||
*
|
||||
* To create a movable part it must be declared as dragable
|
||||
* in EDC file. To do so, one must define a "dragable" block inside
|
||||
* the "part" block.
|
||||
*
|
||||
* These functions are used to set dragging properties to a
|
||||
* part or get dragging information about it.
|
||||
*
|
||||
* @see @ref tutorial_edje_drag
|
||||
*
|
||||
* @ingroup Edje_Object_Part
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
typedef enum _Edje_Drag_Dir
|
||||
{
|
||||
EDJE_DRAG_DIR_NONE = 0,
|
||||
|
@ -1560,7 +1541,6 @@ typedef enum _Edje_Drag_Dir
|
|||
EDJE_DRAG_DIR_XY = 3
|
||||
} Edje_Drag_Dir;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sets the dragable object location.
|
||||
*
|
||||
|
@ -1584,7 +1564,7 @@ typedef enum _Edje_Drag_Dir
|
|||
*
|
||||
* @return @c true on success, @c false otherwise
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_part_drag_value_set(Evas_Object *obj, const char * part, double dx, double dy);
|
||||
|
||||
|
@ -1604,7 +1584,7 @@ EAPI Eina_Bool edje_object_part_drag_value_set(Evas_Object *obj, const char * pa
|
|||
*
|
||||
* @return @c true on success, @c false otherwise
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_part_drag_value_get(const Evas_Object *obj, const char * part, double *dx, double *dy);
|
||||
|
||||
|
@ -1624,7 +1604,7 @@ EAPI Eina_Bool edje_object_part_drag_value_get(const Evas_Object *obj, const cha
|
|||
*
|
||||
* @return @c true on success, @c false otherwise
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_part_drag_size_set(Evas_Object *obj, const char * part, double dw, double dh);
|
||||
|
||||
|
@ -1641,7 +1621,7 @@ EAPI Eina_Bool edje_object_part_drag_size_set(Evas_Object *obj, const char * par
|
|||
*
|
||||
* @return @c true on success, @c false otherwise
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_part_drag_size_get(const Evas_Object *obj, const char * part, double *dw, double *dh);
|
||||
|
||||
|
@ -1658,7 +1638,7 @@ EAPI Eina_Bool edje_object_part_drag_size_get(const Evas_Object *obj, const char
|
|||
* direction #EDJE_DRAG_DIR_Y: Dragable in Y direction #EDJE_DRAG_DIR_XY:
|
||||
* Dragable in X & Y directions
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Edje_Drag_Dir edje_object_part_drag_dir_get(const Evas_Object *obj, const char * part);
|
||||
|
||||
|
@ -1679,7 +1659,7 @@ EAPI Edje_Drag_Dir edje_object_part_drag_dir_get(const Evas_Object *obj, const c
|
|||
*
|
||||
* @return @c true on success, @c false otherwise
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_part_drag_step_set(Evas_Object *obj, const char * part, double dx, double dy);
|
||||
|
||||
|
@ -1696,7 +1676,7 @@ EAPI Eina_Bool edje_object_part_drag_step_set(Evas_Object *obj, const char * par
|
|||
*
|
||||
* @return @c true on success, @c false otherwise
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_part_drag_step_get(const Evas_Object *obj, const char * part, double *dx, double *dy);
|
||||
|
||||
|
@ -1716,7 +1696,7 @@ EAPI Eina_Bool edje_object_part_drag_step_get(const Evas_Object *obj, const char
|
|||
*
|
||||
* @return @c true on success, @c false otherwise
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_part_drag_step(Evas_Object *obj, const char *part, double dx, double dy);
|
||||
|
||||
|
@ -1737,7 +1717,7 @@ EAPI Eina_Bool edje_object_part_drag_step(Evas_Object *obj, const char *part, do
|
|||
*
|
||||
* @return @c true on success, @c false otherwise
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_part_drag_page_set(Evas_Object *obj, const char * part, double dx, double dy);
|
||||
|
||||
|
@ -1754,7 +1734,7 @@ EAPI Eina_Bool edje_object_part_drag_page_set(Evas_Object *obj, const char * par
|
|||
*
|
||||
* @return @c true on success, @c false otherwise
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_part_drag_page_get(const Evas_Object *obj, const char * part, double *dx, double *dy);
|
||||
|
||||
|
@ -1776,10 +1756,14 @@ EAPI Eina_Bool edje_object_part_drag_page_get(const Evas_Object *obj, const char
|
|||
*
|
||||
* @return @c true on success, @c false otherwise
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
* @ingroup Edje_Part_Drag
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_part_drag_page(Evas_Object *obj, const char *part, double dx, double dy);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Sets a given text to an Edje object @c TEXT or TEXTBLOCK
|
||||
* parts.
|
||||
|
@ -2985,6 +2969,37 @@ EAPI void edje_object_size_max_get(const Evas_Object *obj, int *maxw, int *maxh)
|
|||
EAPI Eina_Bool edje_object_part_exists(const Evas_Object *obj, const char *part);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sets the function that provides item objects for named items in an
|
||||
* edje entry text
|
||||
*
|
||||
* Item objects may be deleted any time by Edje, and will be deleted when the
|
||||
* Edje object is deleted (or file is set to a new file).
|
||||
*
|
||||
* @param[in] obj The object.
|
||||
* @param[in] func The function to call (or @c null to disable) to get item
|
||||
* objects
|
||||
* @param[in] data The data pointer to pass to the func callback
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
*/
|
||||
EAPI void edje_object_item_provider_set(Edje_Object *obj, Edje_Item_Provider_Cb func, void *data);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Gets the description of an object color class.
|
||||
*
|
||||
* This function gets the description of a color class in use by an object.
|
||||
*
|
||||
* @param[in] color_class Color class description
|
||||
*
|
||||
* @return The description of the target color class or @c null if not found
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
*/
|
||||
EAPI const char *edje_object_color_class_description_get(const Edje_Object *obj, const char * color_class);
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Perspective Edje Perspective
|
||||
* @ingroup Edje_Object_Group
|
||||
|
@ -3135,37 +3150,6 @@ EAPI const Edje_Perspective *edje_object_perspective_get(const Evas_Object *obj)
|
|||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sets the function that provides item objects for named items in an
|
||||
* edje entry text
|
||||
*
|
||||
* Item objects may be deleted any time by Edje, and will be deleted when the
|
||||
* Edje object is deleted (or file is set to a new file).
|
||||
*
|
||||
* @param[in] obj The object.
|
||||
* @param[in] func The function to call (or @c null to disable) to get item
|
||||
* objects
|
||||
* @param[in] data The data pointer to pass to the func callback
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
*/
|
||||
EAPI void edje_object_item_provider_set(Edje_Object *obj, Edje_Item_Provider_Cb func, void *data);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Gets the description of an object color class.
|
||||
*
|
||||
* This function gets the description of a color class in use by an object.
|
||||
*
|
||||
* @param[in] color_class Color class description
|
||||
*
|
||||
* @return The description of the target color class or @c null if not found
|
||||
*
|
||||
* @ingroup Edje_Object
|
||||
*/
|
||||
EAPI const char *edje_object_color_class_description_get(const Edje_Object *obj, const char * color_class);
|
||||
|
||||
/**
|
||||
* @defgroup Edje_Object_Part Edje Part
|
||||
*
|
||||
|
@ -3217,9 +3201,6 @@ typedef enum _Edje_Part_Type
|
|||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#include "efl_canvas_layout_eo.legacy.h"
|
||||
#include "edje_edit_eo.legacy.h"
|
||||
#include "efl_layout_group_eo.legacy.h"
|
||||
|
|
|
@ -83,9 +83,9 @@ interface @beta Efl.Model
|
|||
The future can also be canceled if the model itself gets destroyed.
|
||||
]]
|
||||
params {
|
||||
@in property: string;
|
||||
@in property: string; [[Property name.]]
|
||||
}
|
||||
return: future<any_value_ptr>;
|
||||
return: future<any_value_ptr>; [[Future to be resolved when the property changes to anything other than error:EAGAIN]]
|
||||
}
|
||||
children_slice_get {
|
||||
[[Get children slice OR full range.
|
||||
|
|
|
@ -1,54 +1,47 @@
|
|||
interface @beta Efl.Ui.Autorepeat {
|
||||
[[Efl UI autorepeat interface]]
|
||||
eo_prefix: efl_ui;
|
||||
[[Interface for autorepeating clicks.
|
||||
|
||||
This interface abstracts functions for enabling / disabling this feature.
|
||||
When enabled, keeping a button pressed will continuously emit the $repeated
|
||||
event until the button is released. The time it takes until it starts
|
||||
emitting the event is given by @.autorepeat_initial_timeout, and the
|
||||
time between each new emission by @.autorepeat_gap_timeout.
|
||||
]]
|
||||
methods {
|
||||
@property autorepeat_initial_timeout {
|
||||
[[The initial timeout before the autorepeat event is generated
|
||||
[[The initial timeout before the autorepeat event is generated.
|
||||
|
||||
Sets the timeout, in seconds, since the button is pressed until the
|
||||
first $repeated signal is emitted. If $t is 0.0 or less, there
|
||||
won't be any delay and the event will be fired the moment the button is
|
||||
pressed.
|
||||
|
||||
See also @.autorepeat_enabled.set, @.autorepeat_gap_timeout.set.
|
||||
See also @.autorepeat_enabled and @.autorepeat_gap_timeout.
|
||||
]]
|
||||
values {
|
||||
t: double; [[Timeout in seconds]]
|
||||
t: double; [[Timeout in seconds.]]
|
||||
}
|
||||
}
|
||||
@property autorepeat_gap_timeout {
|
||||
[[The interval between each generated autorepeat event
|
||||
[[The interval between each generated autorepeat event.
|
||||
|
||||
After the first $repeated event is fired, all subsequent ones will
|
||||
follow after a delay of $t seconds for each.
|
||||
|
||||
See also @.autorepeat_initial_timeout.set.
|
||||
See also @.autorepeat_initial_timeout.
|
||||
]]
|
||||
values {
|
||||
t: double; [[Interval in seconds]]
|
||||
t: double; [[Time interval in seconds.]]
|
||||
}
|
||||
}
|
||||
@property autorepeat_enabled {
|
||||
[[Turn on/off the autorepeat event generated when the button is kept pressed
|
||||
[[Turn on/off the autorepeat event generated when a button is kept pressed.
|
||||
|
||||
When off, no autorepeat is performed and buttons emit a normal $clicked
|
||||
signal when they are clicked.
|
||||
|
||||
When on, keeping a button pressed will continuously emit a $repeated
|
||||
signal until the button is released. The time it takes until it starts
|
||||
emitting the signal is given by @.autorepeat_initial_timeout.set, and the
|
||||
time between each new emission by @.autorepeat_gap_timeout.set.
|
||||
event when they are clicked.
|
||||
]]
|
||||
values {
|
||||
on: bool; [[A bool to turn on/off the event]]
|
||||
}
|
||||
}
|
||||
@property autorepeat_supported {
|
||||
[[Whether the button supports autorepeat.]]
|
||||
get {
|
||||
}
|
||||
values {
|
||||
ret: bool; [[$true if autorepeat is supported, $false otherwise]]
|
||||
on: bool; [[A bool to turn on/off the repeat event generation.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
#define _EINA_INLINE_SLICE_H
|
||||
|
||||
#include <string.h>
|
||||
#ifdef _WIN32
|
||||
# include <Evil.h>
|
||||
#endif
|
||||
|
||||
static inline Eina_Slice
|
||||
eina_rw_slice_slice_get(const Eina_Rw_Slice rw_slice)
|
||||
|
@ -246,7 +249,7 @@ static inline char *
|
|||
eina_slice_strdup(const Eina_Slice slice)
|
||||
{
|
||||
if (slice.len != 0)
|
||||
return strndup((const char *)slice.mem, slice.len);
|
||||
return eina_strndup((const char *)slice.mem, slice.len);
|
||||
return strdup("");
|
||||
}
|
||||
|
||||
|
@ -254,7 +257,7 @@ static inline char *
|
|||
eina_rw_slice_strdup(const Eina_Rw_Slice rw_slice)
|
||||
{
|
||||
if (rw_slice.len != 0)
|
||||
return strndup((const char *)rw_slice.mem, rw_slice.len);
|
||||
return eina_strndup((const char *)rw_slice.mem, rw_slice.len);
|
||||
return strdup("");
|
||||
}
|
||||
|
||||
|
|
|
@ -81,6 +81,38 @@ eina_strdup(const char *str)
|
|||
return str ? strdup(str) : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief strndup function which takes @c NULL without crashing
|
||||
* @param str The string to copy
|
||||
* @param n The maximum number of char to copy
|
||||
* @return the copied string, must be freed
|
||||
* @note this also implements strndup() on Windows
|
||||
* @since 1.23
|
||||
*/
|
||||
static inline char *
|
||||
eina_strndup(const char *str, size_t n)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
char *ret;
|
||||
size_t slen;
|
||||
|
||||
if (!str)
|
||||
return NULL;
|
||||
|
||||
slen = strnlen(str, n);
|
||||
ret = (char *)malloc(slen + 1); /* cast for C++ code */
|
||||
if (!ret)
|
||||
return NULL;
|
||||
if (slen > 0)
|
||||
memcpy(ret, str, slen);
|
||||
ret[slen] = '\0';
|
||||
|
||||
return ret;
|
||||
#else
|
||||
return str ? strndup(str, n) : NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief streq function which takes @c NULL without crashing
|
||||
* @param a string a
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "eina_str.h"
|
||||
|
||||
/**
|
||||
* @addtogroup Eina_Slice_Group Memory Slices
|
||||
*
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "eina_types.h"
|
||||
|
||||
|
@ -382,6 +383,16 @@ EAPI unsigned char *eina_memdup(unsigned char *mem, size_t size, Eina_Bool termi
|
|||
*/
|
||||
EAPI char *eina_strftime(const char *format, const struct tm *tm);
|
||||
|
||||
static inline size_t eina_strlen_bounded(const char *str, size_t maxlen);
|
||||
|
||||
static inline size_t eina_str_join(char *dst, size_t size, char sep, const char *a, const char *b);
|
||||
|
||||
static inline char *eina_strdup(const char *str);
|
||||
|
||||
static inline char *eina_strndup(const char *str, size_t n);
|
||||
|
||||
static inline Eina_Bool eina_streq(const char *a, const char *b);
|
||||
|
||||
#include "eina_inline_str.x"
|
||||
|
||||
/**
|
||||
|
|
|
@ -116,6 +116,9 @@ eina_unicode_strndup(const Eina_Unicode *text, size_t n)
|
|||
EINA_SAFETY_ON_NULL_RETURN_VAL(text, NULL);
|
||||
|
||||
ustr = malloc((n + 1) * sizeof(Eina_Unicode));
|
||||
if (!ustr)
|
||||
return NULL;
|
||||
|
||||
memcpy(ustr, text, n * sizeof(Eina_Unicode));
|
||||
ustr[n] = 0;
|
||||
return ustr;
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef EFL_CXX_EFL_UI_HH
|
||||
#define EFL_CXX_EFL_UI_HH
|
||||
#if defined(ELEMENTARY_H) || defined(ELM_WIDGET_H) || defined(_EFL_UI_H)
|
||||
#error "Do not include Elm C API headers before including Efl_Ui.hh"
|
||||
#endif
|
||||
|
||||
#ifndef EFL_BETA_API_SUPPORT
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#endif
|
||||
#ifndef ELM_INTERNAL_API_ARGESFSDFEFC
|
||||
#define ELM_INTERNAL_API_ARGESFSDFEFC
|
||||
#endif
|
||||
|
||||
#include <Efl.hh>
|
||||
|
||||
extern "C" {
|
||||
// Some Elm_* classes are built and require the old header.
|
||||
#include "Elementary.h"
|
||||
#include "Efl_Ui.h"
|
||||
}
|
||||
|
||||
#include <Edje.hh>
|
||||
#include "Elementary.eo.hh"
|
||||
|
||||
#endif
|
|
@ -1,23 +0,0 @@
|
|||
#ifndef EFL_CXX_ELEMENTARY_HH
|
||||
#define EFL_CXX_ELEMENTARY_HH
|
||||
#if defined(ELEMENTARY_H) || defined(ELM_WIDGET_H)
|
||||
#error "Do not include Elm C API headers before including Elementary.hh"
|
||||
#endif
|
||||
|
||||
#ifndef EFL_BETA_API_SUPPORT
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#endif
|
||||
#ifndef ELM_INTERNAL_API_ARGESFSDFEFC
|
||||
#define ELM_INTERNAL_API_ARGESFSDFEFC
|
||||
#endif
|
||||
|
||||
#include <Efl.hh>
|
||||
|
||||
extern "C" {
|
||||
#include "Elementary.h"
|
||||
}
|
||||
|
||||
#include <Edje.hh>
|
||||
#include "Elementary.eo.hh"
|
||||
|
||||
#endif
|
|
@ -52,8 +52,11 @@ _efl_ui_box_child_register(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Entity *subobj)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
if (!efl_ui_widget_sub_object_add(obj, subobj))
|
||||
return EINA_FALSE;
|
||||
if (!efl_ui_widget_internal_get(obj))
|
||||
{
|
||||
if (!efl_ui_widget_sub_object_add(obj, subobj))
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
efl_key_data_set(subobj, "_elm_leaveme", obj);
|
||||
efl_canvas_group_member_add(obj, subobj);
|
||||
|
@ -74,9 +77,16 @@ _efl_ui_box_child_unregister(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Gfx_E
|
|||
ERR("subobj %p %s is not part of this widget", subobj, efl_class_name_get(subobj) );
|
||||
return EINA_FALSE;
|
||||
}
|
||||
if (!subobj || !_elm_widget_sub_object_redirect_to_top(obj, subobj))
|
||||
|
||||
if (!subobj)
|
||||
return EINA_FALSE;
|
||||
|
||||
if (!efl_ui_widget_internal_get(obj))
|
||||
{
|
||||
if (!_elm_widget_sub_object_redirect_to_top(obj, subobj))
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
efl_canvas_group_member_remove(obj, subobj);
|
||||
efl_canvas_object_clipper_set(subobj, NULL);
|
||||
efl_key_data_set(subobj, "_elm_leaveme", NULL);
|
||||
|
|
|
@ -279,61 +279,29 @@ _efl_ui_button_efl_ui_autorepeat_autorepeat_enabled_set(Eo *obj EINA_UNUSED, Efl
|
|||
sd->repeating = EINA_FALSE;
|
||||
}
|
||||
|
||||
#define _AR_CAPABLE(obj) \
|
||||
(_internal_efl_ui_button_autorepeat_supported_get(obj))
|
||||
|
||||
static Eina_Bool
|
||||
_internal_efl_ui_button_autorepeat_supported_get(const Evas_Object *obj)
|
||||
{
|
||||
Eina_Bool ret = EINA_FALSE;
|
||||
ret = efl_ui_autorepeat_supported_get(obj);
|
||||
return ret;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_button_efl_ui_autorepeat_autorepeat_supported_get(const Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *_pd EINA_UNUSED)
|
||||
_efl_ui_button_efl_ui_autorepeat_autorepeat_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *sd)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_button_efl_ui_autorepeat_autorepeat_enabled_get(const Eo *obj, Efl_Ui_Button_Data *sd)
|
||||
{
|
||||
return (_AR_CAPABLE(obj) & sd->autorepeat);
|
||||
return (sd->autorepeat);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_button_efl_ui_autorepeat_autorepeat_initial_timeout_set(Eo *obj, Efl_Ui_Button_Data *sd, double t)
|
||||
_efl_ui_button_efl_ui_autorepeat_autorepeat_initial_timeout_set(Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *sd, double t)
|
||||
{
|
||||
if (!_AR_CAPABLE(obj))
|
||||
{
|
||||
ERR("this widget does not support auto repetition of clicks.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (EINA_DBL_EQ(sd->ar_initial_timeout, t)) return;
|
||||
ELM_SAFE_FREE(sd->timer, ecore_timer_del);
|
||||
sd->ar_initial_timeout = t;
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
_efl_ui_button_efl_ui_autorepeat_autorepeat_initial_timeout_get(const Eo *obj, Efl_Ui_Button_Data *sd)
|
||||
_efl_ui_button_efl_ui_autorepeat_autorepeat_initial_timeout_get(const Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *sd)
|
||||
{
|
||||
if (!_AR_CAPABLE(obj))
|
||||
return 0.0;
|
||||
else
|
||||
return sd->ar_initial_timeout;
|
||||
return sd->ar_initial_timeout;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_button_efl_ui_autorepeat_autorepeat_gap_timeout_set(Eo *obj, Efl_Ui_Button_Data *sd, double t)
|
||||
_efl_ui_button_efl_ui_autorepeat_autorepeat_gap_timeout_set(Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *sd, double t)
|
||||
{
|
||||
if (!_AR_CAPABLE(obj))
|
||||
{
|
||||
ERR("this widget does not support auto repetition of clicks.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (EINA_DBL_EQ(sd->ar_gap_timeout, t)) return;
|
||||
|
||||
sd->ar_gap_timeout = t;
|
||||
|
|
|
@ -13,7 +13,6 @@ class @beta Efl.Ui.Button extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable
|
|||
Efl.Ui.Autorepeat.autorepeat_initial_timeout { set; get; }
|
||||
Efl.Ui.Autorepeat.autorepeat_gap_timeout { set; get; }
|
||||
Efl.Ui.Autorepeat.autorepeat_enabled { set; get; }
|
||||
Efl.Ui.Autorepeat.autorepeat_supported { get;}
|
||||
Efl.Ui.Widget.on_access_activate;
|
||||
Efl.Ui.Widget.widget_input_event_handler;
|
||||
Efl.Access.Widget.Action.elm_actions { get; }
|
||||
|
|
|
@ -58,7 +58,6 @@ _efl_ui_navigation_bar_efl_object_constructor(Eo *obj, Efl_Ui_Navigation_Bar_Dat
|
|||
|
||||
|
||||
/* Standard widget overrides */
|
||||
ELM_PART_CONTENT_DEFAULT_IMPLEMENT(efl_ui_navigation_bar, Efl_Ui_Navigation_Bar_Data)
|
||||
ELM_PART_TEXT_DEFAULT_GET(efl_ui_navigation_bar, "efl.text")
|
||||
ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_navigation_bar, Efl_Ui_Navigation_Bar_Data)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class @beta Efl.Ui.Navigation_Bar extends Efl.Ui.Layout_Base implements Efl.Content, Efl.Text
|
||||
class @beta Efl.Ui.Navigation_Bar extends Efl.Ui.Layout_Base implements Efl.Text
|
||||
{
|
||||
[[Navigation_Bar widget.
|
||||
|
||||
|
@ -21,8 +21,6 @@ class @beta Efl.Ui.Navigation_Bar extends Efl.Ui.Layout_Base implements Efl.Cont
|
|||
}
|
||||
implements {
|
||||
Efl.Object.constructor;
|
||||
Efl.Content.content { set; get; }
|
||||
Efl.Content.content_unset;
|
||||
Efl.Text.text { set; get; }
|
||||
Efl.Ui.L10n.l10n_text { set; get; }
|
||||
Efl.Part.part_get;
|
||||
|
|
|
@ -11,6 +11,30 @@
|
|||
|
||||
#define MY_CLASS EFL_UI_PAGER_CLASS
|
||||
|
||||
static void _unpack(Eo *obj, Efl_Ui_Pager_Data *pd, Efl_Gfx_Entity *subobj, int index);
|
||||
|
||||
static int
|
||||
clamp_index(Efl_Ui_Pager_Data *pd, int index)
|
||||
{
|
||||
if (index < ((int)eina_list_count(pd->content_list)) * -1)
|
||||
return -1;
|
||||
else if (index > (int)eina_list_count(pd->content_list) - 1)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
index_rollover(Efl_Ui_Pager_Data *pd, int index)
|
||||
{
|
||||
int c = eina_list_count(pd->content_list);
|
||||
if (index < c * -1)
|
||||
return 0;
|
||||
else if (index > c - 1)
|
||||
return c - 1;
|
||||
else if (index < 0)
|
||||
return index + c;
|
||||
return index;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_pager_update(Efl_Ui_Pager_Data *pd)
|
||||
|
@ -360,6 +384,7 @@ _efl_ui_pager_efl_object_constructor(Eo *obj,
|
|||
efl_event_callback_add(pd->page_root, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _move_cb, pd);
|
||||
|
||||
pd->page_box = efl_add(EFL_UI_BOX_CLASS, obj);
|
||||
efl_ui_widget_internal_set(pd->page_box, EINA_TRUE);
|
||||
efl_canvas_group_member_add(pd->page_root, pd->page_box);
|
||||
|
||||
pd->foreclip = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
|
||||
|
@ -397,30 +422,65 @@ _efl_ui_pager_efl_container_content_count(Eo *obj EINA_UNUSED,
|
|||
return pd->cnt;
|
||||
}
|
||||
|
||||
static void
|
||||
_child_inv(void *data, const Efl_Event *ev)
|
||||
{
|
||||
Efl_Ui_Pager_Data *pd = efl_data_scope_get(data, EFL_UI_PAGER_CLASS);
|
||||
int index = eina_list_data_idx(pd->content_list, ev->object);
|
||||
|
||||
pd->content_list = eina_list_remove(pd->content_list, ev->object);
|
||||
|
||||
if (((index == pd->curr.page) && ((index != 0) || (pd->cnt == 0))) ||
|
||||
(index < pd->curr.page))
|
||||
pd->curr.page--;
|
||||
pd->cnt--;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_register_child(Eo *obj EINA_UNUSED, Efl_Ui_Pager_Data *pd, Efl_Gfx_Entity *subobj)
|
||||
{
|
||||
if (eina_list_data_find(pd->content_list, subobj))
|
||||
{
|
||||
ERR("Object already added!");
|
||||
return EINA_FALSE;
|
||||
}
|
||||
if (!efl_ui_widget_sub_object_add(obj, subobj))
|
||||
return EINA_FALSE;
|
||||
|
||||
if (!pd->transition)
|
||||
efl_canvas_object_clipper_set(subobj, pd->backclip);
|
||||
|
||||
efl_event_callback_add(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_update_internals(Eo *obj EINA_UNUSED, Efl_Ui_Pager_Data *pd, Efl_Gfx_Entity *subobj EINA_UNUSED, int index)
|
||||
{
|
||||
pd->cnt++;
|
||||
|
||||
if (pd->curr.page >= index)
|
||||
pd->curr.page++;
|
||||
|
||||
if (pd->transition)
|
||||
efl_page_transition_pack(pd->transition, index);
|
||||
|
||||
if (pd->indicator)
|
||||
efl_page_transition_pack(pd->indicator, index);
|
||||
|
||||
if (pd->cnt == 1)
|
||||
efl_ui_pager_current_page_set(obj, 0);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_pager_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED,
|
||||
Efl_Ui_Pager_Data *pd,
|
||||
Efl_Gfx_Entity *subobj)
|
||||
{
|
||||
if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
|
||||
|
||||
if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
|
||||
pd->content_list = eina_list_prepend(pd->content_list, subobj);
|
||||
|
||||
pd->cnt++;
|
||||
pd->curr.page++;
|
||||
|
||||
if (pd->transition)
|
||||
efl_page_transition_pack(pd->transition, 0);
|
||||
else
|
||||
{
|
||||
if (pd->cnt == 1)
|
||||
efl_pack(pd->page_box, subobj);
|
||||
else efl_canvas_object_clipper_set(subobj, pd->backclip);
|
||||
}
|
||||
|
||||
if (pd->indicator)
|
||||
efl_page_indicator_pack(pd->indicator, 0);
|
||||
|
||||
_update_internals(obj, pd, subobj, 0);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -429,25 +489,9 @@ _efl_ui_pager_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED,
|
|||
Efl_Ui_Pager_Data *pd,
|
||||
Efl_Gfx_Entity *subobj)
|
||||
{
|
||||
if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
|
||||
|
||||
if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
|
||||
pd->content_list = eina_list_append(pd->content_list, subobj);
|
||||
|
||||
pd->cnt++;
|
||||
if (pd->curr.page == -1) pd->curr.page = 0;
|
||||
|
||||
if (pd->transition)
|
||||
efl_page_transition_pack(pd->transition, (pd->cnt - 1));
|
||||
else
|
||||
{
|
||||
if (pd->cnt == 1)
|
||||
efl_pack(pd->page_box, subobj);
|
||||
else efl_canvas_object_clipper_set(subobj, pd->backclip);
|
||||
}
|
||||
|
||||
if (pd->indicator)
|
||||
efl_page_indicator_pack(pd->indicator, (pd->cnt - 1));
|
||||
|
||||
_update_internals(obj, pd, subobj, eina_list_count(pd->content_list) - 1);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -457,23 +501,11 @@ _efl_ui_pager_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED,
|
|||
Efl_Gfx_Entity *subobj,
|
||||
const Efl_Gfx_Entity *existing)
|
||||
{
|
||||
if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
|
||||
|
||||
if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
|
||||
int index = eina_list_data_idx(pd->content_list, (void *)existing);
|
||||
if (index == -1) return EINA_FALSE;
|
||||
|
||||
pd->content_list = eina_list_prepend_relative(pd->content_list, subobj, existing);
|
||||
|
||||
pd->cnt++;
|
||||
if (pd->curr.page >= index) pd->curr.page++;
|
||||
|
||||
if (pd->transition)
|
||||
efl_page_transition_pack(pd->transition, index);
|
||||
else efl_canvas_object_clipper_set(subobj, pd->backclip);
|
||||
|
||||
if (pd->indicator)
|
||||
efl_page_indicator_pack(pd->indicator, index);
|
||||
|
||||
_update_internals(obj, pd, subobj, index);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -483,23 +515,11 @@ _efl_ui_pager_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED,
|
|||
Efl_Gfx_Entity *subobj,
|
||||
const Efl_Gfx_Entity *existing)
|
||||
{
|
||||
if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
|
||||
|
||||
if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
|
||||
int index = eina_list_data_idx(pd->content_list, (void *)existing);
|
||||
if (index == -1) return EINA_FALSE;
|
||||
|
||||
pd->content_list = eina_list_append_relative(pd->content_list, subobj, existing);
|
||||
|
||||
pd->cnt++;
|
||||
if (pd->curr.page > index) pd->curr.page++;
|
||||
|
||||
if (pd->transition)
|
||||
efl_page_transition_pack(pd->transition, (index + 1));
|
||||
else efl_canvas_object_clipper_set(subobj, pd->backclip);
|
||||
|
||||
if (pd->indicator)
|
||||
efl_page_indicator_pack(pd->indicator, (index + 1));
|
||||
|
||||
_update_internals(obj, pd, subobj, index + 1);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -509,13 +529,7 @@ _efl_ui_pager_efl_pack_linear_pack_at(Eo *obj,
|
|||
Efl_Gfx_Entity *subobj,
|
||||
int index)
|
||||
{
|
||||
if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
|
||||
|
||||
if ((index > pd->cnt) || (index < 0))
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
else if (index == pd->cnt)
|
||||
if (index == pd->cnt)
|
||||
{
|
||||
_efl_ui_pager_efl_pack_linear_pack_end(obj, pd, subobj);
|
||||
}
|
||||
|
@ -523,19 +537,26 @@ _efl_ui_pager_efl_pack_linear_pack_at(Eo *obj,
|
|||
{
|
||||
Efl_Gfx_Entity *existing = NULL;
|
||||
|
||||
existing = eina_list_nth(pd->content_list, index);
|
||||
pd->content_list = eina_list_prepend_relative(
|
||||
pd->content_list, subobj, existing);
|
||||
|
||||
pd->cnt++;
|
||||
if (pd->curr.page >= index) pd->curr.page++;
|
||||
|
||||
if (pd->transition)
|
||||
efl_page_transition_pack(pd->transition, index);
|
||||
else efl_canvas_object_clipper_set(subobj, pd->backclip);
|
||||
|
||||
if (pd->indicator)
|
||||
efl_page_indicator_pack(pd->indicator, index);
|
||||
if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
|
||||
int clamp = clamp_index(pd, index);
|
||||
int pass_index = -1;
|
||||
if (clamp == 0)
|
||||
{
|
||||
existing = eina_list_nth(pd->content_list, index_rollover(pd, index));
|
||||
pd->content_list = eina_list_prepend_relative(
|
||||
pd->content_list, subobj, existing);
|
||||
}
|
||||
else if (clamp == 1)
|
||||
{
|
||||
pd->content_list = eina_list_append(pd->content_list, subobj);
|
||||
pass_index = eina_list_count(pd->content_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
pd->content_list = eina_list_prepend(pd->content_list, subobj);
|
||||
pass_index = 0;
|
||||
}
|
||||
_update_internals(obj, pd, subobj, pass_index);
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
|
@ -546,7 +567,7 @@ _efl_ui_pager_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED,
|
|||
Efl_Ui_Pager_Data *pd,
|
||||
int index)
|
||||
{
|
||||
return eina_list_nth(pd->content_list, index);
|
||||
return eina_list_nth(pd->content_list, index_rollover(pd, index));
|
||||
}
|
||||
|
||||
EOLIAN static int
|
||||
|
@ -578,7 +599,8 @@ _efl_ui_pager_current_page_set(Eo *obj,
|
|||
Eo *curr;
|
||||
|
||||
curr = eina_list_nth(pd->content_list, pd->curr.page);
|
||||
efl_pack_unpack(pd->page_box, curr);
|
||||
if (curr)
|
||||
efl_pack_unpack(pd->page_box, curr);
|
||||
efl_canvas_object_clipper_set(curr, pd->backclip);
|
||||
|
||||
pd->curr.page = index;
|
||||
|
@ -681,6 +703,7 @@ _efl_ui_pager_indicator_set(Eo *obj EINA_UNUSED,
|
|||
if (!pd->idbox)
|
||||
{
|
||||
pd->idbox = efl_add(EFL_UI_BOX_CLASS, obj);
|
||||
efl_ui_widget_internal_set(pd->idbox, EINA_TRUE);
|
||||
efl_content_set(efl_part(obj, "efl.indicator"), pd->idbox);
|
||||
}
|
||||
|
||||
|
@ -796,7 +819,8 @@ _efl_ui_pager_loop_mode_get(const Eo *obj EINA_UNUSED,
|
|||
}
|
||||
|
||||
static void
|
||||
_unpack_all(Efl_Ui_Pager_Data *pd,
|
||||
_unpack_all(Eo *obj EINA_UNUSED,
|
||||
Efl_Ui_Pager_Data *pd,
|
||||
Eina_Bool clear)
|
||||
{
|
||||
Eo *subobj;
|
||||
|
@ -812,18 +836,26 @@ _unpack_all(Efl_Ui_Pager_Data *pd,
|
|||
else
|
||||
{
|
||||
subobj = eina_list_nth(pd->content_list, pd->curr.page);
|
||||
efl_pack_unpack(pd->page_box, subobj);
|
||||
if (subobj)
|
||||
efl_pack_unpack(pd->page_box, subobj);
|
||||
pd->curr.page = -1;
|
||||
}
|
||||
|
||||
if (clear)
|
||||
{
|
||||
EINA_LIST_FREE(pd->content_list, subobj)
|
||||
evas_object_del(subobj);
|
||||
{
|
||||
efl_event_callback_del(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
|
||||
evas_object_del(subobj);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EINA_LIST_FREE(pd->content_list, subobj)
|
||||
efl_canvas_object_clipper_set(subobj, NULL);
|
||||
{
|
||||
efl_event_callback_del(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
|
||||
efl_canvas_object_clipper_set(subobj, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (pd->indicator)
|
||||
|
@ -836,7 +868,7 @@ EOLIAN static Eina_Bool
|
|||
_efl_ui_pager_efl_pack_pack_clear(Eo *obj EINA_UNUSED,
|
||||
Efl_Ui_Pager_Data *pd)
|
||||
{
|
||||
_unpack_all(pd, EINA_TRUE);
|
||||
_unpack_all(obj, pd, EINA_TRUE);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
@ -845,7 +877,7 @@ EOLIAN static Eina_Bool
|
|||
_efl_ui_pager_efl_pack_unpack_all(Eo *obj EINA_UNUSED,
|
||||
Efl_Ui_Pager_Data *pd)
|
||||
{
|
||||
_unpack_all(pd, EINA_FALSE);
|
||||
_unpack_all(obj, pd, EINA_FALSE);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
@ -856,8 +888,11 @@ _unpack(Eo *obj,
|
|||
Efl_Gfx_Entity *subobj,
|
||||
int index)
|
||||
{
|
||||
int self_index = eina_list_data_idx(pd->content_list, subobj);
|
||||
int self_curr_page = pd->curr.page;
|
||||
pd->content_list = eina_list_remove(pd->content_list, subobj);
|
||||
pd->cnt--;
|
||||
_elm_widget_sub_object_redirect_to_top(obj, subobj);
|
||||
|
||||
if (((index == pd->curr.page) && ((index != 0) || (pd->cnt == 0))) ||
|
||||
(index < pd->curr.page))
|
||||
|
@ -876,13 +911,19 @@ _unpack(Eo *obj,
|
|||
}
|
||||
else
|
||||
{
|
||||
efl_pack_unpack(pd->page_box, subobj);
|
||||
if (pd->curr.page != -1)
|
||||
efl_pack(pd->page_box, eina_list_nth(pd->content_list, pd->curr.page));
|
||||
if (self_curr_page == self_index)
|
||||
{
|
||||
efl_pack_unpack(pd->page_box, subobj);
|
||||
self_curr_page = pd->curr.page;
|
||||
pd->curr.page = -1;
|
||||
efl_ui_pager_current_page_set(obj, self_curr_page);
|
||||
}
|
||||
}
|
||||
|
||||
if (pd->indicator)
|
||||
efl_page_indicator_unpack(pd->indicator, index);
|
||||
|
||||
efl_event_callback_del(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
@ -890,12 +931,14 @@ _efl_ui_pager_efl_pack_unpack(Eo *obj,
|
|||
Efl_Ui_Pager_Data *pd,
|
||||
Efl_Gfx_Entity *subobj)
|
||||
{
|
||||
if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
|
||||
|
||||
if (!subobj) return EINA_FALSE;
|
||||
|
||||
int index = eina_list_data_idx(pd->content_list, subobj);
|
||||
if (index == -1) return EINA_FALSE;
|
||||
if (index == -1)
|
||||
{
|
||||
ERR("You can only unpack items that have been added before");
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
_unpack(obj, pd, subobj, index);
|
||||
|
||||
|
@ -907,17 +950,24 @@ _efl_ui_pager_efl_pack_linear_pack_unpack_at(Eo *obj,
|
|||
Efl_Ui_Pager_Data *pd,
|
||||
int index)
|
||||
{
|
||||
if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return NULL;
|
||||
|
||||
if ((index >= pd->cnt) || (index < 0)) return NULL;
|
||||
|
||||
Efl_Gfx_Entity *subobj = eina_list_nth(pd->content_list, index);
|
||||
Efl_Gfx_Entity *subobj = eina_list_nth(pd->content_list, index_rollover(pd, index_rollover(pd, index)));
|
||||
|
||||
_unpack(obj, pd, subobj, index);
|
||||
|
||||
return subobj;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_pager_efl_pack_pack(Eo *obj, Efl_Ui_Pager_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj)
|
||||
{
|
||||
return efl_pack_begin(obj, subobj);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Iterator*
|
||||
_efl_ui_pager_efl_container_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Pager_Data *pd)
|
||||
{
|
||||
return eina_list_iterator_new(pd->content_list);
|
||||
}
|
||||
|
||||
|
||||
#include "efl_ui_pager.eo.c"
|
||||
|
|
|
@ -92,9 +92,11 @@ class @beta Efl.Ui.Pager extends Efl.Ui.Layout_Base implements Efl.Pack_Linear
|
|||
Efl.Object.constructor;
|
||||
Efl.Object.invalidate;
|
||||
Efl.Container.content_count;
|
||||
Efl.Container.content_iterate;
|
||||
Efl.Pack.pack_clear; //TODO
|
||||
Efl.Pack.unpack_all; //TODO
|
||||
Efl.Pack.unpack; //TODO
|
||||
Efl.Pack.pack;
|
||||
Efl.Pack_Linear.pack_begin;
|
||||
Efl.Pack_Linear.pack_end;
|
||||
Efl.Pack_Linear.pack_before;
|
||||
|
|
|
@ -15,7 +15,7 @@ class @beta Efl.Ui.Progressbar extends Efl.Ui.Layout_Base implements Efl.Ui.Rang
|
|||
without showing the precise progress rate. In the default theme, it will
|
||||
animate the bar with content, switching constantly between filling it and back
|
||||
to non-filled in a loop. To start and stop this pulsing
|
||||
animation you need to explicitly call efl_ui_progressbar_pulse_set().
|
||||
animation you need to explicitly call @.pulse.set().
|
||||
]]
|
||||
|
||||
set {
|
||||
|
@ -30,11 +30,11 @@ class @beta Efl.Ui.Progressbar extends Efl.Ui.Layout_Base implements Efl.Ui.Rang
|
|||
set {
|
||||
[[Start/stop a given progress bar "pulsing" animation, if its under that mode
|
||||
|
||||
Note: This call won't do anything if $obj is not under "pulsing mode".
|
||||
Note: This call won't do anything if $obj is not under "pulsing mode". See @.pulse_mode.
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[ Get the pulsing state on a given progressbar widget.
|
||||
[[ Get the pulsing state on a given progressbar widget. See @.pulse_mode.
|
||||
]]
|
||||
}
|
||||
values {
|
||||
|
|
|
@ -27,29 +27,25 @@ _chain_sort_cb(const void *l1, const void *l2)
|
|||
static void
|
||||
_on_child_size_changed(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Relative_Layout_Data *pd = data;
|
||||
Efl_Ui_Relative_Layout *obj = data;
|
||||
|
||||
efl_pack_layout_request(pd->obj);
|
||||
efl_pack_layout_request(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_on_child_hints_changed(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Relative_Layout_Data *pd = data;
|
||||
Efl_Ui_Relative_Layout *obj = data;
|
||||
|
||||
efl_pack_layout_request(pd->obj);
|
||||
efl_pack_layout_request(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_on_child_del(void *data, const Efl_Event *event)
|
||||
{
|
||||
Efl_Ui_Relative_Layout_Data *pd = data;
|
||||
Efl_Ui_Relative_Layout *obj = data;
|
||||
|
||||
if (eina_hash_del_by_key(pd->children, &event->object))
|
||||
efl_pack_layout_request(pd->obj);
|
||||
else
|
||||
ERR("child(%p(%s)) is not registered", event->object,
|
||||
efl_class_name_get(event->object));
|
||||
efl_pack_unpack(obj, event->object);
|
||||
}
|
||||
|
||||
EFL_CALLBACKS_ARRAY_DEFINE(efl_ui_relative_layout_callbacks,
|
||||
|
@ -82,7 +78,7 @@ _efl_ui_relative_layout_register(Efl_Ui_Relative_Layout_Data *pd, Eo *child)
|
|||
|
||||
efl_key_data_set(child, "_elm_leaveme", pd->obj);
|
||||
efl_canvas_object_clipper_set(child, pd->clipper);
|
||||
efl_event_callback_array_add(child, efl_ui_relative_layout_callbacks(), pd);
|
||||
efl_event_callback_array_add(child, efl_ui_relative_layout_callbacks(), pd->obj);
|
||||
efl_canvas_group_member_add(pd->obj, child);
|
||||
efl_canvas_group_change(pd->obj);
|
||||
|
||||
|
@ -366,19 +362,26 @@ _hash_free_cb(void *data)
|
|||
{
|
||||
Efl_Ui_Relative_Layout_Child *child = data;
|
||||
|
||||
efl_canvas_group_member_remove(child->layout, child->obj);
|
||||
efl_canvas_object_clipper_set(child->obj, NULL);
|
||||
efl_key_data_set(child->obj, "_elm_leaveme", NULL);
|
||||
efl_event_callback_array_del(child->obj, efl_ui_relative_layout_callbacks(),
|
||||
child->layout);
|
||||
|
||||
if (!efl_invalidated_get(child->obj))
|
||||
_elm_widget_sub_object_redirect_to_top(child->layout, child->obj);
|
||||
|
||||
free(child);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_hash_free_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
|
||||
void *data, void *fdata EINA_UNUSED)
|
||||
static void
|
||||
_hash_clear_cb(void *data)
|
||||
{
|
||||
Efl_Ui_Relative_Layout_Child *child = data;
|
||||
|
||||
_elm_widget_sub_object_redirect_to_top(child->layout, child->obj);
|
||||
_hash_free_cb(child);
|
||||
|
||||
return EINA_TRUE;
|
||||
efl_event_callback_array_del(child->obj, efl_ui_relative_layout_callbacks(),
|
||||
child->layout);
|
||||
efl_del(child->obj);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -558,14 +561,9 @@ _efl_ui_relative_layout_efl_object_constructor(Eo *obj, Efl_Ui_Relative_Layout_D
|
|||
EOLIAN static void
|
||||
_efl_ui_relative_layout_efl_object_invalidate(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
|
||||
{
|
||||
Eo *child;
|
||||
|
||||
efl_invalidate(efl_super(obj, MY_CLASS));
|
||||
|
||||
EINA_LIST_FREE(pd->children, child)
|
||||
{
|
||||
efl_event_callback_array_del(child, efl_ui_relative_layout_callbacks(), pd);
|
||||
}
|
||||
eina_hash_free_buckets(pd->children);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -578,35 +576,101 @@ _efl_ui_relative_layout_efl_object_destructor(Eo *obj, Efl_Ui_Relative_Layout_Da
|
|||
efl_destructor(efl_super(obj, MY_CLASS));
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_relative_layout_unregister(Eo *obj, Efl_Ui_Relative_Layout_Data *pd, Efl_Object *child)
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_relative_layout_efl_pack_pack(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd, Efl_Gfx_Entity *subobj)
|
||||
{
|
||||
_elm_widget_sub_object_redirect_to_top(obj, child);
|
||||
if (eina_hash_del_by_key(pd->children, &child))
|
||||
{
|
||||
efl_canvas_group_member_remove(obj, child);
|
||||
efl_canvas_object_clipper_set(child, NULL);
|
||||
efl_key_data_set(child, "_elm_leaveme", NULL);
|
||||
efl_event_callback_array_del(child, efl_ui_relative_layout_callbacks(), pd);
|
||||
efl_pack_layout_request(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
ERR("child(%p(%s)) is not registered", child, efl_class_name_get(child));
|
||||
}
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(subobj, EINA_FALSE);
|
||||
EINA_SAFETY_ON_TRUE_RETURN_VAL(!!eina_hash_find(pd->children, &subobj), EINA_FALSE);
|
||||
|
||||
return !!_efl_ui_relative_layout_register(pd, subobj);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_relative_layout_unregister_all(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_relative_layout_efl_pack_unpack(Eo *obj, Efl_Ui_Relative_Layout_Data *pd, Efl_Object *child)
|
||||
{
|
||||
eina_hash_foreach(pd->children, _hash_free_foreach_cb, NULL);
|
||||
if (!eina_hash_del_by_key(pd->children, &child))
|
||||
{
|
||||
ERR("child(%p(%s)) is not registered", child, efl_class_name_get(child));
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
efl_pack_layout_request(obj);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_relative_layout_efl_pack_unpack_all(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
|
||||
{
|
||||
eina_hash_free_buckets(pd->children);
|
||||
efl_pack_layout_request(obj);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_relative_layout_efl_pack_pack_clear(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
|
||||
{
|
||||
eina_hash_free_cb_set(pd->children, _hash_clear_cb);
|
||||
eina_hash_free_buckets(pd->children);
|
||||
eina_hash_free_cb_set(pd->children, _hash_free_cb);
|
||||
|
||||
efl_pack_layout_request(obj);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_efl_ui_relative_layout_content_iterator_next(Efl_Ui_Relative_Layout_Content_Iterator *it, void **data)
|
||||
{
|
||||
Efl_Ui_Relative_Layout_Child *child;
|
||||
|
||||
if (!eina_iterator_next(it->real_iterator, (void **) &child))
|
||||
return EINA_FALSE;
|
||||
|
||||
if (data) *data = child->obj;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eo *
|
||||
_efl_ui_relative_layout_content_iterator_get_container(Efl_Ui_Relative_Layout_Content_Iterator *it)
|
||||
{
|
||||
return it->relative_layout;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_relative_layout_content_iterator_free(Efl_Ui_Relative_Layout_Content_Iterator *it)
|
||||
{
|
||||
eina_iterator_free(it->real_iterator);
|
||||
free(it);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Iterator *
|
||||
_efl_ui_relative_layout_children_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd)
|
||||
_efl_ui_relative_layout_efl_container_content_iterate(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
|
||||
{
|
||||
return eina_hash_iterator_data_new(pd->children);
|
||||
Efl_Ui_Relative_Layout_Content_Iterator *it;
|
||||
|
||||
it = calloc(1, sizeof(*it));
|
||||
if (!it) return NULL;
|
||||
|
||||
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
|
||||
|
||||
it->relative_layout = obj;
|
||||
it->real_iterator = eina_hash_iterator_data_new(pd->children);
|
||||
|
||||
it->iterator.version = EINA_ITERATOR_VERSION;
|
||||
it->iterator.next = FUNC_ITERATOR_NEXT(_efl_ui_relative_layout_content_iterator_next);
|
||||
it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(
|
||||
_efl_ui_relative_layout_content_iterator_get_container);
|
||||
it->iterator.free = FUNC_ITERATOR_FREE(_efl_ui_relative_layout_content_iterator_free);
|
||||
|
||||
return &it->iterator;
|
||||
}
|
||||
|
||||
EOLIAN static int
|
||||
_efl_ui_relative_layout_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd)
|
||||
{
|
||||
return eina_hash_population(pd->children);
|
||||
}
|
||||
|
||||
EFL_UI_RELATIVE_LAYOUT_RELATION_SET_GET(left, LEFT);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Layout
|
||||
class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Layout, Efl.Pack
|
||||
{
|
||||
[[The relative layout class.
|
||||
|
||||
|
@ -53,25 +53,18 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Lay
|
|||
ranging from 0.0 to 1.0.]]
|
||||
}
|
||||
}
|
||||
unregister {
|
||||
[[Remove all relations of the child.]]
|
||||
params {
|
||||
@in child: Efl.Object; [[The child to unregister]]
|
||||
}
|
||||
}
|
||||
unregister_all {
|
||||
[[Remove all relations from the registered children. ]]
|
||||
}
|
||||
children_iterate {
|
||||
[[Begin iterating over this object's children.]]
|
||||
return: iterator<Efl.Object> @owned @warn_unused; [[Iterator to object children.]]
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Object.constructor;
|
||||
Efl.Object.invalidate;
|
||||
Efl.Object.destructor;
|
||||
Efl.Canvas.Group.group_calculate;
|
||||
Efl.Pack.pack_clear;
|
||||
Efl.Pack.unpack_all;
|
||||
Efl.Pack.unpack;
|
||||
Efl.Pack.pack;
|
||||
Efl.Container.content_iterate;
|
||||
Efl.Container.content_count;
|
||||
Efl.Gfx.Entity.position { set; }
|
||||
Efl.Gfx.Entity.size { set; }
|
||||
Efl.Pack_Layout.layout_update;
|
||||
|
|
|
@ -21,6 +21,7 @@ typedef struct _Efl_Ui_Relative_Layout_Data Efl_Ui_Relative_Layout_Data;
|
|||
typedef struct _Efl_Ui_Relative_Layout_Child Efl_Ui_Relative_Layout_Child;
|
||||
typedef struct _Efl_Ui_Relative_Layout_Calc Efl_Ui_Relative_Layout_Calc;
|
||||
typedef struct _Efl_Ui_Relative_Layout_Relation Efl_Ui_Relative_Layout_Relation;
|
||||
typedef struct _Efl_Ui_Relative_Layout_Content_Iterator Efl_Ui_Relative_Layout_Content_Iterator;
|
||||
|
||||
struct _Efl_Ui_Relative_Layout_Calc
|
||||
{
|
||||
|
@ -68,6 +69,13 @@ struct _Efl_Ui_Relative_Layout_Child
|
|||
Efl_Ui_Relative_Layout_Calc calc;
|
||||
};
|
||||
|
||||
struct _Efl_Ui_Relative_Layout_Content_Iterator
|
||||
{
|
||||
Eina_Iterator iterator;
|
||||
Eina_Iterator *real_iterator;
|
||||
Eo *relative_layout;
|
||||
};
|
||||
|
||||
#define EFL_UI_RELATIVE_LAYOUT_RELATION_SET_GET(direction, DIRECTION) \
|
||||
EOLIAN static void \
|
||||
_efl_ui_relative_layout_relation_ ## direction ## _set(Eo *obj, Efl_Ui_Relative_Layout_Data *pd, Eo *child, Eo *target, double relative) \
|
||||
|
|
|
@ -3,7 +3,7 @@ import elm_general;
|
|||
|
||||
class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable,
|
||||
Efl.Access.Text, Efl.Access.Editable.Text, Efl.File,
|
||||
Efl.Ui.Selectable, Efl.Text_Interactive
|
||||
Efl.Ui.Selectable, Efl.Text_Interactive, Efl.Text_Markup
|
||||
{
|
||||
[[Efl UI text class]]
|
||||
methods {
|
||||
|
@ -379,5 +379,6 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable,
|
|||
}
|
||||
composite {
|
||||
Efl.Text_Interactive;
|
||||
Efl.Text_Markup;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1485,7 +1485,6 @@ _efl_ui_widget_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Ob
|
|||
{
|
||||
Efl_Ui_Widget *parent;
|
||||
|
||||
if (!sobj) return EINA_FALSE;
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(sobj, EFL_GFX_ENTITY_INTERFACE), EINA_FALSE);
|
||||
EINA_SAFETY_ON_TRUE_RETURN_VAL(obj == sobj, EINA_FALSE);
|
||||
|
||||
|
@ -5850,6 +5849,24 @@ _efl_ui_widget_efl_object_invalidate(Eo *obj, Efl_Ui_Widget_Data *pd)
|
|||
|
||||
#include "efl_ui_widget_part_bg.eo.c"
|
||||
|
||||
EAPI void
|
||||
efl_ui_widget_internal_set(Eo *obj, Eina_Bool b)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET(obj, pd);
|
||||
EINA_SAFETY_ON_NULL_RETURN(pd);
|
||||
|
||||
pd->internal = b;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
efl_ui_widget_internal_get(Eo *obj)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET(obj, pd);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
||||
|
||||
return pd->internal;
|
||||
}
|
||||
|
||||
/* Efl.Part Bg end */
|
||||
|
||||
|
||||
|
|
|
@ -399,10 +399,10 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object,
|
|||
return: bool; [[Returns $true if the widget is registered in the focus manager, $false if not.]]
|
||||
}
|
||||
}
|
||||
// parts {
|
||||
// shadow: Efl.Ui.Widget_Part_Shadow;
|
||||
// background: Efl.Ui.Widget_Part_Bg;
|
||||
// }
|
||||
parts {
|
||||
shadow @beta: Efl.Ui.Widget_Part_Shadow;
|
||||
background @beta: Efl.Ui.Widget_Part_Bg;
|
||||
}
|
||||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
|
|
|
@ -364,11 +364,14 @@ _elm_combobox_efl_gfx_entity_visible_set(Eo *obj, Elm_Combobox_Data *sd, Eina_Bo
|
|||
}
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_combobox_efl_ui_autorepeat_autorepeat_supported_get(const Eo *obj EINA_UNUSED,
|
||||
Elm_Combobox_Data *sd EINA_UNUSED)
|
||||
EOLIAN static void
|
||||
_elm_combobox_efl_ui_autorepeat_autorepeat_enabled_set(const Eo *obj EINA_UNUSED,
|
||||
Elm_Combobox_Data *sd EINA_UNUSED,
|
||||
Eina_Bool enabled)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
if (enabled)
|
||||
ERR("You cannot enable autorepeat on this object");
|
||||
efl_ui_autorepeat_enabled_set(efl_super(obj, MY_CLASS), EINA_FALSE);
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
|
@ -389,6 +392,7 @@ _elm_combobox_efl_object_constructor(Eo *obj, Elm_Combobox_Data *sd)
|
|||
|
||||
sd->first_filter = EINA_TRUE;
|
||||
|
||||
efl_ui_autorepeat_enabled_set(obj, EINA_FALSE);
|
||||
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
||||
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
||||
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_GLASS_PANE);
|
||||
|
@ -609,7 +613,7 @@ _elm_combobox_class_initializer(Efl_Class *klass)
|
|||
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_combobox_efl_ui_widget_theme_apply),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_combobox_efl_ui_l10n_translation_update),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_combobox_efl_ui_widget_widget_input_event_handler),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_autorepeat_supported_get, _elm_combobox_efl_ui_autorepeat_autorepeat_supported_get),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_autorepeat_enabled_set, _elm_combobox_efl_ui_autorepeat_autorepeat_enabled_set),
|
||||
EFL_OBJECT_OP_FUNC(elm_obj_genlist_filter_set, _elm_combobox_elm_genlist_filter_set),
|
||||
EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_combobox_efl_access_widget_action_elm_actions_get),
|
||||
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_combobox)
|
||||
|
|
|
@ -254,10 +254,12 @@ _elm_fileselector_button_efl_canvas_group_group_del(Eo *obj, Elm_Fileselector_Bu
|
|||
efl_canvas_group_del(efl_super(obj, MY_CLASS));
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_fileselector_button_efl_ui_autorepeat_autorepeat_supported_get(const Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd EINA_UNUSED)
|
||||
EOLIAN static void
|
||||
_elm_fileselector_button_efl_ui_autorepeat_autorepeat_enabled_set(const Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd EINA_UNUSED, Eina_Bool enabled)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
if (enabled)
|
||||
ERR("You cannot enable autorepeat on this object");
|
||||
efl_ui_autorepeat_enabled_set(efl_super(obj, MY_CLASS), EINA_FALSE);
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
|
@ -273,6 +275,7 @@ _elm_fileselector_button_efl_object_constructor(Eo *obj, Elm_Fileselector_Button
|
|||
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
||||
sd->obj = obj;
|
||||
|
||||
efl_ui_autorepeat_enabled_set(obj, EINA_FALSE);
|
||||
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
||||
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
||||
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_PUSH_BUTTON);
|
||||
|
|
|
@ -681,10 +681,12 @@ _elm_hoversel_efl_gfx_entity_visible_set(Eo *obj, Elm_Hoversel_Data *sd, Eina_Bo
|
|||
efl_gfx_entity_visible_set(sd->hover, vis);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_hoversel_efl_ui_autorepeat_autorepeat_supported_get(const Eo *obj EINA_UNUSED, Elm_Hoversel_Data *sd EINA_UNUSED)
|
||||
EOLIAN static void
|
||||
_elm_hoversel_efl_ui_autorepeat_autorepeat_enabled_set(const Eo *obj EINA_UNUSED, Elm_Hoversel_Data *sd EINA_UNUSED, Eina_Bool enabled)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
if (enabled)
|
||||
ERR("You cannot enable autorepeat on this object");
|
||||
efl_ui_autorepeat_enabled_set(efl_super(obj, MY_CLASS), EINA_FALSE);
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
|
@ -698,6 +700,7 @@ EOLIAN static Eo *
|
|||
_elm_hoversel_efl_object_constructor(Eo *obj, Elm_Hoversel_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
||||
efl_ui_autorepeat_enabled_set(obj, EINA_FALSE);
|
||||
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
||||
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
||||
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_PUSH_BUTTON);
|
||||
|
|
|
@ -1283,8 +1283,6 @@ _item_new(Evas_Object *obj,
|
|||
ELM_NAVIFRAME_DATA_GET(obj, sd);
|
||||
|
||||
eo_item = efl_add(ELM_NAVIFRAME_ITEM_CLASS, obj);
|
||||
efl_access_object_role_set(eo_item, EFL_ACCESS_ROLE_PAGE_TAB);
|
||||
efl_access_object_i18n_name_set(eo_item, (char*)title_label);
|
||||
|
||||
if (!eo_item)
|
||||
{
|
||||
|
@ -1295,9 +1293,13 @@ _item_new(Evas_Object *obj,
|
|||
ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
|
||||
|
||||
//item base layout
|
||||
VIEW_SET(it, elm_layout_add(obj));
|
||||
Eo *elem = elm_layout_add(obj);
|
||||
VIEW_SET(it, elem);
|
||||
evas_object_smart_member_add(VIEW(it), obj);
|
||||
|
||||
efl_access_object_role_set(elem, EFL_ACCESS_ROLE_PAGE_TAB);
|
||||
efl_access_object_i18n_name_set(elem, (char*)title_label);
|
||||
|
||||
if (!elm_widget_sub_object_add(obj, VIEW(it)))
|
||||
ERR("could not add %p as sub object of %p", VIEW(it), obj);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ elm_code_line_indent_startswith_keyword(Elm_Code_Line *line)
|
|||
unsigned int textlen;
|
||||
|
||||
text = (char *)elm_code_line_text_get(line, &textlen);
|
||||
text = strndup(text, textlen);
|
||||
text = eina_strndup(text, textlen);
|
||||
|
||||
ret = regcomp(®ex, "^\\s*("
|
||||
"((if|else\\s*if|while|for|switch)\\s*\\(.*\\)\\s*\\{?)|"
|
||||
|
|
|
@ -68,9 +68,9 @@ EAPI void elm_code_line_split_at(Elm_Code_Line *line, unsigned int position)
|
|||
char *content;
|
||||
unsigned int length;
|
||||
|
||||
content = (char *) elm_code_line_text_get(line, &length);
|
||||
content = (char *) elm_code_line_text_get(line, &length);
|
||||
if (!content) return;
|
||||
content = strndup(content, length);
|
||||
content = eina_strndup(content, length);
|
||||
if (!content) return;
|
||||
elm_code_file_line_insert(line->file, line->number + 1, "", 0, NULL);
|
||||
newline = elm_code_file_line_get(line->file, line->number + 1);
|
||||
|
|
|
@ -104,7 +104,7 @@ elm_code_line_text_substr(Elm_Code_Line *line, unsigned int position, int length
|
|||
length = line->length - position;
|
||||
|
||||
content = elm_code_line_text_get(line, NULL);
|
||||
return strndup(content + position, length);
|
||||
return eina_strndup(content + position, length);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1439,7 +1439,7 @@ _elm_code_widget_change_create(unsigned int start_col, unsigned int start_line,
|
|||
info->end_col = end_col;
|
||||
info->end_line = end_line;
|
||||
|
||||
info->content = strndup(text, length);
|
||||
info->content = eina_strndup(text, length);
|
||||
info->length = length;
|
||||
|
||||
return info;
|
||||
|
@ -1523,7 +1523,7 @@ _elm_code_widget_newline(Elm_Code_Widget *widget)
|
|||
line = elm_code_file_line_get(code->file, row);
|
||||
}
|
||||
oldtext = (char *) elm_code_line_text_get(line, &oldlen);
|
||||
oldtext = strndup(oldtext, oldlen);
|
||||
oldtext = eina_strndup(oldtext, oldlen);
|
||||
|
||||
position = elm_code_widget_line_text_position_for_column_get(widget, line, col);
|
||||
elm_code_line_split_at(line, position);
|
||||
|
|
|
@ -33,7 +33,7 @@ _elm_code_widget_undo_info_copy(Elm_Code_Widget_Change_Info *info)
|
|||
copy = calloc(1, sizeof(*info));
|
||||
if (!copy) return NULL;
|
||||
memcpy(copy, info, sizeof(*info));
|
||||
copy->content = strndup(info->content, info->length);
|
||||
copy->content = eina_strndup(info->content, info->length);
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
|
|
@ -3314,6 +3314,7 @@ static Eina_Bool
|
|||
_elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *entry)
|
||||
{
|
||||
int len = 0;
|
||||
const char * current_text = NULL;
|
||||
|
||||
if (!entry) entry = "";
|
||||
if (!_elm_layout_part_aliasing_eval(obj, &part, EINA_TRUE))
|
||||
|
@ -3327,8 +3328,6 @@ _elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *e
|
|||
}
|
||||
|
||||
evas_event_freeze(evas_object_evas_get(obj));
|
||||
ELM_SAFE_FREE(sd->text, eina_stringshare_del);
|
||||
sd->changed = EINA_TRUE;
|
||||
|
||||
/* Clear currently pending job if there is one */
|
||||
if (sd->append_text_idler)
|
||||
|
@ -3345,6 +3344,14 @@ _elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *e
|
|||
sd->append_text_left = NULL;
|
||||
}
|
||||
|
||||
/* If old and new text are the same do nothing */
|
||||
current_text = edje_object_part_text_get(sd->entry_edje, "elm.text");
|
||||
if (current_text == entry || !strcmp(entry, current_text))
|
||||
goto done;
|
||||
|
||||
ELM_SAFE_FREE(sd->text, eina_stringshare_del);
|
||||
sd->changed = EINA_TRUE;
|
||||
|
||||
/* Need to clear the entry first */
|
||||
sd->cursor_pos = edje_object_part_text_cursor_pos_get
|
||||
(sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN);
|
||||
|
@ -3356,6 +3363,7 @@ _elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *e
|
|||
else
|
||||
_elm_entry_guide_update(obj, EINA_FALSE);
|
||||
|
||||
done:
|
||||
evas_event_thaw(evas_object_evas_get(obj));
|
||||
evas_event_thaw_eval(evas_object_evas_get(obj));
|
||||
return EINA_TRUE;
|
||||
|
|
|
@ -102,7 +102,7 @@ _elm_fileselector_button_class_initializer(Efl_Class *klass)
|
|||
EFL_OPS_DEFINE(ops,
|
||||
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_fileselector_button_efl_object_constructor),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_fileselector_button_efl_ui_widget_theme_apply),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_autorepeat_supported_get, _elm_fileselector_button_efl_ui_autorepeat_autorepeat_supported_get),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_autorepeat_enabled_set, _elm_fileselector_button_efl_ui_autorepeat_autorepeat_enabled_set),
|
||||
EFL_OBJECT_OP_FUNC(elm_interface_fileselector_selected_models_get, _elm_fileselector_button_elm_interface_fileselector_selected_models_get),
|
||||
EFL_OBJECT_OP_FUNC(elm_interface_fileselector_expandable_set, _elm_fileselector_button_elm_interface_fileselector_expandable_set),
|
||||
EFL_OBJECT_OP_FUNC(elm_interface_fileselector_expandable_get, _elm_fileselector_button_elm_interface_fileselector_expandable_get),
|
||||
|
|
|
@ -160,7 +160,7 @@ _elm_hoversel_class_initializer(Efl_Class *klass)
|
|||
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_hoversel_efl_ui_widget_theme_apply),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_hoversel_efl_ui_l10n_translation_update),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_hoversel_efl_ui_widget_widget_input_event_handler),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_autorepeat_supported_get, _elm_hoversel_efl_ui_autorepeat_autorepeat_supported_get),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_autorepeat_enabled_set, _elm_hoversel_efl_ui_autorepeat_autorepeat_enabled_set),
|
||||
EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_hoversel_efl_access_widget_action_elm_actions_get),
|
||||
EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_hoversel_efl_access_object_access_children_get),
|
||||
ELM_HOVERSEL_EXTRA_OPS
|
||||
|
|
|
@ -1022,4 +1022,13 @@ void legacy_object_focus_handle(Efl_Ui_Focus_Object *object);
|
|||
|
||||
void _efl_ui_focus_event_redirector(Efl_Ui_Focus_Object *obj, Efl_Ui_Focus_Object *goal);
|
||||
|
||||
/**
|
||||
* With this flag you can indicate that this widget is used internally.
|
||||
* Indicating that a widget is internal, can be used by the implementing widget, that the parent property of the added sub-object should not be adjusted or altered.
|
||||
* There is no direct promise that any widget behaves like the above, every case should be handchecked.
|
||||
*/
|
||||
void efl_ui_widget_internal_set(Eo *obj, Eina_Bool internal);
|
||||
Eina_Bool efl_ui_widget_internal_get(Eo *obj);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1255,14 +1255,9 @@ elm_scroller_step_size_get(const Evas_Object *obj,
|
|||
elm_interface_scrollable_step_size_get((Eo *) obj, x, y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_scroller_loop_set(Evas_Object *obj,
|
||||
Eina_Bool loop_h,
|
||||
Eina_Bool loop_v)
|
||||
EOLIAN static void
|
||||
_elm_scroller_elm_interface_scrollable_content_loop_set(Eo *obj, Elm_Scroller_Data *sd, Eina_Bool loop_h, Eina_Bool loop_v)
|
||||
{
|
||||
ELM_SCROLLABLE_CHECK(obj);
|
||||
ELM_SCROLLER_DATA_GET(obj, sd);
|
||||
|
||||
int i;
|
||||
|
||||
if (sd->loop_h == loop_h && sd->loop_v == loop_v) return;
|
||||
|
@ -1270,7 +1265,7 @@ elm_scroller_loop_set(Evas_Object *obj,
|
|||
sd->loop_h = loop_h;
|
||||
sd->loop_v = loop_v;
|
||||
|
||||
elm_interface_scrollable_content_loop_set(obj, loop_h, loop_v);
|
||||
elm_interface_scrollable_content_loop_set(efl_super(obj, MY_CLASS), loop_h, loop_v);
|
||||
|
||||
if (sd->content)
|
||||
{
|
||||
|
@ -1301,6 +1296,23 @@ elm_scroller_loop_set(Evas_Object *obj,
|
|||
elm_layout_sizing_eval(obj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_scroller_loop_set(Evas_Object *obj,
|
||||
Eina_Bool loop_h,
|
||||
Eina_Bool loop_v)
|
||||
{
|
||||
ELM_SCROLLABLE_CHECK(obj);
|
||||
|
||||
elm_interface_scrollable_content_loop_set(obj, loop_h, loop_v);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_scroller_elm_interface_scrollable_content_loop_get(Eo *obj EINA_UNUSED, Elm_Scroller_Data *sd, Eina_Bool *loop_h, Eina_Bool *loop_v)
|
||||
{
|
||||
if (loop_h) *loop_h = sd->loop_h;
|
||||
if (loop_v) *loop_v = sd->loop_v;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_scroller_loop_get(const Evas_Object *obj,
|
||||
Eina_Bool *loop_h,
|
||||
|
|
|
@ -86,6 +86,12 @@ void _elm_scroller_elm_interface_scrollable_single_direction_set(Eo *obj, Elm_Sc
|
|||
Elm_Scroller_Single_Direction _elm_scroller_elm_interface_scrollable_single_direction_get(const Eo *obj, Elm_Scroller_Data *pd);
|
||||
|
||||
|
||||
void _elm_scroller_elm_interface_scrollable_content_loop_set(Eo *obj, Elm_Scroller_Data *sd, Eina_Bool loop_h, Eina_Bool loop_v);
|
||||
|
||||
|
||||
void _elm_scroller_elm_interface_scrollable_content_loop_get(Eo *obj EINA_UNUSED, Elm_Scroller_Data *sd, Eina_Bool *loop_h, Eina_Bool *loop_v);
|
||||
|
||||
|
||||
const Efl_Access_Action_Data *_elm_scroller_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Scroller_Data *pd);
|
||||
|
||||
|
||||
|
@ -125,6 +131,8 @@ _elm_scroller_class_initializer(Efl_Class *klass)
|
|||
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_set, _elm_scroller_elm_interface_scrollable_policy_set),
|
||||
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_single_direction_set, _elm_scroller_elm_interface_scrollable_single_direction_set),
|
||||
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_single_direction_get, _elm_scroller_elm_interface_scrollable_single_direction_get),
|
||||
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_content_loop_set, _elm_scroller_elm_interface_scrollable_content_loop_set),
|
||||
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_content_loop_get, _elm_scroller_elm_interface_scrollable_content_loop_get),
|
||||
EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_scroller_efl_access_widget_action_elm_actions_get),
|
||||
EFL_OBJECT_OP_FUNC(efl_part_get, _elm_scroller_efl_part_part_get),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_state_apply, _elm_scroller_efl_ui_widget_focus_state_apply),
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue