After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685461 - Make the EvView struct public
Make the EvView struct public
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-04 03:17 UTC by José Aliste
Modified: 2018-05-22 14:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make EvView struct public (153.87 KB, patch)
2012-10-04 03:17 UTC, José Aliste
none Details | Review

Description José Aliste 2012-10-04 03:17:49 UTC
Created attachment 225758 [details] [review]
make EvView  struct public

Currently the EvView struct holds all the data members used by EvView, and the EvView struct is hidden in a -private header file. Instead, we should use the pattern 

struct {
    GtkContainer parent;
    EvviewPrivate *priv;
}

and make the EvViewPrivate struct private. Unfortunately, this will change the ABI, but will help to prevent ABI changes in the future, no? 
Besides, this also allows for subclassing EvView.
Comment 1 Christian Persch 2012-10-04 11:26:38 UTC
If we do this (and since it's an ABI break, we'll have to wait until we need to do an ABI break for a really important reason), you shouldn't just s/foo->bar/foo->priv->bar/g but instead most functions that have multiple ->priv-> accesses should have an EvViewPrivate *priv = view->priv; decl at the top and then use priv-> instead of view->priv-> throughout.
Comment 2 José Aliste 2012-10-04 12:42:10 UTC
Yeah, this is more of a proof of concept patch I made, as I was discussing with Carlos about how to fix other bug in evince without breaking the ABI... So it was a minimal patch :)
Comment 3 Christian Persch 2012-10-04 13:19:27 UTC
Actually I think it wouldn't be an ABI break to do this. Since EvView is a private struct (and the private header not installed), the only way to subclass EvView previously would have been using g_type_query() at runtime to get the struct sizes, and that will continue to work (even though the actual struct size returned will be different).
Comment 4 GNOME Infrastructure Team 2018-05-22 14:47:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/303.