[gtk/render-node-types: 1/3] Add macro for exported variables
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/render-node-types: 1/3] Add macro for exported variables
- Date: Tue, 7 Apr 2020 23:02:39 +0000 (UTC)
commit 1d8143e091068ed39a4631d6707979f61b8cd291
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Apr 7 23:32:22 2020 +0100
Add macro for exported variables
The logic is based on the similar macro in GLib, but with the
appropriate GDK symbols.
gdk/gdktypes.h | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
---
diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h
index 39f38788a0..eada3e43d3 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -624,4 +624,30 @@ typedef enum
G_END_DECLS
+/*< private >
+ * GDK_EXTERN_VAR:
+ *
+ * A macro to annotate extern variables so that they show up properly in
+ * Windows DLLs.
+ */
+#ifndef GDK_EXTERN_VAR
+# ifdef G_PLATFORM_WIN32
+# ifdef GDK_STATIC_COMPILATION
+# define GDK_EXTERN_VAR extern
+# else /* !GDK_STATIC_COMPILATION */
+# ifdef GDK_COMPILATION
+# ifdef DLL_EXPORT
+# define GDK_EXTERN_VAR __declspec(dllexport)
+# else /* !DLL_EXPORT */
+# define GDK_EXTERN_VAR extern
+# endif /* !DLL_EXPORT */
+# else /* !GDK_COMPILATION */
+# define GDK_EXTERN_VAR extern __declspec(dllimport)
+# endif /* !GDK_COMPILATION */
+# endif /* !GDK_STATIC_COMPILATION */
+# else /* !G_PLATFORM_WIN32 */
+# define GDK_EXTERN_VAR _GDK_EXTERN
+# endif /* !G_PLATFORM_WIN32 */
+#endif /* GLIB_VAR */
+
#endif /* __GDK_TYPES_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]