summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/Emotion.h
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2011-09-15 18:51:23 +0000
committerRafael Antognolli <antognolli@gmail.com>2011-09-15 18:51:23 +0000
commit77f43424a6c0fa2d467ae9fd622012d5719c6d7a (patch)
treeb9932baf2a962dc219c77aabf7f59d009a0f88e9 /legacy/emotion/src/lib/Emotion.h
parent64f3a6da0f21ae57f003046a99ae7e9ba306eed9 (diff)
emotion/border: Add border/crop support for emotion objects.
The emotion_object_border_set/get APIs were added, allowing one to specify a positive (border) or negative (crop) value for each of the edjes of the video being played. This allows easier setup on an Emotion object to keep the aspect ratio, either by adding black areas on it, or by cropping the exceding area of the video. NOTE: The specified border/crop is based on the original size of the video. If it is scaled (emotion object size is different from the video size), the borders will be scaled as well. Patch based on an original patch sent by Hugo Camboulive <hugo.camboulive@gmail.com>. SVN revision: 63414
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/Emotion.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/legacy/emotion/src/lib/Emotion.h b/legacy/emotion/src/lib/Emotion.h
index b35125f1ff..af74eb84f5 100644
--- a/legacy/emotion/src/lib/Emotion.h
+++ b/legacy/emotion/src/lib/Emotion.h
@@ -376,6 +376,47 @@ EAPI void emotion_object_module_option_set (Evas_Object *obj, const
376EAPI Eina_Bool emotion_object_init (Evas_Object *obj, const char *module_filename); 376EAPI Eina_Bool emotion_object_init (Evas_Object *obj, const char *module_filename);
377 377
378/** 378/**
379 * @brief Set borders for the emotion object.
380 *
381 * @param obj The emotion object where borders are being set.
382 * @param l The left border.
383 * @param r The right border.
384 * @param t The top border.
385 * @param b The bottom border.
386 *
387 * This function sets borders for the emotion video object (just when a video is
388 * present). When positive values are given to one of the parameters, a border
389 * will be added to the respective position of the object, representing that
390 * size on the original video size. However, if the video is scaled up or down
391 * (i.e. the emotion object size is different from the video size), the borders
392 * will be scaled respectively too.
393 *
394 * If a negative value is given to one of the parameters, instead of a border,
395 * that respective side of the video will be cropped.
396 *
397 * It's possible to set a color for the added borders (default is transparent)
398 * with emotion_object_border_color_set(). By default, an Emotion object doesn't
399 * have any border.
400 *
401 * @see emotion_object_border_get()
402 * @see emotion_object_border_color_set()
403 */
404EAPI void emotion_object_border_set(Evas_Object *obj, int l, int r, int t, int b);
405
406/**
407 * @brief Get the borders set for the emotion object.
408 *
409 * @param obj The emotion object from which the borders are being retrieved.
410 * @param l The left border.
411 * @param r The right border.
412 * @param t The top border.
413 * @param b The bottom border.
414 *
415 * @see emotion_object_border_set()
416 */
417EAPI void emotion_object_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b);
418
419/**
379 * @brief Set the file to be played in the Emotion object. 420 * @brief Set the file to be played in the Emotion object.
380 * 421 *
381 * @param obj The emotion object where the file is being loaded. 422 * @param obj The emotion object where the file is being loaded.