Commit Graph

334 Commits

Author SHA1 Message Date
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
Mykyta Biliavskyi 303fea96ca Edje_edit: generate state code with inheritance map block.
Add ability to generate inherited code for map block.
2016-05-16 15:53:26 +03:00
Mykyta Biliavskyi bbeae532ac Edje_edit: generate state code with inheritance rel block.
Add ability to generate inherited code for relative block.
2016-05-16 15:53:20 +03:00
Mykyta Biliavskyi 2d63b59221 Edje_edit: generate state code with inheritance general attributes.
Support inheritance for part states on the edc code generate time.
Only for general attributes are supported, except relative and
map blocks.
Added functions for calculation coefficient of similarity
between two different states of the same part.
2016-05-16 15:53:16 +03:00
Mykyta Biliavskyi f4379eaa4c Edje_edit: move text state edc code generate to standalone func.
Created internal function _edje_generate_source_state_text.
This is needed for implementation generate inheritance
states in edc code.
2016-05-16 15:53:09 +03:00
Vitalii Vorobiov e80d8d9a71 Edje_Edit: more API for proxy fields like source_clip and source_visible
Setters and getters like
edje_edit_state_proxy_source_clip_set
edje_edit_state_proxy_source_clip_get
edje_edit_state_proxy_source_visible_set
edje_edit_state_proxy_source_visible_get
2016-05-12 19:31:49 +03:00
Andrii Kroitor 0413c26f82 edje_edit: fix edje_edit_group_copy
Summary:
Writing copy directly to file.
Old way (adding directly to collection cache) leads to possible segfaults
on edje_collection_cache_flush.

Reviewers: reutskiy.v.v, cedric

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-05-10 16:36:22 -07:00
Carsten Haitzler 90e8ad8d7d edje - file set - use vpath for edje files now too like evas images 2016-05-09 19:37:48 +09:00
Cedric BAIL 10c9ef771f edje: do not check against eet if strings where never allocated. 2016-05-06 16:47:56 -07:00
Mykyta Biliavskyi e8138ee7b5 Edje edit: remove color generate from SPACER source.
It is possible situation when SPACER structure has colors values.
For example:
group { name: "abc";
  parts {
    part { name: "rect"; type: RECT;
      description { "default" 0.0;
        color: 7 7 7 255;
      }
    }
  }
}
group { name:"abc_2";
  inherit: "abc";
  parts {
    part { name: "rect"; type: SPACER;
    }
  }
}
To avoid failing compilation of generated source code, need avoid
generate color source code for a SPACER part.
2016-04-29 11:26:58 +03:00
Jean-Philippe Andre 566a156eda Edje Edit: Fix compilation warning 2016-04-29 13:33:13 +09:00
Vitalii Vorobiov e6d4c34449 Edje_Edit: update function that return image usage to include sets
Image can be also used not only inside of any image parts, but also
inside of any sets (and plenty of times)
2016-04-28 16:22:26 +03:00
Vitalii Vorobiov 9ec49c3f4f Edje_Edit: API to delete set of images
Allow to delete set if it is not used by any part
Function to check if set is used by any part is:
edje_edit_set_usage_list_get

Since it uses same struct as image_used_list_get function, it
can be freed by edje_edit_image_usage_list_free.
2016-04-28 16:22:26 +03:00
Vitalii Vorobiov a8afffe105 Edje_Edit: setter and getter for set image's scale_by
edje_edit_image_set_image_border_scale_set
edje_edit_image_set_image_border_scale_get
2016-04-28 16:22:26 +03:00
Vitalii Vorobiov 0d0e9e13bd Edje_Edit: functions to set and get set's images border
edje_edit_image_set_image_border_set
edje_edit_image_set_image_border_get
2016-04-28 16:22:26 +03:00
Vitalii Vorobiov 4589816309 Edje_Edit: setters and getters for set's image size (min and max)
Functions are:
edje_edit_image_set_image_min_get
edje_edit_image_set_image_min_set
edje_edit_image_set_image_max_get
edje_edit_image_set_image_max_set
2016-04-28 16:22:26 +03:00
Vitalii Vorobiov 49f6baa7aa Edje_Edit: some API to manipulate set's images
get list of images of set (edje_edit_image_set_images_list_get)
add image to set (edje_edit_image_set_image_add)
delete image from set by it's place (edje_edit_image_set_image_del)
2016-04-28 16:22:26 +03:00
Vitalii Vorobiov a9240d86a4 Edje_Edit: image set API
list of sets (edje_edit_image_set_list_get)
renaming set (edje_edit_image_set_rename)
add new set (edje_edit_image_set_add)
set's id (edje_edit_image_set_id_get)
2016-04-28 16:22:26 +03:00