GNOME Bugzilla – Bug 739781
Make global GDK libgtk_only functions more private
Last modified: 2014-11-08 16:32:26 UTC
we should use the same trick we use in GLib, with a macro accessing a vtable of function pointers.
Created attachment 290166 [details] [review] Make global GDK libgtk_only functions more private The current way of exposing GDK API that should be considered internal to GTK+ is to append a 'libgtk_only' suffix to the function name; this is not really safe. GLib has been using a slightly different approach: a private table of function pointers, and a macro that allows accessing the desired symbol inside that vtable. We can copy the approach, and deprecate the 'libgtk_only' symbols in lieu of outright removal.
Created attachment 290169 [details] [review] Move GDK GL flags accessors to the private vtable This allows us to use the GDK_PRIVATE_CALL macro inside gtk.
Created attachment 290170 [details] [review] Hide GdkWindow libgtk_only API in the private vtable These are the last two global GDK symbols that have a libgtk_only suffix.
Review of attachment 290166 [details] [review]: Looks good to me
Review of attachment 290169 [details] [review]: ok
Review of attachment 290170 [details] [review]: ok