Merge "gengrid TC modified"
[framework/uifw/elementary.git] / tests / debian / libelm-dev / usr / include / elementary-0 / elm_video.h
1 /**
2  * @defgroup Video Video
3  *
4  * @addtogroup Video
5  * @{
6  *
7  * Elementary comes with two object that help design application that need
8  * to display video. The main one, Elm_Video, display a video by using Emotion.
9  * It does embedded the video inside an Edje object, so you can do some
10  * animation depending on the video state change. It does also implement a
11  * ressource management policy to remove this burden from the application writer.
12  *
13  * The second one, Elm_Player is a video player that need to be linked with and Elm_Video.
14  * It take care of updating its content according to Emotion event and provide a
15  * way to theme itself. It also does automatically raise the priority of the
16  * linked Elm_Video so it will use the video decoder if available. It also does
17  * activate the remember function on the linked Elm_Video object.
18  *
19  * Signals that you can add callback for are :
20  *
21  * "forward,clicked" - the user clicked the forward button.
22  * "info,clicked" - the user clicked the info button.
23  * "next,clicked" - the user clicked the next button.
24  * "pause,clicked" - the user clicked the pause button.
25  * "play,clicked" - the user clicked the play button.
26  * "prev,clicked" - the user clicked the prev button.
27  * "rewind,clicked" - the user clicked the rewind button.
28  * "stop,clicked" - the user clicked the stop button.
29  *
30  * Default contents parts of the player widget that you can use for are:
31  * @li "video" - A video of the player
32  *
33  */
34
35 /**
36  * @brief Add a new Elm_Player object to the given parent Elementary (container) object.
37  *
38  * @param parent The parent object
39  * @return a new player widget handle or @c NULL, on errors.
40  *
41  * This function inserts a new player widget on the canvas.
42  *
43  * @see elm_object_part_content_set()
44  *
45  * @ingroup Video
46  */
47 EAPI Evas_Object         *elm_player_add(Evas_Object *parent);
48
49 /**
50  * @brief Add a new Elm_Video object to the given parent Elementary (container) object.
51  *
52  * @param parent The parent object
53  * @return a new video widget handle or @c NULL, on errors.
54  *
55  * This function inserts a new video widget on the canvas.
56  *
57  * @see elm_video_file_set()
58  * @see elm_video_uri_set()
59  *
60  * @ingroup Video
61  */
62 EAPI Evas_Object         *elm_video_add(Evas_Object *parent);
63
64 /**
65  * @brief Define the file that will be the video source.
66  *
67  * @param video The video object to define the file for.
68  * @param filename The file to target.
69  *
70  * This function will explicitly define a filename as a source
71  * for the video of the Elm_Video object.
72  *
73  * @see elm_video_uri_set()
74  * @see elm_video_add()
75  * @see elm_player_add()
76  *
77  * @ingroup Video
78  */
79 EAPI void                 elm_video_file_set(Evas_Object *video, const char *filename);
80
81 /**
82  * @brief Define the uri that will be the video source.
83  *
84  * @param video The video object to define the file for.
85  * @param uri The uri to target.
86  *
87  * This function will define an uri as a source for the video of the
88  * Elm_Video object. URI could be remote source of video, like http:// or local source
89  * like for example WebCam who are most of the time v4l2:// (but that depend and
90  * you should use Emotion API to request and list the available Webcam on your system).
91  *
92  * @see elm_video_file_set()
93  * @see elm_video_add()
94  * @see elm_player_add()
95  *
96  * @ingroup Video
97  */
98 EAPI void                 elm_video_uri_set(Evas_Object *video, const char *uri);
99
100 /**
101  * @brief Get the underlying Emotion object.
102  *
103  * @param video The video object to proceed the request on.
104  * @return the underlying Emotion object.
105  *
106  * @ingroup Video
107  */
108 EAPI Evas_Object         *elm_video_emotion_get(const Evas_Object *video);
109
110 /**
111  * @brief Start to play the video
112  *
113  * @param video The video object to proceed the request on.
114  *
115  * Start to play the video and cancel all suspend state.
116  *
117  * @ingroup Video
118  */
119 EAPI void                 elm_video_play(Evas_Object *video);
120
121 /**
122  * @brief Pause the video
123  *
124  * @param video The video object to proceed the request on.
125  *
126  * Pause the video and start a timer to trigger suspend mode.
127  *
128  * @ingroup Video
129  */
130 EAPI void                 elm_video_pause(Evas_Object *video);
131
132 /**
133  * @brief Stop the video
134  *
135  * @param video The video object to proceed the request on.
136  *
137  * Stop the video and put the emotion in deep sleep mode.
138  *
139  * @ingroup Video
140  */
141 EAPI void                 elm_video_stop(Evas_Object *video);
142
143 /**
144  * @brief Is the video actually playing.
145  *
146  * @param video The video object to proceed the request on.
147  * @return EINA_TRUE if the video is actually playing.
148  *
149  * You should consider watching event on the object instead of polling
150  * the object state.
151  *
152  * @ingroup Video
153  */
154 EAPI Eina_Bool            elm_video_is_playing(const Evas_Object *video);
155
156 /**
157  * @brief Is it possible to seek inside the video.
158  *
159  * @param video The video object to proceed the request on.
160  * @return EINA_TRUE if is possible to seek inside the video.
161  *
162  * @ingroup Video
163  */
164 EAPI Eina_Bool            elm_video_is_seekable(const Evas_Object *video);
165
166 /**
167  * @brief Is the audio muted.
168  *
169  * @param video The video object to proceed the request on.
170  * @return EINA_TRUE if the audio is muted.
171  *
172  * @ingroup Video
173  */
174 EAPI Eina_Bool            elm_video_audio_mute_get(const Evas_Object *video);
175
176 /**
177  * @brief Change the mute state of the Elm_Video object.
178  *
179  * @param video The video object to proceed the request on.
180  * @param mute The new mute state.
181  *
182  * @ingroup Video
183  */
184 EAPI void                 elm_video_audio_mute_set(Evas_Object *video, Eina_Bool mute);
185
186 /**
187  * @brief Get the audio level of the current video.
188  *
189  * @param video The video object to proceed the request on.
190  * @return the current audio level.
191  *
192  * @ingroup Video
193  */
194 EAPI double               elm_video_audio_level_get(const Evas_Object *video);
195
196 /**
197  * @brief Set the audio level of anElm_Video object.
198  *
199  * @param video The video object to proceed the request on.
200  * @param volume The new audio volume.
201  *
202  * @ingroup Video
203  */
204 EAPI void                 elm_video_audio_level_set(Evas_Object *video, double volume);
205
206 EAPI double               elm_video_play_position_get(const Evas_Object *video);
207 EAPI void                 elm_video_play_position_set(Evas_Object *video, double position);
208 EAPI double               elm_video_play_length_get(const Evas_Object *video);
209 EAPI void                 elm_video_remember_position_set(Evas_Object *video, Eina_Bool remember);
210 EAPI Eina_Bool            elm_video_remember_position_get(const Evas_Object *video);
211 EAPI const char          *elm_video_title_get(const Evas_Object *video);
212 /**
213  * @}
214  */