Commit Graph

321 Commits

Author SHA1 Message Date
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
Vitalii Vorobiov 2f6bdde1dd Edje_Edit: API to check if given name of "image set" is exist
edje_edit_image_set_exists
2016-04-28 16:22:25 +03:00
Vitalii Vorobiov ac9dc723c4 Edje_Edit: get "set's name" if it was set as image normal or tween
Sets and Images, they might have same id but different names
2016-04-28 16:22:25 +03:00
Mykyta Biliavskyi b1fce61caa Edje edit: improve state code generation.
Split function _edje_generate_source_of_state into
separated smallest functions, that represent generation
of source code for different blocks.
List of added internal functions:
  - _edje_generate_source_state_map
  - _edje_generate_source_state_box
  - _edje_generate_source_state_table
  - _edje_generate_source_state_image
  - _edje_generate_source_state_proxy
  - _edje_generate_source_state_relative

Add support collapse blocks, in cases when
block contain only one attribute.
For example:
next EDC code
  description { state: "default";
    {
      rel1 {
         relative: 0.5 0;
      }
    }

now will be replaced by:
  description { state: "default";
    {
       rel1.relative: 0.5 0;
    }
2016-04-26 18:12:07 +03:00
Andrii Kroitor 0e9cf93c30 edje_edit: fix mempools in group/alias add
Summary: moved mempools adding to separate method to avoid this problem in future

Reviewers: cedric, reutskiy.v.v

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-22 16:12:29 -07:00
Mykyta Biliavskyi b63b00c1b8 Edje edit: fix aspect_preference value into generate code function.
Add value "SOURCE" as one of possible values for aspect_preference
attributes.
@fix
2016-04-21 11:47:38 +03:00
Mykyta Biliavskyi 2006c01c06 Edje edit: add new program actions into code generate function.
Generate edc source code for next action types:
  - EDJE_ACTION_TYPE_FOCUS_SET
  - EDJE_ACTION_TYPE_FOCUS_OBJECT
  - EDJE_ACTION_TYPE_PARAM_COPY
  - EDJE_ACTION_TYPE_PARAM_SET
2016-04-21 11:47:30 +03:00
Mykyta Biliavskyi e634a7cc86 Edje edit: fix get list of program tagrets.
Correct support all types of program actions for constructing
list of targets.
There are 3 group of actions, that related to targets:
 - Does not support targets at all.
 - Support only parts as targets.
 - ACTION_STOP, that supported parts and other programs as targtes.

@fix
2016-04-21 11:47:23 +03:00
Andrii Kroitor 29a9be35ee edje_edit: add missing mempools on group copy
Reviewers: reutskiy.v.v, cedric

Subscribers: cedric, FurryMyad, NikaWhite, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-04-18 16:32:36 -07:00
Tom Hacohen 4d0494574b Edje: Reparent when swallowing/unswallowing.
On swallow make the edje object the parent, on unswallow the canvas.
2016-04-18 10:10:23 +01:00
Vitalii Vorobiov e64c30caab edje_edit: program's source and signal CAN be NULL
Or else user can't remove them, only by writing source/signal like "" or some
gibberish which is still getting interprettered as source and signal
2016-03-18 14:00:51 +02:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00