tizen 2.4 release
[framework/uifw/elementary.git] / src / lib / elm_photocam.eo
1 class Elm_Photocam (Elm_Widget, Elm_Interface_Scrollable,
2                     Elm_Interface_Atspi_Widget_Action)
3 {
4    eo_prefix: elm_obj_photocam;
5    properties {
6       paused {
7          set {
8             /*@
9             @brief Set the paused state for photocam
10
11             @if MOBILE @since_tizen 2.3
12             @elseif WEARABLE @since_tizen 2.3.1
13             @endif
14
15             @remark This sets the paused state to on(@c EINA_TRUE) or off (@c EINA_FALSE) for
16             photocam. The default is off. This will stop zooming using animation on
17             zoom level changes and change instantly. This will stop any existing
18             animations that are running.
19
20             @ingroup Photocam */
21          }
22          get {
23             /*@
24             @brief Get the paused state for photocam
25
26             @if MOBILE @since_tizen 2.3
27             @elseif WEARABLE @since_tizen 2.3.1
28             @endif
29
30             @return The current paused state
31
32             @remark This gets the current paused state for the photocam object.
33
34             @see elm_photocam_paused_set()
35
36             @ingroup Photocam */
37          }
38          values {
39             bool paused; /*@ The pause state to set */
40          }
41       }
42       file {
43          set {
44             /*@
45             @brief Set the photo file to be shown
46
47             @if MOBILE @since_tizen 2.3
48             @elseif WEARABLE @since_tizen 2.3.1
49             @endif
50
51             @return The return error (see EVAS_LOAD_ERROR_NONE, EVAS_LOAD_ERROR_GENERIC etc.)
52
53             @remark This sets (and shows) the specified file (with a relative or absolute
54             path) and will return a load error (same error that
55             evas_object_image_load_error_get() will return). The image will change and
56             adjust its size at this point and begin a background load process for this
57             photo that at some time in the future will be displayed at the full
58             quality needed.
59
60             @ingroup Photocam */
61             return: Evas_Load_Error;
62          }
63          get {
64             /*@
65             @brief Returns the path of the current image file
66
67             @if MOBILE @since_tizen 2.3
68             @elseif WEARABLE @since_tizen 2.3.1
69             @endif
70
71             @return Returns the path
72
73             @see elm_photocam_file_set()
74
75             @ingroup Photocam */
76          }
77          values {
78             const(char)* file; /*@ The photo file */
79          }
80       }
81       gesture_enabled {
82          set {
83             /*@
84             @brief Set the gesture state for photocam.
85
86             @if MOBILE @since_tizen 2.3
87             @elseif WEARABLE @since_tizen 2.3.1
88             @endif
89
90             @remark This sets the gesture state to on(@c EINA_TRUE) or off (@c EINA_FALSE) for
91             photocam. The default is off. This will start multi touch zooming.
92
93             @ingroup Photocam */
94          }
95          get {
96             /*@
97             @brief Get the gesture state for photocam.
98
99             @if MOBILE @since_tizen 2.3
100             @elseif WEARABLE @since_tizen 2.3.1
101             @endif
102
103             @return The current gesture state
104
105             @remark This gets the current gesture state for the photocam object.
106
107             @see elm_photocam_gesture_enabled_set()
108
109             @ingroup Photocam */
110          }
111          values {
112             bool gesture; /*@ The gesture state to set */
113          }
114       }
115       zoom {
116          set {
117             /*@
118             @brief Set the zoom level of the photo
119
120             @if MOBILE @since_tizen 2.3
121             @elseif WEARABLE @since_tizen 2.3.1
122             @endif
123
124             @remark This sets the zoom level. If @p zoom is 1, it means no zoom. If it's smaller
125             than 1, it means zoom in. If it's bigger than 1, it means zoom out. For
126             example, @p zoom 1 will be 1:1 pixel for pixel. @p zoom 2 will be 2:1
127             (that is 2x2 photo pixels will display as 1 on-screen pixel) which is a zoom
128             out. 4:1 will be 4x4 photo pixels as 1 screen pixel, and so on. The @p zoom
129             parameter must be greater than 0. It is suggested to stick to powers of 2.
130             (1, 2, 4, 8, 16, 32, etc.).
131
132             @ingroup Photocam */
133          }
134          get {
135             /*@
136             @brief Get the zoom level of the photo
137
138             @if MOBILE @since_tizen 2.3
139             @elseif WEARABLE @since_tizen 2.3.1
140             @endif
141
142             @return The current zoom level
143
144             @remark This returns the current zoom level of the photocam object. Note that if
145             you set the fill mode to other than #ELM_PHOTOCAM_ZOOM_MODE_MANUAL
146             (which is the default), the zoom level may be changed at any time by the
147             photocam object itself to account for photo size and photocam viewport
148             size.
149
150             @see elm_photocam_zoom_set()
151             @see elm_photocam_zoom_mode_set()
152
153             @ingroup Photocam */
154          }
155          values {
156             double zoom; /*@ The zoom level to set */
157          }
158       }
159       zoom_mode {
160          set {
161             /*@
162             @brief Set the zoom mode
163
164             @if MOBILE @since_tizen 2.3
165             @elseif WEARABLE @since_tizen 2.3.1
166             @endif
167
168             @remark This sets the zoom mode to manual or one of several automatic levels.
169             Manual (ELM_PHOTOCAM_ZOOM_MODE_MANUAL) means that zoom is set manually by
170             elm_photocam_zoom_set() and will stay at that level until changed by code
171             or until zoom mode is changed. This is the default mode. The Automatic
172             modes will allow the photocam object to automatically adjust zoom mode
173             based on properties. #ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT) will adjust zoom so
174             the photo fits EXACTLY inside the scroll frame with no pixels outside this
175             region. #ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL will be similar but ensure no
176             pixels within the frame are left unfilled.
177
178             @ingroup Photocam */
179          }
180          get {
181             /*@
182             @brief Get the zoom mode
183
184             @if MOBILE @since_tizen 2.3
185             @elseif WEARABLE @since_tizen 2.3.1
186             @endif
187
188             @return The current zoom mode
189
190             @remark This gets the current zoom mode of the photocam object.
191
192             @see elm_photocam_zoom_mode_set()
193
194             @ingroup Photocam */
195          }
196          values {
197             Elm_Photocam_Zoom_Mode mode; /*@ The desired mode */
198          }
199       }
200       image_region {
201          get {
202             /*@
203             @brief Get the region of the image that is currently shown
204
205             @if MOBILE @since_tizen 2.3
206             @elseif WEARABLE @since_tizen 2.3.1
207             @endif
208
209             @see elm_photocam_image_region_show()
210             @see elm_photocam_image_region_bring_in()
211
212             @ingroup Photocam */
213          }
214          values {
215             int x; /*@ A pointer to the X-coordinate of region */
216             int y; /*@ A pointer to the Y-coordinate of region */
217             int w; /*@ A pointer to the width */
218             int h; /*@ A pointer to the height */
219          }
220       }
221       internal_image {
222          get {
223             /*@
224             @brief Get the internal low-res image used for photocam
225
226             @if MOBILE @since_tizen 2.3
227             @elseif WEARABLE @since_tizen 2.3.1
228             @endif
229
230             @return The internal image object handle, or NULL if none exists
231
232             @remark This gets the internal image object inside photocam. Do not modify it. It
233             is for inspection only, and hooking callbacks to. Nothing else. It may be
234             deleted at any time as well.
235
236             @ingroup Photocam */
237             return: Evas_Object *;
238          }
239       }
240       image_size {
241          get {
242             /*@
243             @brief Get the current image pixel width and height
244
245             @if MOBILE @since_tizen 2.3
246             @elseif WEARABLE @since_tizen 2.3.1
247             @endif
248
249             @remark This gets the current photo pixel width and height (for the original).
250             The size will be returned in the integers @p w and @p h that are pointed
251             to.
252
253             @ingroup Photocam */
254          }
255          values {
256             int w; /*@ A pointer to the width return */
257             int h; /*@ A pointer to the height return */
258          }
259       }
260    }
261    methods {
262       image_region_show {
263          /*@
264          @brief Set the viewed region of the image
265
266          @if MOBILE @since_tizen 2.3
267          @elseif WEARABLE @since_tizen 2.3.1
268          @endif
269
270          @remark This shows the region of the image without using animation.
271
272          @ingroup Photocam */
273
274          params {
275             @in int x; /*@ X-coordinate of region in image original pixels */
276             @in int y; /*@ Y-coordinate of region in image original pixels */
277             @in int w; /*@ Width of region in image original pixels */
278             @in int h; /*@ Height of region in image original pixels */
279          }
280       }
281    }
282    implements {
283       class.constructor;
284       Eo.Base.constructor;
285       Evas.Object_Smart.move;
286       Evas.Object_Smart.add;
287       Evas.Object_Smart.del;
288       Evas.Object_Smart.member_add;
289       Evas.Object_Smart.resize;
290       Elm_Widget.theme_apply;
291       Elm_Widget.on_focus;
292       Elm_Widget.event;
293       Elm_Interface_Scrollable.region_bring_in;
294       Elm_Interface_Atspi_Widget_Action.elm_actions.get;
295    }
296    events {
297       clicked;
298       press;
299       longpressed;
300       clicked,double;
301       load;
302       loaded;
303       load,detail;
304       loaded,detail;
305       zoom,start;
306       zoom,stop;
307       zoom,change;
308       scroll;
309       scroll,anim,start;
310       scroll,anim,stop;
311       scroll,drag,start;
312       scroll,drag,stop;
313       download,start;
314       download,progress;
315       download,done;
316       download,error;
317       focused;
318       unfocused;
319    }
320
321 }