# GLib Declarations # # Copyright (C) 2006,2007,2008 PySoy Group # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program; if not, see http://www.gnu.org/licenses # # $Id$ cdef extern from "glib.h" nogil : ctypedef void* gpointer ctypedef void* gconstpointer ctypedef char gchar ctypedef short gshort ctypedef long glong ctypedef int gint ctypedef gint gboolean ctypedef unsigned char guchar ctypedef unsigned short gushort ctypedef unsigned long gulong ctypedef unsigned int guint ctypedef float gfloat ctypedef double gdouble cdef gpointer g_malloc ( gulong ) cdef void g_free ( gpointer ) ctypedef struct GThreadFunctions : void* none ctypedef struct GHashTable : void* none ctypedef struct GAsyncQueue : void* none ctypedef gboolean GHRFunc ( gpointer, gpointer, gpointer ) ctypedef gint GCompareFunc ( gconstpointer, gconstpointer ) ctypedef gint GCompareDataFunc ( gconstpointer, gconstpointer, gpointer ) ctypedef gboolean GEqualFunc ( gconstpointer, gconstpointer ) ctypedef void GDestroyNotify ( gpointer ) ctypedef void GFunc ( gpointer, gpointer ) ctypedef guint GHashFunc ( gconstpointer ) ctypedef void GHFunc ( gpointer, gpointer, gpointer ) ctypedef void GFreeFunc ( gpointer ) ctypedef gchar* GTranslateFunc ( gchar*, gpointer ) cdef gboolean g_str_equal ( gconstpointer, gconstpointer ) cdef guint g_str_hash ( gconstpointer ) cdef gboolean g_int_equal ( gconstpointer, gconstpointer ) cdef guint g_int_hash ( gconstpointer ) cdef gboolean g_direct_equal ( gconstpointer, gconstpointer ) cdef guint g_direct_hash ( gconstpointer ) cdef GHashTable* g_hash_table_new ( GHashFunc, GEqualFunc ) cdef GHashTable* g_hash_table_new_full ( GHashFunc, GEqualFunc, GDestroyNotify, GDestroyNotify ) cdef void g_hash_table_destroy ( GHashTable* ) cdef void g_hash_table_insert ( GHashTable*, gpointer, gpointer ) cdef void g_hash_table_replace ( GHashTable*, gpointer, gpointer ) cdef gboolean g_hash_table_remove ( GHashTable*, gconstpointer ) cdef void g_hash_table_remove_all ( GHashTable* ) cdef gboolean g_hash_table_steal ( GHashTable*, gconstpointer ) cdef void g_hash_table_steal_all ( GHashTable* ) cdef gpointer g_hash_table_lookup ( GHashTable*, gconstpointer ) cdef gboolean g_hash_table_lookup_extended ( GHashTable*, gconstpointer, gpointer*, gpointer* ) cdef void g_hash_table_foreach ( GHashTable*, GHFunc, gpointer ) cdef gpointer g_hash_table_find ( GHashTable*, GHRFunc, gpointer ) cdef guint g_hash_table_foreach_remove ( GHashTable*, GHRFunc, gpointer ) cdef guint g_hash_table_foreach_steal ( GHashTable*, GHRFunc, gpointer ) cdef guint g_hash_table_size ( GHashTable* ) cdef GHashTable* g_hash_table_ref ( GHashTable* ) cdef void g_hash_table_unref ( GHashTable* ) cdef void g_thread_init ( GThreadFunctions* ) cdef GAsyncQueue* g_async_queue_new ( ) cdef void g_async_queue_unref ( GAsyncQueue* ) cdef void g_async_queue_push ( GAsyncQueue*, gpointer ) cdef gpointer g_async_queue_pop ( GAsyncQueue* ) cdef gchar* g_strdup ( gchar* )