diff options
author | Corentin Noël <corentin@elementary.io> | 2018-06-18 12:15:51 +0000 |
---|---|---|
committer | Corentin Noël <corentin@elementary.io> | 2018-06-18 12:15:51 +0000 |
commit | 322b6af0af223894195a96d829b05d47767a8084 (patch) | |
tree | 6fe88051e8c477ee60d10d1d86746de20b1adb53 | |
parent | dbf0c660fe62dce28d51155313106c55eddcf628 (diff) | |
parent | 30f2712c5bbffbc03e98272c852d29b4bdf8b52e (diff) | |
download | atk-322b6af0af223894195a96d829b05d47767a8084.tar.gz |
Merge branch 'wip/tintou/atkimplementor-gir' into 'master'
atkimplementor: use the G_DEFINE_INTERFACE macro to declare it as interface in the introspection
See merge request GNOME/atk!2
-rw-r--r-- | atk/atkobject.c | 22 | ||||
-rw-r--r-- | atk/atkobject.h | 2 |
2 files changed, 6 insertions, 18 deletions
diff --git a/atk/atkobject.c b/atk/atkobject.c index d50be54..f8e855e 100644 --- a/atk/atkobject.c +++ b/atk/atkobject.c @@ -57,6 +57,9 @@ * */ +typedef AtkImplementorIface AtkImplementorInterface; +G_DEFINE_INTERFACE (AtkImplementor, atk_implementor, G_TYPE_OBJECT) + static GPtrArray *role_names = NULL; enum @@ -677,24 +680,9 @@ atk_object_init (AtkObject *accessible, accessible->role = ATK_ROLE_UNKNOWN; } -GType -atk_implementor_get_type (void) +static void +atk_implementor_default_init (AtkImplementorInterface *iface) { - static GType type = 0; - - if (!type) - { - static const GTypeInfo typeInfo = - { - sizeof (AtkImplementorIface), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - } ; - - type = g_type_register_static (G_TYPE_INTERFACE, "AtkImplementorIface", &typeInfo, 0) ; - } - - return type; } /** diff --git a/atk/atkobject.h b/atk/atkobject.h index 711dda7..4cb8ce2 100644 --- a/atk/atkobject.h +++ b/atk/atkobject.h @@ -678,7 +678,7 @@ struct _AtkImplementorIface }; ATK_AVAILABLE_IN_ALL -GType atk_implementor_get_type (void); +GType atk_implementor_get_type (void) G_GNUC_CONST; ATK_AVAILABLE_IN_ALL AtkObject* atk_implementor_ref_accessible (AtkImplementor *implementor); |