summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-20 15:41:07 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-20 19:02:09 +0900
commitdda18948ae762d7a37c0035a44b69f44ec615214 (patch)
tree513ea65743b9e70ab7305431b0b7e9119704efc9 /src/lib/efl/interfaces
parent67188ba22b804cba20ed904df5026b45336e09fe (diff)
efl: Split Efl.Container and Efl.Content
When I first implemented the Efl.Container interface I made a mistake of mixing "single slot" content API's with "multiple children" content API's. This should fix that, by separating API's that are for a single part and those that deal with a list of children. Efl.Content: Single slot. This will be used a lot by efl_part() objects, and for the default content of widgets (eg. the window content). Efl.Container: Multiple children. Used by lists, boxes, layouts (edje/elm), etc... I didn't see any class that implemented both interfaces (note: Layout implements Container and Button implements Content, so technically Button implements both through inheritance). For now the eo_prefix is not changed in Efl.Container. I wonder if it should be reset (to efl_container) or not. This would only affect the C API. Ref T5328
Diffstat (limited to 'src/lib/efl/interfaces')
-rw-r--r--src/lib/efl/interfaces/efl_container.eo22
-rw-r--r--src/lib/efl/interfaces/efl_content.eo24
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c1
3 files changed, 31 insertions, 16 deletions
diff --git a/src/lib/efl/interfaces/efl_container.eo b/src/lib/efl/interfaces/efl_container.eo
index a673cceba3..1de3e864dd 100644
--- a/src/lib/efl/interfaces/efl_container.eo
+++ b/src/lib/efl/interfaces/efl_container.eo
@@ -1,23 +1,13 @@
1interface Efl.Container (Efl.Gfx) 1interface Efl.Container
2{ 2{
3 [[API common to all UI container objects.]] 3 [[Common interface for objects that have multiple contents (sub objects).
4
5 APIs in this interface deal with containers of multiple sub objects, not
6 with individual parts.
7 ]]
4 eo_prefix: efl_content; 8 eo_prefix: efl_content;
5 event_prefix: efl_container; 9 event_prefix: efl_container;
6 methods { 10 methods {
7 @property content {
8 [[Swallowed sub-object contained in this object.]]
9 set {
10 return: bool; [[$true on success, $false otherwise]]
11 }
12 get {}
13 values {
14 content: Efl.Gfx; [[The object to swallow.]]
15 }
16 }
17 content_unset {
18 [[Unswallow the object in the current container and return it.]]
19 return: Efl.Gfx; [[Unswallowed object]]
20 }
21 content_remove { 11 content_remove {
22 [[Unswallow an object from this container.]] 12 [[Unswallow an object from this container.]]
23 params { 13 params {
diff --git a/src/lib/efl/interfaces/efl_content.eo b/src/lib/efl/interfaces/efl_content.eo
new file mode 100644
index 0000000000..198b6c0482
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_content.eo
@@ -0,0 +1,24 @@
1interface Efl.Content
2{
3 [[Common interface for objects that have a (single) content.
4
5 This is used for the default content part of widgets, as well as for
6 individual parts through @Efl.Part.
7 ]]
8 methods {
9 @property content {
10 [[Swallowed sub-object contained in this object.]]
11 set {
12 return: bool; [[$true on success, $false otherwise]]
13 }
14 get {}
15 values {
16 content: Efl.Gfx; [[The object to swallow.]]
17 }
18 }
19 content_unset {
20 [[Unswallow the object in the current container and return it.]]
21 return: Efl.Gfx; [[Unswallowed object]]
22 }
23 }
24}
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index 30769e6433..5ebf0733f4 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -45,6 +45,7 @@
45 45
46/* Packing & containers */ 46/* Packing & containers */
47#include "interfaces/efl_container.eo.c" 47#include "interfaces/efl_container.eo.c"
48#include "interfaces/efl_content.eo.c"
48#include "interfaces/efl_pack.eo.c" 49#include "interfaces/efl_pack.eo.c"
49#include "interfaces/efl_pack_layout.eo.c" 50#include "interfaces/efl_pack_layout.eo.c"
50#include "interfaces/efl_pack_linear.eo.c" 51#include "interfaces/efl_pack_linear.eo.c"