* atk/Object.custom:
* atk/glue/object.c: Simplified code for previous issue (recommendation from mkestner). svn path=/trunk/gtk-sharp/; revision=105929
This commit is contained in:
parent
d46963e86b
commit
dddf13e2fb
3 changed files with 11 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2008-06-16 Andrés G. Aragoneses <aaragoneses@novell.com>
|
||||||
|
|
||||||
|
* atk/Object.custom:
|
||||||
|
* atk/glue/object.c:
|
||||||
|
Simplified code for previous issue (recommendation from mkestner).
|
||||||
|
|
||||||
2008-06-16 Mike Kestner <mkestner@novell.com>
|
2008-06-16 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* glib/glue/object.c: fixes for object, boxed, and gtype
|
* glib/glue/object.c: fixes for object, boxed, and gtype
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
static extern void atksharp_object_override_ref_state_set (IntPtr type, RefStateSetDelegate cb);
|
static extern void atksharp_object_override_ref_state_set (IntPtr type, RefStateSetDelegate cb);
|
||||||
|
|
||||||
[DllImport("atksharpglue-2")]
|
[DllImport("atksharpglue-2")]
|
||||||
static extern IntPtr atksharp_object_base_ref_state_set (IntPtr atk_obj, IntPtr gtype);
|
static extern IntPtr atksharp_object_base_ref_state_set (IntPtr atk_obj);
|
||||||
|
|
||||||
[GLib.CDeclCallback]
|
[GLib.CDeclCallback]
|
||||||
delegate IntPtr RefStateSetDelegate (IntPtr raw);
|
delegate IntPtr RefStateSetDelegate (IntPtr raw);
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
[GLib.DefaultSignalHandler (Type=typeof(Atk.Object), ConnectionMethod="OverrideRefStateSet")]
|
[GLib.DefaultSignalHandler (Type=typeof(Atk.Object), ConnectionMethod="OverrideRefStateSet")]
|
||||||
protected virtual Atk.StateSet OnRefStateSet ()
|
protected virtual Atk.StateSet OnRefStateSet ()
|
||||||
{
|
{
|
||||||
IntPtr raw = atksharp_object_base_ref_state_set (Handle, GLib.GType.FromName("AtkObject").Val);
|
IntPtr raw = atksharp_object_base_ref_state_set (Handle);
|
||||||
return GLib.Object.GetObject (raw, true) as StateSet;
|
return GLib.Object.GetObject (raw, true) as StateSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ void atksharp_object_override_ref_child (GType gtype, gpointer cb);
|
||||||
|
|
||||||
void atksharp_object_override_ref_state_set (GType gtype, gpointer cb);
|
void atksharp_object_override_ref_state_set (GType gtype, gpointer cb);
|
||||||
|
|
||||||
AtkStateSet* atksharp_object_base_ref_state_set (AtkObject *base, GType gtype);
|
AtkStateSet* atksharp_object_base_ref_state_set (AtkObject *base);
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -59,10 +59,9 @@ atksharp_object_override_ref_state_set (GType gtype, gpointer cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
AtkStateSet*
|
AtkStateSet*
|
||||||
atksharp_object_base_ref_state_set (AtkObject *atk_obj, GType gtype)
|
atksharp_object_base_ref_state_set (AtkObject *atk_obj)
|
||||||
{
|
{
|
||||||
//FIXME: find a cleaner way of doing this (it comes from a managed call to GType.FromName() :
|
AtkObjectClass *parent = g_type_class_peek (ATK_TYPE_OBJECT);
|
||||||
AtkObjectClass *parent = g_type_class_peek (gtype);
|
|
||||||
|
|
||||||
if (parent->ref_state_set)
|
if (parent->ref_state_set)
|
||||||
return (*parent->ref_state_set) (atk_obj);
|
return (*parent->ref_state_set) (atk_obj);
|
||||||
|
|
Loading…
Reference in a new issue