Commit Graph

19332 Commits

Author SHA1 Message Date
Marcel Hollerbach fc12e7721f efl_ui_selectable: split this up
i dont know why, but something got badly mixed up, the selection APIs
for text and item ended up in the same interface, which seems ... weird
?
This commit splits that up into container_selectable and
text_selectable, there is no future plan on my list for text_selection.
The rest of this series is working towards removing
container_selectable, replacing it with a new interface. However, the
interface will stay until list_view is replaced.

The changes in the legacy code are removing the efl.ui.selection
interface from it, item emission is not depending on the inherited
interfaces, additionally, this interface does not provide any API, so
this should not be an issue.

ref T7766

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9498
2019-08-05 19:49:12 +02:00
WooHyun Jung 53649030db efl_ui_action_connector: rename clickable_util to action_connector
efl_ui_clickable_util was only for efl_input_clickable interface,
but there can be more cases which want to connect object event
to specific action interfaces (such as scrolling) in the future.
For that extension, efl_ui_action_connector seems better.

ref: T7847

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9486
2019-08-05 17:44:32 +02:00
Lauro Moura 40def3eac9 efl-mono: Add Model manual implementation to C# and MVVM factories
Summary: Depends on D9273, D9270

Test Plan: Run added testcases.

Reviewers: cedric, bu5hm4n, zmike, SanghyeonLee, felipealmeida, segfaultxavi

Reviewed By: cedric

Subscribers: cedric

Tags: #expertise_solutions, #efl_language_bindings

Differential Revision: https://phab.enlightenment.org/D8080
2019-08-05 10:18:18 -04:00
Carsten Haitzler 7c72f10153 ethumb - fix error free of static string as stringshare
in one case we try stringshare_del a static string, not stringshared,
so fix by always making it a stringshare

fix CID 1402614
2019-08-05 15:02:45 +01:00
Carsten Haitzler b7bc6212bc ecore drm legacy - fix dbus leaks of reply handle
fix CID 1402664
2019-08-05 15:00:29 +01:00
Daniel Kolesa 4c6a9520ef eolian: fix use after free in eolian_database
'toscan' is actually a view to 'mpath' memory, so freeing it first
would result in use-after-free. This is obviously only in the error
branch so it usually does not happen, but fix anyway.

CID1403022
2019-08-05 15:43:39 +02:00
Daniel Kolesa 4f50a9728d eolian: fix false positive use-after-free in parser
The catch here is that check_match results in a long jump under
that condition. The static analyzer doesn't know this, so declare
intent.

CID1402703
2019-08-05 15:42:24 +02:00
Daniel Kolesa 3c7e1c9767 eolian: silence return checking in lexer
Coverity CID1396970.
2019-08-05 15:39:43 +02:00
Daniel Kolesa 80fb8727b5 eolian: refactor "dead" code
This has no functional change but should stop coverity from
complaining.

CID1382214
2019-08-05 15:37:13 +02:00
Daniel Kolesa ede2db5f1b eolian: attempt to silence coverity overlapping assignment errors
While the previous code was I believe correct, coverity still
complains about it. Split it into two statements also to declare
intent.

CID 1402603..1402724
2019-08-05 15:35:15 +02:00
Carsten Haitzler ce44122f61 elm theme - fix leak in error cse in elm theme mmap set
we don't free the eina file handle on error. coverity found it. fix

fix CID 1402680
2019-08-05 14:28:40 +01:00
Carsten Haitzler 970b620f5a ethumb - make coverity happy by including null char
doesnt cost us much to memcpy the nul byte too to keep coverity happy.

fix CID 1402690
2019-08-05 14:17:33 +01:00
Yeongjong Lee f2b1f312a9 efl_input_key: replace key property name with key_sym
Summary:
Sorry to touch stable eo classes. there is name conflict issue between class and
property when binding language is generated from eo. for example in C#, compiler
error occurs.

```
src/bindings/mono/efl_input_key.eo.cs(272,26): error CS0542:
`Efl.Input.Key.Key': member names cannot be the same as their enclosing type
```

This patch changes Efl.Input.Key.GetKey/SetKey method to
Efl.Input.Key.GetKeySym/SetKeySym and generates Efl.Input.Key.KeySym
property.

Note that CAPI is not changed.

ref T8093

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, woohyun, zmike, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8093

Differential Revision: https://phab.enlightenment.org/D9483

zmike note: this class was not released at the point of this patch, the class
was only recently marked as stable
2019-08-05 08:51:22 -04:00
Vincent Torri fb023ee6d2 evil: add mprotect() and fix a bit mmap(). Elm_test is working
Test Plan: compilation aand elm_test working

Reviewers: raster, cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9493
2019-08-05 08:47:19 -04:00
Marcel Hollerbach 94b05f15e6 efl_ui_spin/button: move from elm_ to efl_ prefixed functions
Summary:
this moves a bunch of api calls from elm_ to efl_. Those calls that are
called on the entry object are still elm, as well as access APIs, they
will have to be moved once efl_ui_text is usable.
Depends on D9475

Reviewers: segfaultxavi, cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9488
2019-08-05 08:47:00 -04:00
Carsten Haitzler 034ef0badc ecore drm - legacy - fix coverity leak complaint
is real - in error case. fix it to make coverity happy.
fix CID 1402696
2019-08-05 13:44:25 +01:00
Carsten Haitzler ea48df482c ephysics - fix stringshare double del
fix CID 1402707
2019-08-05 13:33:01 +01:00
junsu choi 949cf2750b ector_software_rasterizer: Add default value for stroke's miter_limit
Summary:
Currently the default value of miter_limit is defined as 0.
miter_limit should be specified to a value other than 0. becuase it is affected by width.
See below for an explanation of this.
https://www.freetype.org/freetype2/docs/reference/ft2-glyph_stroker.html#ft_stroker_linejoin

There is no particular reason why the default value is 0x4.
It only refers to the standard of web svg.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit

Test Plan:
   setenv("ECTOR_BACKEND", "default", 1);
   elm_init(argc, argv);
   Evas_Object *win = elm_win_util_standard_add(NULL, "test");
   evas_object_smart_callback_add(win, "delete,request", win_del, 0);
   elm_win_autodel_set(win, 1);
   Evas_Object *bg = elm_bg_add(win);
   elm_bg_color_set(bg, 255,255,255);
   evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_show(bg);

   Evas *evas = evas_object_evas_get(win);

   Evas_Object *vg = evas_object_vg_add(evas);
   evas_object_show(vg);
   Evas_Object *container = evas_vg_container_add(vg);

   Evas_Object *shape = evas_vg_shape_add(container); //Default is EFL_GFX_JOIN_MITER
   evas_vg_shape_append_rect(shape, 0, 0, 100 , 100, 0, 0);
   evas_vg_shape_stroke_color_set(shape, 255, 0, 0, 255);
   evas_vg_shape_stroke_width_set(shape, 10);
   evas_vg_node_origin_set(shape, 50, 150);

   shape = evas_vg_shape_add(container);
   evas_vg_shape_append_rect(shape, 0, 0, 100 , 100, 0, 0);
   evas_vg_shape_stroke_join_set(shape, EFL_GFX_JOIN_BEVEL);
   evas_vg_shape_stroke_color_set(shape, 255, 0, 0, 255);
   evas_vg_shape_stroke_width_set(shape, 10);
   evas_vg_node_origin_set(shape, 200, 150);

   shape = evas_vg_shape_add(container);
   evas_vg_shape_append_rect(shape, 0, 0, 100 , 100, 0, 0);
   evas_vg_shape_stroke_join_set(shape, EFL_GFX_JOIN_ROUND);
   evas_vg_shape_stroke_color_set(shape, 255, 0, 0, 255);
   evas_vg_shape_stroke_width_set(shape, 10);
   evas_vg_node_origin_set(shape, 350, 150);

   evas_object_vg_root_node_set(vg, container);
   elm_object_content_set(bg, vg);

   elm_win_resize_object_add(win, bg);
   evas_object_resize(win, WIDTH, HEIGHT);
   evas_object_show(win);
   elm_run();
   elm_shutdown();

Reviewers: smohanty, Hermet, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9492
2019-08-05 18:08:50 +09:00
Marcel Hollerbach 7869778d02 efl_ui_spin: move the step implementation to spin_button
having efl_ui_spin implementing efl.ui.range_interactive does not make
sense. Efl.Ui.Spin is a not interactive widget, so it should not
implement that interface.

ref T7897

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9475
2019-08-03 20:40:11 +02:00
Marcel Hollerbach 42bbe0e58f efl_ui_spin_button: fix initial displaying of formatting string
spin_button should also implement formatted_apply, the label has a
different part name then spin.

ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9474
2019-08-03 20:40:10 +02:00
Marcel Hollerbach 7558620957 efl_ui_spin_button: stop calling only the parent
if the spin button is skipped the spin is called directly, the label
will display the wrong value.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9473
2019-08-03 20:40:09 +02:00
Carsten Haitzler db18d67af9 elm toolbar - fix toolbar item separators and refactor aling/fill of item
only set this is one place and thus get it consistent/right for
separators vs other items.

@fix
2019-08-02 17:17:48 +01:00
Carsten Haitzler efd45df1c4 elm toolbar - fix packing options at start to avoid visual layout bugs
i spoetted open moving around and shrinking when it shouldnt -
packging options (fill/align) not always set right. this fixes that.

@fix
2019-08-02 16:41:12 +01:00
Carsten Haitzler d9dbd2fbea ecore evas x and e sync rendering - disable as it's unused
this has been optional and unused by e for a very long time ot try
sync front-buffered software rendering with the wm/compositor. we may
as well remove the bloat that is here that is unused... it's been
inactive for many years anyway.
2019-08-02 16:41:12 +01:00
Hermet Park 03cb0212ac efl_canvas_rectangle: rendering optmization.
There was a weird profiling result that rectangles drawing is much much slower than images.
Checked reason, the computation rect clip area is the overload point.

I don't think it's necesary but we can simplely improve the performance here
by replacing native function.

I tested this by drawing 400 number of rectangles,
and this patch improved up abt 10 fps(sw), 20fps(gl).

@TEST CODE

   MAX_SIZE = 400;

   for(int i=0; i< MAX_SIZE; i++)
   {
      Evas_Object *rect = evas_object_rectangle_add(layout);

      int x = rand() % WINDOW_WIDTH;
      int y = rand() % WINDOW_HEIGHT;

      evas_object_resize(rect, ELM_SCALE_SIZE(200), ELM_SCALE_SIZE(200));
      evas_object_move(rect, x, y);
      evas_object_color_set(rect, (rand() % 256), (rand() % 256), (rand() % 256), 255);
      evas_object_show(rect);

      Elm_Transit *transit = elm_transit_add();
      elm_transit_object_add(transit, rect);

      int dX = rand() % WINDOW_WIDTH;
      int dY = rand() % WINDOW_HEIGHT;

      elm_transit_effect_translation_add(transit, 0, 0, dX - x, dY - y);
      elm_transit_repeat_times_set(transit, -1);
      elm_transit_duration_set(transit, 1.0);

      elm_transit_go(transit);
   }
2019-08-02 18:27:38 +09:00
Hermet Park 9395a4c33c evas rectangle: code refactoring.
Just removed white spaces, fixed indentation.

No logical changes.
2019-08-02 18:27:27 +09:00
Jaehyun Cho b1e697df1c efl_input_clickable: increase the time interval for repeated counter
Summary:
The repeated counter in Efl.Input.Clickable_Clicked can be used to
identify double click or triple click.

Previously, the repeated counter in Efl.Input.Clickable_Clicked was
calculated within the time interval 0.1 second.

Now, the time interval for the repeated counter is increased to 0.25
second. It seems that 0.25 second is more appropriate to identify if the
two consecutive clicks should be considered together.
(e.g. considered as double click or triple click)
Moreover, in ecore_event and edje, 0.25 second is already used as a time
interval for double click.

Test Plan:
1. Run Efl.Ui.Button in elementary_test
2. Do double click or triple click the buttons

Reviewers: segfaultxavi, bu5hm4n, YOhoho

Reviewed By: segfaultxavi, YOhoho

Subscribers: YOhoho, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9485
2019-08-02 10:50:02 +02:00
Mike Blumenkrantz ded6dc9017 efl_ui/tags: set entry to fill vertically
forgot this in previous patch

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9479
2019-08-01 14:37:10 -07:00
Mike Blumenkrantz b89e7b3500 efl_ui/tags: use user size hints for internal objects
restricted min size hint should only be set by an object's own group_calc
function. all other cases should use regular min size hint

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9477
2019-08-01 14:37:07 -07:00
Mike Blumenkrantz fe849c9666 efl_ui/flow.box: fix item calc with mixed weights
if a box contains an entire row of items with weight(0), and the next
row contains items with weights set, the item count must be correctly
incremented so that the box uses the right items in its calculations

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9480
2019-08-01 14:37:05 -07:00
Marcel Hollerbach 4f45749b14 efl_ui_position_manager: add event for updating the range
the new event can be used to message back the currently visible range
from the position to the collection / collection_view.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9462
2019-08-01 14:36:59 -07:00
Marcel Hollerbach fd860eb6e8 efl_ui_spin_button: rename circulate to wraparound
ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9461
2019-08-01 14:36:53 -07:00
Marcel Hollerbach 45b763a2dc efl_ui_spin_button: use the newly emitted event from range_interactive
this event is not also in range_interactive, so better use this.

ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9459
2019-08-01 14:36:48 -07:00
Marcel Hollerbach 010f813572 efl_ui_range_interactive: add a new event
the steady event from slider now moved here. A spec test suite and the
corresponding implementations will follow.

ref T7894

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9458
2019-08-01 14:36:45 -07:00
Xavi Artigas 44e0027338 mono-docs: Add misc struct docs
Summary:
Structs have a convenience constructor which was missing parameter documentation.
Struct fields need a <value> tag or there is a hole in the generated docs.
The documentation for the type of the field has been used, when available.

Test Plan: Build docs and look at generated pages for structs.

Reviewers: lauromoura, vitor.sousa, felipealmeida

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9478
2019-08-01 21:12:36 +02:00
Daekwang Ryu cf818a84be evas_gl: implement EvasGL ES 3.2
add a wrapper function for glFramebufferTexture.
some bugs were fixed.
I tested on Ubuntu 14.04(x64) and nVidia 375 driver with VK-GL-CTS

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D4831
2019-08-01 10:42:55 -07:00
Daniel Kolesa 1c5fa59ee8 eolian: remove __builtin_free_cb
This has long been unused. If we need to replace this eventually,
it should be done correctly.
2019-08-01 16:55:31 +02:00
Daniel Kolesa 1bcca58d82 eolian: disallow ptr() in containers in stable API 2019-08-01 16:55:31 +02:00
Christopher Michael a7971f409d efl_ui_collection: Mark unused parameter
double align is actually unused in this function, so mark it as such
2019-08-01 08:32:42 -04:00
WooHyun Jung d02a3ecb66 efl_input_clickable: add longpress_abort
Now, a specific class which uses efl_input_clickable_util is able
to cancel ongoing longpress event by calling longpress_abort.

This commit shows how efl_ui_text uses longpress_abort to satisfy
its own longpress use case

ref T7847

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9455
2019-08-01 11:33:03 +02:00
WooHyun Jung d2f7bacc2c efl_ui_clickable_util: remove efl_input_processed_set
Summary:
efl_input_processed_set needs to be used only when specific
event marks that it is monopolizing current user interaction.
(such as scrolling).
But, press event or unpress event looks not that proper.

Reviewers: bu5hm4n, Jaehyun_Cho

Reviewed By: bu5hm4n, Jaehyun_Cho

Subscribers: AbdullehGhujeh, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9454
2019-08-01 17:19:16 +09:00
Marcel Hollerbach d98d434e56 efl_ui_position_manager: move from accessor to function callback
this commit enables access to the item structure of the collection via a
function callback. The function callback now enables batching for items,
which does not pay off right now. However, a few more optimizations can
be done in order to get the whole payoff.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9445
2019-07-31 15:51:48 -07:00
Felipe Magno de Almeida 69975fc72d eolian-cxx: Add special type tags to make function_wrapper specializations unique
Reviewers: lauromoura, bu5hm4n, woohyun

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9469
2019-07-31 18:38:59 -03:00
Mike Blumenkrantz eb938f8a88 efl_ui/win: use efl_ui_image internally for non-legacy widgets
switch to using a fully non-legacy widget when this is not being created
with elm_win_add

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9466
2019-07-31 14:00:18 -07:00
Mike Blumenkrantz 02f1ce8d54 elm/colorselector: go back to using elm_box internally
legacy widgets should not use efl_ui widgets internally and vice versa

reverts b11f371703

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9465
2019-07-31 14:00:15 -07:00
Mike Blumenkrantz 407a0aa367 elm/colorselector: directly use smart callback api here
this is not a mixed legacy+unified widget, so we don't need to use
efl api here

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9464
2019-07-31 14:00:13 -07:00
Mike Blumenkrantz dd11dadfef efl_ui/tags: use flow box internally
the existing layout code here is basically just a flow box, so use that
instead to avoid mixing legacy widgets in unified ones

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9463
2019-07-31 14:00:11 -07:00
Ali Alzyod 32cffb4494 evas_textblock: change font-size/font-family only using EFL.Text.Font Interface
Currently:
User cannot change font size only, he needs to set both font and font size with (**efl_text_font_font_set**)
To change size only, you need to make two calls, one to get font (**efl_text_font_font_get**) , then pass it again with new size to (**efl_text_font_font_set**).

New Behaviour:
If user want to change size only, then he passes NULL as font argument to keep same font.
If user want to change font only, then he passes 0 as font-size argument, to keep same font-size.

Notes:
This is not best solution, but it better than current behaviour.
I think best solution to have separate function to set font size, but It might break current api or duplicate functions.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9158
2019-07-31 10:54:55 -07:00
Marcel Hollerbach 6d0f514126 efl_ui_check/radio: use clickable
Summary:
with this commit the state of the check / radio buttons are changes when
the Widget is clicked. The Widget is now using clickable and emits all
the events.

ref T7865

Reviewers: segfaultxavi, zmike, Jaehyun_Cho, woohyun

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7865

Differential Revision: https://phab.enlightenment.org/D9456
2019-07-31 09:12:07 -04:00
Carsten Haitzler 79d3748557 evas events - fix segv if pointer data is freed by cb
callback can free what is in context. avoid that problem

@fix
2019-07-31 14:05:55 +01:00