From 4bf69c6742053c02538bc0a46204701699802cf5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 9 Aug 2015 02:38:18 +0200
Subject: uxthemegtk: Add configure check and stub dll.

List of functions updated by Ivan Akulinchev <ivan.akulinchev@gmail.com>.
---
 aclocal.m4                        |  20 ++++
 configure.ac                      |  22 ++++
 dlls/uxtheme-gtk/Makefile.in      |   7 ++
 dlls/uxtheme-gtk/uxtheme-gtk.spec |   1 +
 dlls/uxtheme-gtk/uxtheme.c        | 218 ++++++++++++++++++++++++++++++++++++++
 dlls/uxtheme-gtk/uxthemegtk.h     |  88 +++++++++++++++
 dlls/uxtheme-gtk/version.rc       |  21 ++++
 7 files changed, 377 insertions(+)
 create mode 100644 dlls/uxtheme-gtk/Makefile.in
 create mode 100644 dlls/uxtheme-gtk/uxtheme-gtk.spec
 create mode 100644 dlls/uxtheme-gtk/uxtheme.c
 create mode 100644 dlls/uxtheme-gtk/uxthemegtk.h
 create mode 100644 dlls/uxtheme-gtk/version.rc

diff --git a/aclocal.m4 b/aclocal.m4
index e236c92..4bbf44e 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -109,6 +109,26 @@ test -z "$ac_libs" || ac_libs=`echo " $ac_libs" | sed 's/ -L\([[^/]]\)/ -L\$(top
 AS_VAR_POPDEF([ac_libs])dnl
 AS_VAR_POPDEF([ac_cflags])])dnl
 
+dnl **** Get include path from pkg-config ****
+dnl
+dnl Usage: WINE_PACKAGE_INCLUDE_FLAGS(var,pkg-name,[cflags-alternate,[checks]]])
+dnl
+AC_DEFUN([WINE_PACKAGE_INCLUDE_FLAGS],
+[AC_REQUIRE([WINE_PATH_PKG_CONFIG])dnl
+AS_VAR_PUSHDEF([ac_cflags],[[$1]_CFLAGS])dnl
+AC_ARG_VAR(ac_cflags, [C compiler flags for $2, overriding pkg-config])dnl
+AS_VAR_IF([ac_cflags],[],
+      [AS_VAR_SET_IF([PKG_CONFIG],
+      [ac_cflags=`$PKG_CONFIG --cflags-only-I [$2] 2>/dev/null`])])
+m4_ifval([$3],[test "$cross_compiling" = yes || ac_cflags=[$]{ac_cflags:-[$3]}])
+AS_ECHO(["$as_me:${as_lineno-$LINENO}: $2 cflags: $ac_cflags"]) >&AS_MESSAGE_LOG_FD
+ac_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $ac_cflags"
+$4
+CPPFLAGS=$ac_save_CPPFLAGS
+test -z "$ac_cflags" || ac_cflags=`echo " $ac_cflags" | sed 's/ -I\([[^/]]\)/ -I\$(top_builddir)\/\1/g'`
+AS_VAR_POPDEF([ac_cflags])])dnl
+
 dnl **** Link C code with an assembly file ****
 dnl
 dnl Usage: WINE_TRY_ASM_LINK(asm-code,includes,function,[action-if-found,[action-if-not-found]])
diff --git a/configure.ac b/configure.ac
index bfcf319..97aa018 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,6 +54,7 @@ AC_ARG_WITH(gnutls,    AS_HELP_STRING([--without-gnutls],[do not use GnuTLS (sch
 AC_ARG_WITH(gsm,       AS_HELP_STRING([--without-gsm],[do not use libgsm (GSM 06.10 codec support)]),
             [if test "x$withval" = "xno"; then ac_cv_header_gsm_h=no; ac_cv_header_gsm_gsm_h=no; fi])
 AC_ARG_WITH(gstreamer, AS_HELP_STRING([--without-gstreamer],[do not use GStreamer (codecs support)]))
+AC_ARG_WITH(gtk3,      AS_HELP_STRING([--without-gtk3],[do not use gtk3 (gtk3 theming support)]))
 AC_ARG_WITH(hal,       AS_HELP_STRING([--without-hal],[do not use HAL (dynamic device support)]))
 AC_ARG_WITH(jpeg,      AS_HELP_STRING([--without-jpeg],[do not use JPEG]))
 AC_ARG_WITH(ldap,      AS_HELP_STRING([--without-ldap],[do not use LDAP]),
@@ -1487,6 +1488,26 @@ fi
 WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms2_cmsOpenProfileFromFile" != "yes"],
                  [liblcms2 ${notice_platform}development files not found, Color Management won't be supported.])
 
+dnl **** Check for GTK3 ****
+if test "x$with_gtk3" != "xno";
+then
+    WINE_PACKAGE_INCLUDE_FLAGS(GTK3, [gtk+-3.0],,
+        [AC_CHECK_HEADERS([gtk/gtk.h])
+        if test "$ac_cv_header_gtk_gtk_h" = "yes"
+        then
+            WINE_CHECK_SONAME(gobject-2.0,g_object_unref,
+                [WINE_CHECK_SONAME(cairo,cairo_destroy,
+                    [WINE_CHECK_SONAME(gtk-3,gtk_style_context_save,
+                            [AC_DEFINE(HAVE_GTK3, 1, [Define if GTK 3 is installed])])])])
+            test "x$ac_cv_lib_soname_gtk_3" != "x" || GTK3_CFLAGS=""
+        else
+            GTK3_CFLAGS=""
+        fi])
+fi
+WINE_NOTICE_WITH(gtk3,[test "x$ac_cv_lib_soname_gtk_3" = x],
+                 [GTK3 ${notice_platform}development files not found, GTK themes won't be supported.])
+test "x$ac_cv_lib_soname_gtk_3" != "x" || enable_uxtheme_gtk=${enable_uxtheme_gtk:-no}
+
 dnl **** Check for FreeType 2 ****
 if test "x$with_freetype" != "xno"
 then
@@ -3356,6 +3377,7 @@ WINE_CONFIG_TEST(dlls/userenv/tests)
 WINE_CONFIG_DLL(usp10,,[implib])
 WINE_CONFIG_TEST(dlls/usp10/tests)
 WINE_CONFIG_LIB(uuid)
+WINE_CONFIG_DLL(uxtheme-gtk)
 WINE_CONFIG_DLL(uxtheme,,[implib])
 WINE_CONFIG_TEST(dlls/uxtheme/tests)
 WINE_CONFIG_DLL(vbscript,,[clean])
diff --git a/dlls/uxtheme-gtk/Makefile.in b/dlls/uxtheme-gtk/Makefile.in
new file mode 100644
index 0000000..07cf3a0f
--- /dev/null
+++ b/dlls/uxtheme-gtk/Makefile.in
@@ -0,0 +1,7 @@
+MODULE    = uxtheme-gtk.dll
+EXTRAINCL = $(GTK3_CFLAGS)
+
+C_SRCS = \
+	uxtheme.c
+
+RC_SRCS = version.rc
diff --git a/dlls/uxtheme-gtk/uxtheme-gtk.spec b/dlls/uxtheme-gtk/uxtheme-gtk.spec
new file mode 100644
index 0000000..b7db254
--- /dev/null
+++ b/dlls/uxtheme-gtk/uxtheme-gtk.spec
@@ -0,0 +1 @@
+# Empty
diff --git a/dlls/uxtheme-gtk/uxtheme.c b/dlls/uxtheme-gtk/uxtheme.c
new file mode 100644
index 0000000..cd5e3c0
--- /dev/null
+++ b/dlls/uxtheme-gtk/uxtheme.c
@@ -0,0 +1,218 @@
+/*
+ * GTK uxtheme implementation
+ *
+ * Copyright (C) 2015 Michael Müller
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+#include "wine/library.h"
+
+#include "wine/debug.h"
+#include "uxthemegtk.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(uxthemegtk);
+
+static void *libgtk3 = NULL;
+static void *libcairo = NULL;
+static void *libgobject2 = NULL;
+
+#define MAKE_FUNCPTR(f) typeof(f) * p##f = NULL
+MAKE_FUNCPTR(cairo_create);
+MAKE_FUNCPTR(cairo_destroy);
+MAKE_FUNCPTR(cairo_image_surface_create);
+MAKE_FUNCPTR(cairo_image_surface_get_data);
+MAKE_FUNCPTR(cairo_image_surface_get_stride);
+MAKE_FUNCPTR(cairo_surface_destroy);
+MAKE_FUNCPTR(cairo_surface_flush);
+MAKE_FUNCPTR(g_type_check_instance_is_a);
+MAKE_FUNCPTR(gtk_bin_get_child);
+MAKE_FUNCPTR(gtk_button_new);
+MAKE_FUNCPTR(gtk_check_button_new);
+MAKE_FUNCPTR(gtk_combo_box_new_with_entry);
+MAKE_FUNCPTR(gtk_container_add);
+MAKE_FUNCPTR(gtk_container_forall);
+MAKE_FUNCPTR(gtk_entry_new);
+MAKE_FUNCPTR(gtk_fixed_new);
+MAKE_FUNCPTR(gtk_frame_new);
+MAKE_FUNCPTR(gtk_init);
+MAKE_FUNCPTR(gtk_label_new);
+MAKE_FUNCPTR(gtk_menu_bar_new);
+MAKE_FUNCPTR(gtk_menu_item_new);
+MAKE_FUNCPTR(gtk_menu_item_set_submenu);
+MAKE_FUNCPTR(gtk_menu_new);
+MAKE_FUNCPTR(gtk_menu_shell_append);
+MAKE_FUNCPTR(gtk_notebook_new);
+MAKE_FUNCPTR(gtk_radio_button_new);
+MAKE_FUNCPTR(gtk_render_arrow);
+MAKE_FUNCPTR(gtk_render_background);
+MAKE_FUNCPTR(gtk_render_check);
+MAKE_FUNCPTR(gtk_render_frame);
+MAKE_FUNCPTR(gtk_render_handle);
+MAKE_FUNCPTR(gtk_render_line);
+MAKE_FUNCPTR(gtk_render_option);
+MAKE_FUNCPTR(gtk_render_slider);
+MAKE_FUNCPTR(gtk_scale_new);
+MAKE_FUNCPTR(gtk_scrolled_window_new);
+MAKE_FUNCPTR(gtk_separator_tool_item_new);
+MAKE_FUNCPTR(gtk_style_context_add_class);
+MAKE_FUNCPTR(gtk_style_context_add_region);
+MAKE_FUNCPTR(gtk_style_context_get_background_color);
+MAKE_FUNCPTR(gtk_style_context_get_border_color);
+MAKE_FUNCPTR(gtk_style_context_get_color);
+MAKE_FUNCPTR(gtk_style_context_remove_class);
+MAKE_FUNCPTR(gtk_style_context_restore);
+MAKE_FUNCPTR(gtk_style_context_save);
+MAKE_FUNCPTR(gtk_style_context_set_junction_sides);
+MAKE_FUNCPTR(gtk_style_context_set_state);
+MAKE_FUNCPTR(gtk_toggle_button_get_type);
+MAKE_FUNCPTR(gtk_toolbar_new);
+MAKE_FUNCPTR(gtk_tree_view_append_column);
+MAKE_FUNCPTR(gtk_tree_view_column_get_button);
+MAKE_FUNCPTR(gtk_tree_view_column_new);
+MAKE_FUNCPTR(gtk_tree_view_get_column);
+MAKE_FUNCPTR(gtk_tree_view_new);
+MAKE_FUNCPTR(gtk_widget_destroy);
+MAKE_FUNCPTR(gtk_widget_get_style_context);
+MAKE_FUNCPTR(gtk_widget_style_get);
+MAKE_FUNCPTR(gtk_window_new);
+#undef MAKE_FUNCPTR
+
+static void free_gtk3_libs(void)
+{
+    if (libgtk3) wine_dlclose(libgtk3, NULL, 0);
+    if (libcairo) wine_dlclose(libcairo, NULL, 0);
+    if (libgobject2) wine_dlclose(libgobject2, NULL, 0);
+    libgtk3 = libcairo = libgobject2 = NULL;
+}
+
+#define LOAD_FUNCPTR(lib, f) \
+    if(!(p##f = wine_dlsym(lib, #f, NULL, 0))) \
+    { \
+        WARN("Can't find symbol %s.\n", #f); \
+        goto error; \
+    }
+
+static BOOL load_gtk3_libs(void)
+{
+    libgtk3 = wine_dlopen(SONAME_LIBGTK_3, RTLD_NOW, NULL, 0);
+    if (!libgtk3)
+    {
+        FIXME("Wine cannot find the %s library.\n", SONAME_LIBGTK_3);
+        goto error;
+    }
+
+    LOAD_FUNCPTR(libgtk3, gtk_bin_get_child)
+    LOAD_FUNCPTR(libgtk3, gtk_button_new)
+    LOAD_FUNCPTR(libgtk3, gtk_check_button_new)
+    LOAD_FUNCPTR(libgtk3, gtk_combo_box_new_with_entry)
+    LOAD_FUNCPTR(libgtk3, gtk_container_add)
+    LOAD_FUNCPTR(libgtk3, gtk_container_forall)
+    LOAD_FUNCPTR(libgtk3, gtk_entry_new)
+    LOAD_FUNCPTR(libgtk3, gtk_fixed_new)
+    LOAD_FUNCPTR(libgtk3, gtk_frame_new)
+    LOAD_FUNCPTR(libgtk3, gtk_init)
+    LOAD_FUNCPTR(libgtk3, gtk_label_new)
+    LOAD_FUNCPTR(libgtk3, gtk_menu_bar_new)
+    LOAD_FUNCPTR(libgtk3, gtk_menu_item_new)
+    LOAD_FUNCPTR(libgtk3, gtk_menu_item_set_submenu)
+    LOAD_FUNCPTR(libgtk3, gtk_menu_new)
+    LOAD_FUNCPTR(libgtk3, gtk_menu_shell_append)
+    LOAD_FUNCPTR(libgtk3, gtk_notebook_new)
+    LOAD_FUNCPTR(libgtk3, gtk_radio_button_new)
+    LOAD_FUNCPTR(libgtk3, gtk_render_arrow)
+    LOAD_FUNCPTR(libgtk3, gtk_render_background)
+    LOAD_FUNCPTR(libgtk3, gtk_render_check)
+    LOAD_FUNCPTR(libgtk3, gtk_render_frame)
+    LOAD_FUNCPTR(libgtk3, gtk_render_handle)
+    LOAD_FUNCPTR(libgtk3, gtk_render_line)
+    LOAD_FUNCPTR(libgtk3, gtk_render_option)
+    LOAD_FUNCPTR(libgtk3, gtk_render_slider)
+    LOAD_FUNCPTR(libgtk3, gtk_scale_new)
+    LOAD_FUNCPTR(libgtk3, gtk_scrolled_window_new)
+    LOAD_FUNCPTR(libgtk3, gtk_separator_tool_item_new)
+    LOAD_FUNCPTR(libgtk3, gtk_style_context_add_class)
+    LOAD_FUNCPTR(libgtk3, gtk_style_context_add_region)
+    LOAD_FUNCPTR(libgtk3, gtk_style_context_get_background_color)
+    LOAD_FUNCPTR(libgtk3, gtk_style_context_get_border_color)
+    LOAD_FUNCPTR(libgtk3, gtk_style_context_get_color)
+    LOAD_FUNCPTR(libgtk3, gtk_style_context_remove_class)
+    LOAD_FUNCPTR(libgtk3, gtk_style_context_restore)
+    LOAD_FUNCPTR(libgtk3, gtk_style_context_save)
+    LOAD_FUNCPTR(libgtk3, gtk_style_context_set_junction_sides)
+    LOAD_FUNCPTR(libgtk3, gtk_style_context_set_state)
+    LOAD_FUNCPTR(libgtk3, gtk_toggle_button_get_type)
+    LOAD_FUNCPTR(libgtk3, gtk_toolbar_new)
+    LOAD_FUNCPTR(libgtk3, gtk_tree_view_append_column)
+    LOAD_FUNCPTR(libgtk3, gtk_tree_view_column_get_button)
+    LOAD_FUNCPTR(libgtk3, gtk_tree_view_column_new)
+    LOAD_FUNCPTR(libgtk3, gtk_tree_view_get_column)
+    LOAD_FUNCPTR(libgtk3, gtk_tree_view_new)
+    LOAD_FUNCPTR(libgtk3, gtk_widget_destroy)
+    LOAD_FUNCPTR(libgtk3, gtk_widget_get_style_context)
+    LOAD_FUNCPTR(libgtk3, gtk_widget_style_get)
+    LOAD_FUNCPTR(libgtk3, gtk_window_new)
+
+    libcairo = wine_dlopen(SONAME_LIBCAIRO, RTLD_NOW, NULL, 0);
+    if (!libcairo)
+    {
+        FIXME("Wine cannot find the %s library.\n", SONAME_LIBCAIRO);
+        goto error;
+    }
+
+    LOAD_FUNCPTR(libcairo, cairo_create)
+    LOAD_FUNCPTR(libcairo, cairo_destroy)
+    LOAD_FUNCPTR(libcairo, cairo_image_surface_create)
+    LOAD_FUNCPTR(libcairo, cairo_image_surface_get_data)
+    LOAD_FUNCPTR(libcairo, cairo_image_surface_get_stride)
+    LOAD_FUNCPTR(libcairo, cairo_surface_destroy)
+    LOAD_FUNCPTR(libcairo, cairo_surface_flush)
+
+    libgobject2 = wine_dlopen(SONAME_LIBGOBJECT_2_0, RTLD_NOW, NULL, 0);
+    if (!libgobject2)
+    {
+        FIXME("Wine cannot find the %s library.\n", SONAME_LIBGOBJECT_2_0);
+        goto error;
+    }
+
+    LOAD_FUNCPTR(libgobject2, g_type_check_instance_is_a)
+    return TRUE;
+
+error:
+    free_gtk3_libs();
+    return FALSE;
+}
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
+{
+    TRACE("(%p, %d, %p)\n", instance, reason, reserved);
+
+    switch (reason)
+    {
+        case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(instance);
+            if (!load_gtk3_libs()) return FALSE;
+            break;
+
+        case DLL_PROCESS_DETACH:
+            if (reserved) break;
+            free_gtk3_libs();
+            break;
+    }
+
+    return TRUE;
+}
diff --git a/dlls/uxtheme-gtk/uxthemegtk.h b/dlls/uxtheme-gtk/uxthemegtk.h
new file mode 100644
index 0000000..42e4784
--- /dev/null
+++ b/dlls/uxtheme-gtk/uxthemegtk.h
@@ -0,0 +1,88 @@
+/*
+ * GTK uxtheme implementation
+ *
+ * Copyright (C) 2015 Michael Müller
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef UXTHEMEGTK_H
+#define UXTHEMEGTK_H
+
+#define GDK_DISABLE_DEPRECATION_WARNINGS
+#include <gtk/gtk.h>
+
+#define MAKE_FUNCPTR(f) extern typeof(f) * p##f DECLSPEC_HIDDEN
+MAKE_FUNCPTR(cairo_create);
+MAKE_FUNCPTR(cairo_destroy);
+MAKE_FUNCPTR(cairo_image_surface_create);
+MAKE_FUNCPTR(cairo_image_surface_get_data);
+MAKE_FUNCPTR(cairo_image_surface_get_stride);
+MAKE_FUNCPTR(cairo_surface_destroy);
+MAKE_FUNCPTR(cairo_surface_flush);
+MAKE_FUNCPTR(g_type_check_instance_is_a);
+MAKE_FUNCPTR(gtk_bin_get_child);
+MAKE_FUNCPTR(gtk_button_new);
+MAKE_FUNCPTR(gtk_check_button_new);
+MAKE_FUNCPTR(gtk_combo_box_new_with_entry);
+MAKE_FUNCPTR(gtk_container_add);
+MAKE_FUNCPTR(gtk_container_forall);
+MAKE_FUNCPTR(gtk_entry_new);
+MAKE_FUNCPTR(gtk_fixed_new);
+MAKE_FUNCPTR(gtk_frame_new);
+MAKE_FUNCPTR(gtk_init);
+MAKE_FUNCPTR(gtk_label_new);
+MAKE_FUNCPTR(gtk_menu_bar_new);
+MAKE_FUNCPTR(gtk_menu_item_new);
+MAKE_FUNCPTR(gtk_menu_item_set_submenu);
+MAKE_FUNCPTR(gtk_menu_new);
+MAKE_FUNCPTR(gtk_menu_shell_append);
+MAKE_FUNCPTR(gtk_notebook_new);
+MAKE_FUNCPTR(gtk_radio_button_new);
+MAKE_FUNCPTR(gtk_render_arrow);
+MAKE_FUNCPTR(gtk_render_background);
+MAKE_FUNCPTR(gtk_render_check);
+MAKE_FUNCPTR(gtk_render_frame);
+MAKE_FUNCPTR(gtk_render_handle);
+MAKE_FUNCPTR(gtk_render_line);
+MAKE_FUNCPTR(gtk_render_option);
+MAKE_FUNCPTR(gtk_render_slider);
+MAKE_FUNCPTR(gtk_scale_new);
+MAKE_FUNCPTR(gtk_scrolled_window_new);
+MAKE_FUNCPTR(gtk_separator_tool_item_new);
+MAKE_FUNCPTR(gtk_style_context_add_class);
+MAKE_FUNCPTR(gtk_style_context_add_region);
+MAKE_FUNCPTR(gtk_style_context_get_background_color);
+MAKE_FUNCPTR(gtk_style_context_get_border_color);
+MAKE_FUNCPTR(gtk_style_context_get_color);
+MAKE_FUNCPTR(gtk_style_context_remove_class);
+MAKE_FUNCPTR(gtk_style_context_restore);
+MAKE_FUNCPTR(gtk_style_context_save);
+MAKE_FUNCPTR(gtk_style_context_set_junction_sides);
+MAKE_FUNCPTR(gtk_style_context_set_state);
+MAKE_FUNCPTR(gtk_toggle_button_get_type);
+MAKE_FUNCPTR(gtk_toolbar_new);
+MAKE_FUNCPTR(gtk_tree_view_append_column);
+MAKE_FUNCPTR(gtk_tree_view_column_get_button);
+MAKE_FUNCPTR(gtk_tree_view_column_new);
+MAKE_FUNCPTR(gtk_tree_view_get_column);
+MAKE_FUNCPTR(gtk_tree_view_new);
+MAKE_FUNCPTR(gtk_widget_destroy);
+MAKE_FUNCPTR(gtk_widget_get_style_context);
+MAKE_FUNCPTR(gtk_widget_style_get);
+MAKE_FUNCPTR(gtk_window_new);
+#undef MAKE_FUNCPTR
+
+#endif /* UXTHEMEGTK_H */
diff --git a/dlls/uxtheme-gtk/version.rc b/dlls/uxtheme-gtk/version.rc
new file mode 100644
index 0000000..38db521
--- /dev/null
+++ b/dlls/uxtheme-gtk/version.rc
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2015 Michael Müller
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define WINE_FILENAME_STR "uxtheme.dll"
+
+#include <wine/wine_common_ver.rc>
-- 
2.6.1

