mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-26 20:35:29 +00:00
d7a08db9f6
* glue/adjustment.c: * glue/canvaspoints.c: * glue/clipboard.c: * glue/colorseldialog.c: * glue/combo.c: * glue/dialog.c: * glue/error.c: * glue/event.c: * glue/fileselection.c: * glue/list.c: * glue/object.c: * glue/paned.c: * glue/program.c: * glue/slist.c: * glue/style.c: * glue/type.c: * glue/value.c: * glue/widget.c: removed almost all the warnings. svn path=/trunk/gtk-sharp/; revision=12751
32 lines
709 B
C
32 lines
709 B
C
/* value.c : Glue to allocate GValues on the heap.
|
|
*
|
|
* Author: Mike Kestner <mkestner@speakeasy.net>
|
|
*
|
|
* <c> 2002 Mike Kestner
|
|
*/
|
|
|
|
#include <glib-object.h>
|
|
|
|
/* Forward declarations */
|
|
GValue *gtksharp_value_create (GType g_type);
|
|
GValue *gtksharp_value_create_from_property (GObject *obj, const gchar* name);
|
|
/* */
|
|
|
|
GValue *
|
|
gtksharp_value_create (GType g_type)
|
|
{
|
|
GValue *val = g_new0 (GValue, 1);
|
|
if (g_type != G_TYPE_INVALID)
|
|
val = g_value_init (val, g_type);
|
|
return val;
|
|
}
|
|
|
|
GValue *
|
|
gtksharp_value_create_from_property (GObject *obj, const gchar* name)
|
|
{
|
|
GParamSpec *spec = g_object_class_find_property (
|
|
G_OBJECT_GET_CLASS (obj), name);
|
|
return gtksharp_value_create (spec->value_type);
|
|
}
|
|
|