diff options
author | David Walter Seikel | 2014-03-18 04:44:27 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-03-18 04:44:27 +1000 |
commit | a46f22c63ef081ef9d5b566e27281eb92cf6f2e9 (patch) | |
tree | 82e7aa1e88ec2f5b43feaee1c914d84ccec2d53a /ClientHamr | |
parent | Typo-- (diff) | |
download | SledjHamr-a46f22c63ef081ef9d5b566e27281eb92cf6f2e9.zip SledjHamr-a46f22c63ef081ef9d5b566e27281eb92cf6f2e9.tar.gz SledjHamr-a46f22c63ef081ef9d5b566e27281eb92cf6f2e9.tar.bz2 SledjHamr-a46f22c63ef081ef9d5b566e27281eb92cf6f2e9.tar.xz |
Added eo notes.
Diffstat (limited to 'ClientHamr')
-rw-r--r-- | ClientHamr/GuiLua/README | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/ClientHamr/GuiLua/README b/ClientHamr/GuiLua/README index c86ec04..5ce3dc1 100644 --- a/ClientHamr/GuiLua/README +++ b/ClientHamr/GuiLua/README | |||
@@ -126,6 +126,131 @@ Lua scripts as threads, much like I'm doing with LuaSL already. Plus | |||
126 | LuaJIT SPEEEEED!!. B-) | 126 | LuaJIT SPEEEEED!!. B-) |
127 | 127 | ||
128 | 128 | ||
129 | EO notes | ||
130 | -------- | ||
131 | |||
132 | tl;dr - eo introspection doesn't actually exist, even though it was | ||
133 | "promised" years ago, but looks trivial to add. | ||
134 | |||
135 | object = eo_add(EVAS_OBJ_LINE_CLASS, canvas); | ||
136 | evas_line.eo.h -> #define EVAS_OBJ_LINE_CLASS evas_obj_line_class_get() | ||
137 | -> const Eo_Class *evas_obj_line_class_get(void) EINA_CONST; | ||
138 | evas_line.eo.c -> EO_DEFINE_CLASS(evas_obj_line_class_get, &_evas_line_class_desc, EVAS_OBJ_CLASS, NULL); | ||
139 | Eo.h -> EO_DEFINE_CLASS is a macro that basically wraps eo_class_new(), and returns it's result. | ||
140 | |||
141 | So Eo_Class is the type of a class, but it's A) opaque, B) deprecated! | ||
142 | It includes a pointor to the Eo_Class_Description, which includes the | ||
143 | actual name. I'm not seeing anywhere the names of the get/set | ||
144 | paramaters being passed into the system, or any way to look up a class | ||
145 | based on name. Not even a way to get to the public Eo_Class_Description | ||
146 | from the opaque Eo_Class. | ||
147 | |||
148 | Eo_Class_Description is at least public. It includes | ||
149 | Eo_Op_Description's and Eo_Evenet_Description's. Eo_Op_ and Eo_Event_ | ||
150 | include the name and documentation of the op / event. The macro used to | ||
151 | generate Eo_Op_ does NOT pass the name, just the ID number as a string. | ||
152 | There is also Eo_Op_Func_Description, which does not include a name, it | ||
153 | seems to be generated in the constructor. The same Eo_Op_ ID number is | ||
154 | used to index it. Seems to be no direct link between Eo_Class and | ||
155 | Eo_Op_func_, just the same Eo_Op_ ID numbers used internally somehow. | ||
156 | |||
157 | eo_do(obj, evas_obj_line_xy_set(200, 200, 300, 300)); | ||
158 | evas_line.eo.h -> #define evas_obj_line_xy_set(x1, y1, x2, y2) EVAS_OBJ_LINE_ID(EVAS_OBJ_LINE_SUB_ID_XY_SET), EO_TYPECHECK(Evas_Coord , x1), EO_TYPECHECK(Evas_Coord , y1), EO_TYPECHECK(Evas_Coord , x2), EO_TYPECHECK(Evas_Coord , y2) | ||
159 | #define EVAS_OBJ_LINE_ID(sub_id) (EVAS_OBJ_LINE_BASE_ID + sub_id) | ||
160 | extern EAPI Eo_Op EVAS_OBJ_LINE_BASE_ID; | ||
161 | |||
162 | enum | ||
163 | { | ||
164 | EVAS_OBJ_LINE_SUB_ID_XY_SET, | ||
165 | EVAS_OBJ_LINE_SUB_ID_XY_GET, | ||
166 | EVAS_OBJ_LINE_SUB_ID_LAST | ||
167 | }; | ||
168 | evas_line.eo.c -> EAPI Eo_Op EVAS_OBJ_LINE_BASE_ID = EO_NOOP; | ||
169 | static void _gen_evas_line_class_constructor(Eo_Class *klass) | ||
170 | { | ||
171 | const Eo_Op_Func_Description func_desc[] = { | ||
172 | EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _eo_obj_evas_line_constructor), | ||
173 | EO_OP_FUNC(EVAS_OBJ_LINE_ID(EVAS_OBJ_LINE_SUB_ID_XY_SET), _eo_obj_evas_line_xy_set), | ||
174 | EO_OP_FUNC(EVAS_OBJ_LINE_ID(EVAS_OBJ_LINE_SUB_ID_XY_GET), _eo_obj_evas_line_xy_get), | ||
175 | EO_OP_FUNC_SENTINEL | ||
176 | }; | ||
177 | eo_class_funcs_set(klass, func_desc); | ||
178 | } | ||
179 | |||
180 | static void | ||
181 | _eo_obj_evas_line_xy_set(Eo *obj, void *_pd, va_list *list) | ||
182 | { | ||
183 | Evas_Coord x1 = va_arg(*list, Evas_Coord); | ||
184 | Evas_Coord y1 = va_arg(*list, Evas_Coord); | ||
185 | Evas_Coord x2 = va_arg(*list, Evas_Coord); | ||
186 | Evas_Coord y2 = va_arg(*list, Evas_Coord); | ||
187 | _evas_line_xy_set(obj, _pd, x1, y1, x2, y2); | ||
188 | } | ||
189 | |||
190 | void _evas_line_xy_set(Eo *obj, Evas_Line_Data *pd, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2); | ||
191 | |||
192 | evas_object_line.c -> EOLIAN static void _evas_line_xy_set(Eo *eo_obj, Evas_Line_Data *_pd, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2) | ||
193 | |||
194 | |||
195 | Evas_Object_Line *o = eo_data_scope_get(obj, EVAS_OBJ_LINE_CLASS); | ||
196 | Evas_Object_Line *o = eo_data_ref(obj, EVAS_OBJ_LINE_CLASS); | ||
197 | |||
198 | |||
199 | .. evas_line.eo | ||
200 | |||
201 | class Evas_Line (Evas_Object) | ||
202 | { | ||
203 | legacy_prefix: evas_object_line; | ||
204 | eo_prefix: evas_obj_line; | ||
205 | properties { | ||
206 | xy { | ||
207 | set { | ||
208 | /*@ | ||
209 | @since 1.8 | ||
210 | |||
211 | Sets the coordinates of the end points of the given evas line object. */ | ||
212 | } | ||
213 | get { | ||
214 | /*@ | ||
215 | Retrieves the coordinates of the end points of the given evas line object. | ||
216 | second end point. */ | ||
217 | } | ||
218 | values { | ||
219 | Evas_Coord x1; /*@ The X coordinate of the first point. */ | ||
220 | Evas_Coord y1; /*@ The Y coordinate of the first point. */ | ||
221 | Evas_Coord x2; /*@ The X coordinate of the second point. */ | ||
222 | Evas_Coord y2; /*@ The Y coordinate of the second point. */ | ||
223 | } | ||
224 | } | ||
225 | } | ||
226 | implements { | ||
227 | Eo_Base::constructor; | ||
228 | } | ||
229 | |||
230 | } | ||
231 | |||
232 | ... evas_line.eo.c | ||
233 | |||
234 | EAPI void | ||
235 | evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2) | ||
236 | { | ||
237 | eo_do((Eo *) obj, evas_obj_line_xy_set(x1, y1, x2, y2)); | ||
238 | return ; | ||
239 | } | ||
240 | |||
241 | |||
242 | static const Eo_Class_Description _evas_line_class_desc = { | ||
243 | EO_VERSION, | ||
244 | "Evas_Line", | ||
245 | EO_CLASS_TYPE_REGULAR, | ||
246 | EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_LINE_BASE_ID, _evas_line_op_desc, EVAS_OBJ_LINE_SUB_ID_LAST), | ||
247 | _evas_line_event_desc, | ||
248 | sizeof(Evas_Line_Data), | ||
249 | _gen_evas_line_class_constructor, | ||
250 | NULL | ||
251 | }; | ||
252 | |||
253 | |||
129 | skang vs edje vs LL shit | 254 | skang vs edje vs LL shit |
130 | ------------------------ | 255 | ------------------------ |
131 | 256 | ||