summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_box_eo.h
blob: e78f97a5e47a3fabf1455bc4c602f629187568ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
#ifndef _EVAS_BOX_EO_H_
#define _EVAS_BOX_EO_H_

#ifndef _EVAS_BOX_EO_CLASS_TYPE
#define _EVAS_BOX_EO_CLASS_TYPE

typedef Eo Evas_Box;

#endif

#ifndef _EVAS_BOX_EO_TYPES
#define _EVAS_BOX_EO_TYPES


#endif
/** Evas box class
 *
 * @ingroup Evas_Box
 */
#define EVAS_BOX_CLASS evas_box_class_get()

EWAPI const Efl_Class *evas_box_class_get(void) EINA_CONST;

/**
 * @brief Set the alignment of the whole bounding box of contents, for a given
 * box object.
 *
 * This will influence how a box object is to align its bounding box of
 * contents within its own area. The values must be in the range $0.0 - $1.0,
 * or undefined behavior is expected. For horizontal alignment, $0.0 means to
 * the left, with $1.0 meaning to the right. For vertical alignment, $0.0 means
 * to the top, with $1.0 meaning to the bottom.
 *
 * @note The default values for both alignments is $0.5.
 *
 * See also @ref evas_obj_box_align_get.
 *
 * @param[in] obj The object.
 * @param[in] horizontal The horizontal alignment, in pixels.
 * @param[in] vertical The vertical alignment, in pixels.
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_align_set(Eo *obj, double horizontal, double vertical);

/**
 * @brief Get the alignment of the whole bounding box of contents, for a given
 * box object.
 *
 * See also @ref evas_obj_box_align_set for more information.
 *
 * @param[in] obj The object.
 * @param[out] horizontal The horizontal alignment, in pixels.
 * @param[out] vertical The vertical alignment, in pixels.
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_align_get(const Eo *obj, double *horizontal, double *vertical);

/**
 * @brief Set the (space) padding between cells set for a given box object.
 *
 * @note The default values for both padding components is $0.
 *
 * See also @ref evas_obj_box_padding_get.
 *
 * @param[in] obj The object.
 * @param[in] horizontal The horizontal padding, in pixels.
 * @param[in] vertical The vertical padding, in pixels.
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_padding_set(Eo *obj, int horizontal, int vertical);

/**
 * @brief Get the (space) padding between cells set for a given box object.
 *
 * See also @ref evas_obj_box_padding_set.
 *
 * @param[in] obj The object.
 * @param[out] horizontal The horizontal padding, in pixels.
 * @param[out] vertical The vertical padding, in pixels.
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_padding_get(const Eo *obj, int *horizontal, int *vertical);

/**
 * @brief Set a new layouting function to a given box object
 *
 * A box layout function affects how a box object displays child elements
 * within its area. The list of pre-defined box layouts available in Evas are
 * @ref evas_obj_box_layout_horizontal, @ref evas_obj_box_layout_vertical,
 * @ref evas_obj_box_layout_homogeneous_horizontal,
 * @ref evas_obj_box_layout_homogeneous_vertical,
 * @ref evas_obj_box_layout_homogeneous_max_size_horizontal,
 * @ref evas_obj_box_layout_homogeneous_max_size_vertical,
 * @ref evas_obj_box_layout_flow_horizontal,
 * @ref evas_obj_box_layout_flow_vertical and @ref evas_obj_box_layout_stack
 *
 * Refer to each of their documentation texts for details on them.
 *
 * @note A box layouting function will be triggered by the $'calculate' smart
 * callback of the box's smart class.
 *
 * @param[in] obj The object.
 * @param[in] cb The new layout function to set on @c o.
 * @param[in] data Data pointer to be passed to @c cb.
 * @param[in] free_data Function to free @c data, if need be.
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_layout_set(Eo *obj, Evas_Object_Box_Layout cb, const void *data, Eina_Free_Cb free_data) EINA_ARG_NONNULL(2);

/**
 * @brief Layout function which sets the box o to a (basic) horizontal box
 *
 * In this layout, the box object's overall behavior is controlled by its
 * padding/alignment properties, which are set by the
 * evas_object_box_{h,v}_{align,padding}_set family of functions. The size
 * hints of the elements in the box -- set by the
 * evas_object_size_hint_{align,padding,weight}_set functions -- also control
 * the way this function works.
 *
 * Box's properties: @c align_h controls the horizontal alignment of the child
 * objects relative to the containing box. When set to $0.0, children are
 * aligned to the left. A value of $1.0 makes them aligned to the right border.
 * Values in between align them proportionally. Note that if the size required
 * by the children, which is given by their widths and the @c padding_h
 * property of the box, is bigger than the their container's width, the
 * children will be displayed out of the box's bounds. A negative value of
 * @c align_h makes the box to justify its children. The padding between them,
 * in this case, is corrected so that the leftmost one touches the left border
 * and the rightmost one touches the right border (even if they must overlap).
 * The @c align_v and @c padding_v properties of the box don't contribute to
 * its behaviour when this layout is chosen.
 *
 * Child element's properties: @c align_x does not influence the box's
 * behavior. @c padding_l and @c padding_r sum up to the container's horizontal
 * padding between elements. The child's @c padding_t, @c padding_b and
 * @c align_y properties apply for padding/alignment relative to the overall
 * height of the box. Finally, there is the @c weight_x property, which, if set
 * to a non-zero value, tells the container that the child width is not
 * pre-defined. If the container can't accommodate all its children, it sets
 * the widths of the ones with weights to sizes as small as they can all fit
 * into it. If the size required by the children is less than the available,
 * the box increases its childrens' (which have weights) widths as to fit the
 * remaining space. The @c weight_x property, besides telling the element is
 * resizable, gives a weight for the resizing process.  The parent box will try
 * to distribute (or take off) widths accordingly to the normalized list of
 * weights: most weighted children remain/get larger in this process than the
 * least ones. @c weight_y does not influence the layout.
 *
 * If one desires that, besides having weights, child elements must be resized
 * bounded to a minimum or maximum size, those size hints must be set, by the
 * evas_object_size_hint_{min,max}_set functions.
 *
 * @param[in] obj The object.
 * @param[in] priv Private data pointer
 * @param[in] data Data pointer
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_layout_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);

/**
 * @brief Layout function which sets the box o to a (basic) vertical box
 *
 * This function behaves analogously to evas_object_box_layout_horizontal. The
 * description of its behaviour can be derived from that function's
 * documentation.
 *
 * @param[in] obj The object.
 * @param[in] priv Private data pointer
 * @param[in] data Data pointer
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_layout_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);

/**
 * @brief Layout function which sets the box o to a maximum size, homogeneous
 * horizontal box
 *
 * In a maximum size, homogeneous horizontal box, besides having cells of equal
 * size reserved for the child objects, this size will be defined by the size
 * of the largest child in the box (in width). The box's overall behavior is
 * controlled by its properties, which are set by the
 * evas_object_box_{h,v}_{align,padding}_set family of functions.  The size
 * hints of the elements in the box -- set by the
 * evas_object_size_hint_{align,padding,weight}_set functions -- also control
 * the way this function works.
 *
 * Box's properties: @c padding_h tells the box to draw empty spaces of that
 * size, in pixels, between the child objects' cells. @c align_h controls the
 * horizontal alignment of the child objects, relative to the containing box.
 * When set to $0.0, children are aligned to the left. A value of $1.0 lets
 * them aligned to the right border. Values in between align them
 * proportionally. A negative value of @c align_h makes the box to justify its
 * children cells. The padding between them, in this case, is corrected so that
 * the leftmost one touches the left border and the rightmost one touches the
 * right border (even if they must overlap). The @c align_v and @c padding_v
 * properties of the box don't contribute to its behaviour when this layout is
 * chosen.
 *
 * Child element's properties: @c padding_l and @c padding_r sum up to the
 * required width of the child element. The @c align_x property tells the
 * relative position of this overall child width in its allocated cell ($0.0 to
 * extreme left, $1.0 to extreme right). A value of $-1.0 to @c align_x makes
 * the box try to resize this child element to the exact width of its cell
 * (respecting the minimum and maximum size hints on the child's width and
 * accounting for its horizontal padding hints). The child's @c padding_t,
 * @c padding_b and @c align_y properties apply for padding/alignment relative
 * to the overall height of the box. A value of $-1.0 to @c align_y makes the
 * box try to resize this child element to the exact height of its parent
 * (respecting the max hint on the child's height).
 *
 * @param[in] obj The object.
 * @param[in] priv Private data pointer
 * @param[in] data Data pointer
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_layout_homogeneous_max_size_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);

/**
 * @brief No description supplied by the EAPI.
 *
 * @param[in] obj The object.
 * @param[in] child Child object to be removed
 *
 * @return New object with child removed
 *
 * @ingroup Evas_Box
 */
EOAPI Efl_Canvas_Object *evas_obj_box_internal_remove(Eo *obj, Efl_Canvas_Object *child);

/**
 * @brief Layout function which sets the box o to a flow vertical box.
 *
 * This function behaves analogously to evas_object_box_layout_flow_horizontal.
 * The description of its behaviour can be derived from that function's
 * documentation.
 *
 * @param[in] obj The object.
 * @param[in] priv Private data pointer
 * @param[in] data Data pointer
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_layout_flow_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);

/**
 * @brief No description supplied by the EAPI.
 *
 * @param[in] obj The object.
 * @param[in] opt Box option to be freed
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_internal_option_free(Eo *obj, Evas_Object_Box_Option *opt);

/**
 * @brief Insert a new child object after another existing one, in a given box
 * object o.
 *
 * On success, the $"child,added" smart event will take place.
 *
 * @note This function will fail if @c reference is not a member of @c o.
 *
 * @note The actual placing of the item relative to @c o's area will depend on
 * the layout set to it.
 *
 * @note This call will trigger the box's _Evas_Object_Box_Api.insert_after
 * smart function.
 *
 * @param[in] obj The object.
 * @param[in] child A child Evas object to be made a member of @c o.
 * @param[in] reference The child object to place this new one after.
 *
 * @return A box option bound to the recently added box item or @c null, on
 * errors
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_insert_after(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference) EINA_ARG_NONNULL(2, 3);

/**
 * @brief Remove all child objects from a box object, unparenting them again.
 *
 * This has the same effect of calling evas_object_box_remove on each of @c o's
 * child objects, in sequence. If, and only if, all those calls succeed, so
 * does this one.
 *
 * @param[in] obj The object.
 * @param[in] clear If @c true, it will delete just removed children.
 *
 * @return @c true on success, @c false otherwise.
 *
 * @ingroup Evas_Box
 */
EOAPI Eina_Bool evas_obj_box_remove_all(Eo *obj, Eina_Bool clear);

/**
 * @brief Get an iterator to walk the list of children of a given box object.
 *
 * @note Do not remove or delete objects while walking the list.
 *
 * @param[in] obj The object.
 *
 * @return An iterator on @c o's child objects, on success, or @c null, on
 * errors.
 *
 * @ingroup Evas_Box
 */
EOAPI Eina_Iterator *evas_obj_box_iterator_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;

/**
 * @brief Add a new box as a child of a given smart object.
 *
 * This is a helper function that has the same effect of putting a new box
 * object into @c parent by use of evas_object_smart_member_add.
 *
 * @param[in] obj The object.
 *
 * @return @c null on error, a pointer to a new box object on success.
 *
 * @ingroup Evas_Box
 */
EOAPI Efl_Canvas_Object *evas_obj_box_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;

/**
 * @brief Append a new child object to the given box object o.
 *
 * On success, the $"child,added" smart event will take place.
 *
 * @note The actual placing of the item relative to @c o's area will depend on
 * the layout set to it. For example, on horizontal layouts an item in the end
 * of the box's list of children will appear on its right.
 *
 * @note This call will trigger the box's _Evas_Object_Box_Api.append smart
 * function.
 *
 * @param[in] obj The object.
 * @param[in] child A child Evas object to be made a member of @c o.
 *
 * @return A box option bound to the recently added box item or @c null, on
 * errors.
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_append(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);

/**
 * @brief Get the numerical identifier of the property of the child elements of
 * the box o which have name as name string
 *
 * @note This call won't do anything for a canonical Evas box. Only users which
 * have subclassed it, setting custom box items options (see
 * #Evas_Object_Box_Option) on it, would benefit from this function. They'd
 * have to implement it and set it to be the
 * _Evas_Object_Box_Api.property_id_get smart class function of the box, which
 * is originally set to @c null.
 *
 * @param[in] obj The object.
 * @param[in] name The name string of the option being searched, for its ID.
 *
 * @return The numerical ID of the given property or $-1, on errors.
 *
 * @ingroup Evas_Box
 */
EOAPI int evas_obj_box_option_property_id_get(const Eo *obj, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2);

/**
 * @brief Prepend a new child object to the given box object o.
 *
 * On success, the $"child,added" smart event will take place.
 *
 * @note The actual placing of the item relative to @c o's area will depend on
 * the layout set to it. For example, on horizontal layouts an item in the
 * beginning of the box's list of children will appear on its left.
 *
 * @note This call will trigger the box's _Evas_Object_Box_Api.prepend smart
 * function.
 *
 * @param[in] obj The object.
 * @param[in] child A child Evas object to be made a member of @c o.
 *
 * @return A box option bound to the recently added box item or @c null, on
 * errors.
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_prepend(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);

/**
 * @brief Get an accessor (a structure providing random items access) to the
 * list of children of a given box object.
 *
 * @note Do not remove or delete objects while walking the list.
 *
 * @param[in] obj The object.
 *
 * @return An accessor on @c o's child objects, on success, or @c null, on
 * errors.
 *
 * @ingroup Evas_Box
 */
EOAPI Eina_Accessor *evas_obj_box_accessor_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;

/**
 * @brief No description supplied by the EAPI.
 *
 * @param[in] obj The object.
 * @param[in] child Child object to be appended
 *
 * @return Box option
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_internal_append(Eo *obj, Efl_Canvas_Object *child);

/**
 * @brief Set a property value (by its given numerical identifier), on a given
 * box child element -- by a variable argument list
 *
 * This is a variable argument list variant of the
 * evas_object_box_option_property_set. See its documentation for more details.
 *
 * @param[in] obj The object.
 * @param[in] opt The box option structure bound to the child box element to
 * set a property on.
 * @param[in] property The numerical ID of the given property.
 * @param[in] args The variable argument list implementing the value to be set
 * for this property. It must be of the same type the user has defined for it.
 *
 * @return @c true on success, @c false on failure.
 *
 * @ingroup Evas_Box
 */
EOAPI Eina_Bool evas_obj_box_option_property_vset(Eo *obj, Evas_Object_Box_Option *opt, int property, va_list *args) EINA_ARG_NONNULL(2);

/**
 * @brief No description supplied by the EAPI.
 *
 * @param[in] obj The object.
 * @param[in] pos Position of object to be removed
 *
 * @return Canvas object
 *
 * @ingroup Evas_Box
 */
EOAPI Efl_Canvas_Object *evas_obj_box_internal_remove_at(Eo *obj, unsigned int pos);

/**
 * @brief Remove an object, bound to a given position in a box object,
 * unparenting it again.
 *
 * On removal, you'll get an unparented object again, just as it was before you
 * inserted it in the box. The @c option_free box smart callback will be called
 * automatically for you and, also, the $"child,removed" smart event will take
 * place.
 *
 * @note This function will fail if the given position is invalid, given @c o's
 * internal list of elements.
 *
 * @note This call will trigger the box's _Evas_Object_Box_Api.remove_at smart
 * function.
 *
 * @param[in] obj The object.
 * @param[in] pos The numeric position (starting from $0) of the child object
 * to be removed.
 *
 * @return @c true on success, @c false on failure.
 *
 * @ingroup Evas_Box
 */
EOAPI Eina_Bool evas_obj_box_remove_at(Eo *obj, unsigned int pos);

/**
 * @brief Get a property's value (by its given numerical identifier), on a
 * given box child element -- by a variable argument list
 *
 * This is a variable argument list variant of the
 * evas_object_box_option_property_get. See its documentation for more details.
 *
 * @param[in] obj The object.
 * @param[in] opt The box option structure bound to the child box element to
 * get a property from.
 * @param[in] property The numerical ID of the given property.
 * @param[in] args The variable argument list with pointers to where to store
 * the values of this property. They must point to variables of the same type
 * the user has defined for them.
 *
 * @return @c true on success, @c false on failure.
 *
 * @ingroup Evas_Box
 */
EOAPI Eina_Bool evas_obj_box_option_property_vget(const Eo *obj, Evas_Object_Box_Option *opt, int property, va_list *args) EINA_ARG_NONNULL(2);

/**
 * @brief No description supplied by the EAPI.
 *
 * @param[in] obj The object.
 * @param[in] child Child object to be inserted
 * @param[in] pos Position where the object will be inserted
 *
 * @return Box option
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_internal_insert_at(Eo *obj, Efl_Canvas_Object *child, unsigned int pos);

/**
 * @brief Insert a new child object before another existing one, in a given box
 * object o.
 *
 * On success, the $"child,added" smart event will take place.
 *
 * @note This function will fail if @c reference is not a member of @c o.
 *
 * @note The actual placing of the item relative to @c o's area will depend on
 * the layout set to it.
 *
 * @note This call will trigger the box's _Evas_Object_Box_Api.insert_before
 * smart function.
 *
 * @param[in] obj The object.
 * @param[in] child A child Evas object to be made a member of @c o.
 * @param[in] reference The child object to place this new one before.
 *
 * @return A box option bound to the recently added box item or @c null, on
 * errors.
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_insert_before(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference) EINA_ARG_NONNULL(2, 3);

/**
 * @brief Get the name of the property of the child elements of the box o which
 * have id as identifier
 *
 * @note This call won't do anything for a canonical Evas box. Only users which
 * have subclassed it, setting custom box items options (see
 * #Evas_Object_Box_Option) on it, would benefit from this function. They'd
 * have to implement it and set it to be the
 * _Evas_Object_Box_Api.property_name_get smart class function of the box,
 * which is originally set to @c null.
 *
 * @param[in] obj The object.
 * @param[in] property The numerical identifier of the option being searched,
 * for its name.
 *
 * @return The name of the given property or @c null, on errors.
 *
 * @ingroup Evas_Box
 */
EOAPI const char *evas_obj_box_option_property_name_get(const Eo *obj, int property) EINA_WARN_UNUSED_RESULT;

/**
 * @brief No description supplied by the EAPI.
 *
 * @param[in] obj The object.
 * @param[in] child Object to be inserted
 * @param[in] reference Reference where the object will be inserted
 *
 * @return Box option
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_internal_insert_before(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);

/**
 * @brief Layout function which sets the box o to a homogeneous horizontal box
 *
 * In a homogeneous horizontal box, its width is divided equally between the
 * contained objects. The box's overall behavior is controlled by its
 * padding/alignment properties, which are set by the
 * evas_object_box_{h,v}_{align,padding}_set family of functions.  The size
 * hints the elements in the box -- set by the
 * evas_object_size_hint_{align,padding,weight}_set functions -- also control
 * the way this function works.
 *
 * Box's properties: @c align_h has no influence on the box for this layout.
 * @c padding_h tells the box to draw empty spaces of that size, in pixels,
 * between the (equal) child objects' cells. The @c align_v and @c padding_v
 * properties of the box don't contribute to its behaviour when this layout is
 * chosen.
 *
 * Child element's properties: @c padding_l and @c padding_r sum up to the
 * required width of the child element. The @c align_x property tells the
 * relative position of this overall child width in its allocated cell ($0.0 to
 * extreme left, $1.0 to extreme right). A value of $-1.0 to @c align_x makes
 * the box try to resize this child element to the exact width of its cell
 * (respecting the minimum and maximum size hints on the child's width and
 * accounting for its horizontal padding hints). The child's @c padding_t,
 * @c padding_b and @c align_y properties apply for padding/alignment relative
 * to the overall height of the box. A value of $-1.0 to @c align_y makes the
 * box try to resize this child element to the exact height of its parent
 * (respecting the maximum size hint on the child's height).
 *
 * @param[in] obj The object.
 * @param[in] priv Private data pointer
 * @param[in] data Data pointer
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_layout_homogeneous_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);

/**
 * @brief No description supplied by the EAPI.
 *
 * @param[in] obj The object.
 * @param[in] child New box object
 *
 * @return Box option
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_internal_option_new(Eo *obj, Efl_Canvas_Object *child);

/**
 * @brief Layout function which sets the box o to a maximum size, homogeneous
 * vertical box
 *
 * This function behaves analogously to
 * evas_object_box_layout_homogeneous_max_size_horizontal. The description of
 * its behaviour can be derived from that function's documentation.
 *
 * @param[in] obj The object.
 * @param[in] priv Private data pointer
 * @param[in] data Data pointer
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_layout_homogeneous_max_size_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);

/**
 * @brief No description supplied by the EAPI.
 *
 * @param[in] obj The object.
 * @param[in] child Object to be inserted
 * @param[in] reference Reference where the object will be inserted
 *
 * @return Box option
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_internal_insert_after(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);

/**
 * @brief Insert a new child object at a given position, in a given box object
 * @c o.
 *
 * On success, the $"child,added" smart event will take place.
 *
 * @note This function will fail if the given position is invalid, given @c o's
 * internal list of elements.
 *
 * @note The actual placing of the item relative to @c o's area will depend on
 * the layout set to it.
 *
 * @note This call will trigger the box's _Evas_Object_Box_Api.insert_at smart
 * function.
 *
 * @param[in] obj The object.
 * @param[in] child A child Evas object to be made a member of @c o.
 * @param[in] pos The numeric position (starting from $0) to place the new
 * child object at.
 *
 * @return A box option bound to the recently added box item or @c null, on
 * errors.
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_insert_at(Eo *obj, Efl_Canvas_Object *child, unsigned int pos) EINA_ARG_NONNULL(2);

/**
 * @brief No description supplied by the EAPI.
 *
 * @param[in] obj The object.
 * @param[in] child Object to be prepended
 *
 * @return Box option
 *
 * @ingroup Evas_Box
 */
EOAPI Evas_Object_Box_Option *evas_obj_box_internal_prepend(Eo *obj, Efl_Canvas_Object *child);

/**
 * @brief Remove a given object from a box object, unparenting it again.
 *
 * On removal, you'll get an unparented object again, just as it was before you
 * inserted it in the box. The _Evas_Object_Box_Api.option_free box smart
 * callback will be called automatically for you and, also, the
 * $"child,removed" smart event will take place.
 *
 * @note This call will trigger the box's _Evas_Object_Box_Api.remove smart
 * function.
 *
 * @param[in] obj The object.
 * @param[in] child The handle to the child object to be removed.
 *
 * @return @c true on success, @c false otherwise.
 *
 * @ingroup Evas_Box
 */
EOAPI Eina_Bool evas_obj_box_remove(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);

/**
 * @brief Layout function which sets the box o to a stacking box
 *
 * In a stacking box, all children will be given the same size -- the box's own
 * size -- and they will be stacked one above the other, so that the first
 * object in @c o's internal list of child elements will be the bottommost in
 * the stack.
 *
 * Box's properties: No box properties are used.
 *
 * Child element's properties: @c padding_l and @c padding_r sum up to the
 * required width of the child element. The @c align_x property tells the
 * relative position of this overall child width in its allocated cell ($0.0 to
 * extreme left, $1.0 to extreme right). A value of $-1.0 to @c align_x makes
 * the box try to resize this child element to the exact width of its cell
 * (respecting the min and max hints on the child's width and accounting for
 * its horizontal padding properties). The same applies to the vertical axis.
 *
 * @param[in] obj The object.
 * @param[in] priv Private data pointer
 * @param[in] data Data pointer
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_layout_stack(Eo *obj, Evas_Object_Box_Data *priv, void *data);

/**
 * @brief Layout function which sets the box o to a homogeneous vertical box.
 *
 * This function behaves analogously to
 * evas_object_box_layout_homogeneous_horizontal.  The description of its
 * behaviour can be derived from that function's documentation.
 *
 * @param[in] obj The object.
 * @param[in] priv Private data pointer
 * @param[in] data Data pointer
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_layout_homogeneous_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);

/**
 * @brief Layout function which sets the box o to a flow horizontal box.
 *
 * In a flow horizontal box, the box's child elements are placed in rows (think
 * of text as an analogy). A row has as many elements as can fit into the box's
 * width. The box's overall behavior is controlled by its properties, which are
 * set by the evas_object_box_{h,v}_{align,padding}_set family of functions.
 *  The size hints of the elements in the box -- set by the
 * evas_object_size_hint_{align,padding,weight}_set functions -- also control
 * the way this function works.
 *
 * Box's properties: @c padding_h tells the box to draw empty spaces of that
 * size, in pixels, between the child objects' cells. @c align_h dictates the
 * horizontal alignment of the rows ($0.0 to left align them, $1.0 to right
 * align). A value of $-1.0 to @c align_h lets the rows justified horizontally.
 * @c align_v controls the vertical alignment of the entire set of rows ($0.0
 * to top, $1.0 to bottom). A value of $-1.0 to @c align_v makes the box to
 * justify the rows vertically. The padding between them in this case is
 * corrected so that the first row touches the top border and the last one
 * touches the bottom border (even if they must overlap). @c padding_v has no
 * influence on the layout.
 *
 * Child element's properties: @c padding_l and @c padding_r sum up to the
 * required width of the child element. The @c align_x property has no
 * influence on the layout. The child's @c padding_t and @c padding_b sum up to
 * the required height of the child element and is the only means (besides row
 * justifying) of setting space between rows. Note, however, that @c align_y
 * dictates positioning relative to the largest height required by a child
 * object in the actual row.
 *
 * @param[in] obj The object.
 * @param[in] priv Private data pointer
 * @param[in] data Data pointer
 *
 * @ingroup Evas_Box
 */
EOAPI void evas_obj_box_layout_flow_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);

/**
 * @brief Returns the number of items in the box.
 *
 * @param[in] obj The object.
 *
 * @return Number of items in the box
 *
 * @ingroup Evas_Box
 */
EOAPI int evas_obj_box_count(Eo *obj);

EWAPI extern const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_ADDED;

/** Called when a child object was added to the box
 * @return Evas_Object_Box_Option *
 *
 * @ingroup Evas_Box
 */
#define EVAS_BOX_EVENT_CHILD_ADDED (&(_EVAS_BOX_EVENT_CHILD_ADDED))

EWAPI extern const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_REMOVED;

/** Called when a child object was removed from the box
 * @return Efl_Canvas_Object *
 *
 * @ingroup Evas_Box
 */
#define EVAS_BOX_EVENT_CHILD_REMOVED (&(_EVAS_BOX_EVENT_CHILD_REMOVED))

#endif