Commit Graph

195 Commits

Author SHA1 Message Date
Ali Alzyod ff3d3b1944 efl_access_text: remove ptr usage in eo files
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11907
2020-06-02 08:07:48 +02:00
Shilpa Singh ea75b69134 elm_entry, accessibility: Send utf8 text instead of markup to ATSPI client
Summary:
Markup text cannot be read as per expectation by a text to speech engine, hence send text
in UTF8 format

Test Plan: Test the text returned by connecting to object:text-changed:insert and object:text-changed:delete events in ATSPI-clients

Reviewers: kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11660
2020-04-07 20:23:46 +09:00
Marcel Hollerbach 6524b0a155 ecore_evas_x: correctly handle images in X11
I thought that i explicitly tested this. However, it seems i was wrong,
this way now this is handled correctly, and the image is stored and
coverted to a path.

With this you can now copy images from chromium and firefox to elm apps.

The change in elm_entry reverts parts of the rewrite of the elm
handling, as initially every path came *without* "file://" in front, so
we have to maintain that.

fixes T8625
2020-03-09 17:10:39 +01:00
Marcel Hollerbach 165f6f0ae2 rewrite efl cnp and dnd handling
the previous commits introduced a abstraction for drag in drop which can
be now used for this here. With this commit all the direct protocol
handling in efl.ui is removed, and only the ecore evas API is used.

Additionally, this lead to a giant refactor of how APIs do work. All
Efl.Ui. interfaces have been removed except Efl.Ui.Selection and
Efl.Ui.Dnd, these two have been restructored.
A small list of what is new:
- In general no function pointers are used anymore. They feel very
  uncompftable in bindings and in C. For us its a lot easier to just
listen to a event when a drop enters or leaves, there is no need to
register custom functions for that.
- Asynchronous data transphere is handled via futures, which proved to
  be more error safe.
- Formats and actions are handled as mime types / strings.
- 0 is the default seat if you do not know what else to take.
- Content is in general passes as a content container from eina, this
  also allows applications to pass custom types

The legacy dnd and cnp API is implemented based on that.
All cnp related things are in elm_cnp.c the dnd parts are in elm_dnd.c

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11190
2020-03-08 10:59:40 +01:00
Ali Alzyod 3d2f99af9e efl.text.interactive: use Eina_Int_Range for selection range event
Summary:
1- add new Eina type  (Eina_Int_Range). which represents int range (start, Len).
2- Use this type instead of  Efl.Text_Range  with selection events.

Reviewers: cedric, woohyun, bu5hm4n, segfaultxavi, zmike

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8570

Differential Revision: https://phab.enlightenment.org/D11128
2020-01-23 16:07:42 +09:00
Ali Alzyod 3359e03500 efl.ui.text: rename to efl.ui.textbox
Summary:
This patch will rename efl.ui.text into efl.ui.textbox

Effected classes:
 - efl.ui.text_async   :  efl.ui.textbox_async
 - efl.ui.text_editable   :  efl.ui.textbox_editable **will be removed anyway**

Needs consider Classes:
- efl.ui.text_part
- efl.ui.text_factory.Emoticons
- efl.ui.text_factory.Fallback
- efl.ui.text_factory.Images

Reviewers: woohyun, segfaultxavi, bu5hm4n, zmike, YOhoho

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10835
2019-12-11 09:47:50 +09:00
Ali Alzyod c00db387c3 Efl.Ui.Text : all related interfaces
Summary:
Change summary:

Removed :
- efl_ui_text_selectable.eo and add it functionality into efl_text_interactive.eo
- efl_ui_text_editable.eo because it is same as efl_ui_text.eo (just set one property by default)

Modifications:
- Move all Text Input enums and functionality from efl_ui_text class into its own interface,  this interface will be implemented at efl_ui_internal_text_interactive class.

- Rename selection_allowed property to selectable (same as other "editable" property) in efl_text_interactive

- Add select_all function into efl_text_interactive interface

- Add have_selection property into efl_text_interactive interface

- Move user_change , selection_start/change/clear   and undo/redo events into efl_text_interactive interface.

- Move methods and events of copy/paste/cut into efl_ui_text

- Fix password-related functionality

- Remove context menu clear and add_item methods.  (these should be added later with better design)

- Remove Validation event from EFL_UI_TEXT.  (these should be added later with better design)

Reviewers: woohyun, tasn, segfaultxavi, zmike, bu5hm4n

Subscribers: stefan_schmidt, a.srour, q66, zmike, segfaultxavi, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10711
2019-12-09 10:58:39 +09:00
Marcel Hollerbach 01bf9a34d6 elm_entry: fix wrong displayed scrollbars
the scrolbars have been displayed wrongly before. Reason for this is
that the theme displays the bars per default, the code however works
with hidden by default. This was worked arround before with the fact
that we are explicitly hiding the vbar/hbar before.
The reason this previous code was not working proberly is that entry
decided to retheme a object that was already set to the interface
scrollable object. Which means, it was not detected by the code. With
the newly introduced reset function you can tell the interface, that you
have changed the group, signals will be emitted accordingly.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10622
2019-11-07 22:24:11 +01:00
Marcel Hollerbach a864d62ecf elm_*: make scrolling correct again
in revision D9859 the scroll events have been renamed. However this also
renamed the legacy widgets, which also renamed the evas smart events,
which is a bug. With this commit we are back to plain old
evas_smart_callback_call calls, as these just take the string, and do
not need the bypassing through the eo events.

This fixes:
- elm_test gengrid,toolbar,panel (the events are now shown correctly
again)
- scrolling in elm_code_widget
- elm_map in a touchscreen

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10240
2019-09-28 18:42:45 +02:00
Mike Blumenkrantz 105f016fc9 elm: rename layout part aliasing functions/macros
these are internal apis for managing part aliasing on the C side,
but they apply to efl_ui_layout and not elm_layout

no functional changes

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D10090
2019-09-24 13:56:11 -07:00
Hosang Kim a6aa1b912e efl.ui.scrollable: fix event name for scrollable
Summary:
Event name is applied in the past tense.
Meaning of 'stop' is 'stop it early', so I changed it to 'finish'

Test Plan: elementary_test -> efl.ui.scroller

Reviewers: segfaultxavi, woohyun

Reviewed By: segfaultxavi

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9859
2019-09-16 12:04:27 +02:00
Bowon Ryu bbd213bcfb elm_entry: add null check logic on elm_entry_text_set API
Summary: If current_text is NULL, a segmentation fault is occured.

Test Plan: N/A

Reviewers: cedric, Hermet, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9780
2019-08-30 08:47:19 -04:00
Mike Blumenkrantz 01fc7eae35 elm: fix macro for group_calc function naming
this should be efl_canvas_group_group_calculate to match eolian function
naming

no functional changes

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9685
2019-08-23 07:33:52 +02:00
Mike Blumenkrantz 187425e12c elm/hoversel: manually trigger group_calc for internal objects
hoversel doesn't implement group calc or do any sane type of sizing
so just manually call these on demand to ensure the correct size is used

fix T8127

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9632
2019-08-19 16:47:06 -07:00
Mike Blumenkrantz 1948bf0d07 elm/hoversel: avoid calling api functions on null hoversel objects
the hoversel must be created before it can be shown, and its internal
hover object may be destroyed when it is hidden

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9631
2019-08-19 16:47:04 -07:00
Carsten Haitzler 894c1b34b3 elm entry - respect plain text newlines on paste again...
make this work like it used to... fixes T8135
2019-08-15 00:08:57 +01:00
Mike Blumenkrantz 7e517e2a11 elm/efl_ui: remove elm_layout_sizing_eval implementations
Summary:
historically there have been two methods of calculating sizes in elm:
* elm_layout_sizing_eval
* evas_object_smart_calculate (now efl_canvas_group_calculate)

the former was used to set size hints on widgets, while the latter was
used to perform internal size calcs for the widget. for things to
work correctly, these functions had to be triggered in just the right
order at just the right time. many hard-to-fix bugs related to widget
sizing over the years have been the result of this split

this patch removes elm_layout_sizing_eval implementations so that all
widgets perform both internal size calcs and size hint setting all
in the same function, ensuring that these are always in sync

the result is that in the vast majority of cases, far fewer recalcs
happen for widgets, and they are quicker to achieve their final size

Depends on D9438

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9439
2019-07-30 13:12:52 -04:00
WooHyun Jung 77e268e6ab efl_input_clickable: rename efl_ui_clickable to efl_input_clickable
Summary:
Renamed all efl_ui_clickable_XXX to efl_input_clickable_XXX based on
the discussion in T7847

ref T7847 T7976

Reviewers: zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7976, T7847

Differential Revision: https://phab.enlightenment.org/D9427
2019-07-29 11:43:01 +02:00
Mike Blumenkrantz a9ef4ab348 elm/entry: use edje functions directly for interacting with edje objects
Summary:
this eliminates a number of errors triggered when processing class hierarchy
to reach the desired subobject with these edje functions

@fix
Depends on D8958

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8959
2019-05-29 12:29:03 -04:00
Bowon Ryu b5a7ee2ae4 elm_entry: prevents invalid cursor position updates
Summary:
sd->cursor_pos is updated in _entry_cursor_changed_signal_cb.
Generally, there is no problem.
But in some cases, before the _entry_cursor_changed_signal_cb is called
there is a situation in which cursor_pos is updated through _elm_entry_efl_ui_widget_theme_apply.

In this case,
before _entry_cursor_changed_signal_cb is called,
in _elm_entry_efl_ui_widget_theme_apply ()
cursor_pos = sd->cursor_pos; The wrong cursor_pos is set here.
Because it is the value before sd->cursor_pos is updated.
This causes an invalid cursor position when entering a key into the entry.

This patch prevents sd->cursor_pos from being updated with invalid values.

Reviewers: zmike, woohyun

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8923
2019-05-21 09:30:04 -04:00
Marcel Hollerbach 41e1dadbf1 elementary: do not emit new events in legacy
Summary:
This commits prepares the tree in order to mess with the events in the
Efl.Ui.Clickable event. Events which have been emitted in a none legacy
widget, are now emitted either with evas, when the widget is legacy due
to inheritance. Or via the normal event and normal event functions.

In case the widget is a legacy only widget (not used at all in the new
api), then the events are for now emitted with
evas_object_smart_callback_call.

Cases where event handlers have been added to legacy widgets, smart
events are now used, and not the eo one anymore.

ref T7844

Depends on D8813

Reviewers: cedric, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7844

Differential Revision: https://phab.enlightenment.org/D8816
2019-05-13 15:14:13 -04:00
Ali Alzyod bfaec01987 elm_entry: speed up setting text (check if same text is already set), fix setting same text pointer
This patch deal with two cases:

1- Setting text in Entry (elm_entry_entry_set) , as the one get using (elm_entry_entry_get), caused the entry to become empty.
     * becase entry string was free inside the elm_entry_entry_set function, without checking new passed string.

Now we check if same string was passed to the function, then nothing need to be changed.

```
// Old Behaviour : Entry will become empty
// New Behaviour : Entry will Skip setting same text
elm_entry_entry_set(app->entry, elm_entry_entry_get(app->entry));
```

2- Setting text in Entry (elm_entry_entry_set) , with same content string.
     * internally entry will set empty string then set passed string, which will case recalculation and re-render the entry element.

Now we check if same string data that is passed to the function is the same of the entry content, then nothing need to be changed.

```
// This will be skiped internally since same text is set
elm_entry_entry_set(app->entry, "aaaaa");
elm_entry_entry_set(app->entry, "aaaaa");  //skipped
```

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8572
2019-05-06 17:07:29 +02:00
Yeongjong Lee 41136db8e8 ui.widget: remove elm_widget_sub_object_parent_add from each of widgets
since commit a1addad60e, To add myself as a sub object of parent object will be
done in Efl.Ui.Widget constructor.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8280
2019-04-18 11:01:19 +02: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
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
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
Wonki Kim 8e8aa74751 entry: move a point to do 'auto_save' to another place
Summary:
By reworking on efl_file, logic flow for entry has been changed.
and it causes autosave making a file that is passed to elm_entry_file_set empty.

Test Plan:
1. call elm_entry_file_set for a file.
2. check the file is not empty after calling the function.

Reviewers: zmike, bu5hm4n

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8362
2019-03-27 10:58:30 -04:00
WooHyun Jung d761658985 elm_entry: fix a bug in moving the magnifier
Summary:
When moving the magnifier in elm_entry, _magnifier_move
function occured infinite loop problem by calling
evas_object_move twice with different positions.
So, I changed it to call evas_object_move once.

ref T7202

Test Plan:
1. Set profile to "mobile"
2. elementary_test
3. entry
4. long press mouse button on elm_entry
5. when the magnifier is shown, try to move it

Reviewers: zmike, bu5hm4n, bowonryu, id213sin

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7202

Differential Revision: https://phab.enlightenment.org/D8462
2019-03-25 08:52:10 -04:00
Marcel Hollerbach c9cdb916cd Revert "efl_ui_selectable: namespace events to avoid conflicts"
Summary:
This reverts commit f629f11bed.

This breaks legacy events. As the selected event is used in legacy
widgets. Also this commits mixed up two different concepts, selection in
a entry etc. and selection of a item.
Depends on D8411

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8412
2019-03-19 16:29:39 -04:00
Christopher Michael 7ceba76957 elm_entry: Add missing EINA_UNUSED
'sd' is an unused parameter here so add missing EINA_UNUSED
2019-03-19 08:31:03 -04:00
Ali Alzyod d8c770be1c Fix _entry_has_new_line on detecting new lines when it finds <br> <ps> in passed string
Summary:
Fix issue where **_entry_has_new_line** will not detect '<br>' or '<ps>' inside markup text as new lines indicators.

this  functionlity effect following public function:
**elm_entry_single_line_set()**

Reviewers: woohyun, bowonryu, ManMower, cedric, raster, segfaultxavi

Reviewed By: bowonryu, segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8323
2019-03-18 19:47:57 +01:00
Wonki Kim 597b82444a elm_entry: fix to keep api backward compatability
Summary:
if passing NULL as filename to elm_entry_file_set,
elm_entry_entry_get NULL as return value before.
and it doesn't now.

Test Plan:
1. passing a existing file to efl_entry_file_set
2. passing NULL as file to efl_entry_file_set
3. check return value of elm_entry_entry_get

Reviewers: zmike, bu5hm4n

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8363
2019-03-15 11:23:09 -04:00
Wonki Kim dae881c9dc elm_entry: fix to return a error code if a argument is not valid
Summary:
if format is not specified, it should return some error code.
this is a kind of a patch to keep backward compatability of the api.

Reviewers: zmike, bu5hm4n

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8337
2019-03-15 11:23:09 -04:00
Mike Blumenkrantz f629f11bed efl_ui_selectable: namespace events to avoid conflicts
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8261
2019-03-08 12:17:54 -08:00
Mike Blumenkrantz a8057a3403 elm_entry: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8166
2019-03-07 14:15:12 -08:00
Mike Blumenkrantz 1abf1518fe elm_hoversel: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8134
2019-03-06 13:03:08 -08:00
Mike Blumenkrantz 9a361ac917 efl_access_object: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8131
2019-03-06 13:03:02 -08:00
Mike Blumenkrantz bb6caaa471 efl.ui: remove Efl.Ui.Theme_Apply_Error
Summary:
now that the error codes have been change to be compatible with eina_error,
this can be removed and will work through eina_error naturally

fix T7718

Depends on D8067

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8068
2019-03-04 13:37:07 -05:00
Mike Blumenkrantz 644b771fe4 efl.ui: Efl.Ui.Theme_Apply_Result -> Efl.Ui.Theme_Apply_Error
Summary:
this swaps the values of "no error" and "error" in order to maintain
consistency with the rest of efl where the zero value means "no error"
Depends on D8060

Reviewers: cedric

Reviewed By: cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8063
2019-03-04 13:36:41 -05:00
Mike Blumenkrantz 0b152734ba efl_ui_widget: redo disable handling
before the disable property was a bit weird. Setting something to
disabled=true will disable all children of the widget that is changed.
However, only the update function of the children will get the false flag,
not the flag itself. Which means, to query the real disabled state, we
need to walk up the parent relations.

With this patch, every change to disabled will go through the disabled
property, which mean, a implementor can just overwrite the disabled
property, and adjust its internal state there. Just be carefull, a set
to disabled=true still might result in disabled=false. This makes the
function on_disable_update unneccesary. Which also cleans up the
Efl.Ui.Widget class.

ref T7553

Depends on D8016

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8017
2019-02-27 20:19:23 +01:00
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

this patch attempts the following changes:
* split "file" property into "file" and "key" properties
  - also remove "key" from existing "mmap" property
* remove "load_error"
* directly return error codes from operations
* add "load" and "unload" methods for directly controlling load state
* add implicit file loading if file/mmap is set during construction
* rewrite all efl.file implementations to move file loading into load() method
* rewrite all usage of efl.file api based on these changes
* add C extension functions to mimic previous behavior

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

Differential Revision: https://phab.enlightenment.org/D8018
2019-02-27 13:17:10 -05:00
Marcel Hollerbach 37d2d378ec eolian: drop class function overriding
Until this commit eo did class functions as part of the vtable, which
enabled those functions to be overwritten in classes inheriting another
class. However in task T7675 we decided that this is not really good for
bindings, as most OOP languages do not support this sort of feature.

After this commit eolian realizes class function completly outside of
the vtable, the c-symbol that is the class funciton is now just directly
redirecting to a implementation, without the involvement of the vtable.

This also means a change to the syntax created by eo:

Calling before:
  class_function(CLASS_A);
Calling after:
   class_function();

Implementation before:
   class_function(const Eo *obj, void *pd) { ... }
Implementation after:
   class_function(void) { ... }

This fixes T7675.

Co-authored-by: lauromauro <lauromoura@expertisesolutions.com.br>

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D7901
2019-02-13 16:59:58 +01:00
Cedric BAIL f484ca0951 edje: migrate Eo API to use Eo callback instead of opaque type.
Summary: Depends on D7869

Reviewers: zmike, q66, segfaultxavi, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7671

Differential Revision: https://phab.enlightenment.org/D7870
2019-02-06 13:48:43 -05:00
Mike Blumenkrantz bb09142477 elm_entry: make file loading succeed on 0-sized files
a file which has no data is still a valid file and should be correctly
opened

fix T6562
@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7647
2019-01-16 15:57:54 -08:00
Chris Michael 1bea98eba4 elementary: Reduce EO calls by using geometry_set
This patch reduces EO calls by using evas_object_geometry_set rather
than calling move & resize.
2018-11-21 11:25:58 -05:00
Jaehyun Cho 4f9c8d524c efl_ui_theme: Introduce Efl.Ui.Theme class
Summary:
Efl.Ui.Theme class is required to support language bindings.
Efl.Ui.Theme works based on current elm_theme features.

This patch fixes T7357.

Reviewers: segfaultxavi, cedric, lauromoura, woohyun, zmike, SanghyeonLee

Reviewed By: segfaultxavi, SanghyeonLee

Subscribers: SanghyeonLee, herdsman, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7357

Differential Revision: https://phab.enlightenment.org/D7244
2018-11-20 13:56:37 +09:00
Jaehyun Cho 2d460e52e4 elementary: remove Efl.Ui.Layout namespace
Summary:
Efl.Ui.Layout namespace is removed to keep consistency with other
widgets.
Consequently, "Efl.Ui.Layout.Object" is renamed to "Efl.Ui.Layout" and
"Efl.Ui.Layout." is renamed to "Efl.Ui.Layout_".

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers, SanghyeonLee, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7291
2018-11-16 11:11:13 +01:00
Marcel Hollerbach 9f758dc363 elm: update widgets that have documented focus and unfocused events
this emits focus and unfocus on those widgets.

fixes T7386

Depends on D7124

Differential Revision: https://phab.enlightenment.org/D7103
2018-11-15 13:55:37 +01:00
Carsten Haitzler b601e6f54b elm entry - warn - write a specirfic string truncate func to avoid warnings
so gcc likes to warn even if the truncation is intended. there are
verious ways around this, but in this case it's really just writing
your own ... which is pretty simple.

there is just too much warning noise for efl.
2018-11-09 12:18:59 +00:00
Youngbok Shin 75296e32df elementary entry: apply scale to all edje objects
Summary:
When an entry is scrollable, its resize object is scr_edje.
So, to apply scale properly, elm_entry needs to apply scale
to its entry_edje, too.
@fix

Test Plan: Apply scale to scrollable entry

Reviewers: herdsman, woohyun, cedric, eagleeye

Reviewed By: eagleeye

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7140
2018-10-04 18:53:36 +09:00