aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-05-13 14:47:29 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-05-13 14:47:29 +0100
commite6f3d3af2685420fbc98a8457af803c53727ea8d (patch)
tree5b709550ec6afe2e2ebe9d1b24e638cbfc0a62be
parentTH - spectrum (diff)
parentedje src - mark with efl version so we don't get warnings (diff)
downloadefl-e6f3d3af2685420fbc98a8457af803c53727ea8d.tar.gz
Merge branch 'master' into feature/themes/flat
-rw-r--r--.travis.yml4
-rw-r--r--README2
-rw-r--r--configure.ac15
-rw-r--r--data/elementary/themes/default.edc2
-rw-r--r--data/elementary/themes/edc/efl/navigation_layout.edc1
-rw-r--r--doc/Doxyfile.in5
-rw-r--r--doc/docfx/default_efl/partials/class.header.tmpl.partial4
-rw-r--r--doc/docfx/default_efl/partials/title.tmpl.partial43
-rw-r--r--doc/docfx/filterConfig.yml4
-rwxr-xr-xdoc/docfx/gendoc.sh14
-rw-r--r--doc/evas_examples.dox2
-rw-r--r--doc/meson.build202
-rwxr-xr-xdoc/shot.sh1
-rw-r--r--doc/widgets/widget_preview_genlist1.c2
-rw-r--r--doc/widgets/widget_preview_genlist2.c2
-rw-r--r--doc/widgets/widget_preview_genlist3.c2
-rw-r--r--doc/widgets/widget_preview_genlist4.c2
-rw-r--r--doc/widgets/widget_preview_genlist5.c2
-rw-r--r--header_checks/meson.build21
-rw-r--r--meson.build41
-rwxr-xr-xmeson/evas_loader_conf.sh4
-rwxr-xr-xmeson/meson_csharp_docs.sh2
-rwxr-xr-xmeson/meson_modules.sh2
-rw-r--r--src/Makefile_Cxx.am22
-rw-r--r--src/Makefile_Ecore.am4
-rw-r--r--src/Makefile_Edje.am1
-rw-r--r--src/Makefile_Efl.am1
-rw-r--r--src/Makefile_Efl_Mono.am10
-rw-r--r--src/Makefile_Elementary.am8
-rw-r--r--src/Makefile_Eolian.am2
-rw-r--r--src/Makefile_Eolian_Files_Helper.am8
-rw-r--r--src/Makefile_Evas.am6
-rw-r--r--src/Makefile_Evil.am33
-rw-r--r--src/benchmarks/eina/eina_bench_stringshare_e17.c5
-rw-r--r--src/bin/edje/meson.build8
-rw-r--r--src/bin/efreet/meson.build10
-rw-r--r--src/bin/eina/eina_btlog/eina_btlog.c6
-rw-r--r--src/bin/elementary/run.c4
-rw-r--r--src/bin/elementary/test_dnd.c29
-rw-r--r--src/bin/elementary/test_evas_snapshot.c2
-rw-r--r--src/bin/elementary/test_gfx_filters.c8
-rw-r--r--src/bin/elementary/test_ui_box.c16
-rw-r--r--src/bin/elementary/test_ui_pager.c10
-rw-r--r--src/bin/elementary/test_ui_pager_scroll.c18
-rw-r--r--src/bin/elementary/test_ui_relative_layout.c34
-rw-r--r--src/bin/elementary/test_ui_tab_pager.c14
-rw-r--r--src/bin/elementary/test_ui_table.c10
-rw-r--r--src/bin/eolian/docs.c50
-rw-r--r--src/bin/eolian/docs.h3
-rw-r--r--src/bin/eolian/headers.c6
-rw-r--r--src/bin/eolian/headers.h2
-rw-r--r--src/bin/eolian/main.c55
-rw-r--r--src/bin/eolian/types.c18
-rw-r--r--src/bin/eolian/types.h2
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc4
-rw-r--r--src/bin/eolian_mono/eolian/mono/alias_definition.hh34
-rw-r--r--src/bin/eolian_mono/eolian/mono/async_function_definition.hh32
-rw-r--r--src/bin/eolian_mono/eolian/mono/documentation.hh14
-rw-r--r--src/bin/eolian_mono/eolian/mono/enum_definition.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_definition.hh79
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_registration.hh27
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh216
-rw-r--r--src/bin/eolian_mono/eolian/mono/marshall_annotation.hh44
-rw-r--r--src/bin/eolian_mono/eolian/mono/name_helpers.hh39
-rw-r--r--src/bin/eolian_mono/eolian/mono/parameter.hh17
-rw-r--r--src/bin/eolian_mono/eolian/mono/part_definition.hh4
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh13
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_fields.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/variable_definition.hh7
-rw-r--r--src/bin/eolian_mono/eolian_mono.cc2
-rw-r--r--src/bindings/cxx/efl_cxx/meson.build2
-rw-r--r--src/bindings/cxx/eina_cxx/meson.build2
-rw-r--r--src/bindings/cxx/elementary_cxx/meson.build1
-rw-r--r--src/bindings/cxx/meson.build9
-rw-r--r--src/bindings/luajit/eolian.lua15
-rw-r--r--src/bindings/mono/efl_mono/efl_all.cs2
-rw-r--r--src/bindings/mono/meson.build12
-rw-r--r--src/examples/ecore/meson.build5
-rw-r--r--src/examples/elementary/bg_cxx_example_01.cc2
-rw-r--r--src/examples/elementary/bg_cxx_example_02.cc2
-rw-r--r--src/examples/elementary/box_cxx_example_02.cc2
-rw-r--r--src/examples/elementary/button_cxx_example_00.cc2
-rw-r--r--src/examples/elementary/button_cxx_example_01.cc2
-rw-r--r--src/examples/elementary/calendar_cxx_example_01.cc2
-rw-r--r--src/examples/elementary/calendar_cxx_example_02.cc2
-rw-r--r--src/examples/elementary/calendar_cxx_example_03.cc2
-rw-r--r--src/examples/elementary/calendar_cxx_example_04.cc2
-rw-r--r--src/examples/elementary/calendar_cxx_example_05.cc2
-rw-r--r--src/examples/elementary/clock_cxx_example.cc2
-rw-r--r--src/examples/elementary/efl_ui_grid_example_1.c6
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_1.c2
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_2.c2
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_3.c4
-rw-r--r--src/examples/elementary/filter_example.c129
-rw-r--r--src/examples/elementary/icon_cxx_example_01.cc2
-rw-r--r--src/examples/elementary/menu_cxx_example_01.cc2
-rw-r--r--src/examples/elementary/meson.build30
-rw-r--r--src/examples/elementary/popup_cxx_example.cc3
-rw-r--r--src/examples/elementary/radio_cxx_example_01.cc2
-rw-r--r--src/examples/elementary/slider_cxx_example.cc2
-rw-r--r--src/examples/elementary/spinner_cxx_example.cc2
-rw-r--r--src/examples/elementary/table_cxx_example_01.cc4
-rw-r--r--src/examples/elementary/table_cxx_example_02.cc4
-rw-r--r--src/examples/elementary/toolbar_cxx_example_01.cc2
-rw-r--r--src/lib/ecore/Ecore_Eo.h1
-rw-r--r--src/lib/ecore/ecore_events.c105
-rw-r--r--src/lib/ecore/ecore_exe_win32.c13
-rw-r--r--src/lib/ecore/ecore_private.h2
-rw-r--r--src/lib/ecore/efl_boolean_model.c123
-rw-r--r--src/lib/ecore/efl_boolean_model.eo8
-rw-r--r--src/lib/ecore/efl_composite_model.c95
-rw-r--r--src/lib/ecore/efl_composite_model_private.h36
-rw-r--r--src/lib/ecore/efl_core_command_line.c5
-rw-r--r--src/lib/ecore/efl_core_proc_env.eo2
-rw-r--r--src/lib/ecore/efl_filter_model.c569
-rw-r--r--src/lib/ecore/efl_filter_model.eo31
-rw-r--r--src/lib/ecore/efl_loop_consumer.eo2
-rw-r--r--src/lib/ecore/efl_loop_model.c28
-rw-r--r--src/lib/ecore/efl_loop_model.eo1
-rw-r--r--src/lib/ecore/efl_view_model.c9
-rw-r--r--src/lib/ecore/meson.build2
-rw-r--r--src/lib/ecore_audio/ecore_audio.eo2
-rw-r--r--src/lib/ecore_audio/ecore_audio_in.eo2
-rw-r--r--src/lib/ecore_audio/ecore_audio_in_sndfile.eo2
-rw-r--r--src/lib/ecore_audio/ecore_audio_in_tone.eo2
-rw-r--r--src/lib/ecore_audio/ecore_audio_out.eo2
-rw-r--r--src/lib/ecore_audio/ecore_audio_out_pulse.eo2
-rw-r--r--src/lib/ecore_audio/ecore_audio_out_sndfile.eo2
-rw-r--r--src/lib/ecore_audio/ecore_audio_out_wasapi.eo2
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_cnp.m2
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h17
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_device.c22
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c61
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c32
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_private.h4
-rw-r--r--src/lib/ecore_evas/Ecore_Evas.h44
-rw-r--r--src/lib/ecore_evas/ecore_evas.c10
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h2
-rw-r--r--src/lib/ecore_sdl/meson.build2
-rw-r--r--src/lib/ecore_win32/meson.build42
-rw-r--r--src/lib/ecore_wl2/ecore_wl2.c10
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c8
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c6
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h1
-rw-r--r--src/lib/ector/cairo/ector_cairo_software_surface.eo2
-rw-r--r--src/lib/ector/cairo/ector_cairo_surface.eo2
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo2
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo2
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.eo2
-rw-r--r--src/lib/ector/ector_buffer.eo2
-rw-r--r--src/lib/ector/ector_renderer.eo2
-rw-r--r--src/lib/ector/ector_renderer_gradient.eo2
-rw-r--r--src/lib/ector/ector_renderer_gradient_linear.eo2
-rw-r--r--src/lib/ector/ector_renderer_gradient_radial.eo2
-rw-r--r--src/lib/ector/ector_renderer_shape.eo2
-rw-r--r--src/lib/ector/ector_surface.eo2
-rw-r--r--src/lib/ector/gl/ector_gl_surface.eo2
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo2
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo2
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_shape.eo2
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_linear.eo2
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_radial.eo2
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.eo2
-rw-r--r--src/lib/ector/software/ector_software_buffer_base.eo2
-rw-r--r--src/lib/ector/software/ector_software_rasterizer.c199
-rw-r--r--src/lib/ector/software/ector_software_surface.eo2
-rw-r--r--src/lib/edje/Edje_Common.h912
-rw-r--r--src/lib/edje/Edje_Legacy.h111
-rw-r--r--src/lib/edje/edje_calc.c51
-rw-r--r--src/lib/edje/edje_private.h6
-rw-r--r--src/lib/edje/edje_types.eot120
-rw-r--r--src/lib/efl/Efl.h1
-rw-r--r--src/lib/efl/interfaces/efl_container.eo16
-rw-r--r--src/lib/efl/interfaces/efl_gfx_arrangement.eo26
-rw-r--r--src/lib/efl/interfaces/efl_gfx_entity.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_filter.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_gradient.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_view.eo2
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c2
-rw-r--r--src/lib/efl/interfaces/efl_model.eo6
-rw-r--r--src/lib/efl/interfaces/efl_pack.eo41
-rw-r--r--src/lib/efl/interfaces/efl_pack_layout.eo2
-rw-r--r--src/lib/efl/interfaces/efl_pack_linear.eo83
-rw-r--r--src/lib/efl/interfaces/efl_pack_table.eo2
-rw-r--r--src/lib/efl/interfaces/efl_text_annotate.eo2
-rw-r--r--src/lib/efl/interfaces/efl_text_font.eo2
-rw-r--r--src/lib/efl/interfaces/efl_text_format.eo2
-rw-r--r--src/lib/efl/interfaces/efl_text_style.eo2
-rw-r--r--src/lib/efl/interfaces/efl_ui_autorepeat.eo41
-rw-r--r--src/lib/efl/interfaces/efl_ui_i18n.eo2
-rw-r--r--src/lib/efl/interfaces/efl_ui_multi_selectable.eo2
-rw-r--r--src/lib/efl/interfaces/efl_ui_range_display.eo2
-rw-r--r--src/lib/efl/interfaces/efl_ui_range_interactive.eo2
-rw-r--r--src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo2
-rw-r--r--src/lib/efl/interfaces/efl_ui_zoom.eo2
-rw-r--r--src/lib/efl/interfaces/meson.build1
-rw-r--r--src/lib/efreet/efreet_desktop_command.c1
-rw-r--r--src/lib/eina/eina_file_win32.c64
-rw-r--r--src/lib/eina/eina_inline_slice.x7
-rw-r--r--src/lib/eina/eina_inline_str.x32
-rw-r--r--src/lib/eina/eina_prefix.c1
-rw-r--r--src/lib/eina/eina_promise.c2
-rw-r--r--src/lib/eina/eina_slice.h2
-rw-r--r--src/lib/eina/eina_str.h11
-rw-r--r--src/lib/eina/eina_unicode.c3
-rw-r--r--src/lib/eina/eina_value.c14
-rw-r--r--src/lib/eina/eina_vpath.c185
-rw-r--r--src/lib/eina/eina_vpath_xdg.c38
-rw-r--r--src/lib/eio/efl_io_model.c14
-rw-r--r--src/lib/elementary/Efl_Ui.hh25
-rw-r--r--src/lib/elementary/Elementary.h1
-rw-r--r--src/lib/elementary/Elementary.hh23
-rw-r--r--src/lib/elementary/efl_access_object.eo2
-rw-r--r--src/lib/elementary/efl_config_global.eo2
-rw-r--r--src/lib/elementary/efl_page_indicator_icon.c2
-rw-r--r--src/lib/elementary/efl_ui_box.c37
-rw-r--r--src/lib/elementary/efl_ui_box.eo11
-rw-r--r--src/lib/elementary/efl_ui_button.c44
-rw-r--r--src/lib/elementary/efl_ui_button.eo1
-rw-r--r--src/lib/elementary/efl_ui_container_layout.c4
-rw-r--r--src/lib/elementary/efl_ui_grid.c77
-rw-r--r--src/lib/elementary/efl_ui_grid.eo7
-rw-r--r--src/lib/elementary/efl_ui_layout.c7
-rw-r--r--src/lib/elementary/efl_ui_layout_base.eo2
-rw-r--r--src/lib/elementary/efl_ui_list.c16
-rw-r--r--src/lib/elementary/efl_ui_list.eo6
-rw-r--r--src/lib/elementary/efl_ui_navigation_bar.c1
-rw-r--r--src/lib/elementary/efl_ui_navigation_bar.eo4
-rw-r--r--src/lib/elementary/efl_ui_pager.c250
-rw-r--r--src/lib/elementary/efl_ui_pager.eo2
-rw-r--r--src/lib/elementary/efl_ui_panel.c36
-rw-r--r--src/lib/elementary/efl_ui_popup.c2
-rw-r--r--src/lib/elementary/efl_ui_progressbar.eo6
-rw-r--r--src/lib/elementary/efl_ui_relative_layout.c267
-rw-r--r--src/lib/elementary/efl_ui_relative_layout.eo22
-rw-r--r--src/lib/elementary/efl_ui_relative_layout_private.h30
-rw-r--r--src/lib/elementary/efl_ui_scroll_manager.eo2
-rw-r--r--src/lib/elementary/efl_ui_scroller.c21
-rw-r--r--src/lib/elementary/efl_ui_stack.c18
-rw-r--r--src/lib/elementary/efl_ui_tab_page.c22
-rw-r--r--src/lib/elementary/efl_ui_table.c742
-rw-r--r--src/lib/elementary/efl_ui_table.eo10
-rw-r--r--src/lib/elementary/efl_ui_table_layout.c18
-rw-r--r--src/lib/elementary/efl_ui_table_private.h13
-rw-r--r--src/lib/elementary/efl_ui_text.c1
-rw-r--r--src/lib/elementary/efl_ui_text.eo3
-rw-r--r--src/lib/elementary/efl_ui_textpath.c19
-rw-r--r--src/lib/elementary/efl_ui_textpath_eo.legacy.h2
-rw-r--r--src/lib/elementary/efl_ui_theme.eo2
-rw-r--r--src/lib/elementary/efl_ui_widget.c338
-rw-r--r--src/lib/elementary/efl_ui_widget.eo10
-rw-r--r--src/lib/elementary/efl_ui_win.c53
-rw-r--r--src/lib/elementary/elc_combobox.c14
-rw-r--r--src/lib/elementary/elc_fileselector.c403
-rw-r--r--src/lib/elementary/elc_fileselector_button.c12
-rw-r--r--src/lib/elementary/elc_fileselector_entry.c29
-rw-r--r--src/lib/elementary/elc_hoversel.c15
-rw-r--r--src/lib/elementary/elc_naviframe.c8
-rw-r--r--src/lib/elementary/elm_atspi_bridge.c6
-rw-r--r--src/lib/elementary/elm_code_indent.c2
-rw-r--r--src/lib/elementary/elm_code_line.c4
-rw-r--r--src/lib/elementary/elm_code_text.c2
-rw-r--r--src/lib/elementary/elm_code_widget.c4
-rw-r--r--src/lib/elementary/elm_code_widget.eo2
-rw-r--r--src/lib/elementary/elm_code_widget_undo.c2
-rw-r--r--src/lib/elementary/elm_colorselector.c6
-rw-r--r--src/lib/elementary/elm_entry.c12
-rw-r--r--src/lib/elementary/elm_fileselector_button_eo.c2
-rw-r--r--src/lib/elementary/elm_general.eot195
-rw-r--r--src/lib/elementary/elm_general.h213
-rw-r--r--src/lib/elementary/elm_genlist.c2
-rw-r--r--src/lib/elementary/elm_hoversel_eo.c2
-rw-r--r--src/lib/elementary/elm_image_legacy.h2
-rw-r--r--src/lib/elementary/elm_interface_scrollable.eo2
-rw-r--r--src/lib/elementary/elm_layout_legacy.h2
-rw-r--r--src/lib/elementary/elm_main.c18
-rw-r--r--src/lib/elementary/elm_part_helper.h23
-rw-r--r--src/lib/elementary/elm_priv.h11
-rw-r--r--src/lib/elementary/elm_progressbar_legacy.h2
-rw-r--r--src/lib/elementary/elm_scroller.c28
-rw-r--r--src/lib/elementary/elm_scroller_eo.c8
-rw-r--r--src/lib/elementary/elm_scroller_legacy.h40
-rw-r--r--src/lib/elementary/elm_slider_legacy.h2
-rw-r--r--src/lib/elementary/elm_textpath.h2
-rw-r--r--src/lib/elementary/elm_theme.c5
-rw-r--r--src/lib/elementary/elm_widget.h1
-rw-r--r--src/lib/elementary/meson.build20
-rw-r--r--src/lib/elput/elput_logind.c1
-rw-r--r--src/lib/eo/efl_object.eo2
-rw-r--r--src/lib/eolian/Eolian.h36
-rw-r--r--src/lib/eolian/database_class.c2
-rw-r--r--src/lib/eolian/database_class_api.c2
-rw-r--r--src/lib/eolian/database_event_api.c2
-rw-r--r--src/lib/eolian/database_function_api.c8
-rw-r--r--src/lib/eolian/database_validate.c18
-rw-r--r--src/lib/eolian/eo_lexer.h6
-rw-r--r--src/lib/eolian/eo_parser.c15
-rw-r--r--src/lib/eolian/eolian_database.c88
-rw-r--r--src/lib/eolian/eolian_database.h2
-rw-r--r--src/lib/evas/Evas_Common.h9
-rw-r--r--src/lib/evas/Evas_Legacy.h20
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_alpha.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_group.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_player.c14
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_player.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_rotate.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_scale.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_translate.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_filter_internal.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.c25
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.eo1
-rw-r--r--src/lib/evas/canvas/efl_input_event.eo2
-rw-r--r--src/lib/evas/canvas/efl_input_interface.eo2
-rw-r--r--src/lib/evas/canvas/efl_input_state.eo2
-rw-r--r--src/lib/evas/canvas/evas_events.c67
-rw-r--r--src/lib/evas/canvas/evas_image_eo.c1
-rw-r--r--src/lib/evas/canvas/evas_image_legacy.c8
-rw-r--r--src/lib/evas/canvas/evas_image_private.h1
-rw-r--r--src/lib/evas/canvas/evas_object_image.c7
-rw-r--r--src/lib/evas/canvas/evas_object_main.c33
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c645
-rw-r--r--src/lib/evas/canvas/evas_textblock_hyphenation.x2
-rw-r--r--src/lib/evas/canvas/meson.build10
-rw-r--r--src/lib/evas/common/evas_map_image_internal_high.c3
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_tap.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_touch.eo2
-rw-r--r--src/lib/evas/gesture/meson.build20
-rw-r--r--src/lib/evas/include/evas_private.h2
-rw-r--r--src/lib/evas/meson.build35
-rw-r--r--src/lib/evas/software_generic/filters/meson.build (renamed from src/modules/evas/engines/software_generic/filters/meson.build)10
-rw-r--r--src/lib/evas/software_generic/meson.build36
-rw-r--r--src/lib/evil/evil_dlfcn.h12
-rw-r--r--src/lib/evil/evil_fcntl.c4
-rw-r--r--src/lib/evil/evil_fnmatch.c231
-rw-r--r--src/lib/evil/evil_fnmatch_list_of_states.c77
-rw-r--r--src/lib/evil/evil_fnmatch_private.h24
-rw-r--r--src/lib/evil/evil_macro_wrapper.h24
-rw-r--r--src/lib/evil/evil_string.c16
-rw-r--r--src/lib/evil/evil_string.h20
-rw-r--r--src/lib/evil/evil_time.c10
-rw-r--r--src/lib/evil/evil_time.h23
-rw-r--r--src/lib/evil/evil_unistd.c11
-rw-r--r--src/lib/evil/evil_unistd.h21
-rw-r--r--src/lib/evil/fnmatch.h57
-rw-r--r--src/lib/evil/meson.build17
-rw-r--r--src/lib/evil/regex/cclass.h31
-rw-r--r--src/lib/evil/regex/cname.h102
-rw-r--r--src/lib/evil/regex/engine.c1019
-rw-r--r--src/lib/evil/regex/engine.ih35
-rw-r--r--src/lib/evil/regex/meson.build10
-rw-r--r--src/lib/evil/regex/regcomp.c1604
-rw-r--r--src/lib/evil/regex/regcomp.ih51
-rw-r--r--src/lib/evil/regex/regerror.c122
-rw-r--r--src/lib/evil/regex/regerror.ih12
-rw-r--r--src/lib/evil/regex/regex.h78
-rw-r--r--src/lib/evil/regex/regex2.h134
-rw-r--r--src/lib/evil/regex/regexec.c138
-rw-r--r--src/lib/evil/regex/regfree.c37
-rw-r--r--src/lib/evil/regex/utils.h22
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c7
-rw-r--r--src/modules/ecore_evas/engines/extn/meson.build2
-rw-r--r--src/modules/ecore_evas/engines/sdl/meson.build2
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c25
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c4
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h3
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c1
-rw-r--r--src/modules/ecore_evas/engines/win32/meson.build7
-rw-r--r--src/modules/ecore_evas/engines/x/ecore_evas_x.c1
-rw-r--r--src/modules/ecore_evas/meson.build3
-rw-r--r--src/modules/ecore_imf/ibus/meson.build2
-rw-r--r--src/modules/ecore_imf/scim/meson.build2
-rw-r--r--src/modules/ecore_imf/xim/meson.build2
-rw-r--r--src/modules/emotion/gstreamer/emotion_gstreamer.c4
-rw-r--r--src/modules/emotion/meson.build5
-rw-r--r--src/modules/evas/engines/buffer/meson.build6
-rw-r--r--src/modules/evas/engines/drm/meson.build4
-rw-r--r--src/modules/evas/engines/fb/meson.build4
-rw-r--r--src/modules/evas/engines/gl_cocoa/meson.build4
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h7
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c75
-rw-r--r--src/modules/evas/engines/gl_common/meson.build45
-rw-r--r--src/modules/evas/engines/gl_drm/meson.build4
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c83
-rw-r--r--src/modules/evas/engines/gl_generic/meson.build41
-rw-r--r--src/modules/evas/engines/gl_x11/evas_x_main.c13
-rw-r--r--src/modules/evas/engines/gl_x11/meson.build4
-rw-r--r--src/modules/evas/engines/meson.build82
-rw-r--r--src/modules/evas/engines/software_ddraw/meson.build11
-rw-r--r--src/modules/evas/engines/software_gdi/meson.build8
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c3
-rw-r--r--src/modules/evas/engines/software_generic/meson.build45
-rw-r--r--src/modules/evas/engines/software_x11/meson.build4
-rw-r--r--src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h5
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.h12
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_wl_main.c93
-rw-r--r--src/modules/evas/engines/wayland_egl/meson.build4
-rw-r--r--src/modules/evas/engines/wayland_shm/meson.build4
-rw-r--r--src/modules/evas/image_loaders/png/evas_image_load_png.c129
-rw-r--r--src/modules/evas/image_loaders/wbmp/evas_image_load_wbmp.c21
-rw-r--r--src/modules/evas/meson.build95
-rw-r--r--src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c58
-rw-r--r--src/scripts/pyolian/eolian.py8
-rw-r--r--src/scripts/pyolian/eolian_lib.py6
-rw-r--r--src/static_libs/libunibreak/wordbreak.c6
-rw-r--r--src/static_libs/vg_common/vg_common.h4
-rw-r--r--src/static_libs/vg_common/vg_common_svg.c51
-rw-r--r--src/tests/ecore/ecore_test_ecore_file.c2
-rw-r--r--src/tests/ecore/efl_app_test_promise.c2
-rw-r--r--src/tests/edje/data/test_text.edc1
-rw-r--r--src/tests/efl/efl_test_composite_model.c273
-rw-r--r--src/tests/efl_check.h1
-rw-r--r--src/tests/efl_mono/Parts.cs4
-rw-r--r--src/tests/efl_mono/dummy_part_holder.eo4
-rw-r--r--src/tests/efl_mono/dummy_test_object.eo1
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c53
-rw-r--r--src/tests/efl_mono/meson.build10
-rw-r--r--src/tests/efreet/ef_desktop.c4
-rw-r--r--src/tests/efreet/meson.build6
-rw-r--r--src/tests/eina/eina_test_binbuf.c1
-rw-r--r--src/tests/eina/eina_test_file.c4
-rw-r--r--src/tests/eina/eina_test_strbuf.c1
-rw-r--r--src/tests/eina/eina_test_tiler.c4
-rw-r--r--src/tests/eina/eina_test_ustr.c2
-rw-r--r--src/tests/eina/eina_test_value.c4
-rw-r--r--src/tests/eina/eina_test_vpath.c13
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_accessor.cc18
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_iterator.cc16
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_ptrarray.cc50
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_ptrlist.cc46
-rw-r--r--src/tests/eina_cxx/eina_simple.eo (renamed from src/tests/eina_cxx/simple.eo)2
-rw-r--r--src/tests/eina_cxx/meson.build2
-rw-r--r--src/tests/eina_cxx/simple.c8
-rw-r--r--src/tests/eio/efl_io_model_test_monitor_add.c3
-rw-r--r--src/tests/eio/eio_test_manager_xattr.c2
-rw-r--r--src/tests/eldbus/meson.build7
-rw-r--r--src/tests/elementary/efl_ui_test_box.c37
-rw-r--r--src/tests/elementary/efl_ui_test_box_flow.c2
-rw-r--r--src/tests/elementary/efl_ui_test_box_stack.c2
-rw-r--r--src/tests/elementary/efl_ui_test_relative_layout.c87
-rw-r--r--src/tests/elementary/efl_ui_test_table.c154
-rw-r--r--src/tests/elementary/efl_ui_test_widget.c5
-rw-r--r--src/tests/elementary/elm_cxx_suite.cc2
-rw-r--r--src/tests/elementary/elm_test_widget_focus.c2
-rw-r--r--src/tests/elementary/spec/README29
-rw-r--r--src/tests/elementary/spec/efl_test_content.c123
-rw-r--r--src/tests/elementary/spec/efl_test_gfx_arrangement.c61
-rw-r--r--src/tests/elementary/spec/efl_test_pack.c56
-rw-r--r--src/tests/elementary/spec/efl_test_pack_linear.c33
-rw-r--r--src/tests/elementary/spec/efl_ui_spec_suite.c15
-rw-r--r--src/tests/elementary/spec/efl_ui_spec_suite.h5
-rwxr-xr-xsrc/tests/elementary/spec/generator.py47
-rw-r--r--src/tests/elementary/spec/meson.build17
-rw-r--r--src/tests/elementary_cxx/cxx_compile_test.cc2
-rw-r--r--src/tests/emile/emile_test_base64.c7
-rw-r--r--src/tests/eolian/data/class_simple.eo2
-rw-r--r--src/tests/eolian/data/docs_ref.h38
-rw-r--r--src/tests/eolian/data/eo_docs.eo (renamed from src/tests/eolian/data/docs.eo)4
-rw-r--r--src/tests/eolian/data/parts.eo2
-rw-r--r--src/tests/eolian/eolian_aux.c12
-rw-r--r--src/tests/eolian/eolian_generation.c4
-rw-r--r--src/tests/eolian/eolian_parsing.c61
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_binding.cc4
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_documentation.cc2
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_parse.cc2
-rw-r--r--src/tests/evas/evas_test_image.c36
-rw-r--r--src/tests/evas/evas_test_mesh.c1
-rw-r--r--src/tests/evas/evas_test_textblock.c7
-rw-r--r--src/tests/evil/evil_suite.c2
-rw-r--r--src/tests/evil/evil_suite.h2
-rw-r--r--src/tests/evil/evil_test_libgen.c308
478 files changed, 7682 insertions, 8380 deletions
diff --git a/.travis.yml b/.travis.yml
index 7b84077161..e501011b24 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,8 +18,8 @@ jobs:
include:
- os: osx
env: BUILDSYSTEM=ninja
- - os: linux
- env: DISTRO=Fedora29-mingw CI_BUILD_TYPE=mingw
+ #- os: linux
+ #env: DISTRO=Fedora29-mingw CI_BUILD_TYPE=mingw
- os: linux
env: DISTRO=Fedora29 CI_BUILD_TYPE=options-enabled
- os: linux
diff --git a/README b/README
index 9d0b03cb66..f2404c0246 100644
--- a/README
+++ b/README
@@ -426,7 +426,7 @@ COMPILING AND INSTALLING
make
sudo make install
-If you have doxygen, then you csan build documentation with:
+If you have doxygen, then you can build documentation with:
make doc
diff --git a/configure.ac b/configure.ac
index c7be1c5b3d..4ca3d09e2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -298,6 +298,7 @@ if test "x${have_win32}" = "xyes" ; then
# autotools macro and CXX is always set to g++ even if
# it's not found. So we are using an internal variable
# that does the work for now, may get broken in the future.
+ AC_DEFINE([_POSIX_C_SOURCE], [200809L], [Define the POSIX version])
if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
fi
@@ -810,10 +811,14 @@ EFL_SELECT_WINDOWS_VERSION
### Checks for libraries
-EFL_ADD_LIBS([EVIL], [-lpsapi -lole32 -lws2_32 -lsecur32 -luuid])
+EFL_ADD_LIBS([EVIL], [-lpsapi -lole32 -lws2_32 -lsecur32 -luuid -lregex])
### Checks for header files
+AC_CHECK_HEADERS([regex.h fnmatch.h],
+ [],
+ [AC_MSG_ERROR([regex.h or fnmatch.h can not be found])])
+
### Checks for types
### Checks for structures
@@ -839,6 +844,14 @@ AC_SUBST([EVIL_CXXFLAGS])
### Checks for library functions
+AC_SEARCH_LIBS([regcomp], [regex],
+ [],
+ [AC_MSG_ERROR([regcomp() can not be found in libregex])])
+
+AC_SEARCH_LIBS([fnmatch], [regex],
+ [],
+ [AC_MSG_ERROR([fnmatch() can not be found in libregex])])
+
EFL_LIB_END_OPTIONAL([Evil])
AC_SUBST([USE_EVIL_CFLAGS])
diff --git a/data/elementary/themes/default.edc b/data/elementary/themes/default.edc
index 1f62fa5f7d..94b0c30a98 100644
--- a/data/elementary/themes/default.edc
+++ b/data/elementary/themes/default.edc
@@ -1,3 +1,5 @@
+efl_version: 1 22;
+
#include "macros.edc"
externals.external: "elm";
diff --git a/data/elementary/themes/edc/efl/navigation_layout.edc b/data/elementary/themes/edc/efl/navigation_layout.edc
index 4319453b96..9947d6d313 100644
--- a/data/elementary/themes/edc/efl/navigation_layout.edc
+++ b/data/elementary/themes/edc/efl/navigation_layout.edc
@@ -21,6 +21,7 @@ group { "efl/navigation_layout";
relative: 0.0 1.0;
}
rel2.to_x: "base";
+ align: 0.5 0.0;
}
}
}
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index 8eb5b96096..db4e63cdb2 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -49,7 +49,7 @@ PROJECT_LOGO =
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = .
+OUTPUT_DIRECTORY = @top_builddir@/
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -594,7 +594,8 @@ WARN_LOGFILE =
# with spaces.
INPUT = @top_srcdir@/src/lib \
- @top_srcdir@/elm_intro.h \
+ @top_builddir@/src/lib \
+ @top_builddir@/elm_intro.h \
@srcdir@/index_elm.dox \
@srcdir@/main.dox \
@srcdir@/pkgconfig.dox \
diff --git a/doc/docfx/default_efl/partials/class.header.tmpl.partial b/doc/docfx/default_efl/partials/class.header.tmpl.partial
index 1a445ab3ca..561d929da1 100644
--- a/doc/docfx/default_efl/partials/class.header.tmpl.partial
+++ b/doc/docfx/default_efl/partials/class.header.tmpl.partial
@@ -12,15 +12,13 @@
{{/inheritance}}
<div class="level{{level}}"><span class="xref"><b>{{fullName.0.value}}</b></span></div>
{{#derivedClasses}}
- <div class="level{{index}}">{{{specName.0.value}}}</div>
+ <div class="level{{index}}"><xref uid="{{uid}}" text="{{fullName.0.value}}"/></div>
{{/derivedClasses}}
</div>
</div>
{{/inClass}}
{{#inheritedMembers.0}}
-<h6><strong>{{__global.namespace}}</strong>: {{{namespace.specName.0.value}}}</h6>
-<h6><strong>{{__global.assembly}}</strong>: {{assemblies.0}}.dll</h6>
<h5 id="{{id}}_syntax">{{__global.syntax}}</h5>
<div class="codewrapper">
<pre><code class="lang-{{_lang}} hljs">{{syntax.content.0.value}}</code></pre>
diff --git a/doc/docfx/default_efl/partials/title.tmpl.partial b/doc/docfx/default_efl/partials/title.tmpl.partial
new file mode 100644
index 0000000000..186d9171d3
--- /dev/null
+++ b/doc/docfx/default_efl/partials/title.tmpl.partial
@@ -0,0 +1,43 @@
+{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
+{{#isNamespace}}
+Namespace {{fullName.0.value}}
+{{/isNamespace}}
+{{#inClass}}
+Class {{fullName.0.value}}
+{{/inClass}}
+{{#inStruct}}
+Struct {{fullName.0.value}}
+{{/inStruct}}
+{{#inInterface}}
+Interface {{fullName.0.value}}
+{{/inInterface}}
+{{#inEnum}}
+Enum {{fullName.0.value}}
+{{/inEnum}}
+{{#inDelegate}}
+Delegate {{fullName.0.value}}
+{{/inDelegate}}
+{{#inConstructor}}
+Constructor {{fullName.0.value}}
+{{/inConstructor}}
+{{#inField}}
+Field {{fullName.0.value}}
+{{/inField}}
+{{#inProperty}}
+Property {{fullName.0.value}}
+{{/inProperty}}
+{{#inMethod}}
+Method {{fullName.0.value}}
+{{/inMethod}}
+{{#inEvent}}
+Event {{fullName.0.value}}
+{{/inEvent}}
+{{#inOperator}}
+Operator {{fullName.0.value}}
+{{/inOperator}}
+{{#inEii}}
+Explict Interface Implementation {{fullName.0.value}}
+{{/inEii}}
+{{#inPackage}}
+Package {{fullName.0.value}}
+{{/inPackage}}
diff --git a/doc/docfx/filterConfig.yml b/doc/docfx/filterConfig.yml
index d6ddf9d5b4..04c2e0c8f3 100644
--- a/doc/docfx/filterConfig.yml
+++ b/doc/docfx/filterConfig.yml
@@ -1,8 +1,10 @@
apiRules:
- exclude:
- uidRegex: ^.*NativeInherit$
+ uidRegex: ^.*NativeMethods$
- exclude:
uidRegex: ^.*NativeStruct$
+- exclude:
+ uidRegex: ^.*Concrete$
- include:
uidRegex: ^Efl
- include:
diff --git a/doc/docfx/gendoc.sh b/doc/docfx/gendoc.sh
index 99da2d9f18..48d781cd81 100755
--- a/doc/docfx/gendoc.sh
+++ b/doc/docfx/gendoc.sh
@@ -22,5 +22,19 @@ for f in `ls api/*.yml`; do
sed -e 's/\(<xref href=\\"[^\\]*\)\\"/\1?displayProperty=fullName\\"/g' -i $f
done;
+# Add missing references to derived classes, so they can be rendered with
+# their full name.
+# https://github.com/dotnet/docfx/issues/3769#issuecomment-485616064
+for f in `grep -l derivedClasses api/*.yml`; do
+ sed "1,/^ derivedClasses:$/d" $f > /tmp/efl_docfx_gendoc
+ sed -i "/^ [^-]/,$ d" /tmp/efl_docfx_gendoc
+ sed -i "/^[^ ]/,$ d" /tmp/efl_docfx_gendoc
+ while read dash class
+ do
+ sed -i "s/^references:$/references:\n- uid: $class\n fullName: $class/g" $f
+ done <<< "$(cat /tmp/efl_docfx_gendoc)"
+done;
+rm -rf /tmp/efl_docfx_gendoc
+
# DocFX Step 2: Generate HTML files
mono bin/docfx.exe build docfx.json && echo "Docs ready in the _site folder!"
diff --git a/doc/evas_examples.dox b/doc/evas_examples.dox
index 809132f173..701b8a3cfd 100644
--- a/doc/evas_examples.dox
+++ b/doc/evas_examples.dox
@@ -693,7 +693,7 @@
* not seeing its front face.
* @until evas_object_map_enable_set
*
- * And we free this map, since since we messed too much with it and for the
+ * And we free this map, since we messed too much with it and for the
* last object we want something cleaner.
* @until evas_map_free
*
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000000..a24c528d76
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,202 @@
+doc_target = []
+
+text_filter_properties= [
+ ['Blend Example', 'Sans', '24', 'blend'],
+ ['Blur', 'Sans:style=bold', '32', 'blur'],
+ ['Bump', 'Sans:style=bold', '64', 'bump'],
+ ['Curve', 'Sans:style=bold', '64', 'curve'],
+ ['Grow - Contour', 'Sans:style=bold', '32', 'grow'],
+ ['Mask', 'Sans:style=bold', '64', 'mask'],
+ ['Transform - Mirror effect', 'Sans', '50', 'transform'],
+]
+widget_previews = [
+ ['actionslider', 'preview-00.png', 'widget_preview_actionslider', '120', '30'],
+ ['bg', 'preview-00.png', 'widget_preview_bg', '50', '50'],
+ ['box', 'preview-00.png', 'widget_preview_box', '200', '160'],
+ ['bubble', 'preview-00.png', 'widget_preview_bubble1', '160', '50'],
+ ['bubble', 'preview-01.png', 'widget_preview_bubble2', '160', '50'],
+ ['bubble', 'preview-02.png', 'widget_preview_bubble3', '160', '50'],
+ ['button', 'preview-00.png', 'widget_preview_button1', '160', '50'],
+ ['button', 'preview-01.png', 'widget_preview_button2', '160', '50'],
+ ['button', 'preview-02.png', 'widget_preview_button3', '160', '50'],
+ ['calendar', 'preview-00.png', 'widget_preview_calendar', '300', '300'],
+ ['check', 'preview-00.png', 'widget_preview_check1', '160', '50'],
+ ['check', 'preview-01.png', 'widget_preview_check2', '160', '50'],
+ ['check', 'preview-02.png', 'widget_preview_check3', '160', '50'],
+ ['clock', 'preview-00.png', 'widget_preview_clock', '200', '100'],
+ ['colorselector', 'preview-00.png', 'widget_preview_colorselector', '320', '300'],
+ ['conformant', 'preview-00.png', 'widget_preview_conformant', '200', '400'],
+ ['combobox', 'preview-00.png', 'widget_preview_combobox', '300', '300'],
+ ['ctxpopup', 'preview-00.png', 'widget_preview_ctxpopup', '200', '130'],
+ ['datetime', 'preview-00.png', 'widget_preview_datetime1', '360', '60'],
+ ['datetime', 'preview-01.png', 'widget_preview_datetime2', '200', '60'],
+ ['datetime', 'preview-02.png', 'widget_preview_datetime3', '200', '60'],
+ ['dayselector', 'preview-00.png', 'widget_preview_dayselector', '350', '50'],
+ ['diskselector', 'preview-00.png', 'widget_preview_diskselector', '120', '50'],
+ ['entry', 'preview-00.png', 'widget_preview_entry1', '160', '50'],
+ ['entry', 'preview-01.png', 'widget_preview_entry2', '160', '50'],
+ ['entry', 'preview-02.png', 'widget_preview_entry3', '160', '50'],
+ ['entry', 'preview-03.png', 'widget_preview_entry4', '160', '50'],
+ ['fileselector', 'preview-00.png', 'widget_preview_fileselector', '300', '300'],
+ ['fileselector_button', 'preview-00.png', 'widget_preview_fileselector_button1', '200', '50'],
+ ['fileselector_button', 'preview-01.png', 'widget_preview_fileselector_button2', '200', '50'],
+ ['fileselector_button', 'preview-02.png', 'widget_preview_fileselector_button3', '160', '50'],
+ ['fileselector_entry', 'preview-00.png', 'widget_preview_fileselector_entry', '70', '50'],
+ ['flip', 'preview-00.png', 'widget_preview_flip', '100', '100'],
+ ['flipselector', 'preview-00.png', 'widget_preview_flipselector', '100', '60'],
+ ['frame', 'preview-00.png', 'widget_preview_frame', '100', '50'],
+ ['gengrid', 'preview-00.png', 'widget_preview_gengrid', '200', '160'],
+ ['genlist', 'preview-00.png', 'widget_preview_genlist1', '200', '200'],
+ ['genlist', 'preview-01.png', 'widget_preview_genlist2', '200', '160'],
+ ['genlist', 'preview-02.png', 'widget_preview_genlist3', '200', '160'],
+ ['genlist', 'preview-03.png', 'widget_preview_genlist4', '200', '160'],
+ ['genlist', 'preview-04.png', 'widget_preview_genlist5', '200', '160'],
+ ['hover', 'preview-00.png', 'widget_preview_hover', '90', '170'],
+ ['hoversel', 'preview-00.png', 'widget_preview_hoversel', '90', '170'],
+ ['icon', 'preview-00.png', 'widget_preview_icon', '50', '50'],
+ ['image', 'preview-00.png', 'widget_preview_image', '50', '50'],
+ ['index', 'preview-00.png', 'widget_preview_index', '200', '160'],
+ ['inwin', 'preview-00.png', 'widget_preview_inwin1', '200', '160'],
+ ['inwin', 'preview-01.png', 'widget_preview_inwin2', '200', '160'],
+ ['inwin', 'preview-02.png', 'widget_preview_inwin3', '200', '160'],
+ ['label', 'preview-00.png', 'widget_preview_label', '70', '30'],
+ ['layout', 'preview-00.png', 'widget_preview_layout', '200', '160'],
+ ['list', 'preview-00.png', 'widget_preview_list', '200', '200'],
+ ['map', 'preview-00.png', 'widget_preview_map', '256', '256'],
+ ['mapbuf', 'preview-00.png', 'widget_preview_mapbuf', '200', '200'],
+ ['menu', 'preview-00.png', 'widget_preview_menu', '100', '100'],
+ ['notify', 'preview-00.png', 'widget_preview_notify', '60', '30'],
+ ['nstate', 'preview-00.png', 'widget_preview_nstate', '45', '28'],
+ ['panel', 'preview-00.png', 'widget_preview_panel', '150', '50'],
+ ['panes', 'preview-00.png', 'widget_preview_panes', '200', '100'],
+ ['photocam', 'preview-00.png', 'widget_preview_photocam', '243', '162'],
+ ['popup', 'preview-00.png', 'widget_preview_popup', '480', '400'],
+ ['prefs', 'preview-00.png', 'widget_preview_prefs', '200', '160'],
+ ['prefs', 'preview-00.png', 'widget_preview_prefs', '280', '250'],
+ ['progressbar', 'preview-00.png', 'widget_preview_progressbar', '150', '50'],
+ ['radio', 'preview-00.png', 'widget_preview_radio', '60', '20'],
+ ['scroller', 'preview-00.png', 'widget_preview_scroller', '100', '30'],
+ ['segment_control', 'preview-00.png', 'widget_preview_segment_control', '240', '120'],
+ ['separator', 'preview-00.png', 'widget_preview_separator', '10', '80'],
+ ['slider', 'preview-00.png', 'widget_preview_slider', '200', '100'],
+ ['slideshow', 'preview-00.png', 'widget_preview_slideshow', '50', '50'],
+ ['spinner', 'preview-00.png', 'widget_preview_spinner', '160', '30'],
+ ['table', 'preview-00.png', 'widget_preview_table', '100', '100'],
+ ['thumb', 'preview-00.png', 'widget_preview_thumb', '100', '100'],
+ ['toolbar', 'preview-00.png', 'widget_preview_toolbar', '300', '100'],
+ ['web', 'preview-00.png', 'widget_preview_web', '300', '300'],
+ ['win', 'preview-00.png', 'widget_preview_win', '200', '200'],
+]
+
+preview_text_filter = executable('preview_text_filter',
+ join_paths('previews', 'preview_text_filter.c'),
+ include_directories : config_dir,
+ dependencies: [ecore_evas],
+ build_by_default: false,
+)
+
+widget_preview_eps = custom_target('widget_preview_prefs_epc',
+ input: join_paths('widgets', 'widget_preview_prefs.epc'),
+ output: 'widget_preview_prefs.epb',
+ command: elm_prefs_cc_exe + ['@INPUT@', '@OUTPUT@'],
+ build_by_default: false,
+ depends: [elm_prefs_cc]
+)
+
+shot_sh = find_program('shot.sh')
+tar = find_program('tar')
+convert = find_program('convert')
+
+foreach text_filter_property : text_filter_properties
+ text = text_filter_property[0]
+ font = text_filter_property[1]
+ size = text_filter_property[2]
+ name = text_filter_property[3]
+ filter_code = run_command('cat', join_paths(meson.source_root(), 'src', 'examples', 'evas', 'filters', 'filter_'+name+'.lua'))
+
+ doc_target += custom_target('preview_text_filters_'+name,
+ command: [env, 'EFL_RUN_IN_TREE=1', preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size],
+ depends: preview_text_filter,
+ output: 'filter_'+name+'.png',
+ build_by_default: false
+ )
+endforeach
+
+foreach widget_preview : widget_previews
+ binary = widget_preview[2]
+
+ if get_variable(binary, preview_text_filter) == preview_text_filter
+ tmp = executable(binary,
+ join_paths('widgets', binary+'.c'),
+ dependencies: elementary,
+ build_by_default: false,
+ c_args : [
+ '-DPACKAGE_DATA_DIR="'+meson.current_build_dir()+'"',
+ '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
+ '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"',
+ '-DDOCW_DIR="'+meson.current_build_dir()+'"']
+ )
+ set_variable(binary, tmp)
+ endif
+endforeach
+
+foreach widget_preview : widget_previews
+ directory = widget_preview[0]
+ ss = widget_preview[1]
+ binary = widget_preview[2]
+ x = widget_preview[3]
+ y = widget_preview[4]
+
+ widget_executable = get_variable(binary)
+
+ screen_shot_dir = join_paths(meson.build_root(), 'html', 'img', 'widget', directory)
+
+ create_preview = custom_target('widget_preview_'+('_'.join([directory, ss, x, y])),
+ command: [shot_sh, screen_shot_dir, ss, widget_executable.full_path(), x, y],
+ output: '-'.join([directory, ss, x, y]),
+ depends: [widget_executable, widget_preview_eps],
+ build_by_default: false,
+ )
+ convert_preview = []
+ #
+ # This does not work see https://github.com/the-paperless-project/paperless/issues/439 for more details
+ # for now this means that no images will be in the latex documentation
+ #
+ #convert_preview = custom_target('convert_preview_'+('_'.join([directory, ss, x, y])),
+ # command: [convert, join_paths(screen_shot_dir, ss), join_paths(screen_shot_dir, ss.split('.')[0]+'.eps')],
+ # output: '-'.join([directory, ss, x, y])+'.eps',
+ # depends: [create_preview],
+ # build_by_default: false,
+ #)
+ doc_target += [create_preview, convert_preview]
+endforeach
+
+doc_target += custom_target('doxygen',
+ command: [doxygen, join_paths(meson.current_build_dir(), 'Doxyfile')],
+ output: ['empty'],
+ build_by_default: false
+)
+
+compress_target = custom_target('package_doc_tar',
+ command: [tar, '-C', meson.build_root(), '-cf', 'efl-'+meson.version()+'.tar', 'html', 'man'],
+ output: 'efl-'+meson.version()+'.tar',
+ depends: doc_target,
+ build_by_default: false
+)
+
+run_target('doc',
+ command: ['echo', 'Documentation sucessfully build!'],
+ depends: compress_target,
+)
+
+doxyfile_conf = configuration_data()
+doxyfile_conf.merge_from(config_h)
+doxyfile_conf.set('srcdir', meson.current_source_dir())
+doxyfile_conf.set('top_builddir', meson.build_root())
+doxyfile_conf.set('top_srcdir', meson.source_root())
+
+configure_file(
+ input: 'Doxyfile.in',
+ output: 'Doxyfile',
+ configuration: doxyfile_conf,
+)
diff --git a/doc/shot.sh b/doc/shot.sh
index b67be7074c..b6d066f1e9 100755
--- a/doc/shot.sh
+++ b/doc/shot.sh
@@ -12,6 +12,7 @@ export ELM_DISPLAY=shot
export ILLUME_KBD=0,0,240,123
export ILLUME_IND=0,0,240,32
export ILLUME_STK=0,288,240,32
+export EFL_RUN_IN_TREE=1
mkdir -p $DIR || true
diff --git a/doc/widgets/widget_preview_genlist1.c b/doc/widgets/widget_preview_genlist1.c
index bf794fd9b4..59cadd2513 100644
--- a/doc/widgets/widget_preview_genlist1.c
+++ b/doc/widgets/widget_preview_genlist1.c
@@ -33,7 +33,7 @@ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, genlist);
evas_object_show(genlist);
-Elm_Genlist_Item_Class gic;
+Elm_Genlist_Item_Class gic = { 0 };
Elm_Object_Item *glit, *glit_top;
gic.item_style = "default";
gic.func.text_get = _text_get;
diff --git a/doc/widgets/widget_preview_genlist2.c b/doc/widgets/widget_preview_genlist2.c
index 4a86bfcacc..85544120c6 100644
--- a/doc/widgets/widget_preview_genlist2.c
+++ b/doc/widgets/widget_preview_genlist2.c
@@ -33,7 +33,7 @@ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, genlist);
evas_object_show(genlist);
-Elm_Genlist_Item_Class gic;
+Elm_Genlist_Item_Class gic = { 0 };
gic.item_style = "double_label";
gic.func.text_get = _text_get;
gic.func.content_get = _content_get;
diff --git a/doc/widgets/widget_preview_genlist3.c b/doc/widgets/widget_preview_genlist3.c
index 5f8798465e..41e240749b 100644
--- a/doc/widgets/widget_preview_genlist3.c
+++ b/doc/widgets/widget_preview_genlist3.c
@@ -33,7 +33,7 @@ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, genlist);
evas_object_show(genlist);
-Elm_Genlist_Item_Class gic;
+Elm_Genlist_Item_Class gic = { 0 };
gic.item_style = "icon_top_text_bottom";
gic.func.text_get = _text_get;
gic.func.content_get = _content_get;
diff --git a/doc/widgets/widget_preview_genlist4.c b/doc/widgets/widget_preview_genlist4.c
index 95b101298e..df9acce6f0 100644
--- a/doc/widgets/widget_preview_genlist4.c
+++ b/doc/widgets/widget_preview_genlist4.c
@@ -33,7 +33,7 @@ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, genlist);
evas_object_show(genlist);
-Elm_Genlist_Item_Class gic;
+Elm_Genlist_Item_Class gic = { 0 };
gic.item_style = "group_index";
gic.func.text_get = _text_get;
gic.func.content_get = _content_get;
diff --git a/doc/widgets/widget_preview_genlist5.c b/doc/widgets/widget_preview_genlist5.c
index d6ebcab984..f750f39536 100644
--- a/doc/widgets/widget_preview_genlist5.c
+++ b/doc/widgets/widget_preview_genlist5.c
@@ -33,7 +33,7 @@ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, genlist);
evas_object_show(genlist);
-Elm_Genlist_Item_Class gic;
+Elm_Genlist_Item_Class gic = { 0 };
gic.item_style = "default";
gic.func.text_get = _text_get;
gic.func.content_get = _content_get;
diff --git a/header_checks/meson.build b/header_checks/meson.build
index 42d638fc6a..2844e50f3c 100644
--- a/header_checks/meson.build
+++ b/header_checks/meson.build
@@ -189,12 +189,29 @@ if (cc.has_header('sys/mman.h'))
config_h.set10('HAVE_MMAN_H', true)
endif
+regexp = []
+if sys_windows == true
+ regexp = cc.find_library('regex',
+ has_headers: ['regex.h', 'fnmatch.h'],
+ required: true)
+ if regexp.found() == false
+ error('regex can not be found')
+ endif
+else
+ if cc.has_header_symbol('fnmatch.h', 'fnmatch') == false
+ error('fnmatch can not be found')
+ endif
+ if cc.has_header_symbol('regex.h', 'regcomp') == false
+ error('regcomp can not be found')
+ endif
+endif
+
config_h.set('VMAJ', version_major)
config_h.set('VMIN', version_minor)
config_h.set('VMIC', version_micro)
config_h.set('VREV', '0')
-#jpeg detection ... life is a bit more complex there
+#jpeg detection ... life is a bit more complex there
jpeg = dependency('libjpeg', required: false)
if jpeg.found() == false
@@ -214,4 +231,6 @@ config_h.set('SIZEOF_LONG', cc.sizeof('long'))
if sys_windows == true
config_h.set('HAVE_DLSYM', '1')
config_h.set('HAVE_NOTIFY_WIN32', '1')
+ config_h.set10('HAVE_WINDOWS_H', true)
+ config_h.set10('HAVE_DDRAW_H', true)
endif
diff --git a/meson.build b/meson.build
index 1ee603192a..e26d17e507 100644
--- a/meson.build
+++ b/meson.build
@@ -102,6 +102,7 @@ foreach lang : ['c', 'objc', 'cpp']
add_global_arguments('-DEFL_BUILD=1', language: lang)
add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: lang)
if sys_windows == true
+ add_global_arguments('-D_POSIX_C_SOURCE=200809L', language: lang)
if (get_option('windows-version') == 'vista')
add_global_arguments('-DWINVER=0x060', language: lang)
add_global_arguments('-D_WIN32_WINNT=0x0600', language: lang)
@@ -248,6 +249,27 @@ boot_strap_eolian = [
['eolian' ,[] , false, true, true, false, false, false, ['eina'], []],
]
+evas_lib = ['evas' ,[], false, true, false, false, true, true, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']]
+evas_img_modules = ['evas' ,[], true, false, false, false, false, false, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']]
+evas_engines = [join_paths('evas', 'engines'),[], true, false, false, false, false, false, [], []]
+evas_goal = ['evas_goal' ,[], false, true, false, false, false, false, ['eina', 'efl', 'eo'], []]
+
+if get_option('evas-modules') == 'static'
+ evas_settings = [
+ evas_lib,
+ evas_img_modules,
+ evas_engines,
+ evas_goal,
+ ]
+else
+ evas_settings = [
+ evas_lib,
+ evas_img_modules,
+ evas_goal,
+ evas_engines,
+ ]
+endif
+
subprojects = [
# name | option | mod | lib | bin | bench | tests | examples | pkg-config options | name of static libs
['evil' ,[] , false, true, false, false, false, false, [], []],
@@ -270,14 +292,13 @@ subprojects = [
['ecore_fb' ,['fb'] , false, true, false, false, false, false, ['eina'], []],
['ecore_wl2' ,['wl'] , true, true, false, false, false, false, ['eina'], ['libdrm']],
['ecore_sdl' ,['sdl'] , false, true, false, false, false, false, ['eina'], []],
+['ecore_win32' ,[] , false, true, false, false, false, false, ['eina'], []],
['ecore_ipc' ,[] , false, true, false, false, false, false, ['eina'], []],
['ecore_buffer' ,['buffer'] , true, true, true, false, false, false, ['eina'], []],
['ector' ,[] , false, true, false, false, true, false, ['eina', 'efl'], ['draw', 'triangulator', 'freetype']],
['elput' ,['drm'] , false, true, false, false, true, false, ['eina', 'eldbus'], []],
['ecore_drm2' ,['drm'] , false, true, false, false, false, false, ['ecore'], ['libdrm']],
-['ecore_cocoa' ,['cocoa'] , false, true, false, false, false, false, ['eina'], []],
-['evas' ,[] , true, true, false, false, true, true, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']],
-['evas_goal' ,[] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []],
+['ecore_cocoa' ,['cocoa'] , false, true, false, false, false, false, ['eina'], []]] + evas_settings +[
['ecore_input_evas' ,[] , false, true, false, false, false, false, ['eina', 'evas'], []],
['ecore_evas' ,[] , true, true, true, false, false, false, ['evas', 'ector'], []],
['ecore_imf' ,[] , true, true, false, false, false, false, ['eina'], []],
@@ -323,7 +344,7 @@ foreach package : subprojects
]
automatic_pkgfile = true
if package[1].length() == 0 or get_option(package[1][0])
- config_h.set('HAVE_'+package_name.to_upper(), '1')
+ config_h.set('HAVE_'+package_name.to_upper().underscorify(), '1')
dir_package_include = join_paths(dir_include, package_version_name)
dir_package_modules = join_paths(dir_lib, package_name, 'modules')
@@ -376,7 +397,7 @@ foreach package : subprojects
example_dirs += [package_name]
endif
- set_variable('build_'+package_name, true)
+ set_variable('build_'+package_name.underscorify(), true)
# generate automatic pc files for libraries
if automatic_pkgfile == true and package[3]
@@ -419,7 +440,9 @@ if get_option('eolian-bootstrap') == false
subdir(join_paths('src', 'bin', 'efl'))
subdir(join_paths('src', 'generic', 'evas'))
- subdir(join_paths('src', 'generic', 'emotion'))
+ if sys_windows == false
+ subdir(join_paths('src', 'generic', 'emotion'))
+ endif
bindings = get_option('bindings')
bindings_order = ['luajit', 'cxx', 'mono']
@@ -459,6 +482,12 @@ foreach evas_loader_map_inst : evas_loader_map
meson.add_install_script('meson/evas_loader_conf.sh', evas_loader_original, evas_loader_link_types)
endforeach
+doxygen = find_program('doxygen', required : false)
+
+if get_option('eolian-bootstrap') == false and doxygen.found()
+ subdir('doc')
+endif
+
#
# Configure files
#
diff --git a/meson/evas_loader_conf.sh b/meson/evas_loader_conf.sh
index 5fd4259f8f..bacc3660a1 100755
--- a/meson/evas_loader_conf.sh
+++ b/meson/evas_loader_conf.sh
@@ -13,10 +13,10 @@ loader_name="$(echo "$loader" | cut -f 1 -d '.')"
original_ext="$(echo "$loader" | tail -c 4)"
if test "$original_ext" = "$ext" ; then
- mv "$DESTDIR"/"$original_loader" "$DESTDIR"/"$loader_dir"/"$original_name"
+ mv "$DESTDIR""$original_loader" "$DESTDIR""$loader_dir"/"$original_name"
fi
shift
for x in "$@"; do
- ln -sf "$original_name" "$DESTDIR"/"$loader_dir"/"$loader_name"."$x"
+ ln -sf "$original_name" "$DESTDIR""$loader_dir"/"$loader_name"."$x"
done
diff --git a/meson/meson_csharp_docs.sh b/meson/meson_csharp_docs.sh
index 4e6577a173..ea0a000328 100755
--- a/meson/meson_csharp_docs.sh
+++ b/meson/meson_csharp_docs.sh
@@ -4,4 +4,4 @@
# as meson's library() call can't track files other than the generated
# efl_mono.dll
-cp $1 $2
+cp "$1" "$DESTDIR$2"
diff --git a/meson/meson_modules.sh b/meson/meson_modules.sh
index 3398e048b5..328cc9948e 100755
--- a/meson/meson_modules.sh
+++ b/meson/meson_modules.sh
@@ -4,5 +4,5 @@ for x in "$@" ; do
dir="$(dirname $x)"
filename="$(basename $x)"
ext="${filename##*.}"
- mv "$DESTDIR"/"$x" "$DESTDIR"/"$dir"/module."$ext"
+ mv "$DESTDIR""$x" "$DESTDIR""$dir"/module."$ext"
done
diff --git a/src/Makefile_Cxx.am b/src/Makefile_Cxx.am
index a3cc88c1d8..e7930eaf69 100644
--- a/src/Makefile_Cxx.am
+++ b/src/Makefile_Cxx.am
@@ -26,7 +26,7 @@ installed_eflcxxextraheadersdir = $(includedir)/efl-cxx-@VMAJ@/cxx
dist_installed_eflcxxextraheaders_DATA = lib/efl/cxx/efl_part_impl.hh
installed_elementarycxxmainheadersdir = $(includedir)/elementary-cxx-@VMAJ@/
-dist_installed_elementarycxxmainheaders_DATA = lib/elementary/Elementary.hh
+dist_installed_elementarycxxmainheaders_DATA = lib/elementary/Efl_Ui.hh
installed_evascxxmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/
dist_installed_evascxxmainheaders_DATA = lib/evas/Evas.hh
@@ -218,18 +218,18 @@ TESTS_EINA_CXX_OBJNAME = tests_eina_cxx_
endif
-tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
-tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
-tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrlist.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
-tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_iterator.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
+tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
+tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
+tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrlist.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
+tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_iterator.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
-tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-simple.$(OBJEXT): tests/eina_cxx/simple.eo.c tests/eina_cxx/simple.eo.h
+tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-simple.$(OBJEXT): tests/eina_cxx/eina_simple.eo.c tests/eina_cxx/eina_simple.eo.h
CLEANFILES += \
-tests/eina_cxx/simple.eo.c \
-tests/eina_cxx/simple.eo.h \
-tests/eina_cxx/simple.eo.hh \
-tests/eina_cxx/simple.eo.impl.hh
+tests/eina_cxx/eina_simple.eo.c \
+tests/eina_cxx/eina_simple.eo.h \
+tests/eina_cxx/eina_simple.eo.hh \
+tests/eina_cxx/eina_simple.eo.impl.hh
tests_eina_cxx_eina_cxx_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-DTESTS_WD=\"`pwd`\" \
@@ -407,4 +407,4 @@ endif
endif
EXTRA_DIST2 += \
-tests/eina_cxx/simple.eo
+tests/eina_cxx/eina_simple.eo
diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index 649dbbec28..4c3b5fd937 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -49,7 +49,8 @@ ecore_eolian_files_public = \
lib/ecore/efl_view_model.eo \
lib/ecore/efl_core_env.eo \
lib/ecore/efl_core_proc_env.eo \
- lib/ecore/efl_core_command_line.eo
+ lib/ecore/efl_core_command_line.eo \
+ lib/ecore/efl_filter_model.eo
ecore_test_eolian_files = \
tests/ecore/efl_app_test_cml.eo \
@@ -157,6 +158,7 @@ lib/ecore/efl_composite_model_private.h \
lib/ecore/efl_model_accessor_view.c \
lib/ecore/efl_model_accessor_view_private.h \
lib/ecore/efl_view_model.c \
+lib/ecore/efl_filter_model.c \
lib/ecore/efl_linear_interpolator.c \
lib/ecore/efl_accelerate_interpolator.c \
lib/ecore/efl_decelerate_interpolator.c \
diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index aa1cd787e0..827e7237f5 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -23,7 +23,6 @@ edje_eolian_priv_files = \
edje_eolian_c = $(edje_eolian_files:%.eo=%.eo.c)
edje_eolian_h = $(edje_eolian_files:%.eo=%.eo.h) \
- $(edje_eolian_files:%.eo=%.eo.legacy.h) \
$(edje_eolian_type_files:%.eot=%.eot.h)
edje_eolian_priv_c = $(edje_eolian_priv_files:%.eo=%.eo.c)
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 283c8b975c..e9323a3195 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -52,6 +52,7 @@ efl_eolian_files = \
lib/efl/interfaces/efl_orientation.eo \
lib/efl/interfaces/efl_container.eo \
lib/efl/interfaces/efl_content.eo \
+ lib/efl/interfaces/efl_gfx_arrangement.eo \
lib/efl/interfaces/efl_pack.eo \
lib/efl/interfaces/efl_pack_layout.eo \
lib/efl/interfaces/efl_pack_linear.eo \
diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am
index 5c6d57e626..cc6e38570c 100644
--- a/src/Makefile_Efl_Mono.am
+++ b/src/Makefile_Efl_Mono.am
@@ -140,15 +140,7 @@ lib/evas/canvas/evas_canvas3d_node.eo.cs \
lib/evas/canvas/evas_canvas3d_object.eo.cs \
lib/evas/canvas/evas_canvas3d_primitive.eo.cs \
lib/evas/canvas/evas_canvas3d_scene.eo.cs \
-lib/evas/canvas/evas_canvas3d_texture.eo.cs \
-lib/evas/canvas/efl_canvas_vg_object.eo.cs \
-lib/evas/canvas/efl_vg.eo.cs \
-lib/evas/canvas/efl_vg_container.eo.cs \
-lib/evas/canvas/efl_vg_gradient.eo.cs \
-lib/evas/canvas/efl_vg_gradient_radial.eo.cs \
-lib/evas/canvas/efl_vg_gradient_linear.eo.cs \
-lib/evas/canvas/efl_vg_root_node.eo.cs \
-lib/evas/canvas/efl_vg_shape.eo.cs
+lib/evas/canvas/evas_canvas3d_texture.eo.cs
efl_eolian_blacklisted_files = \
lib/efl/interfaces/efl_io_buffer.eo.cs \
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index f0e2b638cf..9baaecc0ef 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -198,7 +198,6 @@ elm_eolian_type_files = \
elm_public_eolian_c = $(elm_public_eolian_files:%.eo=%.eo.c)
elm_public_eolian_h = $(elm_public_eolian_files:%.eo=%.eo.h) \
- $(elm_public_eolian_files:%.eo=%.eo.legacy.h) \
$(elm_eolian_type_files:%.eot=%.eot.h)
elm_private_eolian_c = $(elm_private_eolian_files:%.eo=%.eo.c)
@@ -206,7 +205,6 @@ elm_private_eolian_h = $(elm_private_eolian_files:%.eo=%.eo.h)
elm_legacy_eolian_c = $(elm_legacy_eolian_files:%.eo=%.eo.c)
elm_legacy_eolian_eo_h = $(elm_legacy_eolian_files:%.eo=%.eo.h)
-elm_legacy_eolian_legacy_h = $(elm_legacy_eolian_files:%.eo=%.eo.legacy.h)
BUILT_SOURCES += \
$(elm_public_eolian_c) \
@@ -214,8 +212,7 @@ BUILT_SOURCES += \
$(elm_private_eolian_c) \
$(elm_private_eolian_h) \
$(elm_legacy_eolian_c) \
- $(elm_legacy_eolian_eo_h) \
- $(elm_legacy_eolian_legacy_h)
+ $(elm_legacy_eolian_eo_h)
if INSTALL_EO_FILES
elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@
@@ -773,8 +770,7 @@ includesunstable_HEADERS = \
includesunstabledir = $(includedir)/elementary-@VMAJ@
nodist_includesunstable_HEADERS = \
- $(elm_public_eolian_h) \
- $(elm_legacy_eolian_legacy_h)
+ $(elm_public_eolian_h)
includesub_HEADERS = \
lib/elementary/elc_ctxpopup.h \
diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am
index c75394e03f..e5a8e49c38 100644
--- a/src/Makefile_Eolian.am
+++ b/src/Makefile_Eolian.am
@@ -81,7 +81,7 @@ tests/eolian/data/class_simple.eo \
tests/eolian/data/complex_type.eo \
tests/eolian/data/consts.eo \
tests/eolian/data/ctor_dtor.eo \
-tests/eolian/data/docs.eo \
+tests/eolian/data/eo_docs.eo \
tests/eolian/data/enum.eo \
tests/eolian/data/events.eo \
tests/eolian/data/extern.eo \
diff --git a/src/Makefile_Eolian_Files_Helper.am b/src/Makefile_Eolian_Files_Helper.am
index 35bf1318cc..727e0ad229 100644
--- a/src/Makefile_Eolian_Files_Helper.am
+++ b/src/Makefile_Eolian_Files_Helper.am
@@ -3,14 +3,13 @@ AM_V_EOL = $(am__v_EOL_@AM_V@)
am__v_EOL_ = $(am__v_EOL_@AM_DEFAULT_V@)
am__v_EOL_0 = @echo " EOLIAN " $@;
-SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h .eot .eot.h
+SUFFIXES = .eo .eo.c .eo.h .eot .eot.h
#disable rules for subdir builds to avoid recursive dependencies
../%.eo.c: %.eo ${_EOLIAN_GEN_DEP}
../%.eo.h: %.eo ${_EOLIAN_GEN_DEP}
../%.eot.h: %.eot ${_EOLIAN_GEN_DEP}
-../%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP}
%.eo.c: %.eo ${_EOLIAN_GEN_DEP}
$(AM_V_EOL) \
@@ -26,8 +25,3 @@ SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h .eot .eot.h
$(AM_V_EOL) \
$(MKDIR_P) $(@D); \
$(EOLIAN_GEN) $(EOLIAN_FLAGS) $(EOLIAN_GEN_FLAGS) -gh -o h:$@ $<
-
-%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP}
- $(AM_V_EOL) \
- $(MKDIR_P) $(@D); \
- $(EOLIAN_GEN) $(EOLIAN_FLAGS) $(EOLIAN_GEN_FLAGS) -gl -o l:$@ $<
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 95d8022a2c..95ec86e756 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -85,12 +85,10 @@ evas_gesture_eolian_priv_h = $(evas_gesture_eolian_priv_files:%.eo=%.eo.h)
evas_canvas_eolian_pub_c = $(evas_canvas_eolian_pub_files:%.eo=%.eo.c)
evas_canvas_eolian_pub_h = $(evas_canvas_eolian_pub_files:%.eo=%.eo.h) \
- $(evas_canvas_eolian_pub_files:%.eo=%.eo.legacy.h) \
$(evas_canvas_eolian_type_files:%.eot=%.eot.h)
evas_gesture_eolian_pub_c = $(evas_gesture_eolian_pub_files:%.eo=%.eo.c)
evas_gesture_eolian_pub_h = $(evas_gesture_eolian_pub_files:%.eo=%.eo.h) \
- $(evas_gesture_eolian_pub_files:%.eo=%.eo.legacy.h) \
$(evas_gesture_eolian_type_files:%.eot=%.eot.h)
evas_eolian_files = $(evas_canvas_eolian_pub_files) \
@@ -590,6 +588,7 @@ lib/evas/common/evas_map_image_internal.c \
lib/evas/common/evas_map_image_core.c \
lib/evas/common/evas_map_image_loop.c \
lib/evas/common/evas_map_image_aa.c \
+lib/evas/common/evas_map_image_internal_high.c \
lib/evas/common/evas_scale_smooth_scaler.c \
lib/evas/common/evas_scale_smooth_scaler_down.c \
lib/evas/common/evas_scale_smooth_scaler_downx.c \
@@ -976,7 +975,6 @@ $(NULL)
evas_gl_generic_eolian_c = $(evas_gl_generic_eolian_files:%.eo=%.eo.c)
evas_gl_generic_eolian_h = $(evas_gl_generic_eolian_files:%.eo=%.eo.h) \
- $(evas_gl_generic_eolian_files:%.eo=%.eo.legacy.h) \
$(evas_gl_generic_eolian_type_files:%.eot=%.eot.h)
BUILT_SOURCES += \
@@ -2210,6 +2208,7 @@ modules_evas_image_loaders_tgv_module_la_CPPFLAGS = \
-I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/static_libs/rg_etc \
-I$(top_srcdir)/src/lib/evas/ \
+-I$(top_srcdir)/src/lib/evas/include \
-DEFL_BUILD \
@EVAS_CFLAGS@ \
@NEON_CFLAGS@
@@ -2247,6 +2246,7 @@ modules_evas_image_savers_tgv_module_la_CPPFLAGS = \
-I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/static_libs/rg_etc \
-I$(top_srcdir)/src/lib/evas/ \
+-I$(top_srcdir)/src/lib/evas/include \
-DEFL_BUILD \
@EVAS_CFLAGS@
diff --git a/src/Makefile_Evil.am b/src/Makefile_Evil.am
index 91dcc1c7f1..f3ed4787e2 100644
--- a/src/Makefile_Evil.am
+++ b/src/Makefile_Evil.am
@@ -21,7 +21,6 @@ lib/evil/evil_string.h \
lib/evil/evil_time.h \
lib/evil/evil_unistd.h \
lib/evil/evil_util.h \
-lib/evil/fnmatch.h \
lib/evil/pwd.h
evilmmanheadersdir = $(includedir)/evil-@VMAJ@/sys
@@ -31,8 +30,6 @@ lib/evil/sys/mman.h
lib_evil_libevil_la_SOURCES = \
lib/evil/evil_dlfcn.c \
lib/evil/evil_fcntl.c \
-lib/evil/evil_fnmatch.c \
-lib/evil/evil_fnmatch_list_of_states.c \
lib/evil/evil_langinfo.c \
lib/evil/evil_locale.c \
lib/evil/evil_main.c \
@@ -44,33 +41,14 @@ lib/evil/evil_string.c \
lib/evil/evil_time.c \
lib/evil/evil_unistd.c \
lib/evil/evil_util.c \
-lib/evil/evil_private.h \
-lib/evil/evil_fnmatch_private.h
+lib/evil/evil_private.h
lib_evil_libevil_la_CPPFLAGS = @EVIL_CPPFLAGS@ -DEFL_BUILD
lib_evil_libevil_la_CFLAGS = @EVIL_CFLAGS@ @EVIL_CFLAGS_WRN@ -D__USE_MINGW_ANSI_STDIO
lib_evil_libevil_la_LIBADD = @EVIL_LIBS@
lib_evil_libevil_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
-# regex
-
-dist_install_evilheaders_DATA += \
-lib/evil/regex/regex.h
-
-lib_evil_libevil_la_SOURCES += \
-lib/evil/regex/regcomp.c \
-lib/evil/regex/regerror.c \
-lib/evil/regex/regexec.c \
-lib/evil/regex/regfree.c \
-lib/evil/regex/cclass.h \
-lib/evil/regex/cname.h \
-lib/evil/regex/regex2.h \
-lib/evil/regex/utils.h
-
-lib_evil_libevil_la_CPPFLAGS += \
--I$(top_srcdir)/src/lib/evil \
--I$(top_srcdir)/src/lib/evil/regex \
--DPOSIX_MISTAKE
+lib_evil_libevil_la_CPPFLAGS += -I$(top_srcdir)/src/lib/evil
### Unit tests
@@ -83,7 +61,6 @@ tests_evil_evil_suite_SOURCES = \
tests/evil/evil_suite.c \
tests/evil/evil_suite.h \
tests/evil/evil_test_dlfcn.c \
-tests/evil/evil_test_libgen.c \
tests/evil/evil_test_main.c \
tests/evil/evil_test_stdio.c \
tests/evil/evil_test_stdlib.c \
@@ -103,9 +80,3 @@ tests_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
endif
endif
-
-EXTRA_DIST2 += \
-lib/evil/regex/regerror.ih \
-lib/evil/regex/engine.ih \
-lib/evil/regex/regcomp.ih \
-lib/evil/regex/engine.c
diff --git a/src/benchmarks/eina/eina_bench_stringshare_e17.c b/src/benchmarks/eina/eina_bench_stringshare_e17.c
index 2e2769641e..2b2b45cb34 100644
--- a/src/benchmarks/eina/eina_bench_stringshare_e17.c
+++ b/src/benchmarks/eina/eina_bench_stringshare_e17.c
@@ -81,6 +81,7 @@ static void
eina_bench_e17_stringshare(Eina_Stringshare_Test *str)
{
Eina_Counter *cnt;
+ char *result;
cnt = eina_counter_new(str->name);
@@ -96,7 +97,9 @@ eina_bench_e17_stringshare(Eina_Stringshare_Test *str)
eina_counter_stop(cnt, 1);
- fprintf(stderr, "For `%s`:\n%s\n", str->name,eina_counter_dump(cnt));
+ result = eina_counter_dump(cnt);
+ fprintf(stderr, "For `%s`:\n%s\n", str->name, result);
+ free(result);
eina_counter_free(cnt);
}
diff --git a/src/bin/edje/meson.build b/src/bin/edje/meson.build
index b2f2e738b1..5ba05d7c63 100644
--- a/src/bin/edje/meson.build
+++ b/src/bin/edje/meson.build
@@ -36,8 +36,12 @@ if meson.is_cross_build()
edje_cc_exe = [_edje_cc]
edje_depends = []
else
- env = find_program('env', native: true)
- edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
+ if sys_windows == true
+ edje_cc_exe = [edje_cc.full_path()]
+ else
+ env = find_program('env', native: true)
+ edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
+ endif
edje_depends = [edje_cc, epp]
endif
diff --git a/src/bin/efreet/meson.build b/src/bin/efreet/meson.build
index 4c7bf5efb5..27f0e396e6 100644
--- a/src/bin/efreet/meson.build
+++ b/src/bin/efreet/meson.build
@@ -11,14 +11,16 @@ config_h.set('STRICT_SPEC', '1')
efreetd = executable('efreetd',
efreetd_src,
- dependencies: [efreet, ecore, ecore_ipc, ecore_file, eio],
+ dependencies: [efreet, ecore, ecore_ipc, ecore_file, eio, intl],
install: true,
c_args : package_c_args,
)
+efreet_bin_deps = [efreet, ecore, eet, ecore_file, intl]
+
efreet_desktop_cache_create = executable('efreet_desktop_cache_create',
'efreet_desktop_cache_create.c',
- dependencies: [efreet, ecore, eet, ecore_file],
+ dependencies: efreet_bin_deps,
install: true,
install_dir : join_paths(dir_lib, 'efreet', version_name),
c_args : package_c_args,
@@ -26,7 +28,7 @@ efreet_desktop_cache_create = executable('efreet_desktop_cache_create',
efreet_icon_cache_create = executable('efreet_icon_cache_create',
'efreet_icon_cache_create.c',
- dependencies: [efreet, ecore, eet, ecore_file],
+ dependencies: efreet_bin_deps,
install: true,
install_dir : join_paths(dir_lib, 'efreet', version_name),
c_args : package_c_args,
@@ -34,7 +36,7 @@ efreet_icon_cache_create = executable('efreet_icon_cache_create',
efreet_mime_cache_create = executable('efreet_mime_cache_create',
'efreet_mime_cache_create.c',
- dependencies: [efreet, ecore, eet, ecore_file],
+ dependencies: efreet_bin_deps,
install: true,
install_dir : join_paths(dir_lib, 'efreet', version_name),
c_args : package_c_args,
diff --git a/src/bin/eina/eina_btlog/eina_btlog.c b/src/bin/eina/eina_btlog/eina_btlog.c
index 41464611db..913470a1a8 100644
--- a/src/bin/eina/eina_btlog/eina_btlog.c
+++ b/src/bin/eina/eina_btlog/eina_btlog.c
@@ -194,7 +194,7 @@ _atos(const char *prog, const char *bin_dir, const char *bin_name, unsigned long
if ((spaces == func_space_count) && (func_done == EINA_FALSE))
{
*s = '\0';
- *func_name = strndup(buf, (int)(s - &(buf[0])));
+ *func_name = eina_strndup(buf, (int)(s - &(buf[0])));
func_done = EINA_TRUE;
}
else if (*s == '(')
@@ -208,7 +208,7 @@ _atos(const char *prog, const char *bin_dir, const char *bin_name, unsigned long
else if ((*s == ':') && (func_done == EINA_TRUE))
{
*s = '\0';
- *file_name = strndup(f1, (int)(s - f1));
+ *file_name = eina_strndup(f1, (int)(s - f1));
s++;
len = strlen(s);
s[len - 1] = '\0'; /* Remove the closing parenthesis */
@@ -266,7 +266,7 @@ bt_input_translate(const char *line, char **comment)
(int)(fileend - filestart), filestart,
(int)(addrend - addrstart), addrstart,
(int)(baseend - basestart), basestart);
- *comment = strndup(line, addrstart - line);
+ *comment = eina_strndup(line, addrstart - line);
return local;
}
diff --git a/src/bin/elementary/run.c b/src/bin/elementary/run.c
index 41f666f373..261935f41f 100644
--- a/src/bin/elementary/run.c
+++ b/src/bin/elementary/run.c
@@ -17,6 +17,10 @@
# include <alloca.h>
#endif
+#ifdef _WIN32
+# include <direct.h> /* getcwd */
+#endif
+
#ifdef HAVE_ENVIRON
extern char **environ;
#endif
diff --git a/src/bin/elementary/test_dnd.c b/src/bin/elementary/test_dnd.c
index 93bed2a397..be0738e122 100644
--- a/src/bin/elementary/test_dnd.c
+++ b/src/bin/elementary/test_dnd.c
@@ -201,25 +201,6 @@ _grid_item_getcb(Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *xposret, int
return item;
}
-static inline char *
-_strndup(const char *str, size_t len)
-{
- const char *p;
- char *ret;
- size_t slen;
-
- for (slen = 0, p = str;
- (slen < len) && (*p);
- p++, slen++);
-
- ret = malloc(slen + 1);
- if (!ret) return NULL;
-
- if (slen > 0) memcpy(ret, str, slen);
- ret[slen] = '\0';
- return ret;
-}
-
static void
_gl_poscb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, Evas_Coord x, Evas_Coord y, int xposret, int yposret, Elm_Xdnd_Action action EINA_UNUSED)
{
@@ -237,7 +218,7 @@ _gl_dropcb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, Elm_Se
if (ev->len <= 0)
return EINA_FALSE;
- char *dd = _strndup(ev->data, ev->len);
+ char *dd = eina_strndup(ev->data, ev->len);
if (!dd) return EINA_FALSE;
char *p = dd;
@@ -292,7 +273,7 @@ _grid_dropcb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, Elm_
if (ev->len <= 0)
return EINA_FALSE;
- char *dd = _strndup(ev->data, ev->len);
+ char *dd = eina_strndup(ev->data, ev->len);
if (!dd) return EINA_FALSE;
char *p = dd;
char *s = _drag_data_extract(&p);
@@ -1000,7 +981,7 @@ static Eina_Bool _drop_box_button_new_cb(void *data, Evas_Object *obj, Elm_Selec
if (ev->len <= 0)
return EINA_FALSE;
- char *dd = _strndup(ev->data, ev->len);
+ char *dd = eina_strndup(ev->data, ev->len);
if (!dd) return EINA_FALSE;
char *p = dd;
char *s = _drag_data_extract(&p);
@@ -1034,7 +1015,7 @@ static Eina_Bool _drop_but_icon_change_cb(void *data, Evas_Object *obj, Elm_Sele
if (ev->len <= 0)
return EINA_FALSE;
- char *dd = _strndup(ev->data, ev->len);
+ char *dd = eina_strndup(ev->data, ev->len);
if (!dd) return EINA_FALSE;
char *p = dd;
char *s = _drag_data_extract(&p);
@@ -1062,7 +1043,7 @@ static Eina_Bool _drop_bg_change_cb(void *data EINA_UNUSED, Evas_Object *obj, El
if (ev->len <= 0)
return EINA_FALSE;
- char *dd = _strndup(ev->data, ev->len);
+ char *dd = eina_strndup(ev->data, ev->len);
if (!dd) return EINA_FALSE;
char *p = dd;
char *s = _drag_data_extract(&p);
diff --git a/src/bin/elementary/test_evas_snapshot.c b/src/bin/elementary/test_evas_snapshot.c
index 855c33a949..0d77307c03 100644
--- a/src/bin/elementary/test_evas_snapshot.c
+++ b/src/bin/elementary/test_evas_snapshot.c
@@ -125,7 +125,7 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
efl_ui_win_autodel_set(efl_added, 1));
table = efl_add(EFL_UI_TABLE_CLASS, win,
- efl_pack_padding_set(efl_added, 5, 5, 1));
+ efl_gfx_arrangement_content_padding_set(efl_added, 5, 5, 1));
efl_content_set(win, table);
// Objects below the snapshot
diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c
index 49372190d6..a52a95e886 100644
--- a/src/bin/elementary/test_gfx_filters.c
+++ b/src/bin/elementary/test_gfx_filters.c
@@ -387,9 +387,9 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
- efl_pack_padding_set(efl_added, 5, 5, 1),
+ efl_gfx_arrangement_content_padding_set(efl_added, 5, 5, 1),
efl_gfx_hint_margin_set(efl_added, 5, 5, 5, 5),
- efl_pack_align_set(efl_added, 0, 0.5));
+ efl_gfx_arrangement_content_align_set(efl_added, 0, 0.5));
efl_pack(box, box2);
for (size_t k = 0; k < EINA_C_ARRAY_LENGTH(images); k++)
@@ -456,7 +456,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
- efl_pack_align_set(efl_added, 0.5, 0.5));
+ efl_gfx_arrangement_content_align_set(efl_added, 0.5, 0.5));
efl_pack(flip, box2);
// Note: No TEXT object with EO APIs
@@ -472,7 +472,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
- efl_pack_align_set(efl_added, 0.5, 0.5));
+ efl_gfx_arrangement_content_align_set(efl_added, 0.5, 0.5));
efl_pack(flip, box2);
const struct { const char *name, *code; } programs [] = {
diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c
index 0021be5603..7423c2df5e 100644
--- a/src/bin/elementary/test_ui_box.c
+++ b/src/bin/elementary/test_ui_box.c
@@ -76,7 +76,7 @@ padding_slider_cb(void *data, const Efl_Event *event)
Eo *win = data, *box;
box = efl_key_wref_get(win, "box");
- efl_pack_padding_set(box, val, val, EINA_TRUE);
+ efl_gfx_arrangement_content_padding_set(box, val, val, EINA_TRUE);
}
static void
@@ -97,8 +97,8 @@ alignh_slider_cb(void *data, const Efl_Event *event)
box = efl_key_wref_get(win, "box");
val = elm_slider_value_get(event->object);
- efl_pack_align_get(box, NULL, &av);
- efl_pack_align_set(box, val, av);
+ efl_gfx_arrangement_content_align_get(box, NULL, &av);
+ efl_gfx_arrangement_content_align_set(box, val, av);
}
static void
@@ -109,8 +109,8 @@ alignv_slider_cb(void *data, const Efl_Event *event)
box = efl_key_wref_get(win, "box");
val = elm_slider_value_get(event->object);
- efl_pack_align_get(box, &ah, NULL);
- efl_pack_align_set(box, ah, val);
+ efl_gfx_arrangement_content_align_get(box, &ah, NULL);
+ efl_gfx_arrangement_content_align_set(box, ah, val);
}
static void
@@ -240,7 +240,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
vbox = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
- efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
+ efl_gfx_arrangement_content_padding_set(vbox, 10, 10, EINA_TRUE);
efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
elm_win_resize_object_add(win, vbox);
@@ -256,7 +256,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
hbox = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
efl_content_set(f, hbox);
- efl_pack_padding_set(hbox, 10, 0, EINA_TRUE);
+ efl_gfx_arrangement_content_padding_set(hbox, 10, 0, EINA_TRUE);
/* weights radio group */
@@ -533,7 +533,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
bx = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
efl_key_wref_set(win, "box", bx);
- efl_pack_padding_set(bx, 10, 10, EINA_TRUE);
+ efl_gfx_arrangement_content_padding_set(bx, 10, 10, EINA_TRUE);
efl_gfx_hint_align_set(bx, 0.5, 0.5);
efl_gfx_hint_weight_set(bx, 1, 1);
efl_content_set(f, bx);
diff --git a/src/bin/elementary/test_ui_pager.c b/src/bin/elementary/test_ui_pager.c
index 32bc1d775a..3ca030970a 100644
--- a/src/bin/elementary/test_ui_pager.c
+++ b/src/bin/elementary/test_ui_pager.c
@@ -443,12 +443,12 @@ static void pack_cb(void *data,
back_btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Pack", btn, NULL,
efl_added, NULL));
in_box1 = efl_add(EFL_UI_BOX_CLASS, box,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
sp1 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box1,
@@ -458,7 +458,7 @@ static void pack_cb(void *data,
efl_ui_pager_current_page_get(pager)));
in_box2 = efl_add(EFL_UI_BOX_CLASS, box,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
sp2 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box2);
@@ -628,7 +628,7 @@ static void current_page_cb(void *data,
back_btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Current Page", btn, NULL,
efl_added, NULL));
@@ -674,7 +674,7 @@ static void indicator_cb(void *data,
back_btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Indicator", btn, NULL,
efl_added, NULL));
diff --git a/src/bin/elementary/test_ui_pager_scroll.c b/src/bin/elementary/test_ui_pager_scroll.c
index 8df58c6570..604bd7b503 100644
--- a/src/bin/elementary/test_ui_pager_scroll.c
+++ b/src/bin/elementary/test_ui_pager_scroll.c
@@ -495,7 +495,7 @@ static void padding_cb(void *data,
back_btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Padding Size", btn, NULL,
efl_added, NULL));
@@ -522,7 +522,7 @@ static void side_page_num_cb(void *data,
back_btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Side Page Num", btn, NULL,
efl_added, NULL));
@@ -555,12 +555,12 @@ static void pack_cb(void *data,
back_btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Pack", btn, NULL,
efl_added, NULL));
in_box1 = efl_add(EFL_UI_BOX_CLASS, box,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
sp1 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box1,
@@ -570,7 +570,7 @@ static void pack_cb(void *data,
efl_ui_pager_current_page_get(pager)));
in_box2 = efl_add(EFL_UI_BOX_CLASS, box,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
sp2 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box2);
@@ -739,7 +739,7 @@ static void current_page_cb(void *data,
back_btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Current Page", btn, NULL,
efl_added, NULL));
@@ -787,7 +787,7 @@ static void scroll_block_cb(void *data,
back_btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Scroll Block", btn, NULL,
efl_added, NULL));
@@ -826,7 +826,7 @@ static void loop_cb(void *data EINA_UNUSED,
back_btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Loop", btn, NULL,
efl_added, NULL));
@@ -875,7 +875,7 @@ static void indicator_cb(void *data EINA_UNUSED,
back_btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Indicator", btn, NULL,
efl_added, NULL));
diff --git a/src/bin/elementary/test_ui_relative_layout.c b/src/bin/elementary/test_ui_relative_layout.c
index e6481ec97e..6834b66688 100644
--- a/src/bin/elementary/test_ui_relative_layout.c
+++ b/src/bin/elementary/test_ui_relative_layout.c
@@ -16,6 +16,21 @@ typedef enum {
} Options;
static void
+_btn_color_clicked_cb(void *data, const Efl_Event *event EINA_UNUSED)
+{
+ Eo *layout = data;
+
+ static Eina_Bool changed = EINA_TRUE;
+
+ if (changed)
+ efl_gfx_color_set(layout, 0, 88, 204, 255);
+ else
+ efl_gfx_color_set(layout, 255, 255, 255, 255);
+
+ changed = !changed;
+}
+
+static void
_btn_clicked_to_cb(void *data, const Efl_Event *event)
{
Eo *to, *btn, *obj = event->object;
@@ -59,7 +74,6 @@ _btn_clicked_to_cb(void *data, const Efl_Event *event)
break;
}
efl_text_set(obj, ((to == layout) ? "parent" : (char *)efl_text_get(to)));
- efl_pack_layout_request(layout);
}
static void
@@ -87,7 +101,6 @@ _slider_changed_relative_cb(void *data, const Efl_Event *event)
efl_ui_relative_layout_relation_bottom_set(layout, btn, NULL, val);
break;
}
- efl_pack_layout_request(layout);
}
static void
@@ -105,8 +118,6 @@ _slider_changed_align_cb(void *data, const Efl_Event *event)
efl_gfx_hint_align_set(btn, val, y);
else if (opt == 'y')
efl_gfx_hint_align_set(btn, x, val);
-
- efl_pack_layout_request(layout);
}
static void
@@ -139,7 +150,7 @@ _setter_add(Eo *vbox, Eo *btn, Options option)
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
- efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
efl_pack(vbox, efl_added));
efl_add(EFL_UI_TEXT_CLASS, hbox,
@@ -181,13 +192,13 @@ _button_frame_add(Eo *box, Eo *btn)
vbox = efl_add(EFL_UI_BOX_CLASS, f,
efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
- efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
efl_gfx_hint_margin_set(efl_added, 2, 2, 2, 2),
efl_content_set(f, efl_added));
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
- efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
efl_pack(vbox, efl_added));
efl_add(EFL_CANVAS_RECTANGLE_CLASS, hbox,
@@ -220,7 +231,7 @@ _button_frame_add(Eo *box, Eo *btn)
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
- efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
efl_pack(vbox, efl_added));
efl_add(EFL_UI_TEXT_CLASS, hbox,
@@ -240,7 +251,7 @@ _button_frame_add(Eo *box, Eo *btn)
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
- efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
efl_pack(vbox, efl_added));
efl_add(EFL_UI_TEXT_CLASS, hbox,
@@ -271,7 +282,7 @@ test_ui_relative_layout(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
vbox = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
efl_gfx_hint_margin_set(efl_added, 5, 5, 5, 5),
efl_content_set(win, efl_added));
@@ -283,7 +294,7 @@ test_ui_relative_layout(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
hbox = efl_add(EFL_UI_BOX_CLASS, f,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
- efl_pack_padding_set(efl_added, 10, 0, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 0, EINA_TRUE),
efl_content_set(f, efl_added));
/* contents */
@@ -297,6 +308,7 @@ test_ui_relative_layout(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout,
efl_text_set(efl_added, "button1"),
efl_gfx_hint_align_set(efl_added, 0.0, 0.0),
+ efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_color_clicked_cb, layout),
efl_ui_relative_layout_relation_right_set(layout, efl_added, layout, 0.0),
efl_ui_relative_layout_relation_bottom_set(layout, efl_added, layout, 0.0));
diff --git a/src/bin/elementary/test_ui_tab_pager.c b/src/bin/elementary/test_ui_tab_pager.c
index c85b4b7fd2..b99c150269 100644
--- a/src/bin/elementary/test_ui_tab_pager.c
+++ b/src/bin/elementary/test_ui_tab_pager.c
@@ -232,7 +232,7 @@ _current_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Current", btn, NULL, efl_added, NULL));
sp = efl_add(EFL_UI_SPIN_BUTTON_CLASS, box,
@@ -337,7 +337,7 @@ _pack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Pack", btn, NULL, efl_added, NULL));
/* Pack Begin */
@@ -365,7 +365,7 @@ _pack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
efl_pack_end(box, efl_added));
in_box = efl_add(EFL_UI_BOX_CLASS, box,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
efl_pack_end(box, efl_added));
@@ -441,7 +441,7 @@ _unpack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Unpack", btn, NULL, efl_added, NULL));
/* Clear */
@@ -465,7 +465,7 @@ _unpack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
efl_pack_end(box, efl_added));
in_box = efl_add(EFL_UI_BOX_CLASS, box,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
efl_pack_end(box, efl_added));
@@ -536,7 +536,7 @@ _tab_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Tab", btn, NULL, efl_added, NULL));
label_check = efl_add(EFL_UI_CHECK_CLASS, box,
@@ -589,7 +589,7 @@ _transition_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
box = efl_add(EFL_UI_BOX_CLASS, navi,
- efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+ efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
elm_naviframe_item_push(navi, "Transition", btn, NULL, efl_added, NULL));
btn = efl_add(EFL_UI_BUTTON_CLASS, box,
diff --git a/src/bin/elementary/test_ui_table.c b/src/bin/elementary/test_ui_table.c
index d11cefe43b..6d52887d69 100644
--- a/src/bin/elementary/test_ui_table.c
+++ b/src/bin/elementary/test_ui_table.c
@@ -79,7 +79,7 @@ static void
padding_slider_cb(void *data, const Efl_Event *event)
{
int val = elm_slider_value_get(event->object);
- efl_pack_padding_set(data, val, val, EINA_TRUE);
+ efl_gfx_arrangement_content_padding_set(data, val, val, EINA_TRUE);
}
static void
@@ -199,7 +199,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
vbox = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
- efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
+ efl_gfx_arrangement_content_padding_set(vbox, 10, 10, EINA_TRUE);
efl_gfx_hint_weight_set(vbox, 1, 1);
efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
elm_win_resize_object_add(win, vbox);
@@ -220,7 +220,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
hbox = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
elm_object_content_set(f, hbox);
- efl_pack_padding_set(hbox, 10, 0, EINA_TRUE);
+ efl_gfx_arrangement_content_padding_set(hbox, 10, 0, EINA_TRUE);
/* weights radio group */
@@ -568,7 +568,7 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
vbox = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
- efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
+ efl_gfx_arrangement_content_padding_set(vbox, 10, 10, EINA_TRUE);
efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
elm_win_resize_object_add(win, vbox);
efl_gfx_entity_visible_set(vbox, 1);
@@ -589,7 +589,7 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
hbox = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
elm_object_content_set(f, hbox);
- efl_pack_padding_set(hbox, 5, 0, EINA_TRUE);
+ efl_gfx_arrangement_content_padding_set(hbox, 5, 0, EINA_TRUE);
efl_gfx_entity_visible_set(hbox, 1);
ico = elm_icon_add(win);
diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 39fa89a429..7120612c9d 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -19,8 +19,7 @@ _indent_line(Eina_Strbuf *buf, int ind)
: DOC_LINE_LIMIT)
static void
-_generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf,
- Eina_Bool use_legacy)
+_generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf)
{
const Eolian_Object *decl = eolian_state_object_by_name_get(state, refn);
if (decl)
@@ -54,7 +53,7 @@ _generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf,
eina_stringshare_del(bname);
goto noref;
}
- _generate_ref(state, bname, wbuf, use_legacy);
+ _generate_ref(state, bname, wbuf);
eina_strbuf_append(wbuf, sfx);
eina_stringshare_del(bname);
return;
@@ -96,7 +95,7 @@ _generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf,
}
if (cl)
{
- char *meth = strndup(mname + 1, sfx - mname - 1);
+ char *meth = eina_strndup(mname + 1, sfx - mname - 1);
fn = eolian_class_function_by_name_get(cl, meth, ftype);
if (ftype == EOLIAN_UNRESOLVED)
ftype = eolian_function_type_get(fn);
@@ -122,7 +121,7 @@ noref:
static int
_append_section(const Eolian_State *state, const char *desc, int ind, int curl,
- Eina_Strbuf *buf, Eina_Strbuf *wbuf, Eina_Bool use_legacy)
+ Eina_Strbuf *buf, Eina_Strbuf *wbuf)
{
Eina_Bool try_note = EINA_TRUE;
while (*desc)
@@ -173,7 +172,7 @@ _append_section(const Eolian_State *state, const char *desc, int ind, int curl,
++desc;
if (*(desc - 1) == '.') --desc;
Eina_Stringshare *refn = eina_stringshare_add_length(ref, desc - ref);
- _generate_ref(state, refn, wbuf, use_legacy);
+ _generate_ref(state, refn, wbuf);
eina_stringshare_del(refn);
}
else
@@ -278,8 +277,7 @@ _append_group(Eina_Strbuf *buf, char *sgrp, int indent)
static void
_gen_doc_brief(const Eolian_State *state, const char *summary, const char *since,
- const char *group, const char *el, int indent, Eina_Strbuf *buf,
- Eina_Bool use_legacy)
+ const char *group, const char *el, int indent, Eina_Strbuf *buf)
{
int curl = 4 + indent;
Eina_Strbuf *wbuf = eina_strbuf_new();
@@ -287,7 +285,7 @@ _gen_doc_brief(const Eolian_State *state, const char *summary, const char *since
eina_strbuf_append(buf, "/**< ");
else
eina_strbuf_append(buf, "/** ");
- curl = _append_section(state, summary, indent, curl, buf, wbuf, use_legacy);
+ curl = _append_section(state, summary, indent, curl, buf, wbuf);
eina_strbuf_free(wbuf);
curl = _append_extra(el, indent, curl, EINA_FALSE, buf);
curl = _append_since(since, indent, curl, buf);
@@ -310,8 +308,7 @@ _gen_doc_brief(const Eolian_State *state, const char *summary, const char *since
static void
_gen_doc_full(const Eolian_State *state, const char *summary,
const char *description, const char *since,
- const char *group, const char *el, int indent, Eina_Strbuf *buf,
- Eina_Bool use_legacy)
+ const char *group, const char *el, int indent, Eina_Strbuf *buf)
{
int curl = 0;
Eina_Strbuf *wbuf = eina_strbuf_new();
@@ -322,13 +319,13 @@ _gen_doc_full(const Eolian_State *state, const char *summary,
curl += _indent_line(buf, indent);
eina_strbuf_append(buf, " * @brief ");
curl += sizeof(" * @brief ") - 1;
- _append_section(state, summary, indent, curl, buf, wbuf, use_legacy);
+ _append_section(state, summary, indent, curl, buf, wbuf);
eina_strbuf_append_char(buf, '\n');
_indent_line(buf, indent);
eina_strbuf_append(buf, " *\n");
curl = _indent_line(buf, indent);
eina_strbuf_append(buf, " * ");
- _append_section(state, description, indent, curl + 3, buf, wbuf, use_legacy);
+ _append_section(state, description, indent, curl + 3, buf, wbuf);
curl = _append_extra(el, indent, curl, EINA_TRUE, buf);
curl = _append_since(since, indent, curl, buf);
eina_strbuf_append_char(buf, '\n');
@@ -346,8 +343,7 @@ _gen_doc_full(const Eolian_State *state, const char *summary,
static Eina_Strbuf *
_gen_doc_buf(const Eolian_State *state, const Eolian_Documentation *doc,
- const char *group, const char *el, int indent,
- Eina_Bool use_legacy)
+ const char *group, const char *el, int indent)
{
if (!doc) return NULL;
@@ -357,17 +353,17 @@ _gen_doc_buf(const Eolian_State *state, const Eolian_Documentation *doc,
Eina_Strbuf *buf = eina_strbuf_new();
if (!desc)
- _gen_doc_brief(state, sum, since, group, el, indent, buf, use_legacy);
+ _gen_doc_brief(state, sum, since, group, el, indent, buf);
else
- _gen_doc_full(state, sum, desc, since, group, el, indent, buf, use_legacy);
+ _gen_doc_full(state, sum, desc, since, group, el, indent, buf);
return buf;
}
Eina_Strbuf *
eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Documentation *doc,
- const char *group, int indent, Eina_Bool use_legacy)
+ const char *group, int indent)
{
- return _gen_doc_buf(state, doc, group, NULL, indent, use_legacy);
+ return _gen_doc_buf(state, doc, group, NULL, indent);
}
Eina_Strbuf *
@@ -403,7 +399,7 @@ eo_gen_docs_event_gen(const Eolian_State *state, const Eolian_Event *ev,
return bufs;
}
- return _gen_doc_buf(state, doc, group, p, 0, EINA_FALSE);
+ return _gen_doc_buf(state, doc, group, p, 0);
}
Eina_Strbuf *
@@ -517,7 +513,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
if (!desc && !par && !vpar && !rdoc && (ftype == EOLIAN_METHOD || !pdoc))
{
_gen_doc_brief(state, sum ? sum : "No description supplied.", since, group,
- NULL, indent, buf, EINA_FALSE);
+ NULL, indent, buf);
return buf;
}
@@ -528,7 +524,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
eina_strbuf_append(buf, " * @brief ");
curl += sizeof(" * @brief ") - 1;
_append_section(state, sum ? sum : "No description supplied.",
- indent, curl, buf, wbuf, EINA_FALSE);
+ indent, curl, buf, wbuf);
eina_strbuf_append_char(buf, '\n');
if (desc || since || par || rdoc || pdoc)
@@ -541,7 +537,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
{
curl = _indent_line(buf, indent);
eina_strbuf_append(buf, " * ");
- _append_section(state, desc, indent, curl + 3, buf, wbuf, EINA_FALSE);
+ _append_section(state, desc, indent, curl + 3, buf, wbuf);
eina_strbuf_append_char(buf, '\n');
if (par || rdoc || pdoc || since)
{
@@ -556,7 +552,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
curl = _indent_line(buf, indent);
eina_strbuf_append(buf, " * ");
_append_section(state, eolian_documentation_summary_get(pdoc), indent,
- curl + 3, buf, wbuf, EINA_FALSE);
+ curl + 3, buf, wbuf);
eina_strbuf_append_char(buf, '\n');
if (pdesc)
{
@@ -564,7 +560,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
eina_strbuf_append(buf, " *\n");
curl = _indent_line(buf, indent);
eina_strbuf_append(buf, " * ");
- _append_section(state, pdesc, indent, curl + 3, buf, wbuf, EINA_FALSE);
+ _append_section(state, pdesc, indent, curl + 3, buf, wbuf);
eina_strbuf_append_char(buf, '\n');
}
if (par || rdoc || since)
@@ -619,7 +615,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
eina_strbuf_append_char(buf, ' ');
curl += 1;
_append_section(state, eolian_documentation_summary_get(adoc),
- indent, curl, buf, wbuf, EINA_FALSE);
+ indent, curl, buf, wbuf);
}
eina_strbuf_append_char(buf, '\n');
@@ -652,7 +648,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
eina_strbuf_append(buf, " * @return ");
curl += sizeof(" * @return ") - 1;
_append_section(state, eolian_documentation_summary_get(rdoc), indent,
- curl, buf, wbuf, EINA_FALSE);
+ curl, buf, wbuf);
eina_strbuf_append_char(buf, '\n');
if (since)
{
diff --git a/src/bin/eolian/docs.h b/src/bin/eolian/docs.h
index 91866ec012..3438f5d293 100644
--- a/src/bin/eolian/docs.h
+++ b/src/bin/eolian/docs.h
@@ -9,12 +9,11 @@
* @param[in] doc the documentation
* @param[in] group the group to use (can be NULL)
* @param[in] indent by how many spaces to indent the comment from second line
- * @param[in] use_legacy whether to use legacy names
*
* @return A documentation comment
*
*/
-Eina_Strbuf *eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Documentation *doc, const char *group, int indent, Eina_Bool use_legacy);
+Eina_Strbuf *eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Documentation *doc, const char *group, int indent);
/*
* @brief Generate function documentation
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index cc3b0ee293..d35c604577 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -176,9 +176,9 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
void
eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
- Eina_Strbuf *buf, Eina_Bool legacy)
+ Eina_Strbuf *buf)
{
- if (!cl || legacy)
+ if (!cl)
return;
Eina_Iterator *itr;
@@ -196,7 +196,7 @@ eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
if (doc)
{
Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc,
- eolian_class_name_get(cl), 0, EINA_FALSE);
+ eolian_class_name_get(cl), 0);
if (cdoc)
{
eina_strbuf_append(buf, eina_strbuf_string_get(cdoc));
diff --git a/src/bin/eolian/headers.h b/src/bin/eolian/headers.h
index 94fd89b908..9e45fb917e 100644
--- a/src/bin/eolian/headers.h
+++ b/src/bin/eolian/headers.h
@@ -4,6 +4,6 @@
#include "main.h"
void eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Strbuf **flagbuf, int *nidx, Eolian_Function_Type ftype);
-void eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Bool legacy);
+void eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl, Eina_Strbuf *buf);
#endif
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index 06f32fd418..0545430eb5 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -11,17 +11,16 @@ int _eolian_gen_log_dom = -1;
enum
{
GEN_H = 1 << 0,
- GEN_H_LEGACY = 1 << 1,
- GEN_H_STUB = 1 << 2,
- GEN_C = 1 << 3,
- GEN_C_IMPL = 1 << 4,
- GEN_D = 1 << 5,
- GEN_D_FULL = 1 << 6
+ GEN_H_STUB = 1 << 1,
+ GEN_C = 1 << 2,
+ GEN_C_IMPL = 1 << 3,
+ GEN_D = 1 << 4,
+ GEN_D_FULL = 1 << 5
};
-static const char *_dexts[7] =
+static const char *_dexts[6] =
{
- ".h", ".legacy.h", ".stub.h", ".c", ".c", ".d", ".d"
+ ".h", ".stub.h", ".c", ".c", ".d", ".d"
};
static int
@@ -48,7 +47,6 @@ _print_usage(const char *progn, FILE *outf)
"\n"
"Available types:\n"
" h: C header file (.eo.h/.eot.h)\n"
- " l: Legacy C header file (.eo.legacy.h/.eot.legacy.h)\n"
" s: Stub C header file (.eo.stub.h/.eot.stub.h)\n"
" c: C source file (.eo.c)\n"
" i: Implementation file (.c, merged with existing)\n"
@@ -86,10 +84,6 @@ _try_set_out(char t, char **outs, const char *val, int *what)
pos = _get_bit_pos(GEN_H);
*what |= GEN_H;
break;
- case 'l':
- pos = _get_bit_pos(GEN_H_LEGACY);
- *what |= GEN_H_LEGACY;
- break;
case 's':
pos = _get_bit_pos(GEN_H_STUB);
*what |= GEN_H_STUB;
@@ -331,13 +325,13 @@ void eo_gen_class_names_get(const Eolian_Class *cl, char **cname,
static Eina_Bool
_write_header(const Eolian_State *eos, const Eolian_State *state, const char *ofname,
- const char *ifname, Eina_Bool legacy)
+ const char *ifname)
{
- INF("generating header: %s (legacy: %d)", ofname, legacy);
+ INF("generating header: %s", ofname);
Eina_Strbuf *buf = eina_strbuf_new();
eo_gen_types_header_gen(state, eolian_state_objects_by_file_get(eos, ifname),
- buf, EINA_TRUE, legacy);
+ buf, EINA_TRUE);
buf = _include_guard(ifname, "TYPES", buf);
Eina_Strbuf *cltd = eo_gen_class_typedef_gen(eos, ifname);
@@ -349,16 +343,13 @@ _write_header(const Eolian_State *eos, const Eolian_State *state, const char *of
eina_strbuf_free(cltd);
}
- const Eolian_Class *cl = eolian_state_class_by_file_get(eos, ifname);
- eo_gen_header_gen(state, cl, buf, legacy);
- if (cl || !legacy)
+ eo_gen_header_gen(state, eolian_state_class_by_file_get(eos, ifname), buf);
+
+ buf = _include_guard(_get_filename(ofname), NULL, buf);
+ if (_write_file(ofname, buf))
{
- buf = _include_guard(_get_filename(ofname), NULL, buf);
- if (_write_file(ofname, buf))
- {
- eina_strbuf_free(buf);
- return EINA_TRUE;
- }
+ eina_strbuf_free(buf);
+ return EINA_TRUE;
}
eina_strbuf_free(buf);
@@ -373,7 +364,7 @@ _write_stub_header(const Eolian_State *eos, const Eolian_State *state, const cha
Eina_Strbuf *buf = eina_strbuf_new();
eo_gen_types_header_gen(state, eolian_state_objects_by_file_get(eos, ifname),
- buf, EINA_FALSE, EINA_FALSE);
+ buf, EINA_FALSE);
Eina_Strbuf *cltd = eo_gen_class_typedef_gen(eos, ifname);
if (cltd)
@@ -476,7 +467,6 @@ _write_deps(const Eolian_State *eos, const char *ofname, const char *ifname,
eina_strbuf_append_char(dbuf, '\n');
_append_dep_line(buf, dbuf, outs, gen_what, GEN_H);
- _append_dep_line(buf, dbuf, outs, gen_what, GEN_H_LEGACY);
_append_dep_line(buf, dbuf, outs, gen_what, GEN_H_STUB);
if (gen_what & GEN_D_FULL)
@@ -498,7 +488,7 @@ main(int argc, char **argv)
int pret = 1;
char *outs[sizeof(_dexts) / sizeof(void *)] = {
- NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ NULL, NULL, NULL, NULL, NULL, NULL
};
char *basen = NULL;
Eina_List *includes = NULL;
@@ -540,9 +530,6 @@ main(int argc, char **argv)
case 'h':
gen_what |= GEN_H;
break;
- case 'l':
- gen_what |= GEN_H_LEGACY;
- break;
case 's':
gen_what |= GEN_H_STUB;
break;
@@ -631,7 +618,7 @@ main(int argc, char **argv)
}
}
- if (!eolian_state_file_parse(eos, input))
+ if (!eolian_state_file_path_parse(eos, input))
{
fprintf(stderr, "eolian: could not parse file '%s'\n", input);
goto end;
@@ -646,9 +633,7 @@ main(int argc, char **argv)
Eina_Bool succ = EINA_TRUE;
if (gen_what & GEN_H)
- succ = _write_header(eos, eos, outs[_get_bit_pos(GEN_H)], eobn, EINA_FALSE);
- if (succ && (gen_what & GEN_H_LEGACY))
- succ = _write_header(eos, eos, outs[_get_bit_pos(GEN_H_LEGACY)], eobn, EINA_TRUE);
+ succ = _write_header(eos, eos, outs[_get_bit_pos(GEN_H)], eobn);
if (succ && (gen_what & GEN_H_STUB))
succ = _write_stub_header(eos, eos, outs[_get_bit_pos(GEN_H_STUB)], eobn);
if (succ && (gen_what & GEN_C))
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index c2a2ea654f..85e443e6d8 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -4,13 +4,13 @@
static Eina_Strbuf *
_type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
- Eina_Bool full, Eina_Bool legacy)
+ Eina_Bool full)
{
char *grp = strdup(eolian_typedecl_name_get(tp));
char *p = strrchr(grp, '.');
if (p) *p = '\0';
Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_typedecl_documentation_get(tp),
- grp, 0, legacy);
+ grp, 0);
free(grp);
if (!buf) buf = eina_strbuf_new();
else eina_strbuf_append_char(buf, '\n');
@@ -54,7 +54,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
if (nl)
{
Eina_Strbuf *fbuf = eo_gen_docs_full_gen(state, fdoc, NULL,
- strlen(nl), legacy);
+ strlen(nl));
if (fbuf)
eina_strbuf_append_printf(buf, " %s",
eina_strbuf_string_get(fbuf));
@@ -108,7 +108,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
if (nl)
{
Eina_Strbuf *fbuf = eo_gen_docs_full_gen(state, fdoc, NULL,
- strlen(nl), legacy);
+ strlen(nl));
if (fbuf)
eina_strbuf_append_printf(buf, " %s",
eina_strbuf_string_get(fbuf));
@@ -166,13 +166,13 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
}
static Eina_Strbuf *
-_var_generate(const Eolian_State *state, const Eolian_Variable *vr, Eina_Bool legacy)
+_var_generate(const Eolian_State *state, const Eolian_Variable *vr)
{
char *fn = strdup(eolian_variable_name_get(vr));
char *p = strrchr(fn, '.');
if (p) *p = '\0';
Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_variable_documentation_get(vr),
- fn, 0, legacy);
+ fn, 0);
if (p)
{
*p = '_';
@@ -216,7 +216,7 @@ _var_generate(const Eolian_State *state, const Eolian_Variable *vr, Eina_Bool le
void eo_gen_types_header_gen(const Eolian_State *state,
Eina_Iterator *itr, Eina_Strbuf *buf,
- Eina_Bool full, Eina_Bool legacy)
+ Eina_Bool full)
{
const Eolian_Object *decl;
EINA_ITERATOR_FOREACH(itr, decl)
@@ -229,7 +229,7 @@ void eo_gen_types_header_gen(const Eolian_State *state,
if (!vr || eolian_variable_is_extern(vr))
continue;
- Eina_Strbuf *vbuf = _var_generate(state, vr, legacy);
+ Eina_Strbuf *vbuf = _var_generate(state, vr);
if (vbuf)
{
eina_strbuf_append(buf, eina_strbuf_string_get(vbuf));
@@ -259,7 +259,7 @@ void eo_gen_types_header_gen(const Eolian_State *state,
continue;
}
- Eina_Strbuf *tbuf = _type_generate(state, tp, full, legacy);
+ Eina_Strbuf *tbuf = _type_generate(state, tp, full);
if (tbuf)
{
eina_strbuf_append(buf, eina_strbuf_string_get(tbuf));
diff --git a/src/bin/eolian/types.h b/src/bin/eolian/types.h
index 2659b59085..5abd030a27 100644
--- a/src/bin/eolian/types.h
+++ b/src/bin/eolian/types.h
@@ -1,7 +1,7 @@
#ifndef EOLIAN_GEN_TYPES_H
#define EOLIAN_GEN_TYPES_H
-void eo_gen_types_header_gen(const Eolian_State *state, Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Bool full, Eina_Bool legacy);
+void eo_gen_types_header_gen(const Eolian_State *state, Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Bool full);
void eo_gen_types_source_gen(Eina_Iterator *itr, Eina_Strbuf *buf);
Eina_Strbuf *eo_gen_class_typedef_gen(const Eolian_State *eos, const char *eof);
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index d5e42de830..3774c497a6 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -315,7 +315,7 @@ run(options_type const& opts)
for(auto&& name : opts.in_files)
{
- Eolian_Unit const* unit = ::eolian_state_file_parse(opts.state, name.c_str());
+ Eolian_Unit const* unit = ::eolian_state_file_path_parse(opts.state, name.c_str());
if(!unit)
{
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
@@ -398,7 +398,7 @@ database_load(options_type const& opts)
<< "No input file.";
assert(false && "Error parsing input file");
}
- if (!opts.main_header && !::eolian_state_file_parse(opts.state, opts.in_files[0].c_str()))
+ if (!opts.main_header && !::eolian_state_file_path_parse(opts.state, opts.in_files[0].c_str()))
{
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
<< "Failed parsing: " << opts.in_files[0] << ".";
diff --git a/src/bin/eolian_mono/eolian/mono/alias_definition.hh b/src/bin/eolian_mono/eolian/mono/alias_definition.hh
index cf9d3495ce..a6cfadbca5 100644
--- a/src/bin/eolian_mono/eolian/mono/alias_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/alias_definition.hh
@@ -33,20 +33,34 @@ struct alias_definition_generator
if (!name_helpers::open_namespaces(sink, alias.namespaces, context))
return false;
+ std::string alias_type;
+ if (!as_generator(eolian_mono::type).generate(std::back_inserter(alias_type), alias.base_type, context))
+ return false;
+
std::string const alias_name = utils::remove_all(alias.eolian_name, '_');
if (!as_generator(
- "public struct " << alias_name << " {\n"
- << scope_tab << "private " << type << " payload;\n"
- << scope_tab << "public static implicit operator " << alias_name << "(" << type << " x)\n"
+ documentation
+ << "public struct " << alias_name << "\n"
+ << "{\n"
+ << scope_tab << "private " << alias_type << " payload;\n\n"
+
+ << scope_tab << "/// <summary>Converts an instance of " << alias_type << " to this struct.</summary>\n"
+ << scope_tab << "/// <param name=\"value\">The value to be converted.</param>\n"
+ << scope_tab << "/// <returns>A struct with the given value.</returns>\n"
+ << scope_tab << "public static implicit operator " << alias_name << "(" << alias_type << " value)\n"
<< scope_tab << "{\n"
- << scope_tab << scope_tab << "return new " << alias_name << "{payload=x};\n"
- << scope_tab << "}\n"
- << scope_tab << "public static implicit operator " << type << "(" << alias_name << " x)\n"
+ << scope_tab << scope_tab << "return new " << alias_name << "{payload=value};\n"
+ << scope_tab << "}\n\n"
+
+ << scope_tab << "/// <summary>Converts an instance of this struct to " << alias_type << ".</summary>\n"
+ << scope_tab << "/// <param name=\"value\">The value to be converted packed in this struct.</param>\n"
+ << scope_tab << "/// <returns>The actual value the alias is wrapping.</returns>\n"
+ << scope_tab << "public static implicit operator " << alias_type << "(" << alias_name << " value)\n"
<< scope_tab << "{\n"
- << scope_tab << scope_tab << "return x.payload;\n"
- << scope_tab << "}\n"
- << "}\n"
- ).generate(sink, std::make_tuple(alias.base_type, alias.base_type, alias.base_type), context))
+ << scope_tab << scope_tab << "return value.payload;\n"
+ << scope_tab << "}\n\n"
+ << "}\n\n"
+ ).generate(sink, alias, context))
return false;
if (!name_helpers::close_namespaces(sink, alias.namespaces, context))
diff --git a/src/bin/eolian_mono/eolian/mono/async_function_definition.hh b/src/bin/eolian_mono/eolian/mono/async_function_definition.hh
index 5164311ee7..b3ab6d4102 100644
--- a/src/bin/eolian_mono/eolian/mono/async_function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/async_function_definition.hh
@@ -54,8 +54,20 @@ struct async_function_declaration_generator
return true;
if (!as_generator(
- scope_tab << "System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") <<
- " System.Threading.CancellationToken token=default(System.Threading.CancellationToken));\n"
+ scope_tab << "/// <summary>Async wrapper for <see cref=\"" << name_helpers::managed_method_name(f) << "\" />.</summary>\n"
+ ).generate(sink, attributes::unused, context))
+ return false;
+
+ // generate_parameter is not a proper as_generator-compatible generator, so we had to do an old fashioned loop
+ for (auto&& param : f.parameters)
+ if (!documentation(1).generate_parameter(sink, param, context))
+ return false;
+
+ if (!as_generator(
+ scope_tab << "/// <param name=\"token\">Token to notify the async operation of external request to cancel.</param>\n"
+ << scope_tab << "/// <returns>An async task wrapping the result of the operation.</returns>\n"
+ << scope_tab << "System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") <<
+ " System.Threading.CancellationToken token = default(System.Threading.CancellationToken));\n\n"
).generate(sink, f.parameters, context))
return false;
@@ -88,12 +100,24 @@ struct async_function_definition_generator
std::transform(f.parameters.begin(), f.parameters.end(), std::back_inserter(param_forwarding), parameter_forwarding);
+ if (!as_generator(
+ scope_tab << "/// <summary>Async wrapper for <see cref=\"" << name_helpers::managed_method_name(f) << "\" />.</summary>\n"
+ ).generate(sink, attributes::unused, context))
+ return false;
+
+ // generate_parameter is not a proper as_generator-compatible generator, so we had to do an old fashioned loop
+ for (auto&& param : f.parameters)
+ if (!documentation(1).generate_parameter(sink, param, context))
+ return false;
+
if(!as_generator(
- scope_tab << "public System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << " System.Threading.CancellationToken token=default(System.Threading.CancellationToken))\n"
+ scope_tab << "/// <param name=\"token\">Token to notify the async operation of external request to cancel.</param>\n"
+ << scope_tab << "/// <returns>An async task wrapping the result of the operation.</returns>\n"
+ << scope_tab << "public System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << " System.Threading.CancellationToken token = default(System.Threading.CancellationToken))\n"
<< scope_tab << "{\n"
<< scope_tab << scope_tab << "Eina.Future future = " << name_helpers::managed_method_name(f) << "(" << (string % ",") << ");\n"
<< scope_tab << scope_tab << "return Efl.Eo.Globals.WrapAsync(future, token);\n"
- << scope_tab << "}\n"
+ << scope_tab << "}\n\n"
).generate(sink, std::make_tuple(f.parameters, param_forwarding), context))
return false;
return true;
diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh
index 9646fd314f..ac072a4220 100644
--- a/src/bin/eolian_mono/eolian/mono/documentation.hh
+++ b/src/bin/eolian_mono/eolian/mono/documentation.hh
@@ -74,8 +74,7 @@ struct documentation_generator
if (blacklist::is_function_blacklisted(
::eolian_function_full_c_name_get(function, ftype))) return "";
name += ".";
- name += name_helpers::managed_method_name(
- ::eolian_object_short_name_get(klass), eo_name);
+ name += name_helpers::managed_method_name({function, ftype, NULL, eolian_object_unit_get(EOLIAN_OBJECT(function))});
break;
case ::EOLIAN_PROP_SET:
name += ".Set";
@@ -118,7 +117,7 @@ struct documentation_generator
case attributes::function_type::prop_get:
if (blacklist::is_function_blacklisted(func.c_name))return "";
if (!name.empty()) name += ".";
- name += name_helpers::managed_method_name(func.klass.eolian_name, func.name);
+ name += name_helpers::managed_method_name(func);
break;
default:
// No need to deal with property as function_defs are converted to get/set when building a given klass_def.
@@ -285,6 +284,9 @@ struct documentation_generator
template<typename OutputIterator, typename Context>
bool generate_tag(OutputIterator sink, std::string const& tag, std::string const &text, Context const& context, std::string tag_params = "") const
{
+ if (text == "")
+ return true;
+
if (!as_generator(scope_tab(scope_size) << "/// ").generate(sink, attributes::unused, context)) return false;
if (!generate_opening_tag(sink, tag, context, tag_params)) return false;
if (!generate_escaped_content(sink, text, context)) return false;
@@ -429,7 +431,7 @@ struct documentation_generator
return generate_all_tag_examples(sink,
name_helpers::klass_full_concrete_or_interface_name(func.klass),
- name_helpers::managed_method_name(func.klass.eolian_name, func.name),
+ name_helpers::managed_method_name(func),
context);
}
@@ -448,7 +450,7 @@ struct documentation_generator
return generate_all_tag_examples(sink,
name_helpers::klass_full_concrete_or_interface_name(func.klass),
- name_helpers::managed_method_name(func.klass.eolian_name, func.name),
+ name_helpers::managed_method_name(func),
context);
}
@@ -485,7 +487,7 @@ struct documentation_generator
for (auto &&param : ctor.function.parameters)
{
if (!as_generator(
- scope_tab << "///<param name=\"" << constructor_parameter_name(ctor) << "\">" << summary << " See <see cref=\"" << function_conversion(func) << "\"/></param>\n"
+ scope_tab << "/// <param name=\"" << constructor_parameter_name(ctor) << "\">" << summary << " See <see cref=\"" << function_conversion(func) << "\"/></param>\n"
).generate(sink, param, context))
return false;
}
diff --git a/src/bin/eolian_mono/eolian/mono/enum_definition.hh b/src/bin/eolian_mono/eolian/mono/enum_definition.hh
index 78af78af2c..922463936e 100644
--- a/src/bin/eolian_mono/eolian/mono/enum_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/enum_definition.hh
@@ -44,7 +44,7 @@ struct enum_definition_generator
return false;
}
- if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false;
+ if(!as_generator("}\n\n").generate(sink, attributes::unused, context)) return false;
if(!name_helpers::close_namespaces(sink, enum_.namespaces, context))
return false;
diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh
index 23025480c0..d1ca5f573f 100644
--- a/src/bin/eolian_mono/eolian/mono/function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh
@@ -34,12 +34,14 @@ struct native_function_definition_generator
EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "native_function_definition_generator: " << f.c_name << std::endl;
if(blacklist::is_function_blacklisted(f, context))
return true;
- else
- {
+
+ auto const& indent = current_indentation(context);
+
+ // Delegate for the C# method we will export to EO as a method implementation.
if(!as_generator
- ("\n\n" << scope_tab
- << eolian_mono::marshall_annotation(true)
- << " private delegate "
+ (
+ indent << eolian_mono::marshall_annotation(true) << "\n"
+ << indent << "private delegate "
<< eolian_mono::marshall_type(true)
<< " "
<< string
@@ -49,14 +51,15 @@ struct native_function_definition_generator
(
(marshall_annotation << " " << marshall_parameter)
) % ", ")
- << ");\n")
+ << ");\n\n")
.generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context))
return false;
+ // API delegate is the wrapper for the Eo methods exported from C that we will use from C#.
if(!as_generator
- ("\n\n" << scope_tab
- << eolian_mono::marshall_annotation(true)
- << " public delegate "
+ (
+ indent << eolian_mono::marshall_annotation(true) << "\n"
+ << indent << "public delegate "
<< eolian_mono::marshall_type(true)
<< " "
<< string << "_api_delegate(" << (f.is_static ? "" : "System.IntPtr obj")
@@ -65,17 +68,18 @@ struct native_function_definition_generator
(
(marshall_annotation << " " << marshall_parameter)
) % ", ")
- << ");\n")
+ << ");\n\n")
.generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context))
return false;
+ // Delegate holder (so it can't be collected).
if(!as_generator
- (scope_tab
- << " public static Efl.Eo.FunctionWrapper<" << string << "_api_delegate> " << string << "_ptr = new Efl.Eo.FunctionWrapper<"
- << string << "_api_delegate>(_Module, \"" << string << "\");\n")
+ (indent << "public static Efl.Eo.FunctionWrapper<" << string << "_api_delegate> " << string << "_ptr = new Efl.Eo.FunctionWrapper<"
+ << string << "_api_delegate>(Module, \"" << string << "\");\n\n")
.generate(sink, std::make_tuple(f.c_name, f.c_name, f.c_name, f.c_name), context))
return false;
+ // Actual method implementation to be called from C.
std::string return_type;
if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type), f.return_type, context))
return false;
@@ -92,34 +96,37 @@ struct native_function_definition_generator
self = "";
if(!as_generator
- (scope_tab
- << " private static "
+ (indent << "private static "
<< eolian_mono::marshall_type(true) << " "
<< string
<< "(System.IntPtr obj, System.IntPtr pd"
<< *(", " << marshall_parameter)
<< ")\n"
- << scope_tab << "{\n"
- /****/
- << scope_tab << scope_tab << "Eina.Log.Debug(\"function " << string << " was called\");\n"
- /****/
- << scope_tab << scope_tab << "Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);\n"
- << scope_tab << scope_tab << "if(wrapper != null) {\n"
- << scope_tab << scope_tab << scope_tab << eolian_mono::native_function_definition_preamble()
- << scope_tab << scope_tab << scope_tab << "try {\n"
- << scope_tab << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "_ret_var = " : "")
+ << indent << "{\n"
+ << indent << scope_tab << "Eina.Log.Debug(\"function " << string << " was called\");\n"
+ << indent << scope_tab << "Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);\n"
+ << indent << scope_tab << "if (wrapper != null)\n"
+ << indent << scope_tab << "{\n"
+ << eolian_mono::native_function_definition_preamble()
+ << indent << scope_tab << scope_tab << "try\n"
+ << indent << scope_tab << scope_tab << "{\n"
+ << indent << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "_ret_var = " : "")
<< (f.is_static ? "" : "((") << klass_cast_name << (f.is_static ? "." : ")wrapper).") << string
<< "(" << (native_argument_invocation % ", ") << ");\n"
- << scope_tab << scope_tab << scope_tab << "} catch (Exception e) {\n"
- << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n"
- << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);\n"
- << scope_tab << scope_tab << scope_tab << "}\n"
- << eolian_mono::native_function_definition_epilogue(*klass)
- << scope_tab << scope_tab << "} else {\n"
- << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "return " : "") << string
+ << indent << scope_tab << scope_tab << "}\n"
+ << indent << scope_tab << scope_tab << "catch (Exception e)\n"
+ << indent << scope_tab << scope_tab << "{\n"
+ << indent << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n"
+ << indent << scope_tab << scope_tab << scope_tab << "Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);\n"
+ << indent << scope_tab << scope_tab << "}\n\n"
+ << eolian_mono::native_function_definition_epilogue(*klass) << "\n"
+ << indent << scope_tab << "}\n"
+ << indent << scope_tab << "else\n"
+ << indent << scope_tab << "{\n"
+ << indent << scope_tab << scope_tab << (return_type != "void" ? "return " : "") << string
<< "_ptr.Value.Delegate(" << self << ((!f.is_static && f.parameters.size() > 0) ? ", " : "") << (argument % ", ") << ");\n"
- << scope_tab << scope_tab << "}\n"
- << scope_tab << "}\n"
+ << indent << scope_tab << "}\n"
+ << indent << "}\n\n"
)
.generate(sink, std::make_tuple(f.return_type, escape_keyword(f.name), f.parameters
, /***/f.c_name/***/
@@ -139,11 +146,11 @@ struct native_function_definition_generator
// This is the delegate that will be passed to Eo to be called from C.
if(!as_generator(
- scope_tab << "private static " << f.c_name << "_delegate " << f.c_name << "_static_delegate;\n"
+ indent << "private static " << f.c_name << "_delegate " << f.c_name << "_static_delegate;\n\n"
).generate(sink, attributes::unused, context))
return false;
+
return true;
- }
}
};
@@ -261,7 +268,7 @@ struct property_wrapper_definition_generator
std::string managed_name = name_helpers::property_managed_name(property);
if (!as_generator(
- scope_tab << documentation
+ documentation(1)
<< scope_tab << (interface ? "" : "public ") << (is_static ? "static " : "") << type(true) << " " << managed_name << " {\n"
).generate(sink, std::make_tuple(property, prop_type), context))
return false;
diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh
index fc044e6b72..b490808b9a 100644
--- a/src/bin/eolian_mono/eolian/mono/function_registration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh
@@ -30,35 +30,34 @@ struct function_registration_generator
bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
{
EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "function_registration_generator: " << f.name << std::endl;
+ auto const& indent = current_indentation(context);
+
if(blacklist::is_function_blacklisted(f, context) || f.is_static) // Static methods aren't overrideable
return true;
- else
- {
- // auto index = index_generator();
if(!as_generator(
- scope_tab << scope_tab << "if (" << f.c_name << "_static_delegate == null)\n"
- << scope_tab << scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" <<
- escape_keyword(f.name) << ");\n"
+ indent << "if (" << f.c_name << "_static_delegate == null)\n"
+ << indent << "{\n"
+ << indent << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" << escape_keyword(f.name) << ");\n"
+ << indent << "}\n\n"
).generate(sink, attributes::unused, context))
return false;
- if(!as_generator
- (scope_tab << scope_tab
- << "if (methods.FirstOrDefault(m => m.Name == \"" << string << "\") != null)\n"
- << scope_tab << scope_tab << scope_tab
- << "descs.Add(new Efl_Op_Description() {"
+ if(!as_generator(
+ indent << "if (methods.FirstOrDefault(m => m.Name == \"" << string << "\") != null)\n"
+ << indent << "{\n"
+ << indent << scope_tab << "descs.Add(new Efl_Op_Description() {"
#ifdef _WIN32
<< "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")"
#else
- << "api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, \"" << string << "\")"
+ << "api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, \"" << string << "\")"
#endif
- << ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate)});\n"
+ << ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate) });\n"
+ << indent << "}\n\n"
)
.generate(sink, std::make_tuple(name_helpers::managed_method_name(f), f.c_name, f.c_name), context))
return false;
return true;
- }
}
};
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index fd4c629ffd..9d3711fb61 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -35,24 +35,30 @@ template <typename OutputIterator, typename Context>
static bool generate_equals_method(OutputIterator sink, Context const &context)
{
return as_generator(
- scope_tab << "///<summary>Verifies if the given object is equal to this one.</summary>\n"
- << scope_tab << "public override bool Equals(object obj)\n"
+ scope_tab << "/// <summary>Verifies if the given object is equal to this one.</summary>\n"
+ << scope_tab << "/// <param name=\"instance\">The object to compare to.</param>\n"
+ << scope_tab << "/// <returns>True if both objects point to the same native object.</returns>\n"
+ << scope_tab << "public override bool Equals(object instance)\n"
<< scope_tab << "{\n"
- << scope_tab << scope_tab << "var other = obj as Efl.Object;\n"
+ << scope_tab << scope_tab << "var other = instance as Efl.Object;\n"
<< scope_tab << scope_tab << "if (other == null)\n"
+ << scope_tab << scope_tab << "{\n"
<< scope_tab << scope_tab << scope_tab << "return false;\n"
+ << scope_tab << scope_tab << "}\n"
<< scope_tab << scope_tab << "return this.NativeHandle == other.NativeHandle;\n"
- << scope_tab << "}\n"
- << scope_tab << "///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>\n"
+ << scope_tab << "}\n\n"
+ << scope_tab << "/// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>\n"
+ << scope_tab << "/// <returns>The value of the pointer, to be used as the hash code of this object.</returns>\n"
<< scope_tab << "public override int GetHashCode()\n"
<< scope_tab << "{\n"
<< scope_tab << scope_tab << "return this.NativeHandle.ToInt32();\n"
- << scope_tab << "}\n"
- << scope_tab << "///<summary>Turns the native pointer into a string representation.</summary>\n"
+ << scope_tab << "}\n\n"
+ << scope_tab << "/// <summary>Turns the native pointer into a string representation.</summary>\n"
+ << scope_tab << "/// <returns>A string with the type and the native pointer for this object.</returns>\n"
<< scope_tab << "public override String ToString()\n"
<< scope_tab << "{\n"
<< scope_tab << scope_tab << "return $\"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]\";\n"
- << scope_tab << "}\n"
+ << scope_tab << "}\n\n"
).generate(sink, nullptr, context);
}
@@ -82,6 +88,8 @@ struct klass
{
EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "klass_generator: " << cls.eolian_name << std::endl;
+ auto const& indent = current_indentation(context);
+
if (blacklist::is_class_blacklisted(cls, context))
{
EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "class " << cls.eolian_name << " is blacklisted. Skipping." << std::endl;
@@ -125,7 +133,7 @@ struct klass
return false;
// Mark the interface with the proper native Efl_Class* getter
- if(!as_generator(lit("[") << name_helpers::klass_native_inherit_name(cls) << "]\n")
+ if(!as_generator(lit("[") << name_helpers::klass_full_native_inherit_name(cls) << "]\n")
.generate(sink, attributes::unused, iface_cxt))
return false;
@@ -203,10 +211,12 @@ struct klass
auto concrete_name = name_helpers::klass_concrete_name(cls);
auto interface_name = name_helpers::klass_interface_name(cls);
+ // We can't make these internal yet as they have methods that are used by
+ // other classes that implement the interface.
if(!as_generator
(
documentation
- << "sealed internal class " << concrete_name << " : " << "\n"
+ << "sealed public class " << concrete_name << " : " << "\n"
<< (klass_full_concrete_or_interface_name % ",") << "\n"
<< (inherit_classes.size() > 0 ? ", " : "" ) << interface_name << "\n"
<< scope_tab << *(", " << name_helpers::klass_full_concrete_or_interface_name) << "\n"
@@ -223,7 +233,8 @@ struct klass
scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag<library_context>(concrete_cxt).actual_library_name(cls.filename)
<< ")] internal static extern System.IntPtr\n"
<< scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n"
- << scope_tab << "///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n"
+ << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n"
+ << scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n"
<< scope_tab << "private " << concrete_name << "(System.IntPtr raw)" << (root ? "" : " : base(raw)") << "\n"
<< scope_tab << "{\n"
<< scope_tab << scope_tab << (root ? "handle = raw;\n" : "")
@@ -274,6 +285,8 @@ struct klass
).generate(sink, attributes::unused, concrete_cxt))
return false;
+ if(!generate_native_inherit_class(sink, cls, change_indentation(indent.inc(), context)))
+ return true;
if(!as_generator("}\n").generate(sink, attributes::unused, concrete_cxt)) return false;
}
@@ -289,7 +302,7 @@ struct klass
if(!as_generator
(
documentation
- << "[" << name_helpers::klass_native_inherit_name(cls) << "]\n"
+ << "[" << name_helpers::klass_full_native_inherit_name(cls) << "]\n"
<< "public " << class_type << " " << name_helpers::klass_concrete_name(cls) << " : "
<< (klass_full_concrete_or_interface_name % ",") // classes
<< (inherit_classes.empty() ? "" : ",")
@@ -351,11 +364,24 @@ struct klass
).generate(sink, attributes::unused, inherit_cxt))
return false;
+ if(!generate_native_inherit_class(sink, cls, change_indentation(indent.inc(), context)))
+ return true;
+
if(!as_generator("}\n").generate(sink, attributes::unused, inherit_cxt)) return false;
}
- // Native Inherit class
- //if(class_type == "class")
+
+ if(!name_helpers::close_namespaces(sink, cls.namespaces, context))
+ return false;
+
+ return true;
+ }
+
+ // NativeInherit class. Contains function pointers for the native Eo methods and delegates that are registered in Eo as virtual method implementations
+ // These delegates are called from C to C#, checking whether the C# subclass reimplemented it.
+ template <typename OutputIterator, typename Context>
+ bool generate_native_inherit_class(OutputIterator sink, attributes::klass_def const& cls, Context const& context) const
+ {
{
auto inative_cxt = context_add_tag(class_context{class_context::inherit_native,
name_helpers::klass_full_concrete_or_interface_name(cls)},
@@ -363,6 +389,9 @@ struct klass
auto native_inherit_name = name_helpers::klass_native_inherit_name(cls);
auto inherit_name = name_helpers::klass_inherit_name(cls);
auto implementable_methods = helpers::get_all_implementable_methods(cls);
+ bool root = !helpers::has_regular_ancestor(cls);
+ auto const& indent = current_indentation(inative_cxt);
+
std::string base_name;
if(!root)
{
@@ -372,12 +401,28 @@ struct klass
if(!as_generator
(
- "public class " << native_inherit_name << " " << (root ? " : Efl.Eo.NativeClass" : (": " + base_name)) <<"{\n"
- << scope_tab << "public " << (root ? "" : "new ") << " static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule("
- << context_find_tag<library_context>(context).actual_library_name(cls.filename) << ");\n"
- << scope_tab << "public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)\n"
- << scope_tab << "{\n"
- << scope_tab << scope_tab << "var descs = new System.Collections.Generic.List<Efl_Op_Description>();\n"
+ indent << lit("/// <summary>Wrapper for native methods and virtual method delegates.\n")
+ << indent << "/// For internal use by generated code only.</summary>\n"
+ << indent << "public " << (root ? "" : "new " ) << "class " << native_inherit_name << " " << (root ? " : Efl.Eo.NativeClass" : (": " + base_name)) <<"\n"
+ << indent << "{\n"
+ ).generate(sink, attributes::unused, inative_cxt))
+ return false;
+
+ if(implementable_methods.size() >= 1)
+ {
+ if(!as_generator(
+ indent << scope_tab << "private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule("
+ << indent << context_find_tag<library_context>(context).actual_library_name(cls.filename) << ");\n"
+ ).generate(sink, attributes::unused, inative_cxt))
+ return false;
+ }
+
+ if(!as_generator(
+ indent << scope_tab << "/// <summary>Gets the list of Eo operations to override.</summary>\n"
+ << indent << scope_tab << "/// <returns>The list of Eo operations to be overload.</returns>\n"
+ << indent << scope_tab << "public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)\n"
+ << indent << scope_tab << "{\n"
+ << indent << scope_tab << scope_tab << "var descs = new System.Collections.Generic.List<Efl_Op_Description>();\n"
)
.generate(sink, attributes::unused, inative_cxt))
return false;
@@ -387,54 +432,46 @@ struct klass
// only non-registrable methods like class functions, leading to unused `methods` variable.
std::string tmp_registration;
if(!as_generator(*(function_registration(cls)))
- .generate(std::back_inserter(tmp_registration), implementable_methods, inative_cxt))
+ .generate(std::back_inserter(tmp_registration), implementable_methods, change_indentation(indent.inc(2), inative_cxt)))
return false;
if (tmp_registration.find("methods") != std::string::npos)
if (!as_generator(
- scope_tab << scope_tab << "var methods = Efl.Eo.Globals.GetUserMethods(type);\n"
+ indent << scope_tab << scope_tab << "var methods = Efl.Eo.Globals.GetUserMethods(type);\n\n"
<< tmp_registration
).generate(sink, attributes::unused, inative_cxt))
return false;
-
if(!root)
- if(!as_generator(scope_tab << scope_tab << "descs.AddRange(base.GetEoOps(type));\n").generate(sink, attributes::unused, inative_cxt))
+ if(!as_generator(indent << scope_tab << scope_tab << "descs.AddRange(base.GetEoOps(type));\n").generate(sink, attributes::unused, inative_cxt))
return false;
if(!as_generator(
- scope_tab << scope_tab << "return descs;\n"
- << scope_tab << "}\n"
+ indent << scope_tab << scope_tab << "return descs;\n"
+ << indent << scope_tab << "}\n"
).generate(sink, attributes::unused, inative_cxt))
return false;
// Attribute getter of the native 'Efl_Class *' handle (for proper inheritance from additional explicit interfaces)
if(!as_generator(
- scope_tab << "public override IntPtr GetEflClass()\n"
- << scope_tab << "{\n"
- << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n"
- << scope_tab << "}\n"
- ).generate(sink, attributes::unused, inative_cxt))
- return false;
-
- if(!as_generator(
- scope_tab << "public static " << (root ? "" : "new ") << " IntPtr GetEflClassStatic()\n"
- << scope_tab << "{\n"
- << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n"
- << scope_tab << "}\n"
+ indent << scope_tab << "/// <summary>Returns the Eo class for the native methods of this class.</summary>\n"
+ << indent << scope_tab << "/// <returns>The native class pointer.</returns>\n"
+ << indent << scope_tab << "public override IntPtr GetEflClass()\n"
+ << indent << scope_tab << "{\n"
+ << indent << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n"
+ << indent << scope_tab << "}\n\n"
).generate(sink, attributes::unused, inative_cxt))
return false;
// Native method definitions
- if(!as_generator(*(native_function_definition(cls)))
- .generate(sink, implementable_methods, inative_cxt)) return false;
+ if(!as_generator(
+ indent << scope_tab << "#pragma warning disable CA1707, CS1591, SA1300, SA1600\n\n"
+ << *(native_function_definition(cls))
+ << indent << scope_tab << "#pragma warning restore CA1707, CS1591, SA1300, SA1600\n\n")
+ .generate(sink, implementable_methods, change_indentation(indent.inc(), inative_cxt))) return false;
if(!as_generator("}\n").generate(sink, attributes::unused, inative_cxt)) return false;
}
-
- if(!name_helpers::close_namespaces(sink, cls.namespaces, context))
- return false;
-
return true;
}
@@ -457,14 +494,20 @@ struct klass
if(!as_generator(
scope_tab << "///<summary>Pointer to the native class description.</summary>\n"
- << scope_tab << "public " << raw_klass_modifier << "System.IntPtr NativeClass {\n"
- << scope_tab << scope_tab << "get {\n"
- << scope_tab << scope_tab << scope_tab << "if (((object)this).GetType() == typeof (" << inherit_name << "))\n"
- << scope_tab << scope_tab << scope_tab << scope_tab << "return " << native_inherit_full_name << ".GetEflClassStatic();\n"
+ << scope_tab << "public " << raw_klass_modifier << "System.IntPtr NativeClass\n"
+ << scope_tab << "{\n"
+ << scope_tab << scope_tab << "get\n"
+ << scope_tab << scope_tab << "{\n"
+ << scope_tab << scope_tab << scope_tab << "if (((object)this).GetType() == typeof(" << inherit_name << "))\n"
+ << scope_tab << scope_tab << scope_tab << "{\n"
+ << scope_tab << scope_tab << scope_tab << scope_tab << "return GetEflClassStatic();\n"
+ << scope_tab << scope_tab << scope_tab << "}\n"
<< scope_tab << scope_tab << scope_tab << "else\n"
+ << scope_tab << scope_tab << scope_tab << "{\n"
<< scope_tab << scope_tab << scope_tab << scope_tab << "return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];\n"
+ << scope_tab << scope_tab << scope_tab << "}\n"
<< scope_tab << scope_tab << "}\n"
- << scope_tab << "}\n"
+ << scope_tab << "}\n\n"
).generate(sink, attributes::unused, context))
return false;
@@ -473,15 +516,19 @@ struct klass
return true;
if (cls.get_all_events().size() > 0)
- if (!as_generator(scope_tab << visibility << "Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)> eoEvents = new Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)>();\n"
- << scope_tab << visibility << "readonly object eventLock = new object();\n")
+ if (!as_generator(
+ scope_tab << "/// <summary>Internal usage by derived classes to track native events.</summary>\n"
+ << scope_tab << visibility << "Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)> eoEvents = new Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)>();\n"
+ << scope_tab << "/// <summary>Internal usage by derived classes to lock native event handlers.</summary>\n"
+ << scope_tab << visibility << "readonly object eventLock = new object();\n")
.generate(sink, attributes::unused, context))
return false;
if (is_inherit)
{
if (!as_generator(
- scope_tab << "protected bool inherited;\n"
+ scope_tab << "/// <summary>Internal usage to detect whether this instance is from a generated class or not.</summary>\n"
+ << scope_tab << "protected bool inherited;\n"
).generate(sink, attributes::unused, context))
return false;
}
@@ -489,9 +536,10 @@ struct klass
return as_generator(
scope_tab << visibility << " System.IntPtr handle;\n"
<< scope_tab << "///<summary>Pointer to the native instance.</summary>\n"
- << scope_tab << "public System.IntPtr NativeHandle {\n"
+ << scope_tab << "public System.IntPtr NativeHandle\n"
+ << scope_tab << "{\n"
<< scope_tab << scope_tab << "get { return handle; }\n"
- << scope_tab << "}\n"
+ << scope_tab << "}\n\n"
).generate(sink, attributes::unused, context);
}
@@ -500,7 +548,6 @@ struct klass
{
bool root = !helpers::has_regular_ancestor(cls);
auto inherit_name = name_helpers::klass_concrete_name(cls);
- auto native_inherit_name = name_helpers::klass_native_inherit_name(cls);
if(!as_generator(
scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag<library_context>(context).actual_library_name(cls.filename)
@@ -518,22 +565,24 @@ struct klass
// Public (API) constructors
if (!as_generator(
- scope_tab << "///<summary>Creates a new instance.</summary>\n"
- << scope_tab << "///<param name=\"parent\">Parent instance.</param>\n"
+ scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.</summary>\n"
+ << scope_tab << "/// <param name=\"parent\">Parent instance.</param>\n"
<< *(documentation)
// For constructors with arguments, the parent is also required, as optional parameters can't come before non-optional paramenters.
<< scope_tab << "public " << inherit_name << "(Efl.Object parent" << ((constructors.size() > 0) ? "" : "= null") << "\n"
- << scope_tab << scope_tab << scope_tab << *(", " << constructor_param ) << ") :\n"
- << scope_tab << scope_tab << (root ? "this" : "base") << "(" << name_helpers::klass_get_name(cls) << "(), typeof(" << inherit_name << "), parent)\n"
+ << scope_tab << scope_tab << scope_tab << *(", " << constructor_param ) << ") : "
+ << (root ? "this" : "base") << "(" << name_helpers::klass_get_name(cls) << "(), typeof(" << inherit_name << "), parent)\n"
<< scope_tab << "{\n"
- << *(scope_tab << scope_tab << constructor_invocation << "\n" )
+ << (*(scope_tab << scope_tab << constructor_invocation << "\n"))
<< scope_tab << scope_tab << "FinishInstantiation();\n"
- << scope_tab << "}\n"
- << scope_tab << "///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n"
+ << scope_tab << "}\n\n"
+ << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
+ << scope_tab << "/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n"
+ << scope_tab << "/// <param name=\"raw\">The native pointer to be wrapped.</param>\n"
<< scope_tab << "protected " << inherit_name << "(System.IntPtr raw)" << (root ? "" : " : base(raw)") << "\n"
<< scope_tab << "{\n"
<< scope_tab << scope_tab << (root ? "handle = raw;\n" : "")
- << scope_tab << "}\n"
+ << scope_tab << "}\n\n"
).generate(sink, std::make_tuple(constructors, constructors, constructors), context))
return false;
@@ -558,8 +607,14 @@ struct klass
if (!root)
{
return as_generator(
- scope_tab << "///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>\n"
- << scope_tab << "protected " << inherit_name << "(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}\n"
+ scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
+ << scope_tab << "/// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>\n"
+ << scope_tab << "/// <param name=\"baseKlass\">The pointer to the base native Eo class.</param>\n"
+ << scope_tab << "/// <param name=\"managedType\">The managed type of the public constructor that originated this call.</param>\n"
+ << scope_tab << "/// <param name=\"parent\">The Efl.Object parent of this instance.</param>\n"
+ << scope_tab << "protected " << inherit_name << "(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)\n"
+ << scope_tab << "{\n"
+ << scope_tab << "}\n\n"
).generate(sink, attributes::unused, context);
}
@@ -567,25 +622,34 @@ struct klass
// Detailed constructors go only in root classes.
return as_generator(
/// Actual root costructor that creates class and instantiates
- scope_tab << "protected " << inherit_name << "(IntPtr base_klass, System.Type managed_type, Efl.Object parent)\n"
+ scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
+ << scope_tab << "/// Internal usage: Constructor to actually call the native library constructors. C# subclasses\n"
+ << scope_tab << "/// must use the public constructor only.</summary>\n"
+ << scope_tab << "/// <param name=\"baseKlass\">The pointer to the base native Eo class.</param>\n"
+ << scope_tab << "/// <param name=\"managedType\">The managed type of the public constructor that originated this call.</param>\n"
+ << scope_tab << "/// <param name=\"parent\">The Efl.Object parent of this instance.</param>\n"
+ << scope_tab << "protected " << inherit_name << "(IntPtr baseKlass, System.Type managedType, Efl.Object parent)\n"
<< scope_tab << "{\n"
- << scope_tab << scope_tab << "inherited = ((object)this).GetType() != managed_type;\n"
- << scope_tab << scope_tab << "IntPtr actual_klass = base_klass;\n"
- << scope_tab << scope_tab << "if (inherited) {\n"
- << scope_tab << scope_tab << scope_tab << "actual_klass = Efl.Eo.ClassRegister.GetInheritKlassOrRegister(base_klass, ((object)this).GetType());\n"
- << scope_tab << scope_tab << "}\n"
+ << scope_tab << scope_tab << "inherited = ((object)this).GetType() != managedType;\n"
+ << scope_tab << scope_tab << "IntPtr actual_klass = baseKlass;\n"
+ << scope_tab << scope_tab << "if (inherited)\n"
+ << scope_tab << scope_tab << "{\n"
+ << scope_tab << scope_tab << scope_tab << "actual_klass = Efl.Eo.ClassRegister.GetInheritKlassOrRegister(baseKlass, ((object)this).GetType());\n"
+ << scope_tab << scope_tab << "}\n\n"
<< scope_tab << scope_tab << "handle = Efl.Eo.Globals.instantiate_start(actual_klass, parent);\n"
<< scope_tab << scope_tab << "if (inherited)\n"
<< scope_tab << scope_tab << "{\n"
<< scope_tab << scope_tab << scope_tab << "Efl.Eo.Globals.PrivateDataSet(this);\n"
<< scope_tab << scope_tab << "}\n"
- << scope_tab << "}\n"
+ << scope_tab << "}\n\n"
+ << scope_tab << "/// <summary>Finishes instantiating this object.\n"
+ << scope_tab << "/// Internal usage by generated code.</summary>\n"
<< scope_tab << "protected void FinishInstantiation()\n"
<< scope_tab << "{\n"
<< scope_tab << scope_tab << "handle = Efl.Eo.Globals.instantiate_end(handle);\n"
<< scope_tab << scope_tab << "Eina.Error.RaiseIfUnhandledException();\n"
- << scope_tab << "}\n"
+ << scope_tab << "}\n\n"
).generate(sink, attributes::unused, context);
}
@@ -597,7 +661,7 @@ struct klass
if (helpers::has_regular_ancestor(cls))
return true;
- std::string visibility = is_inherit_context(context) ? "protected virtual " : "";
+ std::string visibility = is_inherit_context(context) ? "protected virtual " : "private ";
auto inherit_name = name_helpers::klass_concrete_name(cls);
@@ -647,7 +711,7 @@ struct klass
<< scope_tab << scope_tab << scope_tab << scope_tab << "}\n\n"
<< scope_tab << scope_tab << scope_tab << scope_tab << "Monitor.Exit(Efl.All.InitLock);\n"
<< scope_tab << scope_tab << scope_tab << "}\n"
- << scope_tab << scope_tab << "}\n"
+ << scope_tab << scope_tab << "}\n\n"
<< scope_tab << "}\n\n"
<< scope_tab << "///<summary>Releases the underlying native instance.</summary>\n"
@@ -734,7 +798,7 @@ struct klass
<< scope_tab << scope_tab << "{\n"
<< scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Trying to remove proxy for event {key} when it is nothing registered.\");\n"
<< scope_tab << scope_tab << "}\n"
- << scope_tab << "}\n"
+ << scope_tab << "}\n\n"
)
.generate(sink, NULL, context))
return false;
diff --git a/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh b/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
index 296b59c04c..632696d6a7 100644
--- a/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
+++ b/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
@@ -51,71 +51,71 @@ struct marshall_annotation_visitor_generate
match const parameter_match_table[] =
{
// signed primitives
- {"bool", nullptr, [&] { return " [MarshalAs(UnmanagedType.U1)]"; }},
+ {"bool", nullptr, [&] { return "[MarshalAs(UnmanagedType.U1)]"; }},
{"string", true, [&] {
- return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
+ return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
}},
{"string", false, [&] {
- return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
+ return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
}},
{"mstring", true, [&] {
- return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
+ return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
}},
{"mstring", false, [&] {
- return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
+ return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
}},
{"stringshare", true, [&] {
- return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]";
+ return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]";
}},
{"stringshare", false, [&] {
- return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
+ return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
}},
{"any_value_ptr", true, [&] {
- return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
+ return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
}},
{"any_value_ptr", false, [&] {
- return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
+ return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
}},
{"strbuf", true, [&] {
- return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
+ return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
}},
{"strbuf", false, [&] {
- return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
+ return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
}},
};
match const return_match_table[] =
{
// signed primitives
- {"bool", nullptr, [&] { return " [return: MarshalAs(UnmanagedType.U1)]"; }},
+ {"bool", nullptr, [&] { return "[return: MarshalAs(UnmanagedType.U1)]"; }},
{"string", true, [&] {
- return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
+ return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
}},
{"string", nullptr, [&] {
- return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
+ return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
}},
{"mstring", true, [&] {
- return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
+ return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
}},
{"mstring", false, [&] {
- return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
+ return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
}},
{"stringshare", true, [&] {
- return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]";
+ return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]";
}},
{"stringshare", false, [&] {
- return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
+ return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
}},
{"any_value_ptr", true, [&] {
- return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
+ return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
}},
{"any_value_ptr", false, [&] {
- return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
+ return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
}},
{"strbuf", true, [&] {
- return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
+ return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
}},
{"strbuf", false, [&] {
- return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
+ return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
}},
};
diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
index 6e913556a2..ca36d0492a 100644
--- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
@@ -176,22 +176,22 @@ inline std::string managed_namespace(std::string const& ns)
return escape_keyword(utils::remove_all(ns, '_'));
}
-inline std::string managed_method_name(std::string const& klass, std::string const& name)
+inline std::string managed_method_name(attributes::function_def const& f)
{
- std::vector<std::string> names = utils::split(name, '_');
+ std::vector<std::string> names = utils::split(f.name, '_');
name_helpers::reorder_verb(names);
std::string candidate = escape_keyword(utils::to_pascal_case(names));
// Some eolian methods have the same name as their parent class
- if (candidate == klass)
+ if (candidate == klass_concrete_or_interface_name(f.klass))
candidate = "Do" + candidate;
// Avoid clashing with System.Object.GetType
if (candidate == "GetType" || candidate == "SetType")
{
- candidate.insert(3, klass);
+ candidate.insert(3, f.klass.eolian_name);
}
return candidate;
@@ -203,11 +203,6 @@ inline std::string managed_name(std::string const& name, char separator='_')
return utils::to_pascal_case(tokens);
}
-inline std::string managed_method_name(attributes::function_def const& f)
-{
- return managed_method_name(f.klass.eolian_name, f.name);
-}
-
inline std::string alias_full_eolian_name(attributes::alias_def const& alias)
{
@@ -287,7 +282,7 @@ inline std::string property_managed_name(attributes::property_def const& propert
inline std::string managed_part_name(attributes::part_def const& part)
{
std::vector<std::string> names = utils::split(part.name, '_');
- return utils::to_pascal_case(names);
+ return utils::to_pascal_case(names) + "Part";
}
// Class name translation (interface/concrete/inherit/etc)
@@ -398,29 +393,15 @@ inline std::string klass_inherit_name(T const& klass)
}
template<typename T>
-inline std::string klass_native_inherit_name(T const& klass)
+inline std::string klass_native_inherit_name(EINA_UNUSED T const& klass)
{
- switch(klass.type)
- {
- case attributes::class_type::abstract_:
- case attributes::class_type::regular:
- return klass_concrete_name(klass) + "NativeInherit";
- default:
- return klass_interface_name(klass) + "NativeInherit";
- }
+ return "NativeMethods";
}
template<typename T>
inline std::string klass_full_native_inherit_name(T const& klass)
{
- switch(klass.type)
- {
- case attributes::class_type::abstract_:
- case attributes::class_type::regular:
- return klass_full_concrete_name(klass) + "NativeInherit";
- default:
- return klass_full_interface_name(klass) + "NativeInherit";
- }
+ return klass_full_concrete_name(klass) + "." + klass_native_inherit_name(klass);
}
template<typename T>
@@ -465,14 +446,14 @@ bool open_namespaces(OutputIterator sink, std::vector<std::string> namespaces, C
{
std::transform(namespaces.begin(), namespaces.end(), namespaces.begin(), managed_namespace);
- auto open_namespace = *("namespace " << string << " { ") << "\n";
+ auto open_namespace = *("namespace " << string << " {\n\n");
return as_generator(open_namespace).generate(sink, namespaces, context);
}
template<typename OutputIterator, typename Context>
bool close_namespaces(OutputIterator sink, std::vector<std::string> const& namespaces, Context const& context)
{
- auto close_namespace = *(lit("} ")) << "\n";
+ auto close_namespace = (lit("}") % "\n\n" ) << "\n\n";
return as_generator(close_namespace).generate(sink, namespaces, context);
}
diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh
index acd0c5dfe1..ca3c573df7 100644
--- a/src/bin/eolian_mono/eolian/mono/parameter.hh
+++ b/src/bin/eolian_mono/eolian/mono/parameter.hh
@@ -389,22 +389,22 @@ inline std::string direction_modifier(attributes::parameter_def const& param)
{
if (param.direction == attributes::parameter_direction::inout)
{
- return " ref ";
+ return "ref ";
}
else if (param.direction != attributes::parameter_direction::in)
{
if (param.type.c_type == "Eina_Slice" || param.type.c_type == "Eina_Rw_Slice")
- return " ref ";
+ return "ref ";
else
- return " out ";
+ return "out ";
}
else if (param.direction == attributes::parameter_direction::in && param.type.is_ptr)
{
auto regular = efl::eina::get<attributes::regular_type_def>(&param.type.original_type);
if (helpers::need_struct_conversion(regular))
- return " ref "; // Don't add ref on Marshal if it is ptr
+ return "ref "; // Don't add ref on Marshal if it is ptr
}
- return " ";
+ return "";
}
std::string marshall_direction_modifier(attributes::parameter_def const& param)
@@ -1477,7 +1477,8 @@ struct constructor_invocation_generator
if (!as_generator(
"if (" <<
(efl::eolian::grammar::attribute_reorder<-1>
- ("Efl.Eo.Globals.ParamHelperCheck(" << constructor_parameter_name(ctor) << ")") % "||") << ")\n"
+ ("Efl.Eo.Globals.ParamHelperCheck(" << constructor_parameter_name(ctor) << ")") % " || ") << ")\n"
+ << scope_tab << scope_tab << "{\n"
<< scope_tab << scope_tab << scope_tab << name_helpers::managed_method_name(ctor.function) << "("
).generate(sink, params, context))
return false;
@@ -1493,7 +1494,9 @@ struct constructor_invocation_generator
return false;
}
- if (!as_generator(");").generate(sink, attributes::unused, context))
+ if (!as_generator(
+ ");\n"
+ << scope_tab << scope_tab << "}\n").generate(sink, attributes::unused, context))
return false;
return true;
}
diff --git a/src/bin/eolian_mono/eolian/mono/part_definition.hh b/src/bin/eolian_mono/eolian/mono/part_definition.hh
index 06cdf1584f..484cd0d65a 100644
--- a/src/bin/eolian_mono/eolian/mono/part_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/part_definition.hh
@@ -22,12 +22,12 @@ struct part_definition_generator
return true;
auto part_klass_name = name_helpers::klass_full_concrete_or_interface_name(part.klass);
- return as_generator(scope_tab << documentation
+ return as_generator(documentation(1)
<< scope_tab << "public " << part_klass_name << " " << name_helpers::managed_part_name(part) << "\n"
<< scope_tab << "{\n"
<< scope_tab << scope_tab << "get\n"
<< scope_tab << scope_tab << "{\n"
- << scope_tab << scope_tab << scope_tab << "return Efl.IPartNativeInherit.efl_part_get_ptr.Value.Delegate(NativeHandle, \"" << part.name << "\") as " << part_klass_name << ";\n"
+ << scope_tab << scope_tab << scope_tab << "return GetPart(\"" << part.name << "\") as " << part_klass_name << ";\n"
<< scope_tab << scope_tab << "}\n"
<< scope_tab << "}\n"
).generate(sink, part.documentation, context);
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index d8f03118e7..ba50f2d2f9 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -267,7 +267,8 @@ struct struct_internal_definition_generator
auto const& indent = current_indentation(context);
if (!as_generator
(
- indent << "///<summary>Internal wrapper for struct " << string << ".</summary>\n"
+ indent << "#pragma warning disable CS1591\n\n"
+ << indent << "///<summary>Internal wrapper for struct " << string << ".</summary>\n"
<< indent << "[StructLayout(LayoutKind.Sequential)]\n"
<< indent << "public struct " << string << "\n"
<< indent << "{\n"
@@ -367,7 +368,9 @@ struct struct_internal_definition_generator
return false;
// close internal class
- if(!as_generator(indent << "}\n\n").generate(sink, attributes::unused, context)) return false;
+ if(!as_generator(indent << "}\n\n"
+ << indent << "#pragma warning restore CS1591\n\n"
+ ).generate(sink, attributes::unused, context)) return false;
return true;
}
@@ -400,7 +403,7 @@ struct struct_definition_generator
field_name[0] = std::toupper(field_name[0]); // Hack to allow 'static' as a field name
if (!as_generator
(
- indent << scope_tab << documentation
+ documentation(indent.n + 1)
<< indent << scope_tab << "public " << type << " " << string << ";\n"
)
.generate(sink, std::make_tuple(field, field.type, name_helpers::to_field_name(field.name)), context))
@@ -435,7 +438,9 @@ struct struct_definition_generator
}
if(!as_generator(
- indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n"
+ indent << scope_tab << "///<summary>Implicit conversion to the managed representation from a native pointer.</summary>\n"
+ << indent << scope_tab << "///<param name=\"ptr\">Native pointer to be converted.</param>\n"
+ << indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n"
<< indent << scope_tab << "{\n"
<< indent << scope_tab << scope_tab << "var tmp = (" << struct_name << ".NativeStruct)Marshal.PtrToStructure(ptr, typeof(" << struct_name << ".NativeStruct));\n"
<< indent << scope_tab << scope_tab << "return tmp;\n"
diff --git a/src/bin/eolian_mono/eolian/mono/struct_fields.hh b/src/bin/eolian_mono/eolian/mono/struct_fields.hh
index 42a20e1aba..163d1b94db 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_fields.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_fields.hh
@@ -18,7 +18,7 @@ struct field_argument_default_generator
template<typename OutputIterator, typename Context>
bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
{
- if (!as_generator(type << " " << string << "=default(" << type << ")")
+ if (!as_generator(type << " " << string << " = default(" << type << ")")
.generate(sink, std::make_tuple(field.type, name_helpers::to_field_name(field.name), field.type), context))
return false;
return true;
diff --git a/src/bin/eolian_mono/eolian/mono/variable_definition.hh b/src/bin/eolian_mono/eolian/mono/variable_definition.hh
index f13efdecc2..fdc5219794 100644
--- a/src/bin/eolian_mono/eolian/mono/variable_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/variable_definition.hh
@@ -34,7 +34,7 @@ struct constant_definition_generator
if (!name_helpers::open_namespaces(sink, constant.namespaces, context))
return false;
- if (!as_generator("public partial class Constants {\n").generate(sink, attributes::unused, context))
+ if (!as_generator("public partial class Constants\n{\n").generate(sink, attributes::unused, context))
return false;
std::string literal;
@@ -58,11 +58,12 @@ struct constant_definition_generator
}
// declare variable
- if (!as_generator(scope_tab(1)
+ if (!as_generator(documentation(1)
+ << scope_tab(1)
<< "public static readonly " << type
<< " " << utils::remove_all(constant.name, '_')
<< " = " << literal << ";\n")
- .generate(sink, constant.base_type, context))
+ .generate(sink, std::make_tuple(constant, constant.base_type), context))
return false;
// FIXME missing documentation generator
diff --git a/src/bin/eolian_mono/eolian_mono.cc b/src/bin/eolian_mono/eolian_mono.cc
index 8f24f762f0..e22acb9ce1 100644
--- a/src/bin/eolian_mono/eolian_mono.cc
+++ b/src/bin/eolian_mono/eolian_mono.cc
@@ -261,7 +261,7 @@ database_load(options_type const& opts)
<< "No input file.";
assert(false && "Error parsing input file");
}
- if (!::eolian_state_file_parse(opts.state, opts.in_file.c_str()))
+ if (!::eolian_state_file_path_parse(opts.state, opts.in_file.c_str()))
{
EINA_CXX_DOM_LOG_ERR(eolian_mono::domain)
<< "Failed parsing: " << opts.in_file << ".";
diff --git a/src/bindings/cxx/efl_cxx/meson.build b/src/bindings/cxx/efl_cxx/meson.build
index 44113d324a..0dca3250c9 100644
--- a/src/bindings/cxx/efl_cxx/meson.build
+++ b/src/bindings/cxx/efl_cxx/meson.build
@@ -1,5 +1,5 @@
cxx_header_src += join_paths(file_location, 'Efl.hh')
install_headers(join_paths('..', file_location, 'cxx', 'efl_part_impl.hh'),
- subdir: join_paths(dir_package_include, 'cxx')
+ subdir: join_paths(package_version_name, 'cxx')
)
diff --git a/src/bindings/cxx/eina_cxx/meson.build b/src/bindings/cxx/eina_cxx/meson.build
index fbe6f55ede..a08c416c98 100644
--- a/src/bindings/cxx/eina_cxx/meson.build
+++ b/src/bindings/cxx/eina_cxx/meson.build
@@ -50,5 +50,5 @@ eina_cxx = declare_dependency(
)
install_headers(eina_cxx_header_src,
- subdir: dir_package_include
+ subdir: package_version_name
)
diff --git a/src/bindings/cxx/elementary_cxx/meson.build b/src/bindings/cxx/elementary_cxx/meson.build
new file mode 100644
index 0000000000..3c76dade79
--- /dev/null
+++ b/src/bindings/cxx/elementary_cxx/meson.build
@@ -0,0 +1 @@
+cxx_header_src += files(join_paths('..', file_location, 'Efl_Ui.hh'))
diff --git a/src/bindings/cxx/meson.build b/src/bindings/cxx/meson.build
index 8697473f09..3401a43c3f 100644
--- a/src/bindings/cxx/meson.build
+++ b/src/bindings/cxx/meson.build
@@ -11,7 +11,7 @@ cxx_sublibs = [
['Evas', false, true, true, []],
['Edje', false, false, true, []],
['Eldbus', true, true, true, []],
- ['Elementary', false, true, true, []]
+ ['Elementary', true, true, true, []]
]
increased_dependency = []
@@ -30,7 +30,6 @@ foreach lib : cxx_sublibs
'-DNEED_RUN_IN_TREE=1'
]
- dir_package_include = package_version_name
dir_package_modules = join_paths(dir_lib, package_name, 'modules')
cxx_generator_target = []
cxx_header_src = []
@@ -50,7 +49,7 @@ foreach lib : cxx_sublibs
input : join_paths(subdir_file_location, cxx_gen_file),
output : [cxx_gen_file + '.hh', cxx_gen_file + '.impl.hh'],
install : true,
- install_dir : join_paths(dir_package_include, eo_file_subdir),
+ 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@'])
@@ -64,7 +63,7 @@ foreach lib : cxx_sublibs
input : eo_file_list,
output : [lib[0] + '.eo.hh'],
install : true,
- install_dir : join_paths(dir_package_include),
+ install_dir : join_paths(dir_include, package_version_name),
command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories, '-m',
'-o', '@OUTPUT@',
'@INPUT@'])
@@ -97,7 +96,7 @@ foreach lib : cxx_sublibs
endforeach
install_headers(cxx_header_src,
- subdir: dir_package_include
+ subdir: package_version_name,
)
pkgconfig.generate(
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 0b99715ed9..a89946c1eb 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -310,7 +310,8 @@ ffi.cdef [[
Eina_Iterator *eolian_state_eot_file_paths_get(const Eolian_State *state);
Eina_Iterator *eolian_state_eo_files_get(const Eolian_State *state);
Eina_Iterator *eolian_state_eot_files_get(const Eolian_State *state);
- const Eolian_Unit *eolian_state_file_parse(Eolian_State *state, const char *filepath);
+ const Eolian_Unit *eolian_state_file_parse(Eolian_State *state, const char *filename);
+ const Eolian_Unit *eolian_state_file_path_parse(Eolian_State *state, const char *filepath);
Eina_Bool eolian_state_all_eo_files_parse(Eolian_State *state);
Eina_Bool eolian_state_all_eot_files_parse(Eolian_State *state);
Eina_Bool eolian_state_check(const Eolian_State *state);
@@ -755,8 +756,16 @@ ffi.metatype("Eolian_State", {
return eolian.eolian_state_system_directory_add(self) ~= 0
end,
- file_parse = function(self, fpath)
- local v = eolian.eolian_state_file_parse(self, fpath)
+ file_parse = function(self, fname)
+ local v = eolian.eolian_state_file_parse(self, fname)
+ if v == nil then
+ return nil
+ end
+ return v
+ end,
+
+ file_path_parse = function(self, fpath)
+ local v = eolian.eolian_state_file_path_parse(self, fpath)
if v == nil then
return nil
end
diff --git a/src/bindings/mono/efl_mono/efl_all.cs b/src/bindings/mono/efl_mono/efl_all.cs
index 9a49730093..873bd67e48 100644
--- a/src/bindings/mono/efl_mono/efl_all.cs
+++ b/src/bindings/mono/efl_mono/efl_all.cs
@@ -30,7 +30,7 @@ static class UnsafeNativeMethods
static UnsafeNativeMethods()
{
- _evas_init = new Efl.Eo.FunctionWrapper<init_func_delegate>("evas", "evas_init");
+ _evas_init = new Efl.Eo.FunctionWrapper<init_func_delegate>(efl.Libs.Evas, "evas_init");
}
public static void evas_init()
diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build
index e7c5e00d9a..c55a8f4e37 100644
--- a/src/bindings/mono/meson.build
+++ b/src/bindings/mono/meson.build
@@ -53,14 +53,6 @@ blacklisted_files = [
'evas_canvas3d_primitive.eo',
'evas_canvas3d_scene.eo',
'evas_canvas3d_texture.eo',
- 'efl_canvas_vg_object.eo',
- 'efl_vg.eo',
- 'efl_vg_container.eo',
- 'efl_vg_gradient.eo',
- 'efl_vg_gradient_radial.eo',
- 'efl_vg_gradient_linear.eo',
- 'efl_vg_root_node.eo',
- 'efl_vg_shape.eo.cs',
'efl_io_buffer.eo',
'efl_io_queue.eo',
'efl_io_sizer.eo',
@@ -94,8 +86,8 @@ blacklisted_files = [
efl_mono_lib = library('eflcustomexportsmono',
join_paths('..', '..', 'lib', 'efl_mono', 'efl_custom_exports_mono.c'),
install : true,
- install_dir : join_paths(dir_lib, 'efl-mono-'+version_major),
- dependencies : [eo, eina, ecore]
+ dependencies : [eo, eina, ecore],
+ version : meson.project_version()
)
beta_option = []
diff --git a/src/examples/ecore/meson.build b/src/examples/ecore/meson.build
index c0b42959fa..c4d11c7a7d 100644
--- a/src/examples/ecore/meson.build
+++ b/src/examples/ecore/meson.build
@@ -7,7 +7,6 @@ examples = [
'ecore_file_download_example',
'ecore_idler_example',
'ecore_job_example',
- 'ecore_pipe_simple_example',
'ecore_poller_example',
'ecore_thread_example',
'ecore_time_functions_example',
@@ -15,6 +14,10 @@ examples = [
'ecore_getopt_example'
]
+if config_h.has('HAVE_FORK')
+ examples += 'ecore_pipe_simple_example'
+endif
+
gnutls = dependency('gnutls', required : false)
if gnutls.found()
examples += ['ecore_fd_handler_gnutls_example']
diff --git a/src/examples/elementary/bg_cxx_example_01.cc b/src/examples/elementary/bg_cxx_example_01.cc
index 1b3ae91736..5c8a61e198 100644
--- a/src/examples/elementary/bg_cxx_example_01.cc
+++ b/src/examples/elementary/bg_cxx_example_01.cc
@@ -1,6 +1,6 @@
#define EFL_CXXPERIMENTAL // for background part
#define EFL_BETA_API_SUPPORT
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using efl::eo::instantiate;
diff --git a/src/examples/elementary/bg_cxx_example_02.cc b/src/examples/elementary/bg_cxx_example_02.cc
index f88329d2eb..07b40ab5fe 100644
--- a/src/examples/elementary/bg_cxx_example_02.cc
+++ b/src/examples/elementary/bg_cxx_example_02.cc
@@ -8,7 +8,7 @@
#define EFL_CXXPERIMENTAL
#define EFL_BETA_API_SUPPORT
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using efl::eo::instantiate;
diff --git a/src/examples/elementary/box_cxx_example_02.cc b/src/examples/elementary/box_cxx_example_02.cc
index e89007fdec..e9d802cb98 100644
--- a/src/examples/elementary/box_cxx_example_02.cc
+++ b/src/examples/elementary/box_cxx_example_02.cc
@@ -1,6 +1,6 @@
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` box_cxx_example_02.cc -o box_cxx_example_02
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using efl::eo::instantiate;
diff --git a/src/examples/elementary/button_cxx_example_00.cc b/src/examples/elementary/button_cxx_example_00.cc
index a0cdb1c566..ff9f569c18 100644
--- a/src/examples/elementary/button_cxx_example_00.cc
+++ b/src/examples/elementary/button_cxx_example_00.cc
@@ -2,7 +2,7 @@
#define EFL_CXXPERIMENTAL
#define EFL_BETA_API_SUPPORT
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
#include <iostream>
using efl::eo::instantiate;
diff --git a/src/examples/elementary/button_cxx_example_01.cc b/src/examples/elementary/button_cxx_example_01.cc
index 3136f6ac04..4cad5d8ae7 100644
--- a/src/examples/elementary/button_cxx_example_01.cc
+++ b/src/examples/elementary/button_cxx_example_01.cc
@@ -2,7 +2,7 @@
#define EFL_CXXPERIMENTAL
#define EFL_BETA_API_SUPPORT
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using efl::eo::instantiate;
diff --git a/src/examples/elementary/calendar_cxx_example_01.cc b/src/examples/elementary/calendar_cxx_example_01.cc
index 0d89dfe2d6..fbeccb92bf 100644
--- a/src/examples/elementary/calendar_cxx_example_01.cc
+++ b/src/examples/elementary/calendar_cxx_example_01.cc
@@ -1,4 +1,4 @@
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using efl::eo::instantiate;
diff --git a/src/examples/elementary/calendar_cxx_example_02.cc b/src/examples/elementary/calendar_cxx_example_02.cc
index 047f5841f8..60fb796bf1 100644
--- a/src/examples/elementary/calendar_cxx_example_02.cc
+++ b/src/examples/elementary/calendar_cxx_example_02.cc
@@ -1,6 +1,6 @@
#define EFL_CXXPERIMENTAL
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using namespace std::placeholders;
using efl::eo::add;
diff --git a/src/examples/elementary/calendar_cxx_example_03.cc b/src/examples/elementary/calendar_cxx_example_03.cc
index 5b44afb557..3f75b07167 100644
--- a/src/examples/elementary/calendar_cxx_example_03.cc
+++ b/src/examples/elementary/calendar_cxx_example_03.cc
@@ -1,4 +1,4 @@
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using efl::eo::instantiate;
diff --git a/src/examples/elementary/calendar_cxx_example_04.cc b/src/examples/elementary/calendar_cxx_example_04.cc
index 4e7a17fe21..ef2a8eb643 100644
--- a/src/examples/elementary/calendar_cxx_example_04.cc
+++ b/src/examples/elementary/calendar_cxx_example_04.cc
@@ -1,4 +1,4 @@
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
#warning This example can not be implemented with EO APIs... FIXME
diff --git a/src/examples/elementary/calendar_cxx_example_05.cc b/src/examples/elementary/calendar_cxx_example_05.cc
index 3e6b9f780c..ccb7891d15 100644
--- a/src/examples/elementary/calendar_cxx_example_05.cc
+++ b/src/examples/elementary/calendar_cxx_example_05.cc
@@ -1,4 +1,4 @@
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
#warning This example can not be implemented with EO APIs... FIXME
diff --git a/src/examples/elementary/clock_cxx_example.cc b/src/examples/elementary/clock_cxx_example.cc
index 7e30937c2c..aa08d40c88 100644
--- a/src/examples/elementary/clock_cxx_example.cc
+++ b/src/examples/elementary/clock_cxx_example.cc
@@ -1,4 +1,4 @@
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using efl::eo::instantiate;
diff --git a/src/examples/elementary/efl_ui_grid_example_1.c b/src/examples/elementary/efl_ui_grid_example_1.c
index 6fe455c904..4e41224ae6 100644
--- a/src/examples/elementary/efl_ui_grid_example_1.c
+++ b/src/examples/elementary/efl_ui_grid_example_1.c
@@ -56,10 +56,10 @@ elm_main(int argc, char **argv)
// TEST#1 : Create Grid
gd->grid = grid = EoGenerate(EFL_UI_GRID_CLASS, box, (horiz ? EFL_UI_DIR_HORIZONTAL : EFL_UI_DIR_VERTICAL));
efl_ui_grid_item_size_set(grid, EINA_SIZE2D(100, 120)); // 4X4
- efl_pack_padding_set(grid, 5.0, 5.0, EINA_TRUE);
- efl_pack_align_set(grid, 0.5, 0.5);
+ efl_gfx_arrangement_content_padding_set(grid, 5.0, 5.0, EINA_TRUE);
+ efl_gfx_arrangement_content_align_set(grid, 0.5, 0.5);
efl_pack_end(box, grid);
-
+
// TEST#2 : Set Item Default Size
Efl_Ui_Grid_Item *target = NULL;
diff --git a/src/examples/elementary/efl_ui_list_view_example_1.c b/src/examples/elementary/efl_ui_list_view_example_1.c
index 04ae147f2a..78489017ca 100644
--- a/src/examples/elementary/efl_ui_list_view_example_1.c
+++ b/src/examples/elementary/efl_ui_list_view_example_1.c
@@ -87,10 +87,10 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
);
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
+ efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
efl_ui_property_bind(factory, "signal/efl,state,%v", "odd_style");
efl_ui_property_bind(factory, "signal/efl,state,%{selected;unselected}", "selected");
efl_ui_property_bind(factory, "efl.text", "name");
- efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
li = efl_add(EFL_UI_LIST_VIEW_CLASS, win
, efl_ui_list_view_layout_factory_set(efl_added, factory)
diff --git a/src/examples/elementary/efl_ui_list_view_example_2.c b/src/examples/elementary/efl_ui_list_view_example_2.c
index a843f6ed9c..5a4d680614 100644
--- a/src/examples/elementary/efl_ui_list_view_example_2.c
+++ b/src/examples/elementary/efl_ui_list_view_example_2.c
@@ -33,8 +33,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
model = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname));
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
+ efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
efl_ui_property_bind(factory, "efl.text", "filename");
- efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
li = efl_add(EFL_UI_LIST_VIEW_CLASS, win);
efl_ui_list_view_layout_factory_set(li, factory);
diff --git a/src/examples/elementary/efl_ui_list_view_example_3.c b/src/examples/elementary/efl_ui_list_view_example_3.c
index c027856df7..5a233b3430 100644
--- a/src/examples/elementary/efl_ui_list_view_example_3.c
+++ b/src/examples/elementary/efl_ui_list_view_example_3.c
@@ -223,7 +223,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
priv->model = _make_model();
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
efl_ui_property_bind(factory, "efl.text", "filename");
- efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
+ efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
priv->list1 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model));
efl_event_callback_add(priv->list1, EFL_UI_LIST_VIEW_EVENT_ITEM_REALIZED, _realized_1_cb, priv);
@@ -235,7 +235,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
efl_ui_property_bind(factory, "efl.text", "filename");
efl_ui_property_bind(factory, "signal/efl,state,%v", "selected");
- efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
+ efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
priv->list2 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model));
efl_event_callback_add(priv->list2, EFL_UI_LIST_VIEW_EVENT_ITEM_REALIZED, _realized_2_cb, priv->list2);
evas_object_size_hint_weight_set(priv->list2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/src/examples/elementary/filter_example.c b/src/examples/elementary/filter_example.c
new file mode 100644
index 0000000000..cc05b7d36f
--- /dev/null
+++ b/src/examples/elementary/filter_example.c
@@ -0,0 +1,129 @@
+/**
+ * gcc -g filter_example.c -o filter_example `pkg-config --cflags --libs elementary`
+ */
+#define EFL_BETA_API_SUPPORT 1
+#include <Elementary.h>
+
+typedef struct _Filter
+{
+ const char *name;
+ const char *code;
+} Filter;
+
+static Filter filters[] = {
+ { "no", NULL },
+ { "blend",
+ "blend { color = '#fff8' }" },
+ { "blur",
+ "blur { 15 }" },
+ { "grow",
+ "a = buffer { 'rgba' }\n"
+ "blend { dst = a }\n"
+ "grow { 6, src = a }" },
+ { "curve",
+ "a = buffer ('alpha')\n"
+ "blur ({ 4, dst = a })\n"
+ "p = {}\n"
+ "p[0] = 0\n"
+ "p[20] = 0\n"
+ "p[60] = 255\n"
+ "p[160] = 255\n"
+ "p[200] = 0\n"
+ "p[255] = 0\n"
+ "curve ({ points = p, src = a, dst = a })\n"
+ "blend ({ src = a, color = 'white' })\n" },
+ { "fill",
+ "fill { color = 'darkblue' }" },
+ { "mask",
+ "a = buffer ('alpha')\n"
+ "blur ({ 6, dst = a })\n"
+ "p = {}\n"
+ "p[0] = 255\n"
+ "p[128] = 255\n"
+ "p[255] = 0\n"
+ "curve ({ points = p, src = a, dst = a })\n"
+ "blend ({ color = 'black' })\n"
+ "mask ({ mask = a, color = 'cyan' })" },
+ { "bump",
+ "a = buffer { 'alpha' }\n"
+ "grow { 5, dst = a }\n"
+ "blur { 6, src = a , dst = a }\n"
+ "bump { map = a, color = '#f60', specular = 1, compensate = true }" },
+ { "trans",
+ "t = buffer ('alpha')\n"
+ "transform ({ oy = 20, dst = t })\n"
+ "blend ({ src = t, color = '#fff8' })\n"
+ "blend ({ color = 'white' })" },
+};
+
+EAPI_MAIN int
+elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
+{
+ Filter *f;
+ unsigned int i;
+ char buf[PATH_MAX];
+ Eo *win, *scroller, *hbox, *box, *text, *img;
+
+ elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+ elm_app_info_set(elm_main, "elementary", "images");
+
+ win = elm_win_util_standard_add("Gfx Filter Test", "Gfx Filter Test");
+ elm_win_autodel_set(win, EINA_TRUE);
+
+ scroller = elm_scroller_add(win);
+ evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, scroller);
+ evas_object_show(scroller);
+
+ hbox = elm_box_add(win);
+ elm_box_horizontal_set(hbox, EINA_TRUE);
+ evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_content_set(scroller, hbox);
+ evas_object_show(hbox);
+
+ box = elm_box_add(win);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_box_pack_end(hbox, box);
+ evas_object_show(box);
+
+ for (i = 0; i < EINA_C_ARRAY_LENGTH(filters); i++)
+ {
+ f = &filters[i];
+ text = evas_object_text_add(evas_object_evas_get(win));
+ evas_object_size_hint_align_set(text, 0, EVAS_HINT_FILL);
+ evas_object_size_hint_min_set(text, 100, 100);
+ evas_object_text_font_set(text, "Sans:style=Bold", 50);
+ evas_object_text_text_set(text, f->name);
+ elm_box_pack_end(box, text);
+ evas_object_show(text);
+
+ efl_gfx_filter_program_set(text, f->code, f->name);
+ }
+
+ box = elm_box_add(win);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_box_pack_end(hbox, box);
+ evas_object_show(box);
+
+ snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
+ for (i = 0; i < EINA_C_ARRAY_LENGTH(filters); i++)
+ {
+ f = &filters[i];
+ img = evas_object_image_filled_add(evas_object_evas_get(win));
+ evas_object_size_hint_align_set(img, 0, EVAS_HINT_FILL);
+ evas_object_image_file_set(img, buf, 0);
+ evas_object_size_hint_min_set(img, 100, 100);
+ elm_box_pack_end(box, img);
+ evas_object_show(img);
+
+ efl_gfx_filter_program_set(img, f->code, f->name);
+ }
+
+ evas_object_resize(win, 400, 400);
+ evas_object_show(win);
+
+ elm_run();
+
+ return 0;
+}
+ELM_MAIN()
diff --git a/src/examples/elementary/icon_cxx_example_01.cc b/src/examples/elementary/icon_cxx_example_01.cc
index 6252ce1cc0..fd71bedeb5 100644
--- a/src/examples/elementary/icon_cxx_example_01.cc
+++ b/src/examples/elementary/icon_cxx_example_01.cc
@@ -1,4 +1,4 @@
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
EAPI_MAIN int
elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
diff --git a/src/examples/elementary/menu_cxx_example_01.cc b/src/examples/elementary/menu_cxx_example_01.cc
index 04cb3905ad..ff3a62e9be 100644
--- a/src/examples/elementary/menu_cxx_example_01.cc
+++ b/src/examples/elementary/menu_cxx_example_01.cc
@@ -1,4 +1,4 @@
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
#warning This example can not be implemented with EO APIs... FIXME
diff --git a/src/examples/elementary/meson.build b/src/examples/elementary/meson.build
index 67286d95f8..5286fb80ff 100644
--- a/src/examples/elementary/meson.build
+++ b/src/examples/elementary/meson.build
@@ -30,6 +30,7 @@ examples = [
'fileselector_example',
'fileviewlist',
'filemvc',
+ 'filter_example',
'flip_example_01',
'flipselector_example',
'frame_example_01',
@@ -121,6 +122,35 @@ examples = [
foreach example : examples
executable(example, example + '.c', dependencies: [elementary, ecore, eio])
endforeach
+if get_option('bindings').contains('cxx')
+ cxx_examples = [
+ 'bg_cxx_example_01',
+ 'bg_cxx_example_02',
+ 'box_cxx_example_02',
+ 'button_cxx_example_00',
+ 'button_cxx_example_01',
+ 'calendar_cxx_example_01',
+ 'calendar_cxx_example_02',
+ 'calendar_cxx_example_03',
+ 'calendar_cxx_example_04',
+ 'calendar_cxx_example_05',
+ 'clock_cxx_example',
+ 'icon_cxx_example_01',
+ 'menu_cxx_example_01',
+ 'popup_cxx_example',
+ 'radio_cxx_example_01',
+ 'slider_cxx_example',
+ 'spinner_cxx_example',
+ 'table_cxx_example_01',
+ 'table_cxx_example_02',
+ 'toolbar_cxx_example_01',
+ ]
+
+ foreach example : cxx_examples
+ executable(example, example + '.cc', dependencies: [elementary_cxx])
+ endforeach
+
+endif
edc_files = [
'codegen_example.edc',
diff --git a/src/examples/elementary/popup_cxx_example.cc b/src/examples/elementary/popup_cxx_example.cc
index a6a29ed955..6195c430c7 100644
--- a/src/examples/elementary/popup_cxx_example.cc
+++ b/src/examples/elementary/popup_cxx_example.cc
@@ -3,8 +3,7 @@
#define EFL_CXXPERIMENTAL
#include <Evas.hh>
-#include <Efl_Ui.h>
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
#include <iostream>
using efl::eo::instantiate;
diff --git a/src/examples/elementary/radio_cxx_example_01.cc b/src/examples/elementary/radio_cxx_example_01.cc
index e72fe9f55e..6d6f943fb9 100644
--- a/src/examples/elementary/radio_cxx_example_01.cc
+++ b/src/examples/elementary/radio_cxx_example_01.cc
@@ -2,7 +2,7 @@
#define EFL_CXXPERIMENTAL
#define EFL_BETA_API_SUPPORT
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
#include <iostream>
using efl::eo::instantiate;
diff --git a/src/examples/elementary/slider_cxx_example.cc b/src/examples/elementary/slider_cxx_example.cc
index 82846257cf..24de288d06 100644
--- a/src/examples/elementary/slider_cxx_example.cc
+++ b/src/examples/elementary/slider_cxx_example.cc
@@ -2,7 +2,7 @@
#define EFL_CXXPERIMENTAL
#define EFL_BETA_API_SUPPORT
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using namespace std::placeholders;
using efl::eo::instantiate;
diff --git a/src/examples/elementary/spinner_cxx_example.cc b/src/examples/elementary/spinner_cxx_example.cc
index a37e24e44c..98319c091d 100644
--- a/src/examples/elementary/spinner_cxx_example.cc
+++ b/src/examples/elementary/spinner_cxx_example.cc
@@ -2,7 +2,7 @@
#define ELM_WIDGET_PROTECTED
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
#include <iostream>
#warning FIXME: This example requires proper EO API usage (not legacy spinner)
diff --git a/src/examples/elementary/table_cxx_example_01.cc b/src/examples/elementary/table_cxx_example_01.cc
index a76d8d7ea0..11e97b589f 100644
--- a/src/examples/elementary/table_cxx_example_01.cc
+++ b/src/examples/elementary/table_cxx_example_01.cc
@@ -1,6 +1,6 @@
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` table_cxx_example_01.cc -o table_cxx_example_01
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using efl::eo::instantiate;
@@ -15,7 +15,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl::ui::Table table(instantiate, win);
win.content_set(table);
- table.pack_padding_set(5, 5, true);
+ table.content_padding_set(5, 5, true);
// FIXME
// table.homogeneous_set(true);
diff --git a/src/examples/elementary/table_cxx_example_02.cc b/src/examples/elementary/table_cxx_example_02.cc
index 472fbef89d..f0ca35e76d 100644
--- a/src/examples/elementary/table_cxx_example_02.cc
+++ b/src/examples/elementary/table_cxx_example_02.cc
@@ -1,7 +1,7 @@
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` table_cxx_example_01.cc -o table_cxx_example_01
#include <Evas.hh>
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
using efl::eo::instantiate;
@@ -16,7 +16,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl::ui::Table table(instantiate, win);
win.content_set(table);
- table.pack_padding_set(5, 5, true);
+ table.content_padding_set(5, 5, true);
efl::canvas::Rectangle rect(instantiate, win);
rect.color_set(255, 0, 0, 255);
diff --git a/src/examples/elementary/toolbar_cxx_example_01.cc b/src/examples/elementary/toolbar_cxx_example_01.cc
index 6f4e83be89..a32f4926b6 100644
--- a/src/examples/elementary/toolbar_cxx_example_01.cc
+++ b/src/examples/elementary/toolbar_cxx_example_01.cc
@@ -8,7 +8,7 @@
#warning This example requires yet unfinished EO APIs
#define EFL_BETA_API_SUPPORT
-#include <Elementary.hh>
+#include <Efl_Ui.hh>
EAPI int
elm_main(int argc, char* argv[])
diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h
index 6e872d9d2c..363868c1a4 100644
--- a/src/lib/ecore/Ecore_Eo.h
+++ b/src/lib/ecore/Ecore_Eo.h
@@ -119,6 +119,7 @@ EAPI Eo *efl_main_loop_get(void);
#include "efl_composite_model.eo.h"
#include "efl_boolean_model.eo.h"
#include "efl_select_model.eo.h"
+#include "efl_filter_model.eo.h"
#include "efl_view_model.eo.h"
/**
diff --git a/src/lib/ecore/ecore_events.c b/src/lib/ecore/ecore_events.c
index 15667e9bd9..01a4c3d019 100644
--- a/src/lib/ecore/ecore_events.c
+++ b/src/lib/ecore/ecore_events.c
@@ -12,16 +12,13 @@ typedef struct _Ecore_Future_Schedule_Entry
Eina_Future_Schedule_Entry base;
Eina_Future_Scheduler_Cb cb;
Eina_Future *future;
- Eo *event;
Eina_Value value;
} Ecore_Future_Schedule_Entry;
//////
// XXX: still using legacy ecore events
-//static Ecore_Event_Handler *future_handler = NULL;
static Eina_Bool shutting_down = EINA_FALSE;
static Eina_Mempool *mp_future_schedule_entry = NULL;
-//static int ECORE_EV_FUTURE_ID = -1;
//
//////
@@ -129,52 +126,47 @@ ecore_event_current_event_get(void)
return ecore_event_message_handler_current_event_get(_event_msg_handler);
}
-/* XXX:
-static Eina_Bool
-ecore_future_dispatched(void *data EINA_UNUSED,
- int type EINA_UNUSED,
- void *event)
-{
- Ecore_Future_Schedule_Entry *entry = event;
- EINA_SAFETY_ON_NULL_RETURN_VAL(entry, EINA_FALSE);
+static void _future_dispatch_cb(void *data, const Efl_Event *ev EINA_UNUSED);
+static void _event_del_cb(void *data, const Efl_Event *ev);
- entry->event = NULL;
- entry->cb(entry->future, entry->value);
- return EINA_FALSE;
-}
+EFL_CALLBACKS_ARRAY_DEFINE(ecore_future_callbacks,
+ { EFL_LOOP_EVENT_IDLE_ENTER, _future_dispatch_cb },
+ { EFL_LOOP_EVENT_IDLE, _future_dispatch_cb },
+ { EFL_EVENT_DEL, _event_del_cb });
static void
-ecore_future_free(void *user_data,
- void *func_data EINA_UNUSED)
+_future_dispatch_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- Ecore_Future_Schedule_Entry *entry = user_data;
- if (entry->event)
+ Efl_Loop_Future_Scheduler *loopsched = data;
+ Eina_List *entries = loopsched->future_entries;
+ Ecore_Future_Schedule_Entry *entry;
+
+ loopsched->future_entries = NULL;
+ efl_event_callback_array_del((Eo *) loopsched->loop, ecore_future_callbacks(), loopsched);
+
+ EINA_LIST_FREE(entries, entry)
{
- eina_future_cancel(entry->future);
- eina_value_flush(&entry->value);
+ entry->cb(entry->future, entry->value);
+ eina_mempool_free(mp_future_schedule_entry, entry);
}
- eina_mempool_free(mp_future_schedule_entry, entry);
}
-*/
static void
-_future_dispatch_cb(void *data, const Efl_Event *ev EINA_UNUSED)
+_event_del_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- Ecore_Future_Schedule_Entry *entry = data;
- entry->event = NULL;
- entry->cb(entry->future, entry->value);
-}
+ Efl_Loop_Future_Scheduler *loopsched = data;
+ Eina_List *entries = loopsched->future_entries;
+ Ecore_Future_Schedule_Entry *entry;
-static void
-_event_del_cb(void *data, const Efl_Event *ev)
-{
- Ecore_Future_Schedule_Entry *entry = data;
- if ((ev->object == (Eo *) entry->event) && entry->future)
+ loopsched->future_entries = NULL;
+ efl_event_callback_array_del((Eo *) loopsched->loop, ecore_future_callbacks(), loopsched);
+
+ EINA_LIST_FREE(entries, entry)
{
eina_future_cancel(entry->future);
eina_value_flush(&entry->value);
+ eina_mempool_free(mp_future_schedule_entry, entry);
}
- eina_mempool_free(mp_future_schedule_entry, entry);
}
static Eina_Future_Schedule_Entry *
@@ -192,40 +184,35 @@ ecore_future_schedule(Eina_Future_Scheduler *sched,
entry->cb = cb;
entry->future = future;
entry->value = value;
- entry->event = efl_loop_message_future_handler_message_type_add
- (loopsched->loop_data->future_message_handler);
- EINA_SAFETY_ON_NULL_GOTO(entry->event, err);
- efl_loop_message_future_data_set(entry->event, entry);
- efl_loop_message_handler_message_send
- (loopsched->loop_data->future_message_handler, entry->event);
-// XXX:
-// entry->event = ecore_event_add(ECORE_EV_FUTURE_ID, entry,
-// ecore_future_free, entry);
- efl_event_callback_add((Eo *)entry->event, EFL_LOOP_MESSAGE_EVENT_MESSAGE,
- _future_dispatch_cb, entry);
- efl_event_callback_add((Eo *)entry->event, EFL_EVENT_DEL,
- _event_del_cb, entry);
- return &entry->base;
- err:
- eina_mempool_free(mp_future_schedule_entry, entry);
- return NULL;
+ if (!loopsched->future_entries)
+ efl_event_callback_array_add((Eo *) loopsched->loop, ecore_future_callbacks(), loopsched);
+
+ loopsched->future_entries = eina_list_append(loopsched->future_entries, entry);
+ return &entry->base;
}
static void
ecore_future_recall(Eina_Future_Schedule_Entry *s_entry)
{
- Eo *msg;
+ Ecore_Future_Schedule_Entry *entry = (Ecore_Future_Schedule_Entry *)s_entry;
+ Efl_Loop_Future_Scheduler *loopsched;
+ Eina_List *lookup;
if (shutting_down) return;
- Ecore_Future_Schedule_Entry *entry = (Ecore_Future_Schedule_Entry *)s_entry;
- EINA_SAFETY_ON_NULL_RETURN(entry->event);
-// XXX:
-// ecore_event_del(entry->event);
- msg = entry->event;
+
+ loopsched = (Efl_Loop_Future_Scheduler *) entry->base.scheduler;
+
+ lookup = eina_list_data_find_list(loopsched->future_entries, entry);
+ if (!lookup) return;
+
+ loopsched->future_entries = eina_list_remove_list(loopsched->future_entries, lookup);
+ if (!loopsched->future_entries)
+ efl_event_callback_array_del((Eo *) loopsched->loop, ecore_future_callbacks(), loopsched);
+
eina_value_flush(&entry->value);
- entry->event = NULL;
- efl_del(msg);
+ eina_mempool_free(mp_future_schedule_entry, entry);
+
}
static Eina_Future_Scheduler ecore_future_scheduler = {
diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index 7ca179a482..69e80dafbf 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -260,6 +260,15 @@ _ecore_exe_thread_procedure(LPVOID data EINA_UNUSED)
return 1;
}
+static DWORD __stdcall
+_ecore_exe_exit_process(void *data)
+{
+ UINT *code;
+ code = (UINT *)data;
+ ExitProcess(*code);
+ return 1;
+}
+
static BOOL CALLBACK
_ecore_exe_enum_windows_procedure(HWND window,
LPARAM data)
@@ -267,6 +276,7 @@ _ecore_exe_enum_windows_procedure(HWND window,
Ecore_Exe *obj = (Ecore_Exe *) data;
Ecore_Exe_Data *exe = efl_data_scope_get(obj, ECORE_EXE_CLASS);
DWORD thread_id;
+ UINT code = 0;
if (!exe) return EINA_FALSE;
thread_id = GetWindowThreadProcessId(window, NULL);
@@ -295,7 +305,8 @@ _ecore_exe_enum_windows_procedure(HWND window,
/* Exit process */
if (CreateRemoteThread(exe->process, NULL, 0,
- (LPTHREAD_START_ROUTINE)ExitProcess, NULL,
+ (LPTHREAD_START_ROUTINE)_ecore_exe_exit_process,
+ &code,
0, NULL))
return EINA_FALSE;
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index 2022526182..9bd3c3eb0e 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -109,6 +109,8 @@ struct _Efl_Loop_Future_Scheduler
Eina_Future_Scheduler eina_future_scheduler;
const Eo *loop;
Efl_Loop_Data *loop_data;
+
+ Eina_List *future_entries;
};
struct _Efl_Loop_Data
diff --git a/src/lib/ecore/efl_boolean_model.c b/src/lib/ecore/efl_boolean_model.c
index da9d3bdf96..03e0cee346 100644
--- a/src/lib/ecore/efl_boolean_model.c
+++ b/src/lib/ecore/efl_boolean_model.c
@@ -32,9 +32,13 @@ static Eina_Iterator *
_efl_boolean_model_efl_model_properties_get(const Eo *obj,
Efl_Boolean_Model_Data *pd)
{
+ Eina_Iterator *properties = NULL;
+
+ if (pd->parent)
+ properties = eina_hash_iterator_key_new(pd->parent->values);
EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(props,
obj, EFL_BOOLEAN_MODEL_CLASS,
- eina_hash_iterator_key_new(pd->parent->values));
+ properties);
return props;
}
@@ -207,4 +211,121 @@ _efl_boolean_model_boolean_del(Eo *obj EINA_UNUSED,
eina_stringshare_del(s);
}
+typedef struct _Eina_Iterator_Boolean Eina_Iterator_Boolean;
+
+struct _Eina_Iterator_Boolean
+{
+ Eina_Iterator iterator;
+
+ Eo *obj;
+ Efl_Boolean_Model_Data *pd;
+ Efl_Boolean_Model_Value *v;
+
+ uint64_t index;
+ uint64_t total;
+
+ Eina_Bool request;
+};
+
+static inline Eina_Bool
+_lookup_next_chunk(uint64_t *index, uint64_t total,
+ Efl_Boolean_Model_Value *v, unsigned char pattern)
+{
+ uint64_t upidx = *index >> 3;
+
+ while (upidx < v->buffer_count &&
+ v->buffer[upidx] == pattern)
+ upidx++;
+
+ *index = upidx << 3;
+ if (upidx == v->buffer_count &&
+ *index >= total) return EINA_FALSE;
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+efl_boolean_model_iterator_next(Eina_Iterator_Boolean *it, void **data)
+{
+ uint64_t upidx;
+
+ *data = &it->index;
+ it->index++;
+
+ retry:
+ if (it->index >= it->total) return EINA_FALSE;
+ if ((it->index >> 3) >= it->v->buffer_count)
+ {
+ if (it->v->default_value != it->request)
+ return EINA_FALSE;
+ return EINA_TRUE;
+ }
+
+ upidx = it->index >> 3;
+ while ((it->index >> 3) == upidx)
+ {
+ Eina_Bool flag = it->v->buffer[it->index >> 3] &
+ (((unsigned char)1) << (it->index & 0x7));
+
+ if (it->request == !!flag)
+ break;
+
+ it->index++;
+ }
+
+ if ((it->index >> 3) != upidx)
+ {
+ if (!_lookup_next_chunk(&it->index, it->total, it->v, it->request ? 0x00 : 0xFF))
+ return EINA_FALSE;
+ goto retry;
+ }
+
+ return EINA_TRUE;
+}
+
+static Eo *
+efl_boolean_model_iterator_get_container(Eina_Iterator_Boolean *it)
+{
+ return it->obj;
+}
+
+static void
+efl_boolean_model_iterator_free(Eina_Iterator_Boolean *it)
+{
+ efl_unref(it->obj);
+ EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_NONE);
+ free(it);
+}
+
+static Eina_Iterator *
+_efl_boolean_model_boolean_iterator_get(Eo *obj, Efl_Boolean_Model_Data *pd, const char *name, Eina_Bool request)
+{
+ Eina_Iterator_Boolean *itb;
+ Efl_Boolean_Model_Value *v;
+ Eina_Stringshare *s;
+
+ s = eina_stringshare_add(name);
+ v = eina_hash_find(pd->values, s);
+ eina_stringshare_del(s);
+ if (!v) return NULL;
+
+ itb = calloc(1, sizeof (Eina_Iterator_Boolean));
+ if (!itb) return NULL;
+
+ itb->obj = efl_ref(obj);
+ itb->pd = pd;
+ itb->v = v;
+ itb->index = 0;
+ itb->total = efl_model_children_count_get(obj);
+ itb->request = !!request;
+
+ itb->iterator.version = EINA_ITERATOR_VERSION;
+ itb->iterator.next = FUNC_ITERATOR_NEXT(efl_boolean_model_iterator_next);
+ itb->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(efl_boolean_model_iterator_get_container);
+ itb->iterator.free = FUNC_ITERATOR_FREE(efl_boolean_model_iterator_free);
+
+ EINA_MAGIC_SET(&itb->iterator, EINA_MAGIC_ITERATOR);
+ return &itb->iterator;
+}
+
+
#include "efl_boolean_model.eo.c"
diff --git a/src/lib/ecore/efl_boolean_model.eo b/src/lib/ecore/efl_boolean_model.eo
index 19f8f02935..049344d2bb 100644
--- a/src/lib/ecore/efl_boolean_model.eo
+++ b/src/lib/ecore/efl_boolean_model.eo
@@ -15,6 +15,14 @@ class @beta Efl.Boolean_Model extends Efl.Composite_Model
@in name: string;
}
}
+ boolean_iterator_get {
+ [[Get an iterator that will quickly find all the index with the requested value for a specific boolean.]]
+ params {
+ @in name: string;
+ @in request: bool;
+ }
+ return: iterator<ptr(uint64)>; [[The iterator that is valid until any change is made on the model.]]
+ }
}
implements {
Efl.Model.properties { get; }
diff --git a/src/lib/ecore/efl_composite_model.c b/src/lib/ecore/efl_composite_model.c
index 668b382dfb..630d08edf7 100644
--- a/src/lib/ecore/efl_composite_model.c
+++ b/src/lib/ecore/efl_composite_model.c
@@ -8,10 +8,9 @@
#include "ecore_private.h"
+#include "efl_composite_model_private.h"
#include "efl_composite_model.eo.h"
-#define _CHILD_INDEX "child.index"
-
typedef struct _Efl_Composite_Model_Data Efl_Composite_Model_Data;
struct _Efl_Composite_Model_Data
@@ -47,23 +46,6 @@ _children_indexed_key(const Efl_Composite_Model_Data *node,
}
static void
-_efl_composite_model_efl_object_destructor(Eo *obj, Efl_Composite_Model_Data *pd)
-{
- if (pd->source)
- {
- efl_event_callback_forwarder_del(pd->source, EFL_MODEL_EVENT_CHILD_ADDED, obj);
- efl_event_callback_forwarder_del(pd->source, EFL_MODEL_EVENT_CHILD_REMOVED, obj);
- efl_event_callback_forwarder_del(pd->source, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, obj);
- efl_event_callback_forwarder_del(pd->source, EFL_MODEL_EVENT_PROPERTIES_CHANGED, obj);
-
- efl_unref(pd->source);
- pd->source = NULL;
- }
-
- efl_destructor(efl_super(obj, EFL_COMPOSITE_MODEL_CLASS));
-}
-
-static void
_efl_composite_model_efl_object_invalidate(Eo *obj, Efl_Composite_Model_Data *pd)
{
if (pd->inserted)
@@ -148,7 +130,7 @@ _efl_composite_model_index_get(const Eo *obj, Efl_Composite_Model_Data *pd)
if (pd->need_index)
return 0xFFFFFFFF;
- fetch = efl_model_property_get(obj, _CHILD_INDEX);
+ fetch = efl_model_property_get(obj, EFL_COMPOSITE_MODEL_CHILD_INDEX);
if (!eina_value_uint_convert(fetch, &r))
return 0xFFFFFFFF;
eina_value_free(fetch);
@@ -157,6 +139,43 @@ _efl_composite_model_index_get(const Eo *obj, Efl_Composite_Model_Data *pd)
}
static void
+_efl_composite_model_child_added(void *data, const Efl_Event *event)
+{
+ Efl_Composite_Model_Data *pd = data;
+ Efl_Model_Children_Event *ev = event->info;
+ Efl_Model_Children_Event cev = { 0 };
+
+ cev.index = ev->index;
+ if (ev->child)
+ cev.child = _efl_composite_lookup(efl_class_get(pd->self),
+ pd->self, ev->child, ev->index);
+ efl_event_callback_call(pd->self, EFL_MODEL_EVENT_CHILD_ADDED, &cev);
+
+ efl_unref(cev.child);
+}
+
+static void
+_efl_composite_model_child_removed(void *data, const Efl_Event *event)
+{
+ Efl_Composite_Model_Data *pd = data;
+ Efl_Model_Children_Event *ev = event->info;
+ Efl_Model_Children_Event cev = { 0 };
+
+ cev.index = ev->index;
+ if (ev->child)
+ cev.child = _efl_composite_lookup(efl_class_get(pd->self),
+ pd->self, ev->child, ev->index);
+
+ efl_event_callback_call(pd->self, EFL_MODEL_EVENT_CHILD_REMOVED, &cev);
+
+ efl_unref(cev.child);
+}
+
+EFL_CALLBACKS_ARRAY_DEFINE(composite_callbacks,
+ { EFL_MODEL_EVENT_CHILD_ADDED, _efl_composite_model_child_added },
+ { EFL_MODEL_EVENT_CHILD_REMOVED, _efl_composite_model_child_removed });
+
+static void
_efl_composite_model_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Composite_Model_Data *pd, Efl_Model *model)
{
Eina_Iterator *properties;
@@ -169,8 +188,7 @@ _efl_composite_model_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Composite_Mo
}
pd->source = efl_ref(model);
- efl_event_callback_forwarder_priority_add(model, EFL_MODEL_EVENT_CHILD_ADDED, EFL_CALLBACK_PRIORITY_BEFORE, obj);
- efl_event_callback_forwarder_priority_add(model, EFL_MODEL_EVENT_CHILD_REMOVED, EFL_CALLBACK_PRIORITY_BEFORE, obj);
+ efl_event_callback_array_add(model, composite_callbacks(), pd);
efl_event_callback_forwarder_priority_add(model, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, EFL_CALLBACK_PRIORITY_BEFORE, obj);
efl_event_callback_forwarder_priority_add(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, EFL_CALLBACK_PRIORITY_BEFORE, obj);
@@ -179,7 +197,7 @@ _efl_composite_model_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Composite_Mo
properties = efl_model_properties_get(pd->source);
EINA_ITERATOR_FOREACH(properties, property)
{
- if (!strcmp(property, _CHILD_INDEX))
+ if (!strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
{
pd->need_index = EINA_FALSE;
break;
@@ -198,7 +216,7 @@ static Eina_Future *
_efl_composite_model_efl_model_property_set(Eo *obj, Efl_Composite_Model_Data *pd,
const char *property, Eina_Value *value)
{
- if (pd->need_index && !strcmp(property, _CHILD_INDEX))
+ if (pd->need_index && !strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
{
if (pd->set_index || !pd->source)
return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
@@ -214,7 +232,7 @@ static Eina_Value *
_efl_composite_model_efl_model_property_get(const Eo *obj EINA_UNUSED, Efl_Composite_Model_Data *pd,
const char *property)
{
- if (pd->need_index && !strcmp(property, _CHILD_INDEX))
+ if (pd->need_index && !strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
{
if (pd->set_index)
return eina_value_uint_new(pd->index);
@@ -229,7 +247,7 @@ _efl_composite_model_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Com
if (pd->need_index)
{
static const char *composite_properties[] = {
- _CHILD_INDEX
+ EFL_COMPOSITE_MODEL_CHILD_INDEX
};
return eina_multi_iterator_new(efl_model_properties_get(pd->source),
@@ -267,12 +285,9 @@ _efl_composite_model_then(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
{
Eo *composite;
- // First set the Model to be used as a source so that we the newly object
- // can know if it needs to retain the information regarding its index.
- composite = efl_add_ref(req->self, req->parent,
- efl_ui_view_model_set(efl_added, target),
- efl_composite_model_index_set(efl_added, req->start + i),
- efl_loop_model_volatile_make(efl_added));
+ // Fetch an existing composite model for this model or create a new one if none exist
+ composite = _efl_composite_lookup(req->self, req->parent, target, req->start + i);
+ if (!composite) continue;
eina_value_array_append(&r, composite);
// Dropping this scope reference
@@ -393,4 +408,20 @@ _efl_composite_model_efl_model_child_del(Eo *obj EINA_UNUSED,
efl_model_child_del(pd->source, child);
}
+static void
+_efl_composite_model_efl_object_destructor(Eo *obj, Efl_Composite_Model_Data *pd)
+{
+ if (pd->source)
+ {
+ efl_event_callback_array_del(pd->source, composite_callbacks(), pd);
+ efl_event_callback_forwarder_del(pd->source, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, obj);
+ efl_event_callback_forwarder_del(pd->source, EFL_MODEL_EVENT_PROPERTIES_CHANGED, obj);
+
+ efl_unref(pd->source);
+ pd->source = NULL;
+ }
+
+ efl_destructor(efl_super(obj, EFL_COMPOSITE_MODEL_CLASS));
+}
+
#include "efl_composite_model.eo.c"
diff --git a/src/lib/ecore/efl_composite_model_private.h b/src/lib/ecore/efl_composite_model_private.h
index c9e3783b9d..67862f968c 100644
--- a/src/lib/ecore/efl_composite_model_private.h
+++ b/src/lib/ecore/efl_composite_model_private.h
@@ -1,3 +1,7 @@
+#ifndef EFL_COMPOSITE_MODEL_PRIVATE_H_
+# define EFL_COMPOSITE_MODEL_PRIVATE_H_
+
+#define EFL_COMPOSITE_MODEL_CHILD_INDEX "child.index"
#define EFL_COMPOSITE_MODEL_PROPERTIES(name, dyn, sta, ...) \
EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(name, NULL, NULL, (dyn), sta, ##__VA_ARGS__)
@@ -36,3 +40,35 @@ _efl_composite_model_properties_mix(Eina_Iterator *super, Eina_Iterator *dyn, Ei
};
}
+#define EFL_COMPOSITE_LOOKUP_RETURN(Remember, Parent, View, Base) \
+ Efl_Model *Remember; \
+ char buf[1024]; \
+ \
+ snprintf(buf, sizeof (buf), Base"-%p", Parent); \
+ Remember = efl_key_wref_get(View, buf); \
+ if (Remember) \
+ { \
+ efl_ref(Remember); \
+ return Remember; \
+ }
+
+#define EFL_COMPOSITE_REMEMBER_RETURN(Remember, View) \
+ efl_key_wref_set(View, buf, Remember); \
+ return Remember;
+
+
+static inline Efl_Model *
+_efl_composite_lookup(const Efl_Class *self, Eo *parent, Efl_Model *view, unsigned int index)
+{
+ EFL_COMPOSITE_LOOKUP_RETURN(remember, parent, view, "_efl.composite_model");
+
+ remember = efl_add_ref(self, parent,
+ efl_ui_view_model_set(efl_added, view),
+ efl_composite_model_index_set(efl_added, index),
+ efl_loop_model_volatile_make(efl_added));
+ if (!remember) return NULL;
+
+ EFL_COMPOSITE_REMEMBER_RETURN(remember, view);
+}
+
+#endif
diff --git a/src/lib/ecore/efl_core_command_line.c b/src/lib/ecore/efl_core_command_line.c
index 1c084030f1..64de7a9766 100644
--- a/src/lib/ecore/efl_core_command_line.c
+++ b/src/lib/ecore/efl_core_command_line.c
@@ -215,6 +215,7 @@ _efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_L
{
char *content = eina_array_data_get(array, i);
char *param = calloc(1, strlen(content) + 1);
+ char *esc;
if (!param)
{
@@ -236,7 +237,9 @@ _efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_L
//build the command
if (i != 0)
eina_strbuf_append(command, " ");
- eina_strbuf_append(command, _escape(content));
+ esc = _escape(content);
+ eina_strbuf_append(command, esc);
+ free(esc);
//convert string to stringshare
strcpy(param, content);
_remove_invalid_chars(param);
diff --git a/src/lib/ecore/efl_core_proc_env.eo b/src/lib/ecore/efl_core_proc_env.eo
index 07840548dd..2641105338 100644
--- a/src/lib/ecore/efl_core_proc_env.eo
+++ b/src/lib/ecore/efl_core_proc_env.eo
@@ -1,6 +1,6 @@
class @beta Efl.Core.Proc_Env extends Efl.Core.Env
{
- eo_prefix : efl_env;
+ c_prefix: efl_env;
methods {
self @class {
[[Get a instance of this object
diff --git a/src/lib/ecore/efl_filter_model.c b/src/lib/ecore/efl_filter_model.c
new file mode 100644
index 0000000000..9f2511cfa0
--- /dev/null
+++ b/src/lib/ecore/efl_filter_model.c
@@ -0,0 +1,569 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <Efl_Core.h>
+
+#include "efl_composite_model_private.h"
+
+typedef struct _Efl_Filter_Model_Mapping Efl_Filter_Model_Mapping;
+struct _Efl_Filter_Model_Mapping
+{
+ EINA_RBTREE;
+
+ uint64_t original;
+ uint64_t mapped;
+
+ EINA_REFCOUNT;
+};
+
+typedef struct _Efl_Filter_Model_Data Efl_Filter_Model_Data;
+struct _Efl_Filter_Model_Data
+{
+ Efl_Filter_Model_Mapping *self;
+
+ Eina_Rbtree *mapping;
+
+ struct {
+ void *data;
+ EflFilterModel cb;
+ Eina_Free_Cb free_cb;
+ uint64_t count;
+ } filter;
+
+ uint64_t counted;
+ Eina_Bool counting_started : 1;
+ Eina_Bool processed : 1;
+};
+
+static Eina_Rbtree_Direction
+_filter_mapping_cmp_cb(const Eina_Rbtree *left, const Eina_Rbtree *right, void *data EINA_UNUSED)
+{
+ const Efl_Filter_Model_Mapping *l, *r;
+
+ l = (const Efl_Filter_Model_Mapping *) left;
+ r = (const Efl_Filter_Model_Mapping *) right;
+
+ if (l->mapped < r->mapped)
+ return EINA_RBTREE_LEFT;
+ return EINA_RBTREE_RIGHT;
+}
+
+static int
+_filter_mapping_looking_cb(const Eina_Rbtree *node, const void *key,
+ int length EINA_UNUSED, void *data EINA_UNUSED)
+{
+ const Efl_Filter_Model_Mapping *n = (const Efl_Filter_Model_Mapping *) node;
+ const uint64_t *k = key;
+
+ return n->mapped - *k;
+}
+
+static void
+_efl_filter_model_filter_set(Eo *obj EINA_UNUSED, Efl_Filter_Model_Data *pd,
+ void *filter_data, EflFilterModel filter, Eina_Free_Cb filter_free_cb)
+{
+ if (pd->filter.cb)
+ pd->filter.free_cb(pd->filter.data);
+ pd->filter.data = filter_data;
+ pd->filter.cb = filter;
+ pd->filter.free_cb = filter_free_cb;
+}
+
+static void
+_rbtree_free_cb(Eina_Rbtree *node, void *data EINA_UNUSED)
+{
+ Efl_Filter_Model_Mapping *m = (Efl_Filter_Model_Mapping*) node;
+
+ EINA_REFCOUNT_UNREF(m)
+ free(m);
+}
+
+typedef struct _Efl_Filter_Request Efl_Filter_Request;
+struct _Efl_Filter_Request
+{
+ Efl_Filter_Model_Data *pd;
+ Efl_Model *parent;
+ Efl_Model *child;
+ uint64_t index;
+};
+
+static Efl_Filter_Model *
+_efl_filter_lookup(const Efl_Class *klass,
+ Efl_Model *parent, Efl_Model *view,
+ Efl_Filter_Model_Mapping *mapping)
+{
+ Efl_Filter_Model *child;
+ Efl_Filter_Model_Data *cpd;
+
+ child = _efl_composite_lookup(klass, parent, view, mapping->mapped);
+ if (!child) return NULL;
+
+ cpd = efl_data_scope_get(child, EFL_FILTER_MODEL_CLASS);
+ cpd->processed = EINA_TRUE;
+ cpd->self = mapping;
+ EINA_REFCOUNT_REF(mapping);
+
+ return child;
+}
+
+static Eina_Value
+_efl_filter_model_filter(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
+{
+ Efl_Filter_Model_Mapping *mapping;
+ Efl_Filter_Model *child;
+ Efl_Model_Children_Event cevt = { 0 };
+ Efl_Filter_Request *r = data;
+ Eina_Value ret = v;
+ Eina_Bool result = EINA_FALSE;
+
+ if (!eina_value_bool_get(&v, &result)) goto end;
+ if (!result) goto end;
+
+ mapping = calloc(1, sizeof (Efl_Filter_Model_Mapping));
+ if (!mapping)
+ {
+ ret = eina_value_bool_init(EINA_FALSE);
+ goto end;
+ }
+ EINA_REFCOUNT_INIT(mapping);
+
+ mapping->original = r->index;
+ mapping->mapped = r->pd->filter.count++;
+
+ r->pd->mapping = eina_rbtree_inline_insert(r->pd->mapping, EINA_RBTREE_GET(mapping),
+ _filter_mapping_cmp_cb, NULL);
+
+ child = _efl_filter_lookup(efl_class_get(r->parent), r->parent, r->child, mapping);
+ if (!child) goto end;
+
+ cevt.index = mapping->mapped;
+ cevt.child = child;
+
+ efl_event_callback_call(r->parent, EFL_MODEL_EVENT_CHILD_ADDED, &cevt);
+ efl_event_callback_call(r->parent, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
+
+ efl_unref(cevt.child);
+
+ ret = eina_value_bool_init(EINA_TRUE);
+
+ end:
+ return ret;
+}
+
+static void
+_efl_filter_model_filter_clean(Eo *o EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED)
+{
+ Efl_Filter_Request *r = data;
+
+ efl_unref(r->parent);
+ efl_unref(r->child);
+ free(r);
+}
+
+static Eina_Value
+_efl_filter_model_child_fetch(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
+{
+ Efl_Filter_Request *r = data;
+ unsigned int i, len;
+ Eina_Future *f;
+ Eo *target = NULL;
+
+ // Get the first and only child in the array
+ EINA_VALUE_ARRAY_FOREACH(&v, len, i, target)
+ break;
+
+ r->child = efl_ref(target);
+
+ f = r->pd->filter.cb(r->pd->filter.data, r->parent, r->child);
+ f = efl_future_then(r->parent, f,
+ .success = _efl_filter_model_filter,
+ .success_type = EINA_VALUE_TYPE_BOOL,
+ .free = _efl_filter_model_filter_clean,
+ .data = r);
+ return eina_future_as_value(f);
+}
+
+static Eina_Value
+_efl_filter_model_child_error(Eo *o, void *data, Eina_Error err)
+{
+ _efl_filter_model_filter_clean(o, data, NULL);
+ return eina_value_error_init(err);
+}
+
+static void
+_efl_filter_model_child_added(void *data, const Efl_Event *event)
+{
+ Efl_Filter_Model_Data *pd = data;
+ Efl_Model_Children_Event *ev = event->info;
+ Efl_Model *child = ev->child;
+ Efl_Filter_Request *r;
+ Eina_Future *f;
+
+ if (child)
+ {
+ Efl_Filter_Model_Data *cpd = efl_data_scope_get(child, EFL_FILTER_MODEL_CLASS);
+
+ if (cpd->processed) return ;
+ }
+
+ r = calloc(1, sizeof (Efl_Filter_Request));
+ if (!r) return ;
+
+ r->pd = pd;
+ r->index = ev->index;
+ r->parent = efl_ref(event->object);
+
+ if (!child)
+ {
+ f = efl_model_children_slice_get(efl_ui_view_model_get(r->parent), r->index, 1);
+ f = efl_future_then(event->object, f,
+ .success = _efl_filter_model_child_fetch,
+ .success_type = EINA_VALUE_TYPE_ARRAY,
+ .error = _efl_filter_model_child_error,
+ .data = r);
+ return ;
+ }
+
+ r->child = efl_ref(child);
+
+ f = pd->filter.cb(pd->filter.data, r->parent, r->child);
+ f = efl_future_then(event->object, f,
+ .success = _efl_filter_model_filter,
+ .success_type = EINA_VALUE_TYPE_BOOL,
+ .free = _efl_filter_model_filter_clean,
+ .data = r);
+
+ efl_event_callback_stop(event->object);
+}
+
+static void
+_efl_filter_model_child_removed(void *data, const Efl_Event *event)
+{
+ Efl_Filter_Model_Mapping *mapping;
+ Efl_Filter_Model_Data *pd = data;
+ Efl_Model_Children_Event *ev = event->info;
+ uint64_t removed = ev->index;
+
+ mapping = (void *)eina_rbtree_inline_lookup(pd->mapping,
+ &removed, sizeof (uint64_t),
+ _filter_mapping_looking_cb, NULL);
+ if (!mapping) return;
+
+ pd->mapping = eina_rbtree_inline_remove(pd->mapping, EINA_RBTREE_GET(mapping),
+ _filter_mapping_cmp_cb, NULL);
+
+ EINA_REFCOUNT_UNREF(mapping)
+ free(mapping);
+
+ // Update the tree for the index to reflect the removed child
+ for (removed++; removed < pd->filter.count; removed++)
+ {
+ mapping = (void *)eina_rbtree_inline_lookup(pd->mapping,
+ &removed, sizeof (uint64_t),
+ _filter_mapping_looking_cb, NULL);
+ if (!mapping) continue;
+
+ pd->mapping = eina_rbtree_inline_remove(pd->mapping, EINA_RBTREE_GET(mapping),
+ _filter_mapping_cmp_cb, NULL);
+ mapping->mapped--;
+ pd->mapping = eina_rbtree_inline_insert(pd->mapping, EINA_RBTREE_GET(mapping),
+ _filter_mapping_cmp_cb, NULL);
+ }
+ pd->filter.count--;
+ pd->counted--;
+}
+
+EFL_CALLBACKS_ARRAY_DEFINE(filters_callbacks,
+ { EFL_MODEL_EVENT_CHILD_ADDED, _efl_filter_model_child_added },
+ { EFL_MODEL_EVENT_CHILD_REMOVED, _efl_filter_model_child_removed });
+
+static void
+_efl_filter_model_efl_object_destructor(Eo *obj, Efl_Filter_Model_Data *pd)
+{
+ eina_rbtree_delete(pd->mapping, _rbtree_free_cb, NULL);
+
+ if (pd->self)
+ {
+ EINA_REFCOUNT_UNREF(pd->self)
+ free(pd->self);
+ }
+ pd->self = NULL;
+
+ efl_destructor(efl_super(obj, EFL_FILTER_MODEL_CLASS));
+}
+
+static Eina_Value
+_filter_remove_array(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
+{
+ Efl_Filter_Model_Mapping *mapping = data;
+ unsigned int i, len;
+ Eo *target = NULL;
+
+ EINA_VALUE_ARRAY_FOREACH(&v, len, i, target)
+ break;
+
+ if (efl_isa(target, EFL_FILTER_MODEL_CLASS))
+ {
+ Efl_Filter_Model_Data *pd = efl_data_scope_get(target, EFL_FILTER_MODEL_CLASS);
+
+ pd->self = mapping;
+ EINA_REFCOUNT_REF(pd->self);
+ }
+
+ return eina_value_object_init(target);
+}
+
+/* Result from eina_future_all_array is an EINA_VALUE_TYPE_ARRAY that contain Eina_Value of
+ Eo Model. It is expected that children slice get return an EINA_VALUE_TYPE_ARRAY that
+ contain Eo Model directly.
+*/
+static Eina_Value
+_filter_cleanup_array(Eo *o EINA_UNUSED, void *data EINA_UNUSED, const Eina_Value v)
+{
+ unsigned int i, len;
+ Eina_Value created = EINA_VALUE_EMPTY;
+ Eina_Value r = EINA_VALUE_EMPTY;
+
+ eina_value_array_setup(&r, EINA_VALUE_TYPE_OBJECT, 4);
+
+ EINA_VALUE_ARRAY_FOREACH(&v, len, i, created)
+ {
+ Eo *target = NULL;
+
+ if (eina_value_type_get(&created) != EINA_VALUE_TYPE_OBJECT)
+ goto on_error;
+
+ target = eina_value_object_get(&created);
+ if (!target) goto on_error;
+
+ eina_value_array_append(&r, target);
+ }
+
+ return r;
+
+ on_error:
+ eina_value_flush(&r);
+ return eina_value_error_init(EFL_MODEL_ERROR_UNKNOWN);
+}
+
+static Eina_Future *
+_efl_filter_model_efl_model_children_slice_get(Eo *obj, Efl_Filter_Model_Data *pd,
+ unsigned int start, unsigned int count)
+{
+ Efl_Filter_Model_Mapping **mapping = NULL;
+ Eina_Future **r = NULL;
+ Eina_Future *f;
+ unsigned int i;
+ Eina_Error err = ENOMEM;
+
+ if ((uint64_t) start + (uint64_t) count > pd->filter.count)
+ return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_INCORRECT_VALUE);
+ if (count == 0)
+ return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_INCORRECT_VALUE);
+
+ r = malloc((count + 1) * sizeof (Eina_Future *));
+ if (!r) return efl_loop_future_rejected(obj, ENOMEM);
+
+ mapping = calloc(count, sizeof (Efl_Filter_Model_Mapping *));
+ if (!mapping) goto on_error;
+
+ for (i = 0; i < count; i++)
+ {
+ uint64_t lookup = start + i;
+
+ mapping[i] = (void *)eina_rbtree_inline_lookup(pd->mapping,
+ &lookup, sizeof (uint64_t),
+ _filter_mapping_looking_cb, NULL);
+ if (!mapping[i]) goto on_error;
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ r[i] = efl_model_children_slice_get(efl_super(obj, EFL_FILTER_MODEL_CLASS),
+ mapping[i]->original, 1);
+ r[i] = efl_future_then(obj, r[i], .success_type = EINA_VALUE_TYPE_ARRAY,
+ .success = _filter_remove_array,
+ .data = mapping[i]);
+ if (!r) goto on_error;
+ }
+ r[i] = EINA_FUTURE_SENTINEL;
+
+ f = efl_future_then(obj, eina_future_all_array(r), .success = _filter_cleanup_array);
+ free(r);
+ free(mapping);
+
+ return f;
+
+ on_error:
+ free(mapping);
+
+ if (r)
+ for (i = 0; i < count; i ++)
+ if (r[i]) eina_future_cancel(r[i]);
+ free(r);
+
+ return efl_loop_future_rejected(obj, err);
+}
+
+typedef struct _Efl_Filter_Model_Result Efl_Filter_Model_Result;
+struct _Efl_Filter_Model_Result
+{
+ Efl_Filter_Model_Data *pd;
+ uint64_t count;
+ Efl_Model *targets[1];
+};
+
+// This future receive an array of boolean that indicate if a fetched object is to be kept
+static Eina_Value
+_efl_filter_model_array_result_request(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
+{
+ Efl_Filter_Model_Result *req = data;
+ Efl_Filter_Model_Data *pd = req->pd;
+ unsigned int i, len;
+ Eina_Value request = EINA_VALUE_EMPTY;
+ uint64_t pcount = pd->filter.count;
+
+ EINA_VALUE_ARRAY_FOREACH(&v, len, i, request)
+ {
+ Efl_Filter_Model_Mapping *mapping;
+ Efl_Model_Children_Event cevt = { 0 };
+ Eina_Bool b;
+
+ if (eina_value_type_get(&request) != EINA_VALUE_TYPE_BOOL)
+ continue ;
+
+ if (!eina_value_bool_get(&request, &b)) continue;
+ if (!b) continue;
+
+ mapping = calloc(1, sizeof (Efl_Filter_Model_Mapping));
+ if (!mapping) continue;
+
+ EINA_REFCOUNT_INIT(mapping);
+ mapping->original = i;
+ mapping->mapped = pd->filter.count++;
+
+ // Insert in tree here
+ pd->mapping = eina_rbtree_inline_insert(pd->mapping, EINA_RBTREE_GET(mapping),
+ _filter_mapping_cmp_cb, NULL);
+
+ cevt.index = mapping->mapped;
+ cevt.child = _efl_filter_lookup(efl_class_get(o), o, req->targets[i], mapping);
+ if (!cevt.child) continue;
+
+ efl_event_callback_call(o, EFL_MODEL_EVENT_CHILD_ADDED, &cevt);
+ efl_unref(cevt.child);
+ }
+
+ if (pcount != pd->filter.count)
+ efl_event_callback_call(o, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
+
+ return v;
+}
+
+static void
+_efl_filter_model_array_result_free(Eo *o EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED)
+{
+ Efl_Filter_Model_Result *req = data;
+ uint64_t i;
+
+ for (i = 0; i < req->count; i++)
+ efl_unref(req->targets[i]);
+ free(req);
+}
+
+// This future receive an array of children object
+static Eina_Value
+_efl_filter_model_array_fetch(Eo *o, void *data, const Eina_Value v)
+{
+ Efl_Filter_Model_Result *req;
+ Efl_Filter_Model_Data *pd = data;
+ unsigned int i, len;
+ Eo *target = NULL;
+ Eina_Future **array = NULL;
+ Eina_Future *r;
+ Eina_Value res = v;
+
+ if (!eina_value_array_count(&v)) return v;
+
+ array = malloc((eina_value_array_count(&v) + 1) * sizeof (Eina_Future*));
+ if (!array) return eina_value_error_init(ENOMEM);
+
+ req = malloc(sizeof (Efl_Filter_Model_Result) +
+ sizeof (Eo*) * (eina_value_array_count(&v) - 1));
+ if (!req)
+ {
+ res = eina_value_error_init(ENOMEM);
+ goto on_error;
+ }
+
+ req->pd = pd;
+ req->count = eina_value_array_count(&v);
+
+ EINA_VALUE_ARRAY_FOREACH(&v, len, i, target)
+ {
+ array[i] = pd->filter.cb(pd->filter.data, o, target);
+ req->targets[i] = efl_ref(target);
+ }
+
+ array[i] = EINA_FUTURE_SENTINEL;
+
+ r = eina_future_all_array(array);
+ r = efl_future_then(o, r, .success_type = EINA_VALUE_TYPE_ARRAY,
+ .success = _efl_filter_model_array_result_request,
+ .free = _efl_filter_model_array_result_free,
+ .data = req);
+ res = eina_future_as_value(r);
+
+ on_error:
+ free(array);
+
+ return res;
+}
+
+static unsigned int
+_efl_filter_model_efl_model_children_count_get(const Eo *obj, Efl_Filter_Model_Data *pd)
+{
+ if (!pd->counting_started && pd->filter.cb)
+ {
+ pd->counting_started = EINA_TRUE;
+
+ // Start watching for children now
+ efl_event_callback_array_add((Eo *)obj, filters_callbacks(), pd);
+
+ // Start counting (which may trigger filter being added asynchronously)
+ pd->counted = efl_model_children_count_get(efl_super(obj, EFL_FILTER_MODEL_CLASS));
+ if (pd->counted > 0)
+ {
+ Eina_Future *f;
+
+ f = efl_model_children_slice_get(efl_ui_view_model_get(obj), 0, pd->counted);
+ efl_future_then(obj, f, .success_type = EINA_VALUE_TYPE_ARRAY,
+ .success = _efl_filter_model_array_fetch,
+ .data = pd);
+ }
+ }
+
+ return pd->filter.count;
+}
+
+static Eina_Value *
+_efl_filter_model_efl_model_property_get(const Eo *obj, Efl_Filter_Model_Data *pd,
+ const char *property)
+{
+ if (pd->self && !strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
+ {
+ return eina_value_uint64_new(pd->self->mapped);
+ }
+
+ return efl_model_property_get(efl_super(obj, EFL_FILTER_MODEL_CLASS), property);
+}
+
+static unsigned int
+_efl_filter_model_efl_composite_model_index_get(const Eo *obj, Efl_Filter_Model_Data *pd)
+{
+ if (pd->self) return pd->self->mapped;
+ return efl_composite_model_index_get(efl_super(obj, EFL_FILTER_MODEL_CLASS));
+}
+
+#include "efl_filter_model.eo.c"
diff --git a/src/lib/ecore/efl_filter_model.eo b/src/lib/ecore/efl_filter_model.eo
new file mode 100644
index 0000000000..8710707b06
--- /dev/null
+++ b/src/lib/ecore/efl_filter_model.eo
@@ -0,0 +1,31 @@
+function @beta EflFilterModel {
+ [[EflFilterModel function]]
+ params {
+ parent: Efl.Filter_Model; [[This object can be used to know when to cancel the future.]]
+ child: Efl.Model; [[You must reference this object for the duration of your use of it as the caller will not do that for you.]]
+ }
+ return: future<bool>; [[$true if the model should be kept.]]
+};
+
+class @beta Efl.Filter_Model extends Efl.Composite_Model
+{
+ [[Efl model designed to filter its children.]]
+ methods {
+ filter_set {
+ [[Set a filter function that will catch children from the composited model.]]
+ params {
+ filter: EflFilterModel; [[Filter callback]]
+ }
+ }
+ }
+ implements {
+ Efl.Object.destructor;
+ Efl.Model.children_slice_get;
+ Efl.Model.children_count { get; }
+ Efl.Model.property { get; }
+ Efl.Composite_Model.index { get; }
+ }
+ constructors {
+ .filter_set;
+ }
+} \ No newline at end of file
diff --git a/src/lib/ecore/efl_loop_consumer.eo b/src/lib/ecore/efl_loop_consumer.eo
index c5828648b6..c391d29f03 100644
--- a/src/lib/ecore/efl_loop_consumer.eo
+++ b/src/lib/ecore/efl_loop_consumer.eo
@@ -6,7 +6,7 @@ abstract Efl.Loop_Consumer extends Efl.Object
@since 1.22
]]
- eo_prefix: efl_loop;
+ c_prefix: efl_loop;
methods {
@property loop {
[[The loop to which this object belongs to.]]
diff --git a/src/lib/ecore/efl_loop_model.c b/src/lib/ecore/efl_loop_model.c
index 0f212f1283..11f64a7352 100644
--- a/src/lib/ecore/efl_loop_model.c
+++ b/src/lib/ecore/efl_loop_model.c
@@ -97,6 +97,7 @@ _efl_loop_model_efl_model_property_ready_get(Eo *obj, void *pd EINA_UNUSED, cons
efl_event_callback_add(obj,
EFL_MODEL_EVENT_PROPERTIES_CHANGED,
_propagate_future, wd);
+ return efl_future_then(obj, eina_future_new(wd->p));
}
return eina_future_rejected(efl_loop_future_scheduler_get(obj), err);
@@ -125,6 +126,33 @@ _efl_loop_model_volatile_make(Eo *obj, void *pd EINA_UNUSED)
efl_event_callback_add(obj, EFL_EVENT_NOREF, _noref_death, NULL);
}
+static Eina_Future *
+_efl_loop_model_efl_model_property_set(Eo *obj, void *pd EINA_UNUSED,
+ const char *property, Eina_Value *value)
+{
+ Eina_Error err;
+
+ if (!value) return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_INCORRECT_VALUE);
+ err = efl_property_reflection_set(obj, property, *value);
+ if (err) return efl_loop_future_rejected(obj, err);
+
+ return efl_loop_future_resolved(obj, efl_property_reflection_get(obj, property));
+}
+
+static Eina_Value *
+_efl_loop_model_efl_model_property_get(const Eo *obj, void *pd EINA_UNUSED,
+ const char *property)
+{
+ Eina_Value *r;
+ Eina_Value direct;
+
+ direct = efl_property_reflection_get(obj, property);
+ r = eina_value_dup(&direct);
+ eina_value_flush(&direct);
+
+ return r;
+}
+
static void
_efl_loop_model_efl_object_invalidate(Eo *obj, void *pd EINA_UNUSED)
{
diff --git a/src/lib/ecore/efl_loop_model.eo b/src/lib/ecore/efl_loop_model.eo
index 362b8bff09..7d727efbc3 100644
--- a/src/lib/ecore/efl_loop_model.eo
+++ b/src/lib/ecore/efl_loop_model.eo
@@ -14,5 +14,6 @@ abstract @beta Efl.Loop_Model extends Efl.Loop_Consumer implements Efl.Model
implements {
Efl.Object.invalidate;
Efl.Model.property_ready_get;
+ Efl.Model.property { get; set; }
}
}
diff --git a/src/lib/ecore/efl_view_model.c b/src/lib/ecore/efl_view_model.c
index 7bb9a34673..dd3fefaba1 100644
--- a/src/lib/ecore/efl_view_model.c
+++ b/src/lib/ecore/efl_view_model.c
@@ -350,19 +350,14 @@ _efl_view_model_parent_data(Efl_View_Model *child, Efl_View_Model_Data *ppd)
static Efl_View_Model *
_efl_view_model_child_lookup(Efl_View_Model_Data *pd, Efl_Object *parent, Efl_Model *view)
{
- Efl_View_Model *co;
-
- co = efl_key_wref_get(view, "_efl.view_model");
- if (co) return co;
+ EFL_COMPOSITE_LOOKUP_RETURN(co, parent, view, "_efl.view_model");
co = efl_add(EFL_VIEW_MODEL_CLASS, parent,
efl_ui_view_model_set(efl_added, view),
_efl_view_model_parent_data(efl_added, pd));
if (!co) return NULL;
- efl_key_wref_set(view, "_efl.view_model", co);
-
- return co;
+ EFL_COMPOSITE_REMEMBER_RETURN(co, view);
}
static void
diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build
index 64d255fe73..b34276c3cc 100644
--- a/src/lib/ecore/meson.build
+++ b/src/lib/ecore/meson.build
@@ -66,6 +66,7 @@ pub_eo_files = [
'efl_core_proc_env.eo',
'efl_core_command_line.eo',
'efl_loop_timer.eo',
+ 'efl_filter_model.eo',
]
foreach eo_file : pub_eo_files
@@ -145,6 +146,7 @@ ecore_src = [
'efl_model_accessor_view.c',
'efl_model_accessor_view_private.h',
'efl_view_model.c',
+ 'efl_filter_model.c',
'efl_linear_interpolator.c',
'efl_accelerate_interpolator.c',
'efl_decelerate_interpolator.c',
diff --git a/src/lib/ecore_audio/ecore_audio.eo b/src/lib/ecore_audio/ecore_audio.eo
index 93409d21cb..df76e70bbd 100644
--- a/src/lib/ecore_audio/ecore_audio.eo
+++ b/src/lib/ecore_audio/ecore_audio.eo
@@ -16,7 +16,7 @@ abstract @beta Ecore.Audio extends Efl.Object
{
[[Convenience audio class.]]
- eo_prefix: ecore_audio_obj;
+ c_prefix: ecore_audio_obj;
data: Ecore_Audio_Object;
methods {
@property paused {
diff --git a/src/lib/ecore_audio/ecore_audio_in.eo b/src/lib/ecore_audio/ecore_audio_in.eo
index bbee8e1910..4411cc8c45 100644
--- a/src/lib/ecore_audio/ecore_audio_in.eo
+++ b/src/lib/ecore_audio/ecore_audio_in.eo
@@ -1,7 +1,7 @@
class @beta Ecore.Audio.In extends Ecore.Audio
{
[[Ecore Audio input object.]]
- eo_prefix: ecore_audio_obj_in;
+ c_prefix: ecore_audio_obj_in;
event_prefix: ecore_audio_in;
data: Ecore_Audio_Input;
methods {
diff --git a/src/lib/ecore_audio/ecore_audio_in_sndfile.eo b/src/lib/ecore_audio/ecore_audio_in_sndfile.eo
index cb1476029c..10113a4235 100644
--- a/src/lib/ecore_audio/ecore_audio_in_sndfile.eo
+++ b/src/lib/ecore_audio/ecore_audio_in_sndfile.eo
@@ -1,7 +1,7 @@
class @beta Ecore.Audio.In.Sndfile extends Ecore.Audio.In
{
[[Ecore Audio sndfile input.]]
- eo_prefix: ecore_audio_obj_in_sndfile;
+ c_prefix: ecore_audio_obj_in_sndfile;
implements {
Efl.Object.destructor;
Ecore.Audio.source { get; set; }
diff --git a/src/lib/ecore_audio/ecore_audio_in_tone.eo b/src/lib/ecore_audio/ecore_audio_in_tone.eo
index 0fc51c13c5..7844065e6a 100644
--- a/src/lib/ecore_audio/ecore_audio_in_tone.eo
+++ b/src/lib/ecore_audio/ecore_audio_in_tone.eo
@@ -1,7 +1,7 @@
class @beta Ecore.Audio.In.Tone extends Ecore.Audio.In
{
[[Ecore Audio tone input.]]
- eo_prefix: ecore_audio_obj_in_tone;
+ c_prefix: ecore_audio_obj_in_tone;
implements {
Efl.Object.constructor;
Ecore.Audio.In.length { set; }
diff --git a/src/lib/ecore_audio/ecore_audio_out.eo b/src/lib/ecore_audio/ecore_audio_out.eo
index f18dd8dc0e..07fb7b181f 100644
--- a/src/lib/ecore_audio/ecore_audio_out.eo
+++ b/src/lib/ecore_audio/ecore_audio_out.eo
@@ -2,7 +2,7 @@ abstract @beta Ecore.Audio.Out extends Ecore.Audio
{
[[Ecore Audio output object.]]
- eo_prefix: ecore_audio_obj_out;
+ c_prefix: ecore_audio_obj_out;
data: Ecore_Audio_Output;
methods {
input_attach {
diff --git a/src/lib/ecore_audio/ecore_audio_out_pulse.eo b/src/lib/ecore_audio/ecore_audio_out_pulse.eo
index 0729a752e8..d065d2d776 100644
--- a/src/lib/ecore_audio/ecore_audio_out_pulse.eo
+++ b/src/lib/ecore_audio/ecore_audio_out_pulse.eo
@@ -1,7 +1,7 @@
class @beta Ecore.Audio.Out.Pulse extends Ecore.Audio.Out
{
[[Ecore audio ouput for PulseAudio.]]
- eo_prefix: ecore_audio_obj_out_pulse;
+ c_prefix: ecore_audio_obj_out_pulse;
event_prefix: ecore_audio_out_pulse;
implements {
Efl.Object.constructor;
diff --git a/src/lib/ecore_audio/ecore_audio_out_sndfile.eo b/src/lib/ecore_audio/ecore_audio_out_sndfile.eo
index 9b57d83fa4..46e67dc493 100644
--- a/src/lib/ecore_audio/ecore_audio_out_sndfile.eo
+++ b/src/lib/ecore_audio/ecore_audio_out_sndfile.eo
@@ -1,7 +1,7 @@
class @beta Ecore.Audio.Out.Sndfile extends Ecore.Audio.Out
{
[[Ecore audio output to the sndfile library.]]
- eo_prefix: ecore_audio_obj_out_sndfile;
+ c_prefix: ecore_audio_obj_out_sndfile;
implements {
Efl.Object.constructor;
Efl.Object.destructor;
diff --git a/src/lib/ecore_audio/ecore_audio_out_wasapi.eo b/src/lib/ecore_audio/ecore_audio_out_wasapi.eo
index ab50a980b8..2f19880b20 100644
--- a/src/lib/ecore_audio/ecore_audio_out_wasapi.eo
+++ b/src/lib/ecore_audio/ecore_audio_out_wasapi.eo
@@ -1,7 +1,7 @@
class @beta Ecore.Audio.Out.Wasapi extends Ecore.Audio.Out
{
[[Ecore audio ouput for WasapiAudio.]]
- eo_prefix: ecore_audio_obj_out_wasapi;
+ c_prefix: ecore_audio_obj_out_wasapi;
event_prefix: ecore_audio_out_wasapi;
implements {
Efl.Object.constructor;
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_cnp.m b/src/lib/ecore_cocoa/ecore_cocoa_cnp.m
index de9163fa28..c5fd22e99d 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_cnp.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_cnp.m
@@ -112,7 +112,7 @@ ecore_cocoa_clipboard_get(int *size,
NSString *str = [items objectAtIndex: 0];
data = (void *)[str UTF8String];
len = [str lengthOfBytesUsingEncoding: NSUTF8StringEncoding];
- data = strndup((const char *)data, len);
+ data = eina_strndup((const char *)data, len);
if (EINA_UNLIKELY(!data))
{
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index ecf4f4a2bd..843cfa6a2d 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -1179,6 +1179,23 @@ EAPI int ecore_drm2_device_fd_get(Ecore_Drm2_Device *device);
*/
EAPI Eina_Bool ecore_drm2_output_pending_get(Ecore_Drm2_Output *output);
+/**
+ * Set the background color of an output's crtc
+ *
+ * @param output
+ * @param r
+ * @param g
+ * @param b
+ * @param a
+ *
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
+ *
+ * @note This requires support from the video driver in order to function
+ *
+ * @since 1.23
+ */
+EAPI Eina_Bool ecore_drm2_output_background_color_set(Ecore_Drm2_Output *output, uint64_t r, uint64_t g, uint64_t b, uint64_t a);
+
# endif
#endif
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c
index b4ca722b22..b95a5a7d9e 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -266,9 +266,13 @@ _drm2_atomic_state_crtc_fill(Ecore_Drm2_Crtc_State *cstate, int fd)
{
cstate->active.id = prop->prop_id;
cstate->active.value = oprops->prop_values[i];
- DBG("\t\t\tValue: %d", cstate->active.value);
+ DBG("\t\t\tValue: %lu", (long)cstate->active.value);
+ }
+ else if (!strcmp(prop->name, "BACKGROUND_COLOR"))
+ {
+ cstate->background.id = prop->prop_id;
+ cstate->background.value = oprops->prop_values[i];
}
-
cont:
sym_drmModeFreeProperty(prop);
}
@@ -303,13 +307,13 @@ _drm2_atomic_state_conn_fill(Ecore_Drm2_Connector_State *cstate, int fd)
{
cstate->crtc.id = prop->prop_id;
cstate->crtc.value = oprops->prop_values[i];
- DBG("\t\t\tValue: %d", cstate->crtc.value);
+ DBG("\t\t\tValue: %lu", (long)cstate->crtc.value);
}
else if (!strcmp(prop->name, "DPMS"))
{
cstate->dpms.id = prop->prop_id;
cstate->dpms.value = oprops->prop_values[i];
- DBG("\t\t\tValue: %d", cstate->dpms.value);
+ DBG("\t\t\tValue: %lu", (long)cstate->dpms.value);
}
else if (!strcmp(prop->name, "EDID"))
{
@@ -344,13 +348,13 @@ _drm2_atomic_state_conn_fill(Ecore_Drm2_Connector_State *cstate, int fd)
{
cstate->aspect.id = prop->prop_id;
cstate->aspect.value = oprops->prop_values[i];
- DBG("\t\t\tValue: %d", cstate->aspect.value);
+ DBG("\t\t\tValue: %lu", (long)cstate->aspect.value);
}
else if (!strcmp(prop->name, "scaling mode"))
{
cstate->scaling.id = prop->prop_id;
cstate->scaling.value = oprops->prop_values[i];
- DBG("\t\t\tValue: %d", cstate->scaling.value);
+ DBG("\t\t\tValue: %lu", (long)cstate->scaling.value);
}
cont:
@@ -388,13 +392,13 @@ _drm2_atomic_state_plane_fill(Ecore_Drm2_Plane_State *pstate, int fd)
{
pstate->cid.id = prop->prop_id;
pstate->cid.value = oprops->prop_values[i];
- DBG("\t\t\tValue: %d", pstate->cid.value);
+ DBG("\t\t\tValue: %lu", (long)pstate->cid.value);
}
else if (!strcmp(prop->name, "FB_ID"))
{
pstate->fid.id = prop->prop_id;
pstate->fid.value = oprops->prop_values[i];
- DBG("\t\t\tValue: %d", pstate->fid.value);
+ DBG("\t\t\tValue: %lu", (long)pstate->fid.value);
}
else if (!strcmp(prop->name, "CRTC_X"))
{
@@ -452,7 +456,7 @@ _drm2_atomic_state_plane_fill(Ecore_Drm2_Plane_State *pstate, int fd)
DBG("\t\t\tCursor Plane");
break;
default:
- DBG("\t\t\tValue: %d", pstate->type.value);
+ DBG("\t\t\tValue: %lu", (long)pstate->type.value);
break;
}
}
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index e8f6c16762..e91cf67ec5 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -1,5 +1,7 @@
#include "ecore_drm2_private.h"
+#define FLIP_TIMEOUT 0.05
+
static Eina_Bool
_fb2_create(Ecore_Drm2_Fb *fb)
{
@@ -255,6 +257,15 @@ _ecore_drm2_fb_buffer_release(Ecore_Drm2_Output *output EINA_UNUSED, Ecore_Drm2_
}
}
+static void
+_cb_mainloop_async_timer_del(void *data)
+{
+ Ecore_Drm2_Output *output = data;
+
+ ecore_timer_del(output->flip_timeout);
+ output->flip_timeout = NULL;
+}
+
EAPI Eina_Bool
ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
{
@@ -265,9 +276,11 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
if (output->flip_timeout)
{
- ecore_timer_del(output->flip_timeout);
- output->flip_timeout = NULL;
+ // XXX: output ref++
+ ecore_main_loop_thread_safe_call_async
+ (_cb_mainloop_async_timer_del, output);
}
+ if (!output->pending.fb) fprintf(stderr, "XXX--XXX eeeeek pending fb is NULL so current would become null ----------------------------------\n");
if (output->current.fb && (output->current.fb != output->pending.fb))
_ecore_drm2_fb_buffer_release(output, &output->current);
@@ -348,6 +361,15 @@ _fb_atomic_flip_test(Ecore_Drm2_Output *output)
cstate->active.value);
if (ret < 0) goto err;
+ if (cstate->background.id)
+ {
+ ret =
+ sym_drmModeAtomicAddProperty(req, cstate->obj_id,
+ cstate->background.id,
+ cstate->background.value);
+ if (ret < 0) goto err;
+ }
+
EINA_LIST_FOREACH(output->planes, l, plane)
{
pstate = plane->state;
@@ -461,12 +483,20 @@ _cb_flip_timeout(void *data)
Ecore_Drm2_Output *output = data;
output->flip_timeout = NULL;
- ERR("flip event callback timout 0.05sec - try again");
+ ERR("flip event callback timout %0.2fsec - try again", FLIP_TIMEOUT);
if (_ecore_drm2_use_atomic) _fb_atomic_flip(output);
else _fb_flip(output);
return EINA_FALSE;
}
+static void
+_cb_mainloop_async_timer_reset(void *data)
+{
+ Ecore_Drm2_Output *output = data;
+ if (output->flip_timeout) ecore_timer_del(output->flip_timeout);
+ output->flip_timeout = ecore_timer_add(FLIP_TIMEOUT, _cb_flip_timeout, output);
+}
+
static int
_fb_atomic_flip(Ecore_Drm2_Output *output)
{
@@ -484,9 +514,18 @@ _fb_atomic_flip(Ecore_Drm2_Output *output)
/* Still no req is a bad situation */
EINA_SAFETY_ON_NULL_RETURN_VAL(output->prep.atomic_req, -1);
- res =
- sym_drmModeAtomicCommit(output->fd, output->prep.atomic_req, flags,
- output);
+ // sometimes we get a EBUSY ... so try again a few times.
+ int i;
+ for (i = 0; i < 10; i++)
+ {
+ res =
+ sym_drmModeAtomicCommit(output->fd, output->prep.atomic_req, flags,
+ output);
+ if (res == 0) break;
+ else ERR("DRM atomic commit failed - retry #%i", i + 1);
+ usleep(100);
+ }
+
if (res < 0)
{
ERR("Failed Atomic Commit: %m");
@@ -494,8 +533,9 @@ _fb_atomic_flip(Ecore_Drm2_Output *output)
}
else
{
- if (output->flip_timeout) ecore_timer_del(output->flip_timeout);
- output->flip_timeout = ecore_timer_add(0.05, _cb_flip_timeout, output);
+ // XXX: output ref++
+ ecore_main_loop_thread_safe_call_async
+ (_cb_mainloop_async_timer_reset, output);
}
return 0;
@@ -582,8 +622,9 @@ _fb_flip(Ecore_Drm2_Output *output)
}
else
{
- if (output->flip_timeout) ecore_timer_del(output->flip_timeout);
- output->flip_timeout = ecore_timer_add(0.05, _cb_flip_timeout, output);
+ // XXX: output ref++
+ ecore_main_loop_thread_safe_call_async
+ (_cb_mainloop_async_timer_reset, output);
}
}
while (repeat);
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 6734cacdff..dfb2fa93d1 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -1303,6 +1303,20 @@ _output_mode_atomic_set(Ecore_Drm2_Output *output, Ecore_Drm2_Output_Mode *mode)
goto err;
}
+ if (cstate->background.id)
+ {
+ ret =
+ sym_drmModeAtomicAddProperty(req, cstate->obj_id,
+ cstate->background.id,
+ cstate->background.value);
+ if (ret < 0)
+ {
+ ERR("Could not add atomic property");
+ ret = EINA_FALSE;
+ goto err;
+ }
+ }
+
ret = sym_drmModeAtomicCommit(output->fd, req, DRM_MODE_ATOMIC_ALLOW_MODESET,
output);
if (ret < 0)
@@ -1732,3 +1746,21 @@ ecore_drm2_output_relative_to_get(Ecore_Drm2_Output *output)
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
return output->relative.to;
}
+
+EAPI Eina_Bool
+ecore_drm2_output_background_color_set(Ecore_Drm2_Output *output, uint64_t r, uint64_t g, uint64_t b, uint64_t a)
+{
+ Ecore_Drm2_Crtc_State *cstate;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(output->crtc_state, EINA_FALSE);
+
+ cstate = output->crtc_state;
+ if (cstate->background.id)
+ {
+ cstate->background.value = (a << 48 | b << 32 | g << 16 | r);
+ return _fb_atomic_flip_test(output);
+ }
+
+ return EINA_FALSE;
+}
diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h
index 25aaac7d71..56c9fe8a99 100644
--- a/src/lib/ecore_drm2/ecore_drm2_private.h
+++ b/src/lib/ecore_drm2/ecore_drm2_private.h
@@ -72,7 +72,8 @@ typedef struct _Ecore_Drm2_Atomic_Blob
typedef struct _Ecore_Drm2_Atomic_Property
{
- uint32_t id, value;
+ uint32_t id;
+ uint64_t value;
} Ecore_Drm2_Atomic_Property;
typedef struct _Ecore_Drm2_Connector_State
@@ -90,6 +91,7 @@ typedef struct _Ecore_Drm2_Crtc_State
uint32_t obj_id;
int index;
Ecore_Drm2_Atomic_Property active;
+ Ecore_Drm2_Atomic_Property background;
Ecore_Drm2_Atomic_Blob mode;
} Ecore_Drm2_Crtc_State;
diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index b9cb439f51..d59900d788 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -133,6 +133,22 @@ typedef enum _Ecore_Evas_Engine_Type
ECORE_EVAS_ENGINE_OPENGL_DRM
} Ecore_Evas_Engine_Type;
+#define ECORE_EVAS_OPT_NONE 0
+#define ECORE_EVAS_OPT_INDIRECT 1
+#define ECORE_EVAS_OPT_VSYNC 2
+#define ECORE_EVAS_OPT_SWAP_MODE 3
+#define ECORE_EVAS_OPT_GL_DEPTH 4
+#define ECORE_EVAS_OPT_GL_STENCIL 5
+#define ECORE_EVAS_OPT_GL_MSAA 6
+#define ECORE_EVAS_OPT_LAST 7
+
+#define ECORE_EVAS_SWAP_MODE_AUTO 0
+#define ECORE_EVAS_SWAP_MODE_FULL 1
+#define ECORE_EVAS_SWAP_MODE_COPY 2
+#define ECORE_EVAS_SWAP_MODE_DOUBLE 3
+#define ECORE_EVAS_SWAP_MODE_TRIPLE 4
+
+
/**
* @enum _Ecore_Evas_Avoid_Damage_Type
* This option causes updates of the Ecore_Evas to be done on a pixmap, and
@@ -1310,20 +1326,20 @@ EAPI Ecore_Evas *ecore_evas_software_x11_pixmap_new(const char *disp_name, E
*/
EAPI Ecore_X_Pixmap ecore_evas_software_x11_pixmap_get(const Ecore_Evas *ee);
-#define ECORE_EVAS_GL_X11_OPT_NONE 0
-#define ECORE_EVAS_GL_X11_OPT_INDIRECT 1
-#define ECORE_EVAS_GL_X11_OPT_VSYNC 2
-#define ECORE_EVAS_GL_X11_OPT_SWAP_MODE 3
-#define ECORE_EVAS_GL_X11_OPT_GL_DEPTH 4
-#define ECORE_EVAS_GL_X11_OPT_GL_STENCIL 5
-#define ECORE_EVAS_GL_X11_OPT_GL_MSAA 6
-#define ECORE_EVAS_GL_X11_OPT_LAST 7
-
-#define ECORE_EVAS_GL_X11_SWAP_MODE_AUTO 0
-#define ECORE_EVAS_GL_X11_SWAP_MODE_FULL 1
-#define ECORE_EVAS_GL_X11_SWAP_MODE_COPY 2
-#define ECORE_EVAS_GL_X11_SWAP_MODE_DOUBLE 3
-#define ECORE_EVAS_GL_X11_SWAP_MODE_TRIPLE 4
+#define ECORE_EVAS_GL_X11_OPT_NONE ECORE_EVAS_OPT_NONE
+#define ECORE_EVAS_GL_X11_OPT_INDIRECT ECORE_EVAS_OPT_INDIRECT
+#define ECORE_EVAS_GL_X11_OPT_VSYNC ECORE_EVAS_OPT_VSYNC
+#define ECORE_EVAS_GL_X11_OPT_SWAP_MODE ECORE_EVAS_OPT_SWAP_MODE
+#define ECORE_EVAS_GL_X11_OPT_GL_DEPTH ECORE_EVAS_OPT_GL_DEPTH
+#define ECORE_EVAS_GL_X11_OPT_GL_STENCIL ECORE_EVAS_OPT_GL_STENCIL
+#define ECORE_EVAS_GL_X11_OPT_GL_MSAA ECORE_EVAS_OPT_GL_MSAA
+#define ECORE_EVAS_GL_X11_OPT_LAST ECORE_EVAS_OPT_LAST
+
+#define ECORE_EVAS_GL_X11_SWAP_MODE_AUTO ECORE_EVAS_SWAP_MODE_AUTO
+#define ECORE_EVAS_GL_X11_SWAP_MODE_FULL ECORE_EVAS_SWAP_MODE_FULL
+#define ECORE_EVAS_GL_X11_SWAP_MODE_COPY ECORE_EVAS_SWAP_MODE_COPY
+#define ECORE_EVAS_GL_X11_SWAP_MODE_DOUBLE ECORE_EVAS_SWAP_MODE_DOUBLE
+#define ECORE_EVAS_GL_X11_SWAP_MODE_TRIPLE ECORE_EVAS_SWAP_MODE_TRIPLE
/**
* @brief Creates Ecore_Evas using opengl x11.
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 8f8a0241b6..86020876ef 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4462,7 +4462,7 @@ ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent,
int x, int y, int w, int h, Eina_Bool frame)
{
Ecore_Evas *ee;
- Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
+ Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool, const int*);
Eina_Module *m = _ecore_evas_engine_load("wayland");
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
@@ -4471,7 +4471,7 @@ ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent,
if (parent) ERR("Wayland windows with parents not supported through legacy API");
- ee = new(disp_name, 0, x, y, w, h, frame);
+ ee = new(disp_name, 0, x, y, w, h, frame, NULL);
if (!_ecore_evas_cursors_init(ee))
{
ecore_evas_free(ee);
@@ -4503,17 +4503,17 @@ _wayland_shm_new(const char *disp_name, Ecore_Window parent,
Ecore_Evas *
_wayland_egl_new(const char *disp_name, Ecore_Window parent,
- int x, int y, int w, int h, Eina_Bool frame)
+ int x, int y, int w, int h, Eina_Bool frame, const int *opt)
{
Ecore_Evas *ee;
- Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
+ Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool, const int *);
Eina_Module *m = _ecore_evas_engine_load("wayland");
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
new = eina_module_symbol_get(m, "ecore_evas_wayland_egl_new_internal");
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
- ee = new(disp_name, parent, x, y, w, h, frame);
+ ee = new(disp_name, parent, x, y, w, h, frame, opt);
if (!_ecore_evas_cursors_init(ee))
{
ecore_evas_free(ee);
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index 9149c3e937..cfbb367e2b 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -499,7 +499,7 @@ EAPI void ecore_evas_done(Ecore_Evas *ee, Eina_Bool single_window);
#ifdef IPA_YLNO_ESU_LANRETNI_MLE
EAPI Ecore_Evas *_wayland_shm_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame);
-EAPI Ecore_Evas *_wayland_egl_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame);
+EAPI Ecore_Evas *_wayland_egl_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt);
#else
#define _wayland_shm_new DONT_USE_INTERNAL_API
#define _wayland_egl_new DONT_USE_INTERNAL_API
diff --git a/src/lib/ecore_sdl/meson.build b/src/lib/ecore_sdl/meson.build
index 01ef3981b9..b4685818c1 100644
--- a/src/lib/ecore_sdl/meson.build
+++ b/src/lib/ecore_sdl/meson.build
@@ -10,7 +10,7 @@ ecore_sdl_header_src = [
'Ecore_Sdl_Keys.h'
]
-ecore_sdl_deps += dependency('sdl')
+ecore_sdl_deps += dependency('sdl2')
ecore_sdl_lib = library('ecore_sdl',
ecore_sdl_src,
diff --git a/src/lib/ecore_win32/meson.build b/src/lib/ecore_win32/meson.build
new file mode 100644
index 0000000000..1bb4589f28
--- /dev/null
+++ b/src/lib/ecore_win32/meson.build
@@ -0,0 +1,42 @@
+if sys_windows == true
+ ecore_win32_deps = [evil, eina, ecore, ecore_input]
+ ecore_win32_pub_deps = []
+
+ ecore_win32_src = [
+ 'ecore_win32.c',
+ 'ecore_win32_clipboard.c',
+ 'ecore_win32_cursor.c',
+ 'ecore_win32_dnd.c',
+ 'ecore_win32_dnd_data_object.cpp',
+ 'ecore_win32_dnd_drop_source.cpp',
+ 'ecore_win32_dnd_drop_target.cpp',
+ 'ecore_win32_dnd_enumformatetc.cpp',
+ 'ecore_win32_event.c',
+ 'ecore_win32_monitor.c',
+ 'ecore_win32_window.c',
+ ]
+
+ ecore_win32_header_src = [
+ 'Ecore_Win32.h'
+ ]
+
+ ecore_win32_lib = library('ecore_win32',
+ ecore_win32_src,
+ dependencies: ecore_win32_deps + ecore_win32_pub_deps,
+ include_directories : config_dir,
+ install: true,
+ c_args : package_c_args,
+ )
+
+ ecore_win32 = declare_dependency(
+ include_directories: [include_directories('.')],
+ link_with: ecore_win32_lib,
+ dependencies: ecore_win32_pub_deps,
+ )
+
+ install_headers(ecore_win32_header_src,
+ install_dir : dir_package_include,
+ )
+else
+ automatic_pkgfile = false
+endif
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index d448d63a87..0ea82c0e11 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -96,16 +96,16 @@ _ecore_wl2_surface_modules_init(void)
}
}
#endif
- supplied_modules = eina_module_arch_list_get(NULL,
- PACKAGE_LIB_DIR"/ecore_wl2/engines",
- MODULE_ARCH);
+ supplied_modules =
+ eina_module_arch_list_get(NULL, PACKAGE_LIB_DIR"/ecore_wl2/engines",
+ MODULE_ARCH);
eina_module_list_load(supplied_modules);
mod_dir = getenv("ECORE_WL2_SURFACE_MODULE_DIR");
if (mod_dir)
{
- local_modules = eina_module_list_get(NULL, mod_dir,
- EINA_TRUE, NULL, NULL);
+ local_modules =
+ eina_module_list_get(NULL, mod_dir, EINA_TRUE, NULL, NULL);
eina_module_list_load(local_modules);
}
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index 8699dfaace..a1511c4711 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -148,7 +148,8 @@ _aux_hints_supported_aux_hints(void *data, struct efl_aux_hints *aux_hints EINA_
ev->win = win;
ev->display = ewd;
ewd->refs++;
- ecore_event_add(ECORE_WL2_EVENT_AUX_HINT_SUPPORTED, ev, _display_event_free, ewd);
+ ecore_event_add(ECORE_WL2_EVENT_AUX_HINT_SUPPORTED, ev,
+ _display_event_free, ewd);
}
static void
@@ -168,7 +169,8 @@ _aux_hints_allowed_aux_hint(void *data, struct efl_aux_hints *aux_hints EINA_UN
ev->id = id;
ev->display = ewd;
ewd->refs++;
- ecore_event_add(ECORE_WL2_EVENT_AUX_HINT_ALLOWED, ev, _display_event_free, ewd);
+ ecore_event_add(ECORE_WL2_EVENT_AUX_HINT_ALLOWED, ev,
+ _display_event_free, ewd);
}
static void
@@ -182,7 +184,7 @@ _cb_aux_message_free(void *data EINA_UNUSED, void *event)
eina_stringshare_del(ev->key);
eina_stringshare_del(ev->val);
EINA_LIST_FREE(ev->options, str)
- eina_stringshare_del(str);
+ eina_stringshare_del(str);
free(ev);
}
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 0d480f50e8..67a2dcba80 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -671,6 +671,7 @@ _ecore_wl2_input_ungrab(Ecore_Wl2_Input *input)
input->grab.window = NULL;
input->grab.button = 0;
input->grab.count = 0;
+ input->grab.touch_count = 0;
}
static void
@@ -1210,6 +1211,7 @@ _touch_cb_down(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int seri
input->focus.touch = window;
input->timestamp = timestamp;
+ input->grab.touch_count++;
_pointer_cb_enter(data, NULL, serial, surface, x, y);
@@ -1239,9 +1241,13 @@ _touch_cb_up(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int serial
BTN_LEFT, timestamp);
if (input->grab.count) input->grab.count--;
+ if (input->grab.touch_count) input->grab.touch_count--;
if ((input->grab.window) && (input->grab.button == BTN_LEFT) &&
(!input->grab.count))
_ecore_wl2_input_ungrab(input);
+
+ if (input->grab.touch_count == 0) input->focus.touch = NULL;
+
}
static void
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index 9b6d4f7e49..4c19886842 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -473,6 +473,7 @@ struct _Ecore_Wl2_Input
{
unsigned int button, count, timestamp;
Ecore_Wl2_Window *window;
+ unsigned int touch_count;
} grab;
struct
diff --git a/src/lib/ector/cairo/ector_cairo_software_surface.eo b/src/lib/ector/cairo/ector_cairo_software_surface.eo
index 05ad18e37d..9cd23e5cf5 100644
--- a/src/lib/ector/cairo/ector_cairo_software_surface.eo
+++ b/src/lib/ector/cairo/ector_cairo_software_surface.eo
@@ -4,7 +4,7 @@ class @beta Ector.Cairo.Software.Surface extends Ector.Cairo.Surface implements
Used to render ector content into a cairo software backend.
]]
- eo_prefix: ector_cairo_software_surface;
+ c_prefix: ector_cairo_software_surface;
methods {}
implements {
Ector.Buffer.pixels_set;
diff --git a/src/lib/ector/cairo/ector_cairo_surface.eo b/src/lib/ector/cairo/ector_cairo_surface.eo
index 981d2404d2..96abd0f082 100644
--- a/src/lib/ector/cairo/ector_cairo_surface.eo
+++ b/src/lib/ector/cairo/ector_cairo_surface.eo
@@ -6,7 +6,7 @@ class @beta Ector.Cairo.Surface extends Efl.Object implements Ector.Surface
Used to render ector content into a cairo backend.
]]
- eo_prefix: ector_cairo_surface;
+ c_prefix: ector_cairo_surface;
methods {
@property context {
[[Cairo context]]
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo
index 9c5c4ff563..c6f2c4fe8d 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo
@@ -1,7 +1,7 @@
class @beta Ector.Renderer.Cairo.Gradient.Linear extends Ector.Renderer.Cairo implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Linear, Efl.Gfx.Path
{
[[Ector cairo renderer gradient linear]]
- eo_prefix: ector_renderer_cairo_gradient_linear;
+ c_prefix: ector_renderer_cairo_gradient_linear;
implements {
Ector.Renderer.prepare;
Ector.Renderer.draw;
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo
index 7c3a60caf8..bdf0059b3c 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo
@@ -1,7 +1,7 @@
class @beta Ector.Renderer.Cairo.Gradient.Radial extends Ector.Renderer.Cairo implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Radial, Efl.Gfx.Path
{
[[Ector cairo renderer gradient radial]]
- eo_prefix: ector_renderer_cairo_gradient_radial;
+ c_prefix: ector_renderer_cairo_gradient_radial;
implements {
Ector.Renderer.prepare;
Ector.Renderer.draw;
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.eo b/src/lib/ector/cairo/ector_renderer_cairo_shape.eo
index 6f08776591..b2d41c6842 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.eo
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.eo
@@ -1,7 +1,7 @@
class @beta Ector.Renderer.Cairo.Shape extends Ector.Renderer.Cairo implements Ector.Renderer.Shape, Efl.Gfx.Path
{
[[Ector cairo renderer shape class]]
- eo_prefix: ector_renderer_cairo_shape;
+ c_prefix: ector_renderer_cairo_shape;
implements {
Ector.Renderer.prepare;
Ector.Renderer.draw;
diff --git a/src/lib/ector/ector_buffer.eo b/src/lib/ector/ector_buffer.eo
index c53ecc8962..baa107159b 100644
--- a/src/lib/ector/ector_buffer.eo
+++ b/src/lib/ector/ector_buffer.eo
@@ -25,7 +25,7 @@ mixin @beta Ector.Buffer
{
[[2D pixel buffer interface for Ector
]]
- eo_prefix: ector_buffer;
+ c_prefix: ector_buffer;
methods {
@property size {
[[The (rectangular) size of the pixel buffer.]]
diff --git a/src/lib/ector/ector_renderer.eo b/src/lib/ector/ector_renderer.eo
index 53560d17d5..57726f3df1 100644
--- a/src/lib/ector/ector_renderer.eo
+++ b/src/lib/ector/ector_renderer.eo
@@ -4,7 +4,7 @@ abstract @beta Ector.Renderer extends Efl.Object
{
[[Ector renderer abstract interface]]
- eo_prefix: ector_renderer;
+ c_prefix: ector_renderer;
methods {
@property surface {
[[Surface associated with this renderer]]
diff --git a/src/lib/ector/ector_renderer_gradient.eo b/src/lib/ector/ector_renderer_gradient.eo
index 70be8823a6..fda0e33261 100644
--- a/src/lib/ector/ector_renderer_gradient.eo
+++ b/src/lib/ector/ector_renderer_gradient.eo
@@ -1,7 +1,7 @@
mixin @beta Ector.Renderer.Gradient requires Efl.Object extends Efl.Gfx.Gradient
{
[[Ector gradient renderer mixin]]
- eo_prefix: ector_renderer_gradient;
+ c_prefix: ector_renderer_gradient;
implements {
Efl.Gfx.Gradient.stop { get; set; }
Efl.Gfx.Gradient.spread { get; set; }
diff --git a/src/lib/ector/ector_renderer_gradient_linear.eo b/src/lib/ector/ector_renderer_gradient_linear.eo
index db2cde4cbb..2cd05a1101 100644
--- a/src/lib/ector/ector_renderer_gradient_linear.eo
+++ b/src/lib/ector/ector_renderer_gradient_linear.eo
@@ -1,7 +1,7 @@
mixin @beta Ector.Renderer.Gradient.Linear extends Efl.Gfx.Gradient_Linear
{
[[Ector gradient linear renderer mixin]]
- eo_prefix: ector_renderer_gradient_linear;
+ c_prefix: ector_renderer_gradient_linear;
implements {
Efl.Gfx.Gradient_Linear.start { get; set; }
Efl.Gfx.Gradient_Linear.end { get; set; }
diff --git a/src/lib/ector/ector_renderer_gradient_radial.eo b/src/lib/ector/ector_renderer_gradient_radial.eo
index 369db43480..3b05e4ed03 100644
--- a/src/lib/ector/ector_renderer_gradient_radial.eo
+++ b/src/lib/ector/ector_renderer_gradient_radial.eo
@@ -1,7 +1,7 @@
mixin @beta Ector.Renderer.Gradient.Radial extends Efl.Gfx.Gradient_Radial
{
[[Ector gradient radial renderer mixin]]
- eo_prefix: ector_renderer_gradient_radial;
+ c_prefix: ector_renderer_gradient_radial;
implements {
Efl.Gfx.Gradient_Radial.center { get; set; }
Efl.Gfx.Gradient_Radial.radius { get; set; }
diff --git a/src/lib/ector/ector_renderer_shape.eo b/src/lib/ector/ector_renderer_shape.eo
index 67876ca108..c6038ad859 100644
--- a/src/lib/ector/ector_renderer_shape.eo
+++ b/src/lib/ector/ector_renderer_shape.eo
@@ -3,7 +3,7 @@ import ector_renderer;
mixin @beta Ector.Renderer.Shape requires Efl.Object extends Efl.Gfx.Shape
{
[[Ector shape renderer mixin]]
- eo_prefix: ector_renderer_shape;
+ c_prefix: ector_renderer_shape;
methods {
@property fill {
[[Fill property]]
diff --git a/src/lib/ector/ector_surface.eo b/src/lib/ector/ector_surface.eo
index 159033995d..f29cf070fa 100644
--- a/src/lib/ector/ector_surface.eo
+++ b/src/lib/ector/ector_surface.eo
@@ -2,7 +2,7 @@ mixin @beta Ector.Surface extends Ector.Buffer
{
[[Surface interface for Ector]]
- eo_prefix: ector_surface;
+ c_prefix: ector_surface;
data: null;
methods {
@property reference_point {
diff --git a/src/lib/ector/gl/ector_gl_surface.eo b/src/lib/ector/gl/ector_gl_surface.eo
index 19e919c0b8..62aefb4291 100644
--- a/src/lib/ector/gl/ector_gl_surface.eo
+++ b/src/lib/ector/gl/ector_gl_surface.eo
@@ -3,7 +3,7 @@ import ector_types;
class @beta Ector.GL.Surface extends Ector.GL.Buffer implements Ector.Surface
{
[[Ector GL surface class]]
- eo_prefix: ector_gl_surface;
+ c_prefix: ector_gl_surface;
methods {
shader_get {
[[Get shader]]
diff --git a/src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo b/src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo
index 2e7621d905..bbb3152b9b 100644
--- a/src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo
+++ b/src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo
@@ -1,7 +1,7 @@
class @beta Ector.Renderer.GL.Gradient.Linear extends Ector.Renderer.GL implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Linear, Efl.Gfx.Path
{
[[Ector GL renderer gradient linear]]
- eo_prefix: ector_renderer_gl_gradient_linear;
+ c_prefix: ector_renderer_gl_gradient_linear;
implements {
Ector.Renderer.prepare;
Ector.Renderer.draw;
diff --git a/src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo b/src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo
index 3f3cbdd72c..a4c42b490a 100644
--- a/src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo
+++ b/src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo
@@ -1,7 +1,7 @@
class @beta Ector.Renderer.GL.Gradient.Radial extends Ector.Renderer.GL implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Radial, Efl.Gfx.Path
{
[[Ector GL renderer gradient radial]]
- eo_prefix: ector_renderer_gl_gradient_radial;
+ c_prefix: ector_renderer_gl_gradient_radial;
implements {
Ector.Renderer.prepare;
Ector.Renderer.draw;
diff --git a/src/lib/ector/gl/ector_renderer_gl_shape.eo b/src/lib/ector/gl/ector_renderer_gl_shape.eo
index ba9043625e..0a938e9974 100644
--- a/src/lib/ector/gl/ector_renderer_gl_shape.eo
+++ b/src/lib/ector/gl/ector_renderer_gl_shape.eo
@@ -1,7 +1,7 @@
class @beta Ector.Renderer.GL.Shape extends Ector.Renderer.GL implements Ector.Renderer.Shape, Efl.Gfx.Path
{
[[Ector GL renderer shape class]]
- eo_prefix: ector_renderer_gl_shape;
+ c_prefix: ector_renderer_gl_shape;
implements {
Ector.Renderer.prepare;
Ector.Renderer.draw;
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_linear.eo b/src/lib/ector/software/ector_renderer_software_gradient_linear.eo
index 132a4dfdb1..5f4f53944e 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_linear.eo
+++ b/src/lib/ector/software/ector_renderer_software_gradient_linear.eo
@@ -1,7 +1,7 @@
class @beta Ector.Renderer.Software.Gradient.Linear extends Ector.Renderer.Software implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Linear
{
[[Ector software renderer gradient linear class]]
- eo_prefix: ector_renderer_software_gradient_linear;
+ c_prefix: ector_renderer_software_gradient_linear;
data: Ector_Renderer_Software_Gradient_Data;
implements {
Ector.Renderer.prepare;
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_radial.eo b/src/lib/ector/software/ector_renderer_software_gradient_radial.eo
index 31bf1d568c..b0a36d3c32 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_radial.eo
+++ b/src/lib/ector/software/ector_renderer_software_gradient_radial.eo
@@ -1,7 +1,7 @@
class @beta Ector.Renderer.Software.Gradient.Radial extends Ector.Renderer.Software implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Radial
{
[[Ector software renderer gradient radial]]
- eo_prefix: ector_renderer_software_gradient_radial;
+ c_prefix: ector_renderer_software_gradient_radial;
data: Ector_Renderer_Software_Gradient_Data;
implements {
Ector.Renderer.prepare;
diff --git a/src/lib/ector/software/ector_renderer_software_shape.eo b/src/lib/ector/software/ector_renderer_software_shape.eo
index 41f2b7e658..4ea56f9260 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.eo
+++ b/src/lib/ector/software/ector_renderer_software_shape.eo
@@ -1,7 +1,7 @@
class @beta Ector.Renderer.Software.Shape extends Ector.Renderer.Software implements Ector.Renderer.Shape
{
[[Ector software renderer shape class]]
- eo_prefix: ector_renderer_software_shape;
+ c_prefix: ector_renderer_software_shape;
implements {
Ector.Renderer.prepare;
Ector.Renderer.draw;
diff --git a/src/lib/ector/software/ector_software_buffer_base.eo b/src/lib/ector/software/ector_software_buffer_base.eo
index be6539973f..8cb576ef0a 100644
--- a/src/lib/ector/software/ector_software_buffer_base.eo
+++ b/src/lib/ector/software/ector_software_buffer_base.eo
@@ -1,7 +1,7 @@
mixin @beta Ector.Software.Buffer.Base extends Ector.Buffer
{
[[A buffer in Ector Software is a readable & optionally writable image]]
- eo_prefix: ector_software_buffer;
+ c_prefix: ector_software_buffer;
methods {
pixels_clear @protected {
[[Clear internal pixel buffer]]
diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c
index b2b5779f69..428c067efe 100644
--- a/src/lib/ector/software/ector_software_rasterizer.c
+++ b/src/lib/ector/software/ector_software_rasterizer.c
@@ -145,9 +145,11 @@ _blend_mask_add(int count, const SW_FT_Span *spans, void *user_data)
RGBA_Comp_Func_Solid comp_func = efl_draw_func_solid_span_get(sd->op, color);
uint32_t *mbuffer = mask->pixels.u32;
+ int tsize = sd->raster_buffer->generic->w;
+ uint32_t *ttarget = alloca(sizeof(uint32_t) * tsize);
+
while (count--)
{
- uint32_t *ttarget = alloca(sizeof(uint32_t) * spans->len);
memset(ttarget, 0x00, sizeof(uint32_t) * spans->len);
uint32_t *mtarget = mbuffer + ((mask->generic->w * spans->y) + spans->x);
comp_func(ttarget, spans->len, color, spans->coverage);
@@ -234,9 +236,11 @@ _blend_mask_diff(int count, const SW_FT_Span *spans, void *user_data)
RGBA_Comp_Func_Solid comp_func = efl_draw_func_solid_span_get(sd->op, color);
uint32_t *mbuffer = mask->pixels.u32;
+ int tsize = sd->raster_buffer->generic->w;
+ uint32_t *ttarget = alloca(sizeof(uint32_t) * tsize);
+
while (count--)
{
- uint32_t *ttarget = alloca(sizeof(uint32_t) * spans->len);
memset(ttarget, 0x00, sizeof(uint32_t) * spans->len);
uint32_t *mtarget = mbuffer + ((mask->generic->w * spans->y) + spans->x);
comp_func(ttarget, spans->len, color, spans->coverage);
@@ -293,6 +297,120 @@ _blend_gradient(int count, const SW_FT_Span *spans, void *user_data)
}
}
+static void
+_blend_gradient_alpha(int count, const SW_FT_Span *spans, void *user_data)
+{
+ RGBA_Comp_Func comp_func;
+ Span_Data *data = (Span_Data *)(user_data);
+ src_fetch fetchfunc = NULL;
+ uint32_t *buffer;
+ const int pix_stride = data->raster_buffer->stride / 4;
+ uint32_t gradientbuffer[BLEND_GRADIENT_BUFFER_SIZE];
+
+ // FIXME: Get the proper composition function using ,color, ECTOR_OP etc.
+ if (data->type == LinearGradient) fetchfunc = &fetch_linear_gradient;
+ if (data->type == RadialGradient) fetchfunc = &fetch_radial_gradient;
+
+ if (!fetchfunc)
+ return;
+
+ Ector_Software_Buffer_Base_Data *mask = data->mask;
+ uint32_t *mbuffer = mask->pixels.u32;
+
+ //Temp buffer for intermediate processing
+ uint32_t *tbuffer = malloc(sizeof(uint32_t) * data->raster_buffer->generic->w);
+
+ comp_func = efl_draw_func_span_get(data->op, data->mul_col, data->gradient->alpha);
+
+ // move to the offset location
+ buffer = data->raster_buffer->pixels.u32 + ((pix_stride * data->offy) + data->offx);
+
+ while (count--)
+ {
+ uint32_t *target = buffer + ((data->raster_buffer->generic->w * spans->y) + spans->x);
+ uint32_t *mtarget = mbuffer + ((mask->generic->w * spans->y) + spans->x);
+ uint32_t *temp = tbuffer;
+ int length = spans->len;
+ memset(temp, 0x00, sizeof(uint32_t) * spans->len);
+ while (length)
+ {
+ int l = MIN(length, BLEND_GRADIENT_BUFFER_SIZE);
+ fetchfunc(gradientbuffer, data, spans->y, spans->x, l);
+ comp_func(temp, gradientbuffer, l, data->mul_col, spans->coverage);
+
+ for (int i = 0; i < l; i++)
+ {
+ *temp = draw_mul_256(((*mtarget)>>24), *temp);
+ int alpha = 255 - ((*temp) >> 24);
+ *target = *temp + draw_mul_256(alpha, *target);
+ ++temp;
+ ++mtarget;
+ ++target;
+ }
+ length -= l;
+ }
+ ++spans;
+ }
+ free(tbuffer);
+}
+
+static void
+_blend_gradient_alpha_inv(int count, const SW_FT_Span *spans, void *user_data)
+{
+ RGBA_Comp_Func comp_func;
+ Span_Data *data = (Span_Data *)(user_data);
+ src_fetch fetchfunc = NULL;
+ uint32_t *buffer;
+ const int pix_stride = data->raster_buffer->stride / 4;
+ uint32_t gradientbuffer[BLEND_GRADIENT_BUFFER_SIZE];
+
+ // FIXME: Get the proper composition function using ,color, ECTOR_OP etc.
+ if (data->type == LinearGradient) fetchfunc = &fetch_linear_gradient;
+ if (data->type == RadialGradient) fetchfunc = &fetch_radial_gradient;
+
+ if (!fetchfunc)
+ return;
+
+ Ector_Software_Buffer_Base_Data *mask = data->mask;
+ uint32_t *mbuffer = mask->pixels.u32;
+
+ //Temp buffer for intermediate processing
+ uint32_t *tbuffer = malloc(sizeof(uint32_t) * data->raster_buffer->generic->w);
+
+ comp_func = efl_draw_func_span_get(data->op, data->mul_col, data->gradient->alpha);
+
+ // move to the offset location
+ buffer = data->raster_buffer->pixels.u32 + ((pix_stride * data->offy) + data->offx);
+
+ while (count--)
+ {
+ uint32_t *target = buffer + ((data->raster_buffer->generic->w * spans->y) + spans->x);
+ uint32_t *mtarget = mbuffer + ((mask->generic->w * spans->y) + spans->x);
+ uint32_t *temp = tbuffer;
+ int length = spans->len;
+ memset(temp, 0x00, sizeof(uint32_t) * spans->len);
+ while (length)
+ {
+ int l = MIN(length, BLEND_GRADIENT_BUFFER_SIZE);
+ fetchfunc(gradientbuffer, data, spans->y, spans->x, l);
+ comp_func(temp, gradientbuffer, l, data->mul_col, spans->coverage);
+
+ for (int i = 0; i < l; i++)
+ {
+ if (*mtarget)
+ *temp = draw_mul_256((255 - ((*mtarget)>>24)), *temp);
+ int alpha = 255 - ((*temp) >> 24);
+ *target = *temp + draw_mul_256(alpha, *target);
+ ++temp;
+ ++mtarget;
+ ++target;
+ }
+ length -= l;
+ }
+ ++spans;
+ }
+ free(tbuffer);
+}
/*!
\internal
spans must be sorted on y
@@ -485,46 +603,49 @@ static void
_adjust_span_fill_methods(Span_Data *spdata)
{
//Blending Function
- switch(spdata->type)
+ if (spdata->mask)
{
- case None:
- spdata->unclipped_blend = NULL;
- break;
- case Solid:
+ switch (spdata->mask_op)
{
- if (spdata->mask)
- {
- switch (spdata->mask_op)
- {
- default:
- case EFL_CANVAS_VG_NODE_BLEND_TYPE_ALPHA:
- spdata->unclipped_blend = &_blend_alpha;
- break;
- case EFL_CANVAS_VG_NODE_BLEND_TYPE_ALPHA_INV:
- spdata->unclipped_blend = &_blend_alpha_inv;
- break;
- case EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_ADD:
- spdata->unclipped_blend = &_blend_mask_add;
- break;
- case EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_SUBSTRACT:
- spdata->unclipped_blend = &_blend_mask_sub;
- break;
- case EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_INTERSECT:
- spdata->unclipped_blend = &_blend_mask_ins;
- break;
- case EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_DIFFERENCE:
- spdata->unclipped_blend = &_blend_mask_diff;
- break;
- }
- }
- else
- spdata->unclipped_blend = &_blend_argb;
- }
- break;
- case LinearGradient:
- case RadialGradient:
+ default:
+ case EFL_CANVAS_VG_NODE_BLEND_TYPE_ALPHA:
+ if (spdata->type == Solid)
+ spdata->unclipped_blend = &_blend_alpha;
+ else if (spdata->type == LinearGradient || spdata->type == RadialGradient)
+ spdata->unclipped_blend = &_blend_gradient_alpha;
+ else //None
+ spdata->unclipped_blend = NULL;
+ break;
+ case EFL_CANVAS_VG_NODE_BLEND_TYPE_ALPHA_INV:
+ if (spdata->type == Solid)
+ spdata->unclipped_blend = &_blend_alpha_inv;
+ else if (spdata->type == LinearGradient || spdata->type == RadialGradient)
+ spdata->unclipped_blend = &_blend_gradient_alpha_inv;
+ else //None
+ spdata->unclipped_blend = NULL;
+ break;
+ case EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_ADD:
+ spdata->unclipped_blend = &_blend_mask_add;
+ break;
+ case EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_SUBSTRACT:
+ spdata->unclipped_blend = &_blend_mask_sub;
+ break;
+ case EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_INTERSECT:
+ spdata->unclipped_blend = &_blend_mask_ins;
+ break;
+ case EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_DIFFERENCE:
+ spdata->unclipped_blend = &_blend_mask_diff;
+ break;
+ }
+ }
+ else
+ {
+ if (spdata->type == Solid)
+ spdata->unclipped_blend = &_blend_argb;
+ else if (spdata->type == LinearGradient || spdata->type == RadialGradient)
spdata->unclipped_blend = &_blend_gradient;
- break;
+ else //None
+ spdata->unclipped_blend = NULL;
}
//FIXME: Mask and mask case is not use clipping.
diff --git a/src/lib/ector/software/ector_software_surface.eo b/src/lib/ector/software/ector_software_surface.eo
index c0f851f0e2..77d6db28a3 100644
--- a/src/lib/ector/software/ector_software_surface.eo
+++ b/src/lib/ector/software/ector_software_surface.eo
@@ -1,7 +1,7 @@
class @beta Ector.Software.Surface extends Ector.Software.Buffer implements Ector.Surface
{
[[Ector surface software class]]
- eo_prefix: ector_software_surface;
+ c_prefix: ector_software_surface;
methods {}
implements {
Ector.Surface.renderer_factory_new;
diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h
index 66b8216dda..27bc080984 100644
--- a/src/lib/edje/Edje_Common.h
+++ b/src/lib/edje/Edje_Common.h
@@ -1,5 +1,146 @@
#include "edje_types.eot.h"
+/** All available cursor states
+ *
+ * @ingroup Edje
+ */
+typedef enum
+{
+ EDJE_CURSOR_MAIN = 0, /**< Main cursor state */
+ EDJE_CURSOR_SELECTION_BEGIN, /**< Selection begin cursor state */
+ EDJE_CURSOR_SELECTION_END, /**< Selection end cursor state */
+ EDJE_CURSOR_PREEDIT_START, /**< Pre-edit start cursor state */
+ EDJE_CURSOR_PREEDIT_END, /**< Pre-edit end cursor state */
+ EDJE_CURSOR_USER, /**< User cursor state */
+ EDJE_CURSOR_USER_EXTRA /**< User extra cursor state */
+} Edje_Cursor;
+
+/** All Text auto capital mode type values
+ *
+ * @ingroup Edje_Text
+ */
+typedef enum
+{
+ EDJE_TEXT_AUTOCAPITAL_TYPE_NONE = 0, /**< None mode value */
+ EDJE_TEXT_AUTOCAPITAL_TYPE_WORD, /**< Word mode value */
+ EDJE_TEXT_AUTOCAPITAL_TYPE_SENTENCE, /**< Sentence mode value */
+ EDJE_TEXT_AUTOCAPITAL_TYPE_ALLCHARACTER /**< All characters mode value */
+} Edje_Text_Autocapital_Type;
+
+/** Input hints
+ *
+ * @ingroup Edje
+ */
+typedef enum
+{
+ EDJE_INPUT_HINT_NONE = 0, /**< No active hints
+ *
+ * @since 1.12 */
+ EDJE_INPUT_HINT_AUTO_COMPLETE = 1 /* 1 >> 0 */, /**< Suggest word auto
+ * completion
+ *
+ * @since 1.12 */
+ EDJE_INPUT_HINT_SENSITIVE_DATA = 2 /* 1 >> 1 */ /**< Typed text should not be
+ * stored.
+ *
+ * @since 1.12 */
+} Edje_Input_Hints;
+
+/** Input panel language
+ *
+ * @ingroup Edje_Input_Panel
+ */
+typedef enum
+{
+ EDJE_INPUT_PANEL_LANG_AUTOMATIC = 0, /**< Automatic
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_LANG_ALPHABET /**< Alphabet
+ *
+ * @since 1.2 */
+} Edje_Input_Panel_Lang;
+
+/** Input panel return key types
+ *
+ * @ingroup Edje_Input_Panel
+ */
+typedef enum
+{
+ EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT = 0, /**< Default
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search or magnifier icon
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEND, /**< Send
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN /**< Sign-in
+ *
+ * @since 1.8 */
+} Edje_Input_Panel_Return_Key_Type;
+
+/** Input panel layout
+ *
+ * @ingroup Edje_Input_Panel
+ */
+typedef enum
+{
+ EDJE_INPUT_PANEL_LAYOUT_NORMAL = 0, /**< Default layout */
+ EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
+ EDJE_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
+ EDJE_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
+ EDJE_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
+ EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
+ EDJE_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
+ EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
+ EDJE_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */
+ EDJE_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout including
+ * esc, alt, ctrl key, so on (no
+ * auto-correct, no auto-capitalization)
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_LAYOUT_PASSWORD, /**< Like normal, but no auto-correct, no
+ * auto-capitalization etc.
+ *
+ * @since 1.2 */
+ EDJE_INPUT_PANEL_LAYOUT_DATETIME, /**< Date and time layout
+ *
+ * @since 1.8 */
+ EDJE_INPUT_PANEL_LAYOUT_EMOTICON, /**< Emoticon layout
+ *
+ * @since 1.10 */
+ EDJE_INPUT_PANEL_LAYOUT_VOICE /**< Voice layout, but if the IME does not
+ * support voice layout, then normal layout
+ * will be shown.
+ *
+ * @since 1.19 */
+} Edje_Input_Panel_Layout;
+
+/** Perspective info for maps inside edje objects
+ *
+ * @ingroup Edje
+ */
+typedef struct _Edje_Perspective Edje_Perspective;
+
/**
* @internal
* @ingroup Edje_General_Group
@@ -81,6 +222,39 @@ struct _Edje_Size_Class
};
/**
+ * @defgroup Edje_Object_Communication_Interface_Message Edje Communication Interface: Message
+ * @ingroup Edje_Object_Group
+ *
+ * @brief Functions that deal with messages.
+ *
+ * Edje has two communication interfaces between @b code and @b theme.
+ * Signals and messages.
+ *
+ * Edje messages are one of the communication interfaces between
+ * @b code and a given Edje object's @b theme. With messages, one can
+ * communicate values like strings, float numbers and integer
+ * numbers. Moreover, messages can be identified by integer
+ * numbers. See #Edje_Message_Type for the full list of message types.
+ *
+ * @note Messages must be handled by scripts.
+ *
+ * @{
+ */
+
+/**
+ * @brief Processes all queued up edje messages.
+ *
+ * This function triggers the processing of messages addressed to any
+ * (alive) edje objects.
+ *
+ */
+EAPI void edje_message_signal_process (void);
+
+/**
+ * @}
+ */
+
+/**
* @defgroup Edje_Object_Communication_Interface_Signal Edje Communication Interface: Signal
* @ingroup Edje_Object_Group
*
@@ -112,6 +286,98 @@ typedef Efl_Signal_Cb Edje_Signal_Cb;
*/
EAPI void * edje_object_signal_callback_extra_data_get(void);
+
+#ifdef EFL_BETA_API_SUPPORT
+/**
+ * @brief Gets seat data passed to callbacks.
+ *
+ * @return The seat data for that callback.
+ *
+ * When a callback is initiated by an input event from a seat, we try to
+ * provide seat information with it.
+ *
+ * Signals fired as programmed responses to these signals will also try
+ * to carry the seat data along.
+ *
+ * This returns an opaque pointer to the seat data.
+ *
+ * @see edje_object_signal_callback_add() for more on Edje signals.
+ * @since 1.21
+ */
+EAPI void *edje_object_signal_callback_seat_data_get(void);
+#endif
+
+
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Edje_Audio Edje Audio
+ * @ingroup Edje
+ *
+ * @brief Functions to manipulate audio abilities in edje.
+ *
+ * Perspective is a graphical tool that makes objects represented in 2D
+ * look like they have a 3D appearance.
+ *
+ * Edje allows us to use perspective on any edje object. This group of
+ * functions deal with the use of perspective, by creating and configuring
+ * a perspective object that must set to a edje object or a canvas,
+ * affecting all the objects inside that have no particular perspective
+ * set already.
+ *
+ * @{
+ */
+
+/**
+ * Identifiers of Edje message types, which can be sent back and forth
+ * code and a given Edje object's theme file/group.
+ *
+ * @see edje_audio_channel_mute_set()
+ * @see edje_audio_channel_mute_get()
+ *
+ * @since 1.9
+ */
+typedef enum _Edje_Channel
+{
+ EDJE_CHANNEL_EFFECT = 0, /**< Standard audio effects */
+ EDJE_CHANNEL_BACKGROUND = 1, /**< Background audio sounds */
+ EDJE_CHANNEL_MUSIC = 2, /**< Music audio */
+ EDJE_CHANNEL_FOREGROUND = 3, /**< Foreground audio sounds */
+ EDJE_CHANNEL_INTERFACE = 4, /**< Sounds related to the interface */
+ EDJE_CHANNEL_INPUT = 5, /**< Sounds related to regular input */
+ EDJE_CHANNEL_ALERT = 6, /**< Sounds for major alerts */
+ EDJE_CHANNEL_ALL = 7 /**< All audio channels (convenience) */
+} Edje_Channel;
+
+/**
+ * @brief Sets the mute state of audio for the process as a whole.
+ *
+ * @param channel The channel to set the mute state of
+ * @param mute The mute state
+ *
+ * This sets the mute (no output) state of audio for the given channel.
+ *
+ * @see edje_audio_channel_mute_get()
+ *
+ * @since 1.9
+ */
+EAPI void edje_audio_channel_mute_set(Edje_Channel channel, Eina_Bool mute);
+
+/**
+ * @brief Gets the mute state of the given channel.
+ *
+ * @param channel The channel to get the mute state of
+ * @return The mute state of the channel
+ *
+ * @see edje_audio_channel_mute_set()
+ *
+ * @since 1.9
+ */
+EAPI Eina_Bool edje_audio_channel_mute_get(Edje_Channel channel);
+
/**
* @}
*/
@@ -917,6 +1183,48 @@ EAPI const Edje_External_Type *edje_external_type_get (const char
*
* @{
*/
+
+/**
+ * @typedef Edje_Aspect_Control
+ *
+ * All Edje aspect control values.
+ *
+ */
+typedef enum _Edje_Aspect_Control
+{
+ EDJE_ASPECT_CONTROL_NONE = 0, /*< None aspect control value */
+ EDJE_ASPECT_CONTROL_NEITHER = 1, /*< Neither aspect control value */
+ EDJE_ASPECT_CONTROL_HORIZONTAL = 2, /*< Horizontal aspect control value */
+ EDJE_ASPECT_CONTROL_VERTICAL = 3, /*< Vertical aspect control value */
+ EDJE_ASPECT_CONTROL_BOTH = 4 /*< Both aspect control value */
+} Edje_Aspect_Control;
+
+/**
+ * @brief Gets the part name of an edje part object.
+ * @param obj An edje part object
+ * @return The name of the part, if the object is an edje part, or @c NULL
+ * @note If this function returns @c NULL, @p obj was not an Edje part object
+ * @see edje_object_part_object_get()
+ * @since 1.10
+ */
+EAPI const char *edje_object_part_object_name_get(const Evas_Object *obj);
+
+#ifdef EFL_BETA_API_SUPPORT
+
+/**
+ * @brief Creates scene and root node which contains all 3D parts of edje object.
+ * @param obj An edje part object
+ * @param root node to collect all 3D parts
+ * @param scene
+ * @return scene and root node which contains all 3D parts of edje object
+ * @note If this function returns @c EINA_FALSE, @p the scene or the root
+ * node wasn't made
+ * @since 1.18
+ */
+EAPI Eina_Bool edje_3d_object_add(Evas_Object *obj, Eo **root_node, Eo *scene);
+
+#endif
+
/**
* @}
*/
@@ -1254,245 +1562,113 @@ EAPI Eina_Iterator *edje_color_class_active_iterator_new(void);
*/
EAPI Eina_Iterator *edje_mmap_color_class_iterator_new(Eina_File *f);
-
/**
* @}
*/
/**
- * @defgroup Edje_Object_Part Edje Part
+ * @defgroup Edje_Object_Size_Class Edje Class: Size
* @ingroup Edje_Object_Group
*
- * @brief Functions that deal with layout components
- *
- * Parts are layout components, but as a layout, they are objects too.
- *
- * There are several types of parts, these types can be divided into two
- * main categories, the first being containers. Containers are parts
- * that are in effect a group of elements. The second group is that of
- * the elements, these part types may not contain others.
- *
- * This section has some functions specific for some types and others that
- * could be applied to any type.
- *
- * @{
- */
-
-/**
- * @defgroup Edje_Part_Text Edje Text Part
- * @ingroup Edje_Object_Part
+ * @brief Functions that deal with Size Classes
*
- * @brief Functions that deal with parts of type text
+ * Sometimes we want to change the size of two or more parts equally and
+ * that's when we use size classes.
*
- * Text is an element type for parts. It's basic functionality is to
- * display a string on the layout, but a lot more things can be done
- * with texts, like string selection, setting the cursor and include
- * a input panel, where one can set a virtual keyboard to handle
- * keyboard entry easily.
+ * If one or more parts are assigned with a size class, when we set attributes
+ * (minw etc.) to this class will update all these parts with the new attributes.
+ * Setting values to a size class at a process level will affect
+ * all parts with that size class, while at object level will affect only
+ * the parts inside an specified object.
*
* @{
*/
-#define EDJE_TEXT_EFFECT_MASK_BASIC 0xf
-#define EDJE_TEXT_EFFECT_BASIC_SET(x, s) \
- do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_BASIC) | (s); } while (0)
-
-#define EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION (0x7 << 4)
-#define EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(x, s) \
- do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) | (s); } while (0)
-
/**
- * @typedef Edje_Text_Effect
+ * @brief Sets the Edje size class.
*
- * All possible text effects in Edje.
- */
-typedef enum _Edje_Text_Effect
-{
- EDJE_TEXT_EFFECT_NONE = 0, /**< None text effect value */
- EDJE_TEXT_EFFECT_PLAIN = 1, /**< Plain text effect value */
- EDJE_TEXT_EFFECT_OUTLINE = 2, /**< Outline text effect value */
- EDJE_TEXT_EFFECT_SOFT_OUTLINE = 3, /**< Soft outline text effect value */
- EDJE_TEXT_EFFECT_SHADOW = 4, /**< Shadown text effect value */
- EDJE_TEXT_EFFECT_SOFT_SHADOW = 5, /**< Soft shadow text effect value */
- EDJE_TEXT_EFFECT_OUTLINE_SHADOW = 6, /**< Outline shadow text effect value */
- EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW = 7, /**< Outline soft shadow text effect value */
- EDJE_TEXT_EFFECT_FAR_SHADOW = 8, /**< Far shadow text effect value */
- EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW = 9, /**< Far soft shadow text effect value */
- EDJE_TEXT_EFFECT_GLOW = 10, /**< Glow text effect value */
-
- EDJE_TEXT_EFFECT_LAST = 11, /**< Last text effect value */
-
- EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4), /**< Bottom right shadow direction value */
- EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM = (0x1 << 4), /**< Bottom shadow direction value */
- EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4), /**< Bottom left shadow direction value */
- EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT = (0x3 << 4), /**< Left shadow direction value */
- EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4), /**< Top left shadow direction value */
- EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP = (0x5 << 4), /**< Top shadow direction value */
- EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4), /**< Top right shadow direction value */
- EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT = (0x7 << 4) /**< right shadow direction value */
-} Edje_Text_Effect;
-
-
-/**
- * @defgroup Edje_Text_Selection Edje Text Selection
- * @ingroup Edje_Part_Text
+ * @param size_class The size class name
+ * @param minw The min width
+ * @param minh The min height
+ * @param maxw The max width
+ * @param maxh The max height
*
- * @brief Functions that deal with selection in text parts.
+ * @return @c EINA_TRUE on success, or @c EINA_FALSE on error
*
- * Selection is a known functionality for texts in the whole computational
- * world. It is a block of text marked for further manipulation.
+ * This function updates all Edje members at the process level which
+ * belong to this size class with the new min and max attributes.
*
- * Edje is responsible for handling this functionality through the
- * following functions.
+ * @see edje_size_class_get().
*
- * @{
- */
-/**
- * @}
+ * @since 1.17
*/
+EAPI Eina_Bool edje_size_class_set (const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh);
/**
- * @defgroup Edje_Text_Cursor Edje Text Cursor
- * @ingroup Edje_Part_Text
+ * @brief Gets the Edje size class.
*
- * @brief Functions that deal with cursor in text parts.
+ * @param size_class The size class name
+ * @param minw The min width
+ * @param minh The min height
+ * @param maxw The max width
+ * @param maxh The max height
*
- * Cursor is a known functionality for texts in the whole computational
- * world. It marks a position in the text from where one may want
- * to make a insertion, deletion or selection.
+ * @return @c EINA_TRUE on success, or @c EINA_FALSE on error
*
- * Edje is responsible for handling this functionality through the
- * following functions.
+ * This function gets the min and max size from the specified Edje
+ * size class.
*
- * @{
- */
-
-/**
- * @}
+ * @since 1.17
*/
+EAPI Eina_Bool edje_size_class_get (const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh);
/**
- * @defgroup Edje_Part_Swallow Edje Swallow Part
- * @ingroup Edje_Object_Part
- *
- * @brief Functions that deal with parts of type swallow and swallowed objects.
- *
- * A important feature of Edje is to be able to create Evas_Objects
- * in code and place them in a layout. And that is what swallowing
- * is all about.
- *
- * Swallow parts are place holders defined in the EDC file for
- * objects that one may want to include in the layout later, or for
- * objects that are not native of Edje. In this last case, Edje will
- * only treat the Evas_Object properties of the swallowed objects.
- *
+ * @brief Deletes the size class.
*
- * @{
- */
-
-/**
- * @typedef Edje_Aspect_Control
+ * @param size_class The size class name
*
- * All Edje aspect control values.
+ * This function deletes any values at the process level for the
+ * specified size class.
*
+ * @since 1.17
*/
-typedef enum _Edje_Aspect_Control
-{
- EDJE_ASPECT_CONTROL_NONE = 0, /*< None aspect control value */
- EDJE_ASPECT_CONTROL_NEITHER = 1, /*< Neither aspect control value */
- EDJE_ASPECT_CONTROL_HORIZONTAL = 2, /*< Horizontal aspect control value */
- EDJE_ASPECT_CONTROL_VERTICAL = 3, /*< Vertical aspect control value */
- EDJE_ASPECT_CONTROL_BOTH = 4 /*< Both aspect control value */
-} Edje_Aspect_Control;
-
-/**
- * @}
- */
+EAPI void edje_size_class_del (const char *size_class);
/**
- * @defgroup Edje_Object_Geometry_Group Edje Object Geometry
- * @ingroup Edje_Object_Group
- *
- * @brief Functions that deal with object's geometry.
+ * @brief Lists size classes.
*
- * By geometry we mean size and position. So in this groups there are
- * functions to manipulate object's geometry or retrieve information
- * about it.
+ * @return A list of size class names (strings). These strings are
+ * stringshares and the list must be eina_stringshare_del()'ed by the caller.
*
- * Keep in mind that by changing an object's geometry, it may affect
- * the appearance in the screen of the parts inside. Most times
- * that is what you want.
+ * This function lists all size classes known about by the current
+ * process.
*
- * @{
- */
-/**
- * @}
+ * @since 1.17
*/
+EAPI Eina_List *edje_size_class_list (void);
/**
- * @defgroup Edje_Part_Box Edje Box Part
- * @ingroup Edje_Object_Part
- *
- * @brief Functions that deal with parts of type box.
- *
- * Box is a container type for parts, that means it can contain
- * other parts.
+ * @brief Iterates over all active classes of an application.
*
- * @{
- */
-
-/**
- * @brief Registers a custom layout to be used in edje boxes.
+ * @return An iterator of Edje_Size_Class of the currently active size class
*
- * @param name The name of the layout
- * @param func The function defining the layout
- * @param layout_data_get This function gets the custom data pointer
- * for func
- * @param layout_data_free Passed to func to free its private data
- * when needed
- * @param free_data Frees data
- * @param data Private pointer passed to layout_data_get
+ * This function only iterates over the Edje_Size_Class in use by
+ * an application.
*
- * This function registers custom layouts that can be referred from
- * themes by the registered name. The Evas_Object_Box_Layout
- * functions receive two pointers for internal use, one being private
- * data, and the other the function to free that data when it's not
- * longer needed. From Edje, this private data will be retrieved by
- * calling layout_data_get, and layout_data_free will be the free
- * function passed to func. layout_data_get will be called with data
- * as its parameter, and this one will be freed by free_data whenever
- * the layout is unregistered from Edje.
- */
-EAPI void edje_box_layout_register (const char *name, Evas_Object_Box_Layout func, void *(*layout_data_get)(void *), void (*layout_data_free)(void *), void (*free_data)(void *), void *data);
-
-/**
- * @}
+ * @since 1.17
*/
+EAPI Eina_Iterator *edje_size_class_active_iterator_new(void);
/**
- * @defgroup Edje_Part_Table Edje Table Part
- * @ingroup Edje_Object_Part
- *
- * @brief Functions that deal with parts of type table.
- *
- * Table is a container type for parts, that means it can contain
- * other parts.
+ * @brief Iterates over all size classes provided by an Edje file.
*
- * @{
- */
-
-/**
- * @typedef Edje_Object_Table_Homogeneous_Mode
+ * @param f The mapped edje file.
*
- * Table homogeneous modes.
+ * @return an iterator of Edje_Size_Class provided by the Edje file.
*
+ * @since 1.17
*/
-typedef enum _Edje_Object_Table_Homogeneous_Mode
-{
- EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, /*< None homogeneous mode */
- EDJE_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, /*< Table homogeneous mode */
- EDJE_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 /*< Item homogeneous mode */
-} Edje_Object_Table_Homogeneous_Mode;
+EAPI Eina_Iterator *edje_mmap_size_class_iterator_new(Eina_File *f);
/**
* @}
@@ -1608,114 +1784,6 @@ EAPI Eina_Iterator *edje_mmap_text_class_iterator_new(Eina_File *f);
*/
/**
- * @defgroup Edje_Object_Size_Class Edje Class: Size
- * @ingroup Edje_Object_Group
- *
- * @brief Functions that deal with Size Classes
- *
- * Sometimes we want to change the size of two or more parts equally and
- * that's when we use size classes.
- *
- * If one or more parts are assigned with a size class, when we set attributes
- * (minw etc.) to this class will update all these parts with the new attributes.
- * Setting values to a size class at a process level will affect
- * all parts with that size class, while at object level will affect only
- * the parts inside an specified object.
- *
- * @{
- */
-
-/**
- * @brief Sets the Edje size class.
- *
- * @param size_class The size class name
- * @param minw The min width
- * @param minh The min height
- * @param maxw The max width
- * @param maxh The max height
- *
- * @return @c EINA_TRUE on success, or @c EINA_FALSE on error
- *
- * This function updates all Edje members at the process level which
- * belong to this size class with the new min and max attributes.
- *
- * @see edje_size_class_get().
- *
- * @since 1.17
- */
-EAPI Eina_Bool edje_size_class_set (const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh);
-
-/**
- * @brief Gets the Edje size class.
- *
- * @param size_class The size class name
- * @param minw The min width
- * @param minh The min height
- * @param maxw The max width
- * @param maxh The max height
- *
- * @return @c EINA_TRUE on success, or @c EINA_FALSE on error
- *
- * This function gets the min and max size from the specified Edje
- * size class.
- *
- * @since 1.17
- */
-EAPI Eina_Bool edje_size_class_get (const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh);
-
-/**
- * @brief Deletes the size class.
- *
- * @param size_class The size class name
- *
- * This function deletes any values at the process level for the
- * specified size class.
- *
- * @since 1.17
- */
-EAPI void edje_size_class_del (const char *size_class);
-
-/**
- * @brief Lists size classes.
- *
- * @return A list of size class names (strings). These strings are
- * stringshares and the list must be eina_stringshare_del()'ed by the caller.
- *
- * This function lists all size classes known about by the current
- * process.
- *
- * @since 1.17
- */
-EAPI Eina_List *edje_size_class_list (void);
-
-/**
- * @brief Iterates over all active classes of an application.
- *
- * @return An iterator of Edje_Size_Class of the currently active size class
- *
- * This function only iterates over the Edje_Size_Class in use by
- * an application.
- *
- * @since 1.17
- */
-EAPI Eina_Iterator *edje_size_class_active_iterator_new(void);
-
-/**
- * @brief Iterates over all size classes provided by an Edje file.
- *
- * @param f The mapped edje file.
- *
- * @return an iterator of Edje_Size_Class provided by the Edje file.
- *
- * @since 1.17
- */
-EAPI Eina_Iterator *edje_mmap_size_class_iterator_new(Eina_File *f);
-
-/**
- * @}
- */
-
-/**
* @defgroup Edje_Object_File Edje Object File
* @ingroup Edje_Object_Group
*
@@ -1996,147 +2064,233 @@ EAPI double edje_transition_duration_factor_get (void);
*/
/**
- * @defgroup Edje_Object_Communication_Interface_Message Edje Communication Interface: Message
+ * @defgroup Edje_Object_Geometry_Group Edje Object Geometry
* @ingroup Edje_Object_Group
*
- * @brief Functions that deal with messages.
+ * @brief Functions that deal with object's geometry.
*
- * Edje has two communication interfaces between @b code and @b theme.
- * Signals and messages.
+ * By geometry we mean size and position. So in this groups there are
+ * functions to manipulate object's geometry or retrieve information
+ * about it.
*
- * Edje messages are one of the communication interfaces between
- * @b code and a given Edje object's @b theme. With messages, one can
- * communicate values like strings, float numbers and integer
- * numbers. Moreover, messages can be identified by integer
- * numbers. See #Edje_Message_Type for the full list of message types.
+ * Keep in mind that by changing an object's geometry, it may affect
+ * the appearance in the screen of the parts inside. Most times
+ * that is what you want.
*
- * @note Messages must be handled by scripts.
+ * @{
+ */
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Edje_Object_Part Edje Part
+ * @ingroup Edje_Object_Group
+ *
+ * @brief Functions that deal with layout components
+ *
+ * Parts are layout components, but as a layout, they are objects too.
+ *
+ * There are several types of parts, these types can be divided into two
+ * main categories, the first being containers. Containers are parts
+ * that are in effect a group of elements. The second group is that of
+ * the elements, these part types may not contain others.
+ *
+ * This section has some functions specific for some types and others that
+ * could be applied to any type.
*
* @{
*/
/**
- * @brief Processes all queued up edje messages.
+ * @defgroup Edje_Part_Text Edje Text Part
+ * @ingroup Edje_Object_Part
*
- * This function triggers the processing of messages addressed to any
- * (alive) edje objects.
+ * @brief Functions that deal with parts of type text
+ *
+ * Text is an element type for parts. It's basic functionality is to
+ * display a string on the layout, but a lot more things can be done
+ * with texts, like string selection, setting the cursor and include
+ * a input panel, where one can set a virtual keyboard to handle
+ * keyboard entry easily.
*
+ * @{
*/
-EAPI void edje_message_signal_process (void);
+
+#define EDJE_TEXT_EFFECT_MASK_BASIC 0xf
+#define EDJE_TEXT_EFFECT_BASIC_SET(x, s) \
+ do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_BASIC) | (s); } while (0)
+
+#define EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION (0x7 << 4)
+#define EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(x, s) \
+ do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) | (s); } while (0)
/**
- * @}
+ * @typedef Edje_Text_Effect
+ *
+ * All possible text effects in Edje.
*/
+typedef enum _Edje_Text_Effect
+{
+ EDJE_TEXT_EFFECT_NONE = 0, /**< None text effect value */
+ EDJE_TEXT_EFFECT_PLAIN = 1, /**< Plain text effect value */
+ EDJE_TEXT_EFFECT_OUTLINE = 2, /**< Outline text effect value */
+ EDJE_TEXT_EFFECT_SOFT_OUTLINE = 3, /**< Soft outline text effect value */
+ EDJE_TEXT_EFFECT_SHADOW = 4, /**< Shadown text effect value */
+ EDJE_TEXT_EFFECT_SOFT_SHADOW = 5, /**< Soft shadow text effect value */
+ EDJE_TEXT_EFFECT_OUTLINE_SHADOW = 6, /**< Outline shadow text effect value */
+ EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW = 7, /**< Outline soft shadow text effect value */
+ EDJE_TEXT_EFFECT_FAR_SHADOW = 8, /**< Far shadow text effect value */
+ EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW = 9, /**< Far soft shadow text effect value */
+ EDJE_TEXT_EFFECT_GLOW = 10, /**< Glow text effect value */
+
+ EDJE_TEXT_EFFECT_LAST = 11, /**< Last text effect value */
+
+ EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4), /**< Bottom right shadow direction value */
+ EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM = (0x1 << 4), /**< Bottom shadow direction value */
+ EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4), /**< Bottom left shadow direction value */
+ EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT = (0x3 << 4), /**< Left shadow direction value */
+ EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4), /**< Top left shadow direction value */
+ EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP = (0x5 << 4), /**< Top shadow direction value */
+ EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4), /**< Top right shadow direction value */
+ EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT = (0x7 << 4) /**< right shadow direction value */
+} Edje_Text_Effect;
/**
- * @defgroup Edje_Audio Edje Audio
- * @ingroup Edje
+ * @defgroup Edje_Text_Selection Edje Text Selection
+ * @ingroup Edje_Part_Text
*
- * @brief Functions to manipulate audio abilities in edje.
+ * @brief Functions that deal with selection in text parts.
*
- * Perspective is a graphical tool that makes objects represented in 2D
- * look like they have a 3D appearance.
+ * Selection is a known functionality for texts in the whole computational
+ * world. It is a block of text marked for further manipulation.
*
- * Edje allows us to use perspective on any edje object. This group of
- * functions deal with the use of perspective, by creating and configuring
- * a perspective object that must set to a edje object or a canvas,
- * affecting all the objects inside that have no particular perspective
- * set already.
+ * Edje is responsible for handling this functionality through the
+ * following functions.
*
* @{
*/
+/**
+ * @}
+ */
/**
- * Identifiers of Edje message types, which can be sent back and forth
- * code and a given Edje object's theme file/group.
+ * @defgroup Edje_Text_Cursor Edje Text Cursor
+ * @ingroup Edje_Part_Text
*
- * @see edje_audio_channel_mute_set()
- * @see edje_audio_channel_mute_get()
+ * @brief Functions that deal with cursor in text parts.
*
- * @since 1.9
+ * Cursor is a known functionality for texts in the whole computational
+ * world. It marks a position in the text from where one may want
+ * to make a insertion, deletion or selection.
+ *
+ * Edje is responsible for handling this functionality through the
+ * following functions.
+ *
+ * @{
*/
-typedef enum _Edje_Channel
-{
- EDJE_CHANNEL_EFFECT = 0, /**< Standard audio effects */
- EDJE_CHANNEL_BACKGROUND = 1, /**< Background audio sounds */
- EDJE_CHANNEL_MUSIC = 2, /**< Music audio */
- EDJE_CHANNEL_FOREGROUND = 3, /**< Foreground audio sounds */
- EDJE_CHANNEL_INTERFACE = 4, /**< Sounds related to the interface */
- EDJE_CHANNEL_INPUT = 5, /**< Sounds related to regular input */
- EDJE_CHANNEL_ALERT = 6, /**< Sounds for major alerts */
- EDJE_CHANNEL_ALL = 7 /**< All audio channels (convenience) */
-} Edje_Channel;
/**
- * @brief Sets the mute state of audio for the process as a whole.
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Edje_Part_Swallow Edje Swallow Part
+ * @ingroup Edje_Object_Part
*
- * @param channel The channel to set the mute state of
- * @param mute The mute state
+ * @brief Functions that deal with parts of type swallow and swallowed objects.
*
- * This sets the mute (no output) state of audio for the given channel.
+ * A important feature of Edje is to be able to create Evas_Objects
+ * in code and place them in a layout. And that is what swallowing
+ * is all about.
*
- * @see edje_audio_channel_mute_get()
+ * Swallow parts are place holders defined in the EDC file for
+ * objects that one may want to include in the layout later, or for
+ * objects that are not native of Edje. In this last case, Edje will
+ * only treat the Evas_Object properties of the swallowed objects.
*
- * @since 1.9
+ *
+ * @{
*/
-EAPI void edje_audio_channel_mute_set(Edje_Channel channel, Eina_Bool mute);
/**
- * @brief Gets the mute state of the given channel.
+ * @}
+ */
+
+/**
+ * @defgroup Edje_Part_Box Edje Box Part
+ * @ingroup Edje_Object_Part
*
- * @param channel The channel to get the mute state of
- * @return The mute state of the channel
+ * @brief Functions that deal with parts of type box.
*
- * @see edje_audio_channel_mute_set()
+ * Box is a container type for parts, that means it can contain
+ * other parts.
*
- * @since 1.9
+ * @{
*/
-EAPI Eina_Bool edje_audio_channel_mute_get(Edje_Channel channel);
/**
- * @brief Gets the part name of an edje part object.
- * @param obj An edje part object
- * @return The name of the part, if the object is an edje part, or @c NULL
- * @note If this function returns @c NULL, @p obj was not an Edje part object
- * @see edje_object_part_object_get()
- * @since 1.10
+ * @brief Registers a custom layout to be used in edje boxes.
+ *
+ * @param name The name of the layout
+ * @param func The function defining the layout
+ * @param layout_data_get This function gets the custom data pointer
+ * for func
+ * @param layout_data_free Passed to func to free its private data
+ * when needed
+ * @param free_data Frees data
+ * @param data Private pointer passed to layout_data_get
+ *
+ * This function registers custom layouts that can be referred from
+ * themes by the registered name. The Evas_Object_Box_Layout
+ * functions receive two pointers for internal use, one being private
+ * data, and the other the function to free that data when it's not
+ * longer needed. From Edje, this private data will be retrieved by
+ * calling layout_data_get, and layout_data_free will be the free
+ * function passed to func. layout_data_get will be called with data
+ * as its parameter, and this one will be freed by free_data whenever
+ * the layout is unregistered from Edje.
*/
-EAPI const char *edje_object_part_object_name_get(const Evas_Object *obj);
-
-#ifdef EFL_BETA_API_SUPPORT
+EAPI void edje_box_layout_register (const char *name, Evas_Object_Box_Layout func, void *(*layout_data_get)(void *), void (*layout_data_free)(void *), void (*free_data)(void *), void *data);
/**
- * @brief Creates scene and root node which contains all 3D parts of edje object.
- * @param obj An edje part object
- * @param root node to collect all 3D parts
- * @param scene
- * @return scene and root node which contains all 3D parts of edje object
- * @note If this function returns @c EINA_FALSE, @p the scene or the root
- * node wasn't made
- * @since 1.18
+ * @}
*/
-EAPI Eina_Bool edje_3d_object_add(Evas_Object *obj, Eo **root_node, Eo *scene);
/**
- * @brief Gets seat data passed to callbacks.
+ * @defgroup Edje_Part_Table Edje Table Part
+ * @ingroup Edje_Object_Part
*
- * @return The seat data for that callback.
+ * @brief Functions that deal with parts of type table.
*
- * When a callback is initiated by an input event from a seat, we try to
- * provide seat information with it.
+ * Table is a container type for parts, that means it can contain
+ * other parts.
*
- * Signals fired as programmed responses to these signals will also try
- * to carry the seat data along.
+ * @{
+ */
+
+/**
+ * @typedef Edje_Object_Table_Homogeneous_Mode
*
- * This returns an opaque pointer to the seat data.
+ * Table homogeneous modes.
*
- * @see edje_object_signal_callback_add() for more on Edje signals.
- * @since 1.21
*/
-EAPI void *edje_object_signal_callback_seat_data_get(void);
+typedef enum _Edje_Object_Table_Homogeneous_Mode
+{
+ EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, /*< None homogeneous mode */
+ EDJE_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, /*< Table homogeneous mode */
+ EDJE_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 /*< Item homogeneous mode */
+} Edje_Object_Table_Homogeneous_Mode;
-#endif
+/**
+ * @}
+ */
/**
* @}
*/
+
diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h
index 52b3075629..af89a4939c 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -1533,25 +1533,6 @@ EAPI double edje_object_base_scale_get(const Evas_Object *obj);
* @{
*/
-/**
- * @defgroup Edje_Part_Drag Edje Drag
- *
- * @brief Functions that deal with dragable parts.
- *
- * To create a movable part it must be declared as dragable
- * in EDC file. To do so, one must define a "dragable" block inside
- * the "part" block.
- *
- * These functions are used to set dragging properties to a
- * part or get dragging information about it.
- *
- * @see @ref tutorial_edje_drag
- *
- * @ingroup Edje_Object_Part
- *
- * @{
- */
-
typedef enum _Edje_Drag_Dir
{
EDJE_DRAG_DIR_NONE = 0,
@@ -1560,7 +1541,6 @@ typedef enum _Edje_Drag_Dir
EDJE_DRAG_DIR_XY = 3
} Edje_Drag_Dir;
-
/**
* @brief Sets the dragable object location.
*
@@ -1584,7 +1564,7 @@ typedef enum _Edje_Drag_Dir
*
* @return @c true on success, @c false otherwise
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Eina_Bool edje_object_part_drag_value_set(Evas_Object *obj, const char * part, double dx, double dy);
@@ -1604,7 +1584,7 @@ EAPI Eina_Bool edje_object_part_drag_value_set(Evas_Object *obj, const char * pa
*
* @return @c true on success, @c false otherwise
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Eina_Bool edje_object_part_drag_value_get(const Evas_Object *obj, const char * part, double *dx, double *dy);
@@ -1624,7 +1604,7 @@ EAPI Eina_Bool edje_object_part_drag_value_get(const Evas_Object *obj, const cha
*
* @return @c true on success, @c false otherwise
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Eina_Bool edje_object_part_drag_size_set(Evas_Object *obj, const char * part, double dw, double dh);
@@ -1641,7 +1621,7 @@ EAPI Eina_Bool edje_object_part_drag_size_set(Evas_Object *obj, const char * par
*
* @return @c true on success, @c false otherwise
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Eina_Bool edje_object_part_drag_size_get(const Evas_Object *obj, const char * part, double *dw, double *dh);
@@ -1658,7 +1638,7 @@ EAPI Eina_Bool edje_object_part_drag_size_get(const Evas_Object *obj, const char
* direction #EDJE_DRAG_DIR_Y: Dragable in Y direction #EDJE_DRAG_DIR_XY:
* Dragable in X & Y directions
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Edje_Drag_Dir edje_object_part_drag_dir_get(const Evas_Object *obj, const char * part);
@@ -1679,7 +1659,7 @@ EAPI Edje_Drag_Dir edje_object_part_drag_dir_get(const Evas_Object *obj, const c
*
* @return @c true on success, @c false otherwise
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Eina_Bool edje_object_part_drag_step_set(Evas_Object *obj, const char * part, double dx, double dy);
@@ -1696,7 +1676,7 @@ EAPI Eina_Bool edje_object_part_drag_step_set(Evas_Object *obj, const char * par
*
* @return @c true on success, @c false otherwise
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Eina_Bool edje_object_part_drag_step_get(const Evas_Object *obj, const char * part, double *dx, double *dy);
@@ -1716,7 +1696,7 @@ EAPI Eina_Bool edje_object_part_drag_step_get(const Evas_Object *obj, const char
*
* @return @c true on success, @c false otherwise
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Eina_Bool edje_object_part_drag_step(Evas_Object *obj, const char *part, double dx, double dy);
@@ -1737,7 +1717,7 @@ EAPI Eina_Bool edje_object_part_drag_step(Evas_Object *obj, const char *part, do
*
* @return @c true on success, @c false otherwise
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Eina_Bool edje_object_part_drag_page_set(Evas_Object *obj, const char * part, double dx, double dy);
@@ -1754,7 +1734,7 @@ EAPI Eina_Bool edje_object_part_drag_page_set(Evas_Object *obj, const char * par
*
* @return @c true on success, @c false otherwise
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Eina_Bool edje_object_part_drag_page_get(const Evas_Object *obj, const char * part, double *dx, double *dy);
@@ -1776,11 +1756,15 @@ EAPI Eina_Bool edje_object_part_drag_page_get(const Evas_Object *obj, const char
*
* @return @c true on success, @c false otherwise
*
- * @ingroup Edje_Object
+ * @ingroup Edje_Part_Drag
*/
EAPI Eina_Bool edje_object_part_drag_page(Evas_Object *obj, const char *part, double dx, double dy);
/**
+ * @}
+ */
+
+/**
* @brief Sets a given text to an Edje object @c TEXT or TEXTBLOCK
* parts.
*
@@ -2985,6 +2969,37 @@ EAPI void edje_object_size_max_get(const Evas_Object *obj, int *maxw, int *maxh)
EAPI Eina_Bool edje_object_part_exists(const Evas_Object *obj, const char *part);
+
+/**
+ * @brief Sets the function that provides item objects for named items in an
+ * edje entry text
+ *
+ * Item objects may be deleted any time by Edje, and will be deleted when the
+ * Edje object is deleted (or file is set to a new file).
+ *
+ * @param[in] obj The object.
+ * @param[in] func The function to call (or @c null to disable) to get item
+ * objects
+ * @param[in] data The data pointer to pass to the func callback
+ *
+ * @ingroup Edje_Object
+ */
+EAPI void edje_object_item_provider_set(Edje_Object *obj, Edje_Item_Provider_Cb func, void *data);
+
+
+/**
+ * @brief Gets the description of an object color class.
+ *
+ * This function gets the description of a color class in use by an object.
+ *
+ * @param[in] color_class Color class description
+ *
+ * @return The description of the target color class or @c null if not found
+ *
+ * @ingroup Edje_Object
+ */
+EAPI const char *edje_object_color_class_description_get(const Edje_Object *obj, const char * color_class);
+
/**
* @defgroup Edje_Perspective Edje Perspective
* @ingroup Edje_Object_Group
@@ -3135,37 +3150,6 @@ EAPI const Edje_Perspective *edje_object_perspective_get(const Evas_Object *obj)
* @}
*/
-
-/**
- * @brief Sets the function that provides item objects for named items in an
- * edje entry text
- *
- * Item objects may be deleted any time by Edje, and will be deleted when the
- * Edje object is deleted (or file is set to a new file).
- *
- * @param[in] obj The object.
- * @param[in] func The function to call (or @c null to disable) to get item
- * objects
- * @param[in] data The data pointer to pass to the func callback
- *
- * @ingroup Edje_Object
- */
-EAPI void edje_object_item_provider_set(Edje_Object *obj, Edje_Item_Provider_Cb func, void *data);
-
-
-/**
- * @brief Gets the description of an object color class.
- *
- * This function gets the description of a color class in use by an object.
- *
- * @param[in] color_class Color class description
- *
- * @return The description of the target color class or @c null if not found
- *
- * @ingroup Edje_Object
- */
-EAPI const char *edje_object_color_class_description_get(const Edje_Object *obj, const char * color_class);
-
/**
* @defgroup Edje_Object_Part Edje Part
*
@@ -3217,9 +3201,6 @@ typedef enum _Edje_Part_Type
* @}
*/
-/**
- * @}
- */
#include "efl_canvas_layout_eo.legacy.h"
#include "edje_edit_eo.legacy.h"
#include "efl_layout_group_eo.legacy.h"
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 3e3bf29850..f0380e4fef 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2397,29 +2397,12 @@ _edje_filter_get(Edje *ed, Edje_Part_Description_Spec_Filter *filter)
static void
_edje_part_pixel_adjust(Edje *ed,
Edje_Real_Part *ep,
- Edje_Calc_Params *params,
- Eina_Bool round)
+ Edje_Calc_Params *params)
{
- int xw, yh, fxw, fyh;
-
- xw = ABS(params->final.x) + params->final.w;
- yh = ABS(params->final.y) + params->final.h;
-
- if (round)
- {
- fxw = TO_INT_ROUND(ADD(ABS(params->eval.x), params->eval.w));
- fyh = TO_INT_ROUND(ADD(ABS(params->eval.y), params->eval.h));
- }
- else
- {
- fxw = TO_INT(ADD(ABS(params->eval.x), params->eval.w));
- fyh = TO_INT(ADD(ABS(params->eval.y), params->eval.h));
- }
-
/* Adjust rounding to not loose one pixels compared to float
information only when rendering to avoid infinite adjustement
when doing min restricted calc */
- if (xw < fxw)
+ if (ABS(params->final.x) + params->final.w < TO_INT(ADD(ABS(params->eval.x), params->eval.w)))
{
if (!ed->calc_only)
{
@@ -2430,7 +2413,7 @@ _edje_part_pixel_adjust(Edje *ed,
ep->invalidate = EINA_TRUE;
}
}
- else if (xw > fxw)
+ else if (ABS(params->final.x) + params->final.w > TO_INT(ADD(ABS(params->eval.x), params->eval.w)))
{
if (!ed->calc_only)
{
@@ -2441,8 +2424,7 @@ _edje_part_pixel_adjust(Edje *ed,
ep->invalidate = EINA_TRUE;
}
}
-
- if (yh < fyh)
+ if (ABS(params->final.y) + params->final.h < TO_INT(ADD(ABS(params->eval.y), params->eval.h)))
{
if (!ed->calc_only)
{
@@ -2453,7 +2435,7 @@ _edje_part_pixel_adjust(Edje *ed,
ep->invalidate = EINA_TRUE;
}
}
- else if (yh > fyh)
+ else if (ABS(params->final.y) + params->final.h > TO_INT(ADD(ABS(params->eval.y), params->eval.h)))
{
if (!ed->calc_only)
{
@@ -2467,6 +2449,7 @@ _edje_part_pixel_adjust(Edje *ed,
if (params->final.w < 0 || params->final.h < 0)
ERR("The params final size became negative");
+
}
static void
@@ -3011,7 +2994,7 @@ _edje_part_recalc_single(Edje *ed,
params->final.w = TO_INT(params->eval.w);
params->final.h = TO_INT(params->eval.h);
- _edje_part_pixel_adjust(ed, ep, params, EINA_FALSE);
+ _edje_part_pixel_adjust(ed, ep, params);
/* fill */
if (ep->part->type == EDJE_PART_TYPE_IMAGE)
_edje_part_recalc_single_fill(ep, &((Edje_Part_Description_Image *)desc)->image.fill, params);
@@ -3473,7 +3456,7 @@ _edje_physics_body_add(Edje *ed, Edje_Real_Part *rp, EPhysics_World *world)
? (_x1) \
: ADD(_x1, MUL(_p, SUB(_x2, _x1))));
-#define INTP(_x1, _x2, _p) TO_INT_ROUND(FINTP(_x1, _x2, _p))
+#define INTP(_x1, _x2, _p) TO_INT(FINTP(_x1, _x2, _p))
static void
_map_colors_free(Edje_Calc_Params *pf)
@@ -3676,7 +3659,7 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
rp = ed->table_parts[cep->param1.description->rel1.id_x];
if (_circular_dependency_find(ed, ep, rp, arr))
{
- eina_array_push(arr, eina_stringshare_ref(rp->part->name));
+ eina_array_push(arr, eina_stringshare_add(rp->part->name));
return EINA_TRUE;
}
}
@@ -3685,7 +3668,7 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
rp = ed->table_parts[cep->param1.description->rel2.id_x];
if (_circular_dependency_find(ed, ep, rp, arr))
{
- eina_array_push(arr, eina_stringshare_ref(rp->part->name));
+ eina_array_push(arr, eina_stringshare_add(rp->part->name));
return EINA_TRUE;
}
}
@@ -3698,7 +3681,7 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
rp = ed->table_parts[cep->param2->description->rel1.id_x];
if (_circular_dependency_find(ed, ep, rp, arr))
{
- eina_array_push(arr, eina_stringshare_ref(rp->part->name));
+ eina_array_push(arr, eina_stringshare_add(rp->part->name));
return EINA_TRUE;
}
}
@@ -3707,7 +3690,7 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
rp = ed->table_parts[cep->param2->description->rel2.id_x];
if (_circular_dependency_find(ed, ep, rp, arr))
{
- eina_array_push(arr, eina_stringshare_ref(rp->part->name));
+ eina_array_push(arr, eina_stringshare_add(rp->part->name));
return EINA_TRUE;
}
}
@@ -3722,7 +3705,7 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
rp = ed->table_parts[cep->param1.description->rel1.id_y];
if (_circular_dependency_find(ed, ep, rp, arr))
{
- eina_array_push(arr, eina_stringshare_ref(rp->part->name));
+ eina_array_push(arr, eina_stringshare_add(rp->part->name));
return EINA_TRUE;
}
}
@@ -3731,7 +3714,7 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
rp = ed->table_parts[cep->param1.description->rel2.id_y];
if (_circular_dependency_find(ed, ep, rp, arr))
{
- eina_array_push(arr, eina_stringshare_ref(rp->part->name));
+ eina_array_push(arr, eina_stringshare_add(rp->part->name));
return EINA_TRUE;
}
}
@@ -3743,7 +3726,7 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
rp = ed->table_parts[cep->param2->description->rel1.id_y];
if (_circular_dependency_find(ed, ep, rp, arr))
{
- eina_array_push(arr, eina_stringshare_ref(rp->part->name));
+ eina_array_push(arr, eina_stringshare_add(rp->part->name));
return EINA_TRUE;
}
}
@@ -3752,7 +3735,7 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
rp = ed->table_parts[cep->param2->description->rel2.id_y];
if (_circular_dependency_find(ed, ep, rp, arr))
{
- eina_array_push(arr, eina_stringshare_ref(rp->part->name));
+ eina_array_push(arr, eina_stringshare_add(rp->part->name));
return EINA_TRUE;
}
}
@@ -4360,7 +4343,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
p3->req.w = INTP(p1->req.w, p2->req.w, pos);
p3->req.h = INTP(p1->req.h, p2->req.h, pos);
- _edje_part_pixel_adjust(ed, ep, p3, EINA_TRUE);
+ _edje_part_pixel_adjust(ed, ep, p3);
if (ep->part->dragable.x)
{
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 6ae592680f..a92e5b1273 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -155,9 +155,7 @@ EAPI extern int _edje_default_log_dom ;
#define FROM_DOUBLE(a) eina_f32p32_double_from(a)
#define FROM_INT(a) eina_f32p32_int_from(a)
#define TO_INT(a) eina_f32p32_int_to(a)
-#define TO_INT_ROUND(a) (((a) >= 0.0) \
- ? eina_f32p32_int_to(ADD(a, FROM_DOUBLE(0.5)) \
- : eina_f32p32_int_to(ADD(a, FROM_DOUBLE(-0.5))
+#define TO_INT_ROUND(a) eina_f32p32_int_to(ADD(a, FROM_DOUBLE(0.5)))
#define ZERO 0
#define COS(a) eina_f32p32_cos(a)
#define SIN(a) eina_f32p32_sin(a)
@@ -180,7 +178,7 @@ EAPI extern int _edje_default_log_dom ;
#define FROM_DOUBLE(a) (a)
#define FROM_INT(a) (double)(a)
#define TO_INT(a) (int)(a)
-#define TO_INT_ROUND(a) (((a) >= 0.0) ? (int)(a + 0.5) : (int)(a - 0.5))
+#define TO_INT_ROUND(a) (int)(a + 0.5)
#define ZERO 0.0
#define COS(a) cos(a)
#define SIN(a) sin(a)
diff --git a/src/lib/edje/edje_types.eot b/src/lib/edje/edje_types.eot
index 87a5cc3b1d..b3eee20d18 100644
--- a/src/lib/edje/edje_types.eot
+++ b/src/lib/edje/edje_types.eot
@@ -21,123 +21,3 @@ enum @beta Efl.Canvas.Layout_Part_Type
vector = 17, [[Vector @since 1.18.]]
last = 18 [[Last type value.]]
}
-
-
-/* TODO: Rename to Efl.Canvas.Layout.Blah */
-
-enum Edje.Cursor {
- [[All available cursor states]]
- main, [[Main cursor state]]
- selection_begin, [[Selection begin cursor state]]
- selection_end, [[Selection end cursor state]]
- preedit_start, [[Pre-edit start cursor state]]
- preedit_end, [[Pre-edit end cursor state]]
- user, [[User cursor state]]
- user_extra [[User extra cursor state]]
-}
-
-enum Edje.Text.Autocapital_Type {
- [[All Text auto capital mode type values]]
- none, [[None mode value]]
- word, [[Word mode value]]
- sentence, [[Sentence mode value]]
- allcharacter [[All characters mode value]]
-}
-
-enum Edje.Input_Hints {
- [[Input hints]]
- legacy: Edje_Input_Hint;
-
- none = 0, [[No active hints
-
- @since 1.12]]
- auto_complete = 1 << 0, [[Suggest word auto completion
-
- @since 1.12]]
- sensitive_data = 1 << 1 [[Typed text should not be stored.
-
- @since 1.12]]
-}
-
-enum Edje.Input_Panel.Lang {
- [[Input panel language]]
- automatic, [[Automatic
-
- @since 1.2]]
- alphabet [[Alphabet
-
- @since 1.2]]
-}
-
-enum Edje.Input_Panel.Return_Key_Type {
- [[Input panel return key types]]
- default, [[Default
-
- @since 1.2]]
- done, [[Done
-
- @since 1.2]]
- go, [[Go
-
- @since 1.2]]
- join, [[Join
-
- @since 1.2]]
- login, [[Login
-
- @since 1.2]]
- next, [[Next
-
- @since 1.2]]
- search, [[Search or magnifier icon
-
- @since 1.2]]
- send, [[Send
-
- @since 1.2]]
- signin [[Sign-in
-
- @since 1.8]]
-}
-
-enum Edje.Input_Panel.Layout {
- [[Input panel layout]]
- normal, [[Default layout]]
- number, [[Number layout]]
- email, [[Email layout]]
- url, [[URL layout]]
- phonenumber, [[Phone Number layout]]
- ip, [[IP layout]]
- month, [[Month layout]]
- numberonly, [[Number Only layout]]
- invalid, [[Never use this]]
- hex, [[Hexadecimal layout
-
- @since 1.2]]
- terminal, [[Command-line terminal layout including esc, alt, ctrl key,
- so on (no auto-correct, no auto-capitalization)
-
- @since 1.2]]
- password, [[Like normal, but no auto-correct, no auto-capitalization etc.
-
- @since 1.2]]
- datetime, [[Date and time layout
-
- @since 1.8]]
- emoticon, [[Emoticon layout
-
- @since 1.10]]
- voice [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown.
-
- @since 1.19]]
-}
-
-struct Edje.Perspective; [[Perspective info for maps inside edje objects]]
-
-/* FIXME-cb: Ignore cb types that should be fixed. */
-type Edje.Signal_Cb: __undefined_type; [[Edje signal callback type]]
-type Edje.Markup_Filter_Cb: __undefined_type; [[Edje markup filter callback type]]
-type Edje.Text.Filter_Cb: __undefined_type; [[Edje text filter callback type]]
-type Edje.Text.Change_Cb: __undefined_type; [[Edje text change callback type]]
-type Edje.Item_Provider_Cb: __undefined_type; [[Edje item provider callback type]]
-type Edje.Message_Handler_Cb: __undefined_type; [[Edje message handler callback type]]
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index da582a4421..9a21ee8bc3 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -166,6 +166,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
#include "interfaces/efl_pack_layout.eo.h"
#include "interfaces/efl_pack_linear.eo.h"
#include "interfaces/efl_pack_table.eo.h"
+#include "interfaces/efl_gfx_arrangement.eo.h"
/* Input and Output */
#include "interfaces/efl_io_closer.eo.h"
diff --git a/src/lib/efl/interfaces/efl_container.eo b/src/lib/efl/interfaces/efl_container.eo
index d45d0a1d75..26883129cb 100644
--- a/src/lib/efl/interfaces/efl_container.eo
+++ b/src/lib/efl/interfaces/efl_container.eo
@@ -1,26 +1,26 @@
interface Efl.Container
{
- [[Common interface for objects that have multiple contents (sub objects).
+ [[Common interface for objects (containers) that can have multiple contents (sub-objects).
- APIs in this interface deal with containers of multiple sub objects, not
+ APIs in this interface deal with containers of multiple sub-objects, not
with individual parts.
@since 1.22
]]
- eo_prefix: efl_content;
+ c_prefix: efl_content;
event_prefix: efl_container;
methods {
content_iterate {
[[Begin iterating over this object's contents.]]
- return: iterator<Efl.Gfx.Entity> @owned @warn_unused; [[Iterator to object content]]
+ return: iterator<Efl.Gfx.Entity> @owned @warn_unused; [[Iterator on object's content.]]
}
content_count {
- [[Returns the number of UI elements packed in this container.]]
- return: int; [[Number of packed UI elements]]
+ [[Returns the number of contained sub-objects.]]
+ return: int; [[Number of sub-objects.]]
}
}
events {
- content,added: Efl.Gfx.Entity; [[Sent after a new item was added.]]
- content,removed: Efl.Gfx.Entity; [[Sent after an item was removed, before unref.]]
+ content,added: Efl.Gfx.Entity; [[Sent after a new sub-object was added.]]
+ content,removed: Efl.Gfx.Entity; [[Sent after a sub-object was removed, before unref.]]
}
}
diff --git a/src/lib/efl/interfaces/efl_gfx_arrangement.eo b/src/lib/efl/interfaces/efl_gfx_arrangement.eo
new file mode 100644
index 0000000000..e991b8c62a
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_gfx_arrangement.eo
@@ -0,0 +1,26 @@
+interface @beta Efl.Gfx.Arrangement
+{
+ [[API common to all UI container objects.]]
+ methods
+ {
+ @property content_align {
+ [[Alignment of the container within its bounds]]
+ set {}
+ get {}
+ values {
+ align_horiz: double; [[Horizontal alignment]]
+ align_vert: double; [[Vertical alignment]]
+ }
+ }
+ @property content_padding {
+ [[Padding between items contained in this object.]]
+ set {}
+ get {}
+ values {
+ pad_horiz: double; [[Horizontal padding]]
+ pad_vert: double; [[Vertical padding]]
+ scalable: bool; [[$true if scalable, $false otherwise]]
+ }
+ }
+ }
+}
diff --git a/src/lib/efl/interfaces/efl_gfx_entity.eo b/src/lib/efl/interfaces/efl_gfx_entity.eo
index 358228c5ce..115fb2a782 100644
--- a/src/lib/efl/interfaces/efl_gfx_entity.eo
+++ b/src/lib/efl/interfaces/efl_gfx_entity.eo
@@ -5,7 +5,7 @@ interface Efl.Gfx.Entity {
@since 1.22
]]
- eo_prefix: efl_gfx_entity;
+ c_prefix: efl_gfx_entity;
methods {
@property position {
[[The 2D position of a canvas object.
diff --git a/src/lib/efl/interfaces/efl_gfx_filter.eo b/src/lib/efl/interfaces/efl_gfx_filter.eo
index 5e8e0e982b..0ebd1e5294 100644
--- a/src/lib/efl/interfaces/efl_gfx_filter.eo
+++ b/src/lib/efl/interfaces/efl_gfx_filter.eo
@@ -8,7 +8,7 @@ interface @beta Efl.Gfx.Filter
This was a beta feature since 1.15.
]]
- eo_prefix: efl_gfx;
+ c_prefix: efl_gfx;
methods {
@property filter_program {
set {
diff --git a/src/lib/efl/interfaces/efl_gfx_gradient.eo b/src/lib/efl/interfaces/efl_gfx_gradient.eo
index 3622034a45..81f18a15e1 100644
--- a/src/lib/efl/interfaces/efl_gfx_gradient.eo
+++ b/src/lib/efl/interfaces/efl_gfx_gradient.eo
@@ -3,7 +3,7 @@ import efl_gfx_types;
interface @beta Efl.Gfx.Gradient
{
[[Efl graphics gradient interface]]
- eo_prefix: efl_gfx_gradient;
+ c_prefix: efl_gfx_gradient;
methods {
@property stop {
set {
diff --git a/src/lib/efl/interfaces/efl_gfx_view.eo b/src/lib/efl/interfaces/efl_gfx_view.eo
index f18d0dc52a..bf29419c60 100644
--- a/src/lib/efl/interfaces/efl_gfx_view.eo
+++ b/src/lib/efl/interfaces/efl_gfx_view.eo
@@ -3,7 +3,7 @@ import eina_types;
interface @beta Efl.Gfx.View
{
[[Efl graphics view interface]]
- eo_prefix: efl_gfx;
+ c_prefix: efl_gfx;
methods {
@property view_size {
[[The dimensions of this object's viewport.
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index 279bf153c4..b3bbf4fa9b 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -56,7 +56,7 @@
#include "interfaces/efl_pack_layout.eo.c"
#include "interfaces/efl_pack_linear.eo.c"
#include "interfaces/efl_pack_table.eo.c"
-
+#include "interfaces/efl_gfx_arrangement.eo.c"
#include "interfaces/efl_model.eo.c"
#include "interfaces/efl_interpolator.eo.c"
#include "interfaces/efl_orientation.eo.c"
diff --git a/src/lib/efl/interfaces/efl_model.eo b/src/lib/efl/interfaces/efl_model.eo
index 981158f9be..40790a5153 100644
--- a/src/lib/efl/interfaces/efl_model.eo
+++ b/src/lib/efl/interfaces/efl_model.eo
@@ -16,7 +16,7 @@ struct @beta Efl.Model_Children_Event {
interface @beta Efl.Model
{
[[Efl model interface]]
- eo_prefix: efl_model;
+ c_prefix: efl_model;
methods {
@property properties {
get {
@@ -83,9 +83,9 @@ interface @beta Efl.Model
The future can also be canceled if the model itself gets destroyed.
]]
params {
- @in property: string;
+ @in property: string; [[Property name.]]
}
- return: future<any_value_ptr>;
+ return: future<any_value_ptr>; [[Future to be resolved when the property changes to anything other than error:EAGAIN]]
}
children_slice_get {
[[Get children slice OR full range.
diff --git a/src/lib/efl/interfaces/efl_pack.eo b/src/lib/efl/interfaces/efl_pack.eo
index 624a0004fe..39f686e20c 100644
--- a/src/lib/efl/interfaces/efl_pack.eo
+++ b/src/lib/efl/interfaces/efl_pack.eo
@@ -1,28 +1,30 @@
interface @beta Efl.Pack extends Efl.Container
{
- [[API common to all UI container objects.]]
+ [[Common interface for objects (containers) with multiple contents
+ (sub-objects) which can be added and removed at runtime.
+ ]]
methods
{
pack_clear {
- [[Removes all packed contents, and unreferences them.]]
- return: bool; [[$true on success, $false otherwise]]
+ [[Removes all packed sub-objects and unreferences them.]]
+ return: bool; [[$true on success, $false otherwise.]]
}
unpack_all {
- [[Removes all packed contents, without unreferencing them.
+ [[Removes all packed sub-objects without unreferencing them.
Use with caution.
]]
- return: bool; [[$true on success, $false otherwise]]
+ return: bool; [[$true on success, $false otherwise.]]
}
unpack {
- [[Removes an existing item from the container, without deleting it.]]
+ [[Removes an existing sub-object from the container without deleting it.]]
params {
- subobj: Efl.Gfx.Entity; [[The unpacked object.]]
+ subobj: Efl.Gfx.Entity; [[The sub-object to unpack.]]
}
- return: bool; [[$false if $subobj wasn't a child or can't be removed]]
+ return: bool; [[$false if $subobj wasn't in the container or couldn't be removed.]]
}
pack {
- [[Adds an item to this container.
+ [[Adds a sub-object to this container.
Depending on the container this will either fill in the default
spot, replacing any already existing element or append to the end
@@ -33,28 +35,9 @@ interface @beta Efl.Pack extends Efl.Container
without deleting it.
]]
params {
- subobj: Efl.Gfx.Entity; [[An object to pack.]]
+ subobj: Efl.Gfx.Entity; [[The object to pack.]]
}
return: bool; [[$false if $subobj could not be packed.]]
}
- @property pack_align {
- [[Alignment of the container within its bounds]]
- set {}
- get {}
- values {
- align_horiz: double; [[Horizontal alignment]]
- align_vert: double; [[Vertical alignment]]
- }
- }
- @property pack_padding {
- [[Padding between items contained in this object.]]
- set {}
- get {}
- values {
- pad_horiz: double; [[Horizontal padding]]
- pad_vert: double; [[Vertical padding]]
- scalable: bool; [[$true if scalable, $false otherwise]]
- }
- }
}
}
diff --git a/src/lib/efl/interfaces/efl_pack_layout.eo b/src/lib/efl/interfaces/efl_pack_layout.eo
index 19bda9a6b8..49b7982269 100644
--- a/src/lib/efl/interfaces/efl_pack_layout.eo
+++ b/src/lib/efl/interfaces/efl_pack_layout.eo
@@ -4,7 +4,7 @@ interface @beta Efl.Pack_Layout
Used for containers (box, grid).
]]
- eo_prefix: efl_pack;
+ c_prefix: efl_pack;
methods {
// Note: Do we need a layout_force or a sync flag in layout_request?
layout_request {
diff --git a/src/lib/efl/interfaces/efl_pack_linear.eo b/src/lib/efl/interfaces/efl_pack_linear.eo
index b82cee842f..79ea27c5d9 100644
--- a/src/lib/efl/interfaces/efl_pack_linear.eo
+++ b/src/lib/efl/interfaces/efl_pack_linear.eo
@@ -1,7 +1,11 @@
interface @beta Efl.Pack_Linear extends Efl.Pack
{
- [[API for containers ]]
- eo_prefix: efl_pack;
+ [[Common interface for objects (containers) with multiple contents
+ (sub-objects) which can be added and removed at runtime in a linear fashion.
+
+ This means the sub-objects are internally organized in an ordered list.
+ ]]
+ c_prefix: efl_pack;
methods {
pack_begin {
[[Prepend an object at the beginning of this container.
@@ -13,12 +17,12 @@ interface @beta Efl.Pack_Linear extends Efl.Pack
container without deleting it.
]]
params {
- @in subobj: Efl.Gfx.Entity; [[Item to pack at the beginning.]]
+ @in subobj: Efl.Gfx.Entity; [[Object to pack at the beginning.]]
}
return: bool; [[$false if $subobj could not be packed.]]
}
pack_end {
- [[Append item at the end of this container.
+ [[Append object at the end of this container.
This is the same as @.pack_at($subobj, -1).
@@ -27,45 +31,46 @@ interface @beta Efl.Pack_Linear extends Efl.Pack
container without deleting it.
]]
params {
- @in subobj: Efl.Gfx.Entity; [[Item to pack at the end.]]
+ @in subobj: Efl.Gfx.Entity; [[Object to pack at the end.]]
}
return: bool; [[$false if $subobj could not be packed.]]
}
pack_before {
- [[Prepend item before other sub object.
+ [[Prepend an object before an existing sub-object.
When this container is deleted, it will request deletion of the
given $subobj. Use @Efl.Pack.unpack to remove $subobj from this
container without deleting it.
]]
params {
- @in subobj: Efl.Gfx.Entity; [[Item to pack before $existing.]]
- @in existing: const(Efl.Gfx.Entity); [[Item to refer to.]]
+ @in subobj: Efl.Gfx.Entity; [[Object to pack before $existing.]]
+ @in existing: const(Efl.Gfx.Entity); [[Existing reference sub-object.]]
}
return: bool; [[$false if $existing could not be found or $subobj
could not be packed.]]
}
pack_after {
- [[Append item after other sub object.
+ [[Append an object after an existing sub-object.
When this container is deleted, it will request deletion of the
given $subobj. Use @Efl.Pack.unpack to remove $subobj from this
container without deleting it.
]]
params {
- @in subobj: Efl.Gfx.Entity; [[Item to pack after $existing.]]
- @in existing: const(Efl.Gfx.Entity); [[Item to refer to.]]
+ @in subobj: Efl.Gfx.Entity; [[Object to pack after $existing.]]
+ @in existing: const(Efl.Gfx.Entity); [[Existing reference sub-object.]]
}
return: bool; [[$false if $existing could not be found or $subobj
could not be packed.]]
}
pack_at {
- [[Inserts $subobj BEFORE the item at position $index.
+ [[Inserts $subobj BEFORE the sub-object at position $index.
$index ranges from -$count to $count-1, where positive numbers go
- from first item (0) to last item ($count-1), and negative numbers go
- from last item (-1) to first item (-$count). Where $count is
- the number of items currently in the container.
+ from first sub-object (0) to last ($count-1), and negative numbers go
+ from last sub-object (-1) to first (-$count). $count is
+ the number of sub-objects currently in the container as returned by
+ @Efl.Container.content_count.
If $index is less than -$count, it will trigger @.pack_begin($subobj)
whereas $index greater than $count-1 will trigger @.pack_end($subobj).
@@ -75,59 +80,59 @@ interface @beta Efl.Pack_Linear extends Efl.Pack
container without deleting it.
]]
params {
- @in subobj: Efl.Gfx.Entity; [[Item to pack.]]
- @in index: int; [[Index of item to insert BEFORE.
+ @in subobj: Efl.Gfx.Entity; [[Object to pack.]]
+ @in index: int; [[Index of existing sub-object to insert BEFORE.
Valid range is -$count to ($count-1).
]]
}
return: bool; [[$false if $subobj could not be packed.]]
}
pack_content_get {
- [[Content at a given $index in this container.
+ [[Sub-object at a given $index in this container.
$index ranges from -$count to $count-1, where positive numbers go
- from first item (0) to last item ($count-1), and negative numbers go
- from last item (-1) to first item (-$count). Where $count is
- the number of items currently in the container.
+ from first sub-object (0) to last ($count-1), and negative numbers go
+ from last sub-object (-1) to first (-$count). $count is
+ the number of sub-objects currently in the container as returned by
+ @Efl.Container.content_count.
- If $index is less than -$count, it will return the first item
- whereas $index greater than $count-1 will return the last item.
+ If $index is less than -$count, it will return the first sub-object
+ whereas $index greater than $count-1 will return the last sub-object.
]]
params {
- @in index: int; [[Index of the item to retrieve.
+ @in index: int; [[Index of the existing sub-object to retrieve.
Valid range is -$count to ($count-1).
]]
}
- return: Efl.Gfx.Entity; [[The object contained at the given $index.]]
+ return: Efl.Gfx.Entity; [[The sub-object contained at the given $index.]]
}
pack_index_get {
- [[Get the index of a child in this container.]]
+ [[Get the index of a sub-object in this container.]]
params {
- @in subobj: const(Efl.Gfx.Entity); [[An object contained in this pack.]]
+ @in subobj: const(Efl.Gfx.Entity); [[An existing sub-object in this container.]]
}
- return: int(-1); [[-1 in case $subobj is not a child of this object,
- or the index of this item in the range 0 to ($count-1).
+ return: int(-1); [[-1 in case $subobj is not found,
+ or the index of $subobj in the range 0 to ($count-1).
]]
}
pack_unpack_at {
- [[Pop out (remove) the item at the specified $index.
+ [[Pop out (remove) the sub-object at the specified $index.
$index ranges from -$count to $count-1, where positive numbers go
- from first item (0) to last item ($count-1), and negative numbers go
- from last item (-1) to first item (-$count). Where $count is
- the number of items currently in the container.
-
- If $index is less than -$count, it will remove the first item
- whereas $index greater than $count-1 will remove the last item.
+ from first sub-object (0) to last ($count-1), and negative numbers go
+ from last sub-object (-1) to first (-$count). $count is
+ the number of sub-objects currently in the container as returned by
+ @Efl.Container.content_count.
- Equivalent to @Efl.Pack.unpack(@.pack_content_get($index)).
+ If $index is less than -$count, it will remove the first sub-object
+ whereas $index greater than $count-1 will remove the last sub-object.
]]
params {
- @in index: int; [[Index of item to remove.
+ @in index: int; [[Index of the sub-object to remove.
Valid range is -$count to ($count-1).
]]
}
- return: Efl.Gfx.Entity; [[The child item if it could be removed.]]
+ return: Efl.Gfx.Entity; [[The sub-object if it could be removed.]]
}
}
}
diff --git a/src/lib/efl/interfaces/efl_pack_table.eo b/src/lib/efl/interfaces/efl_pack_table.eo
index 9472b52ed4..c94bd334d3 100644
--- a/src/lib/efl/interfaces/efl_pack_table.eo
+++ b/src/lib/efl/interfaces/efl_pack_table.eo
@@ -3,7 +3,7 @@ import efl_ui_direction;
interface @beta Efl.Pack_Table extends Efl.Pack
{
[[2D containers aligned on a table with rows and columns]]
- eo_prefix: efl_pack;
+ c_prefix: efl_pack;
methods {
pack_table {
[[Pack object at a given location in the table.
diff --git a/src/lib/efl/interfaces/efl_text_annotate.eo b/src/lib/efl/interfaces/efl_text_annotate.eo
index f9f52a4bb0..724faeb0a3 100644
--- a/src/lib/efl/interfaces/efl_text_annotate.eo
+++ b/src/lib/efl/interfaces/efl_text_annotate.eo
@@ -3,7 +3,7 @@ import efl_text_types;
interface @beta Efl.Text_Annotate {
[[Cursor API
]]
- eo_prefix: efl_text;
+ c_prefix: efl_text;
methods {
// Annotation
@property annotation {
diff --git a/src/lib/efl/interfaces/efl_text_font.eo b/src/lib/efl/interfaces/efl_text_font.eo
index 32f15c2a55..27d32d6433 100644
--- a/src/lib/efl/interfaces/efl_text_font.eo
+++ b/src/lib/efl/interfaces/efl_text_font.eo
@@ -50,7 +50,7 @@ enum @beta Efl.Text_Font_Bitmap_Scalable {
interface @beta Efl.Text_Font {
[[Font settings of the text
]]
- eo_prefix: efl_text;
+ c_prefix: efl_text;
methods {
@property font {
set {
diff --git a/src/lib/efl/interfaces/efl_text_format.eo b/src/lib/efl/interfaces/efl_text_format.eo
index 6d0125c55d..25c17f19a3 100644
--- a/src/lib/efl/interfaces/efl_text_format.eo
+++ b/src/lib/efl/interfaces/efl_text_format.eo
@@ -21,7 +21,7 @@ interface @beta Efl.Text_Format {
The text format can affect the geometry of the text object, as well as
how characters are presented.
]]
- eo_prefix: efl_text;
+ c_prefix: efl_text;
methods {
@property ellipsis {
[[Ellipsis value (number from -1.0 to 1.0)]]
diff --git a/src/lib/efl/interfaces/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style.eo
index 362a56f223..c42433b317 100644
--- a/src/lib/efl/interfaces/efl_text_style.eo
+++ b/src/lib/efl/interfaces/efl_text_style.eo
@@ -60,7 +60,7 @@ interface @beta Efl.Text_Style {
A style can be coloring, effects, underline, strikethrough etc.
]]
- eo_prefix: efl_text;
+ c_prefix: efl_text;
methods {
@property normal_color {
[[Color of text, excluding style]]
diff --git a/src/lib/efl/interfaces/efl_ui_autorepeat.eo b/src/lib/efl/interfaces/efl_ui_autorepeat.eo
index 1c374a5172..48093b205d 100644
--- a/src/lib/efl/interfaces/efl_ui_autorepeat.eo
+++ b/src/lib/efl/interfaces/efl_ui_autorepeat.eo
@@ -1,54 +1,47 @@
interface @beta Efl.Ui.Autorepeat {
- [[Efl UI autorepeat interface]]
- eo_prefix: efl_ui;
+ [[Interface for autorepeating clicks.
+
+ This interface abstracts functions for enabling / disabling this feature.
+ When enabled, keeping a button pressed will continuously emit the $repeated
+ event until the button is released. The time it takes until it starts
+ emitting the event is given by @.autorepeat_initial_timeout, and the
+ time between each new emission by @.autorepeat_gap_timeout.
+ ]]
methods {
@property autorepeat_initial_timeout {
- [[The initial timeout before the autorepeat event is generated
+ [[The initial timeout before the autorepeat event is generated.
Sets the timeout, in seconds, since the button is pressed until the
first $repeated signal is emitted. If $t is 0.0 or less, there
won't be any delay and the event will be fired the moment the button is
pressed.
- See also @.autorepeat_enabled.set, @.autorepeat_gap_timeout.set.
+ See also @.autorepeat_enabled and @.autorepeat_gap_timeout.
]]
values {
- t: double; [[Timeout in seconds]]
+ t: double; [[Timeout in seconds.]]
}
}
@property autorepeat_gap_timeout {
- [[The interval between each generated autorepeat event
+ [[The interval between each generated autorepeat event.
After the first $repeated event is fired, all subsequent ones will
follow after a delay of $t seconds for each.
- See also @.autorepeat_initial_timeout.set.
+ See also @.autorepeat_initial_timeout.
]]
values {
- t: double; [[Interval in seconds]]
+ t: double; [[Time interval in seconds.]]
}
}
@property autorepeat_enabled {
- [[Turn on/off the autorepeat event generated when the button is kept pressed
+ [[Turn on/off the autorepeat event generated when a button is kept pressed.
When off, no autorepeat is performed and buttons emit a normal $clicked
- signal when they are clicked.
-
- When on, keeping a button pressed will continuously emit a $repeated
- signal until the button is released. The time it takes until it starts
- emitting the signal is given by @.autorepeat_initial_timeout.set, and the
- time between each new emission by @.autorepeat_gap_timeout.set.
+ event when they are clicked.
]]
values {
- on: bool; [[A bool to turn on/off the event]]
- }
- }
- @property autorepeat_supported {
- [[Whether the button supports autorepeat.]]
- get {
- }
- values {
- ret: bool; [[$true if autorepeat is supported, $false otherwise]]
+ on: bool; [[A bool to turn on/off the repeat event generation.]]
}
}
}
diff --git a/src/lib/efl/interfaces/efl_ui_i18n.eo b/src/lib/efl/interfaces/efl_ui_i18n.eo
index ece81f6314..af37b13f8f 100644
--- a/src/lib/efl/interfaces/efl_ui_i18n.eo
+++ b/src/lib/efl/interfaces/efl_ui_i18n.eo
@@ -1,7 +1,7 @@
interface @beta Efl.Ui.I18n
{
[[A common Internationalization interface for UI objects.]]
- eo_prefix: efl_ui;
+ c_prefix: efl_ui;
methods {
@property mirrored {
[[Whether this object should be mirrored.
diff --git a/src/lib/efl/interfaces/efl_ui_multi_selectable.eo b/src/lib/efl/interfaces/efl_ui_multi_selectable.eo
index a99ff458f4..2f7eac4788 100644
--- a/src/lib/efl/interfaces/efl_ui_multi_selectable.eo
+++ b/src/lib/efl/interfaces/efl_ui_multi_selectable.eo
@@ -12,7 +12,7 @@ interface @beta Efl.Ui.Multi_Selectable
{
[[Efl UI Multi selectable interface.
The container have to control select property of multiple chidren.]]
- eo_prefix: efl_ui;
+ c_prefix: efl_ui;
methods
{
@property select_mode {
diff --git a/src/lib/efl/interfaces/efl_ui_range_display.eo b/src/lib/efl/interfaces/efl_ui_range_display.eo
index ca9d2c1e1b..c71f6d01de 100644
--- a/src/lib/efl/interfaces/efl_ui_range_display.eo
+++ b/src/lib/efl/interfaces/efl_ui_range_display.eo
@@ -1,7 +1,7 @@
interface @beta Efl.Ui.Range_Display
{
[[Interface that contains properties regarding the displaying of a range.]]
- eo_prefix: efl_ui_range;
+ c_prefix: efl_ui_range;
methods {
@property range_value {
[[Control the range value (in percentage) on a given range widget
diff --git a/src/lib/efl/interfaces/efl_ui_range_interactive.eo b/src/lib/efl/interfaces/efl_ui_range_interactive.eo
index a7af8c8c8f..817178c7b2 100644
--- a/src/lib/efl/interfaces/efl_ui_range_interactive.eo
+++ b/src/lib/efl/interfaces/efl_ui_range_interactive.eo
@@ -4,7 +4,7 @@ interface @beta Efl.Ui.Range_Interactive extends Efl.Ui.Range_Display
The properties defined here are used to manipulate the way a user interacts with a displayed range.
]]
- eo_prefix: efl_ui_range;
+ c_prefix: efl_ui_range;
methods {
@property range_step {
[[Control the step used to increment or decrement values for given widget.
diff --git a/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo b/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo
index 906c43982e..98423c7349 100644
--- a/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo
+++ b/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo
@@ -2,7 +2,7 @@ import eina_types;
interface @beta Efl.Ui.Scrollable_Interactive extends Efl.Ui.Scrollable
{
- eo_prefix: efl_ui_scrollable;
+ c_prefix: efl_ui_scrollable;
methods {
@property content_pos {
[[The content position]]
diff --git a/src/lib/efl/interfaces/efl_ui_zoom.eo b/src/lib/efl/interfaces/efl_ui_zoom.eo
index b3d949aa5f..9cf90d6ea5 100644
--- a/src/lib/efl/interfaces/efl_ui_zoom.eo
+++ b/src/lib/efl/interfaces/efl_ui_zoom.eo
@@ -12,7 +12,7 @@ interface @beta Efl.Ui.Zoom
{
[[Efl UI zoom interface]]
event_prefix: efl_ui;
- eo_prefix: efl_ui;
+ c_prefix: efl_ui;
methods {
@property zoom_animation {
diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build
index ef75b3d7ff..3efefbf4f9 100644
--- a/src/lib/efl/interfaces/meson.build
+++ b/src/lib/efl/interfaces/meson.build
@@ -72,6 +72,7 @@ pub_eo_files = [
'efl_pack_layout.eo',
'efl_pack_linear.eo',
'efl_pack_table.eo',
+ 'efl_gfx_arrangement.eo',
'efl_ui_i18n.eo',
'efl_ui_direction.eo',
'efl_ui_direction_readonly.eo',
diff --git a/src/lib/efreet/efreet_desktop_command.c b/src/lib/efreet/efreet_desktop_command.c
index 8c99102c3d..26ac9aca2f 100644
--- a/src/lib/efreet/efreet_desktop_command.c
+++ b/src/lib/efreet/efreet_desktop_command.c
@@ -6,6 +6,7 @@
#include <ctype.h>
#ifdef _WIN32
+# include <direct.h> /* getcwd */
# include <winsock2.h>
#endif
diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c
index 7ed6d030ef..e10a8f5b04 100644
--- a/src/lib/eina/eina_file_win32.c
+++ b/src/lib/eina/eina_file_win32.c
@@ -117,39 +117,32 @@ _eina_file_win32_is_dir(const char *dir)
return EINA_TRUE;
}
-static char *
-_eina_file_win32_dir_new(const char *dir)
-{
- char *new_dir;
- size_t length;
-
- length = strlen(dir);
-
- new_dir = (char *)malloc(sizeof(char) * length + 5);
- if (!new_dir)
- return NULL;
-
- memcpy(new_dir, dir, length);
- memcpy(new_dir + length, "\\*.*", 5);
-
- return new_dir;
-}
-
static HANDLE
_eina_file_win32_first_file(const char *dir, WIN32_FIND_DATA *fd)
{
- HANDLE h;
+ char buf[4096];
+ HANDLE h;
+ size_t l = strlen(dir);
#ifdef UNICODE
wchar_t *wdir = NULL;
+#endif
- wdir = evil_char_to_wchar(dir);
+ l = strlen(dir);
+ if ((l + 5) > sizeof(buf))
+ return INVALID_HANDLE_VALUE;
+
+ memcpy(buf, dir, l);
+ memcpy(buf + l, "\\*.*", 5);
+
+#ifdef UNICODE
+ wdir = evil_char_to_wchar(buf);
if (!wdir)
return INVALID_HANDLE_VALUE;
- h = FindFirstFile(wdir, fd);
+ h = FindFirstFileEx(wdir, FindExInfoBasic, fd, FindExSearchNameMatch, NULL, 0);
free(wdir);
#else
- h = FindFirstFile(dir, fd);
+ h = FindFirstFileEx(buf, FindExInfoBasic, fd, FindExSearchNameMatch, NULL, 0);
#endif
if (!h)
@@ -469,7 +462,6 @@ eina_file_dir_list(const char *dir,
{
WIN32_FIND_DATA file;
HANDLE h;
- char *new_dir;
EINA_SAFETY_ON_NULL_RETURN_VAL(cb, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(dir, EINA_FALSE);
@@ -478,11 +470,7 @@ eina_file_dir_list(const char *dir,
if (!_eina_file_win32_is_dir(dir))
return EINA_FALSE;
- new_dir = _eina_file_win32_dir_new(dir);
- if (!new_dir)
- return EINA_FALSE;
-
- h = _eina_file_win32_first_file(new_dir, &file);
+ h = _eina_file_win32_first_file(dir, &file);
if (h == INVALID_HANDLE_VALUE)
return EINA_FALSE;
@@ -496,7 +484,9 @@ eina_file_dir_list(const char *dir,
# else
filename = file.cFileName;
# endif /* ! UNICODE */
- if (!strcmp(filename, ".") || !strcmp(filename, ".."))
+ if ((filename[0] == '.') &&
+ ((filename[1] == '\0') ||
+ ((filename[1] == '.') && (filename[2] == '\0'))))
continue;
cb(filename, dir, data);
@@ -563,7 +553,6 @@ EAPI Eina_Iterator *
eina_file_ls(const char *dir)
{
Eina_File_Iterator *it;
- char *new_dir;
size_t length;
EINA_SAFETY_ON_NULL_RETURN_VAL(dir, NULL);
@@ -582,12 +571,7 @@ eina_file_ls(const char *dir)
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
- new_dir = _eina_file_win32_dir_new(dir);
- if (!new_dir)
- goto free_it;
-
- it->handle = _eina_file_win32_first_file(new_dir, &it->data);
- free(new_dir);
+ it->handle = _eina_file_win32_first_file(dir, &it->data);
if ((it->handle == INVALID_HANDLE_VALUE) && (GetLastError() != ERROR_NO_MORE_FILES))
goto free_it;
@@ -614,7 +598,6 @@ EAPI Eina_Iterator *
eina_file_direct_ls(const char *dir)
{
Eina_File_Direct_Iterator *it;
- char *new_dir;
size_t length;
EINA_SAFETY_ON_NULL_RETURN_VAL(dir, NULL);
@@ -633,12 +616,7 @@ eina_file_direct_ls(const char *dir)
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
- new_dir = _eina_file_win32_dir_new(dir);
- if (!new_dir)
- goto free_it;
-
- it->handle = _eina_file_win32_first_file(new_dir, &it->data);
- free(new_dir);
+ it->handle = _eina_file_win32_first_file(dir, &it->data);
if ((it->handle == INVALID_HANDLE_VALUE) && (GetLastError() != ERROR_NO_MORE_FILES))
goto free_it;
diff --git a/src/lib/eina/eina_inline_slice.x b/src/lib/eina/eina_inline_slice.x
index f0188bdf69..5949cd71f4 100644
--- a/src/lib/eina/eina_inline_slice.x
+++ b/src/lib/eina/eina_inline_slice.x
@@ -20,6 +20,9 @@
#define _EINA_INLINE_SLICE_H
#include <string.h>
+#ifdef _WIN32
+# include <Evil.h>
+#endif
static inline Eina_Slice
eina_rw_slice_slice_get(const Eina_Rw_Slice rw_slice)
@@ -246,7 +249,7 @@ static inline char *
eina_slice_strdup(const Eina_Slice slice)
{
if (slice.len != 0)
- return strndup((const char *)slice.mem, slice.len);
+ return eina_strndup((const char *)slice.mem, slice.len);
return strdup("");
}
@@ -254,7 +257,7 @@ static inline char *
eina_rw_slice_strdup(const Eina_Rw_Slice rw_slice)
{
if (rw_slice.len != 0)
- return strndup((const char *)rw_slice.mem, rw_slice.len);
+ return eina_strndup((const char *)rw_slice.mem, rw_slice.len);
return strdup("");
}
diff --git a/src/lib/eina/eina_inline_str.x b/src/lib/eina/eina_inline_str.x
index 3b75591e78..d61eda5d7a 100644
--- a/src/lib/eina/eina_inline_str.x
+++ b/src/lib/eina/eina_inline_str.x
@@ -82,6 +82,38 @@ eina_strdup(const char *str)
}
/**
+ * @brief strndup function which takes @c NULL without crashing
+ * @param str The string to copy
+ * @param n The maximum number of char to copy
+ * @return the copied string, must be freed
+ * @note this also implements strndup() on Windows
+ * @since 1.23
+ */
+static inline char *
+eina_strndup(const char *str, size_t n)
+{
+#ifdef _WIN32
+ char *ret;
+ size_t slen;
+
+ if (!str)
+ return NULL;
+
+ slen = strnlen(str, n);
+ ret = (char *)malloc(slen + 1); /* cast for C++ code */
+ if (!ret)
+ return NULL;
+ if (slen > 0)
+ memcpy(ret, str, slen);
+ ret[slen] = '\0';
+
+ return ret;
+#else
+ return str ? strndup(str, n) : NULL;
+#endif
+}
+
+/**
* @brief streq function which takes @c NULL without crashing
* @param a string a
* @param b string b
diff --git a/src/lib/eina/eina_prefix.c b/src/lib/eina/eina_prefix.c
index 51ec9b3136..aeac22f4b7 100644
--- a/src/lib/eina/eina_prefix.c
+++ b/src/lib/eina/eina_prefix.c
@@ -42,6 +42,7 @@
#endif
#ifdef _WIN32
+# include <direct.h> /* getcwd */
# include <Evil.h>
#endif
diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c
index a5f5c40b5a..f32d835fe4 100644
--- a/src/lib/eina/eina_promise.c
+++ b/src/lib/eina/eina_promise.c
@@ -1343,7 +1343,7 @@ eina_promise_all_array(Eina_Future *array[])
for (i = 0; i < ctx->base.futures_len; i++)
{
- Eina_Value v;
+ Eina_Value v = { 0 };
//Stub values...
r = eina_value_setup(&v, EINA_VALUE_TYPE_INT);
diff --git a/src/lib/eina/eina_slice.h b/src/lib/eina/eina_slice.h
index fab84e9dc8..a354eaa566 100644
--- a/src/lib/eina/eina_slice.h
+++ b/src/lib/eina/eina_slice.h
@@ -28,6 +28,8 @@
#include <sys/types.h>
+#include "eina_str.h"
+
/**
* @addtogroup Eina_Slice_Group Memory Slices
*
diff --git a/src/lib/eina/eina_str.h b/src/lib/eina/eina_str.h
index e8bf685067..961ac58980 100644
--- a/src/lib/eina/eina_str.h
+++ b/src/lib/eina/eina_str.h
@@ -3,6 +3,7 @@
#include <stddef.h>
#include <string.h>
+#include <time.h>
#include "eina_types.h"
@@ -382,6 +383,16 @@ EAPI unsigned char *eina_memdup(unsigned char *mem, size_t size, Eina_Bool termi
*/
EAPI char *eina_strftime(const char *format, const struct tm *tm);
+static inline size_t eina_strlen_bounded(const char *str, size_t maxlen);
+
+static inline size_t eina_str_join(char *dst, size_t size, char sep, const char *a, const char *b);
+
+static inline char *eina_strdup(const char *str);
+
+static inline char *eina_strndup(const char *str, size_t n);
+
+static inline Eina_Bool eina_streq(const char *a, const char *b);
+
#include "eina_inline_str.x"
/**
diff --git a/src/lib/eina/eina_unicode.c b/src/lib/eina/eina_unicode.c
index adec87a477..0bb70ffae9 100644
--- a/src/lib/eina/eina_unicode.c
+++ b/src/lib/eina/eina_unicode.c
@@ -116,6 +116,9 @@ eina_unicode_strndup(const Eina_Unicode *text, size_t n)
EINA_SAFETY_ON_NULL_RETURN_VAL(text, NULL);
ustr = malloc((n + 1) * sizeof(Eina_Unicode));
+ if (!ustr)
+ return NULL;
+
memcpy(ustr, text, n * sizeof(Eina_Unicode));
ustr[n] = 0;
return ustr;
diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c
index dbf6f48d9c..c75a5f1235 100644
--- a/src/lib/eina/eina_value.c
+++ b/src/lib/eina/eina_value.c
@@ -58,6 +58,7 @@ static Eina_Hash *_eina_value_inner_mps = NULL;
static Eina_Lock _eina_value_inner_mps_lock;
static char *_eina_value_mp_choice = NULL;
static int _eina_value_log_dom = -1;
+static const Eina_Value _eina_value_empty = EINA_VALUE_EMPTY;
#ifdef ERR
#undef ERR
@@ -3954,6 +3955,7 @@ _eina_value_type_value_vset(const Eina_Value_Type *type EINA_UNUSED, void *mem,
{
Eina_Value *dst = mem;
Eina_Value src = va_arg(args, Eina_Value);
+
return eina_value_copy(&src, dst);
}
@@ -3962,6 +3964,7 @@ _eina_value_type_value_pset(const Eina_Value_Type *type EINA_UNUSED, void *mem,
{
Eina_Value *dst = mem;
const Eina_Value *src = ptr;
+
return eina_value_copy(src, dst);
}
@@ -5591,9 +5594,7 @@ eina_value_new(const Eina_Value_Type *type)
if (!value) return NULL;
if (!type)
{
- const Eina_Value empty = EINA_VALUE_EMPTY;
-
- memcpy(value, &empty, sizeof (empty));
+ memcpy(value, &_eina_value_empty, sizeof (_eina_value_empty));
return value;
}
if (!eina_value_setup(value, type))
@@ -5622,6 +5623,13 @@ eina_value_copy(const Eina_Value *value, Eina_Value *copy)
Eina_Bool ret;
EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
+
+ if (!memcmp(value, &_eina_value_empty, sizeof (Eina_Value)))
+ {
+ memcpy(copy, &_eina_value_empty, sizeof (Eina_Value));
+ return EINA_TRUE;
+ }
+
EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type),
EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(copy, EINA_FALSE);
diff --git a/src/lib/eina/eina_vpath.c b/src/lib/eina/eina_vpath.c
index 25fa9018c4..0717e928e0 100644
--- a/src/lib/eina/eina_vpath.c
+++ b/src/lib/eina/eina_vpath.c
@@ -218,37 +218,9 @@ _fetch_user_homedir(char **str, const char *name, const char *error)
#endif
}
-
-EAPI char *
-eina_vpath_resolve(const char* path)
-{
- char buf[PATH_MAX];
-
- if (eina_vpath_resolve_snprintf(buf, sizeof(buf), path) > 0)
- return strdup(buf);
- return NULL;
-}
-
-EAPI int
-eina_vpath_resolve_snprintf(char *str, size_t size, const char *format, ...)
+static int
+_eina_vpath_resolve(const char *path, char *str, size_t size)
{
- va_list args;
- char *path;
- // XXX: implement parse of path then look up in hash if not just create
- // object where path and result are the same and return that with
- // path set and result set to resolved path - return obj handler calls
- // "do" on object to get the result inside fetched or failed callback.
- // if it's a url then we need a new classs that overrides the do and
- // begins a fetch and on finish calls the event cb or when wait is called
- /* FIXME: not working for WIndows */
- // /* <- full path
-
- path = alloca(size + 1);
-
- va_start(args, format);
- vsnprintf(path, size, format, args);
- va_end(args);
-
if (path[0] == '~')
{
char *home = NULL;
@@ -261,7 +233,8 @@ eina_vpath_resolve_snprintf(char *str, size_t size, const char *format, ...)
// ~username/ <- homedir of user "username"
else
{
- char *p, *name;
+ const char *p;
+ char *name;
for (p = path + 1; *p; p++)
{
@@ -279,60 +252,106 @@ eina_vpath_resolve_snprintf(char *str, size_t size, const char *format, ...)
{
return snprintf(str, size, "%s%s", home, path);
}
- }
- // (:xxx:)/* ... <- meta hash table
- else if ((path[0] == '(') && (path[1] == ':'))
- {
- const char *p, *end, *meta;
- char *name;
- int max_len = strlen(path);
- Eina_Bool found = EINA_FALSE;
-
- for (p = path + 2; p <= path + max_len - 2; p++)
- {
- if ((p[0] ==':') && (p[1] == ')'))
- {
- end = p;
- found = EINA_TRUE;
- break;
- }
- }
- p += 2;
-
- if (!found)
- {
- ERR("(: Needs to have a matching ':)'\nThe string was: %s", path);
- return 0;
- }
-
- if (*p != '/')
- {
- ERR("A / is expected after :)\nThe string was: %s", path);
- return 0;
- }
-
- if (found)
- {
- name = alloca(end - path);
- strncpy(name, path + 2, end - path - 2);
- name[end - path - 2] = 0;
- meta = _eina_vpath_data_get(name);
- if (meta)
- {
- return snprintf(str, size, "%s%s", meta, end + 2);
- }
- else
- {
- ERR("Meta key '%s' was not registered!\nThe string was: %s", name, path);
- return 0;
- }
- }
- }
+ }
+ // (:xxx:)/* ... <- meta hash table
+ else if (((path[0] == '(') && (path[1] == ':')) ||
+ ((path[0] == '$') && (path[1] == '{')))
+ {
+ const char *p, *end, *meta;
+ const char *msg_start, *msg_end;
+ char *name;
+ int offset;
+ Eina_Bool found = EINA_FALSE;
+
+ if (path[0] == '(')
+ {
+ end = p = strstr(path + 2, ":)");
+ offset = 2;
+ msg_start = "(:";
+ msg_end = ":)";
+ }
+ else
+ {
+ end = p = strchr(path + 2, '}');
+ offset = 1;
+ msg_start = "${";
+ msg_end = "}";
+ }
+ if (p) found = EINA_TRUE;
+ p += offset;
+
+ if (!found)
+ {
+ ERR("'%s' Needs to have a matching '%s'\nThe string was: %s", msg_start, msg_end, path);
+ return 0;
+ }
+
+ if (*p != '/')
+ {
+ ERR("A / is expected after '%s'\nThe string was: %s", msg_end, path);
+ return 0;
+ }
+
+ if (found)
+ {
+ name = alloca(end - path);
+ strncpy(name, path + 2, end - path - offset);
+ name[end - path - 2] = 0;
+ meta = _eina_vpath_data_get(name);
+ if (meta)
+ {
+ return snprintf(str, size, "%s%s", meta, end + offset);
+ }
+ else
+ {
+ ERR("Meta key '%s' was not registered!\nThe string was: %s", name, path);
+ return 0;
+ }
+ }
+ }
//just return the path, since we assume that this is a normal path
else
- {
- return snprintf(str, size, "%s", path);
- }
+ {
+ return snprintf(str, size, "%s", path);
+ }
+ str[0] = '\0';
+ return 0;
+}
+
+EAPI char *
+eina_vpath_resolve(const char* path)
+{
+ char buf[PATH_MAX];
+
+ if (_eina_vpath_resolve(path, buf, sizeof(buf)) > 0)
+ return strdup(buf);
+ return NULL;
+}
+
+EAPI int
+eina_vpath_resolve_snprintf(char *str, size_t size, const char *format, ...)
+{
+ va_list args;
+ char *path;
+ int r;
+
+ // XXX: implement parse of path then look up in hash if not just create
+ // object where path and result are the same and return that with
+ // path set and result set to resolved path - return obj handler calls
+ // "do" on object to get the result inside fetched or failed callback.
+ // if it's a url then we need a new classs that overrides the do and
+ // begins a fetch and on finish calls the event cb or when wait is called
+ /* FIXME: not working for WIndows */
+ // /* <- full path
+
+ path = alloca(size + 1);
+
+ va_start(args, format);
+ vsnprintf(path, size, format, args);
+ va_end(args);
+
+ r = _eina_vpath_resolve(path, str, size);
+ if (r > 0) return r;
ERR("The path has to start with either '~/' or '(:NAME:)/' or be a normal path \nThe string was: %s", path);
diff --git a/src/lib/eina/eina_vpath_xdg.c b/src/lib/eina/eina_vpath_xdg.c
index bd36042f5d..0db6e7836d 100644
--- a/src/lib/eina/eina_vpath_xdg.c
+++ b/src/lib/eina/eina_vpath_xdg.c
@@ -28,28 +28,36 @@ eina_xdg_env_init(void)
} while (0)
#ifdef _WIN32
-# define ENV_SET(_env, _dir, _meta) \
+# define ENV_DIR_SET(_env, _dir, _meta) \
char _meta[PATH_MAX + 128]; \
if (_env) { \
s = getenv(_env); \
if (!s) s = home; \
} else s = home; \
- if (_dir) FATAL_SNPRINTF(_meta, "vpath string '%s' truncated - fatal", "%s\\%s", s, (char *)_dir); \
- else FATAL_SNPRINTF(_meta, "vpath string '%s' truncated - fatal", "%s\\", s); \
+ FATAL_SNPRINTF(_meta, "vpath string '%s' truncated - fatal", "%s\\%s", s, (char *)_dir); \
(&user)->_meta = _meta;
- ENV_SET(NULL, "Desktop", desktop);
- ENV_SET(NULL, "Documents", documents);
- ENV_SET(NULL, "Downloads", downloads);
- ENV_SET(NULL, "Music", music);
- ENV_SET(NULL, "Pictures", pictures);
- ENV_SET("CommonProgramFiles", NULL, pub);
- ENV_SET("APPDATA", "Microsoft\\Windows\\Templates", templates);
- ENV_SET(NULL, "Videos", videos);
- ENV_SET("LOCALAPPDATA", NULL, data);
- ENV_SET("LOCALAPPDATA", "Temp", tmp);
- ENV_SET("APPDATA", NULL, config);
- ENV_SET("LOCALAPPDATA", NULL, cache);
+# define ENV_SET(_env, _meta) \
+ char _meta[PATH_MAX + 128]; \
+ if (_env) { \
+ s = getenv(_env); \
+ if (!s) s = home; \
+ } else s = home; \
+ FATAL_SNPRINTF(_meta, "vpath string '%s' truncated - fatal", "%s\\", s); \
+ (&user)->_meta = _meta;
+
+ ENV_DIR_SET(NULL, "Desktop", desktop);
+ ENV_DIR_SET(NULL, "Documents", documents);
+ ENV_DIR_SET(NULL, "Downloads", downloads);
+ ENV_DIR_SET(NULL, "Music", music);
+ ENV_DIR_SET(NULL, "Pictures", pictures);
+ ENV_SET("PUBLIC", pub);
+ ENV_DIR_SET("APPDATA", "Microsoft\\Windows\\Templates", templates);
+ ENV_DIR_SET(NULL, "Videos", videos);
+ ENV_SET("LOCALAPPDATA", data);
+ ENV_DIR_SET("LOCALAPPDATA", "Temp", tmp);
+ ENV_SET("APPDATA", config);
+ ENV_SET("LOCALAPPDATA", cache);
if (!(s = getenv("APPDATA")))
user.run = NULL;
else
diff --git a/src/lib/eio/efl_io_model.c b/src/lib/eio/efl_io_model.c
index 300dac0e21..87d219cfb0 100644
--- a/src/lib/eio/efl_io_model.c
+++ b/src/lib/eio/efl_io_model.c
@@ -496,12 +496,6 @@ _property_filename_cb(const Eo *obj, Efl_Io_Model_Data *pd)
}
static Eina_Value *
-_property_path_cb(const Eo *obj EINA_UNUSED, Efl_Io_Model_Data *pd)
-{
- return eina_value_stringshare_new(pd->path);
-}
-
-static Eina_Value *
_property_direct_info_cb(const Eo *obj, Efl_Io_Model_Data *pd)
{
_efl_io_model_info_build(obj, pd);
@@ -620,7 +614,7 @@ static struct {
const char *name;
Eina_Value *(*cb)(const Eo *obj, Efl_Io_Model_Data *pd);
} properties[] = {
- PP(filename), PP(path),
+ PP(filename),
PP(direct_info),
PP(mtime), PP(atime), PP(ctime), PP(is_dir), PP(is_lnk), PP(size),
PP(stat),
@@ -649,9 +643,7 @@ _efl_io_model_efl_model_property_get(const Eo *obj, Efl_Io_Model_Data *pd, const
!strcmp(property, properties[i].name))
return properties[i].cb(obj, pd);
- ERR("Could not find property '%s'.", property);
- // Unknow value request
- return eina_value_error_new(EFL_MODEL_ERROR_NOT_SUPPORTED);
+ return efl_model_property_get(efl_super(obj, EFL_IO_MODEL_CLASS), property);
}
static Eina_Future *
@@ -956,6 +948,8 @@ _efl_io_model_efl_model_children_slice_get(Eo *obj, Efl_Io_Model_Data *pd,
// NOTE: We are assuming here that the parent model will outlive all its children
child_data->filter.cb = pd->filter.cb,
child_data->filter.data = pd->filter.data);
+ else
+ efl_ref(info->object);
eina_value_array_append(&array, info->object);
efl_wref_add(info->object, &info->object);
diff --git a/src/lib/elementary/Efl_Ui.hh b/src/lib/elementary/Efl_Ui.hh
new file mode 100644
index 0000000000..611cdbe07f
--- /dev/null
+++ b/src/lib/elementary/Efl_Ui.hh
@@ -0,0 +1,25 @@
+#ifndef EFL_CXX_EFL_UI_HH
+#define EFL_CXX_EFL_UI_HH
+#if defined(ELEMENTARY_H) || defined(ELM_WIDGET_H) || defined(_EFL_UI_H)
+#error "Do not include Elm C API headers before including Efl_Ui.hh"
+#endif
+
+#ifndef EFL_BETA_API_SUPPORT
+#define EFL_BETA_API_SUPPORT
+#endif
+#ifndef ELM_INTERNAL_API_ARGESFSDFEFC
+#define ELM_INTERNAL_API_ARGESFSDFEFC
+#endif
+
+#include <Efl.hh>
+
+extern "C" {
+// Some Elm_* classes are built and require the old header.
+#include "Elementary.h"
+#include "Efl_Ui.h"
+}
+
+#include <Edje.hh>
+#include "Elementary.eo.hh"
+
+#endif
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 67688ea155..b7e0bd678e 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -291,6 +291,7 @@ typedef Eo Efl_Ui_Focus_Manager;
# include <efl_ui_widget_part.eo.h>
# include <efl_ui_widget_part_bg.eo.h>
# include <efl_ui_widget_part_shadow.eo.h>
+# include <efl_ui_layout.eo.h>
# include <efl_ui_layout_part.eo.h>
# include <efl_ui_layout_part_box.eo.h>
# include <efl_ui_layout_part_content.eo.h>
diff --git a/src/lib/elementary/Elementary.hh b/src/lib/elementary/Elementary.hh
deleted file mode 100644
index e5e1036e0c..0000000000
--- a/src/lib/elementary/Elementary.hh
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef EFL_CXX_ELEMENTARY_HH
-#define EFL_CXX_ELEMENTARY_HH
-#if defined(ELEMENTARY_H) || defined(ELM_WIDGET_H)
-#error "Do not include Elm C API headers before including Elementary.hh"
-#endif
-
-#ifndef EFL_BETA_API_SUPPORT
-#define EFL_BETA_API_SUPPORT
-#endif
-#ifndef ELM_INTERNAL_API_ARGESFSDFEFC
-#define ELM_INTERNAL_API_ARGESFSDFEFC
-#endif
-
-#include <Efl.hh>
-
-extern "C" {
-#include "Elementary.h"
-}
-
-#include <Edje.hh>
-#include "Elementary.eo.hh"
-
-#endif
diff --git a/src/lib/elementary/efl_access_object.eo b/src/lib/elementary/efl_access_object.eo
index 37b021e0ca..9e7dc5da0f 100644
--- a/src/lib/elementary/efl_access_object.eo
+++ b/src/lib/elementary/efl_access_object.eo
@@ -240,7 +240,7 @@ struct @beta Efl.Access.Relation
mixin @beta Efl.Access.Object requires Efl.Object
{
[[Accessibility accessible mixin]]
- eo_prefix: efl_access_object;
+ c_prefix: efl_access_object;
data: Efl_Access_Object_Data;
methods {
@property localized_role_name @protected @beta {
diff --git a/src/lib/elementary/efl_config_global.eo b/src/lib/elementary/efl_config_global.eo
index 77a04ae928..db437901e7 100644
--- a/src/lib/elementary/efl_config_global.eo
+++ b/src/lib/elementary/efl_config_global.eo
@@ -4,7 +4,7 @@ class @beta Efl.Config_Global extends Efl.Object implements Efl.Config
running application.
]]
data: null;
- eo_prefix: efl_config;
+ c_prefix: efl_config;
methods {
save @protected {
[[Saves Elementary configuration to disk.
diff --git a/src/lib/elementary/efl_page_indicator_icon.c b/src/lib/elementary/efl_page_indicator_icon.c
index 55326cfdd6..835be5b3be 100644
--- a/src/lib/elementary/efl_page_indicator_icon.c
+++ b/src/lib/elementary/efl_page_indicator_icon.c
@@ -148,7 +148,7 @@ _efl_page_indicator_icon_efl_page_indicator_bind(Eo *obj,
if (spd->pager.obj)
{
efl_ui_direction_set(spd->idbox, EFL_UI_DIR_HORIZONTAL);
- efl_pack_padding_set(spd->idbox, 15, 15, EINA_TRUE);
+ efl_gfx_arrangement_content_padding_set(spd->idbox, 15, 15, EINA_TRUE);
pd->v = eina_value_float_new(0.0);
diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c
index ce3304132d..c905ee18a2 100644
--- a/src/lib/elementary/efl_ui_box.c
+++ b/src/lib/elementary/efl_ui_box.c
@@ -52,8 +52,11 @@ _efl_ui_box_child_register(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Entity *subobj)
return EINA_FALSE;
}
- if (!efl_ui_widget_sub_object_add(obj, subobj))
- return EINA_FALSE;
+ if (!efl_ui_widget_internal_get(obj))
+ {
+ if (!efl_ui_widget_sub_object_add(obj, subobj))
+ return EINA_FALSE;
+ }
efl_key_data_set(subobj, "_elm_leaveme", obj);
efl_canvas_group_member_add(obj, subobj);
@@ -74,9 +77,16 @@ _efl_ui_box_child_unregister(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Gfx_E
ERR("subobj %p %s is not part of this widget", subobj, efl_class_name_get(subobj) );
return EINA_FALSE;
}
- if (!subobj || !_elm_widget_sub_object_redirect_to_top(obj, subobj))
+
+ if (!subobj)
return EINA_FALSE;
+ if (!efl_ui_widget_internal_get(obj))
+ {
+ if (!_elm_widget_sub_object_redirect_to_top(obj, subobj))
+ return EINA_FALSE;
+ }
+
efl_canvas_group_member_remove(obj, subobj);
efl_canvas_object_clipper_set(subobj, NULL);
efl_key_data_set(subobj, "_elm_leaveme", NULL);
@@ -180,6 +190,19 @@ _efl_ui_box_efl_object_constructor(Eo *obj, Efl_Ui_Box_Data *pd)
return obj;
}
+EOLIAN static void
+_efl_ui_box_efl_object_invalidate(Eo *obj, Efl_Ui_Box_Data *pd)
+{
+ Eo *child;
+
+ efl_invalidate(efl_super(obj, MY_CLASS));
+
+ EINA_LIST_FREE(pd->children, child)
+ {
+ efl_event_callback_array_del(child, efl_ui_box_callbacks(), obj);
+ }
+}
+
/* CLEAN API BELOW */
EOLIAN static int
@@ -382,7 +405,7 @@ _efl_ui_box_efl_ui_direction_direction_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box
}
EOLIAN static void
-_efl_ui_box_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double v, Eina_Bool scalable)
+_efl_ui_box_efl_gfx_arrangement_content_padding_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double v, Eina_Bool scalable)
{
scalable = !!scalable;
if (h < 0) h = 0;
@@ -400,7 +423,7 @@ _efl_ui_box_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, do
}
EOLIAN static void
-_efl_ui_box_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd, double *h, double *v, Eina_Bool *scalable)
+_efl_ui_box_efl_gfx_arrangement_content_padding_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd, double *h, double *v, Eina_Bool *scalable)
{
if (scalable) *scalable = pd->pad.scalable;
if (h) *h = pd->pad.h;
@@ -408,7 +431,7 @@ _efl_ui_box_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data
}
EOLIAN static void
-_efl_ui_box_efl_pack_pack_align_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double v)
+_efl_ui_box_efl_gfx_arrangement_content_align_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double v)
{
if (h < 0) h = -1;
else if (h > 1) h = 1;
@@ -425,7 +448,7 @@ _efl_ui_box_efl_pack_pack_align_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, doub
}
EOLIAN static void
-_efl_ui_box_efl_pack_pack_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd, double *h, double *v)
+_efl_ui_box_efl_gfx_arrangement_content_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd, double *h, double *v)
{
if (h) *h = pd->align.h;
if (v) *v = pd->align.v;
diff --git a/src/lib/elementary/efl_ui_box.eo b/src/lib/elementary/efl_ui_box.eo
index 5e5950cd63..fd5ea515bb 100644
--- a/src/lib/elementary/efl_ui_box.eo
+++ b/src/lib/elementary/efl_ui_box.eo
@@ -1,5 +1,5 @@
class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pack_Layout,
- Efl.Ui.Direction
+ Efl.Ui.Direction, Efl.Gfx.Arrangement
{
[[The box widget.
@@ -8,8 +8,8 @@ class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pac
By default, the box will use an internal function to set the layout to
a single row, either vertical or horizontal. This layout is affected
- by a number of parameters. The values given by @Efl.Pack.pack_padding.set
- and @Efl.Pack.pack_align.set and the hints set to each object in the box.
+ by a number of parameters. The values given by @Efl.Gfx.Arrangement.content_padding.set
+ and @Efl.Gfx.Arrangement.content_align.set and the hints set to each object in the box.
FIXME:
THIS CLASS NEEDS GOOD UP TO DATE DOCUMENTATION. LEGACY BOX AND UI BOX
@@ -29,6 +29,7 @@ class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pac
}
implements {
Efl.Object.constructor;
+ Efl.Object.invalidate;
Efl.Canvas.Group.group_calculate;
Efl.Gfx.Entity.position { set; }
Efl.Gfx.Entity.size { set; }
@@ -39,8 +40,8 @@ class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pac
Efl.Pack.unpack_all;
Efl.Pack.unpack;
Efl.Pack.pack;
- Efl.Pack.pack_padding { get; set; }
- Efl.Pack.pack_align { get; set; }
+ Efl.Gfx.Arrangement.content_padding { get; set; }
+ Efl.Gfx.Arrangement.content_align { get; set; }
Efl.Pack_Linear.pack_begin;
Efl.Pack_Linear.pack_end;
Efl.Pack_Linear.pack_before;
diff --git a/src/lib/elementary/efl_ui_button.c b/src/lib/elementary/efl_ui_button.c
index a3c1c4dbfc..28bfc8680c 100644
--- a/src/lib/elementary/efl_ui_button.c
+++ b/src/lib/elementary/efl_ui_button.c
@@ -279,61 +279,29 @@ _efl_ui_button_efl_ui_autorepeat_autorepeat_enabled_set(Eo *obj EINA_UNUSED, Efl
sd->repeating = EINA_FALSE;
}
-#define _AR_CAPABLE(obj) \
- (_internal_efl_ui_button_autorepeat_supported_get(obj))
-
-static Eina_Bool
-_internal_efl_ui_button_autorepeat_supported_get(const Evas_Object *obj)
-{
- Eina_Bool ret = EINA_FALSE;
- ret = efl_ui_autorepeat_supported_get(obj);
- return ret;
-}
-
EOLIAN static Eina_Bool
-_efl_ui_button_efl_ui_autorepeat_autorepeat_supported_get(const Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *_pd EINA_UNUSED)
+_efl_ui_button_efl_ui_autorepeat_autorepeat_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *sd)
{
- return EINA_TRUE;
-}
-
-EOLIAN static Eina_Bool
-_efl_ui_button_efl_ui_autorepeat_autorepeat_enabled_get(const Eo *obj, Efl_Ui_Button_Data *sd)
-{
- return (_AR_CAPABLE(obj) & sd->autorepeat);
+ return (sd->autorepeat);
}
EOLIAN static void
-_efl_ui_button_efl_ui_autorepeat_autorepeat_initial_timeout_set(Eo *obj, Efl_Ui_Button_Data *sd, double t)
+_efl_ui_button_efl_ui_autorepeat_autorepeat_initial_timeout_set(Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *sd, double t)
{
- if (!_AR_CAPABLE(obj))
- {
- ERR("this widget does not support auto repetition of clicks.");
- return;
- }
-
if (EINA_DBL_EQ(sd->ar_initial_timeout, t)) return;
ELM_SAFE_FREE(sd->timer, ecore_timer_del);
sd->ar_initial_timeout = t;
}
EOLIAN static double
-_efl_ui_button_efl_ui_autorepeat_autorepeat_initial_timeout_get(const Eo *obj, Efl_Ui_Button_Data *sd)
+_efl_ui_button_efl_ui_autorepeat_autorepeat_initial_timeout_get(const Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *sd)
{
- if (!_AR_CAPABLE(obj))
- return 0.0;
- else
- return sd->ar_initial_timeout;
+ return sd->ar_initial_timeout;
}
EOLIAN static void
-_efl_ui_button_efl_ui_autorepeat_autorepeat_gap_timeout_set(Eo *obj, Efl_Ui_Button_Data *sd, double t)
+_efl_ui_button_efl_ui_autorepeat_autorepeat_gap_timeout_set(Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *sd, double t)
{
- if (!_AR_CAPABLE(obj))
- {
- ERR("this widget does not support auto repetition of clicks.");
- return;
- }
-
if (EINA_DBL_EQ(sd->ar_gap_timeout, t)) return;
sd->ar_gap_timeout = t;
diff --git a/src/lib/elementary/efl_ui_button.eo b/src/lib/elementary/efl_ui_button.eo
index b126588179..7bf7f17f04 100644
--- a/src/lib/elementary/efl_ui_button.eo
+++ b/src/lib/elementary/efl_ui_button.eo
@@ -13,7 +13,6 @@ class @beta Efl.Ui.Button extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable
Efl.Ui.Autorepeat.autorepeat_initial_timeout { set; get; }
Efl.Ui.Autorepeat.autorepeat_gap_timeout { set; get; }
Efl.Ui.Autorepeat.autorepeat_enabled { set; get; }
- Efl.Ui.Autorepeat.autorepeat_supported { get;}
Efl.Ui.Widget.on_access_activate;
Efl.Ui.Widget.widget_input_event_handler;
Efl.Access.Widget.Action.elm_actions { get; }
diff --git a/src/lib/elementary/efl_ui_container_layout.c b/src/lib/elementary/efl_ui_container_layout.c
index 51934e73c7..770e55a5dc 100644
--- a/src/lib/elementary/efl_ui_container_layout.c
+++ b/src/lib/elementary/efl_ui_container_layout.c
@@ -118,12 +118,12 @@ _efl_ui_container_layout_init(Eo* obj, Efl_Ui_Container_Layout_Calc *calc)
&calc[1].margin[0], &calc[1].margin[1]);
calc[0].scale = calc[1].scale = efl_gfx_entity_scale_get(obj);
- efl_pack_padding_get(obj, &calc[0].pad, &calc[1].pad, &pad_scalable);
+ efl_gfx_arrangement_content_padding_get(obj, &calc[0].pad, &calc[1].pad, &pad_scalable);
calc[0].pad = pad_scalable ? (calc[0].pad * calc[0].scale) : calc[0].pad;
calc[1].pad = pad_scalable ? (calc[1].pad * calc[1].scale) : calc[1].pad;
// pack align is used if "no item has a weight"
- efl_pack_align_get(obj, &calc[0].align, &calc[1].align);
+ efl_gfx_arrangement_content_align_get(obj, &calc[0].align, &calc[1].align);
if (calc[0].align < 0)
{
calc[0].fill = EINA_TRUE;
diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c
index 8e0974dd12..6736249bbe 100644
--- a/src/lib/elementary/efl_ui_grid.c
+++ b/src/lib/elementary/efl_ui_grid.c
@@ -20,6 +20,29 @@
static void _grid_clear_internal(Eo *obj, Efl_Ui_Grid_Data *pd);
static void _grid_item_unpack_internal(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Ui_Grid_Item *item);
+static int
+clamp_index(Efl_Ui_Grid_Data *pd, int index)
+{
+ if (index < ((int)eina_list_count(pd->items)) * -1)
+ return -1;
+ else if (index > (int)eina_list_count(pd->items) - 1)
+ return 1;
+ return 0;
+}
+
+static int
+index_adjust(Efl_Ui_Grid_Data *pd, int index)
+{
+ int c = eina_list_count(pd->items);
+ if (index < c * -1)
+ return 0;
+ else if (index > c - 1)
+ return c - 1;
+ else if (index < 0)
+ return index + c;
+ return index;
+}
+
static void
_need_update(Efl_Ui_Grid_Data *pd)
{
@@ -931,7 +954,20 @@ _grid_item_deleted(void *data, const Efl_Event *event)
static Eina_Bool
_grid_item_process(Eo *obj, Efl_Ui_Grid_Data *pd, EINA_UNUSED Efl_Ui_Grid_Item *it)
{
- EFL_UI_GRID_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
+ if (!efl_isa(it, EFL_UI_GRID_ITEM_CLASS))
+ {
+ ERR("Item must be of type EFL_UI_GRID_ITEM_CLASS");
+ return EINA_FALSE;
+ }
+
+ if (eina_list_data_find(pd->items, it))
+ {
+ ERR("Item already added to this container!");
+ return EINA_FALSE;
+ }
+
+ if (!efl_ui_widget_sub_object_add(obj, it))
+ return EINA_FALSE;
//FIXME: This is tricky workaround for set select mode and parent value.
EFL_UI_GRID_ITEM_DATA_GET_OR_RETURN(it, gd, EINA_FALSE);
@@ -974,6 +1010,9 @@ _grid_item_unpack_internal(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Ui_Grid_Item *it)
efl_event_callback_del(it, EFL_UI_EVENT_ITEM_SELECTED, _grid_item_selected, obj);
efl_event_callback_del(it, EFL_UI_EVENT_ITEM_UNSELECTED, _grid_item_unselected, obj);
efl_event_callback_del(it, EFL_EVENT_DEL, _grid_item_deleted, obj);
+
+ efl_canvas_group_member_remove(pd->pan, it);
+ _elm_widget_sub_object_redirect_to_top(obj, it);
}
@@ -1024,6 +1063,12 @@ _efl_ui_grid_efl_pack_unpack(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Entity *subo
{
Efl_Ui_Grid_Item *item = (Efl_Ui_Grid_Item *)subobj;
+ if (!eina_list_data_find(pd->items, item))
+ {
+ ERR("Element is not part of this container");
+ return EINA_FALSE;
+ }
+
_grid_item_unpack_internal(obj, pd, item);
elm_layout_sizing_eval(obj);
@@ -1101,11 +1146,19 @@ _efl_ui_grid_efl_pack_linear_pack_at(Eo *obj,
Efl_Gfx_Entity *subobj,
int index)
{
+ int clamp = clamp_index(pd, index);
+ index = index_adjust(pd, index);
if (!_grid_item_process(obj, pd, subobj)) return EINA_FALSE;
Efl_Ui_Grid_Item *existing = eina_list_nth(pd->items, index);
EFL_UI_GRID_ITEM_DATA_GET_OR_RETURN(subobj, pid, EINA_FALSE);
- pd->items = eina_list_prepend_relative(pd->items, subobj, existing);
+ if (clamp == 0)
+ pd->items = eina_list_prepend_relative(pd->items, subobj, existing);
+ else if (clamp == 1)
+ pd->items = eina_list_append(pd->items, subobj);
+ else
+ pd->items = eina_list_prepend(pd->items, subobj);
+
// Defered item's placing in group calculation
pid->update_begin = EINA_TRUE;
_need_update(pd);
@@ -1115,20 +1168,16 @@ _efl_ui_grid_efl_pack_linear_pack_at(Eo *obj,
EOLIAN static Efl_Gfx_Entity *
_efl_ui_grid_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, int index)
{
- return eina_list_nth(pd->items, index);
+ index = index_adjust(pd, index);
+ return eina_list_nth(pd->items, index);
}
EOLIAN static Efl_Gfx_Entity *
_efl_ui_grid_efl_pack_linear_pack_unpack_at(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, int index)
{
+ index = index_adjust(pd, index);
Efl_Gfx_Entity *target = eina_list_nth(pd->items, index);
- pd->items = eina_list_remove(pd->items, target);
- /*
- if (after)
- {
- }
- else
- */
+ _grid_item_unpack_internal(obj, pd, target);
_need_update(pd);
return target;
}
@@ -1158,7 +1207,7 @@ _efl_ui_grid_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Grid_Data *pd)
}
EOLIAN static void
-_efl_ui_grid_efl_pack_pack_padding_set(Eo *obj EINA_UNUSED,
+_efl_ui_grid_efl_gfx_arrangement_content_padding_set(Eo *obj EINA_UNUSED,
Efl_Ui_Grid_Data *pd,
double h,
double v,
@@ -1175,7 +1224,7 @@ _efl_ui_grid_efl_pack_pack_padding_set(Eo *obj EINA_UNUSED,
}
EOLIAN static void
-_efl_ui_grid_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED,
+_efl_ui_grid_efl_gfx_arrangement_content_padding_get(const Eo *obj EINA_UNUSED,
Efl_Ui_Grid_Data *pd,
double *h,
double *v,
@@ -1188,7 +1237,7 @@ _efl_ui_grid_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED,
}
EOLIAN static void
-_efl_ui_grid_efl_pack_pack_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, double h, double v)
+_efl_ui_grid_efl_gfx_arrangement_content_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, double h, double v)
{
pd->item.align.w = h;
pd->item.align.h = v;
@@ -1196,7 +1245,7 @@ _efl_ui_grid_efl_pack_pack_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd,
}
EOLIAN static void
-_efl_ui_grid_efl_pack_pack_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, double *h, double *v)
+_efl_ui_grid_efl_gfx_arrangement_content_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, double *h, double *v)
{
*h = pd->item.align.w;
*v = pd->item.align.h;
diff --git a/src/lib/elementary/efl_ui_grid.eo b/src/lib/elementary/efl_ui_grid.eo
index 6c70f36c39..54de96d210 100644
--- a/src/lib/elementary/efl_ui_grid.eo
+++ b/src/lib/elementary/efl_ui_grid.eo
@@ -7,7 +7,8 @@ class @beta Efl.Ui.Grid extends Efl.Ui.Layout_Base implements
Efl.Ui.Direction,
Efl.Ui.Clickable,
Efl.Ui.Selectable,
- Efl.Ui.Multi_Selectable
+ Efl.Ui.Multi_Selectable,
+ Efl.Gfx.Arrangement
{
[[Simple grid widget with Pack interface.]]
methods {
@@ -84,8 +85,8 @@ class @beta Efl.Ui.Grid extends Efl.Ui.Layout_Base implements
Efl.Pack_Linear.pack_content_get;
Efl.Pack_Layout.layout_update;
Efl.Pack_Layout.layout_request;
- Efl.Pack.pack_padding { get; set; }
- Efl.Pack.pack_align { get; set; }
+ Efl.Gfx.Arrangement.content_padding { get; set; }
+ Efl.Gfx.Arrangement.content_align { get; set; }
//Efl.Ui.Scrollable
Efl.Ui.Scrollable_Interactive.match_content { set; }
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 63f9491467..fa47bc1d1f 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -1010,8 +1010,11 @@ _efl_ui_layout_content_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, Ev
if (!strcmp(part, sub_d->part))
{
if (content == sub_d->obj) goto end;
- _eo_unparent_helper(sub_d->obj, obj);
- evas_object_del(sub_d->obj);
+ if (efl_alive_get(sub_d->obj))
+ {
+ _eo_unparent_helper(sub_d->obj, obj);
+ evas_object_del(sub_d->obj);
+ }
break;
}
/* was previously swallowed at another part -- mimic
diff --git a/src/lib/elementary/efl_ui_layout_base.eo b/src/lib/elementary/efl_ui_layout_base.eo
index a3401c865e..1923bddefa 100644
--- a/src/lib/elementary/efl_ui_layout_base.eo
+++ b/src/lib/elementary/efl_ui_layout_base.eo
@@ -10,7 +10,7 @@ abstract Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container,
@since 1.22
]]
- eo_prefix: efl_ui_layout;
+ c_prefix: efl_ui_layout;
data: Efl_Ui_Layout_Data;
methods {
@property theme {
diff --git a/src/lib/elementary/efl_ui_list.c b/src/lib/elementary/efl_ui_list.c
index 978aae3271..27ed153001 100644
--- a/src/lib/elementary/efl_ui_list.c
+++ b/src/lib/elementary/efl_ui_list.c
@@ -880,36 +880,36 @@ _efl_ui_list_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_List_Data *pd)
}
EOLIAN static void
-_efl_ui_list_efl_pack_pack_padding_set(Eo *obj EINA_UNUSED,
+_efl_ui_list_efl_gfx_arrangement_content_padding_set(Eo *obj EINA_UNUSED,
Efl_Ui_List_Data *pd,
double h,
double v,
Eina_Bool scalable)
{
- efl_pack_padding_set(pd->box, h, v, scalable);
+ efl_gfx_arrangement_content_padding_set(pd->box, h, v, scalable);
}
EOLIAN static void
-_efl_ui_list_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED,
+_efl_ui_list_efl_gfx_arrangement_content_padding_get(const Eo *obj EINA_UNUSED,
Efl_Ui_List_Data *pd,
double *h,
double *v,
Eina_Bool *scalable)
{
- efl_pack_padding_get(pd->box, h, v, scalable);
+ efl_gfx_arrangement_content_padding_get(pd->box, h, v, scalable);
}
/* FIXME: align could not work properly on the list
EOLIAN static void
- _efl_ui_list_efl_pack_pack_align_set(Eo *obj, Efl_Ui_List_Data *pd, double h, double v)
+ _efl_ui_list_efl_gfx_arrangement_content_align_set(Eo *obj, Efl_Ui_List_Data *pd, double h, double v)
{
- efl_pack_align_set(pd->box, h, v);
+ efl_gfx_arrangement_content_align_set(pd->box, h, v);
}
EOLIAN static void
- _efl_ui_list_efl_pack_pack_align_get(Eo *obj EINA_UNUSED, Efl_Ui_List_Data *pd, double *h, double *v)
+ _efl_ui_list_efl_gfx_arrangement_content_align_get(Eo *obj EINA_UNUSED, Efl_Ui_List_Data *pd, double *h, double *v)
{
- efl_pack_align_get(pd->box, &h, &v);
+ efl_gfx_arrangement_content_align_get(pd->box, &h, &v);
}
*/
diff --git a/src/lib/elementary/efl_ui_list.eo b/src/lib/elementary/efl_ui_list.eo
index 8a77e37261..d09288ef78 100644
--- a/src/lib/elementary/efl_ui_list.eo
+++ b/src/lib/elementary/efl_ui_list.eo
@@ -6,7 +6,8 @@ class @beta Efl.Ui.List extends Efl.Ui.Layout_Base implements
Efl.Pack_Linear, Efl.Pack_Layout,
Efl.Ui.Clickable,
Efl.Ui.Selectable,
- Efl.Ui.Multi_Selectable
+ Efl.Ui.Multi_Selectable,
+ Efl.Gfx.Arrangement
{
[[Simple list widget with Pack interface.]]
methods {
@@ -74,8 +75,7 @@ class @beta Efl.Ui.List extends Efl.Ui.Layout_Base implements
Efl.Pack_Linear.pack_index_get;
Efl.Pack_Layout.layout_update;
Efl.Pack_Layout.layout_request;
- Efl.Pack.pack_padding { get; set; }
- //Efl.Pack.pack_align { get; set; }
+ Efl.Gfx.Arrangement.content_padding { get; set; }
//Efl.Ui.Scrollable
Efl.Ui.Scrollable_Interactive.match_content { set; }
diff --git a/src/lib/elementary/efl_ui_navigation_bar.c b/src/lib/elementary/efl_ui_navigation_bar.c
index d693a52838..6df57fd461 100644
--- a/src/lib/elementary/efl_ui_navigation_bar.c
+++ b/src/lib/elementary/efl_ui_navigation_bar.c
@@ -58,7 +58,6 @@ _efl_ui_navigation_bar_efl_object_constructor(Eo *obj, Efl_Ui_Navigation_Bar_Dat
/* Standard widget overrides */
-ELM_PART_CONTENT_DEFAULT_IMPLEMENT(efl_ui_navigation_bar, Efl_Ui_Navigation_Bar_Data)
ELM_PART_TEXT_DEFAULT_GET(efl_ui_navigation_bar, "efl.text")
ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_navigation_bar, Efl_Ui_Navigation_Bar_Data)
diff --git a/src/lib/elementary/efl_ui_navigation_bar.eo b/src/lib/elementary/efl_ui_navigation_bar.eo
index 318b307ca2..3f6ba8b93a 100644
--- a/src/lib/elementary/efl_ui_navigation_bar.eo
+++ b/src/lib/elementary/efl_ui_navigation_bar.eo
@@ -1,4 +1,4 @@
-class @beta Efl.Ui.Navigation_Bar extends Efl.Ui.Layout_Base implements Efl.Content, Efl.Text
+class @beta Efl.Ui.Navigation_Bar extends Efl.Ui.Layout_Base implements Efl.Text
{
[[Navigation_Bar widget.
@@ -21,8 +21,6 @@ class @beta Efl.Ui.Navigation_Bar extends Efl.Ui.Layout_Base implements Efl.Cont
}
implements {
Efl.Object.constructor;
- Efl.Content.content { set; get; }
- Efl.Content.content_unset;
Efl.Text.text { set; get; }
Efl.Ui.L10n.l10n_text { set; get; }
Efl.Part.part_get;
diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c
index efa77f8314..69e89adf0a 100644
--- a/src/lib/elementary/efl_ui_pager.c
+++ b/src/lib/elementary/efl_ui_pager.c
@@ -11,6 +11,30 @@
#define MY_CLASS EFL_UI_PAGER_CLASS
+static void _unpack(Eo *obj, Efl_Ui_Pager_Data *pd, Efl_Gfx_Entity *subobj, int index);
+
+static int
+clamp_index(Efl_Ui_Pager_Data *pd, int index)
+{
+ if (index < ((int)eina_list_count(pd->content_list)) * -1)
+ return -1;
+ else if (index > (int)eina_list_count(pd->content_list) - 1)
+ return 1;
+ return 0;
+}
+
+static int
+index_rollover(Efl_Ui_Pager_Data *pd, int index)
+{
+ int c = eina_list_count(pd->content_list);
+ if (index < c * -1)
+ return 0;
+ else if (index > c - 1)
+ return c - 1;
+ else if (index < 0)
+ return index + c;
+ return index;
+}
static void
_efl_ui_pager_update(Efl_Ui_Pager_Data *pd)
@@ -360,6 +384,7 @@ _efl_ui_pager_efl_object_constructor(Eo *obj,
efl_event_callback_add(pd->page_root, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _move_cb, pd);
pd->page_box = efl_add(EFL_UI_BOX_CLASS, obj);
+ efl_ui_widget_internal_set(pd->page_box, EINA_TRUE);
efl_canvas_group_member_add(pd->page_root, pd->page_box);
pd->foreclip = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
@@ -397,57 +422,76 @@ _efl_ui_pager_efl_container_content_count(Eo *obj EINA_UNUSED,
return pd->cnt;
}
-EOLIAN static Eina_Bool
-_efl_ui_pager_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED,
- Efl_Ui_Pager_Data *pd,
- Efl_Gfx_Entity *subobj)
+static void
+_child_inv(void *data, const Efl_Event *ev)
{
- if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
+ Efl_Ui_Pager_Data *pd = efl_data_scope_get(data, EFL_UI_PAGER_CLASS);
+ int index = eina_list_data_idx(pd->content_list, ev->object);
- pd->content_list = eina_list_prepend(pd->content_list, subobj);
+ pd->content_list = eina_list_remove(pd->content_list, ev->object);
- pd->cnt++;
- pd->curr.page++;
+ if (((index == pd->curr.page) && ((index != 0) || (pd->cnt == 0))) ||
+ (index < pd->curr.page))
+ pd->curr.page--;
+ pd->cnt--;
+}
- if (pd->transition)
- efl_page_transition_pack(pd->transition, 0);
- else
+static Eina_Bool
+_register_child(Eo *obj EINA_UNUSED, Efl_Ui_Pager_Data *pd, Efl_Gfx_Entity *subobj)
+{
+ if (eina_list_data_find(pd->content_list, subobj))
{
- if (pd->cnt == 1)
- efl_pack(pd->page_box, subobj);
- else efl_canvas_object_clipper_set(subobj, pd->backclip);
+ ERR("Object already added!");
+ return EINA_FALSE;
}
+ if (!efl_ui_widget_sub_object_add(obj, subobj))
+ return EINA_FALSE;
- if (pd->indicator)
- efl_page_indicator_pack(pd->indicator, 0);
+ if (!pd->transition)
+ efl_canvas_object_clipper_set(subobj, pd->backclip);
+
+ efl_event_callback_add(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
return EINA_TRUE;
}
-EOLIAN static Eina_Bool
-_efl_ui_pager_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED,
- Efl_Ui_Pager_Data *pd,
- Efl_Gfx_Entity *subobj)
+static void
+_update_internals(Eo *obj EINA_UNUSED, Efl_Ui_Pager_Data *pd, Efl_Gfx_Entity *subobj EINA_UNUSED, int index)
{
- if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
-
- pd->content_list = eina_list_append(pd->content_list, subobj);
-
pd->cnt++;
- if (pd->curr.page == -1) pd->curr.page = 0;
+
+ if (pd->curr.page >= index)
+ pd->curr.page++;
if (pd->transition)
- efl_page_transition_pack(pd->transition, (pd->cnt - 1));
- else
- {
- if (pd->cnt == 1)
- efl_pack(pd->page_box, subobj);
- else efl_canvas_object_clipper_set(subobj, pd->backclip);
- }
+ efl_page_transition_pack(pd->transition, index);
if (pd->indicator)
- efl_page_indicator_pack(pd->indicator, (pd->cnt - 1));
+ efl_page_transition_pack(pd->indicator, index);
+ if (pd->cnt == 1)
+ efl_ui_pager_current_page_set(obj, 0);
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_pager_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED,
+ Efl_Ui_Pager_Data *pd,
+ Efl_Gfx_Entity *subobj)
+{
+ if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
+ pd->content_list = eina_list_prepend(pd->content_list, subobj);
+ _update_internals(obj, pd, subobj, 0);
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_pager_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED,
+ Efl_Ui_Pager_Data *pd,
+ Efl_Gfx_Entity *subobj)
+{
+ if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
+ pd->content_list = eina_list_append(pd->content_list, subobj);
+ _update_internals(obj, pd, subobj, eina_list_count(pd->content_list) - 1);
return EINA_TRUE;
}
@@ -457,23 +501,11 @@ _efl_ui_pager_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED,
Efl_Gfx_Entity *subobj,
const Efl_Gfx_Entity *existing)
{
- if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
-
+ if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
int index = eina_list_data_idx(pd->content_list, (void *)existing);
if (index == -1) return EINA_FALSE;
-
pd->content_list = eina_list_prepend_relative(pd->content_list, subobj, existing);
-
- pd->cnt++;
- if (pd->curr.page >= index) pd->curr.page++;
-
- if (pd->transition)
- efl_page_transition_pack(pd->transition, index);
- else efl_canvas_object_clipper_set(subobj, pd->backclip);
-
- if (pd->indicator)
- efl_page_indicator_pack(pd->indicator, index);
-
+ _update_internals(obj, pd, subobj, index);
return EINA_TRUE;
}
@@ -483,23 +515,11 @@ _efl_ui_pager_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED,
Efl_Gfx_Entity *subobj,
const Efl_Gfx_Entity *existing)
{
- if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
-
+ if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
int index = eina_list_data_idx(pd->content_list, (void *)existing);
if (index == -1) return EINA_FALSE;
-
pd->content_list = eina_list_append_relative(pd->content_list, subobj, existing);
-
- pd->cnt++;
- if (pd->curr.page > index) pd->curr.page++;
-
- if (pd->transition)
- efl_page_transition_pack(pd->transition, (index + 1));
- else efl_canvas_object_clipper_set(subobj, pd->backclip);
-
- if (pd->indicator)
- efl_page_indicator_pack(pd->indicator, (index + 1));
-
+ _update_internals(obj, pd, subobj, index + 1);
return EINA_TRUE;
}
@@ -509,13 +529,7 @@ _efl_ui_pager_efl_pack_linear_pack_at(Eo *obj,
Efl_Gfx_Entity *subobj,
int index)
{
- if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
-
- if ((index > pd->cnt) || (index < 0))
- {
- return EINA_FALSE;
- }
- else if (index == pd->cnt)
+ if (index == pd->cnt)
{
_efl_ui_pager_efl_pack_linear_pack_end(obj, pd, subobj);
}
@@ -523,19 +537,26 @@ _efl_ui_pager_efl_pack_linear_pack_at(Eo *obj,
{
Efl_Gfx_Entity *existing = NULL;
- existing = eina_list_nth(pd->content_list, index);
- pd->content_list = eina_list_prepend_relative(
- pd->content_list, subobj, existing);
-
- pd->cnt++;
- if (pd->curr.page >= index) pd->curr.page++;
-
- if (pd->transition)
- efl_page_transition_pack(pd->transition, index);
- else efl_canvas_object_clipper_set(subobj, pd->backclip);
-
- if (pd->indicator)
- efl_page_indicator_pack(pd->indicator, index);
+ if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
+ int clamp = clamp_index(pd, index);
+ int pass_index = -1;
+ if (clamp == 0)
+ {
+ existing = eina_list_nth(pd->content_list, index_rollover(pd, index));
+ pd->content_list = eina_list_prepend_relative(
+ pd->content_list, subobj, existing);
+ }
+ else if (clamp == 1)
+ {
+ pd->content_list = eina_list_append(pd->content_list, subobj);
+ pass_index = eina_list_count(pd->content_list);
+ }
+ else
+ {
+ pd->content_list = eina_list_prepend(pd->content_list, subobj);
+ pass_index = 0;
+ }
+ _update_internals(obj, pd, subobj, pass_index);
}
return EINA_TRUE;
@@ -546,7 +567,7 @@ _efl_ui_pager_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED,
Efl_Ui_Pager_Data *pd,
int index)
{
- return eina_list_nth(pd->content_list, index);
+ return eina_list_nth(pd->content_list, index_rollover(pd, index));
}
EOLIAN static int
@@ -578,7 +599,8 @@ _efl_ui_pager_current_page_set(Eo *obj,
Eo *curr;
curr = eina_list_nth(pd->content_list, pd->curr.page);
- efl_pack_unpack(pd->page_box, curr);
+ if (curr)
+ efl_pack_unpack(pd->page_box, curr);
efl_canvas_object_clipper_set(curr, pd->backclip);
pd->curr.page = index;
@@ -681,6 +703,7 @@ _efl_ui_pager_indicator_set(Eo *obj EINA_UNUSED,
if (!pd->idbox)
{
pd->idbox = efl_add(EFL_UI_BOX_CLASS, obj);
+ efl_ui_widget_internal_set(pd->idbox, EINA_TRUE);
efl_content_set(efl_part(obj, "efl.indicator"), pd->idbox);
}
@@ -796,7 +819,8 @@ _efl_ui_pager_loop_mode_get(const Eo *obj EINA_UNUSED,
}
static void
-_unpack_all(Efl_Ui_Pager_Data *pd,
+_unpack_all(Eo *obj EINA_UNUSED,
+ Efl_Ui_Pager_Data *pd,
Eina_Bool clear)
{
Eo *subobj;
@@ -812,18 +836,26 @@ _unpack_all(Efl_Ui_Pager_Data *pd,
else
{
subobj = eina_list_nth(pd->content_list, pd->curr.page);
- efl_pack_unpack(pd->page_box, subobj);
+ if (subobj)
+ efl_pack_unpack(pd->page_box, subobj);
+ pd->curr.page = -1;
}
if (clear)
{
EINA_LIST_FREE(pd->content_list, subobj)
- evas_object_del(subobj);
+ {
+ efl_event_callback_del(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
+ evas_object_del(subobj);
+ }
}
else
{
EINA_LIST_FREE(pd->content_list, subobj)
- efl_canvas_object_clipper_set(subobj, NULL);
+ {
+ efl_event_callback_del(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
+ efl_canvas_object_clipper_set(subobj, NULL);
+ }
}
if (pd->indicator)
@@ -836,7 +868,7 @@ EOLIAN static Eina_Bool
_efl_ui_pager_efl_pack_pack_clear(Eo *obj EINA_UNUSED,
Efl_Ui_Pager_Data *pd)
{
- _unpack_all(pd, EINA_TRUE);
+ _unpack_all(obj, pd, EINA_TRUE);
return EINA_TRUE;
}
@@ -845,7 +877,7 @@ EOLIAN static Eina_Bool
_efl_ui_pager_efl_pack_unpack_all(Eo *obj EINA_UNUSED,
Efl_Ui_Pager_Data *pd)
{
- _unpack_all(pd, EINA_FALSE);
+ _unpack_all(obj, pd, EINA_FALSE);
return EINA_TRUE;
}
@@ -856,8 +888,11 @@ _unpack(Eo *obj,
Efl_Gfx_Entity *subobj,
int index)
{
+ int self_index = eina_list_data_idx(pd->content_list, subobj);
+ int self_curr_page = pd->curr.page;
pd->content_list = eina_list_remove(pd->content_list, subobj);
pd->cnt--;
+ _elm_widget_sub_object_redirect_to_top(obj, subobj);
if (((index == pd->curr.page) && ((index != 0) || (pd->cnt == 0))) ||
(index < pd->curr.page))
@@ -876,13 +911,19 @@ _unpack(Eo *obj,
}
else
{
- efl_pack_unpack(pd->page_box, subobj);
- if (pd->curr.page != -1)
- efl_pack(pd->page_box, eina_list_nth(pd->content_list, pd->curr.page));
+ if (self_curr_page == self_index)
+ {
+ efl_pack_unpack(pd->page_box, subobj);
+ self_curr_page = pd->curr.page;
+ pd->curr.page = -1;
+ efl_ui_pager_current_page_set(obj, self_curr_page);
+ }
}
if (pd->indicator)
efl_page_indicator_unpack(pd->indicator, index);
+
+ efl_event_callback_del(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
}
EOLIAN static Eina_Bool
@@ -890,12 +931,14 @@ _efl_ui_pager_efl_pack_unpack(Eo *obj,
Efl_Ui_Pager_Data *pd,
Efl_Gfx_Entity *subobj)
{
- if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
-
if (!subobj) return EINA_FALSE;
int index = eina_list_data_idx(pd->content_list, subobj);
- if (index == -1) return EINA_FALSE;
+ if (index == -1)
+ {
+ ERR("You can only unpack items that have been added before");
+ return EINA_FALSE;
+ }
_unpack(obj, pd, subobj, index);
@@ -907,17 +950,24 @@ _efl_ui_pager_efl_pack_linear_pack_unpack_at(Eo *obj,
Efl_Ui_Pager_Data *pd,
int index)
{
- if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return NULL;
-
- if ((index >= pd->cnt) || (index < 0)) return NULL;
-
- Efl_Gfx_Entity *subobj = eina_list_nth(pd->content_list, index);
+ Efl_Gfx_Entity *subobj = eina_list_nth(pd->content_list, index_rollover(pd, index_rollover(pd, index)));
_unpack(obj, pd, subobj, index);
return subobj;
}
+EOLIAN static Eina_Bool
+_efl_ui_pager_efl_pack_pack(Eo *obj, Efl_Ui_Pager_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj)
+{
+ return efl_pack_begin(obj, subobj);
+}
+
+EOLIAN static Eina_Iterator*
+_efl_ui_pager_efl_container_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Pager_Data *pd)
+{
+ return eina_list_iterator_new(pd->content_list);
+}
#include "efl_ui_pager.eo.c"
diff --git a/src/lib/elementary/efl_ui_pager.eo b/src/lib/elementary/efl_ui_pager.eo
index 646be5accd..7879132d26 100644
--- a/src/lib/elementary/efl_ui_pager.eo
+++ b/src/lib/elementary/efl_ui_pager.eo
@@ -92,9 +92,11 @@ class @beta Efl.Ui.Pager extends Efl.Ui.Layout_Base implements Efl.Pack_Linear
Efl.Object.constructor;
Efl.Object.invalidate;
Efl.Container.content_count;
+ Efl.Container.content_iterate;
Efl.Pack.pack_clear; //TODO
Efl.Pack.unpack_all; //TODO
Efl.Pack.unpack; //TODO
+ Efl.Pack.pack;
Efl.Pack_Linear.pack_begin;
Efl.Pack_Linear.pack_end;
Efl.Pack_Linear.pack_before;
diff --git a/src/lib/elementary/efl_ui_panel.c b/src/lib/elementary/efl_ui_panel.c
index 84aa6f08d9..bfa7a9391d 100644
--- a/src/lib/elementary/efl_ui_panel.c
+++ b/src/lib/elementary/efl_ui_panel.c
@@ -711,24 +711,36 @@ _efl_ui_panel_efl_ui_widget_widget_input_event_handler(Eo *obj, Efl_Ui_Panel_Dat
return _panel_efl_ui_widget_widget_input_event_handler(obj, pd, eo_event, src);
}
+static void
+_invalidate_cb(void *data, const Efl_Event *ev EINA_UNUSED)
+{
+ efl_content_set(data, NULL);
+}
+
static Eina_Bool
_efl_ui_panel_efl_content_content_set(Eo *obj, Efl_Ui_Panel_Data *sd, Efl_Gfx_Entity *content)
{
if (sd->content == content) return EINA_TRUE;
+
if (sd->content)
- evas_object_box_remove_all(sd->bx, EINA_TRUE);
+ {
+ efl_event_callback_del(sd->content, EFL_EVENT_INVALIDATE, _invalidate_cb, obj);
+ if (!efl_invalidated_get(sd->content) && !efl_invalidating_get(sd->content))
+ efl_del(sd->content);
+ sd->content = NULL;
+ }
+ if (content && !elm_widget_sub_object_add(obj, content)) return EINA_FALSE;
sd->content = content;
- if (content)
+ if (sd->content)
{
+ efl_event_callback_add(sd->content, EFL_EVENT_INVALIDATE, _invalidate_cb, obj);
evas_object_box_append(sd->bx, sd->content);
evas_object_show(sd->content);
if (sd->scrollable)
elm_widget_sub_object_add(sd->scr_ly, sd->content);
- else
- elm_widget_sub_object_add(obj, sd->content);
}
efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, content);
- if (efl_finalized_get(obj))
+ if (efl_alive_get(obj))
elm_layout_sizing_eval(obj);
return EINA_TRUE;
@@ -741,18 +753,10 @@ _efl_ui_panel_efl_content_content_get(const Eo *obj EINA_UNUSED, Efl_Ui_Panel_Da
}
static Efl_Gfx_Entity*
-_efl_ui_panel_efl_content_content_unset(Eo *obj EINA_UNUSED, Efl_Ui_Panel_Data *sd)
+_efl_ui_panel_efl_content_content_unset(Eo *obj EINA_UNUSED, Efl_Ui_Panel_Data *sd EINA_UNUSED)
{
- Efl_Gfx_Entity *ret = NULL;
-
- if (!sd->content) return NULL;
- ret = sd->content;
-
- evas_object_box_remove_all(sd->bx, EINA_FALSE);
- if (sd->scrollable)
- _elm_widget_sub_object_redirect_to_top(sd->scr_ly, sd->content);
- sd->content = NULL;
- efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, NULL);
+ Efl_Gfx_Entity *ret = efl_content_get(obj);
+ efl_content_set(obj, NULL);
return ret;
}
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index 47ef65b4a9..341de7e750 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -112,6 +112,8 @@ _efl_ui_popup_efl_ui_widget_widget_parent_set(Eo *obj, Efl_Ui_Popup_Data *pd EIN
efl_event_callback_add(pd->win_parent, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _parent_geom_cb, obj);
efl_event_callback_add(pd->win_parent, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _parent_geom_cb, obj);
+
+ efl_ui_widget_parent_set(efl_super(obj, MY_CLASS), parent);
}
EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_progressbar.eo b/src/lib/elementary/efl_ui_progressbar.eo
index af84fc986c..d3301a81f3 100644
--- a/src/lib/elementary/efl_ui_progressbar.eo
+++ b/src/lib/elementary/efl_ui_progressbar.eo
@@ -15,7 +15,7 @@ class @beta Efl.Ui.Progressbar extends Efl.Ui.Layout_Base implements Efl.Ui.Rang
without showing the precise progress rate. In the default theme, it will
animate the bar with content, switching constantly between filling it and back
to non-filled in a loop. To start and stop this pulsing
- animation you need to explicitly call efl_ui_progressbar_pulse_set().
+ animation you need to explicitly call @.pulse.set().
]]
set {
@@ -30,11 +30,11 @@ class @beta Efl.Ui.Progressbar extends Efl.Ui.Layout_Base implements Efl.Ui.Rang
set {
[[Start/stop a given progress bar "pulsing" animation, if its under that mode
- Note: This call won't do anything if $obj is not under "pulsing mode".
+ Note: This call won't do anything if $obj is not under "pulsing mode". See @.pulse_mode.
]]
}
get {
- [[ Get the pulsing state on a given progressbar widget.
+ [[ Get the pulsing state on a given progressbar widget. See @.pulse_mode.
]]
}
values {
diff --git a/src/lib/elementary/efl_ui_relative_layout.c b/src/lib/elementary/efl_ui_relative_layout.c
index fa47d7591c..530179cab4 100644
--- a/src/lib/elementary/efl_ui_relative_layout.c
+++ b/src/lib/elementary/efl_ui_relative_layout.c
@@ -24,11 +24,44 @@ _chain_sort_cb(const void *l1, const void *l2)
return calc2->comp_factor <= calc1->comp_factor ? -1 : 1;
}
+static void
+_on_child_size_changed(void *data, const Efl_Event *event EINA_UNUSED)
+{
+ Efl_Ui_Relative_Layout *obj = data;
+
+ efl_pack_layout_request(obj);
+}
+
+static void
+_on_child_hints_changed(void *data, const Efl_Event *event EINA_UNUSED)
+{
+ Efl_Ui_Relative_Layout *obj = data;
+
+ efl_pack_layout_request(obj);
+}
+
+static void
+_on_child_del(void *data, const Efl_Event *event)
+{
+ Efl_Ui_Relative_Layout *obj = data;
+
+ efl_pack_unpack(obj, event->object);
+}
+
+EFL_CALLBACKS_ARRAY_DEFINE(efl_ui_relative_layout_callbacks,
+ { EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _on_child_size_changed },
+ { EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _on_child_hints_changed },
+ { EFL_EVENT_DEL, _on_child_del }
+);
+
static Efl_Ui_Relative_Layout_Child *
_efl_ui_relative_layout_register(Efl_Ui_Relative_Layout_Data *pd, Eo *child)
{
Efl_Ui_Relative_Layout_Child *rc;
+ if (!efl_ui_widget_sub_object_add(pd->obj, child))
+ return NULL;
+
rc = calloc(1, sizeof(Efl_Ui_Relative_Layout_Child));
if (!rc) return NULL;
@@ -43,19 +76,11 @@ _efl_ui_relative_layout_register(Efl_Ui_Relative_Layout_Data *pd, Eo *child)
rc->rel[BOTTOM].to = rc->layout;
rc->rel[BOTTOM].relative = 1.0;
- if (pd->obj == child)
- {
- rc->calc.state[0] = RELATIVE_CALC_DONE;
- rc->calc.state[1] = RELATIVE_CALC_DONE;
- rc->calc.chain_state[0] = RELATIVE_CALC_DONE;
- rc->calc.chain_state[1] = RELATIVE_CALC_DONE;
- }
- else
- {
- efl_ui_widget_sub_object_add(pd->obj, child);
- efl_canvas_group_member_add(pd->obj, child);
- efl_canvas_group_change(pd->obj);
- }
+ efl_key_data_set(child, "_elm_leaveme", pd->obj);
+ efl_canvas_object_clipper_set(child, pd->clipper);
+ efl_event_callback_array_add(child, efl_ui_relative_layout_callbacks(), pd->obj);
+ efl_canvas_group_member_add(pd->obj, child);
+ efl_canvas_group_change(pd->obj);
eina_hash_add(pd->children, &child, rc);
@@ -75,13 +100,19 @@ _relative_child_get(Efl_Ui_Relative_Layout_Data *pd, Eo *child)
}
static Efl_Ui_Relative_Layout_Child *
-_relative_child_find(const Eina_Hash *children, Eo *target)
+_relative_child_find(Efl_Ui_Relative_Layout_Data *pd, Eo *target)
{
Efl_Ui_Relative_Layout_Child *child;
- child = eina_hash_find(children, &target);
+ if (pd->obj == target)
+ return pd->base;
+
+ child = eina_hash_find(pd->children, &target);
if (!child)
- ERR("target(%p(%s)) is not registered", target, efl_class_name_get(target));
+ {
+ ERR("target(%p(%s)) is not registered", target, efl_class_name_get(target));
+ child = pd->base;
+ }
return child;
}
@@ -90,7 +121,7 @@ static void
_child_aspect_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis)
{
Efl_Ui_Relative_Layout_Calc *calc = &child->calc;
- int temph;
+ double temph;
if ((calc->aspect[0] <= 0) || (calc->aspect[1] <= 0))
{
@@ -331,19 +362,26 @@ _hash_free_cb(void *data)
{
Efl_Ui_Relative_Layout_Child *child = data;
+ efl_canvas_group_member_remove(child->layout, child->obj);
+ efl_canvas_object_clipper_set(child->obj, NULL);
+ efl_key_data_set(child->obj, "_elm_leaveme", NULL);
+ efl_event_callback_array_del(child->obj, efl_ui_relative_layout_callbacks(),
+ child->layout);
+
+ if (!efl_invalidated_get(child->obj))
+ _elm_widget_sub_object_redirect_to_top(child->layout, child->obj);
+
free(child);
}
-static Eina_Bool
-_hash_free_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
- void *data, void *fdata EINA_UNUSED)
+static void
+_hash_clear_cb(void *data)
{
Efl_Ui_Relative_Layout_Child *child = data;
- _elm_widget_sub_object_redirect_to_top(child->layout, child->obj);
- _hash_free_cb(child);
-
- return EINA_TRUE;
+ efl_event_callback_array_del(child->obj, efl_ui_relative_layout_callbacks(),
+ child->layout);
+ efl_del(child->obj);
}
static Eina_Bool
@@ -353,9 +391,6 @@ _hash_child_calc_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key E
Efl_Ui_Relative_Layout_Child *child = data;
Eina_Rect want;
- if (child->obj == child->layout)
- return EINA_TRUE;
-
_child_calc(child, 0);
_child_calc(child, 1);
@@ -370,35 +405,18 @@ _hash_child_calc_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key E
static Eina_Bool
-_hash_child_init_foreach_cb(const Eina_Hash *hash, const void *key EINA_UNUSED,
- void *data, void *fdata EINA_UNUSED)
+_hash_child_init_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
+ void *data, void *fdata)
{
Eina_Size2D max, min, aspect;
Efl_Ui_Relative_Layout_Child *child = data;
Efl_Ui_Relative_Layout_Calc *calc = &(child->calc);
+ Efl_Ui_Relative_Layout_Data *pd = fdata;
- calc->to[LEFT] = _relative_child_find(hash, child->rel[LEFT].to);
- if (!calc->to[LEFT]) calc->to[LEFT] = eina_hash_find(hash, &child->layout);
- calc->to[RIGHT] = _relative_child_find(hash, child->rel[RIGHT].to);
- if (!calc->to[RIGHT]) calc->to[RIGHT] = eina_hash_find(hash, &child->layout);
- calc->to[TOP] = _relative_child_find(hash, child->rel[TOP].to);
- if (!calc->to[TOP]) calc->to[TOP] = eina_hash_find(hash, &child->layout);
- calc->to[BOTTOM] = _relative_child_find(hash, child->rel[BOTTOM].to);
- if (!calc->to[BOTTOM]) calc->to[BOTTOM] = eina_hash_find(hash, &child->layout);
-
- if (child->obj == child->layout)
- {
- Eina_Rect want = efl_gfx_entity_geometry_get(child->obj);
- calc->want[0].position = want.x;
- calc->want[0].length = want.w;
- calc->want[1].position = want.y;
- calc->want[1].length = want.h;
- calc->state[0] = RELATIVE_CALC_DONE;
- calc->state[1] = RELATIVE_CALC_DONE;
- calc->chain_state[0] = RELATIVE_CALC_DONE;
- calc->chain_state[1] = RELATIVE_CALC_DONE;
- return EINA_TRUE;
- }
+ calc->to[LEFT] = _relative_child_find(pd, child->rel[LEFT].to);
+ calc->to[RIGHT] = _relative_child_find(pd, child->rel[RIGHT].to);
+ calc->to[TOP] = _relative_child_find(pd, child->rel[TOP].to);
+ calc->to[BOTTOM] = _relative_child_find(pd, child->rel[BOTTOM].to);
calc->state[0] = RELATIVE_CALC_NONE;
calc->state[1] = RELATIVE_CALC_NONE;
@@ -446,16 +464,21 @@ _hash_child_init_foreach_cb(const Eina_Hash *hash, const void *key EINA_UNUSED,
}
static void
-_on_size_hints_changed(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
- Evas_Object *obj, void *event_info EINA_UNUSED)
+_efl_ui_relative_layout_hints_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev)
{
- efl_pack_layout_request(obj);
+ efl_pack_layout_request(ev->object);
}
EOLIAN static void
_efl_ui_relative_layout_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
{
- eina_hash_foreach(pd->children, _hash_child_init_foreach_cb, NULL);
+ Eina_Rect want = efl_gfx_entity_geometry_get(obj);
+ pd->base->calc.want[0].position = want.x;
+ pd->base->calc.want[0].length = want.w;
+ pd->base->calc.want[1].position = want.y;
+ pd->base->calc.want[1].length = want.h;
+
+ eina_hash_foreach(pd->children, _hash_child_init_foreach_cb, pd);
eina_hash_foreach(pd->children, _hash_child_calc_foreach_cb, NULL);
efl_event_callback_call(obj, EFL_PACK_EVENT_LAYOUT_UPDATED, NULL);
@@ -490,7 +513,14 @@ _efl_ui_relative_layout_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Relative_Lay
EOLIAN static void
_efl_ui_relative_layout_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Relative_Layout_Data *pd EINA_UNUSED)
{
- evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_size_hints_changed, NULL);
+ pd->clipper = efl_add(EFL_CANVAS_RECTANGLE_CLASS, obj);
+ evas_object_static_clip_set(pd->clipper, EINA_TRUE);
+ efl_gfx_entity_geometry_set(pd->clipper, EINA_RECT(-49999, -49999, 99999, 99999));
+ efl_canvas_group_member_add(obj, pd->clipper);
+ efl_ui_widget_sub_object_add(obj, pd->clipper);
+
+ efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED,
+ _efl_ui_relative_layout_hints_changed_cb, NULL);
efl_canvas_group_add(efl_super(obj, MY_CLASS));
elm_widget_highlight_ignore_set(obj, EINA_TRUE);
@@ -506,36 +536,141 @@ _efl_ui_relative_layout_efl_object_constructor(Eo *obj, Efl_Ui_Relative_Layout_D
pd->obj = obj;
pd->children = eina_hash_pointer_new(_hash_free_cb);
- _efl_ui_relative_layout_register(pd, obj);
+
+ pd->base = calloc(1, sizeof(Efl_Ui_Relative_Layout_Child));
+ if (!pd->base) return NULL;
+
+ pd->base->obj = obj;
+ pd->base->layout = obj;
+ pd->base->rel[LEFT].to = obj;
+ pd->base->rel[LEFT].relative = 0.0;
+ pd->base->rel[RIGHT].to = obj;
+ pd->base->rel[RIGHT].relative = 1.0;
+ pd->base->rel[TOP].to = obj;
+ pd->base->rel[TOP].relative = 0.0;
+ pd->base->rel[BOTTOM].to = obj;
+ pd->base->rel[BOTTOM].relative = 1.0;
+ pd->base->calc.state[0] = RELATIVE_CALC_DONE;
+ pd->base->calc.state[1] = RELATIVE_CALC_DONE;
+ pd->base->calc.chain_state[0] = RELATIVE_CALC_DONE;
+ pd->base->calc.chain_state[1] = RELATIVE_CALC_DONE;
return obj;
}
EOLIAN static void
+_efl_ui_relative_layout_efl_object_invalidate(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
+{
+ efl_invalidate(efl_super(obj, MY_CLASS));
+
+ eina_hash_free_buckets(pd->children);
+}
+
+EOLIAN static void
_efl_ui_relative_layout_efl_object_destructor(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
{
+ efl_event_callback_del(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED,
+ _efl_ui_relative_layout_hints_changed_cb, NULL);
eina_hash_free(pd->children);
+ if (pd->base) free(pd->base);
efl_destructor(efl_super(obj, MY_CLASS));
}
-EOLIAN static void
-_efl_ui_relative_layout_unregister(Eo *obj, Efl_Ui_Relative_Layout_Data *pd, Efl_Object *child)
+EOLIAN static Eina_Bool
+_efl_ui_relative_layout_efl_pack_pack(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd, Efl_Gfx_Entity *subobj)
+{
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(subobj, EINA_FALSE);
+ EINA_SAFETY_ON_TRUE_RETURN_VAL(!!eina_hash_find(pd->children, &subobj), EINA_FALSE);
+
+ return !!_efl_ui_relative_layout_register(pd, subobj);
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_relative_layout_efl_pack_unpack(Eo *obj, Efl_Ui_Relative_Layout_Data *pd, Efl_Object *child)
{
- _elm_widget_sub_object_redirect_to_top(obj, child);
if (!eina_hash_del_by_key(pd->children, &child))
- ERR("child(%p(%s)) is not registered", child, efl_class_name_get(child));
+ {
+ ERR("child(%p(%s)) is not registered", child, efl_class_name_get(child));
+ return EINA_FALSE;
+ }
+
+ efl_pack_layout_request(obj);
+
+ return EINA_TRUE;
}
-EOLIAN static void
-_efl_ui_relative_layout_unregister_all(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd)
+EOLIAN static Eina_Bool
+_efl_ui_relative_layout_efl_pack_unpack_all(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
+{
+ eina_hash_free_buckets(pd->children);
+ efl_pack_layout_request(obj);
+
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_relative_layout_efl_pack_pack_clear(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
+{
+ eina_hash_free_cb_set(pd->children, _hash_clear_cb);
+ eina_hash_free_buckets(pd->children);
+ eina_hash_free_cb_set(pd->children, _hash_free_cb);
+
+ efl_pack_layout_request(obj);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+_efl_ui_relative_layout_content_iterator_next(Efl_Ui_Relative_Layout_Content_Iterator *it, void **data)
+{
+ Efl_Ui_Relative_Layout_Child *child;
+
+ if (!eina_iterator_next(it->real_iterator, (void **) &child))
+ return EINA_FALSE;
+
+ if (data) *data = child->obj;
+ return EINA_TRUE;
+}
+
+static Eo *
+_efl_ui_relative_layout_content_iterator_get_container(Efl_Ui_Relative_Layout_Content_Iterator *it)
{
- eina_hash_foreach(pd->children, _hash_free_foreach_cb, NULL);
+ return it->relative_layout;
+}
+
+static void
+_efl_ui_relative_layout_content_iterator_free(Efl_Ui_Relative_Layout_Content_Iterator *it)
+{
+ eina_iterator_free(it->real_iterator);
+ free(it);
}
EOLIAN static Eina_Iterator *
-_efl_ui_relative_layout_children_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd)
+_efl_ui_relative_layout_efl_container_content_iterate(Eo *obj, Efl_Ui_Relative_Layout_Data *pd)
+{
+ Efl_Ui_Relative_Layout_Content_Iterator *it;
+
+ it = calloc(1, sizeof(*it));
+ if (!it) return NULL;
+
+ EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
+
+ it->relative_layout = obj;
+ it->real_iterator = eina_hash_iterator_data_new(pd->children);
+
+ it->iterator.version = EINA_ITERATOR_VERSION;
+ it->iterator.next = FUNC_ITERATOR_NEXT(_efl_ui_relative_layout_content_iterator_next);
+ it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(
+ _efl_ui_relative_layout_content_iterator_get_container);
+ it->iterator.free = FUNC_ITERATOR_FREE(_efl_ui_relative_layout_content_iterator_free);
+
+ return &it->iterator;
+}
+
+EOLIAN static int
+_efl_ui_relative_layout_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd)
{
- return eina_hash_iterator_data_new(pd->children);
+ return eina_hash_population(pd->children);
}
EFL_UI_RELATIVE_LAYOUT_RELATION_SET_GET(left, LEFT);
diff --git a/src/lib/elementary/efl_ui_relative_layout.eo b/src/lib/elementary/efl_ui_relative_layout.eo
index dff9c60801..03b31831bb 100644
--- a/src/lib/elementary/efl_ui_relative_layout.eo
+++ b/src/lib/elementary/efl_ui_relative_layout.eo
@@ -1,4 +1,4 @@
-class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Layout
+class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Layout, Efl.Pack
{
[[The relative layout class.
@@ -53,24 +53,18 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Lay
ranging from 0.0 to 1.0.]]
}
}
- unregister {
- [[Remove all relations of the child.]]
- params {
- @in child: Efl.Object; [[The child to unregister]]
- }
- }
- unregister_all {
- [[Remove all relations from the registered children. ]]
- }
- children_iterate {
- [[Begin iterating over this object's children.]]
- return: iterator<Efl.Object> @owned @warn_unused; [[Iterator to object children.]]
- }
}
implements {
Efl.Object.constructor;
+ Efl.Object.invalidate;
Efl.Object.destructor;
Efl.Canvas.Group.group_calculate;
+ Efl.Pack.pack_clear;
+ Efl.Pack.unpack_all;
+ Efl.Pack.unpack;
+ Efl.Pack.pack;
+ Efl.Container.content_iterate;
+ Efl.Container.content_count;
Efl.Gfx.Entity.position { set; }
Efl.Gfx.Entity.size { set; }
Efl.Pack_Layout.layout_update;
diff --git a/src/lib/elementary/efl_ui_relative_layout_private.h b/src/lib/elementary/efl_ui_relative_layout_private.h
index b7410efc49..2aa150a333 100644
--- a/src/lib/elementary/efl_ui_relative_layout_private.h
+++ b/src/lib/elementary/efl_ui_relative_layout_private.h
@@ -21,6 +21,7 @@ typedef struct _Efl_Ui_Relative_Layout_Data Efl_Ui_Relative_Layout_Data;
typedef struct _Efl_Ui_Relative_Layout_Child Efl_Ui_Relative_Layout_Child;
typedef struct _Efl_Ui_Relative_Layout_Calc Efl_Ui_Relative_Layout_Calc;
typedef struct _Efl_Ui_Relative_Layout_Relation Efl_Ui_Relative_Layout_Relation;
+typedef struct _Efl_Ui_Relative_Layout_Content_Iterator Efl_Ui_Relative_Layout_Content_Iterator;
struct _Efl_Ui_Relative_Layout_Calc
{
@@ -49,7 +50,9 @@ struct _Efl_Ui_Relative_Layout_Calc
struct _Efl_Ui_Relative_Layout_Data
{
Eo *obj;
+ Eo *clipper;
Eina_Hash *children;
+ Efl_Ui_Relative_Layout_Child *base;
};
struct _Efl_Ui_Relative_Layout_Relation
@@ -66,25 +69,44 @@ struct _Efl_Ui_Relative_Layout_Child
Efl_Ui_Relative_Layout_Calc calc;
};
+struct _Efl_Ui_Relative_Layout_Content_Iterator
+{
+ Eina_Iterator iterator;
+ Eina_Iterator *real_iterator;
+ Eo *relative_layout;
+};
+
#define EFL_UI_RELATIVE_LAYOUT_RELATION_SET_GET(direction, DIRECTION) \
EOLIAN static void \
- _efl_ui_relative_layout_relation_ ## direction ## _set(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd, Eo *child, Eo *target, double relative) \
+ _efl_ui_relative_layout_relation_ ## direction ## _set(Eo *obj, Efl_Ui_Relative_Layout_Data *pd, Eo *child, Eo *target, double relative) \
{ \
Efl_Ui_Relative_Layout_Child *rc; \
+ if (!child) return; \
rc = _relative_child_get(pd, child); \
+ if (!rc) return; \
if (target) rc->rel[DIRECTION].to = target; \
if (relative < 0) relative = 0; \
else if (relative > 1) relative = 1; \
rc->rel[DIRECTION].relative = relative; \
+ efl_pack_layout_request(obj); \
} \
\
EOLIAN static void \
_efl_ui_relative_layout_relation_ ## direction ## _get(const Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd, Eo *child, Eo **target, double *relative) \
{ \
Efl_Ui_Relative_Layout_Child *rc; \
- rc = _relative_child_get(pd, child); \
- if (target) *target = rc->rel[DIRECTION].to; \
- if (relative) *relative = rc->rel[DIRECTION].relative; \
+ Eo *rel_to = NULL; \
+ double rel_relative = 0.0; \
+ rc = eina_hash_find(pd->children, &child); \
+ if (rc) \
+ { \
+ rel_to = rc->rel[DIRECTION].to; \
+ rel_relative = rc->rel[DIRECTION].relative; \
+ } \
+ else \
+ ERR("child(%p(%s)) is not registered", child, efl_class_name_get(child)); \
+ if (target) *target = rel_to; \
+ if (relative) *relative = rel_relative; \
}
#endif
diff --git a/src/lib/elementary/efl_ui_scroll_manager.eo b/src/lib/elementary/efl_ui_scroll_manager.eo
index 93cd7e99bc..e948fe6bc9 100644
--- a/src/lib/elementary/efl_ui_scroll_manager.eo
+++ b/src/lib/elementary/efl_ui_scroll_manager.eo
@@ -5,7 +5,7 @@ class @beta Efl.Ui.Scroll.Manager extends Efl.Object implements
{
[[Efl ui scroll manager class]]
event_prefix: efl_ui;
- eo_prefix: efl_ui_scroll_manager;
+ c_prefix: efl_ui_scroll_manager;
methods {
@property pan @protected {
[[This is the internal pan object managed by scroll manager.
diff --git a/src/lib/elementary/efl_ui_scroller.c b/src/lib/elementary/efl_ui_scroller.c
index 0fef382346..50113c12b1 100644
--- a/src/lib/elementary/efl_ui_scroller.c
+++ b/src/lib/elementary/efl_ui_scroller.c
@@ -152,11 +152,7 @@ static void
_efl_ui_scroller_content_del_cb(void *data,
const Efl_Event *event EINA_UNUSED)
{
- EFL_UI_SCROLLER_DATA_GET_OR_RETURN(data, sd);
-
- sd->content = NULL;
- if (!sd->smanager) return;
- efl_ui_scrollbar_bar_visibility_update(sd->smanager);
+ efl_content_unset(data);
}
EOLIAN static Eina_Bool
@@ -167,14 +163,23 @@ _efl_ui_scroller_efl_content_content_set(Eo *obj,
if (sd->content)
{
efl_content_set(sd->pan_obj, NULL);
- efl_event_callback_del(sd->content, EFL_EVENT_DEL,
+ efl_event_callback_del(sd->content, EFL_EVENT_INVALIDATE,
_efl_ui_scroller_content_del_cb, obj);
+ efl_del(sd->content);
+ sd->content = NULL;
+ }
+
+ if (content && !efl_ui_widget_sub_object_add(obj, content))
+ {
+ efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, NULL);
+ return EINA_FALSE;
}
sd->content = content;
+ efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, sd->content);
if (!content) return EINA_TRUE;
- efl_event_callback_add(sd->content, EFL_EVENT_DEL,
+ efl_event_callback_add(sd->content, EFL_EVENT_INVALIDATE,
_efl_ui_scroller_content_del_cb, obj);
efl_content_set(sd->pan_obj, content);
@@ -195,7 +200,9 @@ _efl_ui_scroller_efl_content_content_unset(Eo *obj EINA_UNUSED, Efl_Ui_Scroller_
{
Efl_Gfx_Entity *old_content = pd->content;
+ efl_event_callback_del(pd->content, EFL_EVENT_INVALIDATE, _efl_ui_scroller_content_del_cb, obj);
pd->content = NULL;
+ efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, NULL);
if (pd->smanager)
{
efl_ui_scrollbar_bar_visibility_update(pd->smanager);
diff --git a/src/lib/elementary/efl_ui_stack.c b/src/lib/elementary/efl_ui_stack.c
index e7edcdaf57..c330fada92 100644
--- a/src/lib/elementary/efl_ui_stack.c
+++ b/src/lib/elementary/efl_ui_stack.c
@@ -162,6 +162,15 @@ _show_content_with_anim(Efl_Ui_Stack *obj, Efl_Ui_Stack_Data *pd, Content_Data *
efl_animation_player_target_set(pd->show, cd->content);
Transit_Data *td = calloc(1, sizeof(Transit_Data));
+ if (!td)
+ {
+ ERR("Memory allocation error!");
+
+ //show content without animation
+ _show_content_without_anim(obj, cd->content);
+ return;
+ }
+
td->cd = cd;
pd->show_td = td;
@@ -185,6 +194,15 @@ _hide_content_with_anim(Efl_Ui_Stack *obj EINA_UNUSED, Efl_Ui_Stack_Data *pd, Co
efl_animation_player_target_set(pd->hide, cd->content);
Transit_Data *td = calloc(1, sizeof(Transit_Data));
+ if (!td)
+ {
+ ERR("Memory allocation error!");
+
+ //hide content without animation
+ _hide_content_without_anim(obj, cd->content);
+ return;
+ }
+
td->cd = cd;
pd->hide_td = td;
diff --git a/src/lib/elementary/efl_ui_tab_page.c b/src/lib/elementary/efl_ui_tab_page.c
index a0bd26ef70..cb17b98bcf 100644
--- a/src/lib/elementary/efl_ui_tab_page.c
+++ b/src/lib/elementary/efl_ui_tab_page.c
@@ -11,24 +11,44 @@
#define MY_CLASS EFL_UI_TAB_PAGE_CLASS
+static void
+_invalidate_cb(void *data, const Efl_Event *ev EINA_UNUSED)
+{
+ efl_content_unset(data);
+}
+
EOLIAN static Eina_Bool
_efl_ui_tab_page_efl_content_content_set(Eo *obj, Efl_Ui_Tab_Page_Data *sd, Eo *content)
{
if (sd->content)
{
efl_content_unset(efl_part(obj, "efl.content"));
+ efl_event_callback_del(sd->content, EFL_EVENT_INVALIDATE, _invalidate_cb, obj);
efl_del(sd->content);
+ sd->content = NULL;
+ }
+
+ if (content && !efl_ui_widget_sub_object_add(obj, content))
+ {
+ efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, NULL);
+ return EINA_FALSE;
}
sd->content = content;
+ efl_event_callback_add(sd->content, EFL_EVENT_INVALIDATE, _invalidate_cb, obj);
+ efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, content);
+
efl_content_set(efl_part(obj, "efl.content"), sd->content);
return EINA_TRUE;
}
EOLIAN static Efl_Gfx_Entity*
-_efl_ui_tab_page_efl_content_content_unset(Eo *obj, Efl_Ui_Tab_Page_Data *pd EINA_UNUSED)
+_efl_ui_tab_page_efl_content_content_unset(Eo *obj, Efl_Ui_Tab_Page_Data *pd)
{
+ efl_event_callback_del(pd->content, EFL_EVENT_INVALIDATE, _invalidate_cb, obj);
+ pd->content = NULL;
+ efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, NULL);
return efl_content_unset(efl_part(obj, "efl.content"));
}
diff --git a/src/lib/elementary/efl_ui_table.c b/src/lib/elementary/efl_ui_table.c
index 7a11f2fb71..208dedd80a 100644
--- a/src/lib/elementary/efl_ui_table.c
+++ b/src/lib/elementary/efl_ui_table.c
@@ -1,136 +1,153 @@
#include "efl_ui_table_private.h"
-#include "../evas/canvas/evas_table_eo.h"
-
#define MY_CLASS EFL_UI_TABLE_CLASS
#define MY_CLASS_NAME "Efl.Ui.Table"
-#define MY_CLASS_NAME_LEGACY "elm_grid"
-
-typedef struct _Custom_Table_Data Custom_Table_Data;
-
-static void _subobj_del_cb(void *data, const Efl_Event *event);
-static void _item_remove(Efl_Ui_Table *obj, Efl_Ui_Table_Data *pd, Efl_Gfx_Entity *subobj);
-
-struct _Custom_Table_Data
-{
- Efl_Ui_Table *parent;
- Efl_Ui_Table_Data *gd;
-};
-EFL_CALLBACKS_ARRAY_DEFINE(subobj_callbacks,
- { EFL_EVENT_DEL, _subobj_del_cb });
+#define EFL_UI_TABLE_DATA_GET(o, pd) \
+ Efl_Ui_Table_Data *pd = efl_data_scope_get(o, EFL_UI_TABLE_CLASS)
-static void
-_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
+inline static Table_Item *
+_efl_ui_table_item_date_get(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Gfx_Entity *subobj)
{
- ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
-
- evas_object_table_mirrored_set(wd->resize_obj, rtl);
+ Table_Item *gi;
+ if (!efl_invalidated_get(subobj) &&
+ (obj != efl_canvas_object_render_parent_get(subobj)))
+ {
+ ERR("%p is not a child of %p", subobj, obj);
+ return NULL;
+ }
+ gi = efl_key_data_get(subobj, TABLE_ITEM_KEY);
+ if (!gi)
+ {
+ WRN("item %p has no table internal data", subobj);
+ EINA_INLIST_FOREACH(EINA_INLIST_GET(pd->items), gi)
+ {
+ if (gi->object == subobj)
+ break;
+ }
+ if (!gi)
+ {
+ ERR("item %p was not found in this table", subobj);
+ return NULL;
+ }
+ }
+ return gi;
}
-EOLIAN static Eina_Error
-_efl_ui_table_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
+static void
+_on_child_size_changed(void *data, const Efl_Event *event EINA_UNUSED)
{
- Eina_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
- int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
- if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
-
- _mirrored_set(obj, efl_ui_mirrored_get(obj));
-
- return int_ret;
+ Eo *table = data;
+ efl_pack_layout_request(table);
}
static void
-_layout_updated_emit(Efl_Ui_Table *obj)
+_on_child_hints_changed(void *data, const Efl_Event *event EINA_UNUSED)
{
- efl_event_callback_legacy_call(obj, EFL_PACK_EVENT_LAYOUT_UPDATED, NULL);
+ Eo *table = data;
+ efl_pack_layout_request(table);
}
static void
-_sizing_eval(Evas_Object *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
+_on_child_del(void *data, const Efl_Event *event)
{
- Evas_Coord minw = 0, minh = 0, maxw = -1, maxh = -1;
- Evas_Coord w, h;
-
- ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
- if (!efl_alive_get(obj)) return;
+ Eo *table = data;
+ Table_Item *gi;
+ EFL_UI_TABLE_DATA_GET(table, pd);
- evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
- evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);
- evas_object_size_hint_min_set(obj, minw, minh);
- evas_object_size_hint_max_set(obj, maxw, maxh);
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
- if (w < minw) w = minw;
- if (h < minh) h = minh;
- if ((maxw >= 0) && (w > maxw)) w = maxw;
- if ((maxh >= 0) && (h > maxh)) h = maxh;
- evas_object_resize(obj, w, h);
-}
+ gi = _efl_ui_table_item_date_get(table, pd, event->object);
+ if (!gi) return;
-static void
-_table_size_hints_changed(void *data, Evas *e EINA_UNUSED,
- Evas_Object *table EINA_UNUSED,
- void *event_info EINA_UNUSED)
-{
- Efl_Ui_Table_Data *pd = efl_data_scope_get(data, MY_CLASS);
+ pd->items = (Table_Item *)
+ eina_inlist_remove(EINA_INLIST_GET(pd->items), EINA_INLIST_GET(gi));
+ free(gi);
- if (table == data)
- efl_pack_layout_request(data);
- else
- _sizing_eval(data, pd);
-}
+ pd->count--;
+ efl_key_data_set(event->object, TABLE_ITEM_KEY, NULL);
-static void
-_efl_ui_table_size_hints_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev)
-{
- efl_pack_layout_request(ev->object);
+ efl_pack_layout_request(table);
}
-/* Custom table class: overrides smart_calculate. */
-static void _custom_table_calc(Eo *obj, Custom_Table_Data *pd);
+EFL_CALLBACKS_ARRAY_DEFINE(efl_ui_table_callbacks,
+ { EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _on_child_size_changed },
+ { EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _on_child_hints_changed },
+ { EFL_EVENT_DEL, _on_child_del }
+);
-static Eina_Bool
-_custom_table_initializer(Efl_Class *klass)
+static void
+_efl_ui_table_last_position_get(Eo * obj, Efl_Ui_Table_Data *pd, int *last_col, int *last_row)
{
- EFL_OPS_DEFINE(ops,
- EFL_OBJECT_OP_FUNC(efl_canvas_group_calculate, _custom_table_calc)
- );
-
- return efl_class_functions_set(klass, &ops, NULL);
-};
+ Table_Item *gi;
+ int col = -1, row = -1;
+ int req_cols, req_rows;
-static const Efl_Class_Description custom_table_class_desc = {
- EO_VERSION, "Efl.Ui.Table.Internal", EFL_CLASS_TYPE_REGULAR,
- sizeof(Custom_Table_Data), _custom_table_initializer, NULL, NULL
-};
+ if (!pd->linear_recalc)
+ {
+ *last_col = pd->last_col;
+ *last_row = pd->last_row;
+ return;
+ }
-EFL_DEFINE_CLASS(_efl_ui_table_custom_table_class_get, &custom_table_class_desc,
- EVAS_TABLE_CLASS, NULL)
+ efl_pack_table_size_get(obj, &req_cols, &req_rows);
-#define CUSTOM_TABLE_CLASS _efl_ui_table_custom_table_class_get()
+ if (efl_ui_dir_is_horizontal(pd->dir1, EINA_TRUE))
+ {
+ EINA_INLIST_REVERSE_FOREACH(EINA_INLIST_GET(pd->items), gi)
+ {
+ if ((gi->row < row) || (req_cols < gi->col) || (req_rows < gi->row))
+ continue;
+
+ if (gi->row > row)
+ {
+ row = gi->row;
+ col = gi->col;
+ }
+ else if (gi->col > col)
+ {
+ col = gi->col;
+ }
+ }
+ }