summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-04-14 18:32:45 +0100
committerTom Hacohen <tom@stosb.com>2016-04-14 18:34:16 +0100
commitba4796d1b2d9b86c09d0a9d463fefcb8f253e75d (patch)
tree3fd980a55b94201b05171168bac5b77844683c56
parent5a3af92e5b0392ffb1c23bba675e8d1fcd8b3162 (diff)
Eo base: Improve documentation.
-rw-r--r--src/lib/eo/eo_base.eo24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index 9043cf9159..9ca1c2403e 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -49,17 +49,25 @@ abstract Eo.Base ()
49 49
50 methods { 50 methods {
51 @property parent { 51 @property parent {
52 set { 52 [[The parent of an object.
53 [[Set the parent of an object.
54 53
55 Parents keep references to their children so in order to 54 Parents keep references to their children so in order to
56 delete objects that have parents you need to set parent to 55 delete objects that have parents you need to set parent to
57 NULL or use eo_del() that does that for you (and also unrefs 56 NULL or use eo_del() that does that for you (and also unrefs
58 the object). 57 the object).
59 ]] 58
59 The Eo parent is conceptually user set. That means that a parent
60 should not be changed behind the scenes in a surprising manner.
61
62 For example:
63 if you have a widget that has a box internally, and
64 when you swallow into that widget the object you swallow ends up in
65 the box, the parent should be the widget, and not the box.
66 ]]
67
68 set {
60 } 69 }
61 get { 70 get {
62 [[Get the parent of an object]]
63 } 71 }
64 values { 72 values {
65 parent: Eo.Base * @nullable; [[the new parent]] 73 parent: Eo.Base * @nullable; [[the new parent]]