chiark / gitweb /
Fixed previous broken change to DEFBINDING
[clg] / glib / alien / callback.c
CommitLineData
ab0ddec3 1/* Common Lisp bindings for GTK+ v2.0
2 * Copyright (C) 1999-2002 Espen S. Johnsen <espen@users.sourceforge.net>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
7ea6e842 19/* $Id: callback.c,v 1.4 2005-02-14 00:38:47 espen Exp $ */
ab0ddec3 20
21#include <glib-object.h>
22
7ea6e842 23/* #ifdef CMUCL */
24/* #include "lisp.h" */
ab0ddec3 25
7ea6e842 26/* void (*log_handler) (gchar*, guint, gchar*); */
27/* #endif */
ab0ddec3 28
29
ab0ddec3 30
31GClosure*
34f9e1d4 32clg_callback_closure_new (gpointer callback_id, gpointer callback,
33 gpointer destroy_notify)
ab0ddec3 34{
35 GClosure *closure;
36
37 closure = g_closure_new_simple (sizeof (GClosure), (gpointer)callback_id);
34f9e1d4 38 g_closure_set_meta_marshal (closure, callback_id, callback);
39 g_closure_add_finalize_notifier (closure, callback_id, destroy_notify);
ab0ddec3 40
41 return closure;
42}
43
44
7ea6e842 45/* void */
46/* g_logv (const gchar *log_domain, */
47/* GLogLevelFlags log_level, */
48/* const gchar *format, */
49/* va_list args1) */
50/* { */
51/* gchar *msg = g_strdup_vprintf (format, args1); */
52/* log_handler (log_domain, log_level, msg); */
34f9e1d4 53
7ea6e842 54/* /\* Normally log_handler won't return, so we will be leaking this memory *\/ */
55/* g_free (msg); */
56/* } */