X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=glib.pxd;h=97664ceb2cb842b695b94ede59851287a63ef06c;hp=d00dfdf04cd2eb3aa80e0664039cb7da8e39fd85;hb=cfb1c2eb0316f1d7b744f5f05c7a577a3be20e97;hpb=aa542c72d1d3cb8bb567f8a890cd37237b0e08c1 diff --git a/glib.pxd b/glib.pxd index d00dfdf..97664ce 100644 --- a/glib.pxd +++ b/glib.pxd @@ -18,14 +18,20 @@ # cdef extern from "glib.h": - ctypedef void* gpointer + ctypedef void *gpointer + ctypedef void *gconstpointer ctypedef int gint ctypedef unsigned int guint + ctypedef unsigned long gulong ctypedef gint gboolean + ctypedef gboolean (*GSourceFunc) (gpointer data) + ctypedef unsigned int gsize - # GHashTable is an opaque data structure ctypedef struct GHashTable: - void* none + pass + + ctypedef struct GMainContext: + pass struct _GSList: gpointer data @@ -37,3 +43,19 @@ cdef extern from "glib.h": _GList *next _GList *prev ctypedef _GList GList + + ctypedef guint GHashFunc (gconstpointer) + ctypedef gboolean GEqualFunc (gconstpointer, gconstpointer) + + gboolean g_str_equal (gconstpointer, gconstpointer) + guint g_str_hash (gconstpointer) + + GHashTable *g_hash_table_new (GHashFunc, GEqualFunc) + void g_hash_table_insert (GHashTable*, gpointer, gpointer) + + guint g_timeout_add(guint interval, GSourceFunc function, gpointer data) + guint g_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data) + + gboolean g_main_context_iteration (GMainContext *context, gboolean may_block) + + gboolean g_source_remove(guint tag)