2 * @defgroup Photo Photo
5 * @image html photo_inheritance_tree.png
6 * @image latex photo_inheritance_tree.eps
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.
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,
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
22 * - @c "drag,end" - One has dropped the dragged image somewhere
28 * Add a new photo to the parent
30 * @param parent The parent object
31 * @return The new object or NULL if it cannot be created
35 EAPI Evas_Object *elm_photo_add(Evas_Object *parent);
38 * Set the file that will be used as the photo widget's image.
40 * @param obj The photo object
41 * @param file The path to file that will be used as @a obj's image.
43 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
45 * @note Use @c NULL on @a file to set the photo widget back to it's
46 * initial state, which indicates "no photo".
50 EAPI Eina_Bool elm_photo_file_set(Evas_Object *obj, const char *file);
53 * Set the file that will be used as thumbnail in the photo.
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.
61 EAPI void elm_photo_thumb_set(const Evas_Object *obj, const char *file, const char *group);
64 * Set the size that will be used on the photo
66 * @param obj The photo object
67 * @param size The size of the photo
71 EAPI void elm_photo_size_set(Evas_Object *obj, int size);
74 * Set if the photo should be completely visible or not.
76 * @param obj The photo object
77 * @param fill if true the photo will be completely visible
81 EAPI void elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill);
84 * Set editability of the photo.
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.
90 * @param obj The photo object.
91 * @param set To set of clear editability.
93 EAPI void elm_photo_editable_set(Evas_Object *obj, Eina_Bool set);
96 * Set whether the original aspect ratio of the photo should be kept on resize.
98 * @param obj The photo object.
99 * @param fixed @c EINA_TRUE if the photo should fix the aspect,
100 * @c EINA_FALSE otherwise.
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
107 * @see elm_photo_aspect_fixed_get()
111 EAPI void elm_photo_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed);
114 * Get if the object keeps the original aspect ratio.
116 * @param obj The photo object.
117 * @return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE
122 EAPI Eina_Bool elm_photo_aspect_fixed_get(const Evas_Object *obj);