Enumerations | Functions
Thumbnail

Enumerations

enum  Elm_Thumb_Animation_Setting {
  ELM_THUMB_ANIMATION_START = 0,
  ELM_THUMB_ANIMATION_LOOP,
  ELM_THUMB_ANIMATION_STOP
}
 Used to set if a video thumbnail is animating or not. More...
 

Functions

Eina_Bool elm_need_ethumb (void)
 Request that your elementary application needs ethumb. More...
 
void * elm_thumb_ethumb_client_get (void)
 Get the ethumb_client handle so custom configuration can be made. More...
 
Eina_Bool elm_thumb_ethumb_client_connected_get (void)
 Get the ethumb_client connection state. More...
 
Evas_Object * elm_thumb_add (Evas_Object *parent)
 Add a new thumb object to the parent. More...
 
void elm_thumb_file_set (Eo *obj, const char *file, const char *key)
 Set the file that will be used as thumbnail source. More...
 
void elm_thumb_file_get (const Eo *obj, const char **file, const char **key)
 Get the image or video path and key used to generate the thumbnail. More...
 

Detailed Description

thumb_inheritance_tree.png
preview-00.png

A thumbnail object is used for displaying the thumbnail of an image or video. You must have compiled Elementary with Ethumb_Client support. Also, Ethumb's DBus service must be present and auto-activated in order to have thumbnails generated. You must also have a session bus, not a system one.

Once the thumbnail object becomes visible, it will check if there is a previously generated thumbnail image for the file set on it. If not, it will start generating this thumbnail.

Different configuration settings will cause different thumbnails to be generated even on the same file.

Generated thumbnails are stored under $HOME/.thumbnails/. Check Ethumb's documentation to change this path, and to see other configuration options.

If you set formatting features such as, aspect, size, format, orientation, crop, compression, or quality after the thumbnail has been shown, it needs to be reloaded with elm_thumb_reload.

This widget emits the following signals:

Available styles:

An example of use of thumbnail:

Enumeration Type Documentation

Used to set if a video thumbnail is animating or not.

Enumerator
ELM_THUMB_ANIMATION_START 

Play animation once.

ELM_THUMB_ANIMATION_LOOP 

Keep playing animation until stop is requested.

ELM_THUMB_ANIMATION_STOP 

Stop playing the animation.

Function Documentation

Eina_Bool elm_need_ethumb ( void  )

Request that your elementary application needs ethumb.

This initializes the Ethumb library when called and if support exists it returns EINA_TRUE, otherwise returns EINA_FALSE. This must be called before any other function that deals with elm_thumb objects or ethumb_client instances.

Examples:
fileselector_example.c, and thumb_example_01.c.
Evas_Object* elm_thumb_add ( Evas_Object *  parent)

Add a new thumb object to the parent.

Parameters
parentThe parent object.
Returns
The new object or NULL if it cannot be created.
See also
elm_thumb_file_set()
elm_thumb_ethumb_client_get()
Eina_Bool elm_thumb_ethumb_client_connected_get ( void  )

Get the ethumb_client connection state.

Returns
EINA_TRUE if the client is connected to the server or EINA_FALSE otherwise.
void* elm_thumb_ethumb_client_get ( void  )

Get the ethumb_client handle so custom configuration can be made.

Returns
Ethumb_Client instance or NULL.

The ethumb client handle returned may or may not be NULL. It may or may not survive into the future (ethumbd may become disconnected). Do not use this unless you know what you are doing.

void elm_thumb_file_get ( const Eo *  obj,
const char **  file,
const char **  key 
)

Get the image or video path and key used to generate the thumbnail.

See also
elm_thumb_file_set()
elm_thumb_path_get()
Parameters
[out]fileThe path to file that will be used as thumbnail source.
[out]keyThe key used in case of an EET file.
void elm_thumb_file_set ( Eo *  obj,
const char *  file,
const char *  key 
)

Set the file that will be used as thumbnail source.

The file can be an image or a video (in that case, acceptable extensions are: avi, mp4, ogv, mov, mpg and wmv). To start the video animation, use the function elm_thumb_animate().

See also
elm_thumb_file_get()
elm_thumb_reload()
elm_thumb_animate()
Parameters
[in]fileThe path to file that will be used as thumbnail source.
[in]keyThe key used in case of an EET file.