summaryrefslogtreecommitdiff
path: root/include/efl.ethumb.pxd
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-01-03 16:48:13 +0100
committerDave Andreoli <dave@gurumeditation.it>2016-01-03 16:48:45 +0100
commit93d2c010025795923feff53317775910876bfd1d (patch)
tree4821d57fa9f31761a07a7bc8cbeb63cb0dc5dad9 /include/efl.ethumb.pxd
parente963e6d061103d9aaff9ef0187184417638cfbf6 (diff)
Implemented efl.Ethumb.Ethumb class.
With docs and an example EthumbClient will follow asap
Diffstat (limited to '')
-rw-r--r--include/efl.ethumb.pxd104
1 files changed, 3 insertions, 101 deletions
diff --git a/include/efl.ethumb.pxd b/include/efl.ethumb.pxd
index 29cf614..b4883d3 100644
--- a/include/efl.ethumb.pxd
+++ b/include/efl.ethumb.pxd
@@ -15,14 +15,11 @@
15# You should have received a copy of the GNU Lesser General Public License 15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. 16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17 17
18from efl.eina cimport Eina_Bool, Eina_Free_Cb
19 18
19from efl.c_ethumb cimport Ethumb as cEthumb
20 20
21cdef extern from "Ethumb.h": 21cdef extern from "Ethumb.h":
22 22
23 ####################################################################
24 # Enums
25 #
26 cpdef enum Ethumb_Thumb_Orientation: 23 cpdef enum Ethumb_Thumb_Orientation:
27 ETHUMB_THUMB_ORIENT_NONE 24 ETHUMB_THUMB_ORIENT_NONE
28 ETHUMB_THUMB_ROTATE_90_CW 25 ETHUMB_THUMB_ROTATE_90_CW
@@ -33,116 +30,21 @@ cdef extern from "Ethumb.h":
33 ETHUMB_THUMB_FLIP_TRANSPOSE 30 ETHUMB_THUMB_FLIP_TRANSPOSE
34 ETHUMB_THUMB_FLIP_TRANSVERSE 31 ETHUMB_THUMB_FLIP_TRANSVERSE
35 ETHUMB_THUMB_ORIENT_ORIGINAL 32 ETHUMB_THUMB_ORIENT_ORIGINAL
36 ctypedef enum Ethumb_Thumb_Orientation:
37 pass
38 33
39 cpdef enum Ethumb_Thumb_FDO_Size: 34 cpdef enum Ethumb_Thumb_FDO_Size:
40 ETHUMB_THUMB_NORMAL 35 ETHUMB_THUMB_NORMAL
41 ETHUMB_THUMB_LARGE 36 ETHUMB_THUMB_LARGE
42 ctypedef enum Ethumb_Thumb_FDO_Size:
43 pass
44 37
45 cpdef enum Ethumb_Thumb_Format: 38 cpdef enum Ethumb_Thumb_Format:
46 ETHUMB_THUMB_FDO 39 ETHUMB_THUMB_FDO
47 ETHUMB_THUMB_JPEG 40 ETHUMB_THUMB_JPEG
48 ETHUMB_THUMB_EET 41 ETHUMB_THUMB_EET
49 ctypedef enum Ethumb_Thumb_Format:
50 pass
51 42
52 cpdef enum Ethumb_Thumb_Aspect: 43 cpdef enum Ethumb_Thumb_Aspect:
53 ETHUMB_THUMB_KEEP_ASPECT 44 ETHUMB_THUMB_KEEP_ASPECT
54 ETHUMB_THUMB_IGNORE_ASPECT 45 ETHUMB_THUMB_IGNORE_ASPECT
55 ETHUMB_THUMB_CROP 46 ETHUMB_THUMB_CROP
56 ctypedef enum Ethumb_Thumb_Aspect:
57 pass
58 47
59 ####################################################################
60 # Structs
61 #
62 cdef struct Ethumb:
63 int tw
64 int th
65 int format
66 int aspect
67 48
68 #################################################################### 49cdef class Ethumb:
69 # Other typedefs 50 cdef cEthumb *obj
70 #
71 ctypedef void (*Ethumb_Generate_Cb)(void *data, Ethumb *e, Eina_Bool success)
72
73 ####################################################################
74 # Functions
75 #
76 int ethumb_init()
77 void ethumb_shutdown()
78 Ethumb * ethumb_new()
79 void ethumb_free(Ethumb *e)
80
81 Eina_Bool ethumb_frame_set(Ethumb *e, const char *theme_file, const char *group, const char *swallow)
82 void ethumb_frame_get(Ethumb *e, const char **theme_file, const char **group, const char **swallow)
83
84 void ethumb_thumb_dir_path_set(Ethumb *e, const char *path)
85 const char * ethumb_thumb_dir_path_get(Ethumb *e)
86
87 void ethumb_thumb_category_set(Ethumb *e, const char *category)
88 const char * ethumb_thumb_category_get(Ethumb *e)
89
90 void ethumb_thumb_path_set(Ethumb *e, const char *path, const char *key)
91 void ethumb_thumb_path_get(Ethumb *e, const char **path, const char **key)
92 void ethumb_thumb_hash(Ethumb *e)
93 void ethumb_thumb_hash_copy(Ethumb *dst, Ethumb *src)
94
95
96 void ethumb_thumb_fdo_set(Ethumb *e, Ethumb_Thumb_FDO_Size s)
97
98 void ethumb_thumb_size_set(Ethumb *e, int tw, int th)
99 void ethumb_thumb_size_get(Ethumb *e, int *tw, int *th)
100
101 void ethumb_thumb_format_set(Ethumb *e, Ethumb_Thumb_Format f)
102 Ethumb_Thumb_Format ethumb_thumb_format_get(Ethumb *e)
103
104 void ethumb_thumb_aspect_set(Ethumb *e, Ethumb_Thumb_Aspect a)
105 Ethumb_Thumb_Aspect ethumb_thumb_aspect_get(Ethumb *e)
106
107 void ethumb_thumb_orientation_set(Ethumb *e, Ethumb_Thumb_Orientation o)
108 Ethumb_Thumb_Orientation ethumb_thumb_orientation_get(Ethumb *e)
109
110 void ethumb_thumb_crop_align_set(Ethumb *e, float x, float y)
111 void ethumb_thumb_crop_align_get(Ethumb *e, float *x, float *y)
112
113 void ethumb_thumb_quality_set(Ethumb *e, int quality)
114 int ethumb_thumb_quality_get(Ethumb *e)
115
116 void ethumb_thumb_compress_set(Ethumb *e, int compress)
117 int ethumb_thumb_compress_get(Ethumb *e)
118
119 void ethumb_video_start_set(Ethumb *e, float start)
120 float ethumb_video_start_get(Ethumb *e)
121 void ethumb_video_time_set(Ethumb *e, float time)
122 float ethumb_video_time_get(Ethumb *e)
123 void ethumb_video_interval_set(Ethumb *e, float interval)
124 float ethumb_video_interval_get(Ethumb *e)
125 void ethumb_video_ntimes_set(Ethumb *e, unsigned int ntimes)
126 unsigned int ethumb_video_ntimes_get(Ethumb *e)
127 void ethumb_video_fps_set(Ethumb *e, unsigned int fps)
128 unsigned int ethumb_video_fps_get(Ethumb *e)
129
130 void ethumb_document_page_set(Ethumb *e, unsigned int page)
131 unsigned int ethumb_document_page_get(Ethumb *e)
132
133 Eina_Bool ethumb_file_set(Ethumb *e, const char *path, const char *key)
134 void ethumb_file_get(Ethumb *e, const char **path, const char **key)
135 void ethumb_file_free(Ethumb *e)
136
137 Eina_Bool ethumb_generate(Ethumb *e, Ethumb_Generate_Cb finished_cb, void *data, Eina_Free_Cb free_data)
138 Eina_Bool ethumb_exists(Ethumb *e)
139
140 Ethumb * ethumb_dup(Ethumb *e)
141 Eina_Bool ethumb_cmp(Ethumb *e1, Ethumb *e2)
142 int ethumb_hash(void *key, int key_length)
143 int ethumb_key_cmp(void *key1, int key1_length, void *key2, int key2_length)
144 unsigned int ethumb_length(void *key)
145
146
147cdef class PyEthumb:
148 cdef Ethumb *obj