summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_image.eo
blob: 9a568aed534ac35eece6e5bdd74052840077a79d (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
struct Efl.Ui.Image.Progress
{
   [[
     Structure associated with smart callback 'download,progress'.
     @since 1.8
   ]]
   now:   double; [[Current percentage]]
   total: double; [[Total percentage]]
}

struct Efl.Ui.Image.Error
{
   [[
     Structure associated with smart callback 'download,progress'.
     @since 1.8
   ]]
   status:     int; [[Error status of the download]]
   open_error: bool; [[$true if the error happened when opening the file, $false otherwise]]
}

class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable,
                 Efl.File, Efl.Image, Efl.Image.Load, Efl.Player, Efl.Gfx.View, 
                 Efl.Access.Image, Efl.Access.Widget.Action,
                 Efl.Orientation, Efl.Flipable,
                 Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Layout.Calc,
                 Efl.Layout.Group, Efl.Layout.Signal)
{
   [[ Efl UI image class]]
   event_prefix: efl_ui_image;
   methods {
      @property scalable {
         [[Enable or disable scaling up or down the internal image.

           @since 1.18]]
         values {
            scale_up: bool;   [[If $true, the internal image might be scaled up
                                if necessary according to the scale type.
                                if $false, the internal image is not scaled up
                                no matter what the scale type is.]]
            scale_down: bool; [[If $true, the internal image might be scaled down
                                if necessary according to the scale type.
                                if $false, the internal image is not scaled down
                                no matter what the scale type is.]]
         }
      }
      @property align {
         [[Control how the internal image is positioned inside an image object.

           @since 1.18]]
         values {
            align_x: double; [[Alignment in the horizontal axis (0 <= align_x <= 1).]]
            align_y: double; [[Alignment in the vertical axis (0 <= align_y <= 1).]]
         }
      }
      @property icon {
         set {
            [[Set the image by icon standards names.

              For example, freedesktop.org defines standard icon names such
              as "home", "network", etc. There can be different icon sets to
              match those icon keys. The "name" given as parameter is one of
              these "keys", and will be used to look in the freedesktop.org
              paths and elementary theme.

              If name is not found in any of the expected locations and it is
              the absolute path of an image file, this image will be used.
              Lookup order used by @.icon.set can be set using "icon_theme" in config.

              Note: The image set by this function can be changed by
              @Efl.File.file.set.

              Note: This function does not accept relative icon path.

              See also @.icon.get.
            ]]
            return: bool; [[$true on success, $false on error]]
         }
         get {
            [[Get the icon name of image set by icon standard names.

              If the image was set using efl_file_set() instead of
              @.icon.set, then this function will return null.
            ]]
         }
         values {
            name: string; [[The icon name]]
         }
      }
   }
   implements {
      class.constructor;
      Efl.Object.constructor;
      Efl.File.file { get; set; }
      Efl.File.mmap { set; }
      Efl.Gfx.color { set; }
      Efl.Gfx.visible { set; }
      Efl.Gfx.position { set; }
      Efl.Gfx.size { set; }
      Efl.Gfx.View.view_size { get; }
      Efl.Image.image_size { get; }
      Efl.Image.Load.load_size { get; set; }
      Efl.Image.smooth_scale { get; set; }
      Efl.Image.scale_type { get; set; }
      Efl.Orientation.orientation { get; set; }
      Efl.Flipable.flip { get; set; }
      Efl.Player.playable { get; }
      Efl.Player.play { get; set; }
      Efl.Layout.Signal.signal_emit;
      Efl.Layout.Group.group_size_min { get; }
      Efl.Layout.Group.group_size_max { get; }
      //Efl.Canvas.Layout_Group.group_data { get; }
      Efl.Layout.Calc.calc_size_min;
      Efl.Layout.Calc.calc_force;
      Efl.Canvas.Object.clip { set; }
      Efl.Canvas.Group.group_member_add;
      Efl.Ui.Draggable.drag_target { get; set; }
      Efl.Ui.Model.Connect.connect;
      Efl.Ui.View.model { get; set; }
      Elm.Widget.theme_apply;
      Elm.Widget.widget_event;
      Efl.Access.Image.extents { get; }
      Efl.Access.Widget.Action.elm_actions { get; }
   }
   events {
      drop; [[Called when drop from drag and drop happened]] /* FIXME - Belongs to DnD interface */
   }
}