1 typedef Eo Elm_Photocam;
2 
3 /**
4  * @brief Add a new Photocam object
5  *
6  * @param parent The parent object
7  * @return The new object or NULL if it cannot be created
8  *
9  * @ingroup Elm_Photocam_Group
10  */
11 EAPI Evas_Object           *elm_photocam_add(Evas_Object *parent);
12 
13 /**
14  * @brief Bring in the viewed portion of the image
15  *
16  * @param obj The photocam object
17  * @param x X-coordinate of region in image original pixels
18  * @param y Y-coordinate of region in image original pixels
19  * @param w Width of region in image original pixels
20  * @param h Height of region in image original pixels
21  *
22  * This shows the region of the image using animation.
23  *
24  * @ingroup Elm_Photocam_Group
25  */
26 EAPI void                   elm_photocam_image_region_bring_in(Evas_Object *obj, int x, int y, int w, int h);
27 
28 /**
29  *
30  * @brief Set the photo file to be shown
31  *
32  * @return The return error (see EVAS_LOAD_ERROR_NONE, EVAS_LOAD_ERROR_GENERIC etc.)
33  *
34  * This sets (and shows) the specified file (with a relative or absolute
35  * path) and will return a load error (same error that
36  * evas_object_image_load_error_get() will return). The image will change and
37  * adjust its size at this point and begin a background load process for this
38  * photo that at some time in the future will be displayed at the full
39  * quality needed.
40  *
41  * @ingroup Elm_Photocam_Group
42  *
43  * @param[in] file The photo file
44  */
45 EAPI Evas_Load_Error elm_photocam_file_set(Evas_Object *obj, const char *file);
46 
47 /**
48  *
49  * @brief Returns the path of the current image file
50  *
51  * @return Returns the path
52  *
53  * @see elm_photocam_file_set()
54  *
55  * @ingroup Elm_Photocam_Group
56  *
57  */
58 EAPI const char *elm_photocam_file_get(const Evas_Object *obj);
59 
60 /**
61  * @brief Set the photocam image orientation.
62  *
63  * This function allows to rotate or flip the photocam image.
64  *
65  * @param[in] orient The photocam image orientation @ref Evas_Image_Orient.
66  * Default is #EVAS_IMAGE_ORIENT_NONE.
67  *
68  * @since 1.14
69  *
70  * @ingroup Elm_Photocam_Group
71  */
72 EAPI void elm_photocam_image_orient_set(Evas_Object *obj, Evas_Image_Orient orient);
73 
74 /**
75  * @brief Get the photocam image orientation.
76  *
77  * @return The photocam image orientation @ref Evas_Image_Orient. Default is
78  * #EVAS_IMAGE_ORIENT_NONE.
79  *
80  * @since 1.14
81  *
82  * @ingroup Elm_Photocam_Group
83  */
84 EAPI Evas_Image_Orient elm_photocam_image_orient_get(const Evas_Object *obj);
85 
86 /**
87  * @brief Get the internal low-res image used for photocam
88  *
89  * This gets the internal image object inside photocam. Do not modify it. It is
90  * for inspection only, and hooking callbacks to. Nothing else. It may be
91  * deleted at any time as well.
92  *
93  * @return The internal image object handle or @c null
94  *
95  * @ingroup Elm_Photocam_Group
96  */
97 EAPI Evas_Object*      elm_photocam_internal_image_get(const Evas_Object *obj);
98 
99 /**
100  * @brief Set the viewed region of the image
101  *
102  * This shows the region of the image without using animation.
103  *
104  * @param[in] x X-coordinate of region in image original pixels
105  * @param[in] y Y-coordinate of region in image original pixels
106  * @param[in] w Width of region in image original pixels
107  * @param[in] h Height of region in image original pixels
108  *
109  * @ingroup Elm_Photocam_Group
110  */
111 EAPI void              elm_photocam_image_region_show(Evas_Object *obj, int x, int y, int w, int h);
112 
113 /**
114  * @brief Get the current image pixel width and height
115  *
116  * This gets the current photo pixel width and height (for the original). The
117  * size will be returned in the integers @c w and @c h that are pointed to.
118  *
119  * @param[out] w A pointer to the width return
120  * @param[out] h A pointer to the height return
121  *
122  * @ingroup Elm_Photocam_Group
123  */
124 EAPI void              elm_photocam_image_size_get(const Evas_Object *obj, int *w, int *h);
125 
126 /**
127  * @brief Get the paused state for photocam
128  *
129  * This gets the current paused state for the photocam object.
130  *
131  * @return The pause state.
132  *
133  * @ingroup Elm_Photocam_Group
134  */
135 EAPI Eina_Bool         elm_photocam_paused_get(const Evas_Object *obj);
136 
137 /**
138  * @brief Set the paused state for photocam
139  *
140  * This sets the paused state to on or off for photocam. The default is off.
141  * This will stop zooming using animation on zoom level changes and change
142  * instantly. This will stop any existing animations that are running.
143  *
144  * @param[in] paused The pause state.
145  *
146  * @ingroup Elm_Photocam_Group
147  */
148 EAPI void             elm_photocam_paused_set(Evas_Object *obj, Eina_Bool paused);
149 
150 /**
151  * @brief Set the zoom level of the photo
152  *
153  * This sets the zoom level. If @c zoom is 1, it means no zoom. If it's smaller
154  * than 1, it means zoom in. If it's bigger than 1, it means zoom out. For
155  *  example, @c zoom 1 will be 1:1 pixel for pixel. @c zoom 2 will be 2:1 (that
156  * is 2x2 photo pixels will display as 1 on-screen pixel) which is a zoom out.
157  * 4:1 will be 4x4 photo pixels as 1 screen pixel, and so on. The @c zoom
158  * parameter must be greater than 0. It is suggested to stick to powers of 2.
159  * (1, 2, 4, 8, 16, 32, etc.).
160  *
161  * @param[in] zoom The zoom level to set
162  *
163  * @ingroup Elm_Photocam_Group
164  */
165 EAPI void             elm_photocam_zoom_set(Evas_Object *obj, double zoom);
166 
167 /**
168  * @brief Get the zoom level of the photo
169  *
170  * This returns the current zoom level of the photocam object. Note that if you
171  * set the fill mode to other than #ELM_PHOTOCAM_ZOOM_MODE_MANUAL (which is the
172  * default), the zoom level may be changed at any time by the  photocam object
173  * itself to account for photo size and photocam viewport size.
174  *
175  * @return The zoom level to set
176  *
177  * @ingroup Elm_Photocam_Group
178  */
179 EAPI double           elm_photocam_zoom_get(const Evas_Object *obj);
180 
181 
182 typedef enum
183 {
184   ELM_PHOTOCAM_ZOOM_MODE_MANUAL = 0, /**< Zoom controlled normally by elm_photocam_zoom_set */
185   ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT, /**< Zoom until photo fits in zoomable object */
186   ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL, /**< Zoom until photo fills zoomable object */
187   ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT_IN, /**< Zoom in until photo fits in zoomable object
188                                  */
189   ELM_PHOTOCAM_ZOOM_MODE_LAST /**< Sentinel value to indicate last enum field during
190                          * iteration */
191 } Elm_Photocam_Zoom_Mode;
192 
193 /**
194  * @brief Set the zoom mode
195  *
196  * This sets the zoom mode to manual or one of several automatic levels. Manual
197  * (ELM_PHOTOCAM_ZOOM_MODE_MANUAL) means that zoom is set manually by
198  * @ref elm_photocam_zoom_mode_set and will stay at that level until changed by
199  * code or until zoom mode is changed. This is the default mode. The Automatic
200  * modes will allow the photocam object to automatically adjust zoom mode based
201  * on properties.
202  *
203  * #ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT) will adjust zoom so the photo fits EXACTLY
204  * inside the scroll frame with no pixels outside this region.
205  * #ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL will be similar but ensure no pixels
206  * within the frame are left unfilled.
207  *
208  * @param[in] mode The zoom mode.
209  *
210  * @ingroup Elm_Photocam_Group
211  */
212 EAPI void               elm_photocam_zoom_mode_set(Evas_Object *obj, Elm_Photocam_Zoom_Mode mode);
213 
214 /**
215  * @brief Get the zoom mode
216  *
217  * This gets the current zoom mode of the photocam object.
218  *
219  * @return The zoom mode.
220  *
221  * @ingroup Elm_Photocam_Group
222  */
223 EAPI Elm_Photocam_Zoom_Mode elm_photocam_zoom_mode_get(const Evas_Object *obj);
224 
225 /**
226  * @brief Get the region of the image that is currently shown
227  *
228  * See also @ref Efl.Ui.Image_Zoomable.image_region.set.
229  *
230  * @param[out] x X-coordinate of region in image original pixels
231  * @param[out] y Y-coordinate of region in image original pixels
232  * @param[out] w Width of region in image original pixels
233  * @param[out] h Height of region in image original pixels
234  */
235 EAPI void elm_photocam_image_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h);
236 
237 #include "efl_ui_image_zoomable_eo.legacy.h"
238