X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=glib.pxd;h=e651a95ce92ff1281eba09caa478055734acb1e6;hp=d71cb329e90bd5ca9e4bb6b24b5595478a6e9796;hb=3317112f6f04d1fdc7b338b947f18e811c9b9e7e;hpb=f93f815832876018b863a9595a9a0341baba7f7d;ds=sidebyside diff --git a/glib.pxd b/glib.pxd index d71cb32..e651a95 100644 --- a/glib.pxd +++ b/glib.pxd @@ -19,14 +19,19 @@ cdef extern from "glib.h": 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 @@ -39,5 +44,19 @@ cdef extern from "glib.h": _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) + void g_hash_table_destroy (GHashTable*) + 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)