elementary/map - map supports language,changed
[framework/uifw/elementary.git] / src / lib / elm_photo.h
1 /**
2  * @defgroup Photo Photo
3  * @ingroup Elementary
4  *
5  * @image html photo_inheritance_tree.png
6  * @image latex photo_inheritance_tree.eps
7  *
8  * The Elementary photo widget is intended for displaying a photo, for
9  * ex., a person's image (contact). Simple, yet with a very specific
10  * purpose. It has a decorative frame around the inner image itself,
11  * on the default theme. If and while no photo is set on it, it
12  * displays a person icon, indicating it's a photo placeholder.
13  *
14  * This widget relies on an internal @ref Icon, so that the APIs of
15  * these two widgets are similar (drag and drop is also possible here,
16  * for example).
17  *
18  * Signals that you can add callbacks for are:
19  * - @c "clicked" - This is called when a user has clicked the photo
20  * - @c "drag,start" - One has started dragging the inner image out of the
21  *                     photo's frame
22  * - @c "drag,end" - One has dropped the dragged image somewhere
23  *
24  * @{
25  */
26
27 /**
28  * Add a new photo to the parent
29  *
30  * @param parent The parent object
31  * @return The new object or NULL if it cannot be created
32  *
33  * @ingroup Photo
34  */
35 EAPI Evas_Object *elm_photo_add(Evas_Object *parent);
36
37 /**
38  * Set the file that will be used as the photo widget's image.
39  *
40  * @param obj The photo object
41  * @param file The path to file that will be used as @a obj's image.
42  *
43  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
44  *
45  * @note Use @c NULL on @a file to set the photo widget back to it's
46  * initial state, which indicates "no photo".
47  *
48  * @ingroup Photo
49  */
50 EAPI Eina_Bool elm_photo_file_set(Evas_Object *obj, const char *file);
51
52 /**
53  * Set the file that will be used as thumbnail in the photo.
54  *
55  * @param obj The photo object.
56  * @param file The path to file that will be used as thumbnail.
57  * @param group The key used in case of an EET file.
58  *
59  * @ingroup Photo
60  */
61 EAPI void      elm_photo_thumb_set(const Evas_Object *obj, const char *file, const char *group);
62
63 /**
64  * Set the size that will be used on the photo
65  *
66  * @param obj The photo object
67  * @param size The size of the photo
68  *
69  * @ingroup Photo
70  */
71 EAPI void      elm_photo_size_set(Evas_Object *obj, int size);
72
73 /**
74  * Set if the photo should be completely visible or not.
75  *
76  * @param obj The photo object
77  * @param fill if true the photo will be completely visible
78  *
79  * @ingroup Photo
80  */
81 EAPI void      elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill);
82
83 /**
84  * Set editability of the photo.
85  *
86  * An editable photo can be dragged to or from, and can be cut or
87  * pasted too.  Note that pasting an image or dropping an item on
88  * the image will delete the existing content.
89  *
90  * @param obj The photo object.
91  * @param set To set of clear editability.
92  */
93 EAPI void      elm_photo_editable_set(Evas_Object *obj, Eina_Bool set);
94
95 /**
96  * Set whether the original aspect ratio of the photo should be kept on resize.
97  *
98  * @param obj The photo object.
99  * @param fixed @c EINA_TRUE if the photo should fix the aspect,
100  * @c EINA_FALSE otherwise.
101  *
102  * The original aspect ratio (width / height) of the photo is usually
103  * distorted to match the object's size. Enabling this option will fix
104  * this original aspect, and the way that the photo is fit into
105  * the object's area
106  *
107  * @see elm_photo_aspect_fixed_get()
108  *
109  * @ingroup Photo
110  */
111 EAPI void             elm_photo_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed);
112
113 /**
114  * Get if the object keeps the original aspect ratio.
115  *
116  * @param obj The photo object.
117  * @return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE
118  * otherwise.
119  *
120  * @ingroup Photo
121  */
122 EAPI Eina_Bool        elm_photo_aspect_fixed_get(const Evas_Object *obj);
123
124 /**
125  * @}
126  */