summaryrefslogtreecommitdiff
path: root/include/efl.eina.pxd
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2013-09-30 07:26:35 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2013-09-30 07:26:35 +0300
commit6587b5be679e659337f3f2219186eb4f9afc44d0 (patch)
tree6c23e8583e726349b558e26890b6472b2ae8e52b /include/efl.eina.pxd
parent4f96a2b096a4a7aceda81e093b03a03d40d82685 (diff)
Rename efl.pxd to efl.eina.pxd
Diffstat (limited to 'include/efl.eina.pxd')
-rw-r--r--include/efl.eina.pxd144
1 files changed, 144 insertions, 0 deletions
diff --git a/include/efl.eina.pxd b/include/efl.eina.pxd
new file mode 100644
index 0000000..1da12ce
--- /dev/null
+++ b/include/efl.eina.pxd
@@ -0,0 +1,144 @@
1# Copyright (C) 2007-2013 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL 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-EFL 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-EFL. If not, see <http://www.gnu.org/licenses/>.
17
18from libc.stdlib cimport const_void, malloc, free
19from libc.string cimport const_char, memcpy, strdup
20
21cdef extern from "time.h":
22 struct tm:
23 int tm_sec
24 int tm_min
25 int tm_hour
26 int tm_mday
27 int tm_mon
28 int tm_year
29 int tm_wday
30 int tm_yday
31 int tm_isdst
32
33 long int tm_gmtoff
34 const_char *tm_zone
35
36
37cdef extern from "Eina.h":
38 ####################################################################
39 # Enumerations
40 #
41
42 ####################################################################
43 # Basic Types
44 #
45 ctypedef unsigned char Eina_Bool
46 ctypedef int Eina_Error
47 ctypedef const_char Eina_Stringshare
48 # This is actually either wchar_t or uint32_t, Cython
49 # should use an appropriate integer automatically
50 ctypedef Py_UCS4 Eina_Unicode
51
52 ####################################################################
53 # Structures
54 #
55 ctypedef struct Eina_Rectangle:
56 int x
57 int y
58 int w
59 int h
60
61 ctypedef struct Eina_List:
62 void *data
63 Eina_List *next
64 Eina_List *prev
65 void *accounting
66 ctypedef Eina_List const_Eina_List "const Eina_List"
67
68 ctypedef struct Eina_Hash
69
70 ctypedef struct Eina_Hash_Tuple:
71 void *key
72 void *data
73 unsigned int key_length
74 ctypedef Eina_Hash_Tuple const_Eina_Hash_Tuple "const Eina_Hash_Tuple"
75
76 ctypedef struct Eina_Iterator:
77 Eina_Bool (*next)(Eina_Iterator *it, void **data)
78 void *(*get_container)(Eina_Iterator *it)
79 void (*free)(Eina_Iterator *it)
80
81 ####################################################################
82 # Other typedefs
83 #
84 ctypedef int (*Eina_Compare_Cb)(const_void *data1, const_void *data2)
85 ctypedef void (*Eina_Free_Cb)(void *data)
86
87 ####################################################################
88 # Functions
89 #
90 Eina_Error eina_error_get()
91 void eina_error_set(Eina_Error err)
92 const_char *eina_error_msg_get(Eina_Error error)
93
94 Eina_Bool eina_iterator_next(Eina_Iterator *iterator, void **data)
95 void eina_iterator_free(Eina_Iterator *iterator)
96
97 Eina_Stringshare *eina_stringshare_add_length(const_char *str, unsigned int slen)
98 Eina_Stringshare *eina_stringshare_add(const_char *str)
99 void eina_stringshare_del(Eina_Stringshare *str)
100 Eina_Stringshare *eina_stringshare_ref(Eina_Stringshare *str)
101 int eina_stringshare_strlen(Eina_Stringshare *str)
102 Eina_Bool eina_stringshare_replace(Eina_Stringshare **p_str, const_char *news)
103
104 Eina_List *eina_list_free(Eina_List *list)
105 Eina_List *eina_list_append(Eina_List *list, void *data)
106 Eina_List *eina_list_prepend(Eina_List *list, void *data)
107 Eina_List *eina_list_append(Eina_List *list, void *data)
108 Eina_List *eina_list_prepend(Eina_List *list, void *data)
109 Eina_List *eina_list_append_relative(Eina_List *list, void *data, void *relative)
110 Eina_List *eina_list_append_relative_list(Eina_List *list, void *data, Eina_List *relative)
111 Eina_List *eina_list_prepend_relative(Eina_List *list, void *data, void *relative)
112 Eina_List *eina_list_prepend_relative_list(Eina_List *list, void *data, Eina_List *relative)
113 Eina_List *eina_list_sorted_insert(Eina_List *list, Eina_Compare_Cb func, void *data)
114 Eina_List *eina_list_remove(Eina_List *list, void *data)
115 Eina_List *eina_list_remove_list(Eina_List *list, Eina_List *remove_list)
116 Eina_List *eina_list_promote_list(Eina_List *list, Eina_List *move_list)
117 Eina_List *eina_list_demote_list(Eina_List *list, Eina_List *move_list)
118 void *eina_list_data_find(Eina_List *list, void *data)
119 Eina_List *eina_list_data_find_list(Eina_List *list, void *data)
120 Eina_List *eina_list_free(Eina_List *list)
121 void *eina_list_nth(Eina_List *list, unsigned int n)
122 Eina_List *eina_list_nth_list(Eina_List *list, unsigned int n)
123 Eina_List *eina_list_reverse(Eina_List *list)
124 Eina_List *eina_list_reverse_clone(Eina_List *list)
125 Eina_List *eina_list_clone(Eina_List *list)
126 Eina_List *eina_list_sort(Eina_List *list, unsigned int size, Eina_Compare_Cb func)
127 Eina_List *eina_list_merge(Eina_List *left, Eina_List *right)
128 Eina_List *eina_list_sorted_merge(Eina_List *left, Eina_List *right, Eina_Compare_Cb func)
129 Eina_List *eina_list_split_list(Eina_List *list, Eina_List *relative, Eina_List **right)
130 Eina_List *eina_list_search_sorted_near_list(Eina_List *list, Eina_Compare_Cb func, void *data, int *result_cmp)
131 Eina_List *eina_list_search_sorted_list(Eina_List *list, Eina_Compare_Cb func, void *data)
132 void *eina_list_search_sorted(Eina_List *list, Eina_Compare_Cb func, void *data)
133 Eina_List *eina_list_search_unsorted_list(Eina_List *list, Eina_Compare_Cb func, void *data)
134 void *eina_list_search_unsorted(Eina_List *list, Eina_Compare_Cb func, void *data)
135 Eina_List *eina_list_last(Eina_List *list)
136 Eina_List *eina_list_next(Eina_List *list)
137 Eina_List *eina_list_prev(Eina_List *list)
138 void *eina_list_data_get(Eina_List *list)
139 unsigned int eina_list_count(Eina_List *list)
140
141 Eina_Hash *eina_hash_string_superfast_new(Eina_Free_Cb data_free_cb)
142 Eina_Bool eina_hash_add(Eina_Hash *hash, const_void *key, const_void *data)
143 Eina_Bool eina_hash_del(Eina_Hash *hash, const_void *key, const_void *data)
144 void *eina_hash_find(Eina_Hash *hash, const_void *key)