summaryrefslogtreecommitdiff
path: root/include/efl.ethumb_client.pxd
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-04-11 18:12:49 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2014-04-11 18:12:49 +0300
commit6ebdf2b607491594c44deb6599861a35ff633667 (patch)
tree630f5e17abcb0f485cabd670eb295799b549e7b3 /include/efl.ethumb_client.pxd
parent8cc17b5777ab7de3781a83b7c40f6e51da976fe8 (diff)
Bring back Python bindings for Ethumb.
Diffstat (limited to 'include/efl.ethumb_client.pxd')
-rw-r--r--include/efl.ethumb_client.pxd96
1 files changed, 96 insertions, 0 deletions
diff --git a/include/efl.ethumb_client.pxd b/include/efl.ethumb_client.pxd
new file mode 100644
index 0000000..902f4dd
--- /dev/null
+++ b/include/efl.ethumb_client.pxd
@@ -0,0 +1,96 @@
1# Copyright (C) 2009 by ProFUSION embedded systems
2#
3# This file is part of Python-Ethumb.
4#
5# Python-Ethumb is free software you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# Python-Ethumb is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-Ethumb. If not, see <http://www.gnu.org/licenses/>.
17
18from efl.eina cimport Eina_Bool, Eina_Free_Cb
19from efl.ethumb.enums cimport Ethumb_Thumb_Orientation
20
21cdef extern from "Ethumb_Client.h":
22 ctypedef struct Ethumb_Client
23 ctypedef struct Ethumb_Exists
24 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)
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)
27 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)
29
30 int ethumb_client_init()
31 int ethumb_client_shutdown()
32
33 Ethumb_Client *ethumb_client_connect(Ethumb_Client_Connect_Cb cb, void *data, Eina_Free_Cb free_data)
34 void ethumb_client_disconnect(Ethumb_Client *client)
35 void ethumb_client_on_server_die_callback_set(Ethumb_Client *client, Ethumb_Client_Die_Cb server_die_cb, void *data, Eina_Free_Cb free_data)
36
37 void ethumb_client_fdo_set(Ethumb_Client *client, int s)
38
39 void ethumb_client_size_set(Ethumb_Client *client, int tw, int th)
40 void ethumb_client_size_get(Ethumb_Client *client, int *tw, int *th)
41 void ethumb_client_format_set(Ethumb_Client *client, int f)
42 int ethumb_client_format_get(Ethumb_Client *client)
43 void ethumb_client_aspect_set(Ethumb_Client *client, int a)
44 int ethumb_client_aspect_get(Ethumb_Client *client)
45 void ethumb_client_orientation_set(Ethumb_Client *client, Ethumb_Thumb_Orientation o)
46 Ethumb_Thumb_Orientation ethumb_client_orientation_get(Ethumb_Client *client)
47 void ethumb_client_crop_align_set(Ethumb_Client *client, float x, float y)
48 void ethumb_client_crop_align_get(Ethumb_Client *client, float *x, float *y)
49 void ethumb_client_quality_set(Ethumb_Client *client, int quality)
50 int ethumb_client_quality_get(Ethumb_Client *client)
51 void ethumb_client_compress_set(Ethumb_Client *client, int compress)
52 int ethumb_client_compress_get(Ethumb_Client *client)
53 Eina_Bool ethumb_client_frame_set(Ethumb_Client *client, const char *file, const char *group, const char *swallow)
54 void ethumb_client_dir_path_set(Ethumb_Client *client, const char *path)
55 const char * ethumb_client_dir_path_get(Ethumb_Client *client)
56 void ethumb_client_category_set(Ethumb_Client *client, const char *category)
57 const char * ethumb_client_category_get(Ethumb_Client *client)
58 void ethumb_client_video_time_set(Ethumb_Client *client, float time)
59 void ethumb_client_video_start_set(Ethumb_Client *client, float start)
60 void ethumb_client_video_interval_set(Ethumb_Client *client, float interval)
61 void ethumb_client_video_ntimes_set(Ethumb_Client *client, int ntimes)
62 void ethumb_client_video_fps_set(Ethumb_Client *client, int fps)
63 void ethumb_client_document_page_set(Ethumb_Client *client, int page)
64
65 void ethumb_client_ethumb_setup(Ethumb_Client *client)
66
67 void ethumb_client_thumb_path_set(Ethumb_Client *client, const char *path, const char *key)
68 void ethumb_client_thumb_path_get(Ethumb_Client *client, const char **path, const char **key)
69
70 Eina_Bool ethumb_client_file_set(Ethumb_Client *client, const char *path, const char *key)
71 void ethumb_client_file_get(Ethumb_Client *client, const char **path, const char **key)
72 void ethumb_client_file_free(Ethumb_Client *client)
73
74 Ethumb_Exists *ethumb_client_thumb_exists(Ethumb_Client *client, Ethumb_Client_Thumb_Exists_Cb exists_cb, void *data)
75 void ethumb_client_thumb_exists_cancel(Ethumb_Exists *exists)
76 Eina_Bool ethumb_client_thumb_exists_check(Ethumb_Exists *exists)
77 int ethumb_client_generate(Ethumb_Client *client, Ethumb_Client_Generate_Cb generated_cb, void *data, Eina_Free_Cb free_data)
78 void ethumb_client_generate_cancel(Ethumb_Client *client, int id, Ethumb_Client_Generate_Cancel_Cb cancel_cb, void *data, Eina_Free_Cb free_data)
79 void ethumb_client_generate_cancel_all(Ethumb_Client *client)
80
81 ctypedef void (*Ethumb_Client_Async_Done_Cb)(Ethumb_Client *ethumbd, const char *thumb_path, const char *thumb_key, void *data)
82 ctypedef void (*Ethumb_Client_Async_Error_Cb)(Ethumb_Client *ethumbd, void *data)
83
84 ctypedef struct Ethumb_Client_Async
85
86 Ethumb_Client_Async *ethumb_client_thumb_async_get(Ethumb_Client *client,
87 Ethumb_Client_Async_Done_Cb done,
88 Ethumb_Client_Async_Error_Cb error,
89 void *data)
90
91 void ethumb_client_thumb_async_cancel(Ethumb_Client *client, Ethumb_Client_Async *request)
92
93cdef class Client:
94 cdef Ethumb_Client *obj
95 cdef object _on_connect_callback
96 cdef object _on_server_die_callback