|
EINA_DEPRECATED void | elm_photocam_bounce_set (Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) |
| Set the photocam scrolling bouncing. More...
|
|
EINA_DEPRECATED void | elm_photocam_bounce_get (const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) |
| Get the photocam scrolling bouncing. More...
|
|
void | elm_photocam::image_region_show (int x_, int y_, int w_, int h_) const |
| Set the viewed region of the image. More...
|
|
bool | elm_photocam::paused_get () const |
| Get the paused state for photocam. More...
|
|
void | elm_photocam::paused_set (bool paused_) const |
| Get the paused state for photocam. More...
|
|
std::string | elm_photocam::file_get () const |
| Returns the path of the current image file. More...
|
|
Evas_Load_Error | elm_photocam::file_set (std::string file_) const |
| Returns the path of the current image file. More...
|
|
bool | elm_photocam::gesture_enabled_get () const |
| Get the gesture state for photocam. More...
|
|
void | elm_photocam::gesture_enabled_set (bool gesture_) const |
| Get the gesture state for photocam. More...
|
|
double | elm_photocam::zoom_get () const |
| Get the zoom level of the photo. More...
|
|
void | elm_photocam::zoom_set (double zoom_) const |
| Get the zoom level of the photo. More...
|
|
Elm_Photocam_Zoom_Mode | elm_photocam::zoom_mode_get () const |
| Get the zoom mode. More...
|
|
void | elm_photocam::zoom_mode_set (Elm_Photocam_Zoom_Mode mode_) const |
| Get the zoom mode. More...
|
|
void | elm_photocam::image_region_get (int *x_, int *y_, int *w_, int *h_) const |
| Get the region of the image that is currently shown. More...
|
|
evas::object | elm_photocam::internal_image_get () const |
| Get the internal low-res image used for photocam. More...
|
|
void | elm_photocam::image_size_get (int *w_, int *h_) const |
| Get the current image pixel width and height. More...
|
|
Evas_Object * | elm_photocam_add (Evas_Object *parent) |
| Add a new Photocam object. More...
|
|
void | elm_photocam_image_region_bring_in (Evas_Object *obj, int x, int y, int w, int h) |
| Bring in the viewed portion of the image. More...
|
|
Evas_Load_Error | elm_photocam_file_set (Evas_Object *obj, const char *file) |
| Set the photo file to be shown. More...
|
|
const char * | elm_photocam_file_get (const Evas_Object *obj) |
| Returns the path of the current image file. More...
|
|
Photocam is a widget meant specifically for displaying high-resolution digital camera photos, giving speedy feedback (fast load), zooming and panning as well as fitting logic, all with low memory footprint. 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
"focused"
- When the photocam has received focus. (since 1.8)
"unfocused"
- When the photocam has lost focus. (since 1.8)
This widget implements the elm-scrollable-interface interface, so that all (non-deprecated) functions for the base Scroller widget also work for photocam objects.
Some calls on the photocam's API are marked as 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).
Photocam example shows the API in action.
Structre associated with smart callback 'download,error'.
- Since
- 1.8
Structure associated with smart callback 'download,progress'.
- Since
- 1.8
Types of zoom available.
Enumerator |
---|
ELM_PHOTOCAM_ZOOM_MODE_MANUAL |
Zoom controlled 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_AUTO_FIT_IN |
Zoom in until photo fits in photocam.
|
Evas_Object* elm_photocam_add |
( |
Evas_Object * |
parent | ) |
|
Add a new Photocam object.
- Parameters
-
- Returns
- The new object or NULL if it cannot be created
EINA_DEPRECATED void elm_photocam_bounce_get |
( |
const Evas_Object * |
obj, |
|
|
Eina_Bool * |
h_bounce, |
|
|
Eina_Bool * |
v_bounce |
|
) |
| |
EINA_DEPRECATED void elm_photocam_bounce_set |
( |
Evas_Object * |
obj, |
|
|
Eina_Bool |
h_bounce, |
|
|
Eina_Bool |
v_bounce |
|
) |
| |
const char* elm_photocam_file_get |
( |
const Evas_Object * |
obj | ) |
|
Evas_Load_Error elm_photocam_file_set |
( |
Evas_Object * |
obj, |
|
|
const char * |
file |
|
) |
| |
Set the photo file to be shown.
- Returns
- 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.
- Parameters
-
- Examples:
- photocam_example_01.c.
void elm_photocam_image_region_bring_in |
( |
Evas_Object * |
obj, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
Bring in the viewed portion of the image.
- Parameters
-
obj | The photocam object |
x | X-coordinate of region in image original pixels |
y | Y-coordinate of region in image original pixels |
w | Width of region in image original pixels |
h | Height of region in image original pixels |
This shows the region of the image using animation.
References elm_interface_scrollable_region_bring_in().
std::string elm_photocam::file_get |
( |
| ) |
const |
|
inline |
Evas_Load_Error elm_photocam::file_set |
( |
std::string |
file_ | ) |
const |
|
inline |
bool elm_photocam::gesture_enabled_get |
( |
| ) |
const |
|
inline |
Get the gesture state for photocam.
- Returns
- The current gesture state
This gets the current gesture state for the photocam object.
- See also
- elm_photocam_gesture_enabled_set()
- Parameters
-
gesture | The gesture state to set |
void elm_photocam::gesture_enabled_set |
( |
bool |
gesture_ | ) |
const |
|
inline |
Get the gesture state for photocam.
- Returns
- The current gesture state
This gets the current gesture state for the photocam object.
- See also
- elm_photocam_gesture_enabled_set()
- Parameters
-
gesture | The gesture state to set |
void elm_photocam::image_region_get |
( |
int * |
x_, |
|
|
int * |
y_, |
|
|
int * |
w_, |
|
|
int * |
h_ |
|
) |
| const |
|
inline |
Get the region of the image that is currently shown.
- See also
- elm_photocam_image_region_show()
-
elm_photocam_image_region_bring_in()
- Parameters
-
x | A pointer to the X-coordinate of region |
y | A pointer to the Y-coordinate of region |
w | A pointer to the width |
h | A pointer to the height |
void elm_photocam::image_region_show |
( |
int |
x_, |
|
|
int |
y_, |
|
|
int |
w_, |
|
|
int |
h_ |
|
) |
| const |
|
inline |
Set the viewed region of the image.
This shows the region of the image without using animation.
- Parameters
-
x | X-coordinate of region in image original pixels |
y | Y-coordinate of region in image original pixels |
w | Width of region in image original pixels |
h | Height of region in image original pixels |
void elm_photocam::image_size_get |
( |
int * |
w_, |
|
|
int * |
h_ |
|
) |
| const |
|
inline |
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 w
and h
that are pointed to.
- Parameters
-
w | A pointer to the width return |
h | A pointer to the height return |
evas::object elm_photocam::internal_image_get |
( |
| ) |
const |
|
inline |
Get the internal low-res image used for photocam.
- Returns
- 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.
bool elm_photocam::paused_get |
( |
| ) |
const |
|
inline |
Get the paused state for photocam.
- Returns
- The current paused state
This gets the current paused state for the photocam object.
- See also
- elm_photocam_paused_set()
- Parameters
-
paused | The pause state to set |
void elm_photocam::paused_set |
( |
bool |
paused_ | ) |
const |
|
inline |
Get the paused state for photocam.
- Returns
- The current paused state
This gets the current paused state for the photocam object.
- See also
- elm_photocam_paused_set()
- Parameters
-
paused | The pause state to set |
double elm_photocam::zoom_get |
( |
| ) |
const |
|
inline |
Get the zoom level of the photo.
- Returns
- 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 viewport size.
- See also
- elm_photocam_zoom_set()
-
elm_photocam_zoom_mode_set()
- Parameters
-
zoom | The zoom level to set |
Get the zoom mode.
- Returns
- The current zoom mode
This gets the current zoom mode of the photocam object.
- See also
- elm_photocam_zoom_mode_set()
- Parameters
-
Get the zoom mode.
- Returns
- The current zoom mode
This gets the current zoom mode of the photocam object.
- See also
- elm_photocam_zoom_mode_set()
- Parameters
-
void elm_photocam::zoom_set |
( |
double |
zoom_ | ) |
const |
|
inline |
Get the zoom level of the photo.
- Returns
- 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 viewport size.
- See also
- elm_photocam_zoom_set()
-
elm_photocam_zoom_mode_set()
- Parameters
-
zoom | The zoom level to set |