summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_active_view_view_manager.eo
blob: a97fc4078fc6fb1827801632896714add2699f8d (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
abstract @beta Efl.Ui.Active_View.View_Manager extends Efl.Object {
  [[Transition object which is used by active_view.

    The transition object can display changes to the active view with animations.
    This object can also implement behavior user interaction in a animation manner. For example: Mouse dragging content, to get to a new  $current_page. If this is the case, such a user interaction should terminate with a call to $current_page. The position of the content should be exposed by emitting pos_update.
  ]]
  methods {
    bind @pure_virtual {
      [[Initial call to flush the required objects of the active view to the transition object]]
      params {
        active_view : Efl.Ui.Active_View.Container;
        group : Efl.Canvas.Group;
      }
    }
    content_add @pure_virtual  {
      [[Content has been added to the container passed in .bind. The $subobj is at position $index.

        While in the call, the $current_page property of the active_view might change.
        If such a change is happening. No animation should be displayed, and the new state should be applied.
      ]]
      params {
        subobj : Efl.Gfx.Entity;
        index : int;
      }
    }
    content_del @pure_virtual  {
      [[Content has been removed from the container passed in .bind. The $subobj at position $index is now removed.

        While in the call, the $current_page property of the active_view might change.
        If such a change is happening. No animation should be displayed, and the new state should be applied.
      ]]
      params {
        subobj : Efl.Gfx.Entity;
        index : int;
      }
    }
    switch_to @pure_virtual  {
      [[Switch from one side to another, if there has been no side before, from is -1.
        This function should, if the transition object supports this, display a animation.
      ]]
      params {
        from : int;
        to : int;
      }
    }
    @property view_size @pure_virtual  {
      [[Will be called whenever the page size changes]]
      set {

      }
      values {
        size : Eina.Size2D; [[The size of the page, real coordiates at any time]]
      }
    }
    @property animation_enabled @pure_virtual {
       [[This flag can be used to indicate that no animations should be done]]
       values {
          enable : bool; [[$true if you want animations to happen, $false if otherwise]]
       }
    }
  }
  events {
    pos_update : double; [[The absolut position where the state of the content currently is. So if there is a animation from 2 to 3 the event will go from 2.0 to 3.0. If there is a $switch_to from 2 to 3, then this event should go in one direction from 2 to 3. Not following this, will result in a event to abort the transition, and instanciating a new one.]]
  }
}