Elementary: photocam documentation.

SVN revision: 61821
This commit is contained in:
Jonas M. Gastal 2011-07-27 20:36:47 +00:00
parent 4804b51338
commit 53c54e0b6d
9 changed files with 388 additions and 245 deletions

View File

@ -61,7 +61,8 @@ WGT_PREVIEW = \
progressbar:preview-00.png:widget_preview_progressbar:150:50 \
box:preview-00.png:widget_preview_box:200:160 \
notify:preview-00.png:widget_preview_notify:60:30 \
slideshow:preview-00.png:widget_preview_slideshow:50:50
slideshow:preview-00.png:widget_preview_slideshow:50:50 \
photocam:preview-00.png:widget_preview_photocam:243:162
widget-build:
@$(MAKE) -C widgets

View File

@ -4713,6 +4713,56 @@
* @example slideshow_example.c
*/
/**
* @page tutorial_photocam Photocam example
* @dontinclude photocam_example_01.c
*
* In this example we will have a photocam and a couple of buttons and slider to
* control the photocam. To avoid cluttering we'll only show the parts of the
* example that relate to the photocam, the full source code can be seen @ref
* photocam_example_01.c "here".
*
* Creating a photocam is as easy as creating any other widget:
* @skipline elm_photocam_add
*
* A photocam is only useful if we have a image on it, so lets set a file for it
* to work with:
* @until file_set
*
* We now set the photocam to not bounce horizontally:
* @until bounce_set
*
* And we want to know when the photocam has finished loading the image so:
* @until smart_callback
*
* The reason to know when the image is loaded is so that we can bring the
* center of the image into view:
* @skip static
* @until }
*
* As mentioned we have 2 buttons in this example, the "Fit" one will cause
* the photocam to go in to a zoom mode that makes the image fit inside the
* photocam. Tough this has no effect on the image we also print what region was
* being viewed before setting the zoom mode:
* @until }
* @note When in fit mode our slider(explained below) won't work.
*
* The second button("Unfit") will bring the photocam back into manual zoom
* mode:
* @until }
*
* Our slider controls the level of zoom of the photocam:
* @until }
* @note It is important to note that this only works when in manual zoom mode.
*
* Our example will initially look like this:
*
* @image html screenshots/photocam_example_01.png
* @image latex screenshots/photocam_example_01.eps width=\textwidth
*
* @example photocam_example_01.c
*/
/**
* @page bg_example_01_c bg_example_01.c
* @include bg_example_01.c

View File

@ -155,6 +155,9 @@
* @image latex img/panes.eps
* @li @ref Photo
* @li @ref Photocam
*
* @image html img/widget/photocam/preview-00.png
* @image latex img/widget/photocam/preview-00.eps
* @li @ref Progressbar
*
* @image html img/widget/progressbar/preview-00.png

View File

@ -77,7 +77,8 @@ widget_preview_gengrid \
widget_preview_progressbar \
widget_preview_box \
widget_preview_notify \
widget_preview_slideshow
widget_preview_slideshow \
widget_preview_photocam
LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@ @ELEMENTARY_EDBUS_LIBS@ @ELEMENTARY_EFREET_LIBS@ @ELEMENTARY_EMAP_LIBS@ @ELEMENTARY_LIBS@ @EIO_LIBS@ @my_libs@
@ -136,5 +137,6 @@ EXTRA_DIST = \
widget_preview_box.c \
widget_preview_notify.c \
widget_preview_slideshow.c \
widget_preview_photocam.c \
widget_preview_tmpl_foot.c \
widget_preview_tmpl_head.c

View File

@ -0,0 +1,10 @@
#include "widget_preview_tmpl_head.c"
Evas_Object *o = elm_photocam_add(win);
elm_photocam_file_set(o, PACKAGE_DATA_DIR"/images/insanely_huge_test_image.jpg");
elm_photocam_zoom_mode_set(o, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, o);
evas_object_show(o);
#include "widget_preview_tmpl_foot.c"

View File

@ -95,7 +95,8 @@ SRCS = \
entry_example.c \
slideshow_example.c \
progressbar_example.c \
notify_example_01.c
notify_example_01.c \
photocam_example_01.c
pkglib_PROGRAMS =
@ -180,7 +181,8 @@ pkglib_PROGRAMS += \
entry_example \
slideshow_example \
progressbar_example \
notify_example_01
notify_example_01 \
photocam_example_01
# This variable will hold the list of screenshots that will be made
# by "make screenshots". Each item in the list is of the form:
@ -238,7 +240,8 @@ SCREENSHOTS = \
progressbar_example:progressbar_example.png:0.0 \
notify_example_01:notify_example_01.png:0.0 \
notify_example_01:notify_example_01_a.png:6.0 \
slideshow_example:slideshow_example.png:1.0
slideshow_example:slideshow_example.png:1.0 \
photocam_example_01:photocam_example_01.png:3
HTML_SS_DIR=$(top_builddir)/doc/html/screenshots
LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots

View File

@ -0,0 +1,93 @@
//Compile with:
//gcc -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\"" photocam_example_01.c -o photocam_example_01
#include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
static void _fit(void *data, Evas_Object *obj, void *event_info);
static void _unfit(void *data, Evas_Object *obj, void *event_info);
static void _zoom(void *data, Evas_Object *obj, void *event_info);
static void _bring_in(void *data, Evas_Object *obj, void *event_info);
EAPI int
elm_main(int argc, char **argv)
{
Evas_Object *win, *bg, *bx, *obj, *photocam;
win = elm_win_add(NULL, "photocam", ELM_WIN_BASIC);
elm_win_title_set(win, "Photocam");
elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
evas_object_show(bg);
photocam = elm_photocam_add(win);
elm_photocam_file_set(photocam, PACKAGE_DATA_DIR"/images/insanely_huge_test_image.jpg");
elm_photocam_bounce_set(photocam, EINA_FALSE, EINA_TRUE);
evas_object_smart_callback_add(photocam, "loaded,detail", _bring_in, NULL);
evas_object_resize(photocam, 500, 400);
evas_object_show(photocam);
obj = elm_button_add(win);
elm_object_text_set(obj, "Fit");
evas_object_show(obj);
evas_object_resize(obj, 50, 30);
evas_object_move(obj, 10, 410);
evas_object_smart_callback_add(obj, "clicked", _fit, photocam);
obj = elm_button_add(win);
elm_object_text_set(obj, "Unfit");
evas_object_show(obj);
evas_object_resize(obj, 70, 30);
evas_object_move(obj, 70, 410);
evas_object_smart_callback_add(obj, "clicked", _unfit, photocam);
obj = elm_slider_add(win);
elm_object_text_set(obj, "Zoom");
evas_object_show(obj);
evas_object_resize(obj, 300, 30);
evas_object_move(obj, 150, 410);
evas_object_smart_callback_add(obj, "changed", _zoom, photocam);
evas_object_resize(win, 500, 440);
evas_object_show(win);
elm_run();
return 0;
}
ELM_MAIN()
static void
_bring_in(void *data, Evas_Object *obj, void *event_info)
{
int w, h;
elm_photocam_image_size_get(obj, &w, &h);
elm_photocam_image_region_bring_in(obj, w/2, h/2, 500, 400);
}
static void
_fit(void *data, Evas_Object *obj, void *event_info)
{
int x, y, w, h;
elm_photocam_region_get(data, &x, &y, &w, &h);
printf("region: {%d, %d, %d, %d}\n", x, y, w, h);
elm_photocam_zoom_mode_set(data, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
}
static void
_unfit(void *data, Evas_Object *obj, void *event_info)
{
elm_photocam_zoom_mode_set(data, ELM_PHOTOCAM_ZOOM_MODE_MANUAL);
}
static void
_zoom(void *data, Evas_Object *obj, void *event_info)
{
double z = elm_slider_value_get(obj) * 8;
elm_photocam_zoom_set(data, z);
}

View File

@ -14416,48 +14416,245 @@ extern "C" {
* @}
*/
/* photocam */
/**
* @defgroup Photocam Photocam
*
* @image html img/widget/photocam/preview-00.png
* @image latex img/widget/photocam/preview-00.eps
*
* This is a widget specifically for displaying high-resolution digital
* camera photos giving speedy feedback (fast load), low memory footprint
* and zooming and panning as well as fitting logic. It is entirely focused
* on jpeg images, and takes advantage of properties of the jpeg format (via
* evas loader features in the jpeg loader).
*
* Signals that you can add callbacks for are:
* @li "clicked" - This is called when a user has clicked the photo without
* dragging around.
* @li "press" - This is called when a user has pressed down on the photo.
* @li "longpressed" - This is called when a user has pressed down on the
* photo for a long time without dragging around.
* @li "clicked,double" - This is called when a user has double-clicked the
* photo.
* @li "load" - Photo load begins.
* @li "loaded" - This is called when the image file load is complete for the
* first view (low resolution blurry version).
* @li "load,detail" - Photo detailed data load begins.
* @li "loaded,detail" - This is called when the image file load is complete
* for the detailed image data (full resolution needed).
* @li "zoom,start" - Zoom animation started.
* @li "zoom,stop" - Zoom animation stopped.
* @li "zoom,change" - Zoom changed when using an auto zoom mode.
* @li "scroll" - the content has been scrolled (moved)
* @li "scroll,anim,start" - scrolling animation has started
* @li "scroll,anim,stop" - scrolling animation has stopped
* @li "scroll,drag,start" - dragging the contents around has started
* @li "scroll,drag,stop" - dragging the contents around has stopped
*
* @ref tutorial_photocam shows the API in action.
* @{
*/
/**
* @brief Types of zoom available.
*/
typedef enum _Elm_Photocam_Zoom_Mode
{
ELM_PHOTOCAM_ZOOM_MODE_MANUAL = 0,
ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT,
ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL,
ELM_PHOTOCAM_ZOOM_MODE_MANUAL = 0, /**< Zoom controled normally by elm_photocam_zoom_set */
ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT, /**< Zoom until photo fits in photocam */
ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL, /**< Zoom until photo fills photocam */
ELM_PHOTOCAM_ZOOM_MODE_LAST
} Elm_Photocam_Zoom_Mode;
/**
* @brief Add a new Photocam object
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*/
EAPI Evas_Object *elm_photocam_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
* @brief Set the photo file to be shown
*
* @param obj The photocam object
* @param file The photo file
* @return The return error (see EVAS_LOAD_ERROR_NONE, EVAS_LOAD_ERROR_GENERIC etc.)
*
* This sets (and shows) the specified file (with a relative or absolute
* path) and will return a load error (same error that
* evas_object_image_load_error_get() will return). The image will change and
* adjust its size at this point and begin a background load process for this
* photo that at some time in the future will be displayed at the full
* quality needed.
*/
EAPI Evas_Load_Error elm_photocam_file_set(Evas_Object *obj, const char *file) EINA_ARG_NONNULL(1);
/**
* @brief Returns the path of the current image file
*
* @param obj The photocam object
* @return Returns the path
*
* @see elm_photocam_file_set()
*/
EAPI const char *elm_photocam_file_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Set the zoom level of the photo
*
* @param obj The photocam object
* @param zoom The zoom level to set
*
* This sets the zoom level. 1 will be 1:1 pixel for pixel. 2 will be 2:1
* (that is 2x2 photo pixels will display as 1 on-screen pixel). 4:1 will be
* 4x4 photo pixels as 1 screen pixel, and so on. The @p zoom parameter must
* be greater than 0. It is usggested to stick to powers of 2. (1, 2, 4, 8,
* 16, 32, etc.).
*/
EAPI void elm_photocam_zoom_set(Evas_Object *obj, double zoom) EINA_ARG_NONNULL(1);
/**
* @brief Get the zoom level of the photo
*
* @param obj The photocam object
* @return The current zoom level
*
* This returns the current zoom level of the photocam object. Note that if
* you set the fill mode to other than ELM_PHOTOCAM_ZOOM_MODE_MANUAL
* (which is the default), the zoom level may be changed at any time by the
* photocam object itself to account for photo size and photocam viewpoer
* size.
*
* @see elm_photocam_zoom_set()
* @see elm_photocam_zoom_mode_set()
*/
EAPI double elm_photocam_zoom_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Set the zoom mode
*
* @param obj The photocam object
* @param mode The desired mode
*
* This sets the zoom mode to manual or one of several automatic levels.
* Manual (ELM_PHOTOCAM_ZOOM_MODE_MANUAL) means that zoom is set manually by
* elm_photocam_zoom_set() and will stay at that level until changed by code
* or until zoom mode is changed. This is the default mode. The Automatic
* modes will allow the photocam object to automatically adjust zoom mode
* based on properties. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT) will adjust zoom so
* the photo fits EXACTLY inside the scroll frame with no pixels outside this
* area. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL will be similar but ensure no
* pixels within the frame are left unfilled.
*/
EAPI void elm_photocam_zoom_mode_set(Evas_Object *obj, Elm_Photocam_Zoom_Mode mode) EINA_ARG_NONNULL(1);
/**
* @brief Get the zoom mode
*
* @param obj The photocam object
* @return The current zoom mode
*
* This gets the current zoom mode of the photocam object.
*
* @see elm_photocam_zoom_mode_set()
*/
EAPI Elm_Photocam_Zoom_Mode elm_photocam_zoom_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Get the current image pixel width and height
*
* @param obj The photocam object
* @param w A pointer to the width return
* @param h A pointer to the height return
*
* This gets the current photo pixel width and height (for the original).
* The size will be returned in the integers @p w and @p h that are pointed
* to.
*/
EAPI void elm_photocam_image_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
/**
* @brief Get the area of the image that is currently shown
*
* @param obj
* @param x A pointer to the X-coordinate of region
* @param y A pointer to the Y-coordinate of region
* @param w A pointer to the width
* @param h A pointer to the height
*
* @see elm_photocam_image_region_show()
* @see elm_photocam_image_region_bring_in()
*/
EAPI void elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
/**
* @brief Set the viewed portion of the image
*
* @param obj The photocam object
* @param x X-coordinate of region in image original pixels
* @param y Y-coordinate of region in image original pixels
* @param w Width of region in image original pixels
* @param h Height of region in image original pixels
*
* This shows the region of the image without using animation.
*/
EAPI void elm_photocam_image_region_show(Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
/**
* @brief Bring in the viewed portion of the image
*
* @param obj The photocam object
* @param x X-coordinate of region in image original pixels
* @param y Y-coordinate of region in image original pixels
* @param w Width of region in image original pixels
* @param h Height of region in image original pixels
*
* This shows the region of the image using animation.
*/
EAPI void elm_photocam_image_region_bring_in(Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
/**
* @brief Set the paused state for photocam
*
* @param obj The photocam object
* @param paused The pause state to set
*
* This sets the paused state to on(EINA_TRUE) or off (EINA_FALSE) for
* photocam. The default is off. This will stop zooming using animation on
* zoom levels changes and change instantly. This will stop any existing
* animations that are running.
*/
EAPI void elm_photocam_paused_set(Evas_Object *obj, Eina_Bool paused) EINA_ARG_NONNULL(1);
/**
* @brief Get the paused state for photocam
*
* @param obj The photocam object
* @return The current paused state
*
* This gets the current paused state for the photocam object.
*
* @see elm_photocam_paused_set()
*/
EAPI Eina_Bool elm_photocam_paused_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Get the internal low-res image used for photocam
*
* @param obj The photocam object
* @return The internal image object handle, or NULL if none exists
*
* This gets the internal image object inside photocam. Do not modify it. It
* is for inspection only, and hooking callbacks to. Nothing else. It may be
* deleted at any time as well.
*/
EAPI Evas_Object *elm_photocam_internal_image_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Set the photocam scrolling bouncing.
*
* @param obj The photocam object
* @param h_bounce bouncing for horizontal
* @param v_bounce bouncing for vertical
*/
EAPI void elm_photocam_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
/**
* @brief Get the photocam scrolling bouncing.
*
* @param obj The photocam object
* @param h_bounce bouncing for horizontal
* @param v_bounce bouncing for vertical
*
* @see elm_photocam_bounce_set()
*/
EAPI void elm_photocam_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
/* smart callbacks called:
* "clicked" - when image clicked
* "press" - when mouse/finger held down initially on image
* "longpressed" - when mouse/finger held for long time on image
* "clicked,double" - when mouse/finger double-clicked
* "load" - when photo load begins
* "loaded" - when photo load done
* "load,detail" - when detailed image load begins
* "loaded,detail" - when detailed image load done
* "zoom,start" - when zooming started
* "zoom,stop" - when zooming stopped
* "zoom,change" - when auto zoom mode changed zoom level
* "scroll - the content has been scrolled (moved)
* "scroll,anim,start" - scrolling animation has started
* "scroll,anim,stop" - scrolling animation has stopped
* "scroll,drag,start" - dragging the contents around has started
* "scroll,drag,stop" - dragging the contents around has stopped
/**
* @}
*/
/* map */

View File

@ -1,48 +1,15 @@
#include <Elementary.h>
#include "elm_priv.h"
/**
* @defgroup Photocam Photocam
*
* This is a widget specifically for displaying high-resolution digital
* camera photos giving speedy feedback (fast load), low memory footprint
* and zooming and panning as well as fitting logic. It is entirely focused
* on jpeg images, and takes advantage of properties of the jpeg format (via
* evas loader features in the jpeg loader).
*
* Signals that you can add callbacks for are:
*
* "clicked" - This is called when a user has clicked the photo without dragging
* around.
* "press" - This is called when a user has pressed down on the photo.
* "longpressed" - This is called when a user has pressed down on the photo for
* a long time without dragging around.
* "clicked,double" - This is called when a user has double-clicked the photo.
* "load" - Photo load begins.
* "loaded" - This is called when the image file load is complete for the first
* view (low resolution blurry version).
* "load,detail" - Photo detailed data load begins.
* "loaded,detail" - This is called when the image file load is complete for
* the detailed image data (full resolution needed).
* "zoom,start" - Zoom animation started.
* "zoom,stop" - Zoom animation stopped.
* "zoom,change" - Zoom changed when using an auto zoom mode.
* "scroll" - the content has been scrolled (moved)
* "scroll,anim,start" - scrolling animation has started
* "scroll,anim,stop" - scrolling animation has stopped
* "scroll,drag,start" - dragging the contents around has started
* "scroll,drag,stop" - dragging the contents around has stopped
*
* ---
*
/*
* TODO (maybe - optional future stuff):
*
* 1. wrap photo in theme edje so u can have styling around photo (like white
* photo bordering).
* 2. exif handling
* 3. rotation flags in exif handling (nasty! should have rot in evas)
*
*/
typedef struct _Widget_Data Widget_Data;
typedef struct _Pan Pan;
typedef struct _Grid Grid;
@ -1067,14 +1034,6 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__,
return EINA_TRUE;
}
/**
* Add a new Photocam object
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @ingroup Photocam
*/
EAPI Evas_Object *
elm_photocam_add(Evas_Object *parent)
{
@ -1175,22 +1134,6 @@ elm_photocam_add(Evas_Object *parent)
return obj;
}
/**
* Set the photo file to be shown
*
* This sets (and shows) the specified file (with a relative or absolute path)
* and will return a load error (same error that
* evas_object_image_load_error_get() will return). The image will change and
* adjust its size at this point and begin a background load process for this
* photo that at some time in the future will be displayed at the full quality
* needed.
*
* @param obj The photocam object
* @param file The photo file
* @return The return error (see EVAS_LOAD_ERROR_NONE, EVAS_LOAD_ERROR_GENERIC etc.)
*
* @ingroup Photocam
*/
EAPI Evas_Load_Error
elm_photocam_file_set(Evas_Object *obj, const char *file)
{
@ -1241,14 +1184,6 @@ elm_photocam_file_set(Evas_Object *obj, const char *file)
return evas_object_image_load_error_get(wd->img);
}
/*
* Returns the path of the current image file
*
* @param obj The photocam object
* @return Returns the path
*
* @ingroup Photocam
*/
EAPI const char *
elm_photocam_file_get(const Evas_Object *obj)
{
@ -1258,20 +1193,6 @@ elm_photocam_file_get(const Evas_Object *obj)
return wd->file;
}
/**
* Set the zoom level of the photo
*
* This sets the zoom level. 1 will be 1:1 pixel for pixel. 2 will be 2:1
* (that is 2x2 photo pixels will display as 1 on-screen pixel). 4:1 will be
* 4x4 photo pixels as 1 screen pixel, and so on. The @p zoom parameter must
* be greater than 0. It is usggested to stick to powers of 2. (1, 2, 4, 8,
* 16, 32, etc.).
*
* @param obj The photocam object
* @param zoom The zoom level to set
*
* @ingroup Photocam
*/
EAPI void
elm_photocam_zoom_set(Evas_Object *obj, double zoom)
{
@ -1457,19 +1378,6 @@ done:
evas_object_smart_callback_call(obj, SIG_ZOOM_CHANGE, NULL);
}
/**
* Get the zoom level of the photo
*
* This returns the current zoom level of the photocam object. Note that if
* you set the fill mode to other than ELM_PHOTOCAM_ZOOM_MODE_MANUAL
* (which is the default), the zoom level may be changed at any time by the
* photocam object itself to account for photo size and photocam viewpoer size
*
* @param obj The photocam object
* @return The current zoom level
*
* @ingroup Photocam
*/
EAPI double
elm_photocam_zoom_get(const Evas_Object *obj)
{
@ -1479,24 +1387,6 @@ elm_photocam_zoom_get(const Evas_Object *obj)
return wd->zoom;
}
/**
* Set the zoom mode
*
* This sets the zoom mode to manual or one of several automatic levels.
* Manual (ELM_PHOTOCAM_ZOOM_MODE_MANUAL) means that zoom is set manually by
* elm_photocam_zoom_set() and will stay at that level until changed by code
* or until zoom mode is changed. This is the default mode.
* The Automatic modes will allow the photocam object to automatically
* adjust zoom mode based on properties. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT) will
* adjust zoom so the photo fits EXACTLY inside the scroll frame with no pixels
* outside this area. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL will be similar but
* ensure no pixels within the frame are left unfilled.
*
* @param obj The photocam object
* @param mode The desired mode
*
* @ingroup Photocam
*/
EAPI void
elm_photocam_zoom_mode_set(Evas_Object *obj, Elm_Photocam_Zoom_Mode mode)
{
@ -1512,16 +1402,6 @@ elm_photocam_zoom_mode_set(Evas_Object *obj, Elm_Photocam_Zoom_Mode mode)
}
}
/**
* Get the zoom mode
*
* This gets the current zoom mode of the photocam object
*
* @param obj The photocam object
* @return The current zoom mode
*
* @ingroup Photocam
*/
EAPI Elm_Photocam_Zoom_Mode
elm_photocam_zoom_mode_get(const Evas_Object *obj)
{
@ -1531,19 +1411,6 @@ elm_photocam_zoom_mode_get(const Evas_Object *obj)
return wd->mode;
}
/**
* Get the current image pixel width and height
*
* This gets the current photo pixel width and height (for the original).
* The size will be returned in the integers @p w and @p h that are pointed
* to.
*
* @param obj The photocam object
* @param w A pointer to the width return
* @param h A pointer to the height return
*
* @ingroup Photocam
*/
EAPI void
elm_photocam_image_size_get(const Evas_Object *obj, int *w, int *h)
{
@ -1554,12 +1421,6 @@ elm_photocam_image_size_get(const Evas_Object *obj, int *w, int *h)
if (h) *h = wd->size.imh;
}
/**
* Get the current area of the image that is currently shown
*
* This gets the region
*
*/
EAPI void
elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
{
@ -1612,19 +1473,6 @@ elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
}
}
/**
* Set the viewed portion of the image
*
* This sets the region of the image to be viewed
*
* @param obj The photocam object
* @param x X-coordinate of region in image original pixels
* @param y Y-coordinate of region in image original pixels
* @param w Width of region in image original pixels
* @param h Height of region in image original pixels
*
* @ingroup Photocam
*/
EAPI void
elm_photocam_image_region_show(Evas_Object *obj, int x, int y, int w, int h __UNUSED__)
{
@ -1652,19 +1500,6 @@ elm_photocam_image_region_show(Evas_Object *obj, int x, int y, int w, int h __UN
elm_smart_scroller_child_region_show(wd->scr, rx, ry, rw, rh);
}
/**
* Bring in the viewed portion of the image
*
* This brings in the region of the image over time
*
* @param obj The photocam object
* @param x X-coordinate of region in image original pixels
* @param y Y-coordinate of region in image original pixels
* @param w Width of region in image original pixels
* @param h Height of region in image original pixels
*
* @ingroup Photocam
*/
EAPI void
elm_photocam_image_region_bring_in(Evas_Object *obj, int x, int y, int w, int h __UNUSED__)
{
@ -1693,18 +1528,6 @@ elm_photocam_image_region_bring_in(Evas_Object *obj, int x, int y, int w, int h
elm_smart_scroller_region_bring_in(wd->scr, rx, ry, rw, rh);
}
/**
* Set the paused state for photocam
*
* This sets the paused state to on (1) or off (0) for photocam. The default
* is on. This will stop zooming using animation ch change zoom levels and
* change instantly. This will stop any existing animations that are running.
*
* @param obj The photocam object
* @param paused The pause state to set
*
* @ingroup Photocam
*/
EAPI void
elm_photocam_paused_set(Evas_Object *obj, Eina_Bool paused)
{
@ -1725,16 +1548,6 @@ elm_photocam_paused_set(Evas_Object *obj, Eina_Bool paused)
}
}
/**
* Get the paused state for photocam
*
* This gets the current paused state for the photocam object.
*
* @param obj The photocam object
* @return The current paused state
*
* @ingroup Photocam
*/
EAPI Eina_Bool
elm_photocam_paused_get(const Evas_Object *obj)
{
@ -1744,18 +1557,6 @@ elm_photocam_paused_get(const Evas_Object *obj)
return wd->paused;
}
/**
* Get the internal low-res image used for photocam
*
* This gets the internal image object inside photocam. Do not modify it. It
* is for inspection only, and hooking callbacks to. Nothing else. It may be
* deleted at any time as well.
*
* @param obj The photocam object
* @return The internal image object handle, or NULL if none exists
*
* @ingroup Photocam
*/
EAPI Evas_Object *
elm_photocam_internal_image_get(const Evas_Object *obj)
{
@ -1765,14 +1566,6 @@ elm_photocam_internal_image_get(const Evas_Object *obj)
return wd->img;
}
/**
* Set the photocam scrolling bouncing.
*
* @param obj The photocam object
* @param h_bounce bouncing for horizontal
* @param v_bounce bouncing for vertical
* @ingroup Photocam
*/
EAPI void
elm_photocam_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
{
@ -1782,15 +1575,6 @@ elm_photocam_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce
elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
}
/**
* Get the photocam scrolling bouncing.
*
* @param obj The photocam object
* @param h_bounce bouncing for horizontal
* @param v_bounce bouncing for vertical
* @ingroup Photocam
*/
EAPI void
elm_photocam_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
{