summaryrefslogtreecommitdiff
path: root/src/lib/elm_photo.eo
blob: a02f99872b37bba6003fd2b9664b59dc97b2456e (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
class Elm_Photo (Elm_Widget, Evas.Clickable_Interface, Evas.Draggable_Interface)
{
   eo_prefix: elm_obj_photo;
   properties {
      editable {
         set {
            /*@
            Set editability of the photo.

            An editable photo can be dragged to or from, and can be cut or
            pasted too. Note that pasting an image or dropping an item on
            the image will delete the existing content. */
         }
         get {
            /*@ Get editability of the photo. */
         }
         values {
            Eina_Bool set; /*@ To set of clear editability. */
         }
      }
      fill_inside {
         set {
            /*@
            Set if the photo should be completely visible or not.

            @ingroup Photo */
         }
         get {
            /*@ Get if the photo should be completely visible or not. */
         }
         values {
            Eina_Bool fill; /*@ if true the photo will be completely visible */
         }
      }
      aspect_fixed {
         set {
            /*@
            Set whether the original aspect ratio of the photo should be kept on resize.

            The original aspect ratio (width / height) of the photo is usually
            distorted to match the object's size. Enabling this option will fix
            this original aspect, and the way that the photo is fit into
            the object's area

            @see elm_photo_aspect_fixed_get()

            @ingroup Photo */
         }
         get {
            /*@
            Get if the object keeps the original aspect ratio.

            @return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE
            otherwise.

            @ingroup Photo */
         }
         values {
            Eina_Bool fixed; /*@ @c EINA_TRUE if the photo should fix the aspect,
            @c EINA_FALSE otherwise. */
         }
      }
      size {
         set {
            /*@
            Set the size that will be used on the photo

            @ingroup Photo */
         }
         get {
            /*@ Get the size that will be used on the photo */
         }
         values {
            int size; /*@ The size of the photo */
         }
      }
      file {
         set {
            /*@
            Set the file that will be used as the photo widget's image.

            @return @c EINA_TRUE on success, @c EINA_FALSE otherwise

            @note Use @c NULL on @a file to set the photo widget back to it's
            initial state, which indicates "no photo".

            @ingroup Photo */
            return Eina_Bool;
         }
         values {
            const char *file; /*@ The path to file that will be used as @a obj's image. */
         }
      }
   }
   methods {
      thumb_set {
         /*@
           Set the file that will be used as thumbnail in the photo.

           @ingroup Photo */
         const;
         params {
            @in const char *file; /*@ The path to file that will be used as thumbnail. */
            @in const char *group; /*@ The key used in case of an EET file. */
         }
      }
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Evas.Object_Smart.add;
      Evas.Object_Smart.del;
      Elm_Widget.theme_apply;
   }
   events {
      clicked;
      drag,start;
      drag,end;
   }

}