summaryrefslogtreecommitdiff
path: root/src/lib/ethumb/Ethumb_Plugin.h
blob: 483399d212b5776bc4a1545b912dba7eafb6b03b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef _ETHUMB_PLUGIN_H_
#define _ETHUMB_PLUGIN_H_

#include <Evas.h>
#include <Ecore_Evas.h>
#include <Ethumb.h>

typedef struct _Ethumb_Plugin Ethumb_Plugin;

struct _Ethumb_Plugin
{
#define ETHUMB_PLUGIN_API_VERSION (1U)
   unsigned int version;
   const char *name;
   const char **extensions;
   void *(*thumb_generate)(Ethumb *);
   void (*thumb_cancel)(Ethumb *, void *);
};

EAPI Eina_Bool ethumb_plugin_register(const Ethumb_Plugin *plugin);
EAPI Eina_Bool ethumb_plugin_unregister(const Ethumb_Plugin *plugin);

EAPI void ethumb_calculate_aspect_from_ratio(Ethumb *e, float ia, int *w, int *h);
EAPI void ethumb_calculate_aspect(Ethumb *e, int iw, int ih, int *w, int *h);
EAPI void ethumb_calculate_fill_from_ratio(Ethumb *e, float ia, int *fx, int *fy, int *fw, int *fh);
EAPI void ethumb_calculate_fill(Ethumb *e, int iw, int ih, int *fx, int *fy, int *fw, int *fh);
EAPI Eina_Bool ethumb_plugin_image_resize(Ethumb *e, int w, int h);
EAPI Eina_Bool ethumb_image_save(Ethumb *e);
EAPI void ethumb_finished_callback_call(Ethumb *e, int result);
EAPI Evas * ethumb_evas_get(const Ethumb *e);
EAPI Ecore_Evas * ethumb_ecore_evas_get(const Ethumb *e);

#endif /* _ETHUMB_PLUGIN_H_ */