Added misssing structures on blist.pxd and glib.pxd.
[python-purple] / libpurple / glib.pxd
1 #
2 #  Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
3 #
4 #  This file is part of python-purple.
5 #
6 #  python-purple is free software: you can redistribute it and/or modify
7 #  it under the terms of the GNU General Public License as published by
8 #  the Free Software Foundation, either version 3 of the License, or
9 #  (at your option) any later version.
10 #
11 #  python-purple is distributed in the hope that it will be useful,
12 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #  GNU General Public License for more details.
15 #
16 #  You should have received a copy of the GNU General Public License
17 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 #
19
20 cdef extern from *:
21     ctypedef int volatile_gint "volatile int"
22
23 cdef extern from "glib.h":
24     ctypedef void *gpointer
25     ctypedef void *gconstpointer
26     ctypedef int gint
27     ctypedef unsigned int guint
28     ctypedef unsigned long gulong
29     ctypedef signed long long gint64
30     ctypedef unsigned long long guint64
31     ctypedef gint gboolean
32     ctypedef gboolean (*GSourceFunc) (gpointer data)
33     ctypedef unsigned int gsize
34     ctypedef char gchar
35     ctypedef unsigned char guchar
36
37     ctypedef void (*GCallback) ()
38     ctypedef void (*GDestroyNotify) (gpointer)
39
40     ctypedef guint GHashFunc (gconstpointer)
41     ctypedef gboolean GEqualFunc (gconstpointer, gconstpointer)
42
43     ctypedef struct GObject:
44         pass
45
46     ctypedef struct GHashNode:
47         gpointer key
48         gpointer value
49         GHashNode *next
50         guint key_hash
51
52     ctypedef struct GHashTable:
53         gint size
54         gint nnodes
55         GHashNode **nodes
56         GHashFunc hash_func
57         GEqualFunc key_equal_func
58         volatile_gint ref_count
59         int version
60         GDestroyNotify key_destroy_func
61         GDestroyNotify value_destroy_func
62
63     ctypedef struct GMainContext:
64         pass
65
66     ctypedef struct GSList:
67         gpointer data
68         GSList *next
69
70     ctypedef struct GList:
71         gpointer data
72         GList *next
73         GList *prev
74
75     void g_list_free (GList*)
76
77     gboolean g_str_equal (gconstpointer, gconstpointer)
78     guint g_str_hash (gconstpointer)
79
80     GHashTable *g_hash_table_new (GHashFunc, GEqualFunc)
81     void g_hash_table_destroy (GHashTable*)
82     GList *g_hash_table_get_keys (GHashTable*)
83     GList *g_hash_table_get_values (GHashTable*)
84     void g_hash_table_insert (GHashTable*, gpointer, gpointer)
85     gpointer g_hash_table_lookup (GHashTable*, gconstpointer)
86
87     guint g_timeout_add(guint interval, GSourceFunc function, gpointer data)
88     guint g_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data)
89
90     gboolean g_main_context_iteration (GMainContext *context, gboolean may_block)
91
92     gboolean g_source_remove(guint tag)