We only use WK_EXPORT macro, but if the C API is eventually removed we will have to change all public headers, so I think it's better to just add our own macro like WebKit1 does
Created attachment 109932 [details] Patch
Comment on attachment 109932 [details] Patch At this point I think it's best to avoid the code duplication. Even if the C API disappears it will be a while from now and we have time to fix the headers.
We are wrapping the C API, it shouldn't be exposed from the GTK+ API.
Created attachment 109964 [details] Updated patch to ignore WEBKIT_API in docs I still think we shoulnd't expose the C API at all in the public headers. The fact that we are wrapping the C API is just an implementation detail. We might decide not to distribute the C API in the future and use it a private library.
Comment on attachment 109932 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=109932&action=review Okay...I think I'm convinced. > Source/WebKit2/UIProcess/API/gtk/WebKitDefines.h:45 > +#include <glib.h> > + > +#ifdef G_OS_WIN32 > +# ifdef BUILDING_WEBKIT > +# define WEBKIT_API __declspec(dllexport) > +# else > +# define WEBKIT_API __declspec(dllimport) > +# endif > +# define WEBKIT_OBSOLETE_API WEBKIT_API > +#else > +# define WEBKIT_API __attribute__((visibility("default"))) > +# define WEBKIT_OBSOLETE_API WEBKIT_API __attribute__((deprecated)) > +#endif You should not indent preprocessor defines.
Comment on attachment 109964 [details] Updated patch to ignore WEBKIT_API in docs View in context: https://bugs.webkit.org/attachment.cgi?id=109964&action=review > Source/WebKit2/UIProcess/API/gtk/WebKitError.h:28 > #include <glib.h> You can remove this glib.h include now. > Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h:27 > #include <glib-object.h> Ditto, I think. > Source/WebKit2/UIProcess/API/gtk/WebKitWebLoaderClient.h:27 > #include <glib-object.h> Etc.
Committed r96821: <http://trac.webkit.org/changeset/96821>