From 3cebc7a51f1ea2d823cf98b71d8405cd2f80e7e6 Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Mon, 16 Nov 2020 16:20:50 -0300 Subject: [PATCH 01/13] Define vector-graphics agnostic efl_text_style eo class --- ...l_text_style.eo => efl_text_style_base.eo} | 48 +++++++------------ src/lib/efl/interfaces/meson.build | 10 +++- .../efl/interfaces/non-vg/efl_text_style.eo | 8 ++++ src/lib/efl/interfaces/non-vg/meson.build | 21 ++++++++ src/lib/efl/interfaces/vg/efl_text_style.eo | 21 ++++++++ src/lib/efl/interfaces/vg/meson.build | 21 ++++++++ 6 files changed, 98 insertions(+), 31 deletions(-) rename src/lib/efl/interfaces/{efl_text_style.eo => efl_text_style_base.eo} (81%) create mode 100644 src/lib/efl/interfaces/non-vg/efl_text_style.eo create mode 100644 src/lib/efl/interfaces/non-vg/meson.build create mode 100644 src/lib/efl/interfaces/vg/efl_text_style.eo create mode 100644 src/lib/efl/interfaces/vg/meson.build diff --git a/src/lib/efl/interfaces/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style_base.eo similarity index 81% rename from src/lib/efl/interfaces/efl_text_style.eo rename to src/lib/efl/interfaces/efl_text_style_base.eo index 74bcb1d2e5..8b79fcf65a 100644 --- a/src/lib/efl/interfaces/efl_text_style.eo +++ b/src/lib/efl/interfaces/efl_text_style_base.eo @@ -6,7 +6,7 @@ enum Efl.Text_Style_Background_Type ]] none = 0, [[Do not use background.]] solid_color, [[Use a solid-color rectangle as background. - Requires @Efl.Text_Style.text_background_color.]] + Requires @Efl.Text_Style_Base.text_background_color.]] } enum Efl.Text_Style_Strikethrough_Type @@ -16,7 +16,7 @@ enum Efl.Text_Style_Strikethrough_Type ]] none = 0, [[Do not use strike-through.]] single, [[Strike-through with a single line. - Requires @Efl.Text_Style.text_strikethrough_color.]] + Requires @Efl.Text_Style_Base.text_strikethrough_color.]] } enum Efl.Text_Style_Effect_Type @@ -26,25 +26,25 @@ enum Efl.Text_Style_Effect_Type ]] none = 0, [[No effect.]] shadow, [[Shadow effect. - Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + Uses @Efl.Text_Style_Base.text_shadow_color and @Efl.Text_Style_Base.text_shadow_direction.]] far_shadow, [[Far shadow effect. - Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + Uses @Efl.Text_Style_Base.text_shadow_color and @Efl.Text_Style_Base.text_shadow_direction.]] soft_shadow, [[Soft shadow effect. - Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + Uses @Efl.Text_Style_Base.text_shadow_color and @Efl.Text_Style_Base.text_shadow_direction.]] far_soft_shadow, [[Far and soft shadow effect. - Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + Uses @Efl.Text_Style_Base.text_shadow_color and @Efl.Text_Style_Base.text_shadow_direction.]] glow, [[Glow effect. - Uses @Efl.Text_Style.text_glow_color and @Efl.Text_Style.text_secondary_glow_color.]] + Uses @Efl.Text_Style_Base.text_glow_color and @Efl.Text_Style_Base.text_secondary_glow_color.]] outline, [[Outline effect. - Uses @Efl.Text_Style.text_outline_color.]] + Uses @Efl.Text_Style_Base.text_outline_color.]] soft_outline, [[Soft outline effect. - Uses @Efl.Text_Style.text_outline_color.]] + Uses @Efl.Text_Style_Base.text_outline_color.]] outline_shadow, [[Outline + shadow effect. - Uses @Efl.Text_Style.text_shadow_color, @Efl.Text_Style.text_shadow_direction and - @Efl.Text_Style.text_outline_color.]] + Uses @Efl.Text_Style_Base.text_shadow_color, @Efl.Text_Style_Base.text_shadow_direction and + @Efl.Text_Style_Base.text_outline_color.]] outline_soft_shadow, [[Outline + soft shadow effect. - Uses @Efl.Text_Style.text_shadow_color, @Efl.Text_Style.text_shadow_direction and - @Efl.Text_Style.text_outline_color.]] + Uses @Efl.Text_Style_Base.text_shadow_color, @Efl.Text_Style_Base.text_shadow_direction and + @Efl.Text_Style_Base.text_outline_color.]] } enum Efl.Text_Style_Shadow_Direction @@ -69,15 +69,15 @@ enum Efl.Text_Style_Underline_Type ]] none = 0, [[Text without underline.]] single, [[Underlined with a single line. - Requires @Efl.Text_Style.text_underline_color.]] + Requires @Efl.Text_Style_Base.text_underline_color.]] double, [[Underlined with a double line. - Requires @Efl.Text_Style.text_underline_color and @Efl.Text_Style.text_secondary_underline_color.]] + Requires @Efl.Text_Style_Base.text_underline_color and @Efl.Text_Style_Base.text_secondary_underline_color.]] dashed, [[Underlined with a dashed line. - Requires @Efl.Text_Style.text_underline_dashed_color, @Efl.Text_Style.text_underline_dashed_width and - @Efl.Text_Style.text_underline_dashed_gap.]] + Requires @Efl.Text_Style_Base.text_underline_dashed_color, @Efl.Text_Style_Base.text_underline_dashed_width and + @Efl.Text_Style_Base.text_underline_dashed_gap.]] } -interface Efl.Text_Style { +interface Efl.Text_Style_Base { [[Decorations to add to the text. Decorations include text color, glow, outline, underline, strike-through and shadows. @@ -278,17 +278,5 @@ interface Efl.Text_Style { a: ubyte; [[Alpha component.]] } } - - // @property text_gfx_filter - // { - // [[Program that applies a special filter - - // See @Efl.Gfx.Filter. - // ]] - // values - // { - // code: string; [[Filter code.]] - // } - // } } } diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index 0b1bdd4556..e6b1442790 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -28,6 +28,14 @@ foreach eo_file : pub_legacy_eo_files '-gchd', '@INPUT@']) endforeach +if get_option('ector') + eolian_include_directories += ['-I', meson.current_source_dir() / 'vg'] + subdir('vg') +else + eolian_include_directories += ['-I', meson.current_source_dir() / 'non-vg'] + subdir('non-vg') +endif + pub_eo_files = [ 'efl_playable.eo', 'efl_config.eo', @@ -41,7 +49,7 @@ pub_eo_files = [ 'efl_audio_control.eo', 'efl_text.eo', 'efl_text_font_properties.eo', - 'efl_text_style.eo', + 'efl_text_style_base.eo', 'efl_text_format.eo', 'efl_text_markup.eo', 'efl_text_markup_util.eo', diff --git a/src/lib/efl/interfaces/non-vg/efl_text_style.eo b/src/lib/efl/interfaces/non-vg/efl_text_style.eo new file mode 100644 index 0000000000..edf38de847 --- /dev/null +++ b/src/lib/efl/interfaces/non-vg/efl_text_style.eo @@ -0,0 +1,8 @@ +interface Efl.Text_Style extends Efl.Text_Style_Base { + [[Decorations to add to the text. + + Decorations include text color, glow, outline, underline, strike-through and shadows. + @since 1.24 + ]] + c_prefix: efl_text; +} diff --git a/src/lib/efl/interfaces/non-vg/meson.build b/src/lib/efl/interfaces/non-vg/meson.build new file mode 100644 index 0000000000..2ffcabcb9f --- /dev/null +++ b/src/lib/efl/interfaces/non-vg/meson.build @@ -0,0 +1,21 @@ +if get_option('ector') + subdir_done() +endif + +pub_eo_files = [ + 'efl_text_style.eo', +] + +foreach eo_file : pub_eo_files + pub_eo_file_target += custom_target('eolian_gen_' + eo_file, + input : eo_file, + output : [eo_file + '.h'], + depfile : eo_file + '.d', + install : true, + install_dir : dir_package_include / 'interfaces' / 'non-vg', + command : eolian_gen + [ '-I', meson.current_source_dir() / '..', eolian_include_directories, + '-o', 'h:' + meson.current_build_dir() / eo_file + '.h', + '-o', 'c:' + meson.current_build_dir() / eo_file + '.c', + '-o', 'd:' + meson.current_build_dir() / eo_file + '.d', + '-gchd', '@INPUT@']) +endforeach diff --git a/src/lib/efl/interfaces/vg/efl_text_style.eo b/src/lib/efl/interfaces/vg/efl_text_style.eo new file mode 100644 index 0000000000..6f63058abe --- /dev/null +++ b/src/lib/efl/interfaces/vg/efl_text_style.eo @@ -0,0 +1,21 @@ +interface Efl.Text_Style extends Efl.Text_Style_Base { + [[Decorations to add to the text. + + Decorations include text color, glow, outline, underline, strike-through and shadows. + @since 1.24 + ]] + c_prefix: efl_text; + methods { + @property text_gfx_filter + { + [[Program that applies a special filter + + See @Efl.Gfx.Filter. + ]] + values + { + code: string; [[Filter code.]] + } + } + } +} diff --git a/src/lib/efl/interfaces/vg/meson.build b/src/lib/efl/interfaces/vg/meson.build new file mode 100644 index 0000000000..2ef69c04bd --- /dev/null +++ b/src/lib/efl/interfaces/vg/meson.build @@ -0,0 +1,21 @@ +if not get_option('ector') + subdir_done() +endif + +pub_eo_files = [ + 'efl_text_style.eo', +] + +foreach eo_file : pub_eo_files + pub_eo_file_target += custom_target('eolian_gen_' + eo_file, + input : eo_file, + output : [eo_file + '.h'], + depfile : eo_file + '.d', + install : true, + install_dir : dir_package_include / 'interfaces' / 'vg', + command : eolian_gen + [ '-I', meson.current_source_dir() / '..', eolian_include_directories, + '-o', 'h:' + meson.current_build_dir() / eo_file + '.h', + '-o', 'c:' + meson.current_build_dir() / eo_file + '.c', + '-o', 'd:' + meson.current_build_dir() / eo_file + '.d', + '-gchd', '@INPUT@']) +endforeach From 77cb6611f250221e60b6e35959e115f15b15edd0 Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Tue, 17 Nov 2020 13:40:17 -0300 Subject: [PATCH 02/13] Efl: Use cp to define when to use efl_text_style.eo with vector graphics support --- ...text_style.eo => efl_text_style_non_vg.eo} | 0 ...efl_text_style.eo => efl_text_style_vg.eo} | 0 src/lib/efl/interfaces/meson.build | 7 +++---- src/lib/efl/interfaces/non-vg/meson.build | 21 ------------------- src/lib/efl/interfaces/vg/meson.build | 21 ------------------- 5 files changed, 3 insertions(+), 46 deletions(-) rename src/lib/efl/interfaces/{non-vg/efl_text_style.eo => efl_text_style_non_vg.eo} (100%) rename src/lib/efl/interfaces/{vg/efl_text_style.eo => efl_text_style_vg.eo} (100%) delete mode 100644 src/lib/efl/interfaces/non-vg/meson.build delete mode 100644 src/lib/efl/interfaces/vg/meson.build diff --git a/src/lib/efl/interfaces/non-vg/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style_non_vg.eo similarity index 100% rename from src/lib/efl/interfaces/non-vg/efl_text_style.eo rename to src/lib/efl/interfaces/efl_text_style_non_vg.eo diff --git a/src/lib/efl/interfaces/vg/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style_vg.eo similarity index 100% rename from src/lib/efl/interfaces/vg/efl_text_style.eo rename to src/lib/efl/interfaces/efl_text_style_vg.eo diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index e6b1442790..d64a3134d8 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -29,11 +29,9 @@ foreach eo_file : pub_legacy_eo_files endforeach if get_option('ector') - eolian_include_directories += ['-I', meson.current_source_dir() / 'vg'] - subdir('vg') + run_command('cp', ['efl_text_style_vg.eo', 'efl_text_style.eo']) else - eolian_include_directories += ['-I', meson.current_source_dir() / 'non-vg'] - subdir('non-vg') + run_command('cp', ['efl_text_style_non_vg.eo', 'efl_text_style.eo']) endif pub_eo_files = [ @@ -50,6 +48,7 @@ pub_eo_files = [ 'efl_text.eo', 'efl_text_font_properties.eo', 'efl_text_style_base.eo', + 'efl_text_style.eo', 'efl_text_format.eo', 'efl_text_markup.eo', 'efl_text_markup_util.eo', diff --git a/src/lib/efl/interfaces/non-vg/meson.build b/src/lib/efl/interfaces/non-vg/meson.build deleted file mode 100644 index 2ffcabcb9f..0000000000 --- a/src/lib/efl/interfaces/non-vg/meson.build +++ /dev/null @@ -1,21 +0,0 @@ -if get_option('ector') - subdir_done() -endif - -pub_eo_files = [ - 'efl_text_style.eo', -] - -foreach eo_file : pub_eo_files - pub_eo_file_target += custom_target('eolian_gen_' + eo_file, - input : eo_file, - output : [eo_file + '.h'], - depfile : eo_file + '.d', - install : true, - install_dir : dir_package_include / 'interfaces' / 'non-vg', - command : eolian_gen + [ '-I', meson.current_source_dir() / '..', eolian_include_directories, - '-o', 'h:' + meson.current_build_dir() / eo_file + '.h', - '-o', 'c:' + meson.current_build_dir() / eo_file + '.c', - '-o', 'd:' + meson.current_build_dir() / eo_file + '.d', - '-gchd', '@INPUT@']) -endforeach diff --git a/src/lib/efl/interfaces/vg/meson.build b/src/lib/efl/interfaces/vg/meson.build deleted file mode 100644 index 2ef69c04bd..0000000000 --- a/src/lib/efl/interfaces/vg/meson.build +++ /dev/null @@ -1,21 +0,0 @@ -if not get_option('ector') - subdir_done() -endif - -pub_eo_files = [ - 'efl_text_style.eo', -] - -foreach eo_file : pub_eo_files - pub_eo_file_target += custom_target('eolian_gen_' + eo_file, - input : eo_file, - output : [eo_file + '.h'], - depfile : eo_file + '.d', - install : true, - install_dir : dir_package_include / 'interfaces' / 'vg', - command : eolian_gen + [ '-I', meson.current_source_dir() / '..', eolian_include_directories, - '-o', 'h:' + meson.current_build_dir() / eo_file + '.h', - '-o', 'c:' + meson.current_build_dir() / eo_file + '.c', - '-o', 'd:' + meson.current_build_dir() / eo_file + '.d', - '-gchd', '@INPUT@']) -endforeach From 581199ff6ba43241d14a4e33f0c4e4afd2ff7e5c Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Tue, 17 Nov 2020 17:03:37 -0300 Subject: [PATCH 03/13] Efl: Use meson configure_file to generate efl_text_style.eo --- src/lib/efl/Efl.h | 1 + src/lib/efl/interfaces/meson.build | 33 ++++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 480249fae5..6e171e0506 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -211,6 +211,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; /* Text interfaces */ #include "interfaces/efl_text_font_properties.eo.h" +#include "interfaces/efl_text_style_base.eo.h" #include "interfaces/efl_text_style.eo.h" #include "interfaces/efl_text_format.eo.h" #include "interfaces/efl_text_markup.eo.h" diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index d64a3134d8..71e67d81ef 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -29,11 +29,36 @@ foreach eo_file : pub_legacy_eo_files endforeach if get_option('ector') - run_command('cp', ['efl_text_style_vg.eo', 'efl_text_style.eo']) + configure_file( + input : 'efl_text_style_vg.eo', + output : 'efl_text_style.eo', + configuration : configuration_data() + ) else - run_command('cp', ['efl_text_style_non_vg.eo', 'efl_text_style.eo']) + configure_file( + input : 'efl_text_style_non_vg.eo', + output : 'efl_text_style.eo', + configuration : configuration_data() + ) endif +eo_file = 'efl_text_style.eo' +pub_eo_file_text_style = [meson.current_build_dir() / eo_file] +pub_eo_file_target += custom_target('eolian_gen_' + eo_file, + input : meson.current_build_dir() / eo_file, + output : [eo_file + '.h'], + depfile : eo_file + '.d', + install : true, + install_dir : join_paths(dir_package_include, 'interfaces'), + command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories, + '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), + '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), + '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'), + '-gchd', '@INPUT@']) + + +eolian_include_directories += ['-I', meson.current_build_dir()] + pub_eo_files = [ 'efl_playable.eo', 'efl_config.eo', @@ -48,7 +73,6 @@ pub_eo_files = [ 'efl_text.eo', 'efl_text_font_properties.eo', 'efl_text_style_base.eo', - 'efl_text_style.eo', 'efl_text_format.eo', 'efl_text_markup.eo', 'efl_text_markup_util.eo', @@ -140,7 +164,8 @@ foreach eo_file : pub_eo_types_files endforeach if get_option('install-eo-files') - install_data(pub_eo_files + pub_legacy_eo_files + pub_eo_types_files, + install_data(pub_eo_files + pub_legacy_eo_files + pub_eo_types_files + + pub_eo_file_text_style, install_dir: join_paths(eolian_include_dir, package_version_name) ) endif From 01448611a975e43029f7d78fe475016cc64a55a6 Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Tue, 17 Nov 2020 17:17:42 -0300 Subject: [PATCH 04/13] Efl: Use copy instead of configure_data to generate efl_text_style.eo --- src/lib/efl/interfaces/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index 71e67d81ef..fd7a013fdd 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -32,13 +32,13 @@ if get_option('ector') configure_file( input : 'efl_text_style_vg.eo', output : 'efl_text_style.eo', - configuration : configuration_data() + copy : true, ) else configure_file( input : 'efl_text_style_non_vg.eo', output : 'efl_text_style.eo', - configuration : configuration_data() + copy : true, ) endif From 03d536b0cb662d8435a39e616231e9eab19b3869 Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Wed, 18 Nov 2020 16:38:09 -0300 Subject: [PATCH 05/13] Evas: Use inherency and generated files for the use of ector filters This creates `_base` class to `evas` `eo` classes that use/need filter `ector`'s filter functionalities. When `ector` is enabled `_vg` classes inherite from `_base` and define the same filter functions as originaly intended and used to generate the original class. When `ector` is desanabled`_non_vg` just inherite from `_base` and is used to generate the original class. --- src/lib/efl/interfaces/meson.build | 3 + ...nvas_group.eo => efl_canvas_group_base.eo} | 2 +- .../evas/canvas/efl_canvas_group_non_vg.eo | 14 + src/lib/evas/canvas/efl_canvas_group_vg.eo | 17 ++ ...l.eo => efl_canvas_image_internal_base.eo} | 2 +- .../efl_canvas_image_internal_non_vg.eo | 4 + .../canvas/efl_canvas_image_internal_vg.eo | 11 + ...tblock.eo => efl_canvas_textblock_base.eo} | 4 +- .../canvas/efl_canvas_textblock_non_vg.eo | 12 + .../evas/canvas/efl_canvas_textblock_vg.eo | 274 ++++++++++++++++++ src/lib/evas/canvas/meson.build | 44 ++- 11 files changed, 380 insertions(+), 7 deletions(-) rename src/lib/evas/canvas/{efl_canvas_group.eo => efl_canvas_group_base.eo} (98%) create mode 100644 src/lib/evas/canvas/efl_canvas_group_non_vg.eo create mode 100644 src/lib/evas/canvas/efl_canvas_group_vg.eo rename src/lib/evas/canvas/{efl_canvas_image_internal.eo => efl_canvas_image_internal_base.eo} (93%) create mode 100644 src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo create mode 100644 src/lib/evas/canvas/efl_canvas_image_internal_vg.eo rename src/lib/evas/canvas/{efl_canvas_textblock.eo => efl_canvas_textblock_base.eo} (99%) create mode 100644 src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo create mode 100644 src/lib/evas/canvas/efl_canvas_textblock_vg.eo diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index fd7a013fdd..651e5c1422 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -1,5 +1,8 @@ eolian_include_directories += ['-I', join_paths(meson.source_root(), 'src', 'lib')] +# for evas/cavas +eolian_include_directories += ['-I', meson.build_root() / 'src' / 'lib'] + pub_legacy_eo_files = [ 'efl_gfx_fill.eo', 'efl_gfx_entity.eo', diff --git a/src/lib/evas/canvas/efl_canvas_group.eo b/src/lib/evas/canvas/efl_canvas_group_base.eo similarity index 98% rename from src/lib/evas/canvas/efl_canvas_group.eo rename to src/lib/evas/canvas/efl_canvas_group_base.eo index 030e2e0122..df6f4d28a4 100644 --- a/src/lib/evas/canvas/efl_canvas_group.eo +++ b/src/lib/evas/canvas/efl_canvas_group_base.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Group extends Efl.Canvas.Object +class Efl.Canvas.Group_Base extends Efl.Canvas.Object { [[A group object is a container for other canvas objects. Its children move along their parent and are often clipped with a common clipper. diff --git a/src/lib/evas/canvas/efl_canvas_group_non_vg.eo b/src/lib/evas/canvas/efl_canvas_group_non_vg.eo new file mode 100644 index 0000000000..ea50b20b7b --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_group_non_vg.eo @@ -0,0 +1,14 @@ +class Efl.Canvas.Group extends Efl.Canvas.Group_Base +{ + [[A group object is a container for other canvas objects. Its children + move along their parent and are often clipped with a common clipper. + This is part of the legacy smart object concept. + + A group is not necessarily a container (see @Efl.Container) in the + sense that a standard widget may not have any empty slots for content. + However it's still a group of low-level canvas objects (clipper, raw objects, + etc.). + + @since 1.22 + ]] +} diff --git a/src/lib/evas/canvas/efl_canvas_group_vg.eo b/src/lib/evas/canvas/efl_canvas_group_vg.eo new file mode 100644 index 0000000000..9c8f4e3dd7 --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_group_vg.eo @@ -0,0 +1,17 @@ +class Efl.Canvas.Group extends Efl.Canvas.Group_Base implements Efl.Gfx.Filter +{ + [[A group object is a container for other canvas objects. Its children + move along their parent and are often clipped with a common clipper. + This is part of the legacy smart object concept. + + A group is not necessarily a container (see @Efl.Container) in the + sense that a standard widget may not have any empty slots for content. + However it's still a group of low-level canvas objects (clipper, raw objects, + etc.). + + @since 1.22 + ]] + implements { + Efl.Gfx.Filter.filter_program { set; } + } +} diff --git a/src/lib/evas/canvas/efl_canvas_image_internal.eo b/src/lib/evas/canvas/efl_canvas_image_internal_base.eo similarity index 93% rename from src/lib/evas/canvas/efl_canvas_image_internal.eo rename to src/lib/evas/canvas/efl_canvas_image_internal_base.eo index 46c88d3f0a..d4a995a6fb 100644 --- a/src/lib/evas/canvas/efl_canvas_image_internal.eo +++ b/src/lib/evas/canvas/efl_canvas_image_internal_base.eo @@ -1,4 +1,4 @@ -abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements +abstract @beta Efl.Canvas.Image_Internal_Base extends Efl.Canvas.Object implements Efl.Gfx.Image, Efl.Gfx.Buffer, Efl.Gfx.Fill, Efl.Gfx.View, Efl.Gfx.Image_Orientable, Efl.File_Save diff --git a/src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo b/src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo new file mode 100644 index 0000000000..87c88e795b --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo @@ -0,0 +1,4 @@ +abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Image_Internal_Base +{ + [[Efl canvas internal image class]] +} diff --git a/src/lib/evas/canvas/efl_canvas_image_internal_vg.eo b/src/lib/evas/canvas/efl_canvas_image_internal_vg.eo new file mode 100644 index 0000000000..2d549ef7f2 --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_image_internal_vg.eo @@ -0,0 +1,11 @@ +abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Image_Internal_Base implements Efl.Canvas.Filter.Internal +{ + [[Efl canvas internal image class]] + implements { + Efl.Gfx.Filter.filter_program { set; } + Efl.Canvas.Filter.Internal.filter_dirty; + Efl.Canvas.Filter.Internal.filter_input_alpha; + Efl.Canvas.Filter.Internal.filter_input_render; + Efl.Canvas.Filter.Internal.filter_state_prepare; + } +} diff --git a/src/lib/evas/canvas/efl_canvas_textblock.eo b/src/lib/evas/canvas/efl_canvas_textblock_base.eo similarity index 99% rename from src/lib/evas/canvas/efl_canvas_textblock.eo rename to src/lib/evas/canvas/efl_canvas_textblock_base.eo index 51c24e1814..71211bbf73 100644 --- a/src/lib/evas/canvas/efl_canvas_textblock.eo +++ b/src/lib/evas/canvas/efl_canvas_textblock_base.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, +class Efl.Canvas.Textblock_Base extends Efl.Canvas.Object implements Efl.Text, Efl.Text_Font_Properties, Efl.Text_Style, Efl.Text_Format, Efl.Text_Markup, Efl.Ui.I18n @@ -242,7 +242,7 @@ class Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, $far_shadow, $soft_shadow and $far_soft_shadow. Default value is $none. Requires either $shadow_color, $glow_color or $outline_color. - See @Efl.Text_Style.text_effect_type + See @Efl.Text_Style.text_effect_type - $shadow_direction: Indicate the shadow direction. Valid positions are $bottom_right, $bottom, $bottom_left, $left, $top_left, $top, $top_right and $right. diff --git a/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo b/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo new file mode 100644 index 0000000000..139ce703eb --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo @@ -0,0 +1,12 @@ +class Efl.Canvas.Textblock extends Efl.Canvas.Textblock_Base { + [[This is the Canvas-level text class. This class only takes care of rendering text, + if you need user interaction consider the classes in $[Efl.Ui]. + + Note: No text will be rendered until a font, a font size and a font color are specified. + This can be accomplished using @Efl.Text_Font_Properties.font_family, @Efl.Text_Font_Properties.font_size and + @Efl.Text_Style.text_color. + Alternatively, @.style_apply can be used providing the attributes $font, $font_size and $color. + + @since 1.24 + ]] +} diff --git a/src/lib/evas/canvas/efl_canvas_textblock_vg.eo b/src/lib/evas/canvas/efl_canvas_textblock_vg.eo new file mode 100644 index 0000000000..e923532515 --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_textblock_vg.eo @@ -0,0 +1,274 @@ +class Efl.Canvas.Textblock extends Efl.Canvas.Textblock_Base implements Efl.Canvas.Filter.Internal +{ + [[This is the Canvas-level text class. This class only takes care of rendering text, + if you need user interaction consider the classes in $[Efl.Ui]. + + Note: No text will be rendered until a font, a font size and a font color are specified. + This can be accomplished using @Efl.Text_Font_Properties.font_family, @Efl.Text_Font_Properties.font_size and + @Efl.Text_Style.text_color. + Alternatively, @.style_apply can be used providing the attributes $font, $font_size and $color. + + @since 1.24 + ]] + methods { + style_apply { + [[Applies several style attributes at once using a formatting string. + Given style attributes override previous values, leaving other attributes unaffected. + This is akin to setting individual style attributes using properties like + @Efl.Text_Font_Properties.font_slant or @Efl.Text_Format.wrap, for example. + + The formatting string is a whitespace-separated list of $[attribute=value] pairs. + + The following attributes are accepted: + + - $font: Name of the font to use. + Default value is empty, meaning that no text will be rendered. + Requires $font_size and $font_color. + See @Efl.Text_Font_Properties.font_family. + + - $font_fallbacks: Comma-delimited list of fonts to try if finding the primary font fails. + Example: $[font_fallbacks=consolas,courier,monospace]. + Default value is empty. + See @Efl.Text_Font_Properties.font_fallbacks. + + - $font_size: Height of font, in points. + Default value is 0. + Requires $font and $font_color. + See @Efl.Text_Font_Properties.font_size. + + - $font_source: Path to the file containing the font to use. + Example: $[font_source=/usr/share/fonts/Sans.ttf]. + Default value is empty. + See @Efl.Text_Font_Properties.font_source. + + - $font_weight: Thickness of the font. The value must be one of: $normal, $thin, $ultralight, $extralight, + $light, $book, $medium, $semibold, $bold, $ultrabold, $extrabold, $black and $extrablack. + Default value is $normal. + See @Efl.Text_Font_Properties.font_weight. + + - $font_style: Style of the font. The value must be one of: $normal, $oblique and $italic. + Default value is $normal. + See @Efl.Text_Font_Properties.font_slant. + + - $font_width: How wide the font is, relative to its height. The value must be one of: + $normal, $ultracondensed, $extracondensed, $condensed, $semicondensed, $semiexpanded, $expanded, + $extraexpanded and $ultraexpanded. + Default value is $normal. + See @Efl.Text_Font_Properties.font_weight. + + - $lang: A 2-letter ISO 639-1 language code, $auto (to use the system locale setting) or $none (to disable + language support). + Example: $[lang=he]. + Default value is empty. + See @Efl.Text_Font_Properties.font_lang. + + - $color: Color code for the text (See bottom for the complete list of supported codes). + Default value is $[rgba(0,0,0,0)] meaning that no text will be rendered. + Requires $font and $font_size. + See @Efl.Text_Style.text_color. + + - $underline_color: Color code for the text underline (See bottom for the complete list of supported codes). + Default value is $[rgba(0,0,0,0)] meaning that no underline will be rendered. + Requires $underline_type. + See @Efl.Text_Style.text_underline_color. + + - $secondary_underline_color: Color code for the secondary text underline (See bottom for the complete list + of supported codes). Only valid when $[underline_type=double]. + Default value is $[rgba(0,0,0,0)] meaning that secondary underline will not be rendered. + See @Efl.Text_Style.text_secondary_underline_color. + + - $underline_dashed_color: Color code for the dashed underline (See bottom for the complete list of supported + codes). Only valid when $[underline_type=dashed]. + Default value is $[rgba(0,0,0,0)] meaning that dashed underline will not be rendered. + See @Efl.Text_Style.text_underline_dashed_color. + + - $outline_color: Color code for the text outline (See bottom for the complete list of supported codes). + Only valid when the $effect_type attribute includes an outline. + Default value is $[rgba(0,0,0,0)] meaning that no outline will be rendered. + See @Efl.Text_Style.text_outline_color. + + - $shadow_color: Color code for the text shadow (See bottom for the complete list of supported codes). + Only valid when the $effect_type attribute includes a shadow. + Default value is $[rgba(0,0,0,0)] meaning that no shadow will be rendered. + See @Efl.Text_Style.text_shadow_color. + + - $glow_color: Color code for the glow component of the text (See bottom for the complete list of supported + codes). Only valid when the $effect_type attribute includes a glow. + Default value is $[rgba(0,0,0,0)] meaning that no glow will be rendered. + See @Efl.Text_Style.text_glow_color. + + - $secondary_glow_color: Color code for the secondary (inner) glow component of the text (See bottom for + the complete list of supported codes). Only valid when the $effect_type attribute includes a glow. + Default value is $[rgba(0,0,0,0)] meaning that only the primary $glow_color will be used. + See @Efl.Text_Style.text_secondary_glow_color. + + - $background_color: Color code for the background of the text (See bottom for the complete list of supported + codes). Use a fully transparent color to disable the background. + Default value is $[rgba(0,0,0,0)] meaning that no background will be rendered. + Requires $background_type. + See @Efl.Text_Style.text_background_color. + + - $strikethrough_color: Color code for the line striking through the text (See bottom for the complete list + of supported codes). Only valid when $[strikethrough_type=single] + Default value is $[rgba(0,0,0,0)] meaning that no strike-through line will be rendered. + See @Efl.Text_Style.text_strikethrough_color. + + - $align: Horizontal alignment of the text. The value can either be a decimal number ($[0.0] means "left" + and $[1.0] means "right"), a percentage ($[0%] means "left" and $[100%] means "right") or one of: + $auto (Respects LTR/RTL settings), $locale (Respects language direction settings), $center + (Centers the text in the line), $middle (Alias for $center), $left (Puts the text at the left of the line), + $right (Puts the text at the right of the line), $start (Alias for $auto), $end (Puts the text at the + opposite side of LTR/RTL settings). + Default value is $auto. + See @Efl.Text_Format.text_horizontal_align. + + - $valign: Vertical alignment of the text. The value can either be a decimal number ($[0.0] means "top" + and $[1.0] means "bottom"), a percentage ($[0%] means "top" and $[100%] means "bottom") or one of: + $top (Puts the text at the top of the text box), $center (Puts the text at the middle of the text box), + $middle (Alias for $center), $bottom (Puts the text at the bottom of the text box), + $baseline (Puts the text's baseline at the middle of the text box), $base (Alias for $baseline). + Default value is $baseline. + See @Efl.Text_Format.text_vertical_align. + + - $wrap: Wrapping policy of the text. The value must be one of the following: $word (Only wraps lines at + word boundaries), $char (Wraps at any character), $mixed (Wraps at word boundaries if possible, + at any character if not), $hyphenation (Hyphenate if possible, otherwise try wrapping at word boundaries + or at any character) or $none to disable wrapping. + Default value is $none. + See @Efl.Text_Format.wrap. + + - $left_margin: Distance in pixels from the left side of the text block to the beginning of the text + (inner margin). The value can be a number (to set the margin), or a number preceded by $[+] or $[-] + to increment or decrement the existing margin value. $reset is also accepted, to set the margin to + 0 pixels. + Default value is $[0]. + Examples: $[left_margin=10], $[left_margin=+10], $[left_margin=reset]. + + - $right_margin: Distance in pixels from the right side of the text block to the beginning of the text + (inner margin). The value can be a number (to set the margin), or a number preceded by $[+] or $[-] + to increment or decrement the existing margin value. $reset is also accepted, to set the margin to + 0 pixels. + Default value is $[0]. + Examples: $[right_margin=10], $[right_margin=+10], $[right_margin=reset]. + + - $underline_type: Style of the underline. The value must be one of $none (No underlining), + $single (A single line under the text) , $double (Two lines under the text), + $dashed (A dashed line under the text). + Default value is $none. + Requires either $underline_color, $secondary_underline_color or $underline_dashed_color. + See @Efl.Text_Style.text_underline_type. + + - $strikethrough_type: Enables crossed-out text. Possible values are $single and $none. + Default value is $none. + Requires $strikethrough_color. + See @Efl.Text_Style.text_strikethrough_type. + + - $background_type: Enables background color for the text. Possible values are $solid and $none. + Default value is $none. + Requires $background_color. + See @Efl.Text_Style.text_background_type. + + - $effect_type: Controls a number of decorations around the text, like shadow, outline and glow, including + combinations of them. Possible values are $none (No decoration), + $shadow, $outline, $soft_outline, $outline_shadow, $outline_soft_shadow, $glow (alias for $soft_outline), + $far_shadow, $soft_shadow and $far_soft_shadow. + Default value is $none. + Requires either $shadow_color, $glow_color or $outline_color. + See @Efl.Text_Style.text_effect_type + + - $shadow_direction: Indicate the shadow direction. Valid positions are $bottom_right, $bottom, $bottom_left, $left, $top_left, $top, $top_right + and $right. + Requires either $effect_type. + See @Efl.Text_Style.text_shadow_direction. + + - $tab_stops: Size (in pixels) of the tab character. The value must be a number greater than one. + Default value is $[32]. + See @Efl.Text_Format.tab_stops. + + - $line_size: Distance (in pixels) from the baseline of one line of text to the next. This is, a value of + $[0] would render all lines on top of each other (However, this value will be ignored if it results in + overlapping lines of text). + Setting this value sets $line_rel_size to $[0%] (disables it). + Default value is $[0]. + + - $line_rel_size: Distance (in percentage over the natural line height) from the baseline of one line of + text to the next. A value of $[100%] does not have any impact, smaller values render lines closer together + and bigger values render them further apart. + Setting this value sets $line_size to $[0] (disables it). + Default value is $[0%]. + + - $line_gap: Additional empty space (in pixels) between the bottom of one line of text and the top of the + next. Setting this value sets $line_rel_gap to $[0%] (disables it). + Default value is $[0]. + See @Efl.Text_Format.line_gap. + + - $line_rel_gap: Additional empty space (in percentage over the natural line height) between the bottom of + one line of text and the top of the next. + Setting this value sets $line_gap to $[0] (disables it). + Default value is $[0%]. + See @Efl.Text_Format.line_rel_gap. + + - $line_fill: An alternate way to specify the $line_size as a percentage of the canvas height. + A value of $[100%] means that a single line fills the canvas, whereas $[25%] means that 4 lines + fit in the same height. + When both $line_fill and $line_size are specified the one resulting in the smallest line size is used. + Default value is $[0]. + + - $ellipsis: Controls automatic addition of ellipsis "..." to replace text which cannot be shown. + The value must be a number indicating the position of the ellipsis inside the visible text. + $[0.0] means the beginning of the text, $[1.0] means the end of the text, and values in between + mean the proportional position inside the text. + Any value smaller than 0 or greater than 1 disables ellipsis. + Default value is $[-1]. + Examples: $[ellipsis=0.5 + See @Efl.Text_Format.ellipsis. + + - $password: Enabling this causes all characters to be replaced by $replacement_char. + This is useful for password input boxes. + Value must be either $on or $off. + Default value is $[off]. + Requires $replacement_char. + See @Efl.Text_Format.password. + + - $replacement_char: Character to use instead of the actual characters when $password is $on. + Default value is empty, meaning that no replacement will take place. + Requires $password. + Examples: $[replacement_char=*]. + See @Efl.Text_Format.replacement_char. + + - $underline_dashed_width: Length (in pixels) of the dashes when $underline_type is $dashed. + Default value is $[6]. + See @Efl.Text_Style.text_underline_dashed_width. + + - $underline_dashed_gap: Length (in pixels) of the gaps between the dashes when $underline_type is $dashed. + Default value is $[2]. + See @Efl.Text_Style.text_underline_dashed_gap. + + - $underline_height: Width (in pixels) of the single underline when $underline_type is $single. + Default value is $[1]. + See @Efl.Text_Style.text_underline_height. + + - $gfx_filter: Experimental filter name. See @Efl.Gfx.Filter for more information. + + Color codes: Colors can be specified using any of the following formats: + $[#RRGGBB], $[#RRGGBBAA], $[#RGB], $[#RGBA], $[rgb(r,g,b)], $[rgba(r,g,b,a)]. + Additionally, X11 color names like $red or $blanchedalmond can be used. + See https://en.wikipedia.org/wiki/X11_color_names for the full list. + ]] + + params { + @in style: string; [[A whitespace-separated list of $[attribute=value] pairs, for example, + $[font=sans font_size=30 color=white].]] + } + } + } + implements { + Efl.Gfx.Filter.filter_program { get; set; } + Efl.Gfx.Filter.filter_data { get; set; } + Efl.Gfx.Filter.filter_source { get; set; } + Efl.Canvas.Filter.Internal.filter_dirty; + Efl.Canvas.Filter.Internal.filter_input_render; + Efl.Canvas.Filter.Internal.filter_state_prepare; + Efl.Text_Style.text_gfx_filter { get; set; } + } +} diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build index 39b3498a46..aa6be29c9c 100644 --- a/src/lib/evas/canvas/meson.build +++ b/src/lib/evas/canvas/meson.build @@ -1,7 +1,44 @@ +pub_eo_files_optional_ector = [ + ['efl_canvas_group.eo', 'efl_canvas_group_vg.eo', 'efl_canvas_group_non_vg.eo'], + ['efl_canvas_image_internal.eo', 'efl_canvas_image_internal_vg.eo', 'efl_canvas_image_internal_non_vg.eo'], + ['efl_canvas_textblock.eo', 'efl_canvas_textblock_vg.eo', 'efl_canvas_textblock_non_vg.eo'], +] + +foreach eo_file : pub_eo_files_optional_ector + if get_option('ector') + in_eo = eo_file[1] + else + in_eo = eo_file[2] + endif + eo_file = eo_file[0] + + warning(eo_file) + configure_file( + input : in_eo, + output : eo_file, + copy: true, + ) + + priv_eo_file_target += custom_target('eolian_gen_' + eo_file, + input : meson.current_build_dir() / eo_file, + output : [eo_file + '.h'], + depfile : eo_file + '.d', + command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories, + '-o', 'h:' + meson.current_build_dir() / eo_file + '.h', + '-o', 'c:' + meson.current_build_dir() / eo_file + '.c', + '-o', 'd:' + meson.current_build_dir() / eo_file + '.d', + '-gchd', '@INPUT@']) +endforeach + +foreach eo_file_list : pub_eo_files_optional_ector + pub_evas_eo_files += files(meson.current_build_dir()/eo_file_list[0]) +endforeach + +eolian_include_directories += ['-I', meson.current_build_dir()] pub_eo_files = [ 'efl_canvas_polygon.eo', - 'efl_canvas_image_internal.eo', + 'efl_canvas_image_internal_base.eo', 'efl_canvas_image.eo', 'efl_canvas_snapshot.eo', 'efl_canvas_proxy.eo', @@ -27,11 +64,11 @@ pub_eo_files = [ 'efl_canvas_textblock_factory.eo', 'efl_canvas_rectangle.eo', 'efl_canvas_object.eo', - 'efl_canvas_group.eo', + 'efl_canvas_group_base.eo', 'efl_gfx_mapping.eo', 'efl_canvas_event_grabber.eo', 'efl_text_cursor_object.eo', - 'efl_canvas_textblock.eo', + 'efl_canvas_textblock_base.eo', 'efl_text_formatter.eo', 'efl_canvas_object_animation.eo', ] @@ -70,6 +107,7 @@ foreach eo_file : priv_eo_files '-gchd', '@INPUT@']) endforeach + evas_canvas_eo_files = pub_eo_files pub_evas_eo_files += files(pub_eo_files) From 17d273e97a55f5ad336f388784bb00f9aa48b754 Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Wed, 18 Nov 2020 17:51:57 -0300 Subject: [PATCH 06/13] Remove inheritance, instead have the end files --- src/lib/efl/Efl.h | 1 - src/lib/efl/interfaces/efl_text_style_base.eo | 282 ---------- .../efl/interfaces/efl_text_style_non_vg.eo | 276 +++++++++- src/lib/efl/interfaces/efl_text_style_vg.eo | 275 +++++++++- src/lib/efl/interfaces/meson.build | 1 - src/lib/evas/canvas/efl_canvas_group_base.eo | 135 ----- .../evas/canvas/efl_canvas_group_non_vg.eo | 123 ++++- src/lib/evas/canvas/efl_canvas_group_vg.eo | 121 ++++- .../canvas/efl_canvas_image_internal_base.eo | 33 -- .../efl_canvas_image_internal_non_vg.eo | 31 +- .../canvas/efl_canvas_image_internal_vg.eo | 29 +- .../evas/canvas/efl_canvas_textblock_base.eo | 496 ------------------ .../canvas/efl_canvas_textblock_non_vg.eo | 488 ++++++++++++++++- .../evas/canvas/efl_canvas_textblock_vg.eo | 233 +++++++- src/lib/evas/canvas/meson.build | 3 - 15 files changed, 1568 insertions(+), 959 deletions(-) delete mode 100644 src/lib/efl/interfaces/efl_text_style_base.eo delete mode 100644 src/lib/evas/canvas/efl_canvas_group_base.eo delete mode 100644 src/lib/evas/canvas/efl_canvas_image_internal_base.eo delete mode 100644 src/lib/evas/canvas/efl_canvas_textblock_base.eo diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 6e171e0506..480249fae5 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -211,7 +211,6 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; /* Text interfaces */ #include "interfaces/efl_text_font_properties.eo.h" -#include "interfaces/efl_text_style_base.eo.h" #include "interfaces/efl_text_style.eo.h" #include "interfaces/efl_text_format.eo.h" #include "interfaces/efl_text_markup.eo.h" diff --git a/src/lib/efl/interfaces/efl_text_style_base.eo b/src/lib/efl/interfaces/efl_text_style_base.eo deleted file mode 100644 index 8b79fcf65a..0000000000 --- a/src/lib/efl/interfaces/efl_text_style_base.eo +++ /dev/null @@ -1,282 +0,0 @@ -enum Efl.Text_Style_Background_Type -{ - [[Type of background to use behind each line of text. - - @since 1.24 - ]] - none = 0, [[Do not use background.]] - solid_color, [[Use a solid-color rectangle as background. - Requires @Efl.Text_Style_Base.text_background_color.]] -} - -enum Efl.Text_Style_Strikethrough_Type -{ - [[Whether to add a strike-through decoration to the displayed text or not. - @since 1.24 - ]] - none = 0, [[Do not use strike-through.]] - single, [[Strike-through with a single line. - Requires @Efl.Text_Style_Base.text_strikethrough_color.]] -} - -enum Efl.Text_Style_Effect_Type -{ - [[Effect to apply to the displayed text. - @since 1.24 - ]] - none = 0, [[No effect.]] - shadow, [[Shadow effect. - Uses @Efl.Text_Style_Base.text_shadow_color and @Efl.Text_Style_Base.text_shadow_direction.]] - far_shadow, [[Far shadow effect. - Uses @Efl.Text_Style_Base.text_shadow_color and @Efl.Text_Style_Base.text_shadow_direction.]] - soft_shadow, [[Soft shadow effect. - Uses @Efl.Text_Style_Base.text_shadow_color and @Efl.Text_Style_Base.text_shadow_direction.]] - far_soft_shadow, [[Far and soft shadow effect. - Uses @Efl.Text_Style_Base.text_shadow_color and @Efl.Text_Style_Base.text_shadow_direction.]] - glow, [[Glow effect. - Uses @Efl.Text_Style_Base.text_glow_color and @Efl.Text_Style_Base.text_secondary_glow_color.]] - outline, [[Outline effect. - Uses @Efl.Text_Style_Base.text_outline_color.]] - soft_outline, [[Soft outline effect. - Uses @Efl.Text_Style_Base.text_outline_color.]] - outline_shadow, [[Outline + shadow effect. - Uses @Efl.Text_Style_Base.text_shadow_color, @Efl.Text_Style_Base.text_shadow_direction and - @Efl.Text_Style_Base.text_outline_color.]] - outline_soft_shadow, [[Outline + soft shadow effect. - Uses @Efl.Text_Style_Base.text_shadow_color, @Efl.Text_Style_Base.text_shadow_direction and - @Efl.Text_Style_Base.text_outline_color.]] -} - -enum Efl.Text_Style_Shadow_Direction -{ - [[Direction of the shadow effect. - @since 1.24 - ]] - bottom_right = 0, [[Shadow towards bottom right.]] - bottom, [[Shadow towards bottom.]] - bottom_left, [[Shadow towards bottom left.]] - left, [[Shadow towards left.]] - top_left, [[Shadow towards top left.]] - top, [[Shadow towards top.]] - top_right, [[Shadow towards top right.]] - right, [[Shadow towards right.]] -} - -enum Efl.Text_Style_Underline_Type -{ - [[Type of underline for the displayed text. - @since 1.24 - ]] - none = 0, [[Text without underline.]] - single, [[Underlined with a single line. - Requires @Efl.Text_Style_Base.text_underline_color.]] - double, [[Underlined with a double line. - Requires @Efl.Text_Style_Base.text_underline_color and @Efl.Text_Style_Base.text_secondary_underline_color.]] - dashed, [[Underlined with a dashed line. - Requires @Efl.Text_Style_Base.text_underline_dashed_color, @Efl.Text_Style_Base.text_underline_dashed_width and - @Efl.Text_Style_Base.text_underline_dashed_gap.]] -} - -interface Efl.Text_Style_Base { - [[Decorations to add to the text. - - Decorations include text color, glow, outline, underline, strike-through and shadows. - @since 1.24 - ]] - c_prefix: efl_text; - methods { - @property text_color { - [[Color of text, excluding all other decorations. By default it is invisible.]] - values - { - r: ubyte; [[Red component.]] - g: ubyte; [[Green component.]] - b: ubyte; [[Blue component.]] - a: ubyte; [[Alpha component.]] - } - } - - @property text_background_type { - [[Type of background to use behind each line of text.]] - values - { - type: Efl.Text_Style_Background_Type; [[Background type.]] - } - } - - @property text_background_color { - [[Color of the background behind each line of text. By default it is invisible.]] - values - { - r: ubyte; [[Red component.]] - g: ubyte; [[Green component.]] - b: ubyte; [[Blue component.]] - a: ubyte; [[Alpha component.]] - } - } - - @property text_underline_type { - [[Type of underline to use for the text.]] - values - { - type: Efl.Text_Style_Underline_Type; [[Underline type.]] - } - } - - @property text_underline_color - { - [[Color of the primary underline. By default it is invisible.]] - values - { - r: ubyte; [[Red component.]] - g: ubyte; [[Green component.]] - b: ubyte; [[Blue component.]] - a: ubyte; [[Alpha component.]] - } - } - - @property text_underline_height - { - [[Width (in pixels) of the single underline when @.text_underline_type is - @Efl.Text_Style_Underline_Type.single.]] - values - { - height: double; [[Underline width in pixels.]] - } - } - - @property text_underline_dashed_color - { - [[Color of the dashed underline. Only valid when @.text_underline_type is - @Efl.Text_Style_Underline_Type.dashed. By default it is invisible.]] - values - { - r: ubyte; [[Red component.]] - g: ubyte; [[Green component.]] - b: ubyte; [[Blue component.]] - a: ubyte; [[Alpha component.]] - } - } - - @property text_underline_dashed_width - { - [[Length (in pixels) of the dashes when @.text_underline_type is - @Efl.Text_Style_Underline_Type.dashed.]] - values - { - width: int; [[Dash length in pixels.]] - } - } - - @property text_underline_dashed_gap - { - [[Length (in pixels) of the gaps between the dashes when @.text_underline_type is - @Efl.Text_Style_Underline_Type.dashed.]] - values - { - gap: int; [[Gap length in pixels.]] - } - } - - @property text_secondary_underline_color - { - [[Color of the secondary underline. Only valid when @.text_underline_type is - @Efl.Text_Style_Underline_Type.double. By default it is invisible.]] - values - { - r: ubyte; [[Red component.]] - g: ubyte; [[Green component.]] - b: ubyte; [[Blue component.]] - a: ubyte; [[Alpha component.]] - } - } - - @property text_strikethrough_type { - [[Enables crossed-out text.]] - values - { - type: Efl.Text_Style_Strikethrough_Type; [[Strike-through type.]] - } - } - - @property text_strikethrough_color - { - [[Color of the line striking through the text. By default it is invisible.]] - values - { - r: ubyte; [[Red component.]] - g: ubyte; [[Green component.]] - b: ubyte; [[Blue component.]] - a: ubyte; [[Alpha component.]] - } - } - - @property text_effect_type { - [[Controls a number of decorations around the text, like shadow, outline - and glow, including combinations of them.]] - values { - type: Efl.Text_Style_Effect_Type; [[Effect type.]] - } - } - @property text_outline_color - { - [[Color of the text outline. By default it is invisible.]] - values - { - r: ubyte; [[Red component.]] - g: ubyte; [[Green component.]] - b: ubyte; [[Blue component.]] - a: ubyte; [[Alpha component.]] - } - } - - @property text_shadow_direction - { - [[Direction of the shadow effect.]] - values - { - type: Efl.Text_Style_Shadow_Direction; [[Shadow direction.]] - } - } - - @property text_shadow_color - { - [[Color of the text shadow. By default it is invisible.]] - values - { - r: ubyte; [[Red component.]] - g: ubyte; [[Green component.]] - b: ubyte; [[Blue component.]] - a: ubyte; [[Alpha component.]] - } - } - - @property text_glow_color - { - [[Color of the text glow. By default it is invisible.]] - values - { - r: ubyte; [[Red component.]] - g: ubyte; [[Green component.]] - b: ubyte; [[Blue component.]] - a: ubyte; [[Alpha component.]] - } - } - - @property text_secondary_glow_color - { - [[Color of the secondary glow decoration. - This is the color of the inner glow (where it touches the text) which - gradually fades into @.text_glow_color as it reaches the outer edge. - By default it is invisible. - ]] - values - { - r: ubyte; [[Red component.]] - g: ubyte; [[Green component.]] - b: ubyte; [[Blue component.]] - a: ubyte; [[Alpha component.]] - } - } - } -} diff --git a/src/lib/efl/interfaces/efl_text_style_non_vg.eo b/src/lib/efl/interfaces/efl_text_style_non_vg.eo index edf38de847..e33e0c9cd9 100644 --- a/src/lib/efl/interfaces/efl_text_style_non_vg.eo +++ b/src/lib/efl/interfaces/efl_text_style_non_vg.eo @@ -1,8 +1,282 @@ -interface Efl.Text_Style extends Efl.Text_Style_Base { +enum Efl.Text_Style_Background_Type +{ + [[Type of background to use behind each line of text. + + @since 1.24 + ]] + none = 0, [[Do not use background.]] + solid_color, [[Use a solid-color rectangle as background. + Requires @Efl.Text_Style.text_background_color.]] +} + +enum Efl.Text_Style_Strikethrough_Type +{ + [[Whether to add a strike-through decoration to the displayed text or not. + @since 1.24 + ]] + none = 0, [[Do not use strike-through.]] + single, [[Strike-through with a single line. + Requires @Efl.Text_Style.text_strikethrough_color.]] +} + +enum Efl.Text_Style_Effect_Type +{ + [[Effect to apply to the displayed text. + @since 1.24 + ]] + none = 0, [[No effect.]] + shadow, [[Shadow effect. + Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + far_shadow, [[Far shadow effect. + Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + soft_shadow, [[Soft shadow effect. + Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + far_soft_shadow, [[Far and soft shadow effect. + Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + glow, [[Glow effect. + Uses @Efl.Text_Style.text_glow_color and @Efl.Text_Style.text_secondary_glow_color.]] + outline, [[Outline effect. + Uses @Efl.Text_Style.text_outline_color.]] + soft_outline, [[Soft outline effect. + Uses @Efl.Text_Style.text_outline_color.]] + outline_shadow, [[Outline + shadow effect. + Uses @Efl.Text_Style.text_shadow_color, @Efl.Text_Style.text_shadow_direction and + @Efl.Text_Style.text_outline_color.]] + outline_soft_shadow, [[Outline + soft shadow effect. + Uses @Efl.Text_Style.text_shadow_color, @Efl.Text_Style.text_shadow_direction and + @Efl.Text_Style.text_outline_color.]] +} + +enum Efl.Text_Style_Shadow_Direction +{ + [[Direction of the shadow effect. + @since 1.24 + ]] + bottom_right = 0, [[Shadow towards bottom right.]] + bottom, [[Shadow towards bottom.]] + bottom_left, [[Shadow towards bottom left.]] + left, [[Shadow towards left.]] + top_left, [[Shadow towards top left.]] + top, [[Shadow towards top.]] + top_right, [[Shadow towards top right.]] + right, [[Shadow towards right.]] +} + +enum Efl.Text_Style_Underline_Type +{ + [[Type of underline for the displayed text. + @since 1.24 + ]] + none = 0, [[Text without underline.]] + single, [[Underlined with a single line. + Requires @Efl.Text_Style.text_underline_color.]] + double, [[Underlined with a double line. + Requires @Efl.Text_Style.text_underline_color and @Efl.Text_Style.text_secondary_underline_color.]] + dashed, [[Underlined with a dashed line. + Requires @Efl.Text_Style.text_underline_dashed_color, @Efl.Text_Style.text_underline_dashed_width and + @Efl.Text_Style.text_underline_dashed_gap.]] +} + +interface Efl.Text_Style { [[Decorations to add to the text. Decorations include text color, glow, outline, underline, strike-through and shadows. @since 1.24 ]] c_prefix: efl_text; + methods { + @property text_color { + [[Color of text, excluding all other decorations. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_background_type { + [[Type of background to use behind each line of text.]] + values + { + type: Efl.Text_Style_Background_Type; [[Background type.]] + } + } + + @property text_background_color { + [[Color of the background behind each line of text. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_underline_type { + [[Type of underline to use for the text.]] + values + { + type: Efl.Text_Style_Underline_Type; [[Underline type.]] + } + } + + @property text_underline_color + { + [[Color of the primary underline. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_underline_height + { + [[Width (in pixels) of the single underline when @.text_underline_type is + @Efl.Text_Style_Underline_Type.single.]] + values + { + height: double; [[Underline width in pixels.]] + } + } + + @property text_underline_dashed_color + { + [[Color of the dashed underline. Only valid when @.text_underline_type is + @Efl.Text_Style_Underline_Type.dashed. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_underline_dashed_width + { + [[Length (in pixels) of the dashes when @.text_underline_type is + @Efl.Text_Style_Underline_Type.dashed.]] + values + { + width: int; [[Dash length in pixels.]] + } + } + + @property text_underline_dashed_gap + { + [[Length (in pixels) of the gaps between the dashes when @.text_underline_type is + @Efl.Text_Style_Underline_Type.dashed.]] + values + { + gap: int; [[Gap length in pixels.]] + } + } + + @property text_secondary_underline_color + { + [[Color of the secondary underline. Only valid when @.text_underline_type is + @Efl.Text_Style_Underline_Type.double. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_strikethrough_type { + [[Enables crossed-out text.]] + values + { + type: Efl.Text_Style_Strikethrough_Type; [[Strike-through type.]] + } + } + + @property text_strikethrough_color + { + [[Color of the line striking through the text. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_effect_type { + [[Controls a number of decorations around the text, like shadow, outline + and glow, including combinations of them.]] + values { + type: Efl.Text_Style_Effect_Type; [[Effect type.]] + } + } + @property text_outline_color + { + [[Color of the text outline. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_shadow_direction + { + [[Direction of the shadow effect.]] + values + { + type: Efl.Text_Style_Shadow_Direction; [[Shadow direction.]] + } + } + + @property text_shadow_color + { + [[Color of the text shadow. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_glow_color + { + [[Color of the text glow. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_secondary_glow_color + { + [[Color of the secondary glow decoration. + This is the color of the inner glow (where it touches the text) which + gradually fades into @.text_glow_color as it reaches the outer edge. + By default it is invisible. + ]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + } } diff --git a/src/lib/efl/interfaces/efl_text_style_vg.eo b/src/lib/efl/interfaces/efl_text_style_vg.eo index 6f63058abe..d0cd196e9a 100644 --- a/src/lib/efl/interfaces/efl_text_style_vg.eo +++ b/src/lib/efl/interfaces/efl_text_style_vg.eo @@ -1,4 +1,83 @@ -interface Efl.Text_Style extends Efl.Text_Style_Base { +enum Efl.Text_Style_Background_Type +{ + [[Type of background to use behind each line of text. + + @since 1.24 + ]] + none = 0, [[Do not use background.]] + solid_color, [[Use a solid-color rectangle as background. + Requires @Efl.Text_Style.text_background_color.]] +} + +enum Efl.Text_Style_Strikethrough_Type +{ + [[Whether to add a strike-through decoration to the displayed text or not. + @since 1.24 + ]] + none = 0, [[Do not use strike-through.]] + single, [[Strike-through with a single line. + Requires @Efl.Text_Style.text_strikethrough_color.]] +} + +enum Efl.Text_Style_Effect_Type +{ + [[Effect to apply to the displayed text. + @since 1.24 + ]] + none = 0, [[No effect.]] + shadow, [[Shadow effect. + Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + far_shadow, [[Far shadow effect. + Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + soft_shadow, [[Soft shadow effect. + Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + far_soft_shadow, [[Far and soft shadow effect. + Uses @Efl.Text_Style.text_shadow_color and @Efl.Text_Style.text_shadow_direction.]] + glow, [[Glow effect. + Uses @Efl.Text_Style.text_glow_color and @Efl.Text_Style.text_secondary_glow_color.]] + outline, [[Outline effect. + Uses @Efl.Text_Style.text_outline_color.]] + soft_outline, [[Soft outline effect. + Uses @Efl.Text_Style.text_outline_color.]] + outline_shadow, [[Outline + shadow effect. + Uses @Efl.Text_Style.text_shadow_color, @Efl.Text_Style.text_shadow_direction and + @Efl.Text_Style.text_outline_color.]] + outline_soft_shadow, [[Outline + soft shadow effect. + Uses @Efl.Text_Style.text_shadow_color, @Efl.Text_Style.text_shadow_direction and + @Efl.Text_Style.text_outline_color.]] +} + +enum Efl.Text_Style_Shadow_Direction +{ + [[Direction of the shadow effect. + @since 1.24 + ]] + bottom_right = 0, [[Shadow towards bottom right.]] + bottom, [[Shadow towards bottom.]] + bottom_left, [[Shadow towards bottom left.]] + left, [[Shadow towards left.]] + top_left, [[Shadow towards top left.]] + top, [[Shadow towards top.]] + top_right, [[Shadow towards top right.]] + right, [[Shadow towards right.]] +} + +enum Efl.Text_Style_Underline_Type +{ + [[Type of underline for the displayed text. + @since 1.24 + ]] + none = 0, [[Text without underline.]] + single, [[Underlined with a single line. + Requires @Efl.Text_Style.text_underline_color.]] + double, [[Underlined with a double line. + Requires @Efl.Text_Style.text_underline_color and @Efl.Text_Style.text_secondary_underline_color.]] + dashed, [[Underlined with a dashed line. + Requires @Efl.Text_Style.text_underline_dashed_color, @Efl.Text_Style.text_underline_dashed_width and + @Efl.Text_Style.text_underline_dashed_gap.]] +} + +interface Efl.Text_Style { [[Decorations to add to the text. Decorations include text color, glow, outline, underline, strike-through and shadows. @@ -6,6 +85,200 @@ interface Efl.Text_Style extends Efl.Text_Style_Base { ]] c_prefix: efl_text; methods { + @property text_color { + [[Color of text, excluding all other decorations. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_background_type { + [[Type of background to use behind each line of text.]] + values + { + type: Efl.Text_Style_Background_Type; [[Background type.]] + } + } + + @property text_background_color { + [[Color of the background behind each line of text. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_underline_type { + [[Type of underline to use for the text.]] + values + { + type: Efl.Text_Style_Underline_Type; [[Underline type.]] + } + } + + @property text_underline_color + { + [[Color of the primary underline. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_underline_height + { + [[Width (in pixels) of the single underline when @.text_underline_type is + @Efl.Text_Style_Underline_Type.single.]] + values + { + height: double; [[Underline width in pixels.]] + } + } + + @property text_underline_dashed_color + { + [[Color of the dashed underline. Only valid when @.text_underline_type is + @Efl.Text_Style_Underline_Type.dashed. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_underline_dashed_width + { + [[Length (in pixels) of the dashes when @.text_underline_type is + @Efl.Text_Style_Underline_Type.dashed.]] + values + { + width: int; [[Dash length in pixels.]] + } + } + + @property text_underline_dashed_gap + { + [[Length (in pixels) of the gaps between the dashes when @.text_underline_type is + @Efl.Text_Style_Underline_Type.dashed.]] + values + { + gap: int; [[Gap length in pixels.]] + } + } + + @property text_secondary_underline_color + { + [[Color of the secondary underline. Only valid when @.text_underline_type is + @Efl.Text_Style_Underline_Type.double. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_strikethrough_type { + [[Enables crossed-out text.]] + values + { + type: Efl.Text_Style_Strikethrough_Type; [[Strike-through type.]] + } + } + + @property text_strikethrough_color + { + [[Color of the line striking through the text. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_effect_type { + [[Controls a number of decorations around the text, like shadow, outline + and glow, including combinations of them.]] + values { + type: Efl.Text_Style_Effect_Type; [[Effect type.]] + } + } + @property text_outline_color + { + [[Color of the text outline. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_shadow_direction + { + [[Direction of the shadow effect.]] + values + { + type: Efl.Text_Style_Shadow_Direction; [[Shadow direction.]] + } + } + + @property text_shadow_color + { + [[Color of the text shadow. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_glow_color + { + [[Color of the text glow. By default it is invisible.]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + + @property text_secondary_glow_color + { + [[Color of the secondary glow decoration. + This is the color of the inner glow (where it touches the text) which + gradually fades into @.text_glow_color as it reaches the outer edge. + By default it is invisible. + ]] + values + { + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] + } + } + @property text_gfx_filter { [[Program that applies a special filter diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index 651e5c1422..54c442a6c5 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -75,7 +75,6 @@ pub_eo_files = [ 'efl_audio_control.eo', 'efl_text.eo', 'efl_text_font_properties.eo', - 'efl_text_style_base.eo', 'efl_text_format.eo', 'efl_text_markup.eo', 'efl_text_markup_util.eo', diff --git a/src/lib/evas/canvas/efl_canvas_group_base.eo b/src/lib/evas/canvas/efl_canvas_group_base.eo deleted file mode 100644 index df6f4d28a4..0000000000 --- a/src/lib/evas/canvas/efl_canvas_group_base.eo +++ /dev/null @@ -1,135 +0,0 @@ -class Efl.Canvas.Group_Base extends Efl.Canvas.Object -{ - [[A group object is a container for other canvas objects. Its children - move along their parent and are often clipped with a common clipper. - This is part of the legacy smart object concept. - - A group is not necessarily a container (see @Efl.Container) in the - sense that a standard widget may not have any empty slots for content. - However it's still a group of low-level canvas objects (clipper, raw objects, - etc.). - - @since 1.22 - ]] - data: Evas_Smart_Data; - methods { - @property group_need_recalculate { - [[Indicates that the group's layout needs to be recalculated. - - If this flag is set, then the @.group_calculate function will - be called, during rendering phase of the canvas. After that, - this flag will be automatically unset. - - Note: setting this flag alone will not make the canvas' whole scene - dirty. Using evas_render() will have no effect. To - force this, use @.group_change, which will also call this function - automatically, with the parameter set to $true. - - See also @.group_calculate. - ]] - set { - } - get { - } - values { - value: bool; [[$true if the group layout needs to be recalculated, $false otherwise]] - } - } - group_change { - [[Marks the object as dirty. - - This also forcefully marks the given object as needing - recalculation. As an effect, on the next rendering cycle its - @.group_calculate method will be called. - ]] - } - group_calculate { - [[Triggers an immediate recalculation of this object's geometry. - - This will also reset the flag @.group_need_recalculate. - ]] - } - group_members_iterate @const { - [[Returns an iterator over the children of this object, which are - canvas objects. - - This returns the list of "smart" children. This might be different - from both the @Efl.Object children list as well as the @Efl.Container - content list. - ]] - return: iterator @move; - [[Iterator to object children]] - } - group_member_add { - [[Set a canvas object as a member of a given group (or smart object). - - Members will automatically be stacked and layered together with the - smart object. The various stacking functions will operate on - members relative to the other members instead of the entire canvas, - since they now live on an exclusive layer (see - @Efl.Gfx.Stack.stack_above(), for more details). - - Subclasses inheriting from this one may override this function - to ensure the proper stacking of special objects, such as clippers, - event rectangles, etc... - - See also @.group_member_remove. - See also @.group_member_is. - ]] - params { - @in sub_obj: Efl.Canvas.Object; [[The member object.]] - } - } - group_member_remove { - [[Removes a member object from a given smart object. - - This removes a member object from a smart object, if it was added - to any. The object will still be on the canvas, but no longer - associated with whichever smart object it was associated with. - - See also @.group_member_add. - See also @.group_member_is. - ]] - params { - @in sub_obj: Efl.Canvas.Object; [[The member object to remove.]] - } - } - group_member_is @const { - [[Finds out if a given object is a member of this group.]] - params { - @in sub_obj: const(Efl.Canvas.Object); [[A potential sub object.]] - } - return: bool; [[$true if $sub_obj is a member of this group.]] - } - @property group_clipper @protected { - [[The internal clipper object used by this group. - - This is the object clipping all the child objects. Do not delete - or otherwise modify this clipper! - ]] - values { - clipper: const(Efl.Canvas.Object); [[A clipper rectangle.]] - } - get { - } - } - } - events { - member,added: Efl.Gfx.Entity; [[Called when a member is added to the group.]] - member,removed: Efl.Gfx.Entity; [[Called when a member is removed from the group.]] - } - implements { - class.constructor; - class.destructor; - Efl.Object.constructor; - Efl.Object.destructor; - Efl.Object.debug_name_override; - Efl.Gfx.Color.color { set; } - Efl.Gfx.Entity.visible { set; } - Efl.Gfx.Entity.position { set; } - Efl.Gfx.Entity.size { set; } - Efl.Canvas.Object.clipper { set; } - Efl.Canvas.Object.no_render { set; } - Efl.Canvas.Object.paragraph_direction { get; set; } - } -} diff --git a/src/lib/evas/canvas/efl_canvas_group_non_vg.eo b/src/lib/evas/canvas/efl_canvas_group_non_vg.eo index ea50b20b7b..030e2e0122 100644 --- a/src/lib/evas/canvas/efl_canvas_group_non_vg.eo +++ b/src/lib/evas/canvas/efl_canvas_group_non_vg.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Group extends Efl.Canvas.Group_Base +class Efl.Canvas.Group extends Efl.Canvas.Object { [[A group object is a container for other canvas objects. Its children move along their parent and are often clipped with a common clipper. @@ -11,4 +11,125 @@ class Efl.Canvas.Group extends Efl.Canvas.Group_Base @since 1.22 ]] + data: Evas_Smart_Data; + methods { + @property group_need_recalculate { + [[Indicates that the group's layout needs to be recalculated. + + If this flag is set, then the @.group_calculate function will + be called, during rendering phase of the canvas. After that, + this flag will be automatically unset. + + Note: setting this flag alone will not make the canvas' whole scene + dirty. Using evas_render() will have no effect. To + force this, use @.group_change, which will also call this function + automatically, with the parameter set to $true. + + See also @.group_calculate. + ]] + set { + } + get { + } + values { + value: bool; [[$true if the group layout needs to be recalculated, $false otherwise]] + } + } + group_change { + [[Marks the object as dirty. + + This also forcefully marks the given object as needing + recalculation. As an effect, on the next rendering cycle its + @.group_calculate method will be called. + ]] + } + group_calculate { + [[Triggers an immediate recalculation of this object's geometry. + + This will also reset the flag @.group_need_recalculate. + ]] + } + group_members_iterate @const { + [[Returns an iterator over the children of this object, which are + canvas objects. + + This returns the list of "smart" children. This might be different + from both the @Efl.Object children list as well as the @Efl.Container + content list. + ]] + return: iterator @move; + [[Iterator to object children]] + } + group_member_add { + [[Set a canvas object as a member of a given group (or smart object). + + Members will automatically be stacked and layered together with the + smart object. The various stacking functions will operate on + members relative to the other members instead of the entire canvas, + since they now live on an exclusive layer (see + @Efl.Gfx.Stack.stack_above(), for more details). + + Subclasses inheriting from this one may override this function + to ensure the proper stacking of special objects, such as clippers, + event rectangles, etc... + + See also @.group_member_remove. + See also @.group_member_is. + ]] + params { + @in sub_obj: Efl.Canvas.Object; [[The member object.]] + } + } + group_member_remove { + [[Removes a member object from a given smart object. + + This removes a member object from a smart object, if it was added + to any. The object will still be on the canvas, but no longer + associated with whichever smart object it was associated with. + + See also @.group_member_add. + See also @.group_member_is. + ]] + params { + @in sub_obj: Efl.Canvas.Object; [[The member object to remove.]] + } + } + group_member_is @const { + [[Finds out if a given object is a member of this group.]] + params { + @in sub_obj: const(Efl.Canvas.Object); [[A potential sub object.]] + } + return: bool; [[$true if $sub_obj is a member of this group.]] + } + @property group_clipper @protected { + [[The internal clipper object used by this group. + + This is the object clipping all the child objects. Do not delete + or otherwise modify this clipper! + ]] + values { + clipper: const(Efl.Canvas.Object); [[A clipper rectangle.]] + } + get { + } + } + } + events { + member,added: Efl.Gfx.Entity; [[Called when a member is added to the group.]] + member,removed: Efl.Gfx.Entity; [[Called when a member is removed from the group.]] + } + implements { + class.constructor; + class.destructor; + Efl.Object.constructor; + Efl.Object.destructor; + Efl.Object.debug_name_override; + Efl.Gfx.Color.color { set; } + Efl.Gfx.Entity.visible { set; } + Efl.Gfx.Entity.position { set; } + Efl.Gfx.Entity.size { set; } + Efl.Canvas.Object.clipper { set; } + Efl.Canvas.Object.no_render { set; } + Efl.Canvas.Object.paragraph_direction { get; set; } + } } diff --git a/src/lib/evas/canvas/efl_canvas_group_vg.eo b/src/lib/evas/canvas/efl_canvas_group_vg.eo index 9c8f4e3dd7..31105a0fc6 100644 --- a/src/lib/evas/canvas/efl_canvas_group_vg.eo +++ b/src/lib/evas/canvas/efl_canvas_group_vg.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Group extends Efl.Canvas.Group_Base implements Efl.Gfx.Filter +class Efl.Canvas.Group extends Efl.Canvas.Object implements Efl.Gfx.Filter { [[A group object is a container for other canvas objects. Its children move along their parent and are often clipped with a common clipper. @@ -11,7 +11,126 @@ class Efl.Canvas.Group extends Efl.Canvas.Group_Base implements Efl.Gfx.Filter @since 1.22 ]] + data: Evas_Smart_Data; + methods { + @property group_need_recalculate { + [[Indicates that the group's layout needs to be recalculated. + + If this flag is set, then the @.group_calculate function will + be called, during rendering phase of the canvas. After that, + this flag will be automatically unset. + + Note: setting this flag alone will not make the canvas' whole scene + dirty. Using evas_render() will have no effect. To + force this, use @.group_change, which will also call this function + automatically, with the parameter set to $true. + + See also @.group_calculate. + ]] + set { + } + get { + } + values { + value: bool; [[$true if the group layout needs to be recalculated, $false otherwise]] + } + } + group_change { + [[Marks the object as dirty. + + This also forcefully marks the given object as needing + recalculation. As an effect, on the next rendering cycle its + @.group_calculate method will be called. + ]] + } + group_calculate { + [[Triggers an immediate recalculation of this object's geometry. + + This will also reset the flag @.group_need_recalculate. + ]] + } + group_members_iterate @const { + [[Returns an iterator over the children of this object, which are + canvas objects. + + This returns the list of "smart" children. This might be different + from both the @Efl.Object children list as well as the @Efl.Container + content list. + ]] + return: iterator @move; + [[Iterator to object children]] + } + group_member_add { + [[Set a canvas object as a member of a given group (or smart object). + + Members will automatically be stacked and layered together with the + smart object. The various stacking functions will operate on + members relative to the other members instead of the entire canvas, + since they now live on an exclusive layer (see + @Efl.Gfx.Stack.stack_above(), for more details). + + Subclasses inheriting from this one may override this function + to ensure the proper stacking of special objects, such as clippers, + event rectangles, etc... + + See also @.group_member_remove. + See also @.group_member_is. + ]] + params { + @in sub_obj: Efl.Canvas.Object; [[The member object.]] + } + } + group_member_remove { + [[Removes a member object from a given smart object. + + This removes a member object from a smart object, if it was added + to any. The object will still be on the canvas, but no longer + associated with whichever smart object it was associated with. + + See also @.group_member_add. + See also @.group_member_is. + ]] + params { + @in sub_obj: Efl.Canvas.Object; [[The member object to remove.]] + } + } + group_member_is @const { + [[Finds out if a given object is a member of this group.]] + params { + @in sub_obj: const(Efl.Canvas.Object); [[A potential sub object.]] + } + return: bool; [[$true if $sub_obj is a member of this group.]] + } + @property group_clipper @protected { + [[The internal clipper object used by this group. + + This is the object clipping all the child objects. Do not delete + or otherwise modify this clipper! + ]] + values { + clipper: const(Efl.Canvas.Object); [[A clipper rectangle.]] + } + get { + } + } + } + events { + member,added: Efl.Gfx.Entity; [[Called when a member is added to the group.]] + member,removed: Efl.Gfx.Entity; [[Called when a member is removed from the group.]] + } implements { + class.constructor; + class.destructor; + Efl.Object.constructor; + Efl.Object.destructor; + Efl.Object.debug_name_override; + Efl.Gfx.Color.color { set; } + Efl.Gfx.Entity.visible { set; } + Efl.Gfx.Entity.position { set; } + Efl.Gfx.Entity.size { set; } Efl.Gfx.Filter.filter_program { set; } + Efl.Canvas.Object.clipper { set; } + Efl.Canvas.Object.no_render { set; } + Efl.Canvas.Object.paragraph_direction { get; set; } } } diff --git a/src/lib/evas/canvas/efl_canvas_image_internal_base.eo b/src/lib/evas/canvas/efl_canvas_image_internal_base.eo deleted file mode 100644 index d4a995a6fb..0000000000 --- a/src/lib/evas/canvas/efl_canvas_image_internal_base.eo +++ /dev/null @@ -1,33 +0,0 @@ -abstract @beta Efl.Canvas.Image_Internal_Base extends Efl.Canvas.Object implements - Efl.Gfx.Image, Efl.Gfx.Buffer, - Efl.Gfx.Fill, Efl.Gfx.View, - Efl.Gfx.Image_Orientable, Efl.File_Save -{ - [[Efl canvas internal image class]] - data: Evas_Image_Data; - implements { - Efl.Object.constructor; - Efl.Object.destructor; - Efl.Object.finalize; - Efl.Object.debug_name_override; - Efl.File_Save.save; - Efl.Gfx.Image_Orientable.image_orientation { get; set; } - Efl.Gfx.Image.smooth_scale { get; set; } - Efl.Gfx.Image.ratio { get; } - Efl.Gfx.Image.content_region { get; } - Efl.Gfx.Image.border_insets { get; set; } - Efl.Gfx.Image.border_insets_scale { get; set; } - Efl.Gfx.Image.center_fill_mode { get; set; } - Efl.Gfx.Image.stretch_region { get; set; } - Efl.Gfx.Image.scale_hint { get; set; } - Efl.Gfx.Image.content_hint { get; set; } - Efl.Gfx.Image.image_size { get; } - Efl.Gfx.Image.image_load_error { get; } - Efl.Gfx.Buffer.alpha { get; set; } - Efl.Gfx.Buffer.buffer_update_add; - Efl.Gfx.Buffer.colorspace { get; } - Efl.Gfx.Fill.fill { get; set; } - Efl.Gfx.Fill.fill_auto { get; set; } - Efl.Gfx.View.view_size { get; } - } -} diff --git a/src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo b/src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo index 87c88e795b..46c88d3f0a 100644 --- a/src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo +++ b/src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo @@ -1,4 +1,33 @@ -abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Image_Internal_Base +abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements + Efl.Gfx.Image, Efl.Gfx.Buffer, + Efl.Gfx.Fill, Efl.Gfx.View, + Efl.Gfx.Image_Orientable, Efl.File_Save { [[Efl canvas internal image class]] + data: Evas_Image_Data; + implements { + Efl.Object.constructor; + Efl.Object.destructor; + Efl.Object.finalize; + Efl.Object.debug_name_override; + Efl.File_Save.save; + Efl.Gfx.Image_Orientable.image_orientation { get; set; } + Efl.Gfx.Image.smooth_scale { get; set; } + Efl.Gfx.Image.ratio { get; } + Efl.Gfx.Image.content_region { get; } + Efl.Gfx.Image.border_insets { get; set; } + Efl.Gfx.Image.border_insets_scale { get; set; } + Efl.Gfx.Image.center_fill_mode { get; set; } + Efl.Gfx.Image.stretch_region { get; set; } + Efl.Gfx.Image.scale_hint { get; set; } + Efl.Gfx.Image.content_hint { get; set; } + Efl.Gfx.Image.image_size { get; } + Efl.Gfx.Image.image_load_error { get; } + Efl.Gfx.Buffer.alpha { get; set; } + Efl.Gfx.Buffer.buffer_update_add; + Efl.Gfx.Buffer.colorspace { get; } + Efl.Gfx.Fill.fill { get; set; } + Efl.Gfx.Fill.fill_auto { get; set; } + Efl.Gfx.View.view_size { get; } + } } diff --git a/src/lib/evas/canvas/efl_canvas_image_internal_vg.eo b/src/lib/evas/canvas/efl_canvas_image_internal_vg.eo index 2d549ef7f2..3a96eb972c 100644 --- a/src/lib/evas/canvas/efl_canvas_image_internal_vg.eo +++ b/src/lib/evas/canvas/efl_canvas_image_internal_vg.eo @@ -1,8 +1,35 @@ -abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Image_Internal_Base implements Efl.Canvas.Filter.Internal +abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements Efl.Canvas.Filter.Internal, + Efl.Gfx.Image, Efl.Gfx.Buffer, + Efl.Gfx.Fill, Efl.Gfx.View, + Efl.Gfx.Image_Orientable, Efl.File_Save { [[Efl canvas internal image class]] + data: Evas_Image_Data; implements { + Efl.Object.constructor; + Efl.Object.destructor; + Efl.Object.finalize; + Efl.Object.debug_name_override; + Efl.File_Save.save; + Efl.Gfx.Image_Orientable.image_orientation { get; set; } + Efl.Gfx.Image.smooth_scale { get; set; } + Efl.Gfx.Image.ratio { get; } + Efl.Gfx.Image.content_region { get; } + Efl.Gfx.Image.border_insets { get; set; } + Efl.Gfx.Image.border_insets_scale { get; set; } + Efl.Gfx.Image.center_fill_mode { get; set; } + Efl.Gfx.Image.stretch_region { get; set; } + Efl.Gfx.Image.scale_hint { get; set; } + Efl.Gfx.Image.content_hint { get; set; } + Efl.Gfx.Image.image_size { get; } + Efl.Gfx.Image.image_load_error { get; } + Efl.Gfx.Buffer.alpha { get; set; } + Efl.Gfx.Buffer.buffer_update_add; + Efl.Gfx.Buffer.colorspace { get; } + Efl.Gfx.Fill.fill { get; set; } + Efl.Gfx.Fill.fill_auto { get; set; } Efl.Gfx.Filter.filter_program { set; } + Efl.Gfx.View.view_size { get; } Efl.Canvas.Filter.Internal.filter_dirty; Efl.Canvas.Filter.Internal.filter_input_alpha; Efl.Canvas.Filter.Internal.filter_input_render; diff --git a/src/lib/evas/canvas/efl_canvas_textblock_base.eo b/src/lib/evas/canvas/efl_canvas_textblock_base.eo deleted file mode 100644 index 71211bbf73..0000000000 --- a/src/lib/evas/canvas/efl_canvas_textblock_base.eo +++ /dev/null @@ -1,496 +0,0 @@ -class Efl.Canvas.Textblock_Base extends Efl.Canvas.Object implements Efl.Text, - Efl.Text_Font_Properties, - Efl.Text_Style, Efl.Text_Format, - Efl.Text_Markup, Efl.Ui.I18n -{ - [[This is the Canvas-level text class. This class only takes care of rendering text, - if you need user interaction consider the classes in $[Efl.Ui]. - - Note: No text will be rendered until a font, a font size and a font color are specified. - This can be accomplished using @Efl.Text_Font_Properties.font_family, @Efl.Text_Font_Properties.font_size and - @Efl.Text_Style.text_color. - Alternatively, @.style_apply can be used providing the attributes $font, $font_size and $color. - - @since 1.24 - ]] - methods { - @property is_empty { - [[Whether the object is empty (no text) or not. - ]] - get { - } - values { - is_empty: bool; [[$true if empty.]] - } - } - cursor_create { - [[Creates a new cursor and adds it to the text object. - This cursor can be used to manipulate and iterate the content of the text object. - ]] - return: Efl.Text_Cursor.Object @move; [[The created text cursor.]] - } - visible_range_get { - [[Returns the currently visible range. - - The given $start and $end cursors are output variables: - they are set to the positions of the start and the end of the - visible range in the text, respectively. - ]] - return: bool; [[$true on success.]] - params { - @in start: Efl.Text_Cursor.Object; [[Range start position.]] - @in end: Efl.Text_Cursor.Object; [[Range end position.]] - } - } - @property style_insets { - [[Gets the left, right, top and bottom insets of the text. - - The inset is any applied padding on the text (which is calculated - internally by styling applied to Textblock). - ]] - get {} - values { - l: int; [[Left padding.]] - r: int; [[Right padding.]] - t: int; [[Top padding.]] - b: int; [[Bottom padding.]] - } - } - @property bidi_delimiters { - [[BiDi delimiters are used for in-paragraph separation of bidirectional - segments. This is useful, for example, in the recipient fields of - e-mail clients where bidi oddities can occur when mixing RTL (right-to-left) - and LTR (left-to-right) text. - ]] - set {} - get {} - values { - delim: string; [[A null terminated string of delimiters, e.g ",|" or $null if empty.]] - } - } - @property newline_as_paragraph_separator { - [[When $true, the newline character will behave as a paragraph separator. - Paragraph separator equal U+2029, and new line equal U+000A. - This will effect a lot of text behaviour like @Efl.Text_Cursor.Object.move method. - ]] - set {} - get {} - values { - mode: bool; [[$true to treat new line as paragraph separator, $false otherwise.]] - } - } - style_apply { - [[Applies several style attributes at once using a formatting string. - Given style attributes override previous values, leaving other attributes unaffected. - This is akin to setting individual style attributes using properties like - @Efl.Text_Font_Properties.font_slant or @Efl.Text_Format.wrap, for example. - - The formatting string is a whitespace-separated list of $[attribute=value] pairs. - - The following attributes are accepted: - - - $font: Name of the font to use. - Default value is empty, meaning that no text will be rendered. - Requires $font_size and $font_color. - See @Efl.Text_Font_Properties.font_family. - - - $font_fallbacks: Comma-delimited list of fonts to try if finding the primary font fails. - Example: $[font_fallbacks=consolas,courier,monospace]. - Default value is empty. - See @Efl.Text_Font_Properties.font_fallbacks. - - - $font_size: Height of font, in points. - Default value is 0. - Requires $font and $font_color. - See @Efl.Text_Font_Properties.font_size. - - - $font_source: Path to the file containing the font to use. - Example: $[font_source=/usr/share/fonts/Sans.ttf]. - Default value is empty. - See @Efl.Text_Font_Properties.font_source. - - - $font_weight: Thickness of the font. The value must be one of: $normal, $thin, $ultralight, $extralight, - $light, $book, $medium, $semibold, $bold, $ultrabold, $extrabold, $black and $extrablack. - Default value is $normal. - See @Efl.Text_Font_Properties.font_weight. - - - $font_style: Style of the font. The value must be one of: $normal, $oblique and $italic. - Default value is $normal. - See @Efl.Text_Font_Properties.font_slant. - - - $font_width: How wide the font is, relative to its height. The value must be one of: - $normal, $ultracondensed, $extracondensed, $condensed, $semicondensed, $semiexpanded, $expanded, - $extraexpanded and $ultraexpanded. - Default value is $normal. - See @Efl.Text_Font_Properties.font_weight. - - - $lang: A 2-letter ISO 639-1 language code, $auto (to use the system locale setting) or $none (to disable - language support). - Example: $[lang=he]. - Default value is empty. - See @Efl.Text_Font_Properties.font_lang. - - - $color: Color code for the text (See bottom for the complete list of supported codes). - Default value is $[rgba(0,0,0,0)] meaning that no text will be rendered. - Requires $font and $font_size. - See @Efl.Text_Style.text_color. - - - $underline_color: Color code for the text underline (See bottom for the complete list of supported codes). - Default value is $[rgba(0,0,0,0)] meaning that no underline will be rendered. - Requires $underline_type. - See @Efl.Text_Style.text_underline_color. - - - $secondary_underline_color: Color code for the secondary text underline (See bottom for the complete list - of supported codes). Only valid when $[underline_type=double]. - Default value is $[rgba(0,0,0,0)] meaning that secondary underline will not be rendered. - See @Efl.Text_Style.text_secondary_underline_color. - - - $underline_dashed_color: Color code for the dashed underline (See bottom for the complete list of supported - codes). Only valid when $[underline_type=dashed]. - Default value is $[rgba(0,0,0,0)] meaning that dashed underline will not be rendered. - See @Efl.Text_Style.text_underline_dashed_color. - - - $outline_color: Color code for the text outline (See bottom for the complete list of supported codes). - Only valid when the $effect_type attribute includes an outline. - Default value is $[rgba(0,0,0,0)] meaning that no outline will be rendered. - See @Efl.Text_Style.text_outline_color. - - - $shadow_color: Color code for the text shadow (See bottom for the complete list of supported codes). - Only valid when the $effect_type attribute includes a shadow. - Default value is $[rgba(0,0,0,0)] meaning that no shadow will be rendered. - See @Efl.Text_Style.text_shadow_color. - - - $glow_color: Color code for the glow component of the text (See bottom for the complete list of supported - codes). Only valid when the $effect_type attribute includes a glow. - Default value is $[rgba(0,0,0,0)] meaning that no glow will be rendered. - See @Efl.Text_Style.text_glow_color. - - - $secondary_glow_color: Color code for the secondary (inner) glow component of the text (See bottom for - the complete list of supported codes). Only valid when the $effect_type attribute includes a glow. - Default value is $[rgba(0,0,0,0)] meaning that only the primary $glow_color will be used. - See @Efl.Text_Style.text_secondary_glow_color. - - - $background_color: Color code for the background of the text (See bottom for the complete list of supported - codes). Use a fully transparent color to disable the background. - Default value is $[rgba(0,0,0,0)] meaning that no background will be rendered. - Requires $background_type. - See @Efl.Text_Style.text_background_color. - - - $strikethrough_color: Color code for the line striking through the text (See bottom for the complete list - of supported codes). Only valid when $[strikethrough_type=single] - Default value is $[rgba(0,0,0,0)] meaning that no strike-through line will be rendered. - See @Efl.Text_Style.text_strikethrough_color. - - - $align: Horizontal alignment of the text. The value can either be a decimal number ($[0.0] means "left" - and $[1.0] means "right"), a percentage ($[0%] means "left" and $[100%] means "right") or one of: - $auto (Respects LTR/RTL settings), $locale (Respects language direction settings), $center - (Centers the text in the line), $middle (Alias for $center), $left (Puts the text at the left of the line), - $right (Puts the text at the right of the line), $start (Alias for $auto), $end (Puts the text at the - opposite side of LTR/RTL settings). - Default value is $auto. - See @Efl.Text_Format.text_horizontal_align. - - - $valign: Vertical alignment of the text. The value can either be a decimal number ($[0.0] means "top" - and $[1.0] means "bottom"), a percentage ($[0%] means "top" and $[100%] means "bottom") or one of: - $top (Puts the text at the top of the text box), $center (Puts the text at the middle of the text box), - $middle (Alias for $center), $bottom (Puts the text at the bottom of the text box), - $baseline (Puts the text's baseline at the middle of the text box), $base (Alias for $baseline). - Default value is $baseline. - See @Efl.Text_Format.text_vertical_align. - - - $wrap: Wrapping policy of the text. The value must be one of the following: $word (Only wraps lines at - word boundaries), $char (Wraps at any character), $mixed (Wraps at word boundaries if possible, - at any character if not), $hyphenation (Hyphenate if possible, otherwise try wrapping at word boundaries - or at any character) or $none to disable wrapping. - Default value is $none. - See @Efl.Text_Format.wrap. - - - $left_margin: Distance in pixels from the left side of the text block to the beginning of the text - (inner margin). The value can be a number (to set the margin), or a number preceded by $[+] or $[-] - to increment or decrement the existing margin value. $reset is also accepted, to set the margin to - 0 pixels. - Default value is $[0]. - Examples: $[left_margin=10], $[left_margin=+10], $[left_margin=reset]. - - - $right_margin: Distance in pixels from the right side of the text block to the beginning of the text - (inner margin). The value can be a number (to set the margin), or a number preceded by $[+] or $[-] - to increment or decrement the existing margin value. $reset is also accepted, to set the margin to - 0 pixels. - Default value is $[0]. - Examples: $[right_margin=10], $[right_margin=+10], $[right_margin=reset]. - - - $underline_type: Style of the underline. The value must be one of $none (No underlining), - $single (A single line under the text) , $double (Two lines under the text), - $dashed (A dashed line under the text). - Default value is $none. - Requires either $underline_color, $secondary_underline_color or $underline_dashed_color. - See @Efl.Text_Style.text_underline_type. - - - $strikethrough_type: Enables crossed-out text. Possible values are $single and $none. - Default value is $none. - Requires $strikethrough_color. - See @Efl.Text_Style.text_strikethrough_type. - - - $background_type: Enables background color for the text. Possible values are $solid and $none. - Default value is $none. - Requires $background_color. - See @Efl.Text_Style.text_background_type. - - - $effect_type: Controls a number of decorations around the text, like shadow, outline and glow, including - combinations of them. Possible values are $none (No decoration), - $shadow, $outline, $soft_outline, $outline_shadow, $outline_soft_shadow, $glow (alias for $soft_outline), - $far_shadow, $soft_shadow and $far_soft_shadow. - Default value is $none. - Requires either $shadow_color, $glow_color or $outline_color. - See @Efl.Text_Style.text_effect_type - - - $shadow_direction: Indicate the shadow direction. Valid positions are $bottom_right, $bottom, $bottom_left, $left, $top_left, $top, $top_right - and $right. - Requires either $effect_type. - See @Efl.Text_Style.text_shadow_direction. - - - $tab_stops: Size (in pixels) of the tab character. The value must be a number greater than one. - Default value is $[32]. - See @Efl.Text_Format.tab_stops. - - - $line_size: Distance (in pixels) from the baseline of one line of text to the next. This is, a value of - $[0] would render all lines on top of each other (However, this value will be ignored if it results in - overlapping lines of text). - Setting this value sets $line_rel_size to $[0%] (disables it). - Default value is $[0]. - - - $line_rel_size: Distance (in percentage over the natural line height) from the baseline of one line of - text to the next. A value of $[100%] does not have any impact, smaller values render lines closer together - and bigger values render them further apart. - Setting this value sets $line_size to $[0] (disables it). - Default value is $[0%]. - - - $line_gap: Additional empty space (in pixels) between the bottom of one line of text and the top of the - next. Setting this value sets $line_rel_gap to $[0%] (disables it). - Default value is $[0]. - See @Efl.Text_Format.line_gap. - - - $line_rel_gap: Additional empty space (in percentage over the natural line height) between the bottom of - one line of text and the top of the next. - Setting this value sets $line_gap to $[0] (disables it). - Default value is $[0%]. - See @Efl.Text_Format.line_rel_gap. - - - $line_fill: An alternate way to specify the $line_size as a percentage of the canvas height. - A value of $[100%] means that a single line fills the canvas, whereas $[25%] means that 4 lines - fit in the same height. - When both $line_fill and $line_size are specified the one resulting in the smallest line size is used. - Default value is $[0]. - - - $ellipsis: Controls automatic addition of ellipsis "..." to replace text which cannot be shown. - The value must be a number indicating the position of the ellipsis inside the visible text. - $[0.0] means the beginning of the text, $[1.0] means the end of the text, and values in between - mean the proportional position inside the text. - Any value smaller than 0 or greater than 1 disables ellipsis. - Default value is $[-1]. - Examples: $[ellipsis=0.5 - See @Efl.Text_Format.ellipsis. - - - $password: Enabling this causes all characters to be replaced by $replacement_char. - This is useful for password input boxes. - Value must be either $on or $off. - Default value is $[off]. - Requires $replacement_char. - See @Efl.Text_Format.password. - - - $replacement_char: Character to use instead of the actual characters when $password is $on. - Default value is empty, meaning that no replacement will take place. - Requires $password. - Examples: $[replacement_char=*]. - See @Efl.Text_Format.replacement_char. - - - $underline_dashed_width: Length (in pixels) of the dashes when $underline_type is $dashed. - Default value is $[6]. - See @Efl.Text_Style.text_underline_dashed_width. - - - $underline_dashed_gap: Length (in pixels) of the gaps between the dashes when $underline_type is $dashed. - Default value is $[2]. - See @Efl.Text_Style.text_underline_dashed_gap. - - - $underline_height: Width (in pixels) of the single underline when $underline_type is $single. - Default value is $[1]. - See @Efl.Text_Style.text_underline_height. - - Color codes: Colors can be specified using any of the following formats: - $[#RRGGBB], $[#RRGGBBAA], $[#RGB], $[#RGBA], $[rgb(r,g,b)], $[rgba(r,g,b,a)]. - Additionally, X11 color names like $red or $blanchedalmond can be used. - See https://en.wikipedia.org/wiki/X11_color_names for the full list. - ]] - - params { - @in style: string; [[A whitespace-separated list of $[attribute=value] pairs, for example, - $[font=sans font_size=30 color=white].]] - } - } - @property all_styles { - [[A string representing the complete set of attributes applied to this text object. - This includes the default attributes plus any additional style applied with @.style_apply - or individual style properties like @Efl.Text_Font_Properties.font_slant or @Efl.Text_Format.wrap. - - See @.style_apply for the description of all attributes. - ]] - get {} - values { - style: string; [[A whitespace-separated list of $[attribute=value] pairs, for example, - $[font=sans font_size=30 color=white].]] - } - } - @property size_formatted { - [[The formatted width and height of this text block. - - This calculates the actual size after restricting the - text block to the current size of the object. - - The main difference between this and @.size_native - is that the "native" function does not take wrapping into account: - it just calculates the real width of the object as if it was - placed on an infinite canvas, while @.size_formatted gives the - size after wrapping text according to the size restrictions of the - object. - - The formatted width and height do not include padding size. - To get the total size of text with style, you need to query padding size - from @.style_insets. - - For example a text block containing the text: - "You shall not pass!" with no margins or padding and assuming - a monospace font and a size of 7x10 char widths (for simplicity) - has a native size of 19x1 and a formatted size of 5x4. - ]] - get {} - values { - size: Eina.Size2D; [[The formatted size of the object (after wrapping).]] - } - } - @property size_native { - [[The native width and height of this text block. - - This calculates the actual size without taking account the - current size of the object. - - The main difference between this and @.size_formatted - is that the "native" function does not take wrapping into account: - it just calculates the real width of the object as if it was - placed on an infinite canvas, while @.size_formatted gives the - size after wrapping text according to the size restrictions of the - object. - - The native width and height do not include padding size. - To get the total size of text with style, you need to query padding size - from @.style_insets. - - For example a text block containing the text: - "You shall not pass!" with no margins or padding and assuming - a monospace font and a size of 7x10 char widths (for simplicity) - has a native size of 19x1 and a formatted size of 5x4. - ]] - get {} - values { - size: Eina.Size2D; [[The native size of the object (without wrapping).]] - } - } - // Obstacles - obstacle_add @beta { - [[Add obstacle object $eo_obs to be avoided during layout - of text. - - The textblock does the layout of the text according to the - position of the obstacle. - ]] - params { - @in eo_obs: Efl.Canvas.Object; [[Obstacle object.]] - } - return: bool; [[$true on success.]] - } - obstacle_del @beta { - [[Removes $eo_obs from observation during text layout. - ]] - params { - @in eo_obs: Efl.Canvas.Object; [[Obstacle object.]] - } - return: bool; [[$true on success.]] - } - obstacles_update @beta { - [[Triggers for relayout due to obstacles' state change. - - The obstacles alone don't affect the layout, until this is - called. Use this after doing changes (moving, positioning etc.) - in the obstacles that you would like to be considered in the - layout. - - For example: if you have just repositioned the obstacles to - different coordinates relative to the text block, you need to - call this so it will consider this new state and will relayout - the text. - ]] - } - async_layout { - [[Requests to layout the text off the mainloop. - - Once layout is complete, the result is returned as @Eina.Rect, - with the $w and $h fields set. - - This can be used to layout Textblock before it is required - to layout internally in back thread, which can enhance application - performance. - ]] - return: future; [[Future for layout result.]] - } - } - implements { - Efl.Object.constructor; - Efl.Object.destructor; - Efl.Canvas.Object.paragraph_direction { get; set; } - Efl.Text.text { get; set; } - Efl.Text_Font_Properties.font_family { get; set; } - Efl.Text_Font_Properties.font_size { get; set; } - Efl.Text_Font_Properties.font_source { get; set; } - Efl.Text_Font_Properties.font_fallbacks { get; set; } - Efl.Text_Font_Properties.font_lang { get; set; } - Efl.Text_Font_Properties.font_weight { get; set; } - Efl.Text_Font_Properties.font_slant { get; set; } - Efl.Text_Font_Properties.font_width { get; set; } - Efl.Text_Font_Properties.font_bitmap_scalable { get; set; } - Efl.Text_Style.text_color { get; set; } - Efl.Text_Style.text_background_type { get; set; } - Efl.Text_Style.text_background_color { get; set; } - Efl.Text_Style.text_underline_type { get; set; } - Efl.Text_Style.text_underline_color { get; set; } - Efl.Text_Style.text_underline_height { get; set; } - Efl.Text_Style.text_underline_dashed_color { get; set; } - Efl.Text_Style.text_underline_dashed_width { get; set; } - Efl.Text_Style.text_underline_dashed_gap { get; set; } - Efl.Text_Style.text_secondary_underline_color { get; set; } - Efl.Text_Style.text_strikethrough_type { get; set; } - Efl.Text_Style.text_strikethrough_color { get; set; } - Efl.Text_Style.text_effect_type { get; set; } - Efl.Text_Style.text_outline_color { get; set; } - Efl.Text_Style.text_shadow_direction { get; set; } - Efl.Text_Style.text_shadow_color { get; set; } - Efl.Text_Style.text_glow_color { get; set; } - Efl.Text_Style.text_secondary_glow_color { get; set; } - Efl.Text_Format.ellipsis { get; set; } - Efl.Text_Format.wrap { get; set; } - Efl.Text_Format.multiline { get; set; } - Efl.Text_Format.text_horizontal_align { get; set; } - Efl.Text_Format.text_horizontal_align_auto_type { get; set; } - Efl.Text_Format.text_vertical_align { get; set; } - Efl.Text_Format.line_gap { get; set; } - Efl.Text_Format.line_rel_gap { get; set; } - Efl.Text_Format.tab_stops { get; set; } - Efl.Text_Format.password { get; set; } - Efl.Text_Format.replacement_char { get; set; } - Efl.Text_Markup.markup { set; get; } - Efl.Gfx.Entity.scale { set; } - } - events { - changed: void; [[Called when canvas text changed ]] - layout,finished: void; [[Called when the object has been layed out]] - style_insets,changed: void; [[Called when the property @.style_insets changed.]] - } -} diff --git a/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo b/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo index 139ce703eb..f68f6dad11 100644 --- a/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo +++ b/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo @@ -1,4 +1,8 @@ -class Efl.Canvas.Textblock extends Efl.Canvas.Textblock_Base { +class Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, + Efl.Text_Font_Properties, + Efl.Text_Style, Efl.Text_Format, + Efl.Text_Markup, Efl.Ui.I18n +{ [[This is the Canvas-level text class. This class only takes care of rendering text, if you need user interaction consider the classes in $[Efl.Ui]. @@ -9,4 +13,486 @@ class Efl.Canvas.Textblock extends Efl.Canvas.Textblock_Base { @since 1.24 ]] + methods { + @property is_empty { + [[Whether the object is empty (no text) or not. + ]] + get { + } + values { + is_empty: bool; [[$true if empty.]] + } + } + cursor_create { + [[Creates a new cursor and adds it to the text object. + This cursor can be used to manipulate and iterate the content of the text object. + ]] + return: Efl.Text_Cursor.Object @move; [[The created text cursor.]] + } + visible_range_get { + [[Returns the currently visible range. + + The given $start and $end cursors are output variables: + they are set to the positions of the start and the end of the + visible range in the text, respectively. + ]] + return: bool; [[$true on success.]] + params { + @in start: Efl.Text_Cursor.Object; [[Range start position.]] + @in end: Efl.Text_Cursor.Object; [[Range end position.]] + } + } + @property style_insets { + [[Gets the left, right, top and bottom insets of the text. + + The inset is any applied padding on the text (which is calculated + internally by styling applied to Textblock). + ]] + get {} + values { + l: int; [[Left padding.]] + r: int; [[Right padding.]] + t: int; [[Top padding.]] + b: int; [[Bottom padding.]] + } + } + @property bidi_delimiters { + [[BiDi delimiters are used for in-paragraph separation of bidirectional + segments. This is useful, for example, in the recipient fields of + e-mail clients where bidi oddities can occur when mixing RTL (right-to-left) + and LTR (left-to-right) text. + ]] + set {} + get {} + values { + delim: string; [[A null terminated string of delimiters, e.g ",|" or $null if empty.]] + } + } + @property newline_as_paragraph_separator { + [[When $true, the newline character will behave as a paragraph separator. + Paragraph separator equal U+2029, and new line equal U+000A. + This will effect a lot of text behaviour like @Efl.Text_Cursor.Object.move method. + ]] + set {} + get {} + values { + mode: bool; [[$true to treat new line as paragraph separator, $false otherwise.]] + } + } + style_apply { + [[Applies several style attributes at once using a formatting string. + Given style attributes override previous values, leaving other attributes unaffected. + This is akin to setting individual style attributes using properties like + @Efl.Text_Font_Properties.font_slant or @Efl.Text_Format.wrap, for example. + + The formatting string is a whitespace-separated list of $[attribute=value] pairs. + + The following attributes are accepted: + + - $font: Name of the font to use. + Default value is empty, meaning that no text will be rendered. + Requires $font_size and $font_color. + See @Efl.Text_Font_Properties.font_family. + + - $font_fallbacks: Comma-delimited list of fonts to try if finding the primary font fails. + Example: $[font_fallbacks=consolas,courier,monospace]. + Default value is empty. + See @Efl.Text_Font_Properties.font_fallbacks. + + - $font_size: Height of font, in points. + Default value is 0. + Requires $font and $font_color. + See @Efl.Text_Font_Properties.font_size. + + - $font_source: Path to the file containing the font to use. + Example: $[font_source=/usr/share/fonts/Sans.ttf]. + Default value is empty. + See @Efl.Text_Font_Properties.font_source. + + - $font_weight: Thickness of the font. The value must be one of: $normal, $thin, $ultralight, $extralight, + $light, $book, $medium, $semibold, $bold, $ultrabold, $extrabold, $black and $extrablack. + Default value is $normal. + See @Efl.Text_Font_Properties.font_weight. + + - $font_style: Style of the font. The value must be one of: $normal, $oblique and $italic. + Default value is $normal. + See @Efl.Text_Font_Properties.font_slant. + + - $font_width: How wide the font is, relative to its height. The value must be one of: + $normal, $ultracondensed, $extracondensed, $condensed, $semicondensed, $semiexpanded, $expanded, + $extraexpanded and $ultraexpanded. + Default value is $normal. + See @Efl.Text_Font_Properties.font_weight. + + - $lang: A 2-letter ISO 639-1 language code, $auto (to use the system locale setting) or $none (to disable + language support). + Example: $[lang=he]. + Default value is empty. + See @Efl.Text_Font_Properties.font_lang. + + - $color: Color code for the text (See bottom for the complete list of supported codes). + Default value is $[rgba(0,0,0,0)] meaning that no text will be rendered. + Requires $font and $font_size. + See @Efl.Text_Style.text_color. + + - $underline_color: Color code for the text underline (See bottom for the complete list of supported codes). + Default value is $[rgba(0,0,0,0)] meaning that no underline will be rendered. + Requires $underline_type. + See @Efl.Text_Style.text_underline_color. + + - $secondary_underline_color: Color code for the secondary text underline (See bottom for the complete list + of supported codes). Only valid when $[underline_type=double]. + Default value is $[rgba(0,0,0,0)] meaning that secondary underline will not be rendered. + See @Efl.Text_Style.text_secondary_underline_color. + + - $underline_dashed_color: Color code for the dashed underline (See bottom for the complete list of supported + codes). Only valid when $[underline_type=dashed]. + Default value is $[rgba(0,0,0,0)] meaning that dashed underline will not be rendered. + See @Efl.Text_Style.text_underline_dashed_color. + + - $outline_color: Color code for the text outline (See bottom for the complete list of supported codes). + Only valid when the $effect_type attribute includes an outline. + Default value is $[rgba(0,0,0,0)] meaning that no outline will be rendered. + See @Efl.Text_Style.text_outline_color. + + - $shadow_color: Color code for the text shadow (See bottom for the complete list of supported codes). + Only valid when the $effect_type attribute includes a shadow. + Default value is $[rgba(0,0,0,0)] meaning that no shadow will be rendered. + See @Efl.Text_Style.text_shadow_color. + + - $glow_color: Color code for the glow component of the text (See bottom for the complete list of supported + codes). Only valid when the $effect_type attribute includes a glow. + Default value is $[rgba(0,0,0,0)] meaning that no glow will be rendered. + See @Efl.Text_Style.text_glow_color. + + - $secondary_glow_color: Color code for the secondary (inner) glow component of the text (See bottom for + the complete list of supported codes). Only valid when the $effect_type attribute includes a glow. + Default value is $[rgba(0,0,0,0)] meaning that only the primary $glow_color will be used. + See @Efl.Text_Style.text_secondary_glow_color. + + - $background_color: Color code for the background of the text (See bottom for the complete list of supported + codes). Use a fully transparent color to disable the background. + Default value is $[rgba(0,0,0,0)] meaning that no background will be rendered. + Requires $background_type. + See @Efl.Text_Style.text_background_color. + + - $strikethrough_color: Color code for the line striking through the text (See bottom for the complete list + of supported codes). Only valid when $[strikethrough_type=single] + Default value is $[rgba(0,0,0,0)] meaning that no strike-through line will be rendered. + See @Efl.Text_Style.text_strikethrough_color. + + - $align: Horizontal alignment of the text. The value can either be a decimal number ($[0.0] means "left" + and $[1.0] means "right"), a percentage ($[0%] means "left" and $[100%] means "right") or one of: + $auto (Respects LTR/RTL settings), $locale (Respects language direction settings), $center + (Centers the text in the line), $middle (Alias for $center), $left (Puts the text at the left of the line), + $right (Puts the text at the right of the line), $start (Alias for $auto), $end (Puts the text at the + opposite side of LTR/RTL settings). + Default value is $auto. + See @Efl.Text_Format.text_horizontal_align. + + - $valign: Vertical alignment of the text. The value can either be a decimal number ($[0.0] means "top" + and $[1.0] means "bottom"), a percentage ($[0%] means "top" and $[100%] means "bottom") or one of: + $top (Puts the text at the top of the text box), $center (Puts the text at the middle of the text box), + $middle (Alias for $center), $bottom (Puts the text at the bottom of the text box), + $baseline (Puts the text's baseline at the middle of the text box), $base (Alias for $baseline). + Default value is $baseline. + See @Efl.Text_Format.text_vertical_align. + + - $wrap: Wrapping policy of the text. The value must be one of the following: $word (Only wraps lines at + word boundaries), $char (Wraps at any character), $mixed (Wraps at word boundaries if possible, + at any character if not), $hyphenation (Hyphenate if possible, otherwise try wrapping at word boundaries + or at any character) or $none to disable wrapping. + Default value is $none. + See @Efl.Text_Format.wrap. + + - $left_margin: Distance in pixels from the left side of the text block to the beginning of the text + (inner margin). The value can be a number (to set the margin), or a number preceded by $[+] or $[-] + to increment or decrement the existing margin value. $reset is also accepted, to set the margin to + 0 pixels. + Default value is $[0]. + Examples: $[left_margin=10], $[left_margin=+10], $[left_margin=reset]. + + - $right_margin: Distance in pixels from the right side of the text block to the beginning of the text + (inner margin). The value can be a number (to set the margin), or a number preceded by $[+] or $[-] + to increment or decrement the existing margin value. $reset is also accepted, to set the margin to + 0 pixels. + Default value is $[0]. + Examples: $[right_margin=10], $[right_margin=+10], $[right_margin=reset]. + + - $underline_type: Style of the underline. The value must be one of $none (No underlining), + $single (A single line under the text) , $double (Two lines under the text), + $dashed (A dashed line under the text). + Default value is $none. + Requires either $underline_color, $secondary_underline_color or $underline_dashed_color. + See @Efl.Text_Style.text_underline_type. + + - $strikethrough_type: Enables crossed-out text. Possible values are $single and $none. + Default value is $none. + Requires $strikethrough_color. + See @Efl.Text_Style.text_strikethrough_type. + + - $background_type: Enables background color for the text. Possible values are $solid and $none. + Default value is $none. + Requires $background_color. + See @Efl.Text_Style.text_background_type. + + - $effect_type: Controls a number of decorations around the text, like shadow, outline and glow, including + combinations of them. Possible values are $none (No decoration), + $shadow, $outline, $soft_outline, $outline_shadow, $outline_soft_shadow, $glow (alias for $soft_outline), + $far_shadow, $soft_shadow and $far_soft_shadow. + Default value is $none. + Requires either $shadow_color, $glow_color or $outline_color. + See @Efl.Text_Style.text_effect_type + + - $shadow_direction: Indicate the shadow direction. Valid positions are $bottom_right, $bottom, $bottom_left, $left, $top_left, $top, $top_right + and $right. + Requires either $effect_type. + See @Efl.Text_Style.text_shadow_direction. + + - $tab_stops: Size (in pixels) of the tab character. The value must be a number greater than one. + Default value is $[32]. + See @Efl.Text_Format.tab_stops. + + - $line_size: Distance (in pixels) from the baseline of one line of text to the next. This is, a value of + $[0] would render all lines on top of each other (However, this value will be ignored if it results in + overlapping lines of text). + Setting this value sets $line_rel_size to $[0%] (disables it). + Default value is $[0]. + + - $line_rel_size: Distance (in percentage over the natural line height) from the baseline of one line of + text to the next. A value of $[100%] does not have any impact, smaller values render lines closer together + and bigger values render them further apart. + Setting this value sets $line_size to $[0] (disables it). + Default value is $[0%]. + + - $line_gap: Additional empty space (in pixels) between the bottom of one line of text and the top of the + next. Setting this value sets $line_rel_gap to $[0%] (disables it). + Default value is $[0]. + See @Efl.Text_Format.line_gap. + + - $line_rel_gap: Additional empty space (in percentage over the natural line height) between the bottom of + one line of text and the top of the next. + Setting this value sets $line_gap to $[0] (disables it). + Default value is $[0%]. + See @Efl.Text_Format.line_rel_gap. + + - $line_fill: An alternate way to specify the $line_size as a percentage of the canvas height. + A value of $[100%] means that a single line fills the canvas, whereas $[25%] means that 4 lines + fit in the same height. + When both $line_fill and $line_size are specified the one resulting in the smallest line size is used. + Default value is $[0]. + + - $ellipsis: Controls automatic addition of ellipsis "..." to replace text which cannot be shown. + The value must be a number indicating the position of the ellipsis inside the visible text. + $[0.0] means the beginning of the text, $[1.0] means the end of the text, and values in between + mean the proportional position inside the text. + Any value smaller than 0 or greater than 1 disables ellipsis. + Default value is $[-1]. + Examples: $[ellipsis=0.5 + See @Efl.Text_Format.ellipsis. + + - $password: Enabling this causes all characters to be replaced by $replacement_char. + This is useful for password input boxes. + Value must be either $on or $off. + Default value is $[off]. + Requires $replacement_char. + See @Efl.Text_Format.password. + + - $replacement_char: Character to use instead of the actual characters when $password is $on. + Default value is empty, meaning that no replacement will take place. + Requires $password. + Examples: $[replacement_char=*]. + See @Efl.Text_Format.replacement_char. + + - $underline_dashed_width: Length (in pixels) of the dashes when $underline_type is $dashed. + Default value is $[6]. + See @Efl.Text_Style.text_underline_dashed_width. + + - $underline_dashed_gap: Length (in pixels) of the gaps between the dashes when $underline_type is $dashed. + Default value is $[2]. + See @Efl.Text_Style.text_underline_dashed_gap. + + - $underline_height: Width (in pixels) of the single underline when $underline_type is $single. + Default value is $[1]. + See @Efl.Text_Style.text_underline_height. + + - gfx_filter: Experimental filter name. See Efl.Gfx.Filter for more information. + + Color codes: Colors can be specified using any of the following formats: + $[#RRGGBB], $[#RRGGBBAA], $[#RGB], $[#RGBA], $[rgb(r,g,b)], $[rgba(r,g,b,a)]. + Additionally, X11 color names like $red or $blanchedalmond can be used. + See https://en.wikipedia.org/wiki/X11_color_names for the full list. + ]] + + params { + @in style: string; [[A whitespace-separated list of $[attribute=value] pairs, for example, + $[font=sans font_size=30 color=white].]] + } + } + @property all_styles { + [[A string representing the complete set of attributes applied to this text object. + This includes the default attributes plus any additional style applied with @.style_apply + or individual style properties like @Efl.Text_Font_Properties.font_slant or @Efl.Text_Format.wrap. + + See @.style_apply for the description of all attributes. + ]] + get {} + values { + style: string; [[A whitespace-separated list of $[attribute=value] pairs, for example, + $[font=sans font_size=30 color=white].]] + } + } + @property size_formatted { + [[The formatted width and height of this text block. + + This calculates the actual size after restricting the + text block to the current size of the object. + + The main difference between this and @.size_native + is that the "native" function does not take wrapping into account: + it just calculates the real width of the object as if it was + placed on an infinite canvas, while @.size_formatted gives the + size after wrapping text according to the size restrictions of the + object. + + The formatted width and height do not include padding size. + To get the total size of text with style, you need to query padding size + from @.style_insets. + + For example a text block containing the text: + "You shall not pass!" with no margins or padding and assuming + a monospace font and a size of 7x10 char widths (for simplicity) + has a native size of 19x1 and a formatted size of 5x4. + ]] + get {} + values { + size: Eina.Size2D; [[The formatted size of the object (after wrapping).]] + } + } + @property size_native { + [[The native width and height of this text block. + + This calculates the actual size without taking account the + current size of the object. + + The main difference between this and @.size_formatted + is that the "native" function does not take wrapping into account: + it just calculates the real width of the object as if it was + placed on an infinite canvas, while @.size_formatted gives the + size after wrapping text according to the size restrictions of the + object. + + The native width and height do not include padding size. + To get the total size of text with style, you need to query padding size + from @.style_insets. + + For example a text block containing the text: + "You shall not pass!" with no margins or padding and assuming + a monospace font and a size of 7x10 char widths (for simplicity) + has a native size of 19x1 and a formatted size of 5x4. + ]] + get {} + values { + size: Eina.Size2D; [[The native size of the object (without wrapping).]] + } + } + // Obstacles + obstacle_add @beta { + [[Add obstacle object $eo_obs to be avoided during layout + of text. + + The textblock does the layout of the text according to the + position of the obstacle. + ]] + params { + @in eo_obs: Efl.Canvas.Object; [[Obstacle object.]] + } + return: bool; [[$true on success.]] + } + obstacle_del @beta { + [[Removes $eo_obs from observation during text layout. + ]] + params { + @in eo_obs: Efl.Canvas.Object; [[Obstacle object.]] + } + return: bool; [[$true on success.]] + } + obstacles_update @beta { + [[Triggers for relayout due to obstacles' state change. + + The obstacles alone don't affect the layout, until this is + called. Use this after doing changes (moving, positioning etc.) + in the obstacles that you would like to be considered in the + layout. + + For example: if you have just repositioned the obstacles to + different coordinates relative to the text block, you need to + call this so it will consider this new state and will relayout + the text. + ]] + } + async_layout { + [[Requests to layout the text off the mainloop. + + Once layout is complete, the result is returned as @Eina.Rect, + with the $w and $h fields set. + + This can be used to layout Textblock before it is required + to layout internally in back thread, which can enhance application + performance. + ]] + return: future; [[Future for layout result.]] + } + } + implements { + Efl.Object.constructor; + Efl.Object.destructor; + Efl.Canvas.Object.paragraph_direction { get; set; } + Efl.Text.text { get; set; } + Efl.Text_Font_Properties.font_family { get; set; } + Efl.Text_Font_Properties.font_size { get; set; } + Efl.Text_Font_Properties.font_source { get; set; } + Efl.Text_Font_Properties.font_fallbacks { get; set; } + Efl.Text_Font_Properties.font_lang { get; set; } + Efl.Text_Font_Properties.font_weight { get; set; } + Efl.Text_Font_Properties.font_slant { get; set; } + Efl.Text_Font_Properties.font_width { get; set; } + Efl.Text_Font_Properties.font_bitmap_scalable { get; set; } + Efl.Text_Style.text_color { get; set; } + Efl.Text_Style.text_background_type { get; set; } + Efl.Text_Style.text_background_color { get; set; } + Efl.Text_Style.text_underline_type { get; set; } + Efl.Text_Style.text_underline_color { get; set; } + Efl.Text_Style.text_underline_height { get; set; } + Efl.Text_Style.text_underline_dashed_color { get; set; } + Efl.Text_Style.text_underline_dashed_width { get; set; } + Efl.Text_Style.text_underline_dashed_gap { get; set; } + Efl.Text_Style.text_secondary_underline_color { get; set; } + Efl.Text_Style.text_strikethrough_type { get; set; } + Efl.Text_Style.text_strikethrough_color { get; set; } + Efl.Text_Style.text_effect_type { get; set; } + Efl.Text_Style.text_outline_color { get; set; } + Efl.Text_Style.text_shadow_direction { get; set; } + Efl.Text_Style.text_shadow_color { get; set; } + Efl.Text_Style.text_glow_color { get; set; } + Efl.Text_Style.text_secondary_glow_color { get; set; } + Efl.Text_Format.ellipsis { get; set; } + Efl.Text_Format.wrap { get; set; } + Efl.Text_Format.multiline { get; set; } + Efl.Text_Format.text_horizontal_align { get; set; } + Efl.Text_Format.text_horizontal_align_auto_type { get; set; } + Efl.Text_Format.text_vertical_align { get; set; } + Efl.Text_Format.line_gap { get; set; } + Efl.Text_Format.line_rel_gap { get; set; } + Efl.Text_Format.tab_stops { get; set; } + Efl.Text_Format.password { get; set; } + Efl.Text_Format.replacement_char { get; set; } + Efl.Text_Markup.markup { set; get; } + Efl.Gfx.Entity.scale { set; } + } + events { + changed: void; [[Called when canvas text changed ]] + layout,finished: void; [[Called when the object has been layed out]] + style_insets,changed: void; [[Called when the property @.style_insets changed.]] + } } diff --git a/src/lib/evas/canvas/efl_canvas_textblock_vg.eo b/src/lib/evas/canvas/efl_canvas_textblock_vg.eo index e923532515..ba70b71517 100644 --- a/src/lib/evas/canvas/efl_canvas_textblock_vg.eo +++ b/src/lib/evas/canvas/efl_canvas_textblock_vg.eo @@ -1,4 +1,7 @@ -class Efl.Canvas.Textblock extends Efl.Canvas.Textblock_Base implements Efl.Canvas.Filter.Internal +class Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, + Efl.Canvas.Filter.Internal, Efl.Text_Font_Properties, + Efl.Text_Style, Efl.Text_Format, + Efl.Text_Markup, Efl.Ui.I18n { [[This is the Canvas-level text class. This class only takes care of rendering text, if you need user interaction consider the classes in $[Efl.Ui]. @@ -11,6 +14,71 @@ class Efl.Canvas.Textblock extends Efl.Canvas.Textblock_Base implements Efl.Canv @since 1.24 ]] methods { + @property is_empty { + [[Whether the object is empty (no text) or not. + ]] + get { + } + values { + is_empty: bool; [[$true if empty.]] + } + } + cursor_create { + [[Creates a new cursor and adds it to the text object. + This cursor can be used to manipulate and iterate the content of the text object. + ]] + return: Efl.Text_Cursor.Object @move; [[The created text cursor.]] + } + visible_range_get { + [[Returns the currently visible range. + + The given $start and $end cursors are output variables: + they are set to the positions of the start and the end of the + visible range in the text, respectively. + ]] + return: bool; [[$true on success.]] + params { + @in start: Efl.Text_Cursor.Object; [[Range start position.]] + @in end: Efl.Text_Cursor.Object; [[Range end position.]] + } + } + @property style_insets { + [[Gets the left, right, top and bottom insets of the text. + + The inset is any applied padding on the text (which is calculated + internally by styling applied to Textblock). + ]] + get {} + values { + l: int; [[Left padding.]] + r: int; [[Right padding.]] + t: int; [[Top padding.]] + b: int; [[Bottom padding.]] + } + } + @property bidi_delimiters { + [[BiDi delimiters are used for in-paragraph separation of bidirectional + segments. This is useful, for example, in the recipient fields of + e-mail clients where bidi oddities can occur when mixing RTL (right-to-left) + and LTR (left-to-right) text. + ]] + set {} + get {} + values { + delim: string; [[A null terminated string of delimiters, e.g ",|" or $null if empty.]] + } + } + @property newline_as_paragraph_separator { + [[When $true, the newline character will behave as a paragraph separator. + Paragraph separator equal U+2029, and new line equal U+000A. + This will effect a lot of text behaviour like @Efl.Text_Cursor.Object.move method. + ]] + set {} + get {} + values { + mode: bool; [[$true to treat new line as paragraph separator, $false otherwise.]] + } + } style_apply { [[Applies several style attributes at once using a formatting string. Given style attributes override previous values, leaving other attributes unaffected. @@ -261,14 +329,177 @@ class Efl.Canvas.Textblock extends Efl.Canvas.Textblock_Base implements Efl.Canv $[font=sans font_size=30 color=white].]] } } + @property all_styles { + [[A string representing the complete set of attributes applied to this text object. + This includes the default attributes plus any additional style applied with @.style_apply + or individual style properties like @Efl.Text_Font_Properties.font_slant or @Efl.Text_Format.wrap. + + See @.style_apply for the description of all attributes. + ]] + get {} + values { + style: string; [[A whitespace-separated list of $[attribute=value] pairs, for example, + $[font=sans font_size=30 color=white].]] + } + } + @property size_formatted { + [[The formatted width and height of this text block. + + This calculates the actual size after restricting the + text block to the current size of the object. + + The main difference between this and @.size_native + is that the "native" function does not take wrapping into account: + it just calculates the real width of the object as if it was + placed on an infinite canvas, while @.size_formatted gives the + size after wrapping text according to the size restrictions of the + object. + + The formatted width and height do not include padding size. + To get the total size of text with style, you need to query padding size + from @.style_insets. + + For example a text block containing the text: + "You shall not pass!" with no margins or padding and assuming + a monospace font and a size of 7x10 char widths (for simplicity) + has a native size of 19x1 and a formatted size of 5x4. + ]] + get {} + values { + size: Eina.Size2D; [[The formatted size of the object (after wrapping).]] + } + } + @property size_native { + [[The native width and height of this text block. + + This calculates the actual size without taking account the + current size of the object. + + The main difference between this and @.size_formatted + is that the "native" function does not take wrapping into account: + it just calculates the real width of the object as if it was + placed on an infinite canvas, while @.size_formatted gives the + size after wrapping text according to the size restrictions of the + object. + + The native width and height do not include padding size. + To get the total size of text with style, you need to query padding size + from @.style_insets. + + For example a text block containing the text: + "You shall not pass!" with no margins or padding and assuming + a monospace font and a size of 7x10 char widths (for simplicity) + has a native size of 19x1 and a formatted size of 5x4. + ]] + get {} + values { + size: Eina.Size2D; [[The native size of the object (without wrapping).]] + } + } + // Obstacles + obstacle_add @beta { + [[Add obstacle object $eo_obs to be avoided during layout + of text. + + The textblock does the layout of the text according to the + position of the obstacle. + ]] + params { + @in eo_obs: Efl.Canvas.Object; [[Obstacle object.]] + } + return: bool; [[$true on success.]] + } + obstacle_del @beta { + [[Removes $eo_obs from observation during text layout. + ]] + params { + @in eo_obs: Efl.Canvas.Object; [[Obstacle object.]] + } + return: bool; [[$true on success.]] + } + obstacles_update @beta { + [[Triggers for relayout due to obstacles' state change. + + The obstacles alone don't affect the layout, until this is + called. Use this after doing changes (moving, positioning etc.) + in the obstacles that you would like to be considered in the + layout. + + For example: if you have just repositioned the obstacles to + different coordinates relative to the text block, you need to + call this so it will consider this new state and will relayout + the text. + ]] + } + async_layout { + [[Requests to layout the text off the mainloop. + + Once layout is complete, the result is returned as @Eina.Rect, + with the $w and $h fields set. + + This can be used to layout Textblock before it is required + to layout internally in back thread, which can enhance application + performance. + ]] + return: future; [[Future for layout result.]] + } } implements { + Efl.Object.constructor; + Efl.Object.destructor; + Efl.Canvas.Object.paragraph_direction { get; set; } + Efl.Text.text { get; set; } Efl.Gfx.Filter.filter_program { get; set; } Efl.Gfx.Filter.filter_data { get; set; } Efl.Gfx.Filter.filter_source { get; set; } Efl.Canvas.Filter.Internal.filter_dirty; Efl.Canvas.Filter.Internal.filter_input_render; Efl.Canvas.Filter.Internal.filter_state_prepare; + Efl.Text_Font_Properties.font_family { get; set; } + Efl.Text_Font_Properties.font_size { get; set; } + Efl.Text_Font_Properties.font_source { get; set; } + Efl.Text_Font_Properties.font_fallbacks { get; set; } + Efl.Text_Font_Properties.font_lang { get; set; } + Efl.Text_Font_Properties.font_weight { get; set; } + Efl.Text_Font_Properties.font_slant { get; set; } + Efl.Text_Font_Properties.font_width { get; set; } + Efl.Text_Font_Properties.font_bitmap_scalable { get; set; } + Efl.Text_Style.text_color { get; set; } + Efl.Text_Style.text_background_type { get; set; } + Efl.Text_Style.text_background_color { get; set; } + Efl.Text_Style.text_underline_type { get; set; } + Efl.Text_Style.text_underline_color { get; set; } + Efl.Text_Style.text_underline_height { get; set; } + Efl.Text_Style.text_underline_dashed_color { get; set; } + Efl.Text_Style.text_underline_dashed_width { get; set; } + Efl.Text_Style.text_underline_dashed_gap { get; set; } + Efl.Text_Style.text_secondary_underline_color { get; set; } + Efl.Text_Style.text_strikethrough_type { get; set; } + Efl.Text_Style.text_strikethrough_color { get; set; } + Efl.Text_Style.text_effect_type { get; set; } + Efl.Text_Style.text_outline_color { get; set; } + Efl.Text_Style.text_shadow_direction { get; set; } + Efl.Text_Style.text_shadow_color { get; set; } + Efl.Text_Style.text_glow_color { get; set; } + Efl.Text_Style.text_secondary_glow_color { get; set; } Efl.Text_Style.text_gfx_filter { get; set; } + Efl.Text_Format.ellipsis { get; set; } + Efl.Text_Format.wrap { get; set; } + Efl.Text_Format.multiline { get; set; } + Efl.Text_Format.text_horizontal_align { get; set; } + Efl.Text_Format.text_horizontal_align_auto_type { get; set; } + Efl.Text_Format.text_vertical_align { get; set; } + Efl.Text_Format.line_gap { get; set; } + Efl.Text_Format.line_rel_gap { get; set; } + Efl.Text_Format.tab_stops { get; set; } + Efl.Text_Format.password { get; set; } + Efl.Text_Format.replacement_char { get; set; } + Efl.Text_Markup.markup { set; get; } + Efl.Gfx.Entity.scale { set; } + } + events { + changed: void; [[Called when canvas text changed ]] + layout,finished: void; [[Called when the object has been layed out]] + style_insets,changed: void; [[Called when the property @.style_insets changed.]] } } diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build index aa6be29c9c..2912e8e421 100644 --- a/src/lib/evas/canvas/meson.build +++ b/src/lib/evas/canvas/meson.build @@ -38,7 +38,6 @@ eolian_include_directories += ['-I', meson.current_build_dir()] pub_eo_files = [ 'efl_canvas_polygon.eo', - 'efl_canvas_image_internal_base.eo', 'efl_canvas_image.eo', 'efl_canvas_snapshot.eo', 'efl_canvas_proxy.eo', @@ -64,11 +63,9 @@ pub_eo_files = [ 'efl_canvas_textblock_factory.eo', 'efl_canvas_rectangle.eo', 'efl_canvas_object.eo', - 'efl_canvas_group_base.eo', 'efl_gfx_mapping.eo', 'efl_canvas_event_grabber.eo', 'efl_text_cursor_object.eo', - 'efl_canvas_textblock_base.eo', 'efl_text_formatter.eo', 'efl_canvas_object_animation.eo', ] From 498314360ad307132e92d53ed674b4e98189db63 Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Thu, 19 Nov 2020 09:43:31 -0300 Subject: [PATCH 07/13] Evas: Remove debug warning and add install dir to evas/canvas/meson.build --- src/lib/evas/canvas/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build index 2912e8e421..aa420047e9 100644 --- a/src/lib/evas/canvas/meson.build +++ b/src/lib/evas/canvas/meson.build @@ -12,7 +12,6 @@ foreach eo_file : pub_eo_files_optional_ector endif eo_file = eo_file[0] - warning(eo_file) configure_file( input : in_eo, output : eo_file, @@ -23,6 +22,8 @@ foreach eo_file : pub_eo_files_optional_ector input : meson.current_build_dir() / eo_file, output : [eo_file + '.h'], depfile : eo_file + '.d', + install : true, + install_dir : join_paths(dir_package_include, 'canvas'), command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories, '-o', 'h:' + meson.current_build_dir() / eo_file + '.h', '-o', 'c:' + meson.current_build_dir() / eo_file + '.c', From 2218714feb2087e3e30fc185907e52a6c673636f Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Thu, 19 Nov 2020 10:37:25 -0300 Subject: [PATCH 08/13] Efl: Refactor interfaces/meson.build --- src/lib/efl/interfaces/meson.build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index 54c442a6c5..0a69624b4a 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -31,21 +31,21 @@ foreach eo_file : pub_legacy_eo_files '-gchd', '@INPUT@']) endforeach +eo_file = 'efl_text_style.eo' if get_option('ector') configure_file( input : 'efl_text_style_vg.eo', - output : 'efl_text_style.eo', + output : eo_file, copy : true, ) else configure_file( input : 'efl_text_style_non_vg.eo', - output : 'efl_text_style.eo', + output : eo_file, copy : true, ) endif -eo_file = 'efl_text_style.eo' pub_eo_file_text_style = [meson.current_build_dir() / eo_file] pub_eo_file_target += custom_target('eolian_gen_' + eo_file, input : meson.current_build_dir() / eo_file, @@ -54,9 +54,9 @@ pub_eo_file_target += custom_target('eolian_gen_' + eo_file, install : true, install_dir : join_paths(dir_package_include, 'interfaces'), command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories, - '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), - '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), - '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'), + '-o', 'h:' + meson.current_build_dir() / eo_file + '.h', + '-o', 'c:' + meson.current_build_dir() / eo_file + '.c', + '-o', 'd:' + meson.current_build_dir() / eo_file + '.d', '-gchd', '@INPUT@']) From 00acb1407b69bd02c19d54734264dc3ffb3918be Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Thu, 19 Nov 2020 16:56:45 -0300 Subject: [PATCH 09/13] cxx: Rework cxx binding meson.build to build the new eo class --- src/bindings/cxx/meson.build | 11 +++++++++-- src/lib/efl/interfaces/meson.build | 1 + src/lib/evas/canvas/meson.build | 13 +++++++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/bindings/cxx/meson.build b/src/bindings/cxx/meson.build index e62b7a2387..60c441e449 100644 --- a/src/bindings/cxx/meson.build +++ b/src/bindings/cxx/meson.build @@ -63,15 +63,22 @@ foreach lib : cxx_sublibs endif subdir_file_location = join_paths(file_location, eo_file_subdir) foreach cxx_gen_file : cxx_pub_eo_files + if (package_name == 'evas' or package_name == 'efl') and cxx_gen_file in pub_eo_files_optional_ector + cxx_gen_file_input = cxx_gen_file + cxx_gen_file = '@0@'.format(cxx_gen_file) + cxx_gen_file = cxx_gen_file.split('/')[-1] + else + cxx_gen_file_input = join_paths(subdir_file_location, cxx_gen_file) + endif cxx_generator_target += custom_target('eolian_cxx_gen_'+cxx_gen_file.underscorify()+'', - input : join_paths(subdir_file_location, cxx_gen_file), + input : cxx_gen_file_input, output : [cxx_gen_file + '.hh', cxx_gen_file + '.impl.hh'], install : true, install_dir : join_paths(dir_include, package_version_name, eo_file_subdir), command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories, '-o', join_paths(meson.current_build_dir(), cxx_gen_file + '.hh'), '@INPUT@']) - eo_file_list += files(join_paths(subdir_file_location, cxx_gen_file)) + eo_file_list += files(cxx_gen_file_input) endforeach endforeach diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index 0a69624b4a..31bc0056c5 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -59,6 +59,7 @@ pub_eo_file_target += custom_target('eolian_gen_' + eo_file, '-o', 'd:' + meson.current_build_dir() / eo_file + '.d', '-gchd', '@INPUT@']) +pub_eo_files_optional_ector = [meson.current_build_dir() / eo_file] eolian_include_directories += ['-I', meson.current_build_dir()] diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build index aa420047e9..046daccae8 100644 --- a/src/lib/evas/canvas/meson.build +++ b/src/lib/evas/canvas/meson.build @@ -1,10 +1,10 @@ -pub_eo_files_optional_ector = [ +pub_eo_files_optional_ector_ = [ ['efl_canvas_group.eo', 'efl_canvas_group_vg.eo', 'efl_canvas_group_non_vg.eo'], ['efl_canvas_image_internal.eo', 'efl_canvas_image_internal_vg.eo', 'efl_canvas_image_internal_non_vg.eo'], ['efl_canvas_textblock.eo', 'efl_canvas_textblock_vg.eo', 'efl_canvas_textblock_non_vg.eo'], ] -foreach eo_file : pub_eo_files_optional_ector +foreach eo_file : pub_eo_files_optional_ector_ if get_option('ector') in_eo = eo_file[1] else @@ -31,10 +31,15 @@ foreach eo_file : pub_eo_files_optional_ector '-gchd', '@INPUT@']) endforeach -foreach eo_file_list : pub_eo_files_optional_ector +evas_canvas_eo_files = [] + +foreach eo_file_list : pub_eo_files_optional_ector_ pub_evas_eo_files += files(meson.current_build_dir()/eo_file_list[0]) + pub_eo_files_optional_ector += meson.current_build_dir() / eo_file_list[0] endforeach +evas_canvas_eo_files += pub_eo_files_optional_ector + eolian_include_directories += ['-I', meson.current_build_dir()] pub_eo_files = [ @@ -106,7 +111,7 @@ foreach eo_file : priv_eo_files endforeach -evas_canvas_eo_files = pub_eo_files +evas_canvas_eo_files += pub_eo_files pub_evas_eo_files += files(pub_eo_files) From 96ac9bd9e5cba24e0179bf0f0118359ca8397a2c Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Thu, 19 Nov 2020 18:18:25 -0300 Subject: [PATCH 10/13] Eolian: Add generated eo's to eolian test suit --- ...xt_style_non_vg.eo => efl_text_style_non_vg.eo_template} | 0 .../{efl_text_style_vg.eo => efl_text_style_vg.eo_template} | 0 src/lib/efl/interfaces/meson.build | 4 ++-- ..._group_non_vg.eo => efl_canvas_group_non_vg.eo_template} | 0 ...l_canvas_group_vg.eo => efl_canvas_group_vg.eo_template} | 0 ...n_vg.eo => efl_canvas_image_internal_non_vg.eo_template} | 0 ...ernal_vg.eo => efl_canvas_image_internal_vg.eo_template} | 0 ...ck_non_vg.eo => efl_canvas_textblock_non_vg.eo_template} | 0 ..._textblock_vg.eo => efl_canvas_textblock_vg.eo_template} | 0 src/lib/evas/canvas/meson.build | 6 +++--- src/tests/eolian/eolian_static.c | 1 + src/tests/eolian/meson.build | 1 + 12 files changed, 7 insertions(+), 5 deletions(-) rename src/lib/efl/interfaces/{efl_text_style_non_vg.eo => efl_text_style_non_vg.eo_template} (100%) rename src/lib/efl/interfaces/{efl_text_style_vg.eo => efl_text_style_vg.eo_template} (100%) rename src/lib/evas/canvas/{efl_canvas_group_non_vg.eo => efl_canvas_group_non_vg.eo_template} (100%) rename src/lib/evas/canvas/{efl_canvas_group_vg.eo => efl_canvas_group_vg.eo_template} (100%) rename src/lib/evas/canvas/{efl_canvas_image_internal_non_vg.eo => efl_canvas_image_internal_non_vg.eo_template} (100%) rename src/lib/evas/canvas/{efl_canvas_image_internal_vg.eo => efl_canvas_image_internal_vg.eo_template} (100%) rename src/lib/evas/canvas/{efl_canvas_textblock_non_vg.eo => efl_canvas_textblock_non_vg.eo_template} (100%) rename src/lib/evas/canvas/{efl_canvas_textblock_vg.eo => efl_canvas_textblock_vg.eo_template} (100%) diff --git a/src/lib/efl/interfaces/efl_text_style_non_vg.eo b/src/lib/efl/interfaces/efl_text_style_non_vg.eo_template similarity index 100% rename from src/lib/efl/interfaces/efl_text_style_non_vg.eo rename to src/lib/efl/interfaces/efl_text_style_non_vg.eo_template diff --git a/src/lib/efl/interfaces/efl_text_style_vg.eo b/src/lib/efl/interfaces/efl_text_style_vg.eo_template similarity index 100% rename from src/lib/efl/interfaces/efl_text_style_vg.eo rename to src/lib/efl/interfaces/efl_text_style_vg.eo_template diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index 31bc0056c5..d92978c4f5 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -34,13 +34,13 @@ endforeach eo_file = 'efl_text_style.eo' if get_option('ector') configure_file( - input : 'efl_text_style_vg.eo', + input : 'efl_text_style_vg.eo_template', output : eo_file, copy : true, ) else configure_file( - input : 'efl_text_style_non_vg.eo', + input : 'efl_text_style_non_vg.eo_template', output : eo_file, copy : true, ) diff --git a/src/lib/evas/canvas/efl_canvas_group_non_vg.eo b/src/lib/evas/canvas/efl_canvas_group_non_vg.eo_template similarity index 100% rename from src/lib/evas/canvas/efl_canvas_group_non_vg.eo rename to src/lib/evas/canvas/efl_canvas_group_non_vg.eo_template diff --git a/src/lib/evas/canvas/efl_canvas_group_vg.eo b/src/lib/evas/canvas/efl_canvas_group_vg.eo_template similarity index 100% rename from src/lib/evas/canvas/efl_canvas_group_vg.eo rename to src/lib/evas/canvas/efl_canvas_group_vg.eo_template diff --git a/src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo b/src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo_template similarity index 100% rename from src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo rename to src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo_template diff --git a/src/lib/evas/canvas/efl_canvas_image_internal_vg.eo b/src/lib/evas/canvas/efl_canvas_image_internal_vg.eo_template similarity index 100% rename from src/lib/evas/canvas/efl_canvas_image_internal_vg.eo rename to src/lib/evas/canvas/efl_canvas_image_internal_vg.eo_template diff --git a/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo b/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo_template similarity index 100% rename from src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo rename to src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo_template diff --git a/src/lib/evas/canvas/efl_canvas_textblock_vg.eo b/src/lib/evas/canvas/efl_canvas_textblock_vg.eo_template similarity index 100% rename from src/lib/evas/canvas/efl_canvas_textblock_vg.eo rename to src/lib/evas/canvas/efl_canvas_textblock_vg.eo_template diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build index 046daccae8..f6a5bf0175 100644 --- a/src/lib/evas/canvas/meson.build +++ b/src/lib/evas/canvas/meson.build @@ -1,7 +1,7 @@ pub_eo_files_optional_ector_ = [ - ['efl_canvas_group.eo', 'efl_canvas_group_vg.eo', 'efl_canvas_group_non_vg.eo'], - ['efl_canvas_image_internal.eo', 'efl_canvas_image_internal_vg.eo', 'efl_canvas_image_internal_non_vg.eo'], - ['efl_canvas_textblock.eo', 'efl_canvas_textblock_vg.eo', 'efl_canvas_textblock_non_vg.eo'], + ['efl_canvas_group.eo', 'efl_canvas_group_vg.eo_template', 'efl_canvas_group_non_vg.eo_template'], + ['efl_canvas_image_internal.eo', 'efl_canvas_image_internal_vg.eo_template', 'efl_canvas_image_internal_non_vg.eo_template'], + ['efl_canvas_textblock.eo', 'efl_canvas_textblock_vg.eo_template', 'efl_canvas_textblock_non_vg.eo_template'], ] foreach eo_file : pub_eo_files_optional_ector_ diff --git a/src/tests/eolian/eolian_static.c b/src/tests/eolian/eolian_static.c index 18c8d13742..f950f33e79 100644 --- a/src/tests/eolian/eolian_static.c +++ b/src/tests/eolian/eolian_static.c @@ -10,6 +10,7 @@ EFL_START_TEST(eolian_static_check) { Eolian_State *eos = eolian_state_new(); fail_if(!eolian_state_directory_add(eos, EO_SRC_DIR)); + fail_if(!eolian_state_directory_add(eos, EO_BUILD_DIR)); fail_if(!eolian_state_all_eot_files_parse(eos)); fail_if(!eolian_state_all_eo_files_parse(eos)); /* too many failures to enable this yet */ diff --git a/src/tests/eolian/meson.build b/src/tests/eolian/meson.build index f4b6cdc6f1..dc323e5f19 100644 --- a/src/tests/eolian/meson.build +++ b/src/tests/eolian/meson.build @@ -32,6 +32,7 @@ eolian_suite = executable('eolian_suite', '-DEOLIAN_GEN="'+eolian_gen_path+'"', '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', '-DEO_SRC_DIR="'+join_paths(meson.source_root(), 'src', 'lib')+'"', + '-DEO_BUILD_DIR="'+meson.build_root() / 'src' / 'lib'+'"', '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] ) From ec628cf252230dec2bd870703b7f2b2b960f6eee Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Fri, 20 Nov 2020 15:21:55 -0300 Subject: [PATCH 11/13] Eolian-cxx: Take eo classes at build into account --- src/tests/eolian_cxx/eolian_cxx_test_binding.cc | 3 ++- src/tests/eolian_cxx/meson.build | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc index 98020bf919..b0a944c7de 100644 --- a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc +++ b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc @@ -75,7 +75,7 @@ EFL_START_TEST(eolian_cxx_test_binding_constructor_all_optionals) g.optional_ctor_b(5); } ); - + ck_assert_int_eq(2, g.req_ctor_a_value_get()); ck_assert_int_eq(3, g.opt_ctor_a_value_get()); ck_assert_int_eq(4, g.req_ctor_b_value_get()); @@ -221,6 +221,7 @@ klass_def init_test_data(std::string const target_file, std::string const target { ck_assert(::eolian_state_directory_add(state.value, TESTS_SRC_DIR)); ck_assert(::eolian_state_directory_add(state.value, EO_SRC_DIR)); + ck_assert(::eolian_state_directory_add(state.value, EO_BUILD_DIR)); ck_assert(::eolian_state_all_eot_files_parse(state.value)); ck_assert(::eolian_state_file_parse(state.value, target_file.c_str())); diff --git a/src/tests/eolian_cxx/meson.build b/src/tests/eolian_cxx/meson.build index 23b2727eaf..5344ae3961 100644 --- a/src/tests/eolian_cxx/meson.build +++ b/src/tests/eolian_cxx/meson.build @@ -65,6 +65,7 @@ eolian_cxx_suite = executable('eolian_cxx_suite', cpp_args : package_c_args +[ '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', '-DEO_SRC_DIR="'+join_paths(meson.source_root(), 'src', 'lib')+'"', + '-DEO_BUILD_DIR="'+meson.build_root() / 'src' / 'lib'+'"', '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] ) From 00515a89c1bb0934d739ad3a52e9fe281472bec5 Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Fri, 20 Nov 2020 16:19:27 -0300 Subject: [PATCH 12/13] mono: Take eo classes at build into account --- src/bindings/mono/meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build index 74f2d06de7..2c9e419cbd 100644 --- a/src/bindings/mono/meson.build +++ b/src/bindings/mono/meson.build @@ -92,13 +92,20 @@ foreach lib : mono_sublibs subdir_file_location = join_paths(file_location, eo_file_subdir) foreach mono_gen_file : mono_pub_eo_files + if mono_gen_file in pub_eo_files_optional_ector + mono_gen_file_input = mono_gen_file + mono_gen_file = '@0@'.format(mono_gen_file) + mono_gen_file = mono_gen_file.split('/')[-1] + else + mono_gen_file_input = subdir_file_location / mono_gen_file + endif if not blacklisted_files.contains(mono_gen_file) partial = [] if manual_inheritance_files.contains(mono_gen_file) partial = '-p' endif mono_generator_target += custom_target('eolian_mono_gen_'+mono_gen_file.underscorify()+'', - input : join_paths(subdir_file_location, mono_gen_file), + input : mono_gen_file_input, output : [mono_gen_file + '.cs'], command : [eolian_mono_gen, beta_option, '-I', meson.current_source_dir(), eolian_include_directories, '--dllimport', package_name, From 119f041f898ed0c809dad75f1a975b4e7763a78f Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante de Sousa Date: Fri, 20 Nov 2020 18:35:01 -0300 Subject: [PATCH 13/13] Address suggestion --- src/bindings/cxx/meson.build | 4 +-- src/bindings/mono/meson.build | 3 ++- ...g.eo_template => efl_text_style.eo_non_vg} | 0 ...le_vg.eo_template => efl_text_style.eo_vg} | 0 src/lib/efl/interfaces/meson.build | 22 +++++++-------- ...eo_template => efl_canvas_group.eo_non_vg} | 0 ..._vg.eo_template => efl_canvas_group.eo_vg} | 0 ...te => efl_canvas_image_internal.eo_non_vg} | 0 ...mplate => efl_canvas_image_internal.eo_vg} | 0 ...emplate => efl_canvas_textblock.eo_non_vg} | 2 -- ...eo_template => efl_canvas_textblock.eo_vg} | 0 src/lib/evas/canvas/meson.build | 27 ++++++++----------- 12 files changed, 25 insertions(+), 33 deletions(-) rename src/lib/efl/interfaces/{efl_text_style_non_vg.eo_template => efl_text_style.eo_non_vg} (100%) rename src/lib/efl/interfaces/{efl_text_style_vg.eo_template => efl_text_style.eo_vg} (100%) rename src/lib/evas/canvas/{efl_canvas_group_non_vg.eo_template => efl_canvas_group.eo_non_vg} (100%) rename src/lib/evas/canvas/{efl_canvas_group_vg.eo_template => efl_canvas_group.eo_vg} (100%) rename src/lib/evas/canvas/{efl_canvas_image_internal_non_vg.eo_template => efl_canvas_image_internal.eo_non_vg} (100%) rename src/lib/evas/canvas/{efl_canvas_image_internal_vg.eo_template => efl_canvas_image_internal.eo_vg} (100%) rename src/lib/evas/canvas/{efl_canvas_textblock_non_vg.eo_template => efl_canvas_textblock.eo_non_vg} (99%) rename src/lib/evas/canvas/{efl_canvas_textblock_vg.eo_template => efl_canvas_textblock.eo_vg} (100%) diff --git a/src/bindings/cxx/meson.build b/src/bindings/cxx/meson.build index 60c441e449..5fa9c7336a 100644 --- a/src/bindings/cxx/meson.build +++ b/src/bindings/cxx/meson.build @@ -63,12 +63,12 @@ foreach lib : cxx_sublibs endif subdir_file_location = join_paths(file_location, eo_file_subdir) foreach cxx_gen_file : cxx_pub_eo_files - if (package_name == 'evas' or package_name == 'efl') and cxx_gen_file in pub_eo_files_optional_ector + if package_name in ['evas', 'efl'] and cxx_gen_file in pub_eo_files_optional_ector cxx_gen_file_input = cxx_gen_file cxx_gen_file = '@0@'.format(cxx_gen_file) cxx_gen_file = cxx_gen_file.split('/')[-1] else - cxx_gen_file_input = join_paths(subdir_file_location, cxx_gen_file) + cxx_gen_file_input = subdir_file_location / cxx_gen_file endif cxx_generator_target += custom_target('eolian_cxx_gen_'+cxx_gen_file.underscorify()+'', input : cxx_gen_file_input, diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build index 2c9e419cbd..78ee55d62d 100644 --- a/src/bindings/mono/meson.build +++ b/src/bindings/mono/meson.build @@ -92,7 +92,8 @@ foreach lib : mono_sublibs subdir_file_location = join_paths(file_location, eo_file_subdir) foreach mono_gen_file : mono_pub_eo_files - if mono_gen_file in pub_eo_files_optional_ector + + if package_name in ['evas', 'efl'] and mono_gen_file in pub_eo_files_optional_ector mono_gen_file_input = mono_gen_file mono_gen_file = '@0@'.format(mono_gen_file) mono_gen_file = mono_gen_file.split('/')[-1] diff --git a/src/lib/efl/interfaces/efl_text_style_non_vg.eo_template b/src/lib/efl/interfaces/efl_text_style.eo_non_vg similarity index 100% rename from src/lib/efl/interfaces/efl_text_style_non_vg.eo_template rename to src/lib/efl/interfaces/efl_text_style.eo_non_vg diff --git a/src/lib/efl/interfaces/efl_text_style_vg.eo_template b/src/lib/efl/interfaces/efl_text_style.eo_vg similarity index 100% rename from src/lib/efl/interfaces/efl_text_style_vg.eo_template rename to src/lib/efl/interfaces/efl_text_style.eo_vg diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index d92978c4f5..7d4bd8066c 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -1,6 +1,6 @@ eolian_include_directories += ['-I', join_paths(meson.source_root(), 'src', 'lib')] -# for evas/cavas +# for evas/canvas eolian_include_directories += ['-I', meson.build_root() / 'src' / 'lib'] pub_legacy_eo_files = [ @@ -33,23 +33,21 @@ endforeach eo_file = 'efl_text_style.eo' if get_option('ector') - configure_file( - input : 'efl_text_style_vg.eo_template', - output : eo_file, - copy : true, - ) + in_eo = eo_file + '_vg' else - configure_file( - input : 'efl_text_style_non_vg.eo_template', - output : eo_file, - copy : true, - ) + in_eo = eo_file + '_non_vg' endif +configure_file( + input : in_eo, + output : eo_file, + copy : true, +) + pub_eo_file_text_style = [meson.current_build_dir() / eo_file] pub_eo_file_target += custom_target('eolian_gen_' + eo_file, input : meson.current_build_dir() / eo_file, - output : [eo_file + '.h'], + output : eo_file + '.h', depfile : eo_file + '.d', install : true, install_dir : join_paths(dir_package_include, 'interfaces'), diff --git a/src/lib/evas/canvas/efl_canvas_group_non_vg.eo_template b/src/lib/evas/canvas/efl_canvas_group.eo_non_vg similarity index 100% rename from src/lib/evas/canvas/efl_canvas_group_non_vg.eo_template rename to src/lib/evas/canvas/efl_canvas_group.eo_non_vg diff --git a/src/lib/evas/canvas/efl_canvas_group_vg.eo_template b/src/lib/evas/canvas/efl_canvas_group.eo_vg similarity index 100% rename from src/lib/evas/canvas/efl_canvas_group_vg.eo_template rename to src/lib/evas/canvas/efl_canvas_group.eo_vg diff --git a/src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo_template b/src/lib/evas/canvas/efl_canvas_image_internal.eo_non_vg similarity index 100% rename from src/lib/evas/canvas/efl_canvas_image_internal_non_vg.eo_template rename to src/lib/evas/canvas/efl_canvas_image_internal.eo_non_vg diff --git a/src/lib/evas/canvas/efl_canvas_image_internal_vg.eo_template b/src/lib/evas/canvas/efl_canvas_image_internal.eo_vg similarity index 100% rename from src/lib/evas/canvas/efl_canvas_image_internal_vg.eo_template rename to src/lib/evas/canvas/efl_canvas_image_internal.eo_vg diff --git a/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo_template b/src/lib/evas/canvas/efl_canvas_textblock.eo_non_vg similarity index 99% rename from src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo_template rename to src/lib/evas/canvas/efl_canvas_textblock.eo_non_vg index f68f6dad11..fa80362c3b 100644 --- a/src/lib/evas/canvas/efl_canvas_textblock_non_vg.eo_template +++ b/src/lib/evas/canvas/efl_canvas_textblock.eo_non_vg @@ -316,8 +316,6 @@ class Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, Default value is $[1]. See @Efl.Text_Style.text_underline_height. - - gfx_filter: Experimental filter name. See Efl.Gfx.Filter for more information. - Color codes: Colors can be specified using any of the following formats: $[#RRGGBB], $[#RRGGBBAA], $[#RGB], $[#RGBA], $[rgb(r,g,b)], $[rgba(r,g,b,a)]. Additionally, X11 color names like $red or $blanchedalmond can be used. diff --git a/src/lib/evas/canvas/efl_canvas_textblock_vg.eo_template b/src/lib/evas/canvas/efl_canvas_textblock.eo_vg similarity index 100% rename from src/lib/evas/canvas/efl_canvas_textblock_vg.eo_template rename to src/lib/evas/canvas/efl_canvas_textblock.eo_vg diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build index f6a5bf0175..b92315cb03 100644 --- a/src/lib/evas/canvas/meson.build +++ b/src/lib/evas/canvas/meson.build @@ -1,16 +1,17 @@ -pub_eo_files_optional_ector_ = [ - ['efl_canvas_group.eo', 'efl_canvas_group_vg.eo_template', 'efl_canvas_group_non_vg.eo_template'], - ['efl_canvas_image_internal.eo', 'efl_canvas_image_internal_vg.eo_template', 'efl_canvas_image_internal_non_vg.eo_template'], - ['efl_canvas_textblock.eo', 'efl_canvas_textblock_vg.eo_template', 'efl_canvas_textblock_non_vg.eo_template'], +_pub_eo_files_optional_ector = [ + 'efl_canvas_group.eo', + 'efl_canvas_image_internal.eo', + 'efl_canvas_textblock.eo', ] -foreach eo_file : pub_eo_files_optional_ector_ +evas_canvas_eo_files = [] + +foreach eo_file : _pub_eo_files_optional_ector if get_option('ector') - in_eo = eo_file[1] + in_eo = eo_file + '_vg' else - in_eo = eo_file[2] + in_eo = eo_file + '_non_vg' endif - eo_file = eo_file[0] configure_file( input : in_eo, @@ -29,17 +30,12 @@ foreach eo_file : pub_eo_files_optional_ector_ '-o', 'c:' + meson.current_build_dir() / eo_file + '.c', '-o', 'd:' + meson.current_build_dir() / eo_file + '.d', '-gchd', '@INPUT@']) -endforeach -evas_canvas_eo_files = [] - -foreach eo_file_list : pub_eo_files_optional_ector_ - pub_evas_eo_files += files(meson.current_build_dir()/eo_file_list[0]) - pub_eo_files_optional_ector += meson.current_build_dir() / eo_file_list[0] + pub_evas_eo_files += files(meson.current_build_dir()/eo_file) + pub_eo_files_optional_ector += meson.current_build_dir() / eo_file endforeach evas_canvas_eo_files += pub_eo_files_optional_ector - eolian_include_directories += ['-I', meson.current_build_dir()] pub_eo_files = [ @@ -110,7 +106,6 @@ foreach eo_file : priv_eo_files '-gchd', '@INPUT@']) endforeach - evas_canvas_eo_files += pub_eo_files pub_evas_eo_files += files(pub_eo_files)