Commit Graph

825 Commits

Author SHA1 Message Date
Amitesh Singh 59681c3311 edje: fix edje RTL description in case of custom state of a part
Summary:
In case of RTL, the "custom" state properties does not apply. It happened because we don't copy the latest src to
dst in set_state(PART:.., "custom", 0.0); in case of dst is already populated.
We should copy the updated src to dst whenever we set the new custom description.

@fix

Reviewers: cedric, raster, jpeg, zmike, jaehwan

Subscribers: kimcinoo, seoz, jpeg

Differential Revision: https://phab.enlightenment.org/D3394
2015-12-03 11:26:10 +05:30
Jee-Yong Um dc918064ce edje: add missing EAPI keyword for edje_color_class_del
Reviewers: jpeg

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-02 14:34:16 -08:00
perepelits.m a19786649f edje: Remove redondant array in Evas 3D edd (part2)
Summary: There are more redundant arrays to be deleted. In fact I don't think string name of descriptor shouldn't never change, I was testing some 2D examples and this is not true.

Reviewers: raster, jpeg, cedric

Subscribers: artem.popov, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-02 14:09:59 -08:00
Thiep Ha 7693925227 edje entry: return correct selection
Summary:
In entry, when selection_get function is called, selection is not
always returned the current selection.

Scenario:
- In select mode, entry has selection (e.g, by double click).
- When selection handler is moved, set the cursor the current coordinate
  with edje_object_part_text_cursor_pos_set() API.
- Edje emits "selection,changed" signal.
- Elementary gets current selection and stores it.
- Elementary does not get selection as visual selection (e.g, text is
   highlighted with "entry test", but the selection returned
   from edje is "entry").
- If we copy and then paste to the entry, the pasted text is not same as
   selected text.

Reason:
- In _edje_entry_cursor_coord_set function, if entry has selection, we only
  emit "selection,changed" signal without freeing en->selection.
- When _edje_entry_selection_get is called, we check the en->selection,
  since it is existed, we just return it which is not updated one.

This patch clears en->selection, so that it is updated at _selection_get,
and the updated selection is returned to caller.

@fix

Test Plan:
In mobile profile, open entry
- Right click, choose select, double click -> selection handlers are shown.
- Drag selection handlers to change selection.
- Right click, do copy.
- Right click, do paste.
- See the pasted text is not same as selection.

Reviewers: raster, tasn, herdsman

Subscribers: seoz, JackDanielZ, cedric

Differential Revision: https://phab.enlightenment.org/D2746
2015-11-26 10:11:54 +02:00
Jean-Philippe Andre 1ab1b24e4e Edje edit: Free textblock styles with the proper function 2015-11-23 19:41:30 +09:00
Yeshwanth Reddivari 1caea15703 Edje: Remove duplicate NULL reassignment
Summary:
Remove duplicate code of variable 's' assignment to NULL in edje_edit_style_del.

Signed-off-by: Yeshwanth Reddivari <r.yeshwanth@samsung.com>

Reviewers: Hermet, alok25, mvsovani, singh.amitesh, jpeg

Reviewed By: jpeg

Subscribers: sachin.dev, cedric

Differential Revision: https://phab.enlightenment.org/D3358
2015-11-23 19:41:30 +09:00
Youngbok Shin a9b4be11e1 Evas object: Add paragraph_direciton APIs
Summary:
It adds evas_object_paragraph_direction_set, get APIs.
The APIs set or get paragraph direction to/from the given object.
It changes BiDi calculations and affect the direction and aligning of text.
It doesn't have any effect to text without Fribidi library.

The default paragraph direction is EVAS_BIDI_DIRECTION_INHERIT.
If dir is EVAS_BIDI_DIRECTION_INHERIT, paragraph direction is changed
according to smart parent object. If there is no smart parent object,
paragraph direction works as EVAS_BIDI_DIRECTION_NEUTRAL.

@feature

Test Plan:
Test cases included to the following files.
- evas_test_textblock.c
- evas_test_text.c
- evas_test_object_smart.c

Run "make check".

Reviewers: woohyun, raster, herdsman, tasn

Subscribers: c, raster, cedric

Differential Revision: https://phab.enlightenment.org/D1690
2015-11-19 11:43:39 +00:00
Jean-Philippe Andre fb4f81b119 Edje data: Remove redondant array in Evas 3D edd
Since I just broke EDJ ABI, as well clean it up. The same array
was saved twice under two different names.
2015-11-18 12:08:08 +09:00
Jean-Philippe Andre fc3cbaca67 Edje: Fix Evas 3D eet data descriptors
Memleak found with valgrind points to this line, where clearly the
edd field name is incorrect. It looks like this feature has no example,
no test case either.

This breaks EDJ ABI!
I do this because I believe there are zero users of this API
at this point, as Evas 3D is still not ready yet.

See also https://phab.enlightenment.org/D2544

@fix
2015-11-18 12:08:03 +09:00
Carsten Haitzler 80ebf5b453 edje - signal match code - clean up function readablity and fix crash
this just clens up the _edje_signal_callback_push() to be simpler and
less wordy with the same actual logic, just pointless things like
return; at end of func removed, use tmp instead of gp->matches
everywhere and not just in one section etc.

also set hashed bool to eina true/false i as opposed to sometimes 0,
sometimes eina true/false and also track it religiously as well as
matches array when freed - hunting bug

for whatever reason after these cleanups i can't reproduce a signal
crash i had which seemed to find freed matches in the hash that should
not have been there. (a hash find walking a bucket found freed memory
for the match in the hash entry - should not have been though reading
the code).

@fix
2015-11-11 14:57:52 +09:00
Youngbok Shin 1ff131841b edje: initialize map.zoom values to fix old *.edj compatibility issues.
Summary:
The initial values for map.zoom.x(y) should be [1.0]: it means 100%.
The values from newly builded edj has been set properly.
But, if a part from old *.edj turns on map feature, map.zoom.x(y) will be set [0.0]: it means 0%.
So, the part will be invisible. We need to initialize these values.
@fix

Test Plan:
1. Build a *.edc file which has a part with [description.map.on: 1;] in EFL 1.13.
2. See it works well in EFL 1.13.
3. Install EFL 1.14 or laters.
4. See the part is disappear.

Reviewers: Hermet, jpeg, cedric

Reviewed By: cedric

Subscribers: jiin.moon

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 14:53:00 -08:00
Subodh Kumar 95d398b5c8 edje entry: remove unreachable dead code
Summary:
Remove dead code

If anchor sel is not there, code inside
while can not execute.

Test Plan: NA

Reviewers: tasn, herdsman, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:35 -08:00
Subodh Kumar 9cc8c470be edje entry: do not create object if theme source is not available.
Summary:
Object not created if theme source is not available.

In many case we dont need or define all the
theme sources for entry, even if the sources are
null, edje object is being created.

Test Plan: NA

Reviewers: tasn, herdsman, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:35 -08:00
Jaehwan Kim 21dc4443a5 Revert "edje: add edje signal emit about swallow, text"
This reverts commit b1fa1c5aad.
This feature will be commited to the next version.
2015-10-22 09:40:19 +09:00
Jaehwan Kim b1fa1c5aad edje: add edje signal emit about swallow, text
Add the edje signal "swallow", "unswallow", "text,set", "text,unset".
In edc file, the part name take a role of source.
If the layout should be changed when any object is swallowed or any
text is set, use this signal.

@feature
2015-10-21 21:57:04 +09:00
Carsten Haitzler b7d2f4f814 efl - edje - fix edje calc to avoid eo calls when object doesnt change
in many cases edje dumbly calls eo_do() or evas_object_xxxx on objects
to set up their porperties when the part never uses that thing at al -
eg filters. the obnject never had filters and will not have them n3ext
- why always set filter to null every time? skip when not needed for
speedups.

so this fixes over-zealous calling whihc adds overhead that is not
needed causing battery drain and cpu usage, heat creation etc. etc.

@fix
2015-10-21 20:16:06 +09:00
Carsten Haitzler e5e6c6b8eb edje - fix some horrible misleading indenting in edje calc.
just whitespace fixups
2015-10-20 18:07:21 +09:00
Shilpa Singh 924953591d edje: comparision with non-scaled min values issue fix.
Summary:
In a different scaling environment, wrong comparison of min values causes resize issue as original size is compared instead of scaled size.

Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
Signed-off-by: Subodh Kumar <s7158.kumar@samsung.com>

@fix

Test Plan:
Create a layout with some min size and swallow a resizable layout inside the layout.
the parent layout will not expand even when the height has crossed its min size.

Reviewers: cedric, tasn, raster

Subscribers: subodh6129

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 11:12:26 -07:00
Srivardhan Hebbar 0054ea9514 edje: fix memory leak on realloc.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 11:10:15 -07:00
Amitesh Singh 048b5f70e5 edje: load - use evas_object_clipees_has instead of evas_object_clipees_get
evas_object_clipees_has is far cheaper than evas_object_clipees_get in case of checking if
clipees exist or not. This should improve the performance in case of large set of clipees.

@fix
2015-10-15 15:04:23 +05:30
Chris Michael 897132245f edje_edit: Fix clang warning of unused variables
Summary: clang reports that these static variables are not being used
anywhere (and grep confirms this), so remove them.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-14 09:43:12 -04:00
Jean-Philippe Andre 4de199b7ac Edje: Fix big oopsie in previous commit 2015-10-01 20:27:36 +09:00
Jean-Philippe Andre a449bfc555 Edje: Turn SNAPSHOT objects into filled images for now
Without that, the image has no fill information. Fill properties
may need to be added to SNAPHOT parts but the default behaviour
should make sense. Before this patch you just get a black rectangle.

Considering how image filters currently work, marking snapshots
as filled by default is not the best solution (need padding_set(0)
to render nicely).
2015-10-01 20:13:00 +09:00
Jean-Philippe Andre 1bb294ba1c Edje: Fix invalid loading of snapshot parts 2015-10-01 20:10:54 +09:00
Jean-Philippe Andre 6ac4f7154b Edje: Add filter support to SNAPSHOT parts
This makes SNAPSHOT a part type on it own, combining the
common and filter subtypes.

This means it is now possible to set an evas filter on
a SNAPSHOT object, just like for TEXT, IMAGE and PROXY.

@feature
2015-10-01 20:10:54 +09:00
Jean-Philippe Andre a181c32cbe Edje: Fix IMAGE filters
Some invalid logic made filters work only in a rare situation.

@fix
2015-10-01 20:10:54 +09:00
Jean-Philippe Andre 31edfbb817 Edje: Add support for filters to PROXY parts
Same syntax as for IMAGE and TEXT: description.filter
2015-10-01 20:10:54 +09:00
Jean-Philippe Andre c0f887b429 Edje: Move internal struct filter around (refactor) 2015-10-01 20:10:54 +09:00
Cedric BAIL 8e034a8c44 edje: fix a memory leak while iterating used color class. 2015-09-30 15:12:48 -07:00
Amitesh Singh 27f313c2fe edje_edit: fix typo in error message 2015-09-28 15:45:44 +05:30
Amitesh Singh 139d452efe edje: fix typos in documentation 2015-09-28 15:42:51 +05:30
Subodh Kumar df190346a1 Edje entry: Make cursors to null after free
Summary:
Edje entry: Make cursors to null after free

To prevent any illegal access of cursors
can lead to crash

@fix

Test Plan: NA

Reviewers: tasn

Reviewed By: tasn

Subscribers: shilpasingh, cedric

Differential Revision: https://phab.enlightenment.org/D3093
2015-09-25 09:49:18 +01:00
Andrii Kroitor 7413d7ca98 edje_adit: fix typos in header
Summary: @fix

Reviewers: cedric, raster, Hermet, reutskiy.v.v, FurryMyad

Reviewed By: FurryMyad

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3108
2015-09-25 10:33:04 +03:00
Andrii Kroitor d595149178 edje: fix internal colorclass field
Summary:
Its value is never modified directly and should not be modifiled by mistake
in future.

@fix

Reviewers: Hermet, raster, reutskiy.v.v, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-23 12:34:22 -07:00
Jaehwan Kim 3e5fddd72b edje_edit: remove a redundant API declaration.
edje_edit_state_font_get has twice declaration in same header file.
2015-09-23 15:22:46 +09:00
Mike Blumenkrantz 57d6231b3a edje: return immediately when deleting a color class if no users exist 2015-09-22 13:20:40 -04:00
Mykyta Biliavskyi 278b20954a Edje_entry: emit "cursor,changed,manual" for Home/End/PgUp/PgDown.
Summary:
The keys Home/End/PgUp/PgDown are changes the entry cursor
position in the same way as arrow keys. For unified behavior
callback "cursor,changed,manual", added emitting signal for
those keys events.

Reviewers: tasn, cedric, herdsman, thiepha

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3055
2015-09-22 15:12:47 +01:00
Vyacheslav Reutskiy 27b81e44bc edje: edje_edit - add getters/setters for a container item spans
This functions designed that make the edje edit API's more
homogeneous. The all edje attribute setters and getters
treated only ony attribute, besides container API's
2015-09-22 09:23:46 +03:00
Vyacheslav Reutskiy eddcb69391 edje: edje_edit - add getters/setters for a container item position
This functions designed that make the edje edit API's more
homogeneous. The all edje attribute setters and getters
treated only ony attribute, besides container API's
2015-09-22 09:23:46 +03:00
Vyacheslav Reutskiy dbea1f9f3d edje: edje_edit - add getters/setters for container align
This functions designed that make the edje edit API's more
homogeneous. The all edje attribute setters and getters
treated only ony attribute, besides container API's.
2015-09-22 09:23:46 +03:00
Vyacheslav Reutskiy 2f87a20c3b edje: edje_edit - add getters/setters for container padding
This functions designed that make the edje edit API's more
homogeneous. The all edje attribute setters and getters
treated only ony attribute, besides container API's.
2015-09-22 09:23:46 +03:00
Vyacheslav Reutskiy f73174f980 edje: edje_edit - add getters/setters for min container size
This functions designed that make the edje edit API's more
homogeneous. The all edje attribute setters and getters
treated only ony attribute, besides container API's.

TODO:
 * separate edje_edit_state_container_padding_get/set
 * separate edje_edit_state_container_align_set/set
 * separate edje_edit_part_item_position_get/set
 * separate edje_edit_part_item_span_get/set
2015-09-22 09:23:46 +03:00
Andrii Kroitor 77541f7ba2 edje_edit: remove save from group_del and group_copy
Summary:
edje_edit_save_all includes source code generation that is way more expensive
than save itself. User should be able to save manually with or without sources

Reviewers: cedric, Hermet, seoz, reutskiy.v.v

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-21 23:46:36 +02:00
Cedric BAIL 07fbef6437 edje: remove unused variable and simplify function prototype. 2015-09-21 23:04:19 +02:00
WooHyun Jung e9e91e8a41 edje_cache: remove duplicated call of _edje_file_coll_open
Summary:
_edje_file_coll_open will be executed after _edje_file_open is finished.
This duplicatated call will increase the reference counter and give failure
of _edje_cache_coll_unref.

@fix

Reviewers: cedric, raster, Hermet

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-21 22:53:38 +02:00
Amitesh Singh 86993e172a fix typos in API doc 2015-09-19 09:24:58 +05:30
Vyacheslav Reutskiy 1943d32de6 edje_edit: delete gradient funcs prototope
This API was defined in the Edje_Edit.h but haven't implementation.
Given the fact that gradient is not supported and print 'SPANK'
error on load have sense to delete them.
2015-09-17 14:28:35 +03:00
Stefan Schmidt 855f7490a9 edje: remove un-used edje_container code
The code have been ifdef'ed out for a along time. I checked back until
the merge of our libs before the 1.8 release. Maybe even before that.

If you have a use case for this code fell free to revert but also enable
the code and make sure it works when doing so.
2015-08-31 09:25:30 +02:00
Youngbok Shin f210e42966 edje: Fix double free scenario caused by static pointer.
Summary:
The result of evas_object_textblock_cursor_content_get() API has to be cleaned
by outside.  _edje_entry_cursor_content_get() is calling free() inside of the
function for handle the result using static pointer. But, the caller of
_edje_entry_cursor_content_get() is already handling the result using free().
It can cause double free problem.

The bigger issue is in elementary. See elm_entry_cursor_content_get() API's
document. The document advice developers to free the result when it is done.

@fix

Test Plan: N/A

Reviewers: tasn, raster, woohyun

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2991
2015-08-27 11:06:23 +01:00
Mykyta Biliavskyi 41106fe20f Edje_Entry: check selection before the cursor position change.
Summary:
change position of the main textblock cursor
in depends of the selection is present. Change cursor position to
the start or end of selection only when selection is present.
@fix

Test Plan:
Press "Up" and "Down" arrow keys on selected and normal text.
For selected text: the entry cursor should be placed one line
   above or below selection block (in depends from pressed button).
For normal text: the entry cursor should be placed one line
   above or below of the current cursor position.

Reviewers: tasn, Hermet, herdsman

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2948
2015-08-20 11:31:27 +09:00