Functions that all users must know of to use Ethumb. More...
Typedefs | |
typedef struct _Ethumb | Ethumb |
thumbnailer handle. | |
typedef void(* | Ethumb_Generate_Cb) (void *data, Ethumb *e, Eina_Bool success) |
reports results of ethumb_generate(). | |
Functions | |
EAPI int | ethumb_init (void) |
Initialize ethumb. | |
EAPI int | ethumb_shutdown (void) |
Shutdown ethumb, unloading all currently-loaded modules. | |
EAPI Ethumb * | ethumb_new (void) |
Create a new ethumb object. | |
EAPI void | ethumb_free (Ethumb *e) |
Free an ethumb object. | |
EAPI Eina_Bool | ethumb_file_set (Ethumb *e, const char *path, const char *key) |
Set the file for which to generate thumbnails. | |
EAPI void | ethumb_file_get (const Ethumb *e, const char **path, const char **key) |
Get the file for which to generate thumbnails. | |
EAPI void | ethumb_file_free (Ethumb *e) |
Reset the source file information. | |
EAPI Eina_Bool | ethumb_generate (Ethumb *e, Ethumb_Generate_Cb finished_cb, const void *data, Eina_Free_Cb free_data) |
Generate the thumbnail. | |
EAPI Eina_Bool | ethumb_exists (Ethumb *e) |
test if the thumbnailer exists | |
EAPI Ethumb * | ethumb_dup (const Ethumb *e) |
Duplicate an thumbnailer. | |
EAPI Eina_Bool | ethumb_cmp (const Ethumb *e1, const Ethumb *e2) |
Compare two thumbnailers. | |
EAPI int | ethumb_hash (const void *key, int key_length) |
EAPI int | ethumb_key_cmp (const void *key1, int key1_length, const void *key2, int key2_length) |
EAPI unsigned int | ethumb_length (const void *key) |
Functions that all users must know of to use Ethumb.
typedef struct _Ethumb Ethumb |
thumbnailer handle.
The handle is returned by ethumb_new() and destroyed by ethumb_free().
reports results of ethumb_generate().
data | extra context given to ethumb_generate(). |
e | handle of the current thumbnailer. |
success | EINA_TRUE if generated or EINA_FALSE on errors. |
EAPI int ethumb_init | ( | void | ) |
Initialize ethumb.
References ecore_evas_init(), ecore_evas_shutdown(), edje_init(), edje_shutdown(), eina_environment_home_get(), eina_hash_string_small_new(), eina_init(), eina_log_domain_register(), eina_log_domain_unregister(), EINA_LOG_ERR, eina_prefix_free(), eina_prefix_new(), EINA_SAFETY_ON_NULL_GOTO, eina_shutdown(), eina_stringshare_add(), and ethumb_init().
Referenced by ethumb_client_init(), and ethumb_init().
EAPI int ethumb_shutdown | ( | void | ) |
Shutdown ethumb, unloading all currently-loaded modules.
References ecore_evas_shutdown(), edje_shutdown(), eina_log_domain_unregister(), EINA_LOG_ERR, eina_prefix_free(), eina_shutdown(), and eina_stringshare_del().
Referenced by ethumb_client_shutdown().
EAPI Ethumb * ethumb_new | ( | void | ) |
Create a new ethumb object.
return The newly-created ethumb object
References ecore_evas_alpha_set(), ecore_evas_buffer_new(), ecore_evas_free(), ecore_evas_get(), ecore_evas_object_ecore_evas_get(), ecore_evas_object_evas_get(), ecore_evas_object_image_new(), EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_TRUE, ETHUMB_THUMB_ORIENT_ORIGINAL, evas_font_cache_set(), evas_image_cache_set(), and evas_object_image_add().
Referenced by ethumb_client_connect().
Set the file for which to generate thumbnails.
e | A pointer to an Ethumb object. |
path | The file to use. |
key | If path allows storing multiple resources in a single file (EET or Edje for instance), key is the key used to locate the right resource inside the file. NULL if not applicable. |
References EINA_FALSE, eina_file_access(), EINA_FILE_ACCESS_MODE_READ, eina_file_path_sanitize(), EINA_SAFETY_ON_NULL_RETURN_VAL, eina_stringshare_replace(), and EINA_TRUE.
Referenced by ethumb_client_file_set().
EAPI void ethumb_file_get | ( | const Ethumb * | e, |
const char ** | path, | ||
const char ** | key | ||
) |
Get the file for which to generate thumbnails.
e | A pointer to an Ethumb object. | |
[out] | path | The file being used. |
[out] | key | The key used to locate the right resource in case the file can store several of them. NULL if not applicable. |
References EINA_SAFETY_ON_NULL_RETURN.
Referenced by ethumb_client_file_get(), ethumb_client_generate(), and ethumb_client_thumb_exists().
EAPI void ethumb_file_free | ( | Ethumb * | e | ) |
Reset the source file information.
e | A pointer to an Ethumb object. |
References EINA_SAFETY_ON_NULL_RETURN, and eina_stringshare_replace().
Referenced by ethumb_client_file_free(), and ethumb_free().
EAPI Eina_Bool ethumb_generate | ( | Ethumb * | e, |
Ethumb_Generate_Cb | finished_cb, | ||
const void * | data, | ||
Eina_Free_Cb | free_data | ||
) |
Generate the thumbnail.
e | handle of the current thumbnailer. |
finished_cb | The callback function to run on opertaion end |
free_data | The callback function to run on free data. |
References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_TRUE.
test if the thumbnailer exists
e | handle of the thumbnailer to test. |
References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_SAFETY_ON_TRUE_RETURN_VAL, and EINA_TRUE.
Duplicate an thumbnailer.
e | Handle of the thumbnailer to duplicate |
References ecore_evas_alpha_set(), ecore_evas_buffer_new(), ecore_evas_free(), ecore_evas_get(), ecore_evas_object_ecore_evas_get(), ecore_evas_object_evas_get(), ecore_evas_object_image_new(), eina_stringshare_ref(), EINA_TRUE, evas_font_cache_set(), evas_image_cache_set(), and evas_object_image_add().
Referenced by ethumb_client_aspect_set(), ethumb_client_category_set(), ethumb_client_crop_align_set(), ethumb_client_dir_path_set(), ethumb_client_document_page_set(), ethumb_client_fdo_set(), ethumb_client_format_set(), ethumb_client_frame_set(), ethumb_client_orientation_set(), ethumb_client_size_set(), ethumb_client_thumb_exists(), ethumb_client_video_fps_set(), ethumb_client_video_interval_set(), ethumb_client_video_ntimes_set(), ethumb_client_video_start_set(), and ethumb_client_video_time_set().
Compare two thumbnailers.
e1 | First handle of thumbnailer to compare |
e2 | Second handle of thumbnailer to compare |
References EINA_FALSE.
Referenced by ethumb_client_generate().