summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_widget.eo
blob: 9406fafdda625c69bf5b18eb515f6ae6ed0569ec (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
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
import edje_types;
import elm_general;

/* FIXME: This shouldn't be here. */
type list_data_get_func_type: __undefined_type;
type region_hook_func_type: __undefined_type;

enum Elm.Activate
{
   [[ Used in 'Virtual' function @Elm.Widget.activate. ]]
   default = 0,
   up,
   down,
   right,
   left,
   back,
}

struct Elm.Tooltip;
struct Elm.Cursor;
struct @extern Elm.Theme;

abstract Elm.Widget (Evas.Object.Smart, Elm.Interface.Atspi_Accessible, Elm.Interface.Atspi_Component)
{
   eo_prefix: elm_obj_widget;
   data: Elm_Widget_Smart_Data;
   methods {
      @property focus {
         [[Whether an Elementary object has the focus or not.

           Note that when you set focus to this object, if it can handle focus,
           it will take the focus away from the one who had it previously and will,
           for now on, be the one receiving input events. Unsetting focus will remove
           the focus from this object, passing it back to the previous element in the
           focus chain list.

           Warning: Only visible object can get a focus. Call @Evas.Object.Smart.show
           before calling this API, if you want to give a focus to the evas object.]]
         set {
           [[$true set the focus to the object,
             $false unset the focus to the object.]]
         }
         get {
            [[Return $true if the object is focused,
              and $false if not (and on errors).]]
         }
         values {
            focus: bool;
         }
      }
      @property drag_lock_y {
         set {
         }
         get {
         }
         values {
            lock: bool;
         }
      }
      @property focus_highlight_style {
         [[Control the widget focus highlight style.]]
         set {
            return: bool; [[$true on success, $false otherwise.]]
         }
         get {
         }
         values {
            style: const(char)*; [[The name of the focus highlight style.]]
         }
      }
      @property tree_unfocusable {
         [[Make the elementary object and its children to be unfocusable (or focusable).
           If the tree is set as unfocusable, newest focused object which is not in
           this tree will get focus.
           This API can be helpful for an object to be deleted.
           When an object will be deleted soon, it and its children may not want to
           get focus (by focus reverting or by other focus controls).
           Then, just use this API before deleting.]]
         set {
         }
         get {
           [[Return $true, if the tree is unfocusable,
             $false otherwise (and on errors).]]
         }
         values {
            tree_unfocusable: bool; [[$true for unfocusable, $false for focusable.]]
         }
      }
      @property mirrored {
         [[Control the widget's mirrored mode.]]
         set {
         }
         get {
         }
         values {
            mirrored: bool;
         }
      }
      @property theme {
         set {
         }
         get {
         }
         values {
            th: Elm.Theme * @nullable;
         }
      }
      @property disabled {
         set {
         }
         get {
         }
         values {
            disabled: bool;
         }
      }
      @property highlight_ignore {
         set {
         }
         get {
         }
         values {
            ignore: bool;
         }
      }
      @property mirrored_automatic {
         [[Control the widget's mirrored mode setting.]]
         set {
         }
         get {
         }
         values {
            automatic: bool;
         }
      }
      @property orientation_mode_disabled {
         set {
         }
         get {
         }
         values {
            disabled: bool;
         }
      }
      @property style {
         set {
            return: bool;
         }
         get {
         }
         values {
            style: const(char)*;
         }
      }
      @property scale {
         set {
         }
         get {
         }
         values {
            scale: double;
         }
      }
      @property focus_custom_chain {
         [[A custom chain of objects to pass focus.

           Note: On focus cycle, only will be evaluated children of this container.]]
         set {
            [[This function overwrites any previous custom focus chain within
              the list of objects. The previous list will be deleted and this list
              will be managed by elementary. After it is set, don't modify it.]]
            values {
               objs: list<Evas.Object*>*; [[Chain of objects to pass focus]]
            }
         }
         get {
            values {
               objs: const(list<Evas.Object*>)*; [[Chain of objects]]
            }
         }
      }
      @property can_focus {
         [[The ability for an Elementary object to be focused.

           Unfocusable objects do nothing when programmatically
           focused, being the nearest focusable parent object the one
           really getting focus. Also, when they receive mouse input, they
           will get the event, but not take away the focus from where it
           was previously.

           Note: Objects which are meant to be interacted with by input
           events are created able to be focused, by default. All the
           others are not.]]
         set {
         }
         get {
            [[Return $true if the object is allowed to be focused,
              $false if not (and on errors).]]
         }
         values {
            can_focus: bool; [[$true if the object can be focused,
                               $false if not.]]
         }
      }
      @property highlight_in_theme {
         set {
         }
         get {
         }
         values {
            highlight: bool;
         }
      }
      @property widget_parent @protected {
         [[The internal widget parent]]
         set {
            legacy: elm_widget_parent_set; /* Needed because we don't do duplication removal for legacy names. */
         }
         get {
            legacy: elm_widget_parent_get; /* Needed because we don't do duplication removal for legacy names. */
         }
         values {
            parent: Evas.Object * @nullable;
         }
      }
      @property access_info {
         set {
         }
         get {
         }
         values {
            txt: const(char)* @nullable;
         }
      }
      @property drag_lock_x {
         set {
         }
         get {
         }
         values {
            lock: bool;
         }
      }
      @property access_highlight_in_theme {
         set {
         }
         get {
         }
         values {
            highlight: bool; [[highlight]]
         }
      }
      @property focus_region_show_mode {
         [[Control the focus_region_show mode.]]
         set {
         }
         get {
         }
         values {
            mode: Elm.Focus.Region.Show_Mode;
         }
      }
      @property parent_highlight {
         set {
         }
         values {
            highlighted: bool;
         }
      }
      @property theme_object {
         set {
            return: bool;
         }
         values {
            edj: Evas.Object *;
            wname: const(char)*;
            welement: const(char)*;
            wstyle: const(char)*;
         }
      }
      @property hover_object {
         set {
         }
         values {
            sobj: Evas.Object * @nullable;
         }
      }
      @property display_mode {
         set {
         }
         values {
            dispmode: Evas.Display_Mode;
         }
      }
      @property on_show_region_hook {
         set {
         }
         values {
            func: region_hook_func_type @nullable;
            data: void * @optional;
         }
      }
      @property domain_part_text_translatable {
         set {
         }
         values {
            part: const(char)*;
            domain: const(char)*;
            translatable: bool;
         }
      }
      @property orientation {
         set {
         }
         values {
            rotation: int;
         }
      }
      @property resize_object {
         set {
         }
         values {
            sobj: Evas.Object * @nullable;
            sub_obj: bool;
         }
      }
      @property domain_translatable_part_text {
         set {
         }
         values {
            part: const(char)*;
            domain: const(char)*;
            label: const(char)*;
         }
      }
      @property scrollable_children {
         get {
            [[Function to operate on a given widget's scrollabe children when necessary.

              Warning: free the returned list with eina_list_free().]]
            return: free(own(list<Evas.Object *> *), eina_list_free) @warn_unused;
         }
      }
      @property scroll_hold {
         get {
            return: int;
         }
      }
      @property drag_child_locked_y {
         get {
            return: int;
         }
      }
      @property item_loop_enabled {
         [[Control item loop feature.]]
         set {
         }
         get {
         }
         values {
            enable: bool;
         }
      }
      @property child_can_focus {
         get {
            return: bool;
         }
      }
      @property scroll_freeze {
         get {
            return: int;
         }
      }
      @property focus_region {
         get {
            return: bool;
         }
         values {
            x: Evas.Coord;
            y: Evas.Coord;
            w: Evas.Coord;
            h: Evas.Coord;
         }
      }
      @property top {
         get {
            return: Evas.Object *;
         }
      }
      @property focus_order {
         get {
            return: uint;
         }
      }
      @property drag_child_locked_x {
         get {
            return: int;
         }
      }
      @property can_focus_child_list {
         get {
            return: free(own(list<Evas.Object *> *), eina_list_free) @warn_unused;
         }
      }
      @property focused_item {
         get {
            [[Get the focused widget item.]]
            return: Elm.Widget.Item *;
         }
      }
      @property parents_bounce {
         get {
         }
         values {
            horiz: bool;
            vert: bool;
         }
      }
      @property parent_widget {
         get @virtual_pure {
            return: Evas.Object *;
            legacy: null;
         }
      }
      @property highlight {
         get {
            return: bool;
         }
      }
      @property focused_object {
         [[Current focused object in object tree.]]
         get {
            return: Evas.Object *; [[Current focused or $null, if there is no focused object.]]
         }
      }
      @property parent2 {
         set {
         }
         get {
         }
         values {
            parent: Evas.Object * @nullable;
         }
      }
      @property part_text {
         set {
         }
         get {
         }
         keys {
            part: const(char)*;
         }
         values {
            label: const(char)*;
         }
      }
      newest_focus_order_get @const {
         return: Evas.Object *;
         params {
            @out newest_focus_order: uint;
            @in can_focus_only: bool;
         }
      }
      scroll_hold_push {
      }
      cursor_add {
         params {
            @in cur: Elm.Cursor *;
         }
      }
      focus_next_object_set {
         [[Set the next object with specific focus direction.

           @since 1.8]]
         params {
            @in next: Evas.Object * @nullable; [[Focus next object]]
            @in dir: Elm.Focus_Direction; [[Focus direction]]
         }
      }
      focus_next_object_get @const {
         [[Get the next object with specific focus direction.

           @since 1.8]]
         return: Evas.Object *; [[Focus next object]]
         params {
            @in dir: Elm.Focus_Direction; [[Focus direction]]
         }
      }
      focus_next_item_set {
         [[Set the next object item with specific focus direction.

           @since 1.16]]
         params {
            @in next_item: Elm.Widget.Item * @nullable; [[Focus next object item]]
            @in dir: Elm.Focus_Direction; [[Focus direction]]
         }
      }
      focus_next_item_get @const {
         [[Get the next object item with specific focus direction.

           @since 1.16]]
         return: Elm.Widget.Item *; [[Focus next object item]]
         params {
            @in dir: Elm.Focus_Direction; [[Focus direction]]
         }
      }
      focus_tree_unfocusable_handle {
      }
      focus_custom_chain_prepend {
         [[Prepend object to custom focus chain.

           Note: If @"relative_child" equal to $null or not in custom chain,
           the object will be added in begin.

           Note: On focus cycle, only will be evaluated children of this container.]]
         params {
            @in child: Evas.Object *; [[The child to be added in custom chain.]]
            @in relative_child: Evas.Object * @optional; [[The relative object to position the child.]]
         }
      }
      part_text_translate {
         return: const(char)*;
         params {
            @in part: const(char)*;
            @in text: const(char)*;
         }
      }
      focus_highlight_geometry_get @const {
         [[Get the focus highlight geometry of widget.]]
         params {
            @out x: Evas.Coord;
            @out y: Evas.Coord;
            @out w: Evas.Coord;
            @out h: Evas.Coord;
         }
      }
      activate {
         [['Virtual' function to activate widget.]]
         params {
            @in act: Elm.Activate;
         }
         return: bool;
         legacy: null; /* the legacy API has not the same number of parameter to we don't generate it. */
      }
      sub_object_add {
         [['Virtual' function handling sub objects being added.]]
         return: bool;
         params {
            @in sobj: Evas.Object *;
         }
      }
      focus_direction_manager_is {
         [['Virtual' function which checks if handling of passing focus to sub-objects in given direction is supported by widget.]]
         return: bool;
         legacy: null;
      }
      event {
         [['Virtual' function handling input events on the widget.]]
         params {
            @in source: Evas.Object *;
            @in type: Evas.Callback_Type;
            @in event_info: void *;
         }
         return: bool;
      }
      event_callback_add {
         params {
            @in func: Elm_Event_Cb;
            @in data: const(void)* @optional;
         }
      }
      access {
         [['Virtual' function on the widget being set access.]]
         params {
            @in acs: bool;
         }
         legacy: null;
      }
      cursor_del {
         params {
            @in cur: Elm.Cursor *;
         }
      }
      event_callback_del {
         return: void *;
         params {
            @in func: Elm_Event_Cb;
            @in data: const(void)* @nullable;
         }
      }
      on_focus {
         [['Virtual' function handling focus in/out events on the widget.  return true if this widget can handle focus, false otherwise]]
         params {
            @in item: Elm.Widget.Item * @nullable;
         }
         return: bool;
      }
      on_focus_region {
         [['Virtual' function returning an inner area of a widget that should be brought into the visible area of a broader viewport, may this context arise.]]
         params {
            @out x: Evas.Coord;
            @out y: Evas.Coord;
            @out w: Evas.Coord;
            @out h: Evas.Coord;
         }
         return: bool;
      }
      focus_cycle {
         [[Give focus to next object with specific focus direction in
           object tree.]]
         params {
            @in dir: Elm.Focus_Direction; [[Direction to move the focus.]]
         }
      }
      focus_direction @virtual_pure {
         [['Virtual' function handling passing focus to sub-objects given a direction, in degrees.]]
         params {
            @in base: const(Evas.Object)*;
            @in degree: double;
            @out direction: Evas.Object *;
            @out direction_item: Elm.Widget.Item *;
            @out weight: double;
         }
         return: bool;
      }
      event_propagate {
         return: bool;
         params {
            @in type: Evas.Callback_Type;
            @in event_info: void *;
            @in event_flags: Evas.Event_Flags *;
         }
      }
      signal_callback_add {
         params {
            @in emission: const(char)*;
            @in source: const(char)*;
            @in func: Edje.Signal_Cb;
            @in data: void *;
         }
      }
      focus_next_manager_is {
         [['Virtual' function which checks if handling of passing focus to sub-objects is supported by widget.]]
         return: bool;
      }
      name_find @const {
         return: Evas.Object *;
         params {
            @in name: const(char)*;
            @in recurse: int;
         }
      }
      focus_list_direction_get @const {
         return: bool;
         params {
            @in base: const(Evas.Object)*;
            @in items: const(list<Eo.Base*>)*;
            @in list_data_get: list_data_get_func_type;
            @in degree: double;
            @out direction: Evas.Object *;
            @out direction_item: Elm.Widget.Item *;
            @out weight: double;
         }
      }
      focused_object_clear {
      }
      focus_direction_go {
         return: bool;
         params {
            @in degree: double;
         }
      }
      show_region_set {
         params {
            @in x: Evas.Coord;
            @in y: Evas.Coord;
            @in w: Evas.Coord;
            @in h: Evas.Coord;
            @in forceshow: bool;
         }
      }
      show_region_get @const {
         params {
            @out x: Evas.Coord @optional;
            @out y: Evas.Coord @optional;
            @out w: Evas.Coord @optional;
            @out h: Evas.Coord @optional;
         }
      }
      scroll_freeze_pop {
      }
      tooltip_del {
         params {
            @in tt: Elm.Tooltip *;
         }
      }
      focus_next_get @const {
         return: bool;
         params {
            @in dir: Elm.Focus_Direction;
            @out next: Evas.Object *;
            @out next_item: Elm.Widget.Item *;
         }
      }
      translatable_part_text_get @const {
         return: const(char)*;
         params {
            @in part: const(char)*;
         }
      }
      focus_restore {
         [[Restore the focus state of the sub-tree.

         This API will restore the focus state of the sub-tree to the latest
         state. If a sub-tree is unfocused and wants to get back to the latest
         focus state, this API will be helpful.]]
      }
      scroll_hold_pop {
      }
      translate {
         [['Virtual' function handling language changes on Elementary.]]
         return: bool;
         legacy: null;
      }
      scroll_freeze_push {
      }
      focus_custom_chain_unset {
         [[Unset a custom focus chain on a given Elementary widget.

           Any focus chain previously set is removed entirely after this call.]]
      }
      focus_steal {
         params {
            @in item: Elm.Widget.Item * @nullable;
         }
      }
      focus_hide_handle {
      }
      focus_next @virtual_pure {
         [['Virtual' function handling passing focus to sub-objects.]]
         params {
            @in dir: Elm.Focus_Direction;
            @out next: Evas.Object *;
            @out next_item: Elm.Widget.Item *;
         }
         return: bool;
      }
      focus_list_next_get @const {
         return: bool;
         params {
            @in items: const(list<Eo.Base*>)*;
            @in list_data_get: list_data_get_func_type;
            @in dir: Elm.Focus_Direction;
            @out next: Evas.Object *;
            @out next_item: Elm.Widget.Item *;
         }
      }
      focus_mouse_up_handle {
         legacy: null;
      }
      theme_apply {
         [['Virtual' function on the widget being re-themed.]]
         return: bool;
      }
      focus_direction_get @const {
         return: bool;
         params {
            @in base: const(Evas.Object)*;
            @in degree: double;
            @out direction: Evas.Object *;
            @out direction_item: Elm.Widget.Item *;
            @out weight: double;
         }
      }
      signal_callback_del {
         return: void *;
         params {
            @in emission: const(char)*;
            @in source: const(char)*;
            @in func: Edje.Signal_Cb;
         }
      }
      signal_emit {
         params {
            @in emission: const(char)*;
            @in source: const(char)*;
         }
      }
      disable {
         [['Virtual' function on the widget being disabled.]]
         return: bool;
      }
      sub_object_del {
         [['Virtual' function handling sub objects being removed.]]
         return: bool;
         params {
            @in sobj: Evas.Object *;
         }
      }
      tooltip_add {
         params {
            @in tt: Elm.Tooltip *;
         }
      }
      focus_region_show @const {
      }
      focus_disabled_handle {
      }
      focus_custom_chain_append {
         [[Append object to custom focus chain.

           Note: If @"relative_child" equal to $null or not in custom chain,
           the object will be added in end.

           Note: On focus cycle, only will be evaluated children of this container.]]
         params {
            @in child: Evas.Object *; [[The child to be added in custom chain.]]
            @in relative_child: Evas.Object * @optional; [[The relative object to position the child.]]
         }
      }
      @property focus_move_policy {
         set {
            [[Sets the widget's focus move policy.]]
         }
         get {
            [[Returns the widget's focus move policy.]]
         }
         values {
            policy: Elm.Focus.Move_Policy; [[Object's focus move policy.]]
         }
      }
	  @property focus_move_policy_automatic {
         [[Control the widget's focus_move_policy mode setting.]]
         set {
         }
         get {
         }
         values {
            automatic: bool; [[$true to follow system focus move policy change, $false otherwise]]
         }
      }
	  focus_reconfigure {
      }
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Eo.Base.destructor;
      Eo.Base.dbg_info_get;
      Evas.Object.Smart.hide;
      Evas.Object.Smart.calculate;
      Evas.Object.Smart.clip_unset;
      Evas.Object.Smart.show;
      Evas.Object.Smart.color.set;
      Evas.Object.Smart.move;
      Evas.Object.Smart.member_del;
      Evas.Object.Smart.add;
      Evas.Object.Smart.del;
      Evas.Object.Smart.clip.set;
      Evas.Object.Smart.member_add;
      Evas.Object.Smart.resize;
      Evas.Object.Smart.smart_no_render.set;
      Elm.Interface.Atspi_Accessible.name.get;
      Elm.Interface.Atspi_Accessible.state_set.get;
      Elm.Interface.Atspi_Accessible.children.get;
      Elm.Interface.Atspi_Accessible.parent.get;
      Elm.Interface.Atspi_Accessible.attributes.get;
      Elm.Interface.Atspi_Component.focus_grab;
   }
   events {
      moved;
      focused;
      unfocused;
      language,changed;
      access,changed;
   }
}