summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_grid.c
diff options
context:
space:
mode:
authorYossi Kantor <yossi.kantor@samsung.com>2014-03-10 17:02:10 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-12 10:57:28 +0200
commit2a90b4f23daef9476ea9d60b144e135931c3d5b2 (patch)
tree1f30dff08dff697d1e274e175afcb086d26e45e2 /src/lib/evas/canvas/evas_object_grid.c
parent103e89a04a2e50930a3d84839fe8564cf8ebcee7 (diff)
Eolian: Integration of Evas Grid
Diffstat (limited to 'src/lib/evas/canvas/evas_object_grid.c')
-rw-r--r--src/lib/evas/canvas/evas_object_grid.c309
1 files changed, 53 insertions, 256 deletions
diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c
index 707dd69..caf7615 100644
--- a/src/lib/evas/canvas/evas_object_grid.c
+++ b/src/lib/evas/canvas/evas_object_grid.c
@@ -4,11 +4,9 @@
4 4
5#include <Eo.h> 5#include <Eo.h>
6 6
7EAPI Eo_Op EVAS_OBJ_GRID_BASE_ID = EO_NOOP;
8
9#define MY_CLASS EVAS_OBJ_GRID_CLASS 7#define MY_CLASS EVAS_OBJ_GRID_CLASS
10 8
11typedef struct _Evas_Object_Grid_Data Evas_Object_Grid_Data; 9typedef struct _Evas_Grid_Data Evas_Grid_Data;
12typedef struct _Evas_Object_Grid_Option Evas_Object_Grid_Option; 10typedef struct _Evas_Object_Grid_Option Evas_Object_Grid_Option;
13typedef struct _Evas_Object_Grid_Iterator Evas_Object_Grid_Iterator; 11typedef struct _Evas_Object_Grid_Iterator Evas_Object_Grid_Iterator;
14typedef struct _Evas_Object_Grid_Accessor Evas_Object_Grid_Accessor; 12typedef struct _Evas_Object_Grid_Accessor Evas_Object_Grid_Accessor;
@@ -20,7 +18,7 @@ struct _Evas_Object_Grid_Option
20 int x, y, w, h; 18 int x, y, w, h;
21}; 19};
22 20
23struct _Evas_Object_Grid_Data 21struct _Evas_Grid_Data
24{ 22{
25 Evas_Object_Smart_Clipped_Data base; 23 Evas_Object_Smart_Clipped_Data base;
26 Eina_List *children; 24 Eina_List *children;
@@ -47,7 +45,7 @@ struct _Evas_Object_Grid_Accessor
47}; 45};
48 46
49#define EVAS_OBJECT_GRID_DATA_GET(o, ptr) \ 47#define EVAS_OBJECT_GRID_DATA_GET(o, ptr) \
50 Evas_Object_Grid_Data *ptr = eo_data_scope_get(o, MY_CLASS) 48 Evas_Grid_Data *ptr = eo_data_scope_get(o, MY_CLASS)
51 49
52#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \ 50#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \
53 EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ 51 EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
@@ -165,7 +163,7 @@ EVAS_SMART_SUBCLASS_NEW("Evas_Object_Grid", _evas_object_grid,
165static void 163static void
166_evas_object_grid_smart_add(Evas_Object *o) 164_evas_object_grid_smart_add(Evas_Object *o)
167{ 165{
168 Evas_Object_Grid_Data *priv; 166 Evas_Grid_Data *priv;
169 167
170 priv = evas_object_smart_data_get(o); 168 priv = evas_object_smart_data_get(o);
171 if (!priv) 169 if (!priv)
@@ -257,8 +255,8 @@ evas_object_grid_add(Evas *evas)
257 return obj; 255 return obj;
258} 256}
259 257
260static void 258EOLIAN static void
261_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) 259_evas_grid_constructor(Eo *obj, Evas_Grid_Data *class_data EINA_UNUSED)
262{ 260{
263 eo_do_super(obj, MY_CLASS, eo_constructor()); 261 eo_do_super(obj, MY_CLASS, eo_constructor());
264 eo_do(obj, evas_obj_smart_attach(_evas_object_grid_smart_class_new())); 262 eo_do(obj, evas_obj_smart_attach(_evas_object_grid_smart_class_new()));
@@ -266,83 +264,40 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
266// return evas_object_smart_add(evas, _evas_object_grid_smart_class_new()); 264// return evas_object_smart_add(evas, _evas_object_grid_smart_class_new());
267} 265}
268 266
269EAPI Evas_Object * 267EOLIAN static Evas_Object*
270evas_object_grid_add_to(Evas_Object *parent) 268_evas_grid_add_to(Eo *parent, Evas_Grid_Data *_pd EINA_UNUSED)
271{
272 Evas_Object *o = NULL;
273 eo_do(parent, evas_obj_grid_add_to(&o));
274 return o;
275}
276
277static void
278_add_to(Eo *parent, void *_pd EINA_UNUSED, va_list *list)
279{ 269{
280 Evas *evas; 270 Evas *evas;
281 Evas_Object **ret = va_arg(*list, Evas_Object **); 271 Evas_Object *ret;
282 evas = evas_object_evas_get(parent); 272 evas = evas_object_evas_get(parent);
283 *ret = evas_object_grid_add(evas); 273 ret = evas_object_grid_add(evas);
284 evas_object_smart_member_add(*ret, parent); 274 evas_object_smart_member_add(ret, parent);
285}
286 275
287EAPI void 276 return ret;
288evas_object_grid_size_set(Evas_Object *o, int w, int h)
289{
290 eo_do(o, evas_obj_grid_size_set(w, h));
291} 277}
292 278
293static void 279EOLIAN static void
294_size_set(Eo *o, void *_pd, va_list *list) 280_evas_grid_size_set(Eo *o, Evas_Grid_Data *priv, int w, int h)
295{ 281{
296 Evas_Object_Grid_Data *priv = _pd;
297 int w = va_arg(*list, int);
298 int h = va_arg(*list, int);
299
300 if ((priv->size.w == w) && (priv->size.h == h)) return; 282 if ((priv->size.w == w) && (priv->size.h == h)) return;
301 priv->size.w = w; 283 priv->size.w = w;
302 priv->size.h = h; 284 priv->size.h = h;
303 evas_object_smart_changed(o); 285 evas_object_smart_changed(o);
304} 286}
305 287
306EAPI void 288EOLIAN static void
307evas_object_grid_size_get(const Evas_Object *o, int *w, int *h) 289_evas_grid_size_get(Eo *o EINA_UNUSED, Evas_Grid_Data *priv, int *w, int *h)
308{
309 eo_do((Eo *)o, evas_obj_grid_size_get(w, h));
310}
311
312static void
313_size_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
314{ 290{
315 const Evas_Object_Grid_Data *priv = _pd;
316 int *w = va_arg(*list, int *);
317 int *h = va_arg(*list, int *);
318 if (w) *w = priv->size.w; 291 if (w) *w = priv->size.w;
319 if (h) *h = priv->size.h; 292 if (h) *h = priv->size.h;
320} 293}
321 294
322EAPI Eina_Bool 295EOLIAN static Eina_Bool
323evas_object_grid_pack(Evas_Object *o, Evas_Object *child, int x, int y, int w, int h) 296_evas_grid_pack(Eo *o, Evas_Grid_Data *priv, Evas_Object *child, int x, int y, int w, int h)
324{
325 Eina_Bool ret = EINA_FALSE;
326 eo_do(o, evas_obj_grid_pack(child, x, y, w, h, &ret));
327 return ret;
328}
329
330static void
331_pack(Eo *o, void *_pd, va_list *list)
332{ 297{
333 Evas_Object_Grid_Option *opt; 298 Evas_Object_Grid_Option *opt;
334 Eina_Bool newobj = EINA_FALSE; 299 Eina_Bool newobj = EINA_FALSE;
335 300
336 Evas_Object_Grid_Data *priv = _pd;
337
338 Evas_Object *child = va_arg(*list, Evas_Object *);
339 int x = va_arg(*list, int);
340 int y = va_arg(*list, int);
341 int w = va_arg(*list, int);
342 int h = va_arg(*list, int);
343 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
344 if (ret) *ret = EINA_FALSE;
345
346 opt = _evas_object_grid_option_get(child); 301 opt = _evas_object_grid_option_get(child);
347 if (!opt) 302 if (!opt)
348 { 303 {
@@ -350,7 +305,7 @@ _pack(Eo *o, void *_pd, va_list *list)
350 if (!opt) 305 if (!opt)
351 { 306 {
352 ERR("could not allocate grid option data."); 307 ERR("could not allocate grid option data.");
353 return; 308 return EINA_FALSE;
354 } 309 }
355 newobj = EINA_TRUE; 310 newobj = EINA_TRUE;
356 } 311 }
@@ -371,69 +326,48 @@ _pack(Eo *o, void *_pd, va_list *list)
371 } 326 }
372 // FIXME: we could keep a changed list 327 // FIXME: we could keep a changed list
373 evas_object_smart_changed(o); 328 evas_object_smart_changed(o);
374 if (ret) *ret = EINA_TRUE; 329
330 return EINA_TRUE;
375} 331}
376 332
377static void 333static void
378_evas_object_grid_remove_opt(Evas_Object_Grid_Data *priv, Evas_Object_Grid_Option *opt) 334_evas_object_grid_remove_opt(Evas_Grid_Data *priv, Evas_Object_Grid_Option *opt)
379{ 335{
380 priv->children = eina_list_remove_list(priv->children, opt->l); 336 priv->children = eina_list_remove_list(priv->children, opt->l);
381 opt->l = NULL; 337 opt->l = NULL;
382} 338}
383 339
384EAPI Eina_Bool 340EOLIAN static Eina_Bool
385evas_object_grid_unpack(Evas_Object *o, Evas_Object *child) 341_evas_grid_unpack(Eo *o, Evas_Grid_Data *priv, Evas_Object *child)
386{
387 Eina_Bool ret = EINA_FALSE;
388 eo_do(o, evas_obj_grid_unpack(child, &ret));
389 return ret;
390}
391
392static void
393_unpack(Eo *o, void *_pd, va_list *list)
394{ 342{
395 Evas_Object_Grid_Option *opt; 343 Evas_Object_Grid_Option *opt;
396 344
397 Evas_Object_Grid_Data *priv = _pd;
398
399 Evas_Object *child = va_arg(*list, Evas_Object *);
400 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
401 if (ret) *ret = EINA_FALSE;
402
403 if (o != evas_object_smart_parent_get(child)) 345 if (o != evas_object_smart_parent_get(child))
404 { 346 {
405 ERR("cannot unpack child from incorrect grid!"); 347 ERR("cannot unpack child from incorrect grid!");
406 return; 348 return EINA_FALSE;
407 } 349 }
408 350
409 opt = _evas_object_grid_option_del(child); 351 opt = _evas_object_grid_option_del(child);
410 if (!opt) 352 if (!opt)
411 { 353 {
412 ERR("cannot unpack child with no packing option!"); 354 ERR("cannot unpack child with no packing option!");
413 return; 355 return EINA_FALSE;
414 } 356 }
415 357
416 _evas_object_grid_child_disconnect(o, child); 358 _evas_object_grid_child_disconnect(o, child);
417 _evas_object_grid_remove_opt(priv, opt); 359 _evas_object_grid_remove_opt(priv, opt);
418 evas_object_smart_member_del(child); 360 evas_object_smart_member_del(child);
419 free(opt); 361 free(opt);
420 if (ret) *ret = EINA_TRUE; 362
421} 363 return EINA_TRUE;
422
423EAPI void
424evas_object_grid_clear(Evas_Object *o, Eina_Bool clear)
425{
426 eo_do(o, evas_obj_grid_clear(clear));
427} 364}
428 365
429static void 366EOLIAN static void
430_clear(Eo *o, void *_pd, va_list *list) 367_evas_grid_clear(Eo *o, Evas_Grid_Data *priv, Eina_Bool clear)
431{ 368{
432 Evas_Object_Grid_Option *opt; 369 Evas_Object_Grid_Option *opt;
433 370
434 Evas_Object_Grid_Data *priv = _pd;
435 Eina_Bool clear = va_arg(*list, int);
436
437 EINA_LIST_FREE(priv->children, opt) 371 EINA_LIST_FREE(priv->children, opt)
438 { 372 {
439 _evas_object_grid_child_disconnect(o, opt->obj); 373 _evas_object_grid_child_disconnect(o, opt->obj);
@@ -445,24 +379,9 @@ _clear(Eo *o, void *_pd, va_list *list)
445 } 379 }
446} 380}
447 381
448EAPI Eina_Bool 382EOLIAN static Eina_Bool
449evas_object_grid_pack_get(const Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h) 383_evas_grid_pack_get(Eo *o EINA_UNUSED, Evas_Grid_Data *_pd EINA_UNUSED, Evas_Object *child, int *x, int *y, int *w, int *h)
450{ 384{
451 Eina_Bool ret = EINA_FALSE;
452 eo_do((Eo *)o, evas_obj_grid_pack_get(child, x, y, w, h, &ret));
453 return ret;
454}
455
456static void
457_pack_get(Eo *o EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
458{
459 Evas_Object *child = va_arg(*list, Evas_Object *);
460 int *x = va_arg(*list, int *);
461 int *y = va_arg(*list, int *);
462 int *w = va_arg(*list, int *);
463 int *h = va_arg(*list, int *);
464 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
465
466 Evas_Object_Grid_Option *opt; 385 Evas_Object_Grid_Option *opt;
467 386
468 if (x) *x = 0; 387 if (x) *x = 0;
@@ -470,46 +389,24 @@ _pack_get(Eo *o EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
470 if (w) *w = 0; 389 if (w) *w = 0;
471 if (h) *h = 0; 390 if (h) *h = 0;
472 opt = _evas_object_grid_option_get(child); 391 opt = _evas_object_grid_option_get(child);
473 if (!opt) 392 if (!opt) return 0;
474 {
475 *ret = 0;
476 return;
477 }
478 if (x) *x = opt->x; 393 if (x) *x = opt->x;
479 if (y) *y = opt->y; 394 if (y) *y = opt->y;
480 if (w) *w = opt->w; 395 if (w) *w = opt->w;
481 if (h) *h = opt->h; 396 if (h) *h = opt->h;
482 *ret = 1;
483}
484 397
485EAPI Eina_Iterator * 398 return 1;
486evas_object_grid_iterator_new(const Evas_Object *o)
487{
488 Eina_Iterator *ret = NULL;
489 eo_do((Eo *)o, evas_obj_grid_iterator_new(&ret));
490 return ret;
491} 399}
492 400
493static void 401EOLIAN static Eina_Iterator*
494_iterator_new(Eo *o, void *_pd, va_list *list) 402_evas_grid_iterator_new(Eo *o, Evas_Grid_Data *priv)
495{ 403{
496 Eina_Iterator **ret = va_arg(*list, Eina_Iterator **);
497 Evas_Object_Grid_Iterator *it; 404 Evas_Object_Grid_Iterator *it;
498 405
499 const Evas_Object_Grid_Data *priv = _pd; 406 if (!priv->children) return NULL;
500
501 if (!priv->children)
502 {
503 *ret = NULL;
504 return;
505 }
506 407
507 it = calloc(1, sizeof(Evas_Object_Grid_Iterator)); 408 it = calloc(1, sizeof(Evas_Object_Grid_Iterator));
508 if (!it) 409 if (!it) return NULL;
509 {
510 *ret = NULL;
511 return;
512 }
513 410
514 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); 411 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
515 412
@@ -520,37 +417,18 @@ _iterator_new(Eo *o, void *_pd, va_list *list)
520 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_grid_iterator_get_container); 417 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_grid_iterator_get_container);
521 it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_grid_iterator_free); 418 it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_grid_iterator_free);
522 419
523 *ret = &it->iterator; 420 return &it->iterator;
524} 421}
525 422
526EAPI Eina_Accessor * 423EOLIAN static Eina_Accessor*
527evas_object_grid_accessor_new(const Evas_Object *o) 424_evas_grid_accessor_new(Eo *o, Evas_Grid_Data *priv)
528{ 425{
529 Eina_Accessor *ret = NULL;
530 eo_do((Eo *)o, evas_obj_grid_accessor_new(&ret));
531 return ret;
532}
533
534static void
535_accessor_new(Eo *o, void *_pd, va_list *list)
536{
537 Eina_Accessor **ret = va_arg(*list, Eina_Accessor **);
538 Evas_Object_Grid_Accessor *it; 426 Evas_Object_Grid_Accessor *it;
539 427
540 const Evas_Object_Grid_Data *priv = _pd; 428 if (!priv->children) return NULL;
541
542 if (!priv->children)
543 {
544 *ret = NULL;
545 return;
546 }
547 429
548 it = calloc(1, sizeof(Evas_Object_Grid_Accessor)); 430 it = calloc(1, sizeof(Evas_Object_Grid_Accessor));
549 if (!it) 431 if (!it) return NULL;
550 {
551 *ret = NULL;
552 return;
553 }
554 432
555 EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR); 433 EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR);
556 434
@@ -561,61 +439,30 @@ _accessor_new(Eo *o, void *_pd, va_list *list)
561 it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_grid_accessor_get_container); 439 it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_grid_accessor_get_container);
562 it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_grid_accessor_free); 440 it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_grid_accessor_free);
563 441
564 *ret = &it->accessor; 442 return &it->accessor;
565}
566
567EAPI Eina_List *
568evas_object_grid_children_get(const Evas_Object *o)
569{
570 Eina_List *ret = NULL;
571 eo_do((Eo *)o, evas_obj_grid_children_get(&ret));
572 return ret;
573} 443}
574 444
575static void 445EOLIAN static Eina_List*
576_children_get(Eo *o EINA_UNUSED, void *_pd, va_list *list) 446_evas_grid_children_get(Eo *o EINA_UNUSED, Evas_Grid_Data *priv)
577{ 447{
578 Eina_List **ret = va_arg(*list, Eina_List **);
579
580 Eina_List *new_list = NULL, *l; 448 Eina_List *new_list = NULL, *l;
581 Evas_Object_Grid_Option *opt; 449 Evas_Object_Grid_Option *opt;
582 450
583 const Evas_Object_Grid_Data *priv = _pd;
584
585 EINA_LIST_FOREACH(priv->children, l, opt) 451 EINA_LIST_FOREACH(priv->children, l, opt)
586 new_list = eina_list_append(new_list, opt->obj); 452 new_list = eina_list_append(new_list, opt->obj);
587 453
588 *ret = new_list; 454 return new_list;
589}
590
591EAPI Eina_Bool
592evas_object_grid_mirrored_get(const Evas_Object *o)
593{
594 Eina_Bool ret = EINA_FALSE;
595 eo_do((Eo *)o, evas_obj_grid_mirrored_get(&ret));
596 return ret;
597}
598
599static void
600_mirrored_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
601{
602 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
603 const Evas_Object_Grid_Data *priv = _pd;
604 *ret = priv->is_mirrored;
605} 455}
606 456
607EAPI void 457EOLIAN static Eina_Bool
608evas_object_grid_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) 458_evas_grid_mirrored_get(Eo *o EINA_UNUSED, Evas_Grid_Data *priv)
609{ 459{
610 eo_do(obj, evas_obj_grid_mirrored_set(mirrored)); 460 return priv->is_mirrored;
611} 461}
612 462
613static void 463EOLIAN static void
614_mirrored_set(Eo *o EINA_UNUSED, void *_pd, va_list *list) 464_evas_grid_mirrored_set(Eo *o EINA_UNUSED, Evas_Grid_Data *priv, Eina_Bool mirrored)
615{ 465{
616 Eina_Bool mirrored = va_arg(*list, int);
617
618 Evas_Object_Grid_Data *priv = _pd;
619 mirrored = !!mirrored; 466 mirrored = !!mirrored;
620 if (priv->is_mirrored != mirrored) 467 if (priv->is_mirrored != mirrored)
621 { 468 {
@@ -624,54 +471,4 @@ _mirrored_set(Eo *o EINA_UNUSED, void *_pd, va_list *list)
624 } 471 }
625} 472}
626 473
627static void 474#include "canvas/evas_grid.eo.c"
628_class_constructor(Eo_Class *klass)
629{
630 const Eo_Op_Func_Description func_desc[] = {
631 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
632 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ADD_TO), _add_to),
633 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_SIZE_SET), _size_set),
634 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_SIZE_GET), _size_get),
635 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_PACK), _pack),
636 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_UNPACK), _unpack),
637 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_CLEAR), _clear),
638 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_PACK_GET), _pack_get),
639 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ITERATOR_NEW), _iterator_new),
640 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ACCESSOR_NEW), _accessor_new),
641 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_CHILDREN_GET), _children_get),
642 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_MIRRORED_GET), _mirrored_get),
643 EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_MIRRORED_SET), _mirrored_set),
644 EO_OP_FUNC_SENTINEL
645 };
646 eo_class_funcs_set(klass, func_desc);
647}
648
649static const Eo_Op_Description op_desc[] = {
650 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_ADD_TO, "Create a grid that is child of a given element parent."),
651 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_SIZE_SET, "Set the virtual resolution for the grid."),
652 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_SIZE_GET, "Get the current virtual resolution."),
653 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_PACK, "Add a new child to a grid object."),
654 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_UNPACK, "Remove child from grid."),
655 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_CLEAR, "Faster way to remove all child objects from a grid object."),
656 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_PACK_GET, "Get the pack options for a grid child."),
657 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_ITERATOR_NEW, "Get an iterator to walk the list of children for the grid."),
658 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_ACCESSOR_NEW, "Get an accessor to get random access to the list of children for the grid."),
659 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_CHILDREN_GET, "Get the list of children for the grid."),
660 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_MIRRORED_GET, "Gets the mirrored mode of the grid."),
661 EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_MIRRORED_SET, "Sets the mirrored mode of the grid."),
662 EO_OP_DESCRIPTION_SENTINEL
663};
664
665static const Eo_Class_Description class_desc = {
666 EO_VERSION,
667 "Evas_Grid",
668 EO_CLASS_TYPE_REGULAR,
669 EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_GRID_BASE_ID, op_desc, EVAS_OBJ_GRID_SUB_ID_LAST),
670 NULL,
671 sizeof(Evas_Object_Grid_Data),
672 _class_constructor,
673 NULL
674};
675
676EO_DEFINE_CLASS(evas_object_grid_class_get, &class_desc, EVAS_OBJ_SMART_CLIPPED_CLASS, NULL);
677