summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_container.eo
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-04-20 14:55:26 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-04-26 11:36:23 +0900
commit902950018be3682c0549174fc0c6d1c04141cd39 (patch)
treee909eb2fdd7b12dfbba38d8a8c4f16d9340398e5 /src/lib/efl/interfaces/efl_container.eo
parent8c02bf5be65f6d8fa6c4659eb54746531fead1a4 (diff)
Efl: Introduce Efl.Container and unify APIs
This removes Efl.Pack_Named which had a terrible name, removes Elm.Container which should have been renamed Efl.Ui.Container anyway, and introduces an interface Efl.Container instead. The hierarchy tree is now changed as objects don't inherit from Efl.Container (it's an interface, not a regular class) but only implement it. Obviously it is very easy to reintroduce an Efl.Ui.Container parent class if we need it, but I guess it should have some actual logic. It's basically part of what Elm.Widget already does. Some function names have been modified to look better in C with the efl_content prefix. @feature
Diffstat (limited to 'src/lib/efl/interfaces/efl_container.eo')
-rw-r--r--src/lib/efl/interfaces/efl_container.eo50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/lib/efl/interfaces/efl_container.eo b/src/lib/efl/interfaces/efl_container.eo
new file mode 100644
index 0000000000..b4e0f0949a
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_container.eo
@@ -0,0 +1,50 @@
1interface Efl.Container (Efl.Gfx.Base)
2{
3 [[API common to all UI container objects.]]
4 legacy_prefix: null;
5 eo_prefix: efl_content;
6 methods {
7 @property content {
8 [[Swallowed sub-object contained in this object.]]
9 set {
10 return: bool;
11 }
12 get {}
13 keys {
14 part: const(char)*; [[the part in which to swallow the object]]
15 }
16 values {
17 content: Efl.Gfx.Base*; [[the object to swallow.]]
18 }
19 }
20 @property content_part_name {
21 [[The name of the part under which an object is swallowed.]]
22 get {}
23 keys {
24 content: Efl.Gfx.Base*;
25 }
26 values {
27 name: const(char)*;
28 }
29 }
30 content_unset {
31 [[Unswallow the object in the given part of the container and return it.]]
32 params {
33 @in name: const(char)* @nullable;
34 }
35 return: Efl.Gfx.Base*;
36 }
37 content_iterate {
38 [[Begin iterating over this object's contents.]]
39 return: free(own(iterator<Efl.Gfx.Base *> *), eina_iterator_free) @warn_unused;
40 }
41 content_count {
42 [[Returns the number of UI elements packed in this container.]]
43 return: int;
44 }
45 }
46 events {
47 content,added: Efl.Gfx.Base*; [[Sent after a new item was added.]]
48 content,removed: Efl.Gfx.Base*; [[Sent after an item was removed, before unref.]]
49 }
50}