summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_layout.eo
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-16 15:43:07 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-17 09:03:56 +0200
commitcc7a670a7dc609572bea919616fa0d4b24863934 (patch)
treea760de1ef0e31a60ea25d9354cbc80e98e367ed9 /legacy/elementary/src/lib/elm_layout.eo
parentaa318f30790976f2cfdcf7d9523b03c42ca107a2 (diff)
Eolian: Integration of Layout
Diffstat (limited to 'legacy/elementary/src/lib/elm_layout.eo')
-rw-r--r--legacy/elementary/src/lib/elm_layout.eo678
1 files changed, 678 insertions, 0 deletions
diff --git a/legacy/elementary/src/lib/elm_layout.eo b/legacy/elementary/src/lib/elm_layout.eo
new file mode 100644
index 0000000000..803cbff9f8
--- /dev/null
+++ b/legacy/elementary/src/lib/elm_layout.eo
@@ -0,0 +1,678 @@
1class Elm_Layout (Elm_Container)
2{
3 eo_prefix: elm_obj_layout;
4 data: Elm_Layout_Smart_Data;
5 properties {
6 edje_object_can_access {
7 set {
8 /*@
9 Set accessibility to all texblock(text) parts in the layout object
10
11 @return @c EINA_TRUE on success or @c EINA_FALSE on failure. If @p obj is not
12 a proper layout object, @c EINA_FALSE is returned.
13
14 @since 1.7
15
16 @ingroup Layout */
17 return Eina_Bool;
18 }
19 get {
20 /*@
21 Get accessibility state of texblock(text) parts in the layout object
22
23 @return @c EINA_TRUE, if all textblock(text) parts in the layout can be accessible
24 @c EINA_FALSET if those cannot be accessible. If @p obj is not a proper layout
25 object, @c EINA_FALSE is returned.
26
27 @see elm_layout_edje_object_access_set()
28
29 @since 1.7
30
31 @ingroup Layout */
32 }
33 values {
34 Eina_Bool can_access; /*@ makes all textblock(text) parts in the layout @p obj possible
35 to have accessibility. @c EINA_TRUE means textblock(text) parts can be accessible */
36 }
37 }
38 file {
39 set {
40 /*@
41 Set the file that will be used as layout
42
43 @return (1 = success, 0 = error)
44
45 @ingroup Layout */
46 return Eina_Bool;
47 }
48 values {
49 const char *file; /*@ The path to file (edj) that will be used as layout */
50 const char *group; /*@ The group that the layout belongs in edje file */
51 }
52 }
53 theme {
54 set {
55 /*@
56 Set the edje group from the elementary theme that will be used as layout
57
58 @return (1 = success, 0 = error)
59
60 Note that @a style will be the new style of @a obj too, as in an
61 elm_object_style_set() call.
62
63 @ingroup Layout */
64 return Eina_Bool;
65 }
66 values {
67 const char *klass; /*@ the class of the group */
68 const char *group; /*@ the group */
69 const char *style; /*@ the style to used */
70 }
71 }
72 text_aliases {
73 get {
74 /*@ No description supplied by the EAPI. */
75 legacy null;
76 }
77 values {
78 const Elm_Layout_Part_Alias_Description *aliases;
79 }
80 }
81 content_aliases {
82 get {
83 /*@ No description supplied by the EAPI. */
84 legacy null;
85 }
86 values {
87 const Elm_Layout_Part_Alias_Description *aliases;
88 }
89 }
90 edje {
91 get {
92 /*@
93 Get the edje layout
94
95 @return A Evas_Object with the edje layout settings loaded
96 with function elm_layout_file_set
97
98 This returns the edje object. It is not expected to be used to then
99 swallow objects via edje_object_part_swallow() for example. Use
100 elm_layout_content_set() instead so child object handling and sizing is
101 done properly.
102
103 @note This function should only be used if you really need to call some
104 low level Edje function on this edje object. All the common stuff (setting
105 text, emitting signals, hooking callbacks to signals, etc.) can be done
106 with proper elementary functions.
107
108 @see elm_layout_signal_callback_add()
109 @see elm_layout_signal_emit()
110 @see elm_layout_text_set()
111 @see elm_layout_content_set()
112 @see elm_layout_box_append()
113 @see elm_layout_table_pack()
114 @see elm_layout_data_get()
115
116 @ingroup Layout */
117 return Evas_Object *;
118 }
119 }
120 }
121 methods {
122 box_remove_all {
123 /*@
124 Remove all children of the given part box.
125
126 @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
127
128 The objects will be removed from the box part and their lifetime will
129 not be handled by the layout anymore. This is equivalent to
130 elm_layout_box_remove() for all box children.
131
132 @see elm_layout_box_append()
133 @see elm_layout_box_remove()
134
135 @ingroup Layout */
136
137 return Eina_Bool;
138 params {
139 @in const char *part; /*@ The box part name to remove child. */
140 @in Eina_Bool clear; /*@ If EINA_TRUE, then all objects will be deleted as
141 well, otherwise they will just be removed and will be
142 dangling on the canvas. */
143 }
144 }
145 part_cursor_engine_only_set {
146 /*@
147 Sets if the cursor set should be searched on the theme or should use
148 the provided by the engine, only.
149
150 @note before you set if should look on theme you should define a
151 cursor with elm_layout_part_cursor_set(). By default it will only
152 look for cursors provided by the engine.
153
154 @return EINA_TRUE on success or EINA_FALSE on failure, that may be
155 part not exists or it did not had a cursor set.
156
157 @ingroup Layout */
158
159 return Eina_Bool;
160 params {
161 @in const char *part_name; /*@ a part from loaded edje group. */
162 @in Eina_Bool engine_only; /*@ if cursors should be just provided by the engine (EINA_TRUE)
163 or should also search on widget's theme as well (EINA_FALSE) */
164 }
165 }
166 part_cursor_engine_only_get {
167 /*@
168 Get a specific cursor engine_only for an edje part.
169
170 @return whenever the cursor is just provided by engine or also from theme.
171
172 @ingroup Layout */
173
174 const;
175 return Eina_Bool;
176 params {
177 @in const char *part_name; /*@ a part from loaded edje group. */
178 }
179 }
180 table_unpack {
181 /*@
182 Unpack (remove) a child of the given part table.
183
184 @return The object that was being used, or NULL if not found.
185
186 The object will be unpacked from the table part and its lifetime
187 will not be handled by the layout anymore. This is equivalent to
188 elm_layout_content_unset() for table.
189
190 @see elm_layout_table_pack()
191 @see elm_layout_table_clear()
192
193 @ingroup Layout */
194
195 return Evas_Object *;
196 params {
197 @in const char *part; /*@ The table part name to remove child. */
198 @in Evas_Object *child; /*@ The object to remove from table. */
199 }
200 }
201 freeze {
202 /*@
203 @brief Freezes the Elementary layout object.
204
205 @return The frozen state or 0 on Error
206
207 This function puts all changes on hold. Successive freezes will
208 nest, requiring an equal number of thaws.
209
210 @see elm_layout_thaw() */
211
212 return int;
213 }
214 theme_enable {
215 /*@ No description supplied by the EAPI. */
216 return Eina_Bool;
217 }
218 sizing_eval {
219 /*@
220 Eval sizing
221
222 Manually forces a sizing re-evaluation. This is useful when the minimum
223 size required by the edje theme of this layout has changed. The change on
224 the minimum size required by the edje theme is not immediately reported to
225 the elementary layout, so one needs to call this function in order to tell
226 the widget (layout) that it needs to reevaluate its own size.
227
228 The minimum size of the theme is calculated based on minimum size of
229 parts, the size of elements inside containers like box and table, etc. All
230 of this can change due to state changes, and that's when this function
231 should be called.
232
233 Also note that a standard signal of "size,eval" "elm" emitted from the
234 edje object will cause this to happen too.
235
236 @ingroup Layout */
237
238 }
239 box_remove {
240 /*@
241 Remove a child of the given part box.
242
243 @return The object that was being used, or NULL if not found.
244
245 The object will be removed from the box part and its lifetime will
246 not be handled by the layout anymore. This is equivalent to
247 elm_layout_content_unset() for box.
248
249 @see elm_layout_box_append()
250 @see elm_layout_box_remove_all()
251
252 @ingroup Layout */
253
254 return Evas_Object *;
255 params {
256 @in const char *part; /*@ The box part name to remove child. */
257 @in Evas_Object *child; /*@ The object to remove from box. */
258 }
259 }
260 sizing_restricted_eval {
261 /*@
262 Request sizing reevaluation, restricted to current width and/or height
263
264 Useful mostly when there are TEXTBLOCK parts defining the height of the
265 object and nothing else restricting it to a minimum width. Calling this
266 function will restrict the minimum size in the Edje calculation to whatever
267 size it the layout has at the moment.
268
269 @since 1.8
270
271 @ingroup Layout */
272
273 params {
274 @in Eina_Bool width; /*@ Restrict minimum size to the current width */
275 @in Eina_Bool height; /*@ Restrict minimum size ot the current height */
276 }
277 }
278 part_cursor_style_set {
279 /*@
280 Sets a specific cursor style for an edje part.
281
282 @return EINA_TRUE on success or EINA_FALSE on failure, that may be
283 part not exists or it did not had a cursor set.
284
285 @ingroup Layout */
286
287 return Eina_Bool;
288 params {
289 @in const char *part_name; /*@ a part from loaded edje group. */
290 @in const char *style; /*@ the theme style to use (default, transparent, ...) */
291 }
292 }
293 part_cursor_style_get {
294 /*@
295 Get a specific cursor style for an edje part.
296
297 @return the theme style in use, defaults to "default". If the
298 object does not have a cursor set, then NULL is returned.
299
300 @ingroup Layout */
301
302 const;
303 return const char *;
304 params {
305 @in const char *part_name; /*@ a part from loaded edje group. */
306 }
307 }
308 text_set {
309 /*@
310 Set the text of the given part
311
312 @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
313
314 @ingroup Layout */
315
316 return Eina_Bool;
317 params {
318 @in const char *part; /*@ The TEXT part where to set the text */
319 @in const char *text; /*@ The text to set */
320 }
321 }
322 text_get {
323 /*@
324 Get the text set in the given part
325
326 @return The text set in @p part
327
328 @ingroup Layout */
329
330 const;
331 return const char *;
332 params {
333 @in const char *part; /*@ The TEXT part to retrieve the text off */
334 }
335 }
336 signal_callback_add {
337 /*@
338 Add a callback for a (Edje) signal emitted by a layout widget's
339 underlying Edje object.
340
341 This function connects a callback function to a signal emitted by
342 the underlying Edje object of @a obj. Globs are accepted in either
343 the emission or source strings (see @c
344 edje_object_signal_callback_add()).
345
346 @ingroup Layout */
347
348 params {
349 @in const char *emission; /*@ The signal's name string */
350 @in const char *source; /*@ The signal's source string */
351 @in Edje_Signal_Cb func; /*@ The callback function to be executed when the signal is
352 emitted. */
353 @in void *data; /*@ A pointer to data to pass in to the callback function. */
354 }
355 }
356 part_cursor_set {
357 /*@
358 Sets a specific cursor for an edje part.
359
360 @return EINA_TRUE on success or EINA_FALSE on failure, that may be
361 part not exists or it has "mouse_events: 0".
362
363 @ingroup Layout */
364
365 return Eina_Bool;
366 params {
367 @in const char *part_name; /*@ a part from loaded edje group. */
368 @in const char *cursor; /*@ cursor name to use, see Elementary_Cursor.h */
369 }
370 }
371 part_cursor_get {
372 /*@
373 Get the cursor to be shown when mouse is over an edje part
374
375 @return the cursor name.
376
377 @ingroup Layout */
378
379 const;
380 return const char *;
381 params {
382 @in const char *part_name; /*@ a part from loaded edje group. */
383 }
384 }
385 box_insert_before {
386 /*@
387 Insert child to layout box part before a reference object.
388
389 @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
390
391 Once the object is inserted, it will become child of the layout. Its
392 lifetime will be bound to the layout, whenever the layout dies the child
393 will be deleted automatically. One should use elm_layout_box_remove() to
394 make this layout forget about the object.
395
396 @see elm_layout_box_append()
397 @see elm_layout_box_prepend()
398 @see elm_layout_box_insert_before()
399 @see elm_layout_box_remove()
400
401 @ingroup Layout */
402
403 return Eina_Bool;
404 params {
405 @in const char *part; /*@ the box part to insert. */
406 @in Evas_Object *child; /*@ the child object to insert into box. */
407 @in const Evas_Object *reference; /*@ another reference object to insert before in box. */
408 }
409 }
410 box_insert_at {
411 /*@
412 Insert child to layout box part at a given position.
413
414 @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
415
416 Once the object is inserted, it will become child of the layout. Its
417 lifetime will be bound to the layout, whenever the layout dies the child
418 will be deleted automatically. One should use elm_layout_box_remove() to
419 make this layout forget about the object.
420
421 @see elm_layout_box_append()
422 @see elm_layout_box_prepend()
423 @see elm_layout_box_insert_before()
424 @see elm_layout_box_remove()
425
426 @ingroup Layout */
427
428 return Eina_Bool;
429 params {
430 @in const char *part; /*@ the box part to insert. */
431 @in Evas_Object *child; /*@ the child object to insert into box. */
432 @in unsigned int pos; /*@ the numeric position >=0 to insert the child. */
433 }
434 }
435 sub_object_add_enable {
436 /*@ No description supplied by the EAPI. */
437 return Eina_Bool;
438 }
439 data_get {
440 /*@
441 Get the edje data from the given layout
442
443 @return The edje data string
444
445 This function fetches data specified inside the edje theme of this layout.
446 This function return NULL if data is not found.
447
448 In EDC this comes from a data block within the group block that @p
449 obj was loaded from. E.g.
450
451 @code
452 collections {
453 group {
454 name: "a_group";
455 data {
456 item: "key1" "value1";
457 item: "key2" "value2";
458 }
459 }
460 }
461 @endcode
462
463 @ingroup Layout */
464
465 const;
466 return const char *;
467 params {
468 @in const char *key; /*@ The data key */
469 }
470 }
471 box_append {
472 /*@
473 Append child to layout box part.
474
475 @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
476
477 Once the object is appended, it will become child of the layout. Its
478 lifetime will be bound to the layout, whenever the layout dies the child
479 will be deleted automatically. One should use elm_layout_box_remove() to
480 make this layout forget about the object.
481
482 @see elm_layout_box_prepend()
483 @see elm_layout_box_insert_before()
484 @see elm_layout_box_insert_at()
485 @see elm_layout_box_remove()
486
487 @ingroup Layout */
488
489 return Eina_Bool;
490 params {
491 @in const char *part; /*@ the box part to which the object will be appended. */
492 @in Evas_Object *child; /*@ the child object to append to box. */
493 }
494 }
495 signal_callback_del {
496 /*@
497 Remove a signal-triggered callback from a given layout widget.
498
499 @return The data pointer of the signal callback (passed on
500 elm_layout_signal_callback_add()) or @c NULL, on errors.
501
502 This function removes the @b last callback attached to a signal
503 emitted by the undelying Edje object of @a obj, with parameters @a
504 emission, @a source and @c func matching exactly those passed to a
505 previous call to elm_layout_signal_callback_add(). The data pointer
506 that was passed to this call will be returned.
507
508 @ingroup Layout */
509
510 return void *;
511 params {
512 @in const char *emission; /*@ The signal's name string */
513 @in const char *source; /*@ The signal's source string */
514 @in Edje_Signal_Cb func; /*@ The callback function being executed when the signal
515 was emitted. */
516 }
517 }
518 thaw {
519 /*@
520 @brief Thaws the Elementary object.
521
522 @return The frozen state or 0 if the object is not frozen or on error.
523
524 This function thaws the given Edje object and the Elementary sizing calc.
525
526 @note: If sucessives freezes were done, an equal number of
527 thaws will be required.
528
529 @see elm_layout_freeze() */
530
531 return int;
532 }
533 box_prepend {
534 /*@
535 Prepend child to layout box part.
536
537 @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
538
539 Once the object is prepended, it will become child of the layout. Its
540 lifetime will be bound to the layout, whenever the layout dies the child
541 will be deleted automatically. One should use elm_layout_box_remove() to
542 make this layout forget about the object.
543
544 @see elm_layout_box_append()
545 @see elm_layout_box_insert_before()
546 @see elm_layout_box_insert_at()
547 @see elm_layout_box_remove()
548
549 @ingroup Layout */
550
551 return Eina_Bool;
552 params {
553 @in const char *part; /*@ the box part to prepend. */
554 @in Evas_Object *child; /*@ the child object to prepend to box. */
555 }
556 }
557 signal_emit {
558 /*@
559 Send a (Edje) signal to a given layout widget's underlying Edje
560 object.
561
562 This function sends a signal to the underlying Edje object of @a
563 obj. An Edje program on that Edje object's definition can respond
564 to a signal by specifying matching 'signal' and 'source' fields.
565
566 @ingroup Layout */
567
568 params {
569 @in const char *emission; /*@ The signal's name string */
570 @in const char *source; /*@ The signal's source string */
571 }
572 }
573 table_pack {
574 /*@
575 Insert child to layout table part.
576
577 @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
578
579 Once the object is inserted, it will become child of the table. Its
580 lifetime will be bound to the layout, and whenever the layout dies the
581 child will be deleted automatically. One should use
582 elm_layout_table_unpack() to make this layout forget about the object.
583
584 If @p colspan or @p rowspan are bigger than 1, that object will occupy
585 more space than a single cell. For instance, the following code:
586 @code
587 elm_layout_table_pack(layout, "table_part", child, 0, 1, 3, 1);
588 @endcode
589
590 Would result in an object being added like the following picture:
591
592 @image html layout_colspan.png
593 @image latex layout_colspan.eps width=\textwidth
594
595 @see elm_layout_table_unpack()
596 @see elm_layout_table_clear()
597
598 @ingroup Layout */
599
600 return Eina_Bool;
601 params {
602 @in const char *part; /*@ the box part to pack child. */
603 @in Evas_Object *child; /*@ the child object to pack into table. */
604 @in unsigned short col; /*@ the column to which the child should be added. (>= 0) */
605 @in unsigned short row; /*@ the row to which the child should be added. (>= 0) */
606 @in unsigned short colspan; /*@ how many columns should be used to store this object. (>=
607 1) */
608 @in unsigned short rowspan; /*@ how many rows should be used to store this object. (>= 1) */
609 }
610 }
611 part_cursor_unset {
612 /*@
613 Unsets a cursor previously set with elm_layout_part_cursor_set().
614
615 @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
616
617 @ingroup Layout */
618
619 return Eina_Bool;
620 params {
621 @in const char *part_name; /*@ a part from loaded edje group, that had a cursor set
622 with elm_layout_part_cursor_set(). */
623 }
624 }
625 table_clear {
626 /*@
627 Remove all the child objects of the given part table.
628
629 @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
630
631 The objects will be removed from the table part and their lifetime will
632 not be handled by the layout anymore. This is equivalent to
633 elm_layout_table_unpack() for all table children.
634
635 @see elm_layout_table_pack()
636 @see elm_layout_table_unpack()
637
638 @ingroup Layout */
639
640 return Eina_Bool;
641 params {
642 @in const char *part; /*@ The table part name to remove child. */
643 @in Eina_Bool clear; /*@ If EINA_TRUE, then all objects will be deleted as
644 well, otherwise they will just be removed and will be
645 dangling on the canvas. */
646 }
647 }
648 }
649 implements {
650 class::constructor;
651 Eo_Base::constructor;
652 Eo_Base::dbg_info_get;
653 Evas_Smart::del;
654 Evas_Smart::add;
655 Evas_Smart::calculate;
656 Elm_Widget::focus_direction;
657 Elm_Widget::sub_object_add;
658 Elm_Widget::theme_apply;
659 Elm_Widget::focus_direction_manager_is;
660 Elm_Widget::focus_next_manager_is;
661 Elm_Widget::focus_next;
662 Elm_Widget::disable;
663 Elm_Widget::sub_object_del;
664 Elm_Widget::on_focus;
665 Elm_Container::content_get;
666 Elm_Container::content_set;
667 Elm_Container::content_unset;
668 Elm_Container::content_swallow_list::get;
669 }
670 events {
671 theme,changed;
672 focused;
673 unfocused;
674 language,changed;
675 access,changed;
676 }
677
678}