GNOME Bugzilla – Bug 617179
[Q2] 2.90 development tasks: Remove all structure fields
Last modified: 2011-01-19 13:15:15 UTC
Move struct member to the local C file, the rest of GTK+ will then also have to use accessors. See http://live.gnome.org/GTK%2B/3.0/Tasks#Q2
Assign to myself as I'm working on this as my GSoC project.
*** Bug 617188 has been marked as a duplicate of this bug. ***
Javier, a random thing I noticed; a lot of the TextView internals are heavily entangled, and using accessors will probably make the code less readable, and make some of the performance-critical loops in TextView too slow. Some of the stuff in there really does need to be a tight inner loop (especially for huge buffers). Basically I'd treat textbtree.c, testiter.c, textchild.c, textdisplay.c, textsegment.c, texttag.c or so as one big logical unit where they can use each other's fields directly. There are already textiterprivate.h, texttagprivate.h, textchildprivate.h, textsegment.h, and textbtree.h (btree and segment are private / not installed), so in many cases just moving the gobject structs over to those private headers may be the right thing to do. There are plenty of places that could use accessors without harm, but I don't think it's really worth trying to pick that apart, I'd just pretend this cluster of private implementation files is conceptually one big file. Where you might want to draw a line is between view/buffer and all the other more backend-ish goo. For example privatizing GtkTextLayout fields. But it would be some work.
Done! :)