Commit Graph

126 Commits

Author SHA1 Message Date
Daniel Hirt 380b3eb09a Edje: move IMF-related part_text API to legacy 2017-09-20 09:19:33 +03:00
Jean-Philippe Andre f53fe993a6 edje: Merge calc_size_min_restricted & calc_size_min
calc_size_min was just a helper passing 0,0 to the restricted form.
Let's not duplicate APIs in EO and use an optional argument instead.
Bindings should be nicer and C could use a macro if it's too cumbersome
to pass in 0,0.
2017-09-18 17:37:23 +09:00
Daniel Kolesa 9622511df0 efl interfaces: convert to new ownership 2017-09-15 16:57:44 +02:00
Jean-Philippe Andre 8572cd5def evas/edje/elm: Remove all uses of clipped groups
This removes the uses of the *EO* class, obviously not the use of the
clipped smart objects.
2017-09-13 09:57:05 +09:00
Amitesh Singh 0e7a316a7a edje: implement edje.player interface functions
fixes T5560
2017-08-04 16:22:59 +09:00
Jean-Philippe Andre 240cc9e501 edje: Move size_min/max and data to an interface
The new interface is:
  Efl.Canvas.Layout_Group

I'm not fan of the name.

Ref T5315
2017-08-04 11:52:17 +09:00
Jean-Philippe Andre efac7d523a edje: Move signal APIs to an interface
This interface will be used by elm_layout as well.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre 6df17b2ed0 edje: Split off calc APIs to an interface (EO)
Those APIs can then be used by Elm.Layout, hopefully
simplifying the API.

I wonder if the APIs should be prefixed "calc_" (as is)
or "layout_calc_". The extra "layout_" prefix would make
it common with other layout APIs (eg. signals, data,
size min/max, ...).

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre 999dbd9764 eo debug name: Use strbuf instead of slstr
This should be a little bit more efficient, even if more "risky"
in terms of leaks. The final API still looks exactly the same.
2017-08-04 10:24:03 +09:00
Jean-Philippe Andre 569ad0bac4 evas/edje/elm: Override debug_name in core classes
This is really only a demonstration of what kind of information
we can print with efl_debug_name_get(). Hopefully this can help
debugging with printf/ERR logs and even help with live debugging
inside gdb.

This shouldn't be used for other purposes than debugging, as the
exact string format is not defined.

@feature
2017-08-04 10:24:03 +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 07a25fc88c edje: Move base_scale to Efl.Ui.Base
This API is used by elementary widgets like:
  edje_object_base_scale_get(elm_layout_edje_get(ly));

This means elm_layout in fact should also expose it directly.

Ref T5315
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
Daniel Hirt 6e1b5fdd10 Canvas layout: port part_text to efl_part
You now use the following:

  efl_text_set(efl_part(edje_obj, "part"), "text");
  const char *text = efl_text_get(efl_part(edje_obj, "part"));

The former method of edje_object_part_text_set/get is now legacy.

Also, adjusted 'tests/emotion/emotion_test_main-eo.c' with
this change.
2017-06-12 00:10:04 +03:00
Jean-Philippe Andre 602039cf83 edje: Move some functions to Efl.Ui.Base (EO)
This introduces the new interface Efl.Ui.Base, intended to
share some APIs between Edje and Elm:
 - mirrored (rtl)
 - language
 - scale

base_scale remains in Edje.Object for now. I don't think it
applies to generic widgets.

The new interface uses eo prefix "efl_ui". It could be renamed
as Efl.Ui (no Base), or anything else. As always, I'm open to
propositions!

Ref T5315
2017-05-31 18:42:32 +09:00
Jean-Philippe Andre ce0d15ecb3 edje: Reshuffle a bit edje_object.eo
This changes a few method names:
 - freeze -> calc_freeze
 - thaw -> calc_thaw
 - update_hints -> calc_update_hints

Otherwise this is mostly about reshuffling the EO file itself
and changing documentation.

Ref T5315
2017-05-31 18:42:28 +09:00
Jean-Philippe Andre aa5ac8eed7 edje: Rename "data" to "group_data" for EO
Still not happy with the name. I'm trying to avoid a name
clash between other "data" elements in the object. This is
the EDC group "data item".

Ref T5315
2017-05-31 18:42:24 +09:00
Jean-Philippe Andre f767e8bea4 edje: Move part drag APIs to efl_part
This moves all part_drag APIs to legacy and implements them for
EO using efl_part(). All parts now support these APIs, even if
they are not draggable. Making this more fine grained would
probably be much extra work for little gain.

This creates a new interface Efl.Ui.Drag.
2017-05-31 15:41:20 +09:00
Jean-Philippe Andre 2949329d4b edje: Improve reference doc for part drag APIs 2017-05-31 15:41:20 +09:00
Jean-Philippe Andre 9575bc8f8b edje: Remove external_object_get from EO
This will be replaced by a trick: composition on the part
object itself!
2017-05-30 13:54:34 +09:00
Jean-Philippe Andre 7ce7d4cc27 edje: Remove part_external_content_get from EO
I couldn't find a use of this API. This looks like it returns
an object inside a part inside an external (so, inside an edje).

Kept as legacy only.
2017-05-30 13:54:34 +09:00
Jean-Philippe Andre 554dd9facf edje: Move external_param_set to a efl_part API
This adds a new class: Efl.Canvas.Layout.External.
I hate this long name...

This class represents an external part, and for now only
supports param_set/get as well as param_type_get. For now
param_type_get() still returns an Edje_External_Param_Type and
not another more generic type.

TODO: enumerate choices, return object, return content
2017-05-30 13:54:34 +09:00
Jean-Philippe Andre f9a95528b6 edje: Enhance documentation for play vs animation
I had to test in order to get an idea of what those two similar
properties meant. Hopefully this is clear and not wrong.

See example: edje-animations
2017-05-30 13:54:34 +09:00
Jean-Philippe Andre e9c7159210 edje: Add recursive flag for message_signal_process
Original patch by Jinwoo Shin:

If edje has multiple levels of child group,
edje_object_message_signal_process cannot process message on
child group. To cover that, it needs to add new API which
traverses its hierarchy and process messages.

@feature

Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>

Differential Revision: https://phab.enlightenment.org/D4914
2017-05-29 15:45:31 +09:00
Jean-Philippe Andre 11d4daf90a edje: Move part_state_get to efl_part 2017-05-29 10:49:17 +09:00
Jean-Philippe Andre da2a7e6587 edje: Implement part_geometry_get with Efl.Part
This refactors even more the edje part eo internals. But now
common part APIs can easily be implemented in edje_part.c

The API now looks like:
  efl_gfx_geometry_get(efl_part(edje, "part"), &x, &y, &w, &h)
2017-05-29 10:49:17 +09:00
Jean-Philippe Andre 7c3e732f8c edje: Remove part_object_get from EO
Ooooh. This one might be controversial, as some apps definitely
use the function. But it is so easily abused. For our EO API
we are trying to not expose any internal object, as this prevents
us from making changes to the internal behaviour and structure.
All the features that this API provided should be limited to
read-only access to the internal object. In order to replace
this, we will have to return an Efl.Part object that implements
all those APIs: geometry_get, visibility_get, etc...
2017-05-29 10:49:17 +09:00
Jean-Philippe Andre 76ef772d0a edje: Unify load error types for image and edje (EO)
Most of the values were the same, with edje having just a couple
more error codes.

Not entirely sure the prefix Efl.Image is correct for this type.
Maybe just Efl.Load.Error?
2017-05-29 10:49:17 +09:00
Jean-Philippe Andre 9d48350ae4 edje: Implement EO API for message_send
Since this uses generic_value (aka Eina_Value), there is an
implicit type detection and conversion. I did not attempt to
cover all types (namely string+int and string+float and even
less sets of those) as I believe they aren't really used. Or
they most likely could be replaced by multiple messages rather
than a single message.

Note: should we pass ptr(generic_value) instead of generic_value?
The API looks a little odd in C when passing by value.

@feature
2017-05-24 13:02:20 +09:00
Jean-Philippe Andre df4e8653c7 edje: Remove message_handler_set from EO
It is used to receive messages with a payload from embryo to C.
This API has a function pointer, which means it would have to be
manually bound, or transformed (eg. eo event).

Also, prepare the change for message_send to use Eina_Value and
no explicit type.

This feature seems rarely used.

But note that handler_set is in fact used in terminology, rage and
luncher. So, if the need arises, it will have to be transformed in
a proper EO way.
2017-05-24 11:04:58 +09: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
Jean-Philippe Andre af3cb10185 evas: Remove Evas.Coord from EO
This may be a bit more controversial...
But Evas_Coord really is just an int and all the internals
of EFL assume that the base coordinate type is a 32-bit int.
So this type is a bit redondant and can't easily be changed
to, say, a float or int64.

Ref T5312
2017-05-15 17:26:42 +09:00
Jean-Philippe Andre 3df12eb690 evas: Remove Evas_Font_Size from EO
Ref T5312
2017-05-15 10:29:23 +09:00
Jean-Philippe Andre 6cd8811fe9 container: Remove method part_name_get
Remove this for now, as it may not apply to all contents.
Note that this was a new API in EO.
2017-05-11 17:53:50 +09:00
Daniel Kolesa 3fb4bc336e eo: hide dbg_info from eo files
Continues b780cf2af2.
2017-04-21 17:59:32 +02:00
Myoungwoon Roy, Kim 62455a8d41 docs: Fix typos and some wrong expressions in Ecore and Edje API reference doxygen.
Summary: I had fixed some typos and wrong expressions, euch as capital letters, singular Etc. in Ecore and Edje API reference doxygen.

Test Plan: Doxygen Revision

Reviewers: stefan, cedric, raster, Jaehyun_Cho, jpeg

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4677
2017-02-27 19:48:38 +09:00
Daniel Kolesa 192ea2c9ad eio, edje: use new property impl syntax 2016-12-27 17:47:00 +01:00
Daniel Kolesa 620a3a06ae edje object: fix doc refs for part_external_param_type 2016-12-21 15:07:46 +01:00
Daniel Kolesa b74dd5b7f4 edje object: return EDJE_EXTERNAL_PARAM_TYPE_MAX properly
The getter of part_external_type should return this enum value
on error. Thanks Artem Popov for original fix, which however
involved using an integer value directly instead of the less
error-prone enum (see D4502).
2016-12-21 14:41:05 +01:00
Bruno Dilly bb3fd015de edje: add names for seats following an incremental pattern
This way it'll be possible to write EDC with seat names that
will work no matter how seats are named by each ecore_evas
backend or users.
2016-12-19 14:58:35 -02:00
Stefan Schmidt 6e86415b13 docs: edje: fill last gaps in edje eo file documentation 2016-11-23 14:16:24 +01:00
Stefan Schmidt e056e0b1d1 docs: edje: finish up eo file docs for edje 2016-11-11 10:25:33 +01:00
Daniel Kolesa 0ad751cd83 edje eo: remove pointers 2016-11-04 17:19:53 +01:00
Jee-Yong Um 0fd1445508 edje.object: implement Efl.Observer interface
Summary:
To remove duplicated lines to handle edje class (color, text, size),
observer interface is implemented to Edje.Object.

Reviewers: jpeg, cedric

Reviewed By: cedric

Subscribers: bu5hm4n, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-01 11:48:44 -07:00
Stefan Schmidt e81acf70e6 docs: edje: consistent use of $true and $false keywords 2016-10-24 17:15:31 +02: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
Jean-Philippe Andre 9b8da4eb02 group: Replace group_no_render by object no_render
Most of the smart functions "Efl.Canvas.Group.group_xxx" should
not exist and be overrides of the base object function instead.
Cleaning this up is necessary if we want an EO API for custom
smart objects. This patch is the first attempt at removing a
method (the simplest one).

As for no_render, I wonder if propagating to the children
really is necessary. evas_render should skip them already.
2016-10-12 11:25:55 +09:00
Jee-Yong Um 14ff664b76 edje: clean up APIs
- convert methods to property setter/getter
- remove "values" block when getter returns read_only value
- fit the type of params of eo funcs to those of legacy APIs
2016-08-16 15:38:42 +09:00