Commit Graph

232 Commits

Author SHA1 Message Date
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Jean-Philippe Andre 001fa5af11 edje: add invalid part handler 2018-01-16 19:35:54 +09:00
Carsten Haitzler 9bedda14b3 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Amitesh Singh 54ae9cc18b edje: rename Edje.Object to Efl.Canvas.Layout 2017-12-06 13:12:29 +09:00
Amitesh Singh c7aa3b2f83 edje: rename intf Efl.Canvas.Layout_Calc to Efl.Layout.Calc 2017-12-05 16:18:32 +09:00
Jean-Philippe Andre 207a0cf3e3 eo: Move hacky API auto_unref to C only
This API is meant to be used by parts only, and by bindings dealing with
part objects. This patch fixes make check which got broken in the after
the previous one (cxx).
2017-12-05 15:06:34 +09:00
Jean-Philippe Andre dda18948ae efl: Split Efl.Container and Efl.Content
When I first implemented the Efl.Container interface I made a mistake of
mixing "single slot" content API's with "multiple children" content
API's.  This should fix that, by separating API's that are for a single
part and those that deal with a list of children.

  Efl.Content: Single slot. This will be used a lot by efl_part()
objects, and for the default content of widgets (eg. the window
content).

  Efl.Container: Multiple children. Used by lists, boxes, layouts
(edje/elm), etc...

I didn't see any class that implemented both interfaces (note: Layout
implements Container and Button implements Content, so technically
Button implements both through inheritance).

For now the eo_prefix is not changed in Efl.Container. I wonder if it
should be reset (to efl_container) or not. This would only affect the C
API.

Ref T5328
2017-11-20 19:02:09 +09:00
Cedric BAIL eddd52cba7 edje: cache last string search miss to reduce useless call to eina_str_split_full by 3. 2017-11-13 14:13:08 -08:00
Carsten Haitzler 75daddc839 Revert "Edje: use textblock by default"
This reverts commit ef3d2120bf.

This breaks E. pager ono my right screen looks like:

http://devs.enlightenment.org/~raster/shot-2017-11-11_12-13-14.png

on my left screen shellf keeps swapping between 2 dizes wobbling back
and forth every frame eating cpu and making it "blurry"...

note - theme is the flat one in devs/raster/theme/flat2 branch. so
this change certainly breaks something...
2017-11-11 12:10:32 +09:00
Daniel Hirt ef3d2120bf Edje: use textblock by default
As most of you know, TEXT part was, up to this point, an Evas.Text
object.

This patch merges TEXT and TEXTBLOCK both to use Efl.Canvas.Text.
Code is added to emulate what TEXT did that TEXTBLOCK did not.

I believe we can move forward with TEXT, and deperacate TEXTBLOCK from
the EDC. You can also set markup to TEXT parts.

Exactness seems to show some differences, but further examination shows
that it's due to difference in how width is calculated in
Efl.Canvas.Text. The results seem correct.

Be sure to report of any breakage via Phabricator or contact me
directly.
I am running E with this and did not stumble upon any crashes or visual
bugs.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-11-10 10:30:09 -08:00
Daniel Hirt c7b2372ffb Edje: move textblock handling to a separate source
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-11-10 10:30:04 -08:00
Jean-Philippe Andre cc1ed7183c edje: Hide edje_global from the rest of the world
Call provider_find on the loop (or basically any object) with the
color/text/size class interface instead, to find it. The main loop is
the main holder of those objects.

Note: This makes use of provider_find instead of direct access to the
variable, in order to self-test the code. In theory release builds will
not do this and user directly the variable.
2017-11-08 20:02:31 +09:00
Jee-Yong Um 2f838acd4e Efl: add class interfaces (color/text/size)
Summary: implement Efl.Gfx.Class interface

Reviewers: jpeg, cedric

Subscribers: taxi2se, herdsman

Differential Revision: https://phab.enlightenment.org/D4403
2017-11-08 19:17:59 +09:00
subhransu mohanty 4c47200c49 edje: cleanup old implementation of handling svg file. 2017-10-27 14:58:38 +09:00
Jean-Philippe Andre 79a1fd94ee edje: Use EO's beta auto_unref API for parts
This simplifies code and avoids unwanted leaks.
2017-10-18 11:02:16 +09:00
Jean-Philippe Andre 19dff85519 edje_object: Mark access_part_iterate as @beta
This may be internal... Not sure we need this exposed outside of the
ATSPI layer, really. Marking as beta for now.

Ref T5315
2017-10-12 16:02:04 +09:00
Cedric Bail ea4d27f1b2 edje: remove duplicated code and rely on Efl.File { set; get; } mixin. 2017-10-04 21:00:56 -07:00
Daniel Hirt 0061a4bb34 Canvas layout: improve legacy code paths for Efl.Text
Better handling of specific cases where you want to efl_text_set on
a TEXTBLOCK part.
Follow-up to af1595fd01.
2017-10-01 19:51:28 +03:00
Daniel Hirt 3642b3ae67 Canvas layout: support markup for efl_part
Users can now do either:
   efl_text_set(efl_part(obj, "part"), "text");
   efl_text_markup_set(efl_part(obj, "part"), "text");

Also have efl_text_get/markup_get.

Using markup_set will allow to choose whether to set a markup or a text
to the text part.
2017-09-28 19:32:02 +03:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Jean-Philippe Andre 942cbbed73 edje: Use Eina.Size2D for group min & max size 2017-09-18 17:26:53 +09:00
Jean-Philippe Andre 89733b22f6 efl_gfx_fill: Use Eina.Rectangle for fill (EO) 2017-09-13 18:09:19 +09:00
Jean-Philippe Andre 13da5e980e efl_gfx: Use Eina.Rectangle for geometry (EO)
This saves a few lines already (without even having the proper helpers
for stack rectangles).
2017-09-13 18:03:34 +09:00
Jean-Philippe Andre 46001cde38 edje: Remove use of smart clipped data
This removes dependency on a legacy structure.
Edje object does not change the smart data, unlike evas box and grid.
2017-09-13 09:57:05 +09:00
Stefan Schmidt 4d2117ef2a edje: make the generated default program name reproducible over builds
For programs without specific names edje_cc generated default names in
the form of program_$MEMORY_ADDRESS. That worked well enough for keeping
the names unique, but it causes problems if one wants to have these files
being binary reproducible due to different memory layouts, compilers,
etc. Simply using a counter as unique part should work well enough for
our use case and help people who want to verify builds.

Thanks a lot to Bernhard M. Wiedemann for review and testing.

Fixes T5113
Ref T5495
2017-08-07 14:35:32 +02:00
Carsten Haitzler 7b59a4851e edje crash with run program references - fix
i found a crash today where a heme could cause a crash if it just did
the right things. the run program was freed while still being
accessed. so add some ref counting to keep it alive until references
go to 0. and add soem refs while we store it in lists.

@fix
2017-08-05 13:10:33 +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
Daniel Hirt d5f781da2b Efl text: replace all usages of cursor handle to same type
Changes cursor handle name from 'Efl.Text.Cursor.Cursor_Data' to
'Efl.Text.Cursor.Cursor'.
Also, replace all usages of Efl_Canvas_Text_Cursor
with Efl_Text_Cursor_Cursor as the handle for the cursor.
2017-07-17 16:51:45 +03:00
Youngbok Shin 0735f6aa61 edje: support legacy Textblock calculation logic for 1.18 edje file
Summary:
From EFL 1.19, Edje Textblock calculation logic was fixed according to
Edje documents. But, it broke old edje files which ignored text.min
option for minimum width. Even if the old edje files were wrong,
we need to support them as discussed from T5548.

Also, this patch will change default efl_version to 1.18 from 1.19.
So, without efl_version property, edje file will run on the legacy logic.

Fixes T5548

Test Plan: Turn on/off presentation mode in Enlightenment.

Reviewers: herdsman, cedric, jpeg, zmike, raster

Subscribers: stefan_schmidt

Maniphest Tasks: T5548

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

Adjusted by @jpeg
2017-07-04 14:13:13 +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
Youngbok Shin 638ee888d9 edje: add efl_version property
Summary:
efl_version will be used to figure out which version of EFL lib
is used to develop a edje file.
If there is no property of efl_version, it will be 1.19 as default.
This feature is needed to fix T5548.

Example:
  efl_version: 1 20

@feature

Test Plan: N/A

Reviewers: cedric, jpeg, herdsman, zmike, raster

Reviewed By: cedric

Maniphest Tasks: T5548

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-14 14:24:08 -07: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
Mike Blumenkrantz 4c431c8b9c edje: add set_pointer_mode() to embryo functions
this should probably be a description-level property
2017-06-09 20:06:48 -04: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 63518c4c2c edje: Implement part proxy for all parts
This is required for part_state_get, which is now based
on the EO API internally. This fixes the test case introduced
in the following commmit.
2017-05-30 13:54:35 +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 11d4daf90a edje: Move part_state_get to efl_part 2017-05-29 10:49:17 +09:00
Jean-Philippe Andre e7abfba034 edje: Fix typos and overall strange function name
popornot was supposed to be propornot which stands for prop or not.
prop itself means propagate. Why choose a name so complicated? :)
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
Jeeyong Um e105646041 edje_cc: introduce "Anchors" - easy way to set parts relationship
Test Plan: compile src/examples/edc-anchors.c and run

Reviewers: zmike, raster, cedric, jpeg

Reviewed By: raster, jpeg

Subscribers: raster, barbieri, zmike, SanghyeonLee, taxi2se, Jaehyun_Cho

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-04-25 16:25:15 -07:00
Jean-Philippe Andre c0db1f4225 edje: Add workaround for misuses of clip_set
An unfortunately very common misuse of clip is as follows:

- Layout A is created (edje object / elm_layout)
- Object B is swallowed inside A
- Clipper C is set to clip B

This is a invalid usage, as layout A takes control over the clip
property of B (just like it does for geometry, visibility, color...).

Since 75ec3a7338 edje_recalc resets the clip at every calc
loop, as it can change between states.

In the past, edje_recalc did not reset the clip so anyone could
(wrongly) swallow an object and then change its clip from C to modify
its color, mask it, blend it, etc... Even though this was not proper
use of the API, this is not very clearly documented, and since it
worked, it has been (ab)used a lot already.

The result now is that a clipper set from C will become visible
as an opaque white rectangle covering the entire UI. Booh.

This patch is a workaround that should have no impact on well
written applications. As a bonus this avoids an extra call to
clip_set() from edje.

@fix
2017-04-10 16:14:45 +09:00
Jean-Philippe Andre 3103c551f5 edje: Move prev_description out of ephysics ifdef
prev_description was used when HAVE_EPHYSICS is set, which is the
default, but I also added a use in 7072fbc2bf where the map
was not properly reset.

This removes an ugly #ifdef and opens the door to other fixes
similar to that map one.
2017-03-14 14:15:09 +09:00
Jee-Yong Um 57c14f1c55 edje: fix cached edje modification issue
Summary:
_edje_part_***_set/get (for mouse_events, repeat_events, ignore_flags, mask_flags)
overwrite cached edje value. These behaviors affect all edje object added after
these changes, and result in not intended.

@fix

Reviewers: jpeg, cedric

Subscribers: akanad, woohyun

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 15:14:54 -08:00
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Bruno Dilly 9308410479 edje: support filtering allowed seats per part
collections.group.parts.part.allowed_seats keeps a list
of seat names to be used for events filter.

So when evas devices of seat type are added, filters
may be applied for each part.

If no seat is listed, every seat may interact with such
part.
2016-12-21 23:03:33 -02:00
Bruno Dilly 9bc9fde90e edje: add function on embryo to control focus
Add set_focus(part_id) and unset_focus().
Both functions accept an optional argument "seat_name".
If not provided default seat will be assumed.
2016-12-21 23:03:33 -02:00