Commit Graph

351 Commits

Author SHA1 Message Date
Vyacheslav Reutskiy 7cce17fd46 edje_edit: generate to source code base_scale if it different from 1.0
Fixes T4767
2016-10-31 13:17:45 +02:00
Vitalii Vorobiov 4655f90aaf Edje_Edit: save files name instead of full path on sound add
Since file will be inside of edj file, there is no need in having full path to
the place from where it was imported

@fix
2016-10-28 15:57:23 +03:00
Vitalii Vorobiov aa423e7669 Edje_Edit: use correct description array accessing
its a loop with j, but not with i
kinda a little typo

@fix
2016-10-25 18:25:05 +03:00
Vyacheslav Reutskiy 2922b68fdf edje_edit: avoid generate '(null)' value for image.normal 2016-10-18 08:49:07 +03:00
Vyacheslav Reutskiy 7d3200c782 edje_edit: add correct tweens generation for inherit state 2016-10-18 08:24:39 +03:00
Andrii Kroitor 6711a414dc edje_edit: refactor eet file usage
Summary:
Move opening for read/write/read-write and error message to internal method
Reuse eet file from Edje instead of opening it again in read-only mode
Add wrapper for eet_close to skip closing if internal file was used

Reviewers: NikaWhite

Subscribers: cedric, jpeg, #eflete

Differential Revision: https://phab.enlightenment.org/D4353
2016-10-17 18:51:59 +03:00
Vyacheslav Reutskiy e6fa6ba945 edje_edit: new API for generate source code for color classes
Extend edje edit deberate source API. Add two new API.
 - edje_edit_object_color_class_list_get return a list of used color classes for
   given object
 - edje_edit_color_classes_source_generate is generate code for given
   color classes list
2016-10-12 15:03:20 +03:00
Vyacheslav Reutskiy 8d7ec4181e edje_edit: add API for get source code of global block data
This API is annex for edje_edit_object_source_generate. Together this
API's provide a mechanism for generate source for custom groups from
a edj file or more.
2016-10-12 15:03:20 +03:00
Vyacheslav Reutskiy 49689708a6 edje_edit: add API for generate group source code without 'collection' 2016-10-12 15:03:20 +03:00
Jean-Philippe Andre 9bf0df8f32 evas: Mark group_add/del as internal
Lacking a proper internal tag, I'm using both protected (it is
in fact a protected access function) and beta (to mark as unstable,
not real API).

New smart objects based on EO only should rely on constructor,
finalize and destructor exclusively. In theory, this should be fine.

Unfortunately it may be impossible to inherit from the Efl.Ui.Win
class as it uses a really bad hack and calls super.constructor
inside the finalize method.
2016-10-12 11:47:50 +09:00
Vitalii Vorobiov 9450c1ec7b edje_edit: proper work with part id's on part restack and del for map fields
@fix
2016-10-11 15:15:19 +03:00
junsu choi bed6c84afb edje_edit : add null check and close eet
Signed-off-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
2016-09-21 09:42:46 +09:00
Jaehwan Kim 3efdd5df54 edje_edit: add null checking 2016-09-20 13:46:29 +09:00
Vitalii Vorobiov b324b754f3 edje_edit: make tweens able to work with image sets
it's important because some tweens of loaded edje group might use image sets
instead of images, so now making edje_edit API to work with them correctly

@fix
2016-09-19 18:15:18 +03:00
Mykyta Biliavskyi a098ea0f3d Edje_Edit: check returned value edje_edit_edje_file_save function.
In edje_edit_group_copy() for case when save routine is failed
still returned EINA_TRUE. Now will be returned result of save routine.

@fix
CID: 1362727
2016-09-12 14:31:08 +03:00
Mykyta Biliavskyi b6e2b8601d Edje edit: allocate memory for mempools.
Just added allocations that missed in "edje - reduce another 400k or so
of memory usage (esp hello world)" commit.
2016-08-30 16:57:53 +03:00
Carsten Haitzler 6139c7a3c6 edje - reduce anothr 400k or so of memory usage (esp hello world)
so edje was allocating 32 pointers per collection. this is per
collection inside an edje file even if we just use one collection from
that edje file. it consumes 32 pointers. on 64bit thats 256 bytes...
just for pointers to mempools so we can "optimize" freeing and
allocation of parts. this was simply rediculous. i moved it to a
sub-struct allocated on demand (so now only for collections we
actually use) and this nuked 400k of "base memory usage youcant get
rid of).

note that our current default theme has something like 1100 or so
images, 1500 or so collections in it. as theme gorws, memory footprint
goes up if we dont allocation only on demand (when needed/used) and we
aren't careful about the size of our data structs and their content.

@optimize
2016-08-21 11:14:28 +09:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Carsten Haitzler 0779adcf0b edje - remove unused fields from part desc and calc params
fill spread and angle have never been used - resevred intitially for
gradient objects, but never put into use, so remove to get rid of
junk/memory footprint etc.

@optimize
2016-08-14 13:51:52 +09:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Subhransu Mohanty d458101a41 edje: updated the start index of vector resource from 1 to 0
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-08-03 17:34:57 -07:00
Vitalii Vorobiov dde1299182 edje_edit: delete swallowed object before unswallowing (for part type GROUP)
unswallowing set swallowed_object to NULL inside of
_edje_real_part_swallow_clear
so it is impossible to delete object anymore.
And so, changing sources leaves fantoms and undeleted objects.

@fix
2016-08-02 17:01:33 +03:00
Vitalii Vorobiov b07a0c523c edje_edit: avoid such values like 2.77556e-17
using spinner to change double values means that sometimes
if set such weird values while should go to 0.0

@fix
2016-07-27 15:18:07 +03:00
Carsten Haitzler 116993504a edje edit - api was broken with incorrect l r t b ordering for border
this fixes ordering to match everywhere else ANd usage of the get
func. this was broken already where top/bottom border would swap -
plese see coverity scan CID 1355590 for an example of problems this
created.
2016-07-09 12:17:46 +09:00
Carsten Haitzler bfbb7b15f2 edje edit - fix leaks spotted by coverity
fixes CID 1356630
2016-07-08 16:00:29 +09:00
Vitalii Vorobiov 1017b0ceba edje_edit: on save_all firstly save all cached group, then all other
this will fix case when aliased group was changed and alias-group was loaded,
so then on saving alias-group WON'T rewrite all changed to aliased group

@fix
2016-07-07 20:31:01 +03:00
Mykyta Biliavskyi 3eb322518f Edje_Edit: allow set NULL as a style name for textblock part.
NULL as 'style' value remove style name from textblock part state.
2016-07-05 20:24:07 +03:00
Carsten Haitzler e2d7c11665 edje - reduce memory footprint by rearranging structs and types
this should cut some memory used by edje by using smaller types like
shorts instead of ints where we just dont need a full int range and
short will do, and re-ordering in memory data soit packs better when
accoutning for alignment
2016-07-04 15:01:52 +09:00
Vitalii Vorobiov 9a2ad54681 edje_edit: remove useless pointer grab as it conflicts with elementary combobox
Summary:
So currently having an issue related to clip_to function from
EdjeEdit API. I am not sure about how and why combobox use pointer grabbing
(just started to use it) but when setting NULL into clip_to of edje edit it
suddenly block entire screen away from mouse. Only when point is moved out of
window and back, only then it will be able to access widgets again.

Take a look at video and maybe try example to reproduce problem

I am not sure if deleting those functions from edje_edit is actually right
decision. But it will fix the problem of course.

Test Plan: See attached video and examples in attached files

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

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4081
2016-06-30 12:08:46 +03:00
Jean-Philippe Andre 269fc4f7a6 evas: Remove common interface and use provider_find
Evas.Common_Interface not only had a bad name, it also
wasn't in line with how we can get a loop object, for
instance.

Use eo_provider_find in each implementing class.
2016-06-21 16:13:04 +09:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 42b63f5507 Evas: Add smart_ prefix to all smart functions (eo)
This is a first step at separating legacy smart
object features away from standard efl interfaces.
2016-06-17 19:25:48 +09:00
Mykyta Biliavskyi 0b2602f86d Edje_edit: fix text_source_set and text_text_source_set.
Do not need to replace text value inside edje_edit_state_text_text_source_set,
because edje_text module will use text from source.
2016-06-16 14:34:29 +03:00
Vyacheslav Reutskiy 326d0246c8 edje_edit: return NULL if part has not style attribute 2016-06-16 10:57:33 +03:00
Vitalii Vorobiov c0a88e5e97 edje_edit: save referenced groups when image id's are changed
@fix
2016-06-15 13:35:04 +03:00
Subhransu Mohanty 62c0a4ef08 edje: add new svg part to edc
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, cedric, Hermet

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-08 11:35:33 -07:00
Vitalii Vorobiov 3563457307 edje_edit: add missed part and description initializations
@fix
2016-06-08 19:01:03 +03:00
Vitalii Vorobiov a0eb98db3b edje_edit: text style should be able to set into NULL
@fix
2016-06-07 17:59:15 +03:00
Vitalii Vorobiov 96f6ca336d edje_edit: fix copy&paste type for map functions which should return int
zplane and focal actually returns int, not Eina_Bool

@fix
2016-06-07 16:58:10 +03:00
Vitalii Vorobiov 8590abd562 edje_edit: fix map API (light, perspective, rotation)
it should be possible to set light or perspective to NULL
and return -1 when nothing is set
also ability to send NULL point to store rotation

@fix
2016-06-06 20:48:39 +03:00
Jean Guyomarc'h e33c5a85d4 edje: don't return a boolean when a pointer is expected
Fix a warning thrown by Apple-llvm.
2016-06-04 16:51:38 +02:00
Vyacheslav Reutskiy b612fe2485 edje_edit: add API for set/get part item 2016-06-03 12:27:30 +03:00
Vyacheslav Reutskiy 8f82e93368 edje_edit: add API for get part item attributes by item index
Cedric revert patch 6f7608befd same days
ago.

<quote Cedric>
Your patch 6f7608befd did break elemines
which does relly on the proper index to be given to it. I think
Edje_Edit should be fine and use the index if no name is provided (See
edje_load.c around L1180). In all case this was clearly an ABI break and
needed to be reverted.
</quote Cedric>

So now edje_cc not guarantee name for part items. This is bad, because
edje_edit use item name for access to item attributes. If item have not
name we cann't get it attributes, because edje_edit compare the given
name with part items name from edj-file, strcmp dislake NULL args.
For now I see one way mark all edje_edit_part_item* APIs as deprecated
and add new APIs for manage part items by index.

For clearly and history:
The eason for revert - https://phab.enlightenment.org/D3820
The proposed solution - https://phab.enlightenment.org/D3907
2016-06-03 08:35:13 +03:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Mykyta Biliavskyi 328607f3b9 Edje_edit: generate code of the image sets.
Added support generate the edc code of the image sets in the image top level block.
And correct support inside the image.normal attribute.
2016-05-17 12:01:11 +03:00
Mykyta Biliavskyi d027a2f65c Edje_edit: generate states of the box and table part edc code with inheritance.
Generate inheritance box and table attributes from similar state.
2016-05-16 15:53:48 +03:00
Mykyta Biliavskyi fa17ff96e1 Edje_edit: generate states of the proxy part edc code with inheritance.
Generate inheritance proxy attribute "source" from similar state.
2016-05-16 15:53:42 +03:00
Mykyta Biliavskyi 5b0b0da92b Edje_edit: generate states of the image part edc code with inheritance.
Generate inheritance image attributes from similar state.
2016-05-16 15:53:38 +03:00
Mykyta Biliavskyi 3c3a21d614 Edje_edit: generate states of the text part edc code with inheritance.
Generate inheritance text attributes from similar state.
2016-05-16 15:53:31 +03:00