GNOME Bugzilla – Bug 720095
Adding a method atk_object_peek_parent would be really convenient.
Last modified: 2013-12-09 17:11:57 UTC
Right now you can set the parent of an atk object using atk_object_set_parent. Default implementation of atk_object_set_parent is return the object assigned on set_parent. But on most toolkit implementors, the implementation is usually checking if there is a parent assigned with set_parent, and then fallback on custom methods on that toolkit. In most cases that initial check is checking if accessible_parent on the object structure is different to NULL. Something that is not really object-oriented, more if we take into account that we plan to create a private structure with that (bug 647488). On webkitgtk they are trying to bypass that using peek_class_parent, in order to use atk_object_get_parent implementation at AtkObject. But that seems like an overkill. It would be more simpler and more API clean to just add a method atk_object_peek_parent. Additionally, this method would not require an equivalent virtual method.
Created attachment 263805 [details] [review] Add atk_object_peek_parent Review of the patch, specifically about the wording on the new added documentation is welcome.
Created attachment 263809 [details] [review] atk_object_peek_parent Added some extra documentation on atk_object_peek_parent, to mention that is a utility method for ATK implementors. For the pov of an AT, peek_parent is not useful at all. Or in other words: this method will not have an equivalent on atspi.
Comment on attachment 263809 [details] [review] atk_object_peek_parent Committed after IRC review by Joanmarie Diggs