Commit Graph

984 Commits

Author SHA1 Message Date
Daniel Kolesa 7782c0bcb9 eolian: add event_prefix and have classes follow that or eo_prefix by default
Previously events used to use class name as a prefix and ignored eo_prefix
when specified. This is no longer the case. Events follow eo_prefix by default
now. In order to get around this for classes where this is undesirable, a new
field event_prefix was added which takes priority over eo_prefix. If neither
is specified, class name is used like previously.

@feature
2016-05-17 17:50:43 +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
perepelits.m d200d483ef edje: attaching viewport of camera to the image part
Summary:
According to D3710 new field "camera" in edc was added for IMAGE parts.
It is the name of the CAMERA part to set its viewport as a source of image if no image name is given.

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, artem.popov

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-05-17 05:21:45 -07: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
Tom Hacohen 6bdf4af016 Add legacy_prefix now that the default has changed to null. 2016-05-12 17:27:35 +01:00
Tom Hacohen 96c4c88070 Efl: Remove "legacy_prefix: null;" as it's now the default. 2016-05-12 17:27:35 +01:00
Tom Hacohen 278b16b058 Evas smart: Fix namespacing to use . and not _. 2016-05-12 11:33:59 +01:00
Tom Hacohen 56eee19102 Efl pack: Fix namespacing to use . and not _. 2016-05-12 11:14:03 +01:00
Tom Hacohen 0253d91ade Evas object smart: Fix namespace to use . and not _. 2016-05-12 11:12:15 +01:00
Ji-Youn Park 27495fe670 edje_callbacks: fix click signal emitting even though mouse event was cancelled
even though each part want to get the signal regardless of ON_HOLD,
click signal should not emmitted if event flag is set to ON_HOLD.
ON_HOLD means this event is useless, so up event with ON_HOLD flag cannot source of clicked signal.

@fix
2016-05-11 22:14:27 +08:30
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
Tom Hacohen 0ca59b0402 Efl gfx: Remove the no longer needed .Base hack. 2016-05-10 12:25:44 +01:00
Cedric BAIL 0c4880e99d efl: everyone should now rely on Eina MIN/MAX redefinition. 2016-05-09 16:58:53 -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
Cedric BAIL c9152d3816 edje: reduce memory usage by 57Kb.
If we do a copy of a string living in the object we are storing in the
same eina_hash, it is obviously better to use the direct pointer version.
2016-05-06 16:18:51 -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
Vyacheslav Reutskiy 3749fed463 edje_text: don't apply ellipsis if fit is setted
Test plan:

collections {
   group { name: "new";
      parts {
         part { name: "text";
            type: TEXT;
            description { state: "default" 0.0;
               text {
                  text: "Hello world";
                  size: 12;
                  fit: 1 0;
               }
            }
         }
      }
   }
}

Fixes T3519

@fix
2016-04-28 09:45:01 +03:00
Jihoon Kim fa344ea0be edje_entry: fix crash issue in case of no selection text
@fix
2016-04-27 21:30:42 +09: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
Jean-Philippe Andre ff8ee01432 Efl: Rename some packing functions and return bool
This renames some APIs from Efl.Pack in order to try and
make them more sensible. Feedback welcome.

Also, most APIs now return bool, where false is quite unlikely
to happen.
2016-04-26 16:48:55 +09:00
Jean-Philippe Andre 59ead67aa1 Edje: Fix crash in E clock: invalid source string
This fixes on top of 49a27688b1, which
assumed somehow that table items had names, although that
might not be the case. In my situation, name = NULL and there
was a crash everytime I clicked on the clock widget.
2016-04-26 14:09:36 +09:00
Jean-Philippe Andre 12146ddea6 Edje: Return text defined in EDC in part_text_get
This function was returning only the text defined by part_text_set.
This is a behaviour change, as part_text_get() no longer returns NULL
if there is a string defined in EDC. But this now means that the actual
value displayed on screen can be retrieved by a simple API call.

@feature
2016-04-26 11:36:23 +09:00
Jean-Philippe Andre 97422856ce Edje: Replace edje part_table with a fake eo proxy
This is similar to the previous patch for Box,
but for Table.

Those new EO API as well as the legacy ones still need to
be tested (no test case in make check...)

@feature
2016-04-26 11:36:23 +09:00
Jean-Philippe Andre e2176ed6a3 Edje: Replace edje_box_part with a fake eo proxy
This is basically an implementation of eo_part() but only
for Edje Box APIs. Legacy API is implemented on top of the
EO API.
2016-04-26 11:36:23 +09:00
Jean-Philippe Andre 27573e6e0b Edje: Convert access_part_list to an iterator 2016-04-26 11:36:23 +09:00
Jean-Philippe Andre 07a996e6cc Edje.Object: Add support for part_name_get 2016-04-26 11:36:23 +09:00
Jean-Philippe Andre e1092b84eb Edje: Adapt to Efl.Container
This basically renames swallow into content.
2016-04-26 11:36:23 +09:00
Vyacheslav Reutskiy 49a27688b1 edje: fix the source string for table item
If the table item has a name, posible case when item name length, with
index, will be 12. The 12 is predefined length for box index.

Quote Cedric
In a box, the index is one dimension, one int, thus the length
of it (from int to string) will always fit inside 12 bytes. That's
where this 12 comes from. That's also how the unique name of that item
is defined.

This commit separate the items name generation by part type, it will be
more correctly.

@fix
2016-04-25 07:41:54 +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
Jee-Yong Um 076037bd55 edje: add note to the reference of .part_object_get()
Summary:
For EDJE_RP_TYPE_SWALLOW objects (like GROUP, SWALLOW, EXTERNAL),
edje_object_part_object_get() will return NULL or transparent rectangle.
The note is added to have developers use edje_object_part_swallow_get()
in that case.

Reviewers: jpeg, Hermet, cedric

Reviewed By: cedric

Subscribers: Hermet

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-22 15:17:05 -07:00