diff options
author | Ji-Youn Park <jy0703.park@samsung.com> | 2016-04-11 21:31:42 +0830 |
---|---|---|
committer | Ji-Youn Park <jy0703.park@samsung.com> | 2016-04-11 21:31:42 +0830 |
commit | 02a37da0ed835c74e6b3cc6146280eb82e6a18f2 (patch) | |
tree | 246906fac07aa456a14e3541e73a662ee5a44b5f | |
parent | 626decac682187ed7367c282d63c38bc6cf8ec07 (diff) | |
download | efl-02a37da0ed835c74e6b3cc6146280eb82e6a18f2.tar.gz |
Elm_thumb: move all api from eo to legacy
elm_thumb,elm_icon,elm_photo will be removed.
-rw-r--r-- | src/lib/elementary/elm_thumb.c | 268 | ||||
-rw-r--r-- | src/lib/elementary/elm_thumb.eo | 195 | ||||
-rw-r--r-- | src/lib/elementary/elm_thumb_legacy.h | 247 |
3 files changed, 401 insertions, 309 deletions
diff --git a/src/lib/elementary/elm_thumb.c b/src/lib/elementary/elm_thumb.c index 65558b419f..6ca3e30f4b 100644 --- a/src/lib/elementary/elm_thumb.c +++ b/src/lib/elementary/elm_thumb.c @@ -603,16 +603,6 @@ _elm_thumb_eo_base_constructor(Eo *obj, Elm_Thumb_Data *sd) return obj; } -EOLIAN static void -_elm_thumb_reload(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) -{ - eina_stringshare_replace(&(sd->thumb.file), NULL); - eina_stringshare_replace(&(sd->thumb.key), NULL); - - if (evas_object_visible_get(obj)) - _thumb_show(sd); -} - EOLIAN static Eina_Bool _elm_thumb_efl_file_file_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, const char *file, const char *key) { @@ -663,124 +653,222 @@ _elm_thumb_efl_file_file_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, const char *key = sd->key; } +EAPI void * +elm_thumb_ethumb_client_get(void) +{ + return _elm_ethumb_client; +} + +EAPI Eina_Bool +elm_thumb_ethumb_client_connected_get(void) +{ + return _elm_ethumb_connected; +} + EOLIAN static void -_elm_thumb_path_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, const char **file, const char **key) +_elm_thumb_evas_draggable_interface_drag_target_set(Eo *obj, Elm_Thumb_Data *sd, Eina_Bool edit) { - if (file) - *file = sd->thumb.file; - if (key) - *key = sd->thumb.key; + edit = !!edit; + if (sd->edit == edit) return; + + sd->edit = edit; + if (sd->edit) + elm_drop_target_add(obj, ELM_SEL_FORMAT_IMAGE, + NULL, NULL, + NULL, NULL, + NULL, NULL, + _elm_thumb_dnd_cb, obj); + else + elm_drop_target_del(obj, ELM_SEL_FORMAT_IMAGE, + NULL, NULL, + NULL, NULL, + NULL, NULL, + _elm_thumb_dnd_cb, obj); + + return; +} + +EOLIAN static Eina_Bool +_elm_thumb_evas_draggable_interface_drag_target_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) +{ + return sd->edit; } EOLIAN static void -_elm_thumb_aspect_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Ethumb_Thumb_Aspect aspect) +_elm_thumb_class_constructor(Eo_Class *klass) +{ + evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); +} + +EAPI void +elm_thumb_file_set(Eo *obj, const char *file, const char *key) +{ + efl_file_set((Eo *) obj, file, key); +} + +EAPI void +elm_thumb_file_get(const Eo *obj, const char **file, const char **key) +{ + efl_file_get((Eo *) obj, file, key); +} + +/* Legacy deprecated functions */ +EAPI Eina_Bool +elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit) +{ + evas_draggable_interface_drag_target_set(obj, edit); + return EINA_TRUE; +} + +EAPI Eina_Bool +elm_thumb_editable_get(const Evas_Object *obj) +{ + return evas_draggable_interface_drag_target_get(obj); +} + +EAPI void +elm_thumb_aspect_set(Evas_Object *obj, Ethumb_Thumb_Aspect aspect) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); sd->thumb.aspect = aspect; } -EOLIAN static Ethumb_Thumb_Aspect -_elm_thumb_aspect_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) +EAPI Ethumb_Thumb_Aspect +elm_thumb_aspect_get(const Evas_Object *obj) { + ELM_THUMB_CHECK(obj) ETHUMB_THUMB_KEEP_ASPECT; + ELM_THUMB_DATA_GET(obj, sd); return sd->thumb.aspect; } -EOLIAN static void -_elm_thumb_fdo_size_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Ethumb_Thumb_FDO_Size size) +EAPI void +elm_thumb_fdo_size_set(Evas_Object *obj, Ethumb_Thumb_FDO_Size size) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); sd->thumb.size = size; } -EOLIAN static Ethumb_Thumb_FDO_Size -_elm_thumb_fdo_size_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) +EAPI Ethumb_Thumb_FDO_Size +elm_thumb_fdo_size_get(const Evas_Object *obj) { + ELM_THUMB_CHECK(obj) ETHUMB_THUMB_NORMAL; + ELM_THUMB_DATA_GET(obj, sd); return sd->thumb.size; } -EOLIAN static void -_elm_thumb_format_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Ethumb_Thumb_Format format) +EAPI void +elm_thumb_format_set(Evas_Object *obj, Ethumb_Thumb_Format format) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); sd->thumb.format = format; } -EOLIAN static Ethumb_Thumb_Format -_elm_thumb_format_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) +EAPI Ethumb_Thumb_Format +elm_thumb_format_get(const Evas_Object *obj) { + ELM_THUMB_CHECK(obj) ETHUMB_THUMB_FDO; + ELM_THUMB_DATA_GET(obj, sd); return sd->thumb.format; } -EOLIAN static void -_elm_thumb_orientation_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Ethumb_Thumb_Orientation orient) +EAPI void +elm_thumb_orientation_set(Evas_Object *obj, Ethumb_Thumb_Orientation orient) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); sd->thumb.orient = orient; } -EOLIAN static Ethumb_Thumb_Orientation -_elm_thumb_orientation_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) +EAPI Ethumb_Thumb_Orientation +elm_thumb_orientation_get(const Evas_Object *obj) { + ELM_THUMB_CHECK(obj) ETHUMB_THUMB_ORIENT_NONE; + ELM_THUMB_DATA_GET(obj, sd); return sd->thumb.orient; } -EOLIAN static void -_elm_thumb_size_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int tw, int th) +EAPI void +elm_thumb_size_set(Evas_Object *obj, int tw, int th) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); sd->thumb.tw = tw; sd->thumb.th = th; } -EOLIAN static void -_elm_thumb_size_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int *tw, int *th) +EAPI void +elm_thumb_size_get(const Evas_Object *obj, int *tw, int *th) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); if (tw) *tw = sd->thumb.tw; if (th) *th = sd->thumb.th; } -EOLIAN static void -_elm_thumb_crop_align_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, double cropx, double cropy) +EAPI void +elm_thumb_crop_align_set(Evas_Object *obj, double cropx, double cropy) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); sd->thumb.cropx = cropx; sd->thumb.cropy = cropy; } -EOLIAN static void -_elm_thumb_crop_align_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, double *cropx, double *cropy) +EAPI void +elm_thumb_crop_align_get(const Evas_Object *obj, double *cropx, double *cropy) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); if (cropx) *cropx = sd->thumb.cropx; if (cropy) *cropy = sd->thumb.cropy; } -EOLIAN static void -_elm_thumb_compress_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int compress) +EAPI void +elm_thumb_compress_set(Evas_Object *obj, int compress) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); sd->thumb.compress = compress; } -EOLIAN static void -_elm_thumb_compress_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int *compress) +EAPI void +elm_thumb_compress_get(const Evas_Object *obj, int *compress) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); if (compress) *compress = sd->thumb.compress; } -EOLIAN static void -_elm_thumb_quality_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int quality) +EAPI void +elm_thumb_quality_set(Evas_Object *obj, int quality) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); sd->thumb.quality = quality; } -EOLIAN static void -_elm_thumb_quality_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int *quality) +EAPI void +elm_thumb_quality_get(const Evas_Object *obj, int *quality) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); if (quality) *quality = sd->thumb.quality; } -EOLIAN static void -_elm_thumb_animate_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Elm_Thumb_Animation_Setting setting) +EAPI void +elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting setting) { + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); EINA_SAFETY_ON_TRUE_RETURN(setting >= ELM_THUMB_ANIMATION_LAST); sd->anim_setting = setting; @@ -796,83 +884,35 @@ _elm_thumb_animate_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Elm_Thumb_Animat } } -EOLIAN static Elm_Thumb_Animation_Setting -_elm_thumb_animate_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) +EAPI Elm_Thumb_Animation_Setting +elm_thumb_animate_get(const Evas_Object *obj) { + ELM_THUMB_CHECK(obj) 0; + ELM_THUMB_DATA_GET(obj, sd); return sd->anim_setting; } -EAPI void * -elm_thumb_ethumb_client_get(void) -{ - return _elm_ethumb_client; -} - -EAPI Eina_Bool -elm_thumb_ethumb_client_connected_get(void) -{ - return _elm_ethumb_connected; -} - -EOLIAN static void -_elm_thumb_evas_draggable_interface_drag_target_set(Eo *obj, Elm_Thumb_Data *sd, Eina_Bool edit) -{ - edit = !!edit; - if (sd->edit == edit) return; - - sd->edit = edit; - if (sd->edit) - elm_drop_target_add(obj, ELM_SEL_FORMAT_IMAGE, - NULL, NULL, - NULL, NULL, - NULL, NULL, - _elm_thumb_dnd_cb, obj); - else - elm_drop_target_del(obj, ELM_SEL_FORMAT_IMAGE, - NULL, NULL, - NULL, NULL, - NULL, NULL, - _elm_thumb_dnd_cb, obj); - - return; -} - -EOLIAN static Eina_Bool -_elm_thumb_evas_draggable_interface_drag_target_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) -{ - return sd->edit; -} - -EOLIAN static void -_elm_thumb_class_constructor(Eo_Class *klass) -{ - evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); -} - EAPI void -elm_thumb_file_set(Eo *obj, const char *file, const char *key) +elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key) { - efl_file_set((Eo *) obj, file, key); + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); + if (file) + *file = sd->thumb.file; + if (key) + *key = sd->thumb.key; } EAPI void -elm_thumb_file_get(const Eo *obj, const char **file, const char **key) -{ - efl_file_get((Eo *) obj, file, key); -} - -/* Legacy deprecated functions */ -EAPI Eina_Bool -elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit) +elm_thumb_reload(Evas_Object *obj) { - evas_draggable_interface_drag_target_set(obj, edit); - return EINA_TRUE; -} + ELM_THUMB_CHECK(obj); + ELM_THUMB_DATA_GET(obj, sd); + eina_stringshare_replace(&(sd->thumb.file), NULL); + eina_stringshare_replace(&(sd->thumb.key), NULL); -EAPI Eina_Bool -elm_thumb_editable_get(const Evas_Object *obj) -{ - return evas_draggable_interface_drag_target_get(obj); + if (evas_object_visible_get(obj)) + _thumb_show(sd); } #include "elm_thumb.eo.c" diff --git a/src/lib/elementary/elm_thumb.eo b/src/lib/elementary/elm_thumb.eo index 9c1479bfbc..6e9d0e254b 100644 --- a/src/lib/elementary/elm_thumb.eo +++ b/src/lib/elementary/elm_thumb.eo @@ -1,203 +1,8 @@ -enum Elm.Thumb.Animation_Setting -{ - [[Used to set if a video thumbnail is animating or not]] - legacy: elm_thumb_animation; - start = 0, [[Play animation once]] - loop, [[Keep playing animation until stop is requested]] - stop, [[Stop playing the animation]] - last -} class Elm.Thumb (Elm.Layout, Efl.File, Evas.Clickable_Interface, Evas.Draggable_Interface) { eo_prefix: elm_obj_thumb; - methods { - @property compress { - set { - [[Set the compression for the thumb object. - - @since 1.8 - ]] - } - get { - [[Get the compression of the thumb object. - - @since 1.8 - ]] - return: void; [[Force the return type to be sure the argument - doesn't become the return]] - } - values { - compress: int; [[The compression of the thumb.]] - } - } - @property format { - set { - [[Set the format for the thumb object. - - @since 1.8 - ]] - } - get { - [[Get the format of the thumb object. - - @since 1.8 - ]] - } - values { - format: Ethumb_Thumb_Format; [[The format setting.]] - } - } - @property animate { - set { - [[Set the animation state for the thumb object. - - If its content is an animated video, you may start/stop the - animation or tell it o play continuously and looping. - ]] - } - get { - [[Get the animation state for the thumb object.]] - } - values { - setting: Elm.Thumb.Animation_Setting; [[The animation setting or - #ELM_THUMB_ANIMATION_LAST]] - } - } - @property fdo_size { - set { - [[Set the FDO size for the thumb object. - - @since 1.8 - ]] - } - get { - [[Get the fdo size of the thumb object. - - @since 1.8 - ]] - } - values { - size: Ethumb_Thumb_FDO_Size; [[The FDO size setting.]] - } - } - @property orientation { - set { - [[Set the orientation for the thumb object. - - @since 1.8 - ]] - } - get { - [[Get the orientation of the thumb object. - - @since 1.8 - ]] - } - values { - orient: Ethumb_Thumb_Orientation; [[The orientation setting.]] - } - } - @property aspect { - set { - [[Set the aspect for the thumb object. - - @since 1.8 - ]] - } - get { - [[Get the aspect of the thumb object. - - @since 1.8 - ]] - } - values { - aspect: Ethumb_Thumb_Aspect; [[The aspect setting.]] - } - } - @property quality { - set { - [[Set the quality for the thumb object. - - @since 1.8 - ]] - } - get { - [[Get the quality of the thumb object. - - @since 1.8 - ]] - return: void; - } - values { - quality: int; [[The quality of the thumb.]] - } - } - @property size { - set { - [[Set the size for the thumb object. - - @since 1.8 - ]] - } - get { - [[Get the size of the thumb object. - - @since 1.8 - ]] - } - values { - tw: int; [[The width of the thumb.]] - th: int; [[The height of the thumb.]] - } - } - @property crop_align { - set { - [[Set the crop alignment for the thumb object. - - @since 1.8 - ]] - } - get { - [[Get the crop alignment of the thumb object. - - @since 1.8 - ]] - } - values { - cropx: double; [[The x coordinate of the crop.]] - cropy: double; [[The y coordinate of the crop.]] - } - } - @property path { - get { - [[Get the path and key to the image or video thumbnail generated - by ethumb. - - One just needs to make sure that the thumbnail was generated - before getting its path; otherwise, the path will be $null. - One way to do that is by asking for the path when/after the - "generate,stop" smart callback is called. - ]] - } - values { - file: const(char)* @optional; [[Pointer to thumb path.]] - key: const(char)* @optional; [[Pointer to thumb key.]] - } - } - reload { - [[Reload thumbnail if it was generated before. - - This is useful if the ethumb client configuration changed, like its - size, aspect or any other property one set in the handle returned - by elm_thumb_ethumb_client_get(). - - If the options didn't change, the thumbnail won't be generated - again, but the old one will still be used. - ]] - } - } implements { class.constructor; Eo.Base.constructor; diff --git a/src/lib/elementary/elm_thumb_legacy.h b/src/lib/elementary/elm_thumb_legacy.h index 28b849e419..b37e395658 100644 --- a/src/lib/elementary/elm_thumb_legacy.h +++ b/src/lib/elementary/elm_thumb_legacy.h @@ -1,3 +1,16 @@ +/** Used to set if a video thumbnail is animating or not + * + * @ingroup Elm_Thumb + */ +typedef enum +{ + ELM_THUMB_ANIMATION_START = 0, /** Play animation once */ + ELM_THUMB_ANIMATION_LOOP, /** Keep playing animation until stop is requested + */ + ELM_THUMB_ANIMATION_STOP, /** Stop playing the animation */ + ELM_THUMB_ANIMATION_LAST +} Elm_Thumb_Animation_Setting; + /** * Add a new thumb object to the parent. * @@ -67,4 +80,238 @@ EAPI Eina_Bool elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit); * @ingroup Elm_Thumb */ EAPI Eina_Bool elm_thumb_editable_get(const Evas_Object *obj); + +/** + * @brief Set the compression for the thumb object. + * + * @param[in] compress The compression of the thumb. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_compress_set(Evas_Object *obj, int compress); + +/** + * @brief Get the compression of the thumb object. + * + * @param[out] compress The compression of the thumb. + * + * @return Force the return type to be sure the argument doesn't become the + * return + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_compress_get(const Evas_Object *obj, int *compress); + +/** + * @brief Set the format for the thumb object. + * + * @param[in] format The format setting. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_format_set(Evas_Object *obj, Ethumb_Thumb_Format format); + +/** + * @brief Get the format of the thumb object. + * + * @return The format setting. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI Ethumb_Thumb_Format elm_thumb_format_get(const Evas_Object *obj); + +/** + * @brief Set the animation state for the thumb object. + * + * If its content is an animated video, you may start/stop the animation or + * tell it o play continuously and looping. + * + * @param[in] setting The animation setting or #ELM_THUMB_ANIMATION_LAST + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting setting); + +/** + * @brief Get the animation state for the thumb object. + * + * @return The animation setting or #ELM_THUMB_ANIMATION_LAST + * + * @ingroup Elm_Thumb + */ +EAPI Elm_Thumb_Animation_Setting elm_thumb_animate_get(const Evas_Object *obj); + +/** + * @brief Set the FDO size for the thumb object. + * + * @param[in] size The FDO size setting. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_fdo_size_set(Evas_Object *obj, Ethumb_Thumb_FDO_Size size); + +/** + * @brief Get the fdo size of the thumb object. + * + * @return The FDO size setting. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI Ethumb_Thumb_FDO_Size elm_thumb_fdo_size_get(const Evas_Object *obj); + +/** + * @brief Set the orientation for the thumb object. + * + * @param[in] orient The orientation setting. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_orientation_set(Evas_Object *obj, Ethumb_Thumb_Orientation orient); + +/** + * @brief Get the orientation of the thumb object. + * + * @return The orientation setting. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI Ethumb_Thumb_Orientation elm_thumb_orientation_get(const Evas_Object *obj); + +/** + * @brief Set the aspect for the thumb object. + * + * @param[in] aspect The aspect setting. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_aspect_set(Evas_Object *obj, Ethumb_Thumb_Aspect aspect); + +/** + * @brief Get the aspect of the thumb object. + * + * @return The aspect setting. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI Ethumb_Thumb_Aspect elm_thumb_aspect_get(const Evas_Object *obj); + +/** + * @brief Set the quality for the thumb object. + * + * @param[in] quality The quality of the thumb. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_quality_set(Evas_Object *obj, int quality); + +/** + * @brief Get the quality of the thumb object. + * + * @param[out] quality The quality of the thumb. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_quality_get(const Evas_Object *obj, int *quality); + +/** + * @brief Set the size for the thumb object. + * + * @param[in] tw The width of the thumb. + * @param[in] th The height of the thumb. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_size_set(Evas_Object *obj, int tw, int th); + +/** + * @brief Get the size of the thumb object. + * + * @param[out] tw The width of the thumb. + * @param[out] th The height of the thumb. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_size_get(const Evas_Object *obj, int *tw, int *th); + +/** + * @brief Set the crop alignment for the thumb object. + * + * @param[in] cropx The x coordinate of the crop. + * @param[in] cropy The y coordinate of the crop. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_crop_align_set(Evas_Object *obj, double cropx, double cropy); + +/** + * @brief Get the crop alignment of the thumb object. + * + * @param[out] cropx The x coordinate of the crop. + * @param[out] cropy The y coordinate of the crop. + * + * @since 1.8 + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_crop_align_get(const Evas_Object *obj, double *cropx, double *cropy); + +/** + * @brief Get the path and key to the image or video thumbnail generated by + * ethumb. + * + * One just needs to make sure that the thumbnail was generated before getting + * its path; otherwise, the path will be @c null. One way to do that is by + * asking for the path when/after the "generate,stop" smart callback is called. + * + * @param[out] file Pointer to thumb path. + * @param[out] key Pointer to thumb key. + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key); + +/** + * @brief Reload thumbnail if it was generated before. + * + * This is useful if the ethumb client configuration changed, like its size, + * aspect or any other property one set in the handle returned by + * elm_thumb_ethumb_client_get(). + * + * If the options didn't change, the thumbnail won't be generated again, but + * the old one will still be used. + * + * @ingroup Elm_Thumb + */ +EAPI void elm_thumb_reload(Evas_Object *obj); + #include "elm_thumb.eo.legacy.h" |