mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-05-30 06:57:07 +00:00
2008-09-05 Andrés G. Aragoneses <aaragoneses@novell.com>
Fixes BNC#387220. * glib/glue/signal.c: New glue file to call g_signal_query(). * glib/glue/Makefile.am: Add signal.c. * glib/Signal.cs: check return type prior to emitting. svn path=/trunk/gtk-sharp/; revision=112360
This commit is contained in:
parent
1a681abfac
commit
a4bc03d66d
|
@ -1,3 +1,10 @@
|
||||||
|
2008-09-05 Andrés G. Aragoneses <aaragoneses@novell.com>
|
||||||
|
|
||||||
|
Fixes BNC#387220.
|
||||||
|
* glib/glue/signal.c: New glue file to call g_signal_query().
|
||||||
|
* glib/glue/Makefile.am: Add signal.c.
|
||||||
|
* glib/Signal.cs: check return type prior to emitting.
|
||||||
|
|
||||||
2008-08-28 Andrés G. Aragoneses <aaragoneses@novell.com>
|
2008-08-28 Andrés G. Aragoneses <aaragoneses@novell.com>
|
||||||
|
|
||||||
* atk/Util.custom: unregister get_root function when the setter
|
* atk/Util.custom: unregister get_root function when the setter
|
||||||
|
|
|
@ -311,15 +311,18 @@ namespace GLib {
|
||||||
inst_and_params.Append (vals [i]);
|
inst_and_params.Append (vals [i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLib.Value ret = GLib.Value.Empty;
|
object ret_obj = null;
|
||||||
|
if (glibsharp_signal_get_return_type (signal_id) != GType.None.Val) {
|
||||||
g_signal_emitv (inst_and_params.ArrayPtr, signal_id, gquark, ref ret);
|
GLib.Value ret = GLib.Value.Empty;
|
||||||
object ret_obj = ret.Val;
|
g_signal_emitv (inst_and_params.ArrayPtr, signal_id, gquark, ref ret);
|
||||||
|
ret_obj = ret.Val;
|
||||||
|
ret.Dispose ();
|
||||||
|
} else
|
||||||
|
g_signal_emitv (inst_and_params.ArrayPtr, signal_id, gquark, IntPtr.Zero);
|
||||||
|
|
||||||
foreach (GLib.Value val in vals)
|
foreach (GLib.Value val in vals)
|
||||||
val.Dispose ();
|
val.Dispose ();
|
||||||
ret.Dispose ();
|
|
||||||
|
|
||||||
return ret_obj;
|
return ret_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,6 +364,12 @@ namespace GLib {
|
||||||
[DllImport("libgobject-2.0-0.dll")]
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, ref GLib.Value return_value);
|
static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, ref GLib.Value return_value);
|
||||||
|
|
||||||
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
|
static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, IntPtr return_value);
|
||||||
|
|
||||||
|
[DllImport("glibsharpglue-2")]
|
||||||
|
static extern IntPtr glibsharp_signal_get_return_type (uint signal_id);
|
||||||
|
|
||||||
[DllImport("libgobject-2.0-0.dll")]
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
static extern uint g_signal_lookup (IntPtr name, IntPtr itype);
|
static extern uint g_signal_lookup (IntPtr name, IntPtr itype);
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ libglibsharpglue_2_la_SOURCES = \
|
||||||
error.c \
|
error.c \
|
||||||
list.c \
|
list.c \
|
||||||
object.c \
|
object.c \
|
||||||
|
signal.c \
|
||||||
slist.c \
|
slist.c \
|
||||||
type.c \
|
type.c \
|
||||||
unichar.c \
|
unichar.c \
|
||||||
|
|
34
glib/glue/signal.c
Normal file
34
glib/glue/signal.c
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/* signal.c : Glue for signaling stuff
|
||||||
|
*
|
||||||
|
* Author: Andrés G. Aragoneses <aaragoneses@novell.com>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 Novell Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
* Public License as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this program; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
/* Forward declarations */
|
||||||
|
GType glibsharp_signal_get_return_type (guint signal_id);
|
||||||
|
/* */
|
||||||
|
|
||||||
|
GType
|
||||||
|
glibsharp_signal_get_return_type (guint signal_id)
|
||||||
|
{
|
||||||
|
GSignalQuery query;
|
||||||
|
g_signal_query (signal_id, &query);
|
||||||
|
return query.return_type;
|
||||||
|
}
|
Loading…
Reference in a new issue