Commit Graph

43 Commits

Author SHA1 Message Date
Carsten Haitzler dcf34cef77 efl ui text - handle edje cc classes for text 2021-11-11 19:57:13 +00:00
Marcel Hollerbach 5f73d13047 efl: remove bool and string pointer mixup 2020-09-01 14:12:31 +02:00
Carsten Haitzler c565403bda elm scroller - fix mapping of block enums - was broken 2020-08-25 13:21:25 +01:00
Ali Alzyod f126c7f06c efl_ui_textbox: preserve changing user color set
Summary:
setting color inside the constructor call will be override in theme apply because it happen later.
txt = efl_add(EFL_UI_TEXTBOX_CLASS, win,
               efl_text_color_set(efl_added, 0, 255, 0, 255));

Now we will preserve user choice, to not change it during theme apply.

Test Plan: ninja test

Reviewers: woohyun, bu5hm4n, zmike, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11942
2020-08-05 13:33:03 +09:00
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
Xavi Artigas f526ad8c26 Fix namespace clashes for Efl.Text.Cursor
Three renames are applied here:
Efl.Text.Cursor -> Efl.Text_Cursor.Object (class)
Efl.Text.Cursor_Type -> Efl.Text_Cursor.Type (enum)
Efl.Text.Cursor_Move_Type -> Efl.Text_Cursor.Move_Type (enum)

Nothing changes for the enums on the C side. For the class... Well,
the method names are a bit more verbose now.

These renames are required to avoid clashing with the Efl.Text interface.
This did not cause trouble to C# because interfaces are prefixed with "I",
but it did cause trouble to Eolian when the EO files were installed and
somebody tried to use them.
Ref T8648

Differential Revision: https://phab.enlightenment.org/D11663
2020-04-14 12:25:55 +02:00
Marcel Hollerbach f885896890 efl_ui_textbox: pass in correct seat
0 was the wrong seat, and only worked on a small amount of systems

fixes T8639

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11622
2020-03-30 16:57:51 +02:00
Ali Alzyod 8e7a01b16f efl.ui.textbox: load default font properties once
As described in task T8617
when toggle editable mode for textbox, we will reserve user changes (instead of reload them again).

this issue is affected by D9502, I do not fully understand why do we need it, so I leave color loading as it is.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11404
2020-03-20 15:58:06 +01:00
Ali Alzyod 765c5c2a0b efl.ui.textbox: proxy for efl.ui.scrollable interface
Allow users to use scroller functinality with efl.ui.textbox

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11479
2020-03-12 18:05:06 +01:00
Marcel Hollerbach fa988becd2 efl_ui_textbox: dont leak a array when no type is available
this fixes a possible leak.
2020-03-09 17:10:40 +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 6ce2698bb5 efl.ui.textbox: prevent longpress + right click from working on scrollbars
summary_: Longpress and right click one textbox scrollbars will not show up the menu.

Reviewers: woohyun, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8604

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11295
2020-02-07 14:20:29 +01:00
abdulleh Ghujeh 7c058d5e61 efl_text_change_info: change text change type property( bool -> enum)
changed the insertion property to be an enum instead of a boolean property.
this will be clearer for usage and provide the ability to add more types in the future.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11272
2020-02-04 09:54:58 +01:00
Ali Alzyod a92f8c210b efl.ui.textbox: add and use keyboard bindings
As other widgets, efl.ui.textbox will use keyboard bindings instead of listen to keyboard events

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11236
2020-02-04 09:14:04 +01:00
Ali Alzyod d6094b7995 efl.ui.textbox: replace strncmp with strcmp for Part
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11218
2020-01-29 11:13:29 +01:00
Ali Alzyod 64232138ef efl.ui.textbox: replace ecore_job with Efl_Future
This patch will replace the use of ecore_job with Efl_Future

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11216
2020-01-29 11:13:26 +01:00
Ali Alzyod d53f83571a efl.ui.textbox: clean up all evas_object related functions from stable methods/interfaces
This patch will:
- Replace all Evas callbacks with unified ones.
- Replace evas_object* methods with unified ones (For **stabilized** methods and interfaces)

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11217
2020-01-29 11:13:23 +01:00
Marcel Hollerbach b3c0da13d8 efl_ui_textbox / efl_ui_image_zoomable: remove duplicated code
Summary:
these implementations were totally equal to what is there in
efl_ui_layout. No point in keeping them. (Note, entry_edje is equal to
resize_obj)

ref T8522

Reviewers: segfaultxavi, cedric, zmike, woohyun

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8522

Differential Revision: https://phab.enlightenment.org/D11141
2020-01-28 06:49:46 +09:00
Ali Alzyod 279f2eca06 efl.ui.textbox: move file implementation in to internal class
We want to keep implementation for file interface in a safe place and remove it from our side world (eo).

This is a simple copy-paste, from efl.ui.textbox into efl_ui_internal_text_interactive

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11153
2020-01-23 10:04:08 +01:00
Ali Alzyod 085bfb7eaf efl.input.text.hints_type: rename into content_type
Reviewers: woohyun, segfaultxavi

Reviewed By: woohyun, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8541

Differential Revision: https://phab.enlightenment.org/D11130
2020-01-20 21:25:43 +09:00
Ali Alzyod 28675d2705 efl.ui.textbox: using efl_provider_find
Summary: > Code structures like top = elm_widget_top_get(data); and if (efl_isa(top, EFL_UI_WIN_CLASS)) can be replaced with top = efl_provider_find(widget, EFL_UI_WIN_CLASS) No type check needed. (That should enhance the performance)

Reviewers: woohyun, bu5hm4n, cedric

Reviewed By: bu5hm4n, cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8522

Differential Revision: https://phab.enlightenment.org/D11127
2020-01-20 16:55:32 +09:00
Ali Alzyod e92ee40b2f efl.ui.textbox: update _part_is_efl_ui_textbox_part
efl.ui.textbox: update _part_is_efl_ui_textbox_part

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11109
2020-01-16 16:36:42 +01:00
Ali Alzyod 250c7bd30d efl.ui.textbox: theme code cleanup
>You should not theme in _efl_ui_textbox_efl_object_finalize, but rather in theme_apply
>All part swallow things should be done in theme_apply.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11103
2020-01-16 16:36:39 +01:00
WooHyun Jung 0b389a8338 efl_ui_textbox: rename efl_ui_text_part to efl_ui_textbox_part
ref T8522

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11107
2020-01-16 09:50:10 +01:00
Ali Alzyod bbecc6662d efl.ui.textbox: part implementation comments clean up!
Summary:
We did not use the **ELM_PART_OVERRIDE_** because it produces compilation error

```
../src/lib/elementary/efl_ui_textbox.c:3603:40: error: ‘EFL_UI_TEXTBOX_PART_CLASS’ undeclared (first use in this function)
 ELM_PART_OVERRIDE_PARTIAL(efl_ui_text, EFL_UI_TEXTBOX, Efl_Ui_Textbox_Data, _part_is_efl_ui_text_part)
```

Reviewers: woohyun, bu5hm4n

Reviewed By: woohyun

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8522

Differential Revision: https://phab.enlightenment.org/D11102
2020-01-16 09:12:01 +09:00
Ali Alzyod 4386a70177 efl.ui.textbox: paste in mouse button 2
efl.ui.textbox: paste in mouse button 2 work on primary instead of clipboard

Differential Revision: https://phab.enlightenment.org/D11068
2020-01-15 11:03:52 +01:00
Ali Alzyod 1a1868ce57 efl.ui.textbox: replace hoversel with popup
efl.ui.textbox: replace hoversel with popup
**I think this may need some changes, please let me know what you think**

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11072
2020-01-15 10:49:58 +01:00
Ali Alzyod 2201b562d0 efl.ui.textbox: legacy cleanup
efl.ui.textbox: legacy cleanup

Differential Revision: https://phab.enlightenment.org/D11067
2020-01-13 12:25:55 +01:00
Christopher Michael 9488991ee5 elementary: Add missing EINA_UNUSED for unused parameter
NB: This file is a mess wrt formatting
2020-01-09 09:17:28 -05:00
Ali Alzyod 1a02745a88 efl.text.cursor: change to abstract class
Summary:
1- Change cursor to abstract class
2- Remove copy method from cursor
3- remove cursor_Add method from efl.canvas.textblock and efl.ui.textbox

Reviewers: woohyun, segfaultxavi, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: lauromoura, YOhoho, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8299, T8454

Differential Revision: https://phab.enlightenment.org/D11034
2020-01-09 22:33:07 +09:00
Ali Alzyod b03f06ca8d efl_ui_textbox: replace elm_obj stuff and focuse stuff
Summary: efl_ui_textbox: replace elm_obj stuff and focuse stuff

Reviewers: woohyun, bu5hm4n

Reviewed By: woohyun, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8522

Differential Revision: https://phab.enlightenment.org/D11025
2020-01-09 13:57:04 +09:00
Ali Alzyod 622f0b188f efl.ui.textbox: rename selection_handler to selection_handles
Summary: efl.ui.textbox: rename selection_handler to selection_handles

Reviewers: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8522

Differential Revision: https://phab.enlightenment.org/D11042
2020-01-09 13:44:50 +09:00
WooHyun Jung 4b7e7b732d efl_text_change_info: rename some properties
insert -> insertion
merge -> mergeable

ref T7933

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11016
2020-01-07 11:00:38 +01:00
Ali Alzyod cdaecf2dfb efl.ui.textbox: clean up (remove unused vars and methods)
efl.ui.textbox: clean up (remove unused vars and methods)

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11023
2020-01-06 14:37:41 +01:00
Ali Alzyod 31a96be9a2 efl.ui.textbox: replace legacy scroller type check
replace legacy scroller type check ELM_INTERFACE_SCROLLABLE_MIXIN with EFL_UI_SCROLLABLE_INTERFACE

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11003
2020-01-06 14:37:38 +01:00
Ali Alzyod 3cc8ea77fa efl_ui_text: scroller mode clean up
simplify code, and reduce calls:

It is only required to set scroll mode in two cases:
- When creating scroller
- When changing multiline property

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10981
2020-01-02 12:41:13 +01:00
Ali Alzyod 5154b5a8fc efl_ui_text: support focus navigation
With this commit you can move the focus from the textbox widget to the surrounding widgets, (as it is done in legacy).

ref T8538
ref T8522

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10987
2019-12-31 11:56:59 +01:00
Ali Alzyod 895f64f33c efl_ui_textbox: replace legacy calls with new ones
Summary: This patch only changes some of legacy calls, with new ones

Reviewers: woohyun, zmike, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8522

Differential Revision: https://phab.enlightenment.org/D10982
2019-12-30 10:31:33 +09:00
Ali Alzyod 7c71dc4e2d efl.ui.textbox: fix crash when toggle scroll mode
Reviewers: eagleeye, bu5hm4n, cedric, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10924
2019-12-27 10:17:17 +09:00
Ali Alzyod b9818f566c efl.ui.textbox: rename _disabled properties into _enabled
Reviewers: segfaultxavi, woohyun, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8522

Differential Revision: https://phab.enlightenment.org/D10923
2019-12-20 14:10:00 +01:00
Ali Alzyod 8dbc75fdce efl_text_attribute_factory: rename to efl_text_formatter
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8455

Differential Revision: https://phab.enlightenment.org/D10925
2019-12-20 12:43:00 +01:00
Ali Alzyod 5cf7fa7670 efl.text.style: rename methods/properties and add text_ prefix
Summary:
efl.text.style: rename methods and properties

this change will avoid conflict in the future with other interfaces or class methods.

```
      Efl.Text_Style.text_color { set; get; }
      Efl.Text_Style.text_backing_type { set; get; }
      Efl.Text_Style.text_background_color { set; get;}  //this was backing_color
      Efl.Text_Style.text_underline_type { set; }
      Efl.Text_Style.text_underline_color { set; get; }
      Efl.Text_Style.text_underline2_color { set; get; }
      Efl.Text_Style.text_underline_dashed_color { set; get; }
      Efl.Text_Style.text_underline_height { set; }
      Efl.Text_Style.text_underline_dashed_width { set; }
      Efl.Text_Style.text_underline_dashed_gap { set; }
      Efl.Text_Style.text_strikethrough_type { set; }
      Efl.Text_Style.text_strikethrough_color { set; get; }
      Efl.Text_Style.text_effect_type { set; }
      Efl.Text_Style.text_shadow_direction { set; }
      Efl.Text_Style.text_outline_color { set; get; }
      Efl.Text_Style.text_shadow_color { set; get; }
      Efl.Text_Style.text_glow_color { set; get; }
      Efl.Text_Style.text_glow2_color { set; get; }
```

T8533

Reviewers: woohyun, segfaultxavi, bu5hm4n, zmike, cedric

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10897
2019-12-20 09:58:27 +01: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