summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_ui_zoom.eo
blob: bc37073a53fd9b00a8b5c971c634e94148b57a49 (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
enum Efl.Ui.Zoom_Mode
{
   [[Types of zoom available.]]
   legacy: efl_ui_zoom_mode;
   manual = 0, [[Zoom controlled normally by efl_ui_zoom_set]]
   auto_fit, [[Zoom until photo fits in zoomable object]]
   auto_fill, [[Zoom until photo fills zoomable object]]
   auto_fit_in, [[Zoom in until photo fits in zoomable object]]
   last [[Sentinel value to indicate last enum field during iteration]]
}

interface Efl.Ui.Zoom ()
{
   [[Efl UI zoom interface]]
   event_prefix: efl_ui;
   eo_prefix: efl_ui;

   methods {
      @property zoom_animation {
         set {
            [[Enable zoom animation

              This sets the zoom animation state to on or off for zoomable. The
              default is off. This will stop zooming using animation on
              zoom level changes and change instantly. This will stop any
              existing animations that are running.
            ]]
         }
         get {
            [[Disable zoom animation

              This gets the current zoom animation state for the zoomable object.
            ]]
         }
         values {
            paused: bool; [[The pause state.]]
         }
      }
      @property zoom_level {
         set {
            [[Set the zoom level of the photo

              This sets the zoom level. If $zoom is 1, it means no zoom. If
              it's smaller than 1, it means zoom in. If it's bigger than 1,
              it means zoom out. For  example, $zoom 1 will be 1:1 pixel for
              pixel. $zoom 2 will be 2:1 (that is 2x2 photo pixels will
              display as 1 on-screen pixel) which is a zoom out. 4:1 will
              be 4x4 photo pixels as 1 screen pixel, and so on. The $zoom
              parameter must be greater than 0. It is suggested to stick
              to powers of 2. (1, 2, 4, 8, 16, 32, etc.).
            ]]
         }
         get {
            [[Get the zoom level of the photo

              This returns the current zoom level of the zoomable object.
              Note that if you set the fill mode to other than
              #EFL_UI_ZOOM_MODE_MANUAL (which is the default), the
              zoom level may be changed at any time by the  zoomable object
              itself to account for photo size and zoomable viewport size.
            ]]
         }
         values {
            zoom: double; [[The zoom level to set]]
         }
      }
      @property zoom_mode {
         set {
            [[Set the zoom mode

              This sets the zoom mode to manual or one of several automatic
              levels. Manual (EFL_UI_ZOOM_MODE_MANUAL) means that zoom
              is set manually by @.zoom_level.set and will stay at that level until
              changed by code or until zoom mode is changed. This is the
              default mode. The Automatic modes will allow the zoomable object
              to automatically adjust zoom mode based on properties.

              #EFL_UI_ZOOM_MODE_AUTO_FIT) will adjust zoom so the photo
              fits EXACTLY inside the scroll frame with no pixels outside this
              region. #EFL_UI_ZOOM_MODE_AUTO_FILL will be similar but
              ensure no pixels within the frame are left unfilled.
            ]]
         }
         get {
            [[Get the zoom mode

              This gets the current zoom mode of the zoomable object.
            ]]
         }
         values {
            mode: Efl.Ui.Zoom_Mode; [[The zoom mode.]]
         }
      }
   }
   events {
      zoom,start: void; [[Called when zooming started]]
      zoom,stop: void; [[Called when zooming stopped]]
      zoom,change: void; [[Called when zooming changed]]
   }
}