Functions
Photo

Functions

EOAPI void elm_obj_photo_editable_set (Eina_Bool set)
 Set editability of the photo. More...
 
EOAPI Eina_Bool elm_obj_photo_editable_get (void)
 Get editability of the photo. More...
 
EOAPI void elm_obj_photo_fill_inside_set (Eina_Bool fill)
 Set if the photo should be completely visible or not. More...
 
EOAPI Eina_Bool elm_obj_photo_fill_inside_get (void)
 Get if the photo should be completely visible or not. More...
 
EOAPI void elm_obj_photo_aspect_fixed_set (Eina_Bool fixed)
 Set whether the original aspect ratio of the photo should be kept on resize. More...
 
EOAPI Eina_Bool elm_obj_photo_aspect_fixed_get (void)
 Get if the object keeps the original aspect ratio. More...
 
EOAPI void elm_obj_photo_size_set (int size)
 Set the size that will be used on the photo. More...
 
EOAPI int elm_obj_photo_size_get (void)
 Get the size that will be used on the photo. More...
 
EOAPI void elm_obj_photo_thumb_set (const char *file, const char *group)
 Set the file that will be used as thumbnail in the photo. More...
 
void elm_photo_editable_set (Elm_Photo *obj, Eina_Bool set)
 Set editability of the photo. More...
 
Eina_Bool elm_photo_editable_get (const Elm_Photo *obj)
 Get editability of the photo. More...
 
void elm_photo_fill_inside_set (Elm_Photo *obj, Eina_Bool fill)
 Set if the photo should be completely visible or not. More...
 
Eina_Bool elm_photo_fill_inside_get (const Elm_Photo *obj)
 Get if the photo should be completely visible or not. More...
 
void elm_photo_aspect_fixed_set (Elm_Photo *obj, Eina_Bool fixed)
 Set whether the original aspect ratio of the photo should be kept on resize. More...
 
Eina_Bool elm_photo_aspect_fixed_get (const Elm_Photo *obj)
 Get if the object keeps the original aspect ratio. More...
 
void elm_photo_size_set (Elm_Photo *obj, int size)
 Set the size that will be used on the photo. More...
 
int elm_photo_size_get (const Elm_Photo *obj)
 Get the size that will be used on the photo. More...
 
void elm_photo_thumb_set (const Elm_Photo *obj, const char *file, const char *group)
 Set the file that will be used as thumbnail in the photo. More...
 
Evas_Object * elm_photo_add (Evas_Object *parent)
 Add a new photo to the parent. More...
 
Eina_Bool elm_photo_file_set (Eo *obj, const char *file)
 Set the file that will be used as the photo widget's image. More...
 

Detailed Description

photo_inheritance_tree.png

The Elementary photo widget is intended for displaying a photo, for ex., a person's image (contact). Simple, yet with a very specific purpose. It has a decorative frame around the inner image itself, on the default theme. If and while no photo is set on it, it displays a person icon, indicating it's a photo placeholder.

This widget relies on an internal Icon, so that the APIs of these two widgets are similar (drag and drop is also possible here, for example).

Signals that you can add callbacks for are:

Function Documentation

EOAPI Eina_Bool elm_obj_photo_aspect_fixed_get ( void  )

Get if the object keeps the original aspect ratio.

Returns
true if the photo should fix the aspect, false otherwise.

Referenced by elm_photo_aspect_fixed_get().

EOAPI void elm_obj_photo_aspect_fixed_set ( Eina_Bool  fixed)

Set whether the original aspect ratio of the photo should be kept on resize.

The original aspect ratio (width / height) of the photo is usually distorted to match the object's size. Enabling this option will fix this original aspect, and the way that the photo is fit into the object's area.

See also elm_obj_photo_aspect_fixed_get.

Parameters
[in]fixedtrue if the photo should fix the aspect, false otherwise.

Referenced by elm_photo_aspect_fixed_set().

EOAPI Eina_Bool elm_obj_photo_editable_get ( void  )

Get editability of the photo.

Returns
To set of clear editability.

Referenced by elm_photo_editable_get().

EOAPI void elm_obj_photo_editable_set ( Eina_Bool  set)

Set editability of the photo.

An editable photo can be dragged to or from, and can be cut or pasted too. Note that pasting an image or dropping an item on the image will delete the existing content.

Parameters
[in]setTo set of clear editability.

Referenced by elm_photo_editable_set().

EOAPI Eina_Bool elm_obj_photo_fill_inside_get ( void  )

Get if the photo should be completely visible or not.

Returns
Photo visibility.

Referenced by elm_photo_fill_inside_get().

EOAPI void elm_obj_photo_fill_inside_set ( Eina_Bool  fill)

Set if the photo should be completely visible or not.

Parameters
[in]fillPhoto visibility.

Referenced by elm_photo_fill_inside_set().

EOAPI int elm_obj_photo_size_get ( void  )

Get the size that will be used on the photo.

Returns
The size of the photo

Referenced by elm_photo_size_get().

EOAPI void elm_obj_photo_size_set ( int  size)

Set the size that will be used on the photo.

Parameters
[in]sizeThe size of the photo

Referenced by elm_photo_size_set().

EOAPI void elm_obj_photo_thumb_set ( const char *  file,
const char *  group 
)

Set the file that will be used as thumbnail in the photo.

Parameters
[in]groupThe key used in case of an EET file.

Referenced by elm_photo_thumb_set().

Evas_Object* elm_photo_add ( Evas_Object *  parent)

Add a new photo to the parent.

Parameters
parentThe parent object
Returns
The new object or NULL if it cannot be created
Eina_Bool elm_photo_aspect_fixed_get ( const Elm_Photo *  obj)

Get if the object keeps the original aspect ratio.

Returns
true if the photo should fix the aspect, false otherwise.

References elm_obj_photo_aspect_fixed_get().

void elm_photo_aspect_fixed_set ( Elm_Photo *  obj,
Eina_Bool  fixed 
)

Set whether the original aspect ratio of the photo should be kept on resize.

The original aspect ratio (width / height) of the photo is usually distorted to match the object's size. Enabling this option will fix this original aspect, and the way that the photo is fit into the object's area.

See also elm_photo_aspect_fixed_get.

Parameters
[in]fixedtrue if the photo should fix the aspect, false otherwise.

References elm_obj_photo_aspect_fixed_set().

Eina_Bool elm_photo_editable_get ( const Elm_Photo *  obj)

Get editability of the photo.

Returns
To set of clear editability.

References elm_obj_photo_editable_get().

void elm_photo_editable_set ( Elm_Photo *  obj,
Eina_Bool  set 
)

Set editability of the photo.

An editable photo can be dragged to or from, and can be cut or pasted too. Note that pasting an image or dropping an item on the image will delete the existing content.

Parameters
[in]setTo set of clear editability.

References elm_obj_photo_editable_set().

Eina_Bool elm_photo_file_set ( Eo *  obj,
const char *  file 
)

Set the file that will be used as the photo widget's image.

Returns
EINA_TRUE on success, EINA_FALSE otherwise
Note
Use NULL on file to set the photo widget back to it's initial state, which indicates "no photo".
Parameters
[in]fileThe path to file that will be used as obj's image.
Eina_Bool elm_photo_fill_inside_get ( const Elm_Photo *  obj)

Get if the photo should be completely visible or not.

Returns
Photo visibility.

References elm_obj_photo_fill_inside_get().

void elm_photo_fill_inside_set ( Elm_Photo *  obj,
Eina_Bool  fill 
)

Set if the photo should be completely visible or not.

Parameters
[in]fillPhoto visibility.

References elm_obj_photo_fill_inside_set().

int elm_photo_size_get ( const Elm_Photo *  obj)

Get the size that will be used on the photo.

Returns
The size of the photo

References elm_obj_photo_size_get().

void elm_photo_size_set ( Elm_Photo *  obj,
int  size 
)

Set the size that will be used on the photo.

Parameters
[in]sizeThe size of the photo

References elm_obj_photo_size_set().

void elm_photo_thumb_set ( const Elm_Photo *  obj,
const char *  file,
const char *  group 
)

Set the file that will be used as thumbnail in the photo.

Parameters
[in]groupThe key used in case of an EET file.

References elm_obj_photo_thumb_set().