Commit Graph

75 Commits

Author SHA1 Message Date
Jean-Philippe Andre 796d4b138b elm: Make content and text aliases internal only
This removes the APIs from the EO API.

Ref T5315
2017-08-04 10:24:03 +09:00
Daniel Hirt 2efa25511f Elm entry: fix call to set text via entry_set
Accidentally called the super here, so did not get routed to
'_elm_entry_text_set'.

Fixes T5803.
2017-07-28 12:36:07 +03:00
Mike Blumenkrantz fe48334c59 elm_entry: don't use window_id to determine type of window
there's a real function for this...

ref a173efd0a9
2017-07-07 15:22:24 -04:00
Mike Blumenkrantz 378ac8b6aa elm_entry: don't update PRIMARY selection under wayland
this doesn't exist yet, and elm_cnp forces PRIMARY updates to overwrite
CLIPBOARD which is not good

@fix
2017-07-07 15:22:23 -04:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Jean-Philippe Andre 075b4a7a0c elm: Remove EOLIAN tags in some files
Some functions were marked as EOLIAN when in fact they were
used by the ELM_PART override APIs.
2017-07-05 20:07:29 +09:00
Jean-Philippe Andre 59081043a8 elm: Always pass valid part name inside part APIs
This affects the legacy content_set/get/unset part APIs. This
should avoid some unwanted ERR messages in case an elm_object_
API is used on an elm widget that doesn't implement said API.

What this does is request the widget for the name of the default
part if NULL was passed in. Since some widgets are not elm_layout,
they have to override the API themselves, which is why I made it
an internal EO API (rather than a series of efl_isa()).

In theory, part should never be NULL when reaching the internal
implementation code in the widgets, at least for content.

In EO, efl_part(obj, NULL) should be invalid.

Ref T5629
2017-06-30 14:37:54 +09:00
Sungtaek Hong 82a955be90 elm_entry: use layout text/content aliases when text_set/get content_set/get/unset
Summary:
- elm_entry has elm.guide text part and it can be set by "guide".
- However when using text_aliases_get, this cannot be found.
- Add elm_obj_elm_layout_part_aliasing_eval() internal APIs to make entry
  use proper aliases.

Test Plan:
1. Run elementary test
           2. Observe search entry has guide text with "guide" part.
           3. Run Entry 8.
           4. Observe "elm.guide" part also works.
           5. Observe "icon" and "end" part works.

Reviewers: id213sin, herdsman, jpeg

Reviewed By: jpeg

Subscribers: conr2d, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4962
2017-06-30 14:37:54 +09:00
Jihoon Kim 1dcf2c814c elm_entry: Add prediction hint API
prediction hint can be used to provide an intelligent reply suggestion.

@feature
2017-06-26 13:44:58 +09:00
Jean-Philippe Andre a173efd0a9 cnp: Fix copy & paste in inwin inside wayland
Scenario:
  ELM_DISPLAY=wl elementary_test -to "Window Inline"

Copy & paste some stuff between entries inside the inwins and
also in a standard window.
2017-06-15 17:35:44 +09:00
Jean-Philippe Andre ed41adf791 widget: Implement mirrored from Efl.Ui.Base
Ref T5363
2017-06-14 11:02:05 +09:00
Jean-Philippe Andre 06b14827b7 widget: Implement scale from Efl.Ui.Base 2017-06-12 11:50:30 +09:00
Daniel Hirt 98dad1a52b Canvas layout: port 'part_text' to Efl.Text.*
The following API is now supported with efl_part:

  - Efl.Text.text { set; get; }
  - Efl.Text.Cursor.cursor { get; }
  - Efl.Text.Cursor.cursor_paragraph_first;
  - Efl.Text.Cursor.cursor_paragraph_last;
  - Efl.Text.Cursor.cursor_position { set; get; }
  - Efl.Text.Cursor.cursor_coord_set;
  - Efl.Text.Cursor.cursor_line_char_first;
  - Efl.Text.Cursor.cursor_line_char_last;
  - Efl.Text.Cursor.cursor_char_next;
  - Efl.Text.Cursor.cursor_char_prev;
  - Efl.Text.Cursor.cursor_line_jump_by;
  - Efl.Text.Cursor.cursor_copy;
  - Efl.Text.Cursor.cursor_content { get; }
  - Efl.Text.Cursor.cursor_geometry { get; }
  - Efl.Text.Cursor.cursor_text_insert;

Many of the 'part_text' functionality was moved to legacy, too.
See the edje_object.eo to see which ones are still supported.
2017-06-12 00:10:05 +03:00
Youngbok Shin 22ed579430 elementary entry: update focus state when editable state is changed
Summary:
To recieve keyboard events, the entry_edje should have Evas focus.
But, if a non editable Entry widget takes focus, it can't recieve
keyboard events even if it becomes editable after taking focus.
So, elm_entry_editable_set() function should update Entry's focus state.
@fix

Test Plan:
The code of elementary_test - entry is modified to test this issue.
Please, check the issue with the following steps.

1. Run "elementary_test entry"
2. Click "Unfocus" button to make entry to "unfocused" state.
3. Click "Edit" button to make entry to non-editable mode.
4. Click "Focus" button to make entry to "focused" state.
5. Click "Edit" button to make entry to editable mode.
6. See a cursor is blinking in entry.
   => But, you can't edit text without this patch.

Reviewers: raster, herdsman, cedric, jpeg, woohyun

Differential Revision: https://phab.enlightenment.org/D4858
2017-06-09 14:28:40 +09:00
Daniel Hirt ca8a8b712c Elm layout: fix a few objects after move to efl_part
Fixes elm_layout_text_set/get bugs that were introduced in
3eb649b180.
2017-06-05 12:00:27 +03:00
Daniel Hirt 3eb649b180 Elm layout: replace 'text' property with 'efl_part' interface
The expected usage is efl_text_set(efl_part(layout, part), text);
Same for text_get.

Also, added an example how to make API easier with providing
efl_text_set/get for the widget itself, in efl_ui_button. Please see
this example.
2017-06-05 02:08:03 +03:00
Jean-Philippe Andre 55b529cebc evas/elm: Make group_add/group_del internal functions
This hides those two legacy functions from the EO API.
2017-05-19 14:07:00 +09:00
Mike Blumenkrantz 0eaa1a3fc2 elm_entry: request both text and markup when pasting
setting this to only markup means that it's impossible to paste into
an elm_entry from a plaintext app under wayland

@fix
2017-05-12 12:08:25 -04:00
Shilpa Singh 442ab2bc67 elm_entry: Cursor disappears on calling select function in an empty entry.
Summary:
Issue: Selection cannot happen on an empty entry, if selection functions
are called on empty entry, cursor is hidden, even if entry is focused.
Soln: Check for whether entry is empty or not before proceeding with selection.

Test Plan:
1. Call select_all, select_region_set on a focused entry
2. You can observe cursor cannot be seen.

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4862
2017-05-12 15:10:37 +09:00
Vyacheslav Reutskiy d54e130b70 elm_entry: reset 'icon' and 'end' swallow when style changed
Fixes T5397
2017-04-25 16:35:33 +03:00
Jee-Yong Um ab68723b60 elm.entry: add configuration for the default value of select_allow
Summary:
Small devices (like smart watch) can disallow entry selection by default.
This patch enables to control this behavior with elementary configuration.

Reviewers: cedric, jpeg

Subscribers: id213sin, woohyun

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 14:17:47 -08:00
JEONGHYUN YUN 8784ba97ad elm_entry: Init cursor position when entry text set.
Summary: Cursor position should be initialized because entry will be cleared when entry text set.

Reviewers: woohyun, id213sin

Reviewed By: id213sin

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4469
2016-12-09 11:33:27 +09:00
Jihoon Kim be7e8f6513 entry: set autocapital mode according to the layout 2016-12-08 15:54:48 +09:00
Youngbok Shin 281fd9231c elementary entry: fix to call "cursor,changed" callback when only cursor is changed
Summary:
"cursor,changed" smart callback should be called when only the main cusor's
position is changed. But, It was called when elm_layout_sizing_eval() is called
for elm_entry.

@fix

Test Plan: N/A

Reviewers: raster, cedric, woohyun, herdsman

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4419
2016-11-22 11:05:23 +09:00
Shinwoo Kim e648f1e85e [elementary][atspi] change accessible description to char* from const char*
Summary:
The accessible name is char*, this could confuse API user.
If we provide user callback to get description, an user would return allocated string.
The usage of elm_interface_atspi_description_get/set should be same with elm_interface_atspi_name_get/set

Reviewers: lukasz.stanislawski, cedric, raster

Reviewed By: raster

Subscribers: stanluk, jpeg

Differential Revision: https://phab.enlightenment.org/D4378
2016-11-10 11:11:48 +09:00
Youngbok Shin ab9f0ae3ca elementary entry: keep style user when new theme is applied
Summary:
The style user should be kept when entry's mode is changed.
@fix

Test Plan:
1. Run "elementary_test -to "entry style user"
2. Click "Singleline Mode" toggle
3. See the result

Reviewers: raster, tasn, herdsman, cedric

Reviewed By: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-01 11:48:44 -07:00
Jean-Philippe Andre d4929e58fc elm: Remove some eo files from installation
These are some of the EO files that shouldn't be part of the public
EO API:
- elm_access (old)
- actionslider
- bubble
- diskselector
- flipselector (a fancy spinner)
- hoversel (use combobox instead)
- icon (use image instead)
- inwin
- naviframe (unreplaced for now)
- photo (use image)
- prefs
- segment control
- separator
- slideshow
- thumb (use image)

Note: This breaks the use of the elm_widget_xxx.h headers. Those
      were internal headers anyway. Exposed because of a lack of
      a proper inheritance API.
2016-10-26 13:42:54 +09:00
Jean-Philippe Andre 8a9f0bd603 evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
 - intercept
 - smart resize (do stuff), super, super, super
 - evas object resize

The new code is more like:
 - intercept
 - super, super, super, evas object resize
 - do stuff

But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 11b7cf6b72 evas/elm: Remove function group_move
This is an override of efl_gfx_position_set.
As for the other patches, I hope I didn't break anything.

A problem likely to happen is that the super call was inserted
too early or too late in the call flow. For instance:

  _myclass_position_set(obj, x, y) {
    position_set(super(obj), x, y);
    position_get(obj, &prevx, &prevy);
    do_something_with_delta_xy();
  }

The above code flow is obvisouly wrong, but may have crept in this
patch (such a bug sneaked in inside smart object, breaking
everything at first).
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 97c9fa64a4 evas/elm: Remove group_show and group_hide
These should be just overrides of Efl.Gfx.visible.set. Many
widgets were handling smart show() and hide() manually, which
means this patch is quite large.

Hopefully this doesn't break anything, obviously. But here are
some widgets known to be problematic, as the old code flow was
really strange (sometimes not calling the efl_super function):
 - window
 - notify
2016-10-12 11:25:56 +09:00
Youngbok Shin 145f590f84 elementary entry: send a signal to edje for notifying scrollable mode
Summary:
If entry edje should be changed according to scrollable mode,
the signal will be used. The following signals are added.
	"elm,scroll,enable"
	"elm,scroll,disable"

Test Plan: N/A

Reviewers: raster, tasn, herdsman, cedric

Subscribers: minkyu, jpeg, akanad, z-wony, Blackmole

Differential Revision: https://phab.enlightenment.org/D4254
2016-09-26 16:11:10 +03:00
Andy Williams a050395770 elm: Fix edit popup menu order
Cut/Copy/Paste is the standard order most other places.
@fix
2016-09-17 23:58:55 +01:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Youngbok Shin b915d29cd1 Elementary: Load image for image item with proper orientation
Summary:
Image files can have orientation information. Elm Entry have to
call evas_object_image_load_orientation_set() for showing image
with proper orientation.

Test Plan: N/A

Reviewers: herdsman, raster, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4244
2016-08-18 14:09:16 +03:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Daniel Hirt 3eae9ff74f Elm.Entry: force cursor change on size_eval signal
This is a follow-up to ba060fe932.
Fixes T4274.
2016-08-08 16:47:22 +03:00
Cedric Bail a7bb1662e2 Revert "elementary/layout: attach edje object API with eo compositing"
This reverts commit 8a988717e1.

It seems we can't actually inherit from class more than once and neither eo
nor eolian will complain about it. You will just get random weird behavior.
This patch should come back once we have made an interface of edje.
2016-08-05 11:09:55 -07:00
Daniel Hirt 44569b859a Elm.Entry: use proper theme_set function on edje object
Shouldn't use elm_widget_theme_object_set for handlers/anchors here.

Fixes T4091.
@fix
2016-08-04 13:27:08 +03:00
Amitesh Singh ba060fe932 entry: allow force recalc on "size,eval" "elm" signal
Summary:
In some use cases, font (style) of elm.text in elm entry is changed
on focus and unfocus. user must send "size,eval",elm signal to entry to
force recalc, but this was not happening. This patch fixes that issue.

fixes T4233

Reviewers: tasn, herdsman, raster

Subscribers: cedric, seoz, jpeg

Maniphest Tasks: T4233

Differential Revision: https://phab.enlightenment.org/D4196
2016-07-28 15:22:07 +05:30
Shilpa Singh 5b791420ea Accessibility: Read pre-edit text.
Summary:
Edje_entry:  In order to read pre-edit characters as well,
send entry_change_info with preedit,changed
Elm_entry: In order to read pre-edit characters as well,
send text to screen reader on preedit,changed.

Test Plan:
1. Change keyboard language to korean/enable prediction
2. Check the reading, text should be read even before committing

Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>

Reviewers: thiepha, jihoon, cedric, raster

Reviewed By: raster

Subscribers: raster, kimcinoo, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4145
2016-07-11 10:36:39 +09:00
Hermet Park a099b6d2b3 Revert "elm_entry: remove unnecessary text clearing in text_set"
This reverts commit 38db4b4c03.

This changes entry behavior that introduce enventor break.
Can't accept it until that break is reasonable.
2016-07-07 11:15:12 +09:00
Jiwon Kim 38db4b4c03 elm_entry: remove unnecessary text clearing in text_set
Summary:
When text_set is called for entry, it sets to empty text
before calling _entry_text_append().
but, _entry_text_append() has 'set' parameter.
Therefore text is set in that function, and clearing is not needed.

It can fix "changed" smart callback is invoked multipe times
when a short text is set to entry.

In addition, if text length is larger than ELM_ENTRY_CHUNK_SIZE,
set text directly as amount of chunk size and idler will append
about remain text.

@fix

Test Plan:
1. elementary_test -to "entry5"
2. click "set 10000" button
2-1. changed message should be printed 1 time
3. click "set 10001" button
3-1. changed message should be printed 2 times

Reviewers: tasn, Hermet, id213sin, cedric

Reviewed By: cedric

Subscribers: woohyun, cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-07-06 12:48:59 -07:00
Jinyong Park 3271ec8d18 theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum

* related history : 4ca3ef4514
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.

@fix

Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4073
2016-07-01 15:09:43 +09:00
Daniel Hirt ee36fdc218 Revert "elm: Fix wrong use of char instead of string and void out parameter"
This reverts commit 61f52a26fb.

This fixes the reported break on T4000.
2016-06-30 11:32:02 +00:00
Jee-Yong Um 8a988717e1 elementary/layout: attach edje object API with eo compositing
Test Plan: make check

Reviewers: Hermet, jpeg, cedric

Subscribers: slotus.lee

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-06-27 11:18:05 -07:00
Jiwon Kim 7a17f6fb47 elm_entry: restrict focus region to inside of entry object area
Summary:
Focus region must be located in entry object.
Therefore if it get out of entry,
 it just returns last cursor position that can be shown.

@fix

Test Plan:
1. elementary_test "Entry on Page Scroll"
2. click 2nd btn and close popup
3. page should not be scrolled

Reviewers: raster, herdsman, id213sin, woohyun, tasn, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4072
2016-06-27 15:45:10 +09:00
Hermet Park 61e5c9b8f0 Revert "elm_entry: fix duplicate text set"
This reverts commit 0959e87d99.

This broke the entry behavior that introduced enventor critical issue also.
It looks like a timing issue, but i didn't deep into further.

Please check a simple test case.
https://phab.enlightenment.org/F38614

Before/after applying your patch, the result is totally different.
2016-06-25 03:42:18 +09:00
WooHyun Jung 0959e87d99 elm_entry: fix duplicate text set
Summary:
When user set text to entry, "changed" smart callback is invoked 2 times.
Because entry set to ""(empty string) and append text internally.
But, in a recent, set flag is added for _entry_text_append().
So, empty string set is does not needed before appending.

@fix

Test Plan:
- elm_entry_entry_set(entry, "text") : 2 times invoked (bug)
- elm_object_part_text_set(entry, NULL, "text") : 2 times invoked (bug)
- elm_object_part_text_set(entry, "elm.text", "text") : 1 times invoked

Reviewers: herdsman, tasn, id213sin, woohyun

Reviewed By: woohyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4074
2016-06-23 10:07:33 +09:00