7478033d176772e4eceb0dadba092f5775102f21
[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 "glib.h":
21     ctypedef void *gpointer
22     ctypedef void *gconstpointer
23     ctypedef int gint
24     ctypedef unsigned int guint
25     ctypedef unsigned long gulong
26     ctypedef gint gboolean
27     ctypedef gboolean (*GSourceFunc) (gpointer data)
28     ctypedef unsigned int gsize
29     ctypedef char gchar
30     ctypedef unsigned char guchar
31
32     ctypedef void (*GCallback) ()
33
34     ctypedef struct GHashTable:
35         pass
36
37     ctypedef struct GMainContext:
38         pass
39
40     struct _GSList:
41         gpointer data
42         _GSList *next
43     ctypedef _GSList GSList
44
45     struct _GList:
46         gpointer data
47         _GList *next
48         _GList *prev
49     ctypedef _GList GList
50
51     ctypedef guint GHashFunc (gconstpointer)
52     ctypedef gboolean GEqualFunc (gconstpointer, gconstpointer)
53
54     gboolean g_str_equal (gconstpointer, gconstpointer)
55     guint g_str_hash (gconstpointer)
56
57     GHashTable *g_hash_table_new (GHashFunc, GEqualFunc)
58     void g_hash_table_insert (GHashTable*, gpointer, gpointer)
59     void g_hash_table_destroy (GHashTable*)
60
61     guint g_timeout_add(guint interval, GSourceFunc function, gpointer data)
62     guint g_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data)
63
64     gboolean g_main_context_iteration (GMainContext *context, gboolean may_block)
65
66     gboolean g_source_remove(guint tag)