Commit Graph

80 Commits

Author SHA1 Message Date
Daniel Kolesa 5ea0195661 eolian: remove @nullable keyword
This was an experiment that never properly took off and was never
used by any generator. Its use was highly variable, so it could
not be relied upon. We will still want to reverse the current
behavior eventually (no null by default), but that will be
done with eo file versioning in the future.

@feature
2019-05-21 16:04:35 +02:00
Xavi Artigas c90d8eb1a5 efl-mono: Add markup support to Efl.Ui.Text
Summary:
Markup support is added to Efl.Ui.Text through runtime composition, but the C#
bindings do not know about it unless Efl.Text_Markup appears in the hierarchy.

Test Plan: The Markup property is available now for Efl.Ui.Text, it can be used and renders the expected results.

Reviewers: lauromoura, bu5hm4n, zmike

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8758
2019-05-02 18:13:13 +02:00
Xavi Artigas bbd4b6e514 docs: Remove obsolete @since tags from EO files
Summary:
All legacy @since tags have already moved to the *.legacy.h files.
EO files are now devoid of @since tags (except some eldbus still
needed for legacy).
Upcoming patches will add @since 1.22 to those APIs which come out
of beta in this release.
APIs marked @beta do not need @since tags.

Test Plan: Everything builds, EO docs (like DocFX) have no Since tags.

Reviewers: zmike, bu5hm4n, lauromoura, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8430
2019-03-20 20:16:05 +01:00
Mike Blumenkrantz 3425171bfa elm: 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/D8211
2019-03-07 14:16:46 -08: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 335936e79d efl.ui.layout: split into abstract and real class
Summary:
most widgets inherit from layout to provide implementations for common
functionality such as content/text/theme get+set.

one of the things that layout also brings into its inheritance hierarchy
is efl.file and implementations for its methods. this becomes a problem
when the widget which inherits layout also wants to provide implementations
for efl.file methods (e.g., entry, which uses efl.file to load text files)
as it will result in calling all of the efl.file implementations up the
chain.

in the case of entry, this could result in the 'file' property eventually being
set to the current theme file in use by the entry's layout object, and then the
entry will attempt to autosave its content to the default theme file when it is
destroyed, corrupting the theme file and breaking everything

to solve this:

* efl.ui.layout remains an instantiable class which implements efl.file
* efl.ui.layout_base is the abstract class which provides all the methods of layout
  but should be inherited by all widgets which want to implement efl.file functionality

Depends on D8018

Reviewers: bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8032
2019-02-27 13:17:16 -05: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
Xavi Artigas 333330a6e5 Mark BETA classes individually
Summary:
Instead of surrounding all the #include "*.eo.h" lines in Efl.h
with #ifdef EFL_BETA_API_SUPPORT, include these files unconditionally, but mark
all classes as @beta in the eo files.
This will allow taking them out of beta one by one as we deem them stable enough.
Otherwise, the current procedure involves moving the #include line out of the
ifdef block, which is cumbersome and messes include order.

Depends on D7950
Fixes T7692

Test Plan: Nothing changes

Reviewers: zmike, bu5hm4n, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7692

Differential Revision: https://phab.enlightenment.org/D7951
2019-02-14 17:46:50 +01:00
Marcel Hollerbach 7c5c93eac0 elm: note down all composite sections for widgets
Summary:

A lot of new widgets are using the new Scrollmanager class, the instance of this class is then attached via composition to the widget. This is providing the implementation for Efl.Ui.Scrollbar & Efl.Ui.Scrollable_Interactive.

In the text widgets the same applies to the internal interactive text widgets.

The tags widget is using the text entry as composite, and thus provides efl.ui.text api.

The addition of those composite { } sections are removing the particular unimplemented APIs from the eolian errors.

ref T7652
Depends on D7737

Reviewers: zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7652

Differential Revision: https://phab.enlightenment.org/D7738
2019-01-23 14:55:44 -05:00
Marcel Hollerbach 34efdfb1b1 efl: convert all classes to the new eolian syntax
ref T7459

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7684
2019-01-18 16:31:26 +01:00
Cedric BAIL 327593e9b4 elementary: rename Efl.Selection -> Efl.Ui.Selection as it is only usable with User Interface related element.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7505
2019-01-02 11:03:49 -08:00
Daniel Hirt fed99f8d13 Ui text: implement efl_part and part_text API to text_set 2018-11-26 13:17:07 +02: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
Daniel Hirt 26c1f2477c Ui text: port widget to new interfaces
This is a big rewrite. In addition to implementing functionality with
the new Efl interfaces, a lot of legacy (Elm) code was removed.

A lot of work is squashed in this patch as the widget would've been
completely broken otherwise.

The major changes are:

Life-cycle:
  - Code was split to have 'finalize'
  - Item anchors (emoticons, images) were rewritten to have proper
  life-cycle

Scrolling logic:
  - Efl.Ui.Internal_Text_Scroller widget was added, and replaces the old
  Elm.Interface_Scrollable implementation. Singe-line and multi-line
  modes were fixed as well as sizing calculations. The object is now
  swallowed inside the Ui.Text widget.

Copy and paste:
  - Code was converted to Efl.Selection logic.

Modified tests:
    elementary_test -to "efl.ui.text"
    elementary_test -to "efl.ui.text label"

Added tests:
    elementary_test -to "efl.ui.text inputfield"

Removed test:
    elementary_test -to "efl.ui.text.async"
2018-11-05 18:17:42 +02:00
Xavi Artigas e31b3213ec efl: rename Efl.Ui.Text.Change_Info -> Efl.Ui.Text_Change_Info 2018-05-23 17:33:47 +02:00
Xavi Artigas 0e848ccf2d efl: rename Efl.Selection.* -> Efl.Selection_* 2018-05-23 17:33:47 +02:00
Xavi Artigas 35bbedc96f efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).

In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).

Test Plan: make with c# bindings works, make check and make examples work too.

Reviewers: cedric, q66, lauromoura

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6169
2018-05-19 01:42:26 +02:00
Xavi Artigas 6a98b84cd7 Efl.Ui.Layout.Object (from Efl.Ui.Layout)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:54 -07:00
Xavi Artigas 6b5ac687c1 Efl.Text_* (from Efl.Text.*)
Including:
Efl.Text.Cursor_* (from Efl.Text.Cursor.Cursor_*)
Efl.Text.Font_* (from Efl.Text.Font.*)
Efl.Text.Format_* (from Efl.Text.Format.*)
Efl.Text.Style_* (from Efl.Text.Style.*)
Efl.Ui.Text_* (from Efl.Ui.Text.*)

Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:49 -07:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Xavi Artigas a26fbbbc66 Efl.Canvas.Text_* (from Efl.Canvas.Text.*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:29 -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
Mike Blumenkrantz d17b8a23d9 Efl.Access.Text: resolve more name conflicts
text -> access_text
attributes -> text_attributes
selection -> access_selection
2018-02-15 13:28:49 -05:00
Mike Blumenkrantz b493f15069 Efl.Access.Editable.Text: content -> text_content 2018-02-15 13:28:48 -05:00
Mike Blumenkrantz 26ea82f975 Efl.Ui.Text: password -> password_mode 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 8b7bbb2398 efl.access: name -> i18n_name 2018-02-15 13:11:00 -05:00
Jean-Philippe Andre 27c0d53f9b efl_ui: Disable includes that don't compile
Efl.Ui.Text:
The EO file contains a lot of references to legacy Elm types, which are
defined in elm_general. They should be checked and moved over to
efl_ui.eot if necessary.

Efl.Ui.Multibuttonentry:
This class was originally supposed to be based on a Model Item but as of
now the API is still uncertain, so MBE itself hasn't been worked on
more. Disable this from EO-only apps until its API is fixed.

Ref T6666
2018-02-06 21:27:37 +09:00
Sungtaek Hong 549c781310 eolian_gen: remove reference to elm_entry because it is not installed
Summary:
elm_entry.eo is not installed to system directory like
         "/usr/local/share/eolian/include/elementary-1", and
         eolian_gen tries to refer elm_entry.eo which results in failure.

Test Plan:
Create any eo class file which inherits Efl.Ui.Layout.
           eolian_gen eo_file.eo
           observe eolian_gen finishes

Reviewers: jpeg, herdsman, woohyun, Jaehyun_Cho, cedric

Subscribers: conr2d, id213sin, JongminLee

Differential Revision: https://phab.enlightenment.org/D5760
2018-01-24 18:51:26 +09:00
Jean-Philippe Andre 20570f74d3 widget: Move on_focus_update to Focus.Object
Following @taxi2se's recommendation. This is indeed a focus method, and
Widget already inherits from Focus.Object.

Ping @bu5hm4n who probably wants to adapt this further.

Ref T5363
2018-01-19 17:30:04 +09:00
Daniel Hirt 4a905a22a4 Canvas image: add Efl.Canvas.Text.Factory + use in Ui.Text
This interface has a simple 'create' method to create Efl.Canvas.Object
given a key.
This is used higher-up in Ui.Text in the next commit.

Ui text: add ability to set item factories

Added API to set an item factory object.
This is similar to the previous item providers (that worked with
callbacks).

You instantiate a factory object and set it on the Ui.Text object.
Each factory implements the "create" method from
Efl.Canvas.Text.Item_Factory.

This also includes 3 public factories (Image, Emoticon and Fallback):
  - Image factory: creates images from added entries (key strings)
  - Emoticon factory: creates emoticons by querying the theme
  - Fallback: creates image, then falls back to emoticon

If no factory is set, then the fallback (internal) factory is used.

See the added "Ui.text Item Factory" test in elementary_test for an
example of usage.

@feature
2018-01-18 10:20:28 -08:00
Jean-Philippe Andre 15d32fd4cc ui.text: Use proper EO type for cnp mode
It's not working. Just "fixing" the API for consistency.
Also, we're lacking a proper hint for "markup without images".

So I think EFL_SELECTION_FORMAT_MARKUP should be without images, while
EFL_SELECTION_FORMAT_MARKUP | EFL_SELECTION_FORMAT_IMAGE would allow
markup with images.

Ping @thiep.ha

Ref T5329
2018-01-18 16:27:57 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Andy Williams 345c59ad3b docs: Update elementary eo files for grammar and readability
Author: Nate Drake
2018-01-04 12:29:11 +00:00
Jean-Philippe Andre 315c4f761e text: Merge changed,user events
Efl.Ui.Text and Efl.Ui.Text.Interactive were both defining it.
2017-12-13 15:36:10 +09:00
Youngbok Shin 300ded6c30 efl_ui_text: apply new theme logic and use constructor/destructor
Summary:
It removes legacy aliases from efl_ui_text's theme.
And it also move all code from group add/del overriding functions to
constructor/destructor.
@fix

Test Plan: N/A

Reviewers: jpeg, taxi2se

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5601
2017-12-08 16:02:24 +09:00
Amitesh Singh 7b3fde4d4b edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal 2017-12-05 16:18:32 +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
Jean-Philippe Andre 72f1fbf4f1 widget: Rename focus_region (EO)
This region has little to do with focus, as it's more of a region of
interest within the widget, and not directly related to the highlight
geometry, for instance. It's related to focus in the sense that only
widgets with focus would really care about this region.

I decided to change this name after talking with @bu5hm4n.
Note that gengrid uses this but is also completely broken (the focus
highlight floats around and you don't even see the focused item).

Note: This is very close to show_region but I'm not sure those can be
merged safely (since the default "focus_region" is NULL while the
default "show_region" is the widget's geometry).

Ref T5363
2017-10-12 19:33:04 +09:00
Marcel Hollerbach 6bc769b317 efl_ui_text: remove old api! 2017-10-10 19:28:46 +02:00
Lukasz Stanislawski b3ffd78237 elm: rename Elm.Interface.Atspi.Text => Efl.Access.Text
Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5167
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre 1e0b005829 text: Remove unused EO structs
Bad copy & paste?
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre c0d7ea4af0 widget: Rename on_focus to on_focus_update (EO)
on_focus seems to imply that focus was just given to the widget, but
that function is called on any focus change (in and out).

Ref T5363
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre d928ba989a widget: Merge on_focus_region and focus_region_get
This simplifies code and API.

Ref T5363
2017-08-29 14:30:35 +09:00
Jean-Philippe Andre 0e98f57d6d widget: Rename hook "activate" (EO)
This is for accessibility only. Protected function.

Also marked as beta as elm_access isn't going to be stable in EO (yet).

Ref T5363
2017-08-29 10:40:53 +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 3f9c239b27 widget: Make sub_object add/del protected (EO)
Also prefix with widget.

I want to rename this as child rather than sub. It's inconsistent with
the other parent/child hierarchies. Anyway the various hierarchies are
confusing, so let's keep this name :)

Ref T5363
2017-08-23 20:56:37 +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 3e5cfb83c0 elm: Remove custom layout signal APIs
This merges them with the now standard interface:
  Efl.Canvas.Layout_Signal

Some wrapping work was required for legacy API which
takes no user_data in del() but instead returns it. The
new EO function, while harder to use, is more correct
(you can't delete the invalid callback by accident, and
this follows EO events design).

Another crazy wrapping was done in entry/text in order
to add the callbacks to 2 objects instead of just one,
and still return the user data.

As for Naviframe and Popup, those two widgets override
signal_emit to forward the call to another object than
the resize object, but not callback_add/del. So they
are definitely broken.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre a4940ae6c9 layout: Remove method theme_enable
This was an internal thing, ugly, replaced by another ugly
solution, but maybe less ugly.

Ref T5315
2017-08-04 11:52:16 +09:00