Commit Graph

18614 Commits

Author SHA1 Message Date
Hosang Kim 55751f1204 evas_callbacks: fix emission of EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED
Summary:
When I add "efl_event_callback_add(btn, EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED, _cb, NULL)",
_cb is not called. Because of callback_mask is not set correctly.

Test Plan: unit test

Reviewers: zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8528
2019-04-03 09:32:21 -04:00
junsu choi 894c7af10a elm_entry: prevent from accessing null pointer
Summary: change ELM_ENTRY_DATA_GET to ELM_ENTRY_DATA_GET_OR_RETURN_VAL

Test Plan: elm_entry_file_set(NULL, ~~~);

Reviewers: YOhoho, Hermet, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8544
2019-04-03 13:58:35 +09:00
Carsten Haitzler 07f0044d28 evas image - fix proxy change propagation to fix e video wallpapers
this fixes propagati[on of changes from img sources to proxies which
broke e's video wallpapers. fixes T7685
2019-04-02 18:25:20 +01:00
Vincent Torri b41ed254a9 remove useless check of ws2tcpip.h
Summary: it is useless to check for header files which necessarly exist

Test Plan: compilation

Reviewers: raster, cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8535
2019-04-02 10:09:24 -04:00
Carsten Haitzler 96f1e29709 elm naviframe - remove duplicated func prototype in headers
one hade EAPI, one did not and there were 2 anyway, so remove one and
ensure the other has EAPI and the same docs. this should fix T7776
2019-04-02 13:59:01 +01:00
Xavi Artigas 413c987837 docs: Update refs to Efl.Ui.Theme.Apply_Error
Summary:
Proper refs to particular errors cannot be added until T7736 is resolved.

Ref T7717

Test Plan: Only docs updated

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7717

Differential Revision: https://phab.enlightenment.org/D8495
2019-04-02 08:57:35 -04:00
Xavi Artigas 6c01d7177c docs: Format efl_file.h
Summary:
And polish a bit.

Ref T7717

Test Plan: Only docs updated

Reviewers: zmike

Reviewed By: zmike

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7717

Differential Revision: https://phab.enlightenment.org/D8498
2019-04-02 08:57:19 -04:00
Marcel Hollerbach 2647d93177 ecore: correctly clean up in ecore_fork_reset
Summary:
after a fork does happen, the new process does not have any self created
threads at all. However, _thread_cb can contain suspend calls of
ecore_thread_main_loop_begin. _ecore_main_call_flush will then wait in
the suspend block for the thread to call ecore_thread_main_loop_end.
However, the thread is dead, the end function will never be called.
Hence we should ensure that we definitly kill every entry in _thread_cb
that has a susped flag on true.

This fixes deadlocks while running the testsuites with
EIO_MONITOR_POLL=1
Depends on D8526

Reviewers: cedric, segfaultxavi, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8531
2019-04-02 08:50:54 -04:00
Marcel Hollerbach 43a522b876 eio: ensure that the monitor starts when it is called to
Summary:
we need to to this here, otherwise we effectfily start the monitor
later, which means, we can miss a change in the filesystem. However,
this makes things a lot slower.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8526
2019-04-02 08:50:48 -04:00
Marcel Hollerbach c29dae34a0 efl_io_model: start early on monitoring
Summary:
Little introduction into what eio did before this commit:
Efl.Io.Model creation:
  - direct ls of a directory in a thread (A)
  - take all the contents of a directory and feed it slowly back into
the mainloop
  - when all events have been feeded back to the mainloop and have been
processed: start monitoring (B)

However, any file created between (A) and (B) will not be in the model,
since not the listing nor the monitoring did caputure it. Hence we need
to start monitoring before we actaully start listing. In the callbacks
we then check if we already published something.

ref T7311

Reviewers: zmike, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7311

Differential Revision: https://phab.enlightenment.org/D8525
2019-04-02 08:50:34 -04:00
Xavi Artigas 68c530080b docs: Fix common misspellings in H files
Fixed all appearances of words from this list in H files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 13:28:48 +02:00
Xavi Artigas 57da0bee3d docs: Fix common misspellings in EO files
Fixed all appearances of words from this list in EO files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 11:32:05 +02:00
Lauro Moura 683958ee68 eo: Correctly name Realized classes.
The previous preprocessor rule was generating strings like
"\"Efl.App\"_Realized.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8527
2019-04-02 11:02:27 +02:00
Jaehyun Cho fe54a4dd1a elm_widget_item_eo.legacy: change @ingroup to Elm_General
Summary:
The @ingroup of elm_object_item APIs is Elm_General in elm_object_item.h.

Since legacy prefix of Elm_Widget_Item is elm_object_item,
the prefix of Elm_Widget_Item APIs is elm_object_item.

Consequently, to display the legacy Elm_Widget_Item APIs with
elm_object_item APIs, the @ingroup is changed from Elm_Object_Item_Group
to Elm_General.

Test Plan: make doc and check the documentation

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8529
2019-04-02 10:36:57 +02:00
Jaehyun Cho a10e1bc597 Revert "efl_ui_pager: implement unpack_at function"
This reverts commit 913a5bff66.

The commit is reverted because the commit implements features during
feature freeze period before release.

913a5bff66 will be restored after release.
2019-04-02 16:39:40 +09:00
Jaehyun Cho b28f1e034b Revert "efl_ui_pager: implement unpack_all/clear function"
This reverts commit 74c48f0296.

The commit is reverted because the commit implements features during
feature freeze period before release.

74c48f0296 will be restored after release.
2019-04-02 16:36:20 +09:00
Jaehyun Cho d2eebb6f5f Revert "elm - fix harmless warning for clean build"
This reverts commit e3d2a0cf12.

The commit is reverted to revert the following commit.
74c48f0296

The above commit will be restored after release and then
e3d2a0cf12 will be also restored.
2019-04-02 16:33:20 +09:00
Hermet Park 08c65ed501 canvas vg: fix wrong key pass for caching surface.
There is a wrong case that fails caching ector surfaces.
Those vector objects manually constructing shapes,
passed wrong pointer as the cacahing key instead of root node pointer.

This fixes it.
2019-04-02 15:43:23 +09:00
Christopher Michael d3a8f0f250 ecore-drm2: Add missing @ingroup for some doxy
Small patch to add missing @ingroup for doxygen comments, and correct
one that was in the wrong group

@fix
2019-04-01 10:31:08 -04:00
Christopher Michael 83d4890c74 efl_ui_selection_manager: Don't leak malloc'd data
Summary:
Coverity reports that we potentially leak char *s here. If we do not
have 'data_ret', then the malloc'd 's' sould be freed as we are not
going to use it.

Fixes Coverity CID1396949

@fix

Reviewers: raster, cedric, bu5hm4n, zmike

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8523
2019-04-01 10:02:57 -04:00
Christopher Michael 750b21830f evas-font-dir: Minor formatting fixes
NB: No functional changes
2019-04-01 09:05:57 -04:00
Carsten Haitzler e3d2a0cf12 elm - fix harmless warning for clean build 2019-03-30 16:51:33 +00:00
Yeongjong Lee e361b45ce1 efl_ui_table_layout: calculate cell size with colspan, rowspan property
We should consider occupied cells by colspan, rowspan property.

ref T7753

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8484
2019-03-30 12:38:27 +01:00
Mike Blumenkrantz 69c54cdabb eina_log: reset logging callback to default when null is set as the callback
Summary:
passing null here causes any log message to crash the app and is probably not
the intended result

Reviewers: cedric, segfaultxavi

Reviewed By: cedric, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8513
2019-03-29 18:57:06 +01:00
Ali Alzyod b8952604ce elm_entry: Speedup finding new line, prevent readind invalid memory
Summary:
1- Speed up detecting new lines.
```
if (!strncmp(text, "<br", 3) || !strncmp(text, "<ps", 3))
```
This will cause 6 comparisons (if one of conditions did not meet), or at least 3 comparisons.

this is changed to
```
if (!strncmp(text, "<", 1))
```

2- Speedup detecting lines

If this condition is true, we should increment the string for next iteration 3 times, not just one
```
if (!strncmp(text, "<br", 3) || !strncmp(text, "<ps", 3))
```

if '<' founded then 'pr' or 'br', we will skip 3 characters for next iteration.

```
if (!strncmp(text, "<", 1))
      {
         text++;
         len--;
         if (!strncmp(text, "br", 2) || !strncmp(text, "ps", 2))
         {
            text += 2;
            len -= 2;
```

3- Prevent reading invalid memory out of the string

```
if (text[3] == '>' || ((text[3] == '/') && (text[4] == '>')))
```
string could reach last char in string (original string ends with "<br")

but now we will check if remaining string length allow comparison :

```
if (text[0] == '>' || (len > 1 && ((text[0] == '/') && (text[1] == '>'))))
```

Test Plan:
```

static int

oldFunc(const char *text)
{
    if (!text)
        return 0;

    while (*text)
    {
        if (!strncmp(text, "<br", 3) || !strncmp(text, "<ps", 3))
        {
            if (text[3] == '>' || ((text[3] == '/') && (text[4] == '>')))
            {
                return 1;
            }
        }
        text++;
    }
    return 0;
}

static int
newFunc(const char *text)
{
    if (!text)
        return 0;
    char *pTemp = (char *)text;

    while (pTemp = strchr(pTemp, '<'))
    {
        pTemp++;
        if (!strncmp(pTemp, "br", 2) || !strncmp(pTemp, "ps", 2))
        {
            pTemp += 2;
            if (pTemp[0] != '\0' && (pTemp[0] == '>' || (pTemp[0] == '/' && pTemp[1] == '>')))
            {
                return 1;
            }
        }
    }

    return 0;
}

int main()
{

    int counter = 1000;
    srand(time(NULL));
    char pStr[50001] = {0};
    char AllChars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789<>";

    int AllCharsLen = strlen(AllChars);
    for (int i = 0; i < 50000; i++)
        pStr[i] = AllChars[rand() % AllCharsLen];

    clock_t start, end;
    double total_Time1 = 0;
    int i;

    for (int j = 0; j < 3; j++)
    {
        if (j == 0)
        {
            printf("random String\n");
        }
        else if (j == 1)
        {
            printf("With Random <br/>\n");
            int location = rand()%(5000 - 5);
            pStr[location++] = '<';
            pStr[location++] = 'b';
            pStr[location++] = 'r';
            pStr[location++] = '/';
            pStr[location++] = '>';
        }
        else if (j == 2)
        {
            printf("With Random <ps>\n");
            int location = rand()%(5000 - 4);
            pStr[location++] = '<';
            pStr[location++] = 'p';
            pStr[location++] = 's';
            pStr[location++] = '>';
        }

        start = clock();
        for (i = 0; i < counter; i++)
            oldFunc(pStr);
        end = clock();
        total_Time1 = ((double)(end - start)) / CLOCKS_PER_SEC;
        printf("original = %f has new Line = %i\n", total_Time1, oldFunc(pStr));

        start = clock();
        for (i = 0; i < counter; i++)
            newFunc(pStr);
        end = clock();
        total_Time1 = ((double)(end - start)) / CLOCKS_PER_SEC;
        printf("modified = %f has new line = %i\n\n", total_Time1, newFunc(pStr));
    }
}
```

output:

random String
original = 2.523000 has new Line = 0
modified = 0.090000 has new line = 0

With Random <br/>
original = 0.081000 has new Line = 1
modified = 0.003000 has new line = 1

With Random <ps>
original = 0.016000 has new Line = 1
modified = 0.001000 has new line = 1

Reviewers: zmike, woohyun, bowonryu

Reviewed By: zmike

Subscribers: bu5hm4n, segfaultxavi, zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8497
2019-03-29 09:58:53 -04:00
Xavi Artigas 76e8f9c07c docs: Fix build break because of missed EO import 2019-03-29 14:12:37 +01:00
Xavi Artigas fe3879472d docs: Use Eina.Value references en efl_ui_format docs 2019-03-29 14:08:22 +01:00
Marcel Hollerbach 1a5dde0b47 efl_ui_layout: ensure that resize_obj is present before emitting signals
otherwise there will be warnings because of calling api on NULL objects.

Differential Revision: https://phab.enlightenment.org/D8512
2019-03-29 14:02:36 +01:00
Marcel Hollerbach 0c0f47796b efl_ui_widget: move from elm_widget_top_get to provider_find
this resolves a lot of cases where focus_highlight API was called on a
object, which is not a efl_ui_win object. With this patch we ensure that
the object is always a window.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8476
2019-03-29 14:02:32 +01:00
Marcel Hollerbach fce4d95596 efl_ui_widget: add implementation for finding the window
the problem with the previous implementation (just redirect the calls to
the widget_parent then to the efl_parent is that after invalidate its
impossible to find the window where the widget is in. However, there are
cases where we want to have access to the window of the widget, for
example, to invalidate focus highlight etc..
The window of a widget is always constant, and cannot be changed (as the
evas object cannot hop accross different evas)

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8475
2019-03-29 14:02:31 +01:00
Xavi Artigas 291ab9a671 docs: Efl.Ui.Layout_Base update theme docs
If docs are present at property and set/get levels only one is used.

Ref T7717

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8494
2019-03-29 12:35:51 +01:00
Xavi Artigas 01fccf6a87 docs: Clarify Efl.Ui.Win exit_on_close methods
exit_on_close and exit_on_all_windows_closed deserve a bit of clarification
since they have very similar meanings.
Also, add proper Eina.Value doc references.
Ref T7717

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8511
2019-03-29 12:35:50 +01:00
Xavi Artigas 1ad9b246c0 docs: Add Eina.Value extern to eina_types.eot
Eina.Values are built-in eolian types, accessed through any_value and
any_value_ptr. However, these types cannot be used in doc references.
Adding a placeholder extern struct Eina.Value causes no harm, and will allow
referencing the type from EO docs later on.
In C#, Eina.Value is defined in the manual binding code so the doc reference
resolves to a valid type.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8510
2019-03-29 12:35:49 +01:00
Jaeun Choi 74c48f0296 efl_ui_pager: implement unpack_all/clear function 2019-03-29 20:14:09 +09:00
Jaeun Choi 0b2cf57bbc efl_ui_pager: return mouse_down function if cnt equals zero 2019-03-29 20:14:09 +09:00
Jaeun Choi 913a5bff66 efl_ui_pager: implement unpack_at function 2019-03-29 20:14:09 +09:00
Jaeun Choi f3a6bf613d efl_ui_pager: refactor unpack function 2019-03-29 20:14:09 +09:00
Jaeun Choi 2631528476 efl_ui_pager: add a missing condition 2019-03-29 20:14:09 +09:00
Jaeun Choi 103248d8f0 efl_ui_pager: fix pack function 2019-03-29 20:14:09 +09:00
Jaeun Choi 9126a47eaa elm_priv.h: remove unnecesary line 2019-03-29 20:14:09 +09:00
Jaeun Choi 20dfa5c487 efl_ui_pager: disable loop if items are not enough after unpacking 2019-03-29 20:14:09 +09:00
Marcel Hollerbach b54035213f efl_ui_widget: reintroduce legacy behaviour
before the refactoring of the disabled property, there was no way to
enable a widget which has a disabled tree. This here however enables
this to work again like this. The user will be told with an error
message. The integraty of the property is maintained accross reparents.

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8459
2019-03-29 08:26:06 +01:00
Taehyub Kim 4e2003f741 efl_ui_alert_popup: add new feature for applying side button style of alert popup
Summary: This feature will apply side button style for each left and right button of alert popup

Reviewers: Jaehyun_Cho, cedric

Reviewed By: Jaehyun_Cho

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8492
2019-03-28 18:48:03 +09:00
Mike Blumenkrantz 1240232863 elm_entry: CRI if efl_file methods are called directly on this object
eo methods should not be called on legacy objects

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8487
2019-03-28 09:50:42 +01:00
Xavi Artigas 9f1cd60aeb docs: Document event info calling convention
Both at the emitter (efl_event_callback_call) and the receiver
(info field in the Efl.Event structure).
The Events tutorial should repeat this.
Fixes T7760

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8486
2019-03-28 09:39:40 +01:00
Marcel Hollerbach 62b3759db5 efl_ui_slider: block scrolling when on slider
when a mouse cursor is over a slider, the mouse wheel should be used to
affect the state of the slider, not also the one of the slider.

ref T2529

Reviewed-by: Bowon Ryu <bowon.ryu@samsung.com>
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8455
2019-03-28 09:39:39 +01:00
Cedric BAIL 37663b27df elementary: remove some asynchronous behavior from the fileselector.
Marcel notted that when using the LIST view of the fileselector on a
big directory, we end up having to wait for the entire genlist to be
populated to be able to switch to another directory. This is actually
a side effect of the populate code being triggered through an idler.
This idler was useful when the list was populated directly, but now
that we rely on Efl.Io.Model, we should be asynchronous enough that
it shouldn't be a problem to actually not be asynchronous here. By
removing the reliance on the idler, we are not queued after all the
idler and can properly short circuit all of that.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8491
2019-03-28 09:30:01 +01:00
Marcel Hollerbach 197210cde2 elc_filselector: solve the mysterium of sometimes failing tests
so after a phone call, two days of debugging, tears, crying etc. etc. we
finally came to a point of enlightenment! *Someone* (bu5hm4n) moved
gengrid and genlist events from eo back to smart events, so we can work
arround legacy borks and event-name collisions, at this point he did not
knew that some widgets (fileselector) already relied on those *lovely*
events. Hence this broke theoretically the testsuite, however, the
fileselector testsuite is ultimatily buggy, and the wait function does
not return false when it timeouts, (i don't know why not). So this break
was never discovered.

Additionally there is a second issue. it appears, that when we
immidiatly quit the mainloop after we have got the selected callback,
that then genlist decides to forget about the sd->selected pointer, and
NULLs that one out. Which then results in the fact that
elm_fileselector_selected_get ends up returning invalid paths.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8488
2019-03-27 15:03:41 -07:00
Cedric BAIL 8ab3f3319e elementary: make sure that the model parent being used is always the fileselector.
Model provided by an item selection would have there parent being the current
model of the fileselector. Once that one is replaced by the item model, it would
automatically invalidate the model and break any further request. This lead to
a bug where you could only get into one directory before everything else
being empty.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8450
2019-03-27 15:03:39 -07:00
Cedric BAIL 1eb49b2e9b elementary: prevent asynchronous properties change to believe target is ready when it is not in fileselector.
In some case, the properties changed event would be triggered first on the object model
instead of the target model. This now enforce that the target will be the first model
to handle and react on the information.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8449
2019-03-27 15:03:37 -07:00