summaryrefslogtreecommitdiff
path: root/src/lib/elm_interface_scrollable.eo
blob: 320651cee4e329a8616a3dd830308e803154cf92 (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
mixin Elm_Interface_Scrollable(Evas.Scrollable_Interface, Evas.Object_Smart)
{
   legacy_prefix: null;
   eo_prefix: elm_interface_scrollable;
   data: Elm_Scrollable_Smart_Interface_Data;
   properties {
      gravity {
         set {
            /*@ Set scrolling gravity on the scrollable

             The gravity defines how the scroller will adjust its view
             when the size of the scroller contents increases.

             The scroller will adjust the view to glue itself as follows.

              x=0.0, for staying where it is relative to the left edge of the content
              x=1.0, for staying where it is relative to the rigth edge of the content
              y=0.0, for staying where it is relative to the top edge of the content
              y=1.0, for staying where it is relative to the bottom edge of the content

             Default values for x and y are 0.0

             @ingroup Widget
             */
         }
         get {
            /*@ Get scrolling gravity on the scrollable

             The gravity defines how the scroller will adjust its view
             when the size of the scroller contents increases.

             The scroller will adjust the view to glue itself as follows.

              x=0.0, for staying where it is relative to the left edge of the content
              x=1.0, for staying where it is relative to the rigth edge of the content
              y=0.0, for staying where it is relative to the top edge of the content
              y=1.0, for staying where it is relative to the bottom edge of the content

             Default values for x and y are 0.0

             @ingroup Widget
             */
         }
         values {
            double x; /*@ Horizontal scrolling gravity */
            double y; /*@ Vertical scrolling gravity */
         }
      }
      bounce_allow {
         /* @brief Bouncing behavior
          *
          * When scrolling, the scroller may "bounce" when reaching an edge of the
          * content object. This is a visual way to indicate the end has been reached.
          * This is enabled by default for both axis. This API will set if it is enabled
          * for the given axis with the boolean parameters for each axis.
          *
          * @ingroup Widget
          */
         set {
         }
         get {
         }
         values {
            bool horiz; /*@ Horizontal bounce policy. */
            bool vert; /*@ Vertical bounce policy. */
         }
      }
      wheel_disabled {
         set {
            /*@ No description supplied by the EAPI. */
         }
         get {
            /*@ No description supplied by the EAPI. */
         }
         values {
            bool disabled;
         }
      }
      movement_block {
         /*@
          * @brief Blocking of scrolling (per axis)
          *
          * This function will block scrolling movement (by input of a user) in
          * a given direction. One can disable movements in the X axis, the Y
          * axis or both. The default value is #ELM_SCROLLER_MOVEMENT_NO_BLOCK,
          * where movements are allowed in both directions.
          *
          * What makes this function different from
          * freeze_push(), hold_push() and lock_x_set() (or lock_y_set())
          * is that it @b doesn't propagate its effects to any parent or child
          * widget of @a obj. Only the target scrollable widget will be locked
          * with regard to scrolling.
          *
          * @since 1.8
          *
          * @ingroup Widget
          */
         set {
         }
         get {
         }
         values {
            Elm_Scroller_Movement_Block block; /*@ Which axis (or axes) to block */
         }
      }
      momentum_animator_disabled {
         set {
            /*@ No description supplied by the EAPI. */
         }
         get {
            /*@ No description supplied by the EAPI. */
         }
         values {
            bool disabled;
         }
      }
      policy {
         /*@
          * @brief Scrollbar visibility policy
          *
          * #ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it is
          * needed, and otherwise kept hidden. #ELM_SCROLLER_POLICY_ON turns it on all
          * the time, and #ELM_SCROLLER_POLICY_OFF always keeps it off. This applies
          * respectively for the horizontal and vertical scrollbars.
          *
          * @ingroup Widget
          */
         set {
         }
         get {
         }
         values {
            Elm_Scroller_Policy hbar; /*@ Horizontal scrollbar policy */
            Elm_Scroller_Policy vbar; /*@ Vertical scrollbar policy */
         }
      }
      content_region {
         /*@
          * @brief Currently visible content region
          *
          * This gets the current region in the content object that is visible through
          * the scroller. The region co-ordinates are returned in the @p x, @p y, @p
          * w, @p h values pointed to.
          *
          * @note All coordinates are relative to the content.
          *
          * @see elm_scroller_region_show()
          *
          * @ingroup Widget
          */
         set {
         }
         get {
         }
         values {
            Evas_Coord x; /*@ X coordinate of the region */
            Evas_Coord y; /*@ Y coordinate of the region */
            Evas_Coord w; /*@ Width of the region */
            Evas_Coord h; /*@ Height of the region */
         }
      }
      repeat_events {
         set {
            /*@ It decides whether the scrollable object propagates the events to content object or not. */
         }
         get {
            /*@ It gets whether the scrollable object propagates the events to content object or not. */
         }
         values {
            bool repeat_events;
         }
      }
      page_size {
         /*@
          * @brief Scroll page size relative to viewport size.
          *
          * The scroller is capable of limiting scrolling by the user to "pages". That
          * is to jump by and only show a "whole page" at a time as if the continuous
          * area of the scroller content is split into page sized pieces. This sets
          * the size of a page relative to the viewport of the scroller. 1.0 is "1
          * viewport" is size (horizontally or vertically). 0.0 turns it off in that
          * axis. This is mutually exclusive with page size
          * (see elm_scroller_page_size_set()  for more information). Likewise 0.5
          * is "half a viewport". Sane usable values are normally between 0.0 and 1.0
          * including 1.0. If you only want 1 axis to be page "limited", use 0.0 for
          * the other axis.
          *
          * @ingroup Widget
          */
         set {
         }
         get {
         }
         values {
            Evas_Coord x; /*@ The horizontal page relative size */
            Evas_Coord y; /*@ The vertical page relative size */
         }
      }
      bounce_animator_disabled {
         set {
            /*@ No description supplied by the EAPI. */
         }
         get {
            /*@ No description supplied by the EAPI. */
         }
         values {
            bool disabled;
         }
      }
      page_scroll_limit {
         set {
            /*@ No description supplied by the EAPI. */
         }
         get {
            /*@ No description supplied by the EAPI. */
         }
         values {
            int page_limit_h;
            int page_limit_v;
         }
      }
      page_snap_allow {
         /*@
          * @brief Page snapping behavior
          *
          * When scrolling, if a scroller is paged (see
          * elm_scroller_page_size_set() and elm_scroller_page_relative_set()),
          * the scroller may snap to pages when being scrolled, i.e., even if
          * it had momentum to scroll further, it will stop at the next page
          * boundaries. This is @b disabled, by default, for both axis. This
          * function will set if it that is enabled or not, for each axis.
          *
          * @note If @a obj is not set to have pages, nothing will happen after
          * this call.
          *
          * @since 1.8
          *
          * @ingroup Widget
          */
         set {
         }
         get {
         }
         values {
            bool horiz; /*@ Allow snap horizontally */
            bool vert;  /*@ Allow snap vertically */
         }
      }
      paging {
         set {
            /*@ No description supplied by the EAPI. */
         }
         get {
            /*@ No description supplied by the EAPI. */
         }
         values {
            double pagerel_h;
            double pagerel_v;
            Evas_Coord pagesize_h;
            Evas_Coord pagesize_v;
         }
      }
      single_direction {
         /*@
          * @brief Single direction scroll configuration
          *
          * This makes it possible to restrict scrolling to a single direction,
          * with a "soft" or "hard" behavior.
          *
          * The hard behavior restricts the scrolling to a single direction all
          * of the time while the soft one will restrict depending on factors
          * such as the movement angle. If the user scrolls roughly in one
          * direction only, it will only move according to it while if the move
          * was clearly wanted on both axes, it will happen on both of them.
          *
          * @since 1.8
          *
          * @ingroup Widget
          */
         set {
         }
         get {
         }
         values {
            Elm_Scroller_Single_Direction single_dir; /*@ The single direction scroll policy */
         }
      }
      step_size {
         set {
            /*@ No description supplied by the EAPI. */
         }
         get {
            /*@ No description supplied by the EAPI. */
         }
         values {
            Evas_Coord x;
            Evas_Coord y;
         }
      }
      scroll_up_cb {
         set {
            /*@ Set the callback to run when the content has been moved up.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb scroll_up_cb; /*@ The callback */
         }
      }
      hbar_drag_cb {
         set {
            /*@ Set the callback to run when the horizontal scrollbar is dragged.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb hbar_drag_cb; /*@ The callback */
         }
      }
      drag_start_cb {
         set {
            /*@ Set the callback to run when dragging of the contents has started.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb drag_start_cb; /*@ The callback */
         }
      }
      freeze {
         set {
            /*@ No description supplied by the EAPI. */
         }
         values {
            bool freeze;
         }
      }
      content_viewport_resize_cb {
         set {
            /*@ When the viewport is resized, the callback is called. */
         }
         values {
            Elm_Interface_Scrollable_Resize_Cb viewport_resize_cb;
         }
      }
      scroll_left_cb {
         set {
            /*@ Set the callback to run when the content has been moved to the left

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb scroll_left_cb; /*@ The callback */
         }
      }
      vbar_press_cb {
         set {
            /*@ Set the callback to run when the vertical scrollbar is pressed.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb vbar_press_cb; /*@ The callback */
         }
      }
      hbar_press_cb {
         set {
            /*@ Set the callback to run when the horizontal scrollbar is pressed.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb hbar_press_cb; /*@ The callback */
         }
      }
      hbar_unpress_cb {
         set {
            /*@ Set the callback to run when the horizontal scrollbar is unpressed.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb hbar_unpress_cb; /*@ The callback */
         }
      }
      drag_stop_cb {
         set {
            /*@ Set the callback to run when dragging of the contents has stopped.
             *

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb drag_stop_cb; /*@ The callback */
         }
      }
      extern_pan {
         set {
            /*@ No description supplied by the EAPI. */
         }
         values {
            Evas_Object *pan;
         }
      }
      page_change_cb {
         set {
            /*@ Set the callback to run when the visible page changes.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb page_change_cb; /*@ The callback */
         }
      }
      hold {
         set {
            /*@ No description supplied by the EAPI. */
         }
         values {
            bool hold;
         }
      }
      animate_start_cb {
         set {
            /*@ Set the callback to run when the scrolling animation has started.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb animate_start_cb; /*@ The callback */
         }
      }
      scroll_down_cb {
         set {
            /*@ Set the callback to run when the content has been moved down.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb scroll_down_cb; /*@ The callback */
         }
      }
      page_relative {
         set {
            /*@ Set scroll page size relative to viewport size. */
         }
         values {
            double h_pagerel;
            double v_pagerel;
         }
      }
      scroll_cb {
         set {
            /*@ Set the callback to run when the content has been moved.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb scroll_cb; /*@ The callback */
         }
      }
      animate_stop_cb {
         set {
            /*@ Set the callback to run when the scrolling animation has stopped.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb animate_stop_cb; /*@ The callback */
         }
      }
      mirrored {
         set {
            /*@ No description supplied by the EAPI. */
         }
         values {
            bool mirrored;
         }
      }
      content_min_limit_cb {
         set {
            /*@ No description supplied by the EAPI. */
         }
         values {
            Elm_Interface_Scrollable_Min_Limit_Cb min_limit_cb;
         }
      }
      scroll_right_cb {
         set {
            /*@ Set the callback to run when the content has been moved to the right.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb scroll_right_cb; /*@ The callback */
         }
      }
      content {
         set {
            /*@ No description supplied by the EAPI. */
         }
         values {
            Evas_Object *content;
         }
      }
      edge_left_cb {
         set {
            /*@ Set the callback to run when the left edge of the content has been reached.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb edge_left_cb; /*@ The callback */
         }
      }
      vbar_drag_cb {
         set {
            /*@ Set the callback to run when the horizontal scrollbar is dragged.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb vbar_drag_cb; /*@ The callback */
         }
      }
      vbar_unpress_cb {
         set {
            /*@ Set the callback to run when the horizontal scrollbar is unpressed.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb vbar_unpress_cb; /*@ The callback */
         }
      }
      edge_bottom_cb {
         set {
            /*@ Set the callback to run when the bottom edge of the content has been reached.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb edge_bottom_cb; /*@ The callback */
         }
      }
      edge_right_cb {
         set {
            /*@ Set the callback to run when the right edge of the content has been reached.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb edge_right_cb; /*@ The callback */
         }
      }
      edge_top_cb {
         set {
            /*@ Set the callback to run when the top edge of the content has been reached.

             @ingroup Widget

             */
         }
         values {
            Elm_Interface_Scrollable_Cb edge_top_cb; /*@ The callback */
         }
      }
      objects {
         set {
            /*@ No description supplied by the EAPI. */
         }
         values {
            Evas_Object *edje_object;
            Evas_Object *hit_rectangle;
         }
      }
      last_page {
         get {
            /*@ Get scroll last page number.

             The page number starts from 0. 0 is the first page.
             This returns the last page number among the pages.

             @see elm_scroller_current_page_get()
             @see elm_scroller_page_show()
             @see elm_scroller_page_bring_in()

             @ingroup Widget
             */
         }
         values {
            int pagenumber_h; /*@ The horizontal page number */
            int pagenumber_v; /*@ The vertical page number */
         }
      }
      current_page {
         get {
            /*@ Get scroll current page number.

             The page number starts from 0. 0 is the first page.
             Current page means the page which meets the top-left of the viewport.
             If there are two or more pages in the viewport, it returns the number of the page
             which meets the top-left of the viewport.

             @see elm_scroller_last_page_get()
             @see elm_scroller_page_show()
             @see elm_scroller_page_bring_in()

             @ingroup Widget
             */
         }
         values {
            int pagenumber_h; /*@ The horizontal page number */
            int pagenumber_v; /*@ The vertical page number */
         }
      }
      content_viewport_geometry {
         get {
            /*@ No description supplied by the EAPI. */
         }
         values {
            Evas_Coord x;
            Evas_Coord y;
            Evas_Coord w;
            Evas_Coord h;
         }
      }
      content_size {
         get {
            /*@ Get the size of the content object

             This gets the size of the content object of the scroller.

             @ingroup Scroller
             */
         }
         values {
            Evas_Coord w; /*@ Width of the content object. */
            Evas_Coord h; /*@ Height of the content object. */

         }
      }
   }
   methods {
      content_pos_set {
         /*@ No description supplied by the EAPI. */
         params {
            @in Evas_Coord x;
            @in Evas_Coord y;
            @in bool sig;
         }
      }
      content_pos_get {
         /*@ No description supplied by the EAPI. */
         params {
            @out Evas_Coord x;
            @out Evas_Coord y;
         }
      }
      page_show {
         /*@ Show a specific virtual region within the scroller content object by page number.

          0, 0 of the indicated page is located at the top-left of the viewport.
          This will jump to the page directly without animation.

          @see elm_scroller_page_bring_in()

          @ingroup Widget
          */
         params {
            @in int pagenumber_h; /*@ The horizontal page number */
            @in int pagenumber_v; /*@ The vertical page number */
         }
      }
      region_bring_in {
         /*@ Show a specific virtual region within the scroller content object.

          This will ensure all (or part if it does not fit) of the designated
          region in the virtual content object (0, 0 starting at the top-left of the
          virtual content object) is shown within the scroller. Unlike
          elm_scroller_region_show(), this allows the scroller to "smoothly slide"
          to this location (if configuration in general calls for transitions). It
          may not jump immediately to the new location and make take a while and
          show other content along the way.

          @see elm_scroller_region_show()

          @ingroup Widget
          */
         params {
            @in Evas_Coord x; /*@ X coordinate of the region */
            @in Evas_Coord y; /*@ Y coordinate of the region */
            @in Evas_Coord w; /*@ Width of the region */
            @in Evas_Coord h; /*@ Height of the region */
         }
      }
      page_bring_in {
         /*@ Show a specific virtual region within the scroller content object by page number.

          0, 0 of the indicated page is located at the top-left of the viewport.
          This will slide to the page with animation.

          @see elm_scroller_page_show()

          @ingroup Scroller
          */
         params {
            @in int pagenumber_h; /*@ The horizontal page number */
            @in int pagenumber_v; /*@ The vertical page number */
         }
      }
      content_region_show {
         /*@ Show a specific virtual region within the scroller content object

          This will ensure all (or part if it does not fit) of the designated
          region in the virtual content object (0, 0 starting at the top-left of the
          virtual content object) is shown within the scroller.

          @ingroup Widget
          */
         params {
            @in Evas_Coord x; /*@ X coordinate of the region */
            @in Evas_Coord y; /*@ Y coordinate of the region */
            @in Evas_Coord w; /*@ Width of the region */
            @in Evas_Coord h; /*@ Height of the region */
         }
      }
      content_min_limit {
         /*@ Prevent the scrollable from being smaller than the minimum size of the content.

          By default the scroller will be as small as its design allows,
          irrespective of its content. This will make the scroller minimum size the
          right size horizontally and/or vertically to perfectly fit its content in
          that direction.

          @ingroup Widget
          */
         params {
            @in bool w; /*@ whether to limit the minimum horizontal size */
            @in bool h; /*@ whether to limit the minimum vertical size */
         }
      }
   }
   implements {
      Eo.Base.constructor;
      class.constructor;
      Evas.Object_Smart.add;
      Evas.Object_Smart.del;
   }
   events {
      changed;
   }

}