Commit Graph

82 Commits

Author SHA1 Message Date
Marcel Hollerbach 3614c4190d efl_fileselector_entry: do not crash on a invalid model
something is happening during shutdown, when a fileselector was created
before. This is ending up in a strcmp to a NULL ptr, which crashes, with
the now, we ensure that we are not crashing anymore, when that is
happning.

TO solve this properly we should really fix the cause of a invalid model
beeing returned, however, i do not feel compftable doing that so short
before a release.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11762
2020-04-28 11:46:44 +02:00
Carsten Haitzler 444f7eed01 elm - fix filesel deferred unref to not crash
@fix
2020-01-18 00:14:58 +00: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
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
Marcel Hollerbach b3d7e9128b elc_fileselector: make a few events again legacy
Summary:
the events changed here should not be used. They should use legacy
events.

Depends on D8816

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8819
2019-05-13 15:14:20 -04:00
Cedric BAIL c9e62e957b elementary: fix another instances of no parent for Efl.Io.Model.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8539
2019-04-21 11:36:51 +02:00
Cedric BAIL b2db95947a elementary: fix elm_fileselector_entry model_get to be properly build with a parent and synchronously.
This fix the following warning:
ERR<12924>:eo ../src/lib/eo/eo.c:880 _efl_add_internal_start() Creation of 'Efl.Io.Model' object at line 443 in '../src/lib/elementary/elc_fileselector_entry.c' is done without parent. This should use efl_add_ref.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8536
2019-04-21 11:36:50 +02:00
Cedric BAIL 44fb906c4f elementary: enforce Efl.IoModel as a base type for fileselector.
On the long run, we might just want to have an Efl.Model dedicated to
be used by fileselector and inherit Efl.IoModel from it. At the moment,
we don't, but I think it is still best to rely on this assumption to
make the fileselector code simpler.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8654
2019-04-21 11:36:47 +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
Cedric BAIL 791ca77a68 elementary: split the smart callback event name from the Eo name when needed.
This fix the borkage of the "selected" smart event not being triggered.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8332
2019-03-27 15:03:10 -07: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
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 a156cc2289 elm_fileselector*: 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/D8167
2019-03-07 14:15:14 -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 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
Marcel Hollerbach 98b4a7bfa7 elementary: remove unnecessessary disabled setter
summary_:
those objects are disabled anyways, because disabled is applied to the
objects in a tree. Which means, subobjects of a widget are disabled
whenever the widget is disabled anyways.

Depends on D8015

Reviewers: cedric, zmike, segfaultxavi, stefan_schmidt

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8016
2019-02-27 20:19:22 +01:00
Xavi Artigas 6b7346b7b2 Remove individual class BETA guards
Summary:
Eolian adds a per-class BETA guard (like EFL_UI_WIN_BETA) to any method tagged
as @beta. This means that any app (and the EFL code) wanting to use BETA features
has to enable them class by class, which is cumbersome.
This commit replaces the individual guards with the global EFL_BETA_API_SUPPORT
guard, so apps only need to define one symbol to access BETA features.

Any usage of the per-class guards has been removed from the EFL code and examples.
When building EFL the global guard is defined by configure, so all EFL methods
already have access to BETA API.
Efl_Core.h and Efl_Ui.h no longer define EFL_BETA_API_SUPPORT. Apps wanting to
use BETA API have to define this symbol before including any EFL header
(It has been added to the examples requiring it).

Test Plan:
make && make check && make examples still work, but there's a lot less #defines
in the code

Reviewers: zmike, bu5hm4n, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T6788

Differential Revision: https://phab.enlightenment.org/D7924
2019-02-13 18:09:17 +01:00
SangHyeon Jade Lee 053146598c efl_ui : rename model connect and factory connect to bind property and factory.
As we discussed in T7469 with V40,

efl_ui_model_connect
efl_ui_factory_model_connect

need to be renamed to

efl_ui_bind_property
efl_ui_bind_factory

for this work,
Efl.Ui.Model.Connect interface is changed as Efl.Ui.Bind,
and bind_property and bind_factory both method is supported by this interface.

bind_factory need Efl.Ui.Factory,
and Efl.Ui.Factory inheritted Efl.Ui.Bind,
so I little bit concerned about circular referencing, but so far, it works well.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7529
2019-02-11 11:06:13 -08:00
Marcel Hollerbach c440ee442d elm_fileselector_entry: resolve missing interface api by composition
this patch will redirect every elm_interface_fileselector call to the
added fileselector button. This resolves the missing fileselector API on
the fileselector entry.

ref T5719

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7754
2019-01-26 11:42:03 +01: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
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
Cedric BAIL 8a513a522e efl: major rewrite of efl_part.
The interface efl_part_get should not be directly called from C, but the efl_part
wrapper should. It rely on efl_noref to properly destroy the object. Binding can
control the lifecycle of the reference the way they want by either calling the
wrapper or efl_part_get directly. It also means that the ugly ___efl_auto_unref_set
doesn't need to be exposed outside of EFL anymore.

Differential Revision: https://phab.enlightenment.org/D6098
2018-05-24 16:02:18 -07:00
YeongJong Lee 495edbd995 elm: fix backward compatibility for "default" name part
Summary:
If you use legacy content/text set/get/unset with "default" part name,
_elm_layout_part_aliasing_eval change the part name to "elm.swallow.content".
Because internal _content_set/get/unset checked only "default" string,
legacy content/test set/get/unset with "default" part name was not working.
This patch fixes that bug.

Test Plan: elm_object_part_content/text_set(obj, "default", content)

Reviewers: Jaehyun_Cho, woohyun

Reviewed By: Jaehyun_Cho

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6185
2018-05-23 19:35:18 +09:00
Cedric BAIL 8093eca7f3 elementary: migrate filesector to use the new Efl.Model API. 2018-05-01 10:39:01 -07:00
Xavi Artigas 9dcc31ed4a Efl.Access.Object (from Efl.Access)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:24 -07:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Mike Blumenkrantz 57c07757c7 fileselector: remove 'model' property
this is already extant in Efl.Ui.View
2018-02-15 13:11:01 -05:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Jaehyun Cho 4b18e754de elm_part_helper: Change macro name for default content part 2017-11-29 13:43:21 +09:00
Marcel Hollerbach 1ef8092ad0 elm_fileselector: forward focus changed from entry to fileselector
the old event is then emitted from elm_widget.c
2017-11-21 20:37:20 +01:00
Jean-Philippe Andre d39bbc1491 elm: Create legacy widgets with elm_legacy_add
This will be used to solve issues around style_set:
if the widget is legacy or pure eo we may need to select a different
style. So in the constructor we need to know whether we are legacy or
eo. Note that calling style_set in finalize only is too late as we would
lose information such as efl_text_set() called inside efl_add().
2017-11-07 14:50:31 +09:00
Jean-Philippe Andre 824792f09d elm: Major cleanup of EO files
This prevents legacy EO classes from being exposed through .eo.h headers
or .eo in share/eolian/includes. Also removes a slew of useless xxx_eo.h
intermediate headers.

Notes:
 - elm_systray has no proper API: it's not clear if the EO API should be
   released (in which case it needs to be renamed to efl_something) and
   there is no legacy API to create a systray object.
 - Some files have been placed in a "FIXME" section, as I believe they
   are necessary within EO land, but at the same time still don't
   conform to the interfaces (eg. name starts with elm_).
 - elm_interface_scrollable is required by photocam. This means photocam
   needs to be adapted to fit the EO scroller API (still to be
   completed, I believe).

Bugs:
 - This breaks most C++ examples. I KNOW. And I'm working on it.

Ref T5301
2017-11-01 21:23:31 +09:00
Jean-Philippe Andre 1b481f0ae8 widget: Rename events to EFL_UI_WIDGET_EVENT_XXX
This only affects the events (and the data type has an alias).

Ref T5363
2017-10-24 14:37:45 +09:00
Jean-Philippe Andre 2f465e1fbb widget: Rename EO APIs to efl_ui_widget_xxx
This only changes the eo_prefix for APIs.

Ref T5363
2017-10-24 14:30:21 +09:00
Lukasz Stanislawski 57aefc53c1 elm: rename Elm_Interface_Atspi_Accessible interface
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5341
2017-10-19 10:13:54 +09:00
Marcel Hollerbach 9d3559cd6b elm_fileselector_entry: remove old api! 2017-10-10 19:28:46 +02:00
Jean-Philippe Andre 0339ad7740 elm: Move base implementation for efl_part in widget
This means that ALL part handles inherit from the base part class
Efl.Ui.Widget.Part. Layout is the only exception where Efl.Part is
specially overridden.

This is a first step towards generic part APIs, including background in
all widgets.
2017-09-21 12:27:33 +09:00
Jean-Philippe Andre d5a31f3f30 edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.

As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.

Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.

Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.

This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)

Ref T5315
Ref T5306
2017-09-13 13:53:49 +09:00
Jean-Philippe Andre b6bab481aa widget: Mark old focus API as beta.
It's not beta. It's about to die.
Also, move #define ELM_WIDGET_BETA to the common header file, as it is
consequently required by ALL widgets. :(

Ping @bu5hm4n :)

Ref T5363
2017-08-31 11:22:04 +09:00
Jean-Philippe Andre 6aa309ffb8 widget: Rename hook "disable" (EO)
Renamed to on_disabled_update.
Also passed in the new state of disabled. It's more convenient this way,
than having the subclasses call disabled_get.

Also simplify some code...

Ref T5363
2017-08-29 10:40:53 +09:00
Jean-Philippe Andre dee61f4097 elm: Cleanup theme and style set functions
This makes efl_ui_layout_theme_set() return a Theme_Apply error
code. The type is now public as Efl.Ui.Theme.Apply.

Ref T5329
Ref T5363
2017-08-09 17:08:24 +09:00
Jean-Philippe Andre 9a2d4928f0 elm: Rename elm_layout to Efl.Ui.Layout
Some names have not been changed, hopefully making a distinction
between legacy APIs and internal code (elm_layout_blah) and valid EO
usages.

This means many internal functions are still elm_layout_ as their
sole purpose is to support the legacy API.

Ref T5315
2017-08-08 13:25:58 +09:00
Jean-Philippe Andre 6864495c99 elm: Move elm_layout_sizing_eval to legacy
elm_layout_sizing_eval() marks an object as requiring recalc.

Unfortunately, it's been massively abused by various widgets into
actually doing the calc, or the min calc. So we end up with one API
that has 3 different definitions depending on the widget type:
1. Mark as requiring recalc (correct, respects doc, elm_layout)
2. Calculate min size and other size hints
3. Actually do some geometry modification

I believe we need to clarify these 3 requirements into 3 very clear
and specific APIs in elementary. Right now we have similar functions
in evas for 1 (evas_object_smart_changed) and 3 (smart_calculate).
But their exact definition also isn't necessarily what we want for
elementary.

Another clear problem is that layout_eval does not do any calculation
(in theory), so the "eval" word is a bit of a stretch here.

Once we're sure about the exact API we want, we can add this back to
EO and make it work across our EO widgets. For now let's just keep
the legacy API, and its EO overrides, as is.

Ref T5315
2017-08-08 11:10:56 +09: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
Jean-Philippe Andre 6bfbeff47e widget: Move mirrored_automatic to Efl.Ui.Base
This is, unlike what some of the documentation says, a public
API on elm_object. Let's place it along mirrored for consistency,
even if edje object will not implement it.

Ref T5363
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