* 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>
|
||||
|
||||
* 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);
|
||||
|
||||
[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]
|
||||
delegate IntPtr RefStateSetDelegate (IntPtr raw);
|
||||
|
@ -142,7 +142,7 @@
|
|||
[GLib.DefaultSignalHandler (Type=typeof(Atk.Object), ConnectionMethod="OverrideRefStateSet")]
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
AtkStateSet* atksharp_object_base_ref_state_set (AtkObject *base, GType gtype);
|
||||
AtkStateSet* atksharp_object_base_ref_state_set (AtkObject *base);
|
||||
|
||||
|
||||
void
|
||||
|
@ -59,10 +59,9 @@ atksharp_object_override_ref_state_set (GType gtype, gpointer cb)
|
|||
}
|
||||
|
||||
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 (gtype);
|
||||
AtkObjectClass *parent = g_type_class_peek (ATK_TYPE_OBJECT);
|
||||
|
||||
if (parent->ref_state_set)
|
||||
return (*parent->ref_state_set) (atk_obj);
|
||||
|
|
Loading…
Reference in a new issue