summaryrefslogtreecommitdiff
path: root/include/efl.ethumb_client.pxd
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-01-03 18:50:33 +0100
committerDave Andreoli <dave@gurumeditation.it>2016-01-03 18:50:33 +0100
commit17df9e69aa34477574f80e1599eca1721a3e6dfd (patch)
tree5121497fff492eaee93e43cf2187d6ef456b88de /include/efl.ethumb_client.pxd
parent93d2c010025795923feff53317775910876bfd1d (diff)
Revamp old and broken EthumbClient module
This was not functional at all, so I broke the API "a bit"
Diffstat (limited to '')
-rw-r--r--include/efl.ethumb_client.pxd52
1 files changed, 50 insertions, 2 deletions
diff --git a/include/efl.ethumb_client.pxd b/include/efl.ethumb_client.pxd
index 70c7ec3..7f99043 100644
--- a/include/efl.ethumb_client.pxd
+++ b/include/efl.ethumb_client.pxd
@@ -16,17 +16,64 @@
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 18from efl.eina cimport Eina_Bool, Eina_Free_Cb
19from efl.ethumb cimport Ethumb_Thumb_Orientation 19
20 20
21cdef extern from "Ethumb_Client.h": 21cdef extern from "Ethumb_Client.h":
22
23 ####################################################################
24 # Enums
25 #
26 cpdef enum Ethumb_Thumb_Orientation:
27 ETHUMB_THUMB_ORIENT_NONE
28 ETHUMB_THUMB_ROTATE_90_CW
29 ETHUMB_THUMB_ROTATE_180
30 ETHUMB_THUMB_ROTATE_90_CCW
31 ETHUMB_THUMB_FLIP_HORIZONTAL
32 ETHUMB_THUMB_FLIP_VERTICAL
33 ETHUMB_THUMB_FLIP_TRANSPOSE
34 ETHUMB_THUMB_FLIP_TRANSVERSE
35 ETHUMB_THUMB_ORIENT_ORIGINAL
36 ctypedef enum Ethumb_Thumb_Orientation:
37 pass
38
39 cpdef enum Ethumb_Thumb_FDO_Size:
40 ETHUMB_THUMB_NORMAL
41 ETHUMB_THUMB_LARGE
42 ctypedef enum Ethumb_Thumb_FDO_Size:
43 pass
44
45 cpdef enum Ethumb_Thumb_Format:
46 ETHUMB_THUMB_FDO
47 ETHUMB_THUMB_JPEG
48 ETHUMB_THUMB_EET
49 ctypedef enum Ethumb_Thumb_Format:
50 pass
51
52 cpdef enum Ethumb_Thumb_Aspect:
53 ETHUMB_THUMB_KEEP_ASPECT
54 ETHUMB_THUMB_IGNORE_ASPECT
55 ETHUMB_THUMB_CROP
56 ctypedef enum Ethumb_Thumb_Aspect:
57 pass
58
59 ####################################################################
60 # Structs
61 #
22 ctypedef struct Ethumb_Client 62 ctypedef struct Ethumb_Client
23 ctypedef struct Ethumb_Exists 63 ctypedef struct Ethumb_Exists
64
65 ####################################################################
66 # Other typedefs
67 #
24 ctypedef void (*Ethumb_Client_Connect_Cb)(void *data, Ethumb_Client *client, Eina_Bool success) 68 ctypedef void (*Ethumb_Client_Connect_Cb)(void *data, Ethumb_Client *client, Eina_Bool success)
25 ctypedef void (*Ethumb_Client_Die_Cb)(void *data, Ethumb_Client *client) 69 ctypedef void (*Ethumb_Client_Die_Cb)(void *data, Ethumb_Client *client)
26 ctypedef void (*Ethumb_Client_Generate_Cb)(void *data, Ethumb_Client *client, int id, const char *file, const char *key, const char *thumb_path, const char *thumb_key, Eina_Bool success) 70 ctypedef void (*Ethumb_Client_Generate_Cb)(void *data, Ethumb_Client *client, int id, const char *file, const char *key, const char *thumb_path, const char *thumb_key, Eina_Bool success)
27 ctypedef void (*Ethumb_Client_Thumb_Exists_Cb)(void *data, Ethumb_Client *client, Ethumb_Exists *thread, Eina_Bool exists) 71 ctypedef void (*Ethumb_Client_Thumb_Exists_Cb)(void *data, Ethumb_Client *client, Ethumb_Exists *thread, Eina_Bool exists)
28 ctypedef void (*Ethumb_Client_Generate_Cancel_Cb)(void *data, Eina_Bool success) 72 ctypedef void (*Ethumb_Client_Generate_Cancel_Cb)(void *data, Eina_Bool success)
29 73
74 ####################################################################
75 # Functions
76 #
30 int ethumb_client_init() 77 int ethumb_client_init()
31 int ethumb_client_shutdown() 78 int ethumb_client_shutdown()
32 79
@@ -90,7 +137,8 @@ cdef extern from "Ethumb_Client.h":
90 137
91 void ethumb_client_thumb_async_cancel(Ethumb_Client *client, Ethumb_Client_Async *request) 138 void ethumb_client_thumb_async_cancel(Ethumb_Client *client, Ethumb_Client_Async *request)
92 139
93cdef class Client: 140
141cdef class EthumbClient:
94 cdef Ethumb_Client *obj 142 cdef Ethumb_Client *obj
95 cdef object _on_connect_callback 143 cdef object _on_connect_callback
96 cdef object _on_server_die_callback 144 cdef object _on_server_die_callback