Commit Graph

92 Commits

Author SHA1 Message Date
Vorobiov Vitalii 5e7a9b1225 edje: Edje_Edit - add edje_edit_part_access functions.
Summary:
Add two main functions
- edje_edit_part_access_get
- edje_edit_part_access_set
Also support access into part's source code generation.

@feature

Reviewers: seoz, Hermet, raster, cedric

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-04 20:08:32 +02:00
Vorobiov Vitalii 30885daafa edje: Edje_Edit - add edje_edit_part_precide_is_inside functions.
Summary:
Add two main functions
- edje_edit_part_precise_is_inside_get
- edje_edit_part_precise_is_inside_set
Also support precise_is_inside into part's source code generation.

@feature

Reviewers: cedric, seoz, Hermet, raster

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-04 20:02:56 +02:00
Andrii Kroitor 184720bf16 edje: Edje_Edit - add getters and setters for source2-source6 TEXTBLOCK properties
Reviewers: cedric, raster, seoz, Hermet

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-04 19:57:13 +02:00
Vorobiov Vitalii bebcc49bd0 edje: Edje_Edit - add edje_edit_part_pointer_mode functions.
Summary:
Add two main functions
- edje_edit_part_pointer_mode_get
- edje_edit_part_pointer_mode_set

Also support pointer mode into part's source code generation.
EVAS_OBJECT_POINTER_MODE_AUTOGRAB is default value,
so generation won't add "AUTOGRAB" into source code if this type of
pointer mode is set.

@feature

Reviewers: cedric, seoz, Hermet, raster

Reviewed By: cedric

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-04 19:45:34 +02:00
Vorobiov Vitalii f1000b5c36 edje: Edje_Edit - add edje_edit_part_copy function that copy parts within whole group.
Summary:
Add ability to copy whole part and create same part but with new name).
This feature also require to slightly remake function edje_edit_state_copy to make
it able to copy state from one part to different one (only for part_copy usage).

@feature

Reviewers: cedric, seoz, raster, Hermet

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-04 19:39:39 +02:00
Andrii Kroitor aec9cf0a3e edje: Edje_Edit - fix edje_edit_part_source_set
Summary:
Fixed edje_edit_part_source_set so that it does not destroy TEXTBLOCK.
Changed type check to switch-case to stress allowed types.

@fix

Reviewers: cedric, raster, seoz, Hermet

Reviewed By: cedric

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-04 19:15:27 +02:00
Igor Gala f0e4cba71c edje: Edje_Edit - add sounds list accessor.
Summary:
make "get" functions for block "sounds" which return
a sounds or tones list (Eina_List *) off the given edje object.
@feature

Reviewers: raster, cedric, seoz, Hermet

Reviewed By: cedric

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-04 00:51:56 +02:00
Maksym Volodin fb89f79b6a edje: Edje_Edit - add new feature edje_edit_image_compression_set.
Summary:
Set compression type for the given image. Has object being edited,
the name of the image and Edje_Edit_Image_Comp(EDJE_EDIT_IMAGE_COMP_RAW,
EDJE_EDIT_IMAGE_COMP_USER, EDJE_EDIT_IMAGE_COMP_COMP,
EDJE_EDIT_IMAGE_COMP_LOSSY[_ETC1]) as in parametrs.
Return EINA_TRUE if successful, EINA_FALSE - otherwise.

Reviewers: cedric, raster, seoz, Hermet

Reviewed By: cedric

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-04 00:51:56 +02:00
Tom Hacohen 0fc3279db9 Efl: Update code to use the new class names generated by eolian. 2014-06-03 11:28:01 +01:00
Vorobiov Vitalii cf0ff2ba91 edje: Edje_Edit - fix wrong behaviour on draggable.event processing while deleting parts.
Summary:
the draggable.event field (in edje) is pointing on the id of the part it is assigned to.
The main problem is about deleting parts.
After part being deleted, all other parts (that are below the deleted part) have their id shifted,
but event doesnt shift.

For example,
1) draggable.event at some part pointing at part with id=7,
2) some other part is being deleted
3) part with id=7 have new id now (id=6)
4) draggable.event DOESN'T change it's pointer and still points at part with id=7 (which is now has id=6)
5) if there is no parts with id=7 anymore, then it could give you SEGFAULT someday (or not, depending on luck).

This commit contains next changes:
1) after deleting part, draggable.event also shifts (if required)
2) after deleting part that is being pointed with event by someone, it will remove all event points at it
@fix

Reviewers: cedric, raster, seoz

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-21 06:14:23 +02:00
Vyacheslav Reutskiy e8c4e99a3c edje/Edje_Edit: _edje_edit_real_part_add init field of Edje_Real_part
Summary:
To correcly display the added pats using the edje edit api, update
init the filds of Edje_Real_Part. Initialize the next filds: type and
typedata. It filds initialized accordingly to Edje_Part_Type value.

@fix

Reviewers: raster, cedric, seoz, Hermet

CC: cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-14 11:11:47 +02:00
Mike Blumenkrantz 894c36ff11 de-elipsis edje
the word is "ellipsis". it's bad enough that we have released misspelled api, but we can at least spell things correctly internally.
2014-05-13 16:20:41 -04:00
Jérémy Zurcher f8c2c57406 do not use EINA_FALSE instead of NULL 2014-05-07 17:45:11 +02:00
se.osadchy 709c1d86c0 Edje/Edje_edit: corrected type of input parameter for offset value
Summary: Input type for offset value must be Integer in the "edje_edit_rel1(2)_offset_x(y)_set" functions

Reviewers: cedric, Hermet

CC: cedric, Hermet, raster

Differential Revision: https://phab.enlightenment.org/D562
2014-04-25 11:19:58 +09:00
Jean-Philippe Andre f6eae69eb2 Edje: Use LOSSY_ETC1 instead of LOSSY
Add a new flag in EDC files to specify ETC1 compression
should be enabled. It follows the same rules as the
current LOSSY flag for JPEG compression.

@feature
2014-04-18 16:50:01 +09:00
Andrii Kroitor c17d08d2ab edje_edit: image_del fixed
Summary: fixed segfault on broken refs in edje object

Reviewers: cedric, seoz, raster

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-04-17 19:40:36 +02:00
Tom Hacohen 35525a53e0 Adjust eo_do calls to work with the eo2 api. 2014-04-10 04:20:21 +01:00
Vorobiov Vitalii 9f5ea9cdae edje_edit: fix wrong generation of part's source code (effect field).
There is a static array that is used for parsing the current effect
(in Part's struction the effect type is represented by a number) from a number
to text. But there is one type of effects (SHADOW) that has a number combined from
two types. First four bits are always used for defining the effect's type,
but if it is a SHADOW effect, then there is four more bits. They are representing
the direction of the shadow in TEXT block.
This patch fixes code regeneration after saving edje_edit object, so now
it splits the number into two pieces, so we can fully regenerate type of effect.

So, in this path:
- added static array that represents shadow's direction.
- part's source code generaton has been modified.

Reviewers: seoz, raster, cedric

Reviewed By: cedric

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@free.fr>
2014-04-01 22:00:13 +09:00
Vorobiov Vitalii caad83c988 edje_edit: function that will return the source code of the loaded edje edit object.
Summary:
This function will return the source code of the edje edit object that is given to that function.
Also, that function will collect all resources required by this group.
That means all images, fonts, styles, data and color_classes that is mentioned
and set in descriptions of parts in this group (that is represented by given
Edje Edit object).
@feature

Added function for generating source code:
- edje_edit_source_generate(Evas_Object *obj);

Reviewers: cedric, seoz, raster

Reviewed By: raster

CC: reutskiy.v.v, cedric

Differential Revision: https://phab.enlightenment.org/D649
2014-03-24 16:05:53 +09:00
Yossi Kantor 2be615916a Eolian: Integration of Edje and Edje Edit 2014-03-24 08:14:30 +02:00
Cedric BAIL f26b370584 edje: let's be more careful with string.
Fix CID 1193213.
2014-03-20 16:51:48 +09:00
Cedric BAIL 48aca12d22 edje: external is already used directly before, so checking it is unnecessary.
CID 1191908.
2014-03-13 10:29:27 +09:00
perepelits.m a4d2e42042 edje_edit: adding of NULL-checks
Summary:
New NULL-checks have been added in:

edje_edit_state_color_class_set
edje_edit_state_external_param_get
edje_edit_state_external_param_int_get
edje_edit_state_external_param_bool_get
edje_edit_state_external_param_double_get
edje_edit_state_external_param_string_get
edje_edit_state_external_param_choice_get
edje_edit_state_external_param_set

Reviewers: cedric, seoz, raster

Reviewed By: cedric

CC: reutskiy.v.v, cedric

Differential Revision: https://phab.enlightenment.org/D629
2014-03-13 10:26:20 +09:00
Cedric BAIL 1b1e0450a2 edje: do not leak in case of error.
@fix CID 1191310 and CID 1191311
2014-03-07 15:01:36 +09:00
se.osadchy e60e56aada edje/edje_edit: Check for NULL
Summary: Add check for NULL to the edje_edit_state_external_param_set function

@fix

Reviewers: cedric, raster, seoz

Reviewed By: cedric

CC: cedric, reutskiy.v.v

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-03-06 18:27:27 +09:00
Vyacheslav Reutskiy b749565278 edje/edje_edit: fix part add bug
Summary:
Invert the check of the ed->file. If the ed->file is NULL then return
EINA_FALSE.

@fix

Reviewers: raster, cedric, seoz

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-03-06 18:27:27 +09:00
Cedric BAIL 4b2708a502 edje: Edje_Edit - make sure we don't use an not initialized value.
Should close CID 1181885 and CID 1181888.
2014-02-20 12:21:55 +09:00
perepelits.m f9fe869d23 Edje_Edit: Add NULL-check
Summary:
Add NULL-check in:
         edje_edit_state_add
         _edje_edit_real_part_add
         _edje_part_recalc (edje_calc.c)

Reviewers: cedric, seoz, raster

Reviewed By: raster

CC: reutskiy.v.v, cedric

Differential Revision: https://phab.enlightenment.org/D567
2014-02-19 12:18:42 +09:00
Carsten Haitzler e8c13118eb fix mingw build for setuid fix/checks 2014-01-08 22:06:41 +09:00
Carsten Haitzler b95ef3801f setuid safeness - ensure if an app that is setuid doesn't do bad things
this makes efl ignore certain env vars for thnigs and entirely removes
user modules (that no one ever used) etc. etc. to ensure that *IF* an
app is setuid, there isn't a priv escalation path that is easy.
2014-01-08 19:46:23 +09:00
Vyacheslav Reutskiy 641d823cbb edje: edje_calc - update _edje_part_description_find
Add to fuction prototype new param: Eina_Bool approximation.
If need exact matching state name and value set EINA_FALSE to
'approximate'. In other cases used EINA_TRUE.

Reviewers: cedric, raster, seoz

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-23 10:47:32 +09:00
Andrii Kroitor 7a3cd879d2 edje: edje_edit - fix .edc file generation
Reviewers: cedric, seoz

Reviewed By: cedric

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-23 09:49:53 +09:00
Vyacheslav Reutskiy e69929321f edje: edje_edit - adding getter and setter for smooth parameter
This commit will add API for working with smooth for image
and proxy part type.
There are two functions will be added:

1. edje_edit_state_fill_smooth_get
2. edje_edit_state_fill_smooth_set

Reviewers: cedric, raster, seoz

Reviewed By: cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-20 14:43:23 +09:00
Guillaume Friloux 86d2983bf3 Fix leak + possible segfault in edje_edit.
vaiable 'c' is allocated inside a loop, but only freed outside that loop...
2013-12-19 11:04:07 +01:00
Vyacheslav Reutskiy 8bff25fadc edje: edje_edit - adding API to move to the specified place in the parts stack
This commit will add some API to restack part above/below target part.
There are two functions will be added:

1. edje_edit_part_restack_part_below
2. edje_edit_part_restack_part_above

Reviewers: cedric, seoz, raster

Reviewed By: cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-19 15:53:48 +09:00
Andrii Kroitor 287d63c016 edje: edje_edit - image api modification
Changed edje_edit_image_del logic: image can't be deleted if it's in use,
after deletion last image in list is moved to freed position so there are no
"holes" in image list.

Following functions added to api:
   edje_edit_image_replace
   edje_edit_image_usage_list_get
   edje_edit_image_usage_list_free

Reviewers: cedric, seoz, raster

Reviewed By: cedric

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-19 15:53:38 +09:00
Vyacheslav Reutskiy bf3f0f2f4a edje: edje_edit - fix edje_edit_state_color_class_set to apply the colors to color_class.
edje_edit_state_color_class_set apply the colors from color_class to the given part.

Reviewers: cedric, seoz, raster

Reviewed By: cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-19 15:53:29 +09:00
Vyacheslav Reutskiy 811c97eabb edje: edje_edit - adding getter and setter for text source
This commit will add API for working with text source.
There are two functions will be added:

1. edje_edit_state_text_source_get
2. edje_edit_state_text_source_set

Reviewers: cedric, seoz, raster

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-19 15:53:27 +09:00
Vyacheslav Reutskiy 0ad1dfe4e5 edje: edje_edit - adding getter and setter for text style
This commit will add API for working with text style.
There are two functions will be added:

1. edje_edit_state_text_style_get
2. edje_edit_state_text_style_set

Reviewers: cedric, seoz, raster

Reviewed By: cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-19 15:53:24 +09:00
Vorobiov Vitalii 891c34f50f edje: edje_edit - _edje_generate_source supporting alias
Support generating alias source code in functions:
1) _edje_generate_source_of_group
2) _edje_generate_source

Reviewers: cedric, seoz, raster

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-19 15:53:15 +09:00
Vorobiov Vitalii 12c91a8852 edje: edje_edit - adding edje_edit_group_copy.
This new function will copy the whole group into same file but with another group name/id.

Copying whole group data field by field require some huge code.
Alternatively we found another solution for copying whole group as you can see it in this commit.
This function will copy group and all it's data (like scripts etc) and it will be totally independent.

Reviewers: cedric, seoz, raster

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-19 15:52:51 +09:00
Carsten Haitzler 7c38520f50 edje_edit - fix mem leak of src strbuf on print status
though utterly minor - it's still a leak. fix CID 1039263
2013-12-15 11:40:16 +09:00
Carsten Haitzler ee8bfeb458 edje - edje_edit - don't access collection after it is freed
should fix CID 1137855
2013-12-15 11:34:43 +09:00
Vorobiov Vitalii 0640b7f341 edje: adding Alias API into edje_edit module
Summary:
This commit will add some API for working with aliases.
There are four functions will be added:
1. edje_edit_group_aliases_get - this function will return the list of aliases of certain group.
2. edje_edit_group_is_alias - this function will check if the given group name is actually an alias.
3. edje_edit_group_aliased_get - return the main real group that is being aliased.
4. edje_edit_group_alias_add - add new alias name.

Also the function "edje_edit_group_del" was modified because of wrong behaviour.
Now if the given group is alias, it will successfully delete it,
but if the given group is main group, it will also delete all it's aliases.

This commit also modify EDJ file by adding new field for detecting if the group is alias or not.

Reviewers: cedric, seoz, raster

Reviewed By: raster

CC: reutskiy.v.v, cedric

Differential Revision: https://phab.enlightenment.org/D376
2013-12-14 18:40:26 +09:00
Vorobiov Vitalii ae2be0c2d3 edje: Fixing little misbehavior of edje_edit_state_rel_to_set
Summary:
After making part relative to the whole interface (by giving NULL parameter)
it was returning EINA_FALSE (not successfull).

Reviewers: seoz, cedric, raster

Reviewed By: raster

CC: reutskiy.v.v, cedric

Differential Revision: https://phab.enlightenment.org/D379
2013-12-14 18:26:30 +09:00
Vyacheslav Reutskiy 40d4acd77e edje_edit: Add getters and setters for fixed param
Reviewers: cedric, seoz, raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D339
2013-12-02 14:54:28 +09:00
Andrii Kroitor a4c16c221e edje_edit: fixed SEGFAULT in _edje_real_part_free
Reviewers: cedric, seoz, raster

Reviewed By: raster

CC: reutskiy.v.v, cedric

Differential Revision: https://phab.enlightenment.org/D336
2013-11-16 09:55:42 +09:00
Vorobiov Vitalii d2ff8d70a5 edje: fixing the check whether the part is swallow.
Summary:
Some functions doesn't checking the part right.
For example:
edje_edit_part_clip_to_set
edje_edit_part_restack_below
edje_edit_part_restack_above
edje_edit_part_source_set

Reviewers: cedric, seoz

Reviewed By: cedric

CC: reutskiy.v.v, cedric

Differential Revision: https://phab.enlightenment.org/D325
2013-11-12 11:18:22 +09:00
Vyacheslav Reutskiy 61965279d3 edje: fix error _edje_part_description_find_byname, use wrong object.
Reviewers: cedric, seoz

Reviewed By: cedric

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

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-11-04 15:47:52 +09:00
Vyacheslav Reutskiy c2c416fdf7 edje: edje_edit api - fixed seg fault in the edje_edit_part_del
Reviewers: cedric, seoz

Reviewed By: cedric

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

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-11-04 15:39:51 +09:00