[elm] Elm photocam on scrollable iface, now.

SVN revision: 73311
This commit is contained in:
Gustavo Lima Chaves 2012-07-04 21:43:29 +00:00
parent d4f88af273
commit fffbdfce6a
3 changed files with 1397 additions and 1160 deletions

View File

@ -29,7 +29,7 @@ elm_main(int argc, char **argv)
photocam = elm_photocam_add(win); photocam = elm_photocam_add(win);
snprintf(buf, sizeof(buf), "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get()); snprintf(buf, sizeof(buf), "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get());
elm_photocam_file_set(photocam, buf); elm_photocam_file_set(photocam, buf);
elm_photocam_bounce_set(photocam, EINA_FALSE, EINA_TRUE); elm_scroller_bounce_set(photocam, EINA_FALSE, EINA_TRUE);
evas_object_smart_callback_add(photocam, "loaded,detail", _bring_in, NULL); evas_object_smart_callback_add(photocam, "loaded,detail", _bring_in, NULL);
evas_object_resize(photocam, 500, 400); evas_object_resize(photocam, 500, 400);
evas_object_show(photocam); evas_object_show(photocam);

File diff suppressed because it is too large Load Diff

View File

@ -2,37 +2,53 @@
* @defgroup Photocam Photocam * @defgroup Photocam Photocam
* @ingroup Elementary * @ingroup Elementary
* *
* @image html photocam_inheritance_tree.png
* @image latex photocam_inheritance_tree.eps
*
* @image html img/widget/photocam/preview-00.png * @image html img/widget/photocam/preview-00.png
* @image latex img/widget/photocam/preview-00.eps * @image latex img/widget/photocam/preview-00.eps
* *
* This is a widget specifically for displaying high-resolution digital * Photocam is a widget meant specifically for displaying
* camera photos giving speedy feedback (fast load), low memory footprint * high-resolution digital camera photos, giving speedy feedback (fast
* and zooming and panning as well as fitting logic. It is entirely focused * load), zooming and panning as well as fitting logic, all with low
* on jpeg images, and takes advantage of properties of the jpeg format (via * memory footprint. It is entirely focused on @b jpeg images, and
* evas loader features in the jpeg loader). * takes advantage of properties of the jpeg format (via Evas loader
* features in the jpeg loader).
* *
* Signals that you can add callbacks for are: * Signals that you can add callbacks for are:
* @li "clicked" - This is called when a user has clicked the photo without * @li @c "clicked" - This is called when a user has clicked the photo
* dragging around. * without dragging around.
* @li "press" - This is called when a user has pressed down on the photo. * @li @c "press" - This is called when a user has pressed down on the
* @li "longpressed" - This is called when a user has pressed down on the * photo.
* photo for a long time without dragging around. * @li @c "longpressed" - This is called when a user has pressed down
* @li "clicked,double" - This is called when a user has double-clicked the * on the photo for a long time without dragging around.
* photo. * @li @c "clicked,double" - This is called when a user has
* @li "load" - Photo load begins. * double-clicked the photo.
* @li "loaded" - This is called when the image file load is complete for the * @li @c "load" - Photo load begins.
* first view (low resolution blurry version). * @li @c "loaded" - This is called when the image file load is
* @li "load,detail" - Photo detailed data load begins. * complete for the first view (low resolution blurry version).
* @li "loaded,detail" - This is called when the image file load is complete * @li @c "load,detail" - Photo detailed data load begins.
* for the detailed image data (full resolution needed). * @li @c "loaded,detail" - This is called when the image file load is
* @li "zoom,start" - Zoom animation started. * complete for the detailed image data (full resolution
* @li "zoom,stop" - Zoom animation stopped. * needed).
* @li "zoom,change" - Zoom changed when using an auto zoom mode. * @li @c "zoom,start" - Zoom animation started.
* @li "scroll" - the content has been scrolled (moved) * @li @c "zoom,stop" - Zoom animation stopped.
* @li "scroll,anim,start" - scrolling animation has started * @li @c "zoom,change" - Zoom changed when using an auto zoom mode.
* @li "scroll,anim,stop" - scrolling animation has stopped * @li @c "scroll" - the content has been scrolled (moved)
* @li "scroll,drag,start" - dragging the contents around has started * @li @c "scroll,anim,start" - scrolling animation has started
* @li "scroll,drag,stop" - dragging the contents around has stopped * @li @c "scroll,anim,stop" - scrolling animation has stopped
* @li @c "scroll,drag,start" - dragging the contents around has started
* @li @c "scroll,drag,stop" - dragging the contents around has stopped
*
* This widget implements the @b @ref elm-scrollable-interface
* interface, so that all (non-deprecated) functions for the base @ref
* Scroller widget also work for photocam objects.
*
* Some calls on the photocam's API are marked as @b deprecated, as
* they just wrap the scrollable widgets counterpart functions. Use
* the ones we point you to, for each case of deprecation here,
* instead -- eventually the deprecated ones will be discarded (next
* major release).
* *
* @ref tutorial_photocam shows the API in action. * @ref tutorial_photocam shows the API in action.
* @{ * @{
@ -270,9 +286,11 @@ EAPI Evas_Object *elm_photocam_internal_image_get(const Evas_Object *o
* @param h_bounce set this to @c EINA_TRUE for horizontal bouncing * @param h_bounce set this to @c EINA_TRUE for horizontal bouncing
* @param v_bounce set this to @c EINA_TRUE for vertical bouncing * @param v_bounce set this to @c EINA_TRUE for vertical bouncing
* *
* @deprecated Use elm_scroller_bounce_set() instead.
*
* @ingroup Photocam * @ingroup Photocam
*/ */
EAPI void elm_photocam_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce); EINA_DEPRECATED EAPI void elm_photocam_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
/** /**
* @brief Get the photocam scrolling bouncing. * @brief Get the photocam scrolling bouncing.
@ -283,9 +301,11 @@ EAPI void elm_photocam_bounce_set(Evas_Object *obj, Eina_Bool
* *
* @see elm_photocam_bounce_set() * @see elm_photocam_bounce_set()
* *
* @deprecated Use elm_scroller_bounce_get() instead.
*
* @ingroup Photocam * @ingroup Photocam
*/ */
EAPI void elm_photocam_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce); EINA_DEPRECATED EAPI void elm_photocam_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
/** /**
* @brief Set the gesture state for photocam. * @brief Set the gesture state for photocam.