mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Added patch for native GTK3 theming support by Ivan Akulinchev.
This commit is contained in:
parent
0184015194
commit
ec3715b113
@ -39,10 +39,11 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [8]:**
|
||||
**Bug fixes and features included in the next upcoming release [9]:**
|
||||
|
||||
* Add stub dlls required for MSVC 2015 runtime library (Windows 10)
|
||||
* Add stubs for additional wininet options in InternetSetOption
|
||||
* Add support for GTK3 theming
|
||||
* Fake success in IViewObject::Draw stub ([Wine Bug #30611](https://bugs.winehq.org/show_bug.cgi?id=30611))
|
||||
* Fix possible integer overflow in VarR4FromDec ([Wine Bug #38988](https://bugs.winehq.org/show_bug.cgi?id=38988))
|
||||
* Implement stub for vcomp._vcomp_flush ([Wine Bug #39058](https://bugs.winehq.org/show_bug.cgi?id=39058))
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -13,6 +13,7 @@ wine-staging (1.7.49) UNRELEASED; urgency=low
|
||||
* Added patch to fix possible integer overflow in VarR4FromDec.
|
||||
* Added patch to make sure Winhttp raw request headers are terminated using
|
||||
double \r\n.
|
||||
* Added patch for native GTK3 theming support by Ivan Akulinchev.
|
||||
* Removed patch to avoid race-conditions with long running threadpool tasks
|
||||
(accepted upstream).
|
||||
* Removed patch to add support for ThreadQuerySetWin32StartAddress info class
|
||||
|
@ -241,6 +241,7 @@ patch_enable_all ()
|
||||
enable_user32_Painting="$1"
|
||||
enable_user32_ScrollWindowEx="$1"
|
||||
enable_user32_WndProc="$1"
|
||||
enable_uxtheme_GTK_Theming="$1"
|
||||
enable_vcomp_Functions="$1"
|
||||
enable_version_VerQueryValue="$1"
|
||||
enable_wbemdisp_ISWbemSecurity="$1"
|
||||
@ -805,6 +806,9 @@ patch_enable ()
|
||||
user32-WndProc)
|
||||
enable_user32_WndProc="$2"
|
||||
;;
|
||||
uxtheme-GTK_Theming)
|
||||
enable_uxtheme_GTK_Theming="$2"
|
||||
;;
|
||||
vcomp-Functions)
|
||||
enable_vcomp_Functions="$2"
|
||||
;;
|
||||
@ -4781,6 +4785,26 @@ if test "$enable_user32_WndProc" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset uxtheme-GTK_Theming
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * aclocal.m4, configure.ac, dlls/uxtheme-gtk/Makefile.in, dlls/uxtheme-gtk/button.c, dlls/uxtheme-gtk/combobox.c, dlls
|
||||
# | /uxtheme-gtk/edit.c, dlls/uxtheme-gtk/header.c, dlls/uxtheme-gtk/listbox.c, dlls/uxtheme-gtk/listview.c, dlls/uxtheme-
|
||||
# | gtk/menu.c, dlls/uxtheme-gtk/rebar.c, dlls/uxtheme-gtk/status.c, dlls/uxtheme-gtk/tab.c, dlls/uxtheme-gtk/toolbar.c,
|
||||
# | dlls/uxtheme-gtk/trackbar.c, dlls/uxtheme-gtk/uxtheme-gtk.spec, dlls/uxtheme-gtk/uxtheme.c, dlls/uxtheme-
|
||||
# | gtk/uxthemegtk.h, dlls/uxtheme-gtk/version.rc, dlls/uxtheme-gtk/window.c
|
||||
# |
|
||||
if test "$enable_uxtheme_GTK_Theming" -eq 1; then
|
||||
patch_apply uxtheme-GTK_Theming/0001-uxthemegtk-Add-configure-check-and-stub-dll.patch
|
||||
patch_apply uxtheme-GTK_Theming/0002-uxthemegtk-Initial-implementation.patch
|
||||
patch_apply uxtheme-GTK_Theming/0003-uxthemegtk-Implement-enumeration-of-themes-color-and.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "uxthemegtk: Add configure check and stub dll.", 1 },';
|
||||
echo '+ { "Ivan Akulinchev", "uxthemegtk: Initial implementation.", 1 },';
|
||||
echo '+ { "Michael Müller", "uxthemegtk: Implement enumeration of themes, color and sizes.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset vcomp-Functions
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -4998,15 +5022,51 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-MESA_GPU_Info
|
||||
# Patchset wined3d-Geforce_425M
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35054] Add wined3d detection for GeForce GT 425M
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_gl.h, dlls/winex11.drv/opengl.c, include/wine/wgl_driver.h
|
||||
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_MESA_GPU_Info" -eq 1; then
|
||||
patch_apply wined3d-MESA_GPU_Info/0001-wined3d-Use-pci-and-memory-information-from-MESA-if-.patch
|
||||
if test "$enable_wined3d_Geforce_425M" -eq 1; then
|
||||
patch_apply wined3d-Geforce_425M/0001-wined3d-Add-detection-for-NVIDIA-GeForce-425M.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "wined3d: Use pci and memory information from MESA if possible.", 2 },';
|
||||
echo '+ { "Jarkko Korpi", "wined3d: Add detection for NVIDIA GeForce 425M.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Revert_PixelFormat
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35655] Fix wined3d performance drop introduced by pixelformat changes.
|
||||
# | * [#35718] Fix flickering introduced by pixelformat changes.
|
||||
# | * [#35975] Fix gray screen on startup introduced by pixelformat changes.
|
||||
# | * [#36900] Fix missing video introduced by pixelformat changes.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d8/tests/device.c, dlls/d3d9/tests/device.c, dlls/ddraw/tests/ddraw1.c, dlls/ddraw/tests/ddraw2.c,
|
||||
# | dlls/ddraw/tests/ddraw4.c, dlls/ddraw/tests/ddraw7.c, dlls/wined3d/context.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Revert_PixelFormat" -eq 1; then
|
||||
patch_apply wined3d-Revert_PixelFormat/0001-Revert-wined3d-Track-if-a-context-s-private-hdc-has-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0002-Revert-wined3d-Track-if-a-context-s-hdc-is-private-s.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0003-Revert-wined3d-When-restoring-pixel-format-in-contex.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0004-Revert-wined3d-Don-t-call-GetPixelFormat-to-set-a-fl.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0005-Revert-wined3d-Restore-the-pixel-format-of-the-windo.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0006-d3d8-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0007-d3d9-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0008-ddraw-Mark-tests-which-no-longer-pass-due-to-reverts.patch
|
||||
(
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Track if a context'\''s private hdc has had its pixel format set, so we don'\''t need to check it.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Track if a context'\''s hdc is private so we never need to restore its pixel format.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: When restoring pixel format in context_release(), mark the context as needing to be set on the next context_acquire().\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Don'\''t call GetPixelFormat() to set a flag that'\''s already set.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Restore the pixel format of the window whose pixel format was actually changed.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "d3d8: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
echo '+ { "Ken Thomases", "d3d9: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
echo '+ { "Ken Thomases", "ddraw: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
@ -5046,6 +5106,18 @@ if test "$enable_wined3d_wined3d_swapchain_present" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-MESA_GPU_Info
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_gl.h, dlls/winex11.drv/opengl.c, include/wine/wgl_driver.h
|
||||
# |
|
||||
if test "$enable_wined3d_MESA_GPU_Info" -eq 1; then
|
||||
patch_apply wined3d-MESA_GPU_Info/0001-wined3d-Use-pci-and-memory-information-from-MESA-if-.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "wined3d: Use pci and memory information from MESA if possible.", 2 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Multisampling
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -5061,54 +5133,6 @@ if test "$enable_wined3d_Multisampling" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Revert_PixelFormat
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35655] Fix wined3d performance drop introduced by pixelformat changes.
|
||||
# | * [#35718] Fix flickering introduced by pixelformat changes.
|
||||
# | * [#35975] Fix gray screen on startup introduced by pixelformat changes.
|
||||
# | * [#36900] Fix missing video introduced by pixelformat changes.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d8/tests/device.c, dlls/d3d9/tests/device.c, dlls/ddraw/tests/ddraw1.c, dlls/ddraw/tests/ddraw2.c,
|
||||
# | dlls/ddraw/tests/ddraw4.c, dlls/ddraw/tests/ddraw7.c, dlls/wined3d/context.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Revert_PixelFormat" -eq 1; then
|
||||
patch_apply wined3d-Revert_PixelFormat/0001-Revert-wined3d-Track-if-a-context-s-private-hdc-has-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0002-Revert-wined3d-Track-if-a-context-s-hdc-is-private-s.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0003-Revert-wined3d-When-restoring-pixel-format-in-contex.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0004-Revert-wined3d-Don-t-call-GetPixelFormat-to-set-a-fl.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0005-Revert-wined3d-Restore-the-pixel-format-of-the-windo.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0006-d3d8-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0007-d3d9-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0008-ddraw-Mark-tests-which-no-longer-pass-due-to-reverts.patch
|
||||
(
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Track if a context'\''s private hdc has had its pixel format set, so we don'\''t need to check it.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Track if a context'\''s hdc is private so we never need to restore its pixel format.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: When restoring pixel format in context_release(), mark the context as needing to be set on the next context_acquire().\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Don'\''t call GetPixelFormat() to set a flag that'\''s already set.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Restore the pixel format of the window whose pixel format was actually changed.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "d3d8: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
echo '+ { "Ken Thomases", "d3d9: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
echo '+ { "Ken Thomases", "ddraw: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Geforce_425M
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35054] Add wined3d detection for GeForce GT 425M
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Geforce_425M" -eq 1; then
|
||||
patch_apply wined3d-Geforce_425M/0001-wined3d-Add-detection-for-NVIDIA-GeForce-425M.patch
|
||||
(
|
||||
echo '+ { "Jarkko Korpi", "wined3d: Add detection for NVIDIA GeForce 425M.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Main
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,467 @@
|
||||
From 01290dd262f7cfc9ee7799fb8f20c5b43ce60e86 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 f7a12f1..770a0d8 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 1329786..6fb4ad0 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]),
|
||||
@@ -1486,6 +1487,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
|
||||
@@ -3319,6 +3340,7 @@ WINE_CONFIG_TEST(dlls/usp10/tests)
|
||||
WINE_CONFIG_LIB(uuid)
|
||||
WINE_CONFIG_DLL(uxtheme,,[implib])
|
||||
WINE_CONFIG_TEST(dlls/uxtheme/tests)
|
||||
+WINE_CONFIG_DLL(uxtheme-gtk)
|
||||
WINE_CONFIG_DLL(vbscript,,[clean])
|
||||
WINE_CONFIG_TEST(dlls/vbscript/tests,[clean])
|
||||
WINE_CONFIG_DLL(vcomp)
|
||||
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.5.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,308 @@
|
||||
From 2cf0168c9587f0b836a252f6cda65975d5d3cac1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 9 Aug 2015 04:31:32 +0200
|
||||
Subject: uxthemegtk: Implement enumeration of themes, color and sizes.
|
||||
|
||||
Various style improvements by Ivan Akulinchev <ivan.akulinchev@gmail.com>.
|
||||
---
|
||||
dlls/uxtheme-gtk/Makefile.in | 2 +-
|
||||
dlls/uxtheme-gtk/uxtheme-gtk.spec | 44 +++++++++
|
||||
dlls/uxtheme-gtk/uxtheme.c | 181 +++++++++++++++++++++++++++++++++++++-
|
||||
3 files changed, 224 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/uxtheme-gtk/Makefile.in b/dlls/uxtheme-gtk/Makefile.in
|
||||
index 8cefd51..d1e79fd 100644
|
||||
--- a/dlls/uxtheme-gtk/Makefile.in
|
||||
+++ b/dlls/uxtheme-gtk/Makefile.in
|
||||
@@ -1,5 +1,5 @@
|
||||
MODULE = uxtheme-gtk.dll
|
||||
-IMPORTS = user32 gdi32 advapi32
|
||||
+IMPORTS = user32 gdi32 advapi32 shell32
|
||||
DELAYIMPORTS = msimg32
|
||||
EXTRAINCL = $(GTK3_CFLAGS)
|
||||
|
||||
diff --git a/dlls/uxtheme-gtk/uxtheme-gtk.spec b/dlls/uxtheme-gtk/uxtheme-gtk.spec
|
||||
index 70cd7ff..4acc0fa 100644
|
||||
--- a/dlls/uxtheme-gtk/uxtheme-gtk.spec
|
||||
+++ b/dlls/uxtheme-gtk/uxtheme-gtk.spec
|
||||
@@ -1,3 +1,47 @@
|
||||
+# Export by Ordinal
|
||||
+1 stdcall -noname QueryThemeServices()
|
||||
+2 stdcall -noname OpenThemeFile(wstr wstr wstr ptr long)
|
||||
+3 stdcall -noname CloseThemeFile(ptr)
|
||||
+4 stdcall -noname ApplyTheme(ptr ptr ptr)
|
||||
+7 stdcall -noname GetThemeDefaults(wstr wstr long wstr long)
|
||||
+8 stdcall -noname EnumThemes(wstr ptr ptr)
|
||||
+9 stdcall -noname EnumThemeColors(wstr wstr long ptr)
|
||||
+10 stdcall -noname EnumThemeSizes(wstr wstr long ptr)
|
||||
+11 stdcall -noname ParseThemeIniFile(wstr wstr ptr ptr)
|
||||
+13 stub -noname DrawNCPreview
|
||||
+14 stub -noname RegisterDefaultTheme
|
||||
+15 stub -noname DumpLoadedThemeToTextFile
|
||||
+16 stub -noname OpenThemeDataFromFile
|
||||
+17 stub -noname OpenThemeFileFromData
|
||||
+18 stub -noname GetThemeSysSize96
|
||||
+19 stub -noname GetThemeSysFont96
|
||||
+20 stub -noname SessionAllocate
|
||||
+21 stub -noname SessionFree
|
||||
+22 stub -noname ThemeHooksOn
|
||||
+23 stub -noname ThemeHooksOff
|
||||
+24 stub -noname AreThemeHooksActive
|
||||
+25 stub -noname GetCurrentChangeNumber
|
||||
+26 stub -noname GetNewChangeNumber
|
||||
+27 stub -noname SetGlobalTheme
|
||||
+28 stub -noname GetGlobalTheme
|
||||
+29 stub -noname CheckThemeSignature(wstr)
|
||||
+30 stub -noname LoadTheme
|
||||
+31 stub -noname InitUserTheme
|
||||
+32 stub -noname InitUserRegistry
|
||||
+33 stub -noname ReestablishServerConnection
|
||||
+34 stub -noname ThemeHooksInstall
|
||||
+35 stub -noname ThemeHooksRemove
|
||||
+36 stub -noname RefreshThemeForTS
|
||||
+43 stub -noname ClassicGetSystemMetrics
|
||||
+44 stub -noname ClassicSystemParametersInfoA
|
||||
+45 stub -noname ClassicSystemParametersInfoW
|
||||
+46 stub -noname ClassicAdjustWindowRectEx
|
||||
+48 stub -noname GetThemeParseErrorInfo
|
||||
+60 stub -noname CreateThemeDataFromObjects
|
||||
+61 stub OpenThemeDataEx
|
||||
+62 stub -noname ServerClearStockObjects
|
||||
+63 stub -noname MarkSelection
|
||||
+
|
||||
# System
|
||||
@ stdcall CloseThemeData(ptr)
|
||||
@ stdcall EnableThemeDialogTexture(ptr long)
|
||||
diff --git a/dlls/uxtheme-gtk/uxtheme.c b/dlls/uxtheme-gtk/uxtheme.c
|
||||
index 22285df..0050036 100644
|
||||
--- a/dlls/uxtheme-gtk/uxtheme.c
|
||||
+++ b/dlls/uxtheme-gtk/uxtheme.c
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "uxtheme.h"
|
||||
#include "vsstyle.h"
|
||||
#include "vssym32.h"
|
||||
+#include "vfwmsgs.h"
|
||||
+#include "shlobj.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -131,7 +133,11 @@ MAKE_FUNCPTR(gtk_window_new);
|
||||
#define MENU_HEIGHT 20
|
||||
#define CLASSLIST_MAXLEN 128
|
||||
|
||||
-static const WCHAR THEME_PROPERTY[] = {'u','x','g','t','k','_','t','h','e','m','e',0};
|
||||
+static const WCHAR THEME_PROPERTY[] = {'u','x','g','t','k','_','t','h','e','m','e',0};
|
||||
+static const WCHAR FAKE_THEME_NAME[] = {'G','T','K','-','3',0};
|
||||
+static const WCHAR FAKE_THEME_COLOR[] = {'D','e','f','a','u','l','t',' ','C','o','l','o','r',0};
|
||||
+static const WCHAR FAKE_THEME_SIZE[] = {'D','e','f','a','u','l','t',' ','S','i','z','e',0};
|
||||
+static WCHAR fake_msstyles_file[MAX_PATH];
|
||||
|
||||
static void free_gtk3_libs(void)
|
||||
{
|
||||
@@ -240,9 +246,12 @@ error:
|
||||
|
||||
static void process_attach(void)
|
||||
{
|
||||
+ static const WCHAR themes_subdir[] = {'\\','T','h','e','m','e','s','\\', 'g','t','k','3',0};
|
||||
+ static const WCHAR style_file[] = {'\\','g','t','k','3','.','m','s','s','t','y','l','e','s',0};
|
||||
int i, colors[NUM_SYS_COLORS];
|
||||
COLORREF refs[NUM_SYS_COLORS];
|
||||
NONCLIENTMETRICSW metrics;
|
||||
+ HANDLE file;
|
||||
|
||||
if (!load_gtk3_libs())
|
||||
return;
|
||||
@@ -267,6 +276,52 @@ static void process_attach(void)
|
||||
SystemParametersInfoW(SPI_SETCLEARTYPE, 0, (LPVOID)TRUE, 0);
|
||||
SystemParametersInfoW(SPI_SETFONTSMOOTHING, 0, (LPVOID)TRUE, 0);
|
||||
SystemParametersInfoW(SPI_SETFLATMENU, 0, (LPVOID)TRUE, 0);
|
||||
+
|
||||
+ /* create fake msstyles file */
|
||||
+ if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_RESOURCES|CSIDL_FLAG_CREATE, NULL,
|
||||
+ SHGFP_TYPE_CURRENT, fake_msstyles_file)))
|
||||
+ {
|
||||
+ lstrcatW(fake_msstyles_file, themes_subdir);
|
||||
+ SHCreateDirectoryExW(NULL, fake_msstyles_file, NULL);
|
||||
+
|
||||
+ lstrcatW(fake_msstyles_file, style_file);
|
||||
+ file = CreateFileW(fake_msstyles_file, GENERIC_WRITE, 0, NULL, CREATE_NEW,
|
||||
+ FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
+ if (file != INVALID_HANDLE_VALUE) CloseHandle(file);
|
||||
+ return;
|
||||
+ }
|
||||
+ fake_msstyles_file[0] = 0;
|
||||
+}
|
||||
+
|
||||
+static BOOL is_fake_theme(const WCHAR *path)
|
||||
+{
|
||||
+ BY_HANDLE_FILE_INFORMATION fake_info, file_info;
|
||||
+ HANDLE fake_handle, file_handle;
|
||||
+ BOOL ret;
|
||||
+
|
||||
+ if (!fake_msstyles_file[0]) return FALSE;
|
||||
+
|
||||
+ fake_handle = CreateFileW(fake_msstyles_file, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE |
|
||||
+ FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
+ if (fake_handle == INVALID_HANDLE_VALUE) return FALSE;
|
||||
+
|
||||
+ file_handle = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE |
|
||||
+ FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
+ if (file_handle == INVALID_HANDLE_VALUE)
|
||||
+ {
|
||||
+ CloseHandle(fake_handle);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ ret = GetFileInformationByHandle(fake_handle, &fake_info) &&
|
||||
+ GetFileInformationByHandle(file_handle, &file_info) &&
|
||||
+ fake_info.dwVolumeSerialNumber == file_info.dwVolumeSerialNumber &&
|
||||
+ fake_info.nFileIndexHigh == file_info.nFileIndexHigh &&
|
||||
+ fake_info.nFileIndexLow == file_info.nFileIndexLow;
|
||||
+
|
||||
+ CloseHandle(file_handle);
|
||||
+ CloseHandle(fake_handle);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
void uxgtk_theme_init(uxgtk_theme_t *theme, const uxgtk_theme_vtable_t *vtable)
|
||||
@@ -377,7 +432,10 @@ HRESULT WINAPI GetCurrentThemeName(LPWSTR filename, int filename_maxlen,
|
||||
TRACE("(%p, %d, %p, %d, %p, %d)\n", filename, filename_maxlen,
|
||||
color, color_maxlen, size, size_maxlen);
|
||||
|
||||
- return E_FAIL; /* To prevent calling EnumThemeColors and so on */
|
||||
+ if (filename) lstrcpynW(filename, fake_msstyles_file, filename_maxlen);
|
||||
+ if (color) lstrcpynW(color, FAKE_THEME_COLOR, color_maxlen);
|
||||
+ if (size) lstrcpynW(size, FAKE_THEME_SIZE, size_maxlen);
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
DWORD WINAPI GetThemeAppProperties(void)
|
||||
@@ -1044,6 +1102,125 @@ BOOL WINAPI IsThemePartDefined(HTHEME htheme, int part_id, int state_id)
|
||||
return theme->vtable->is_part_defined(part_id, state_id);
|
||||
}
|
||||
|
||||
+DWORD WINAPI QueryThemeServices(void)
|
||||
+{
|
||||
+ TRACE("()\n");
|
||||
+ return 3; /* This is what is returned under XP in most cases */
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI OpenThemeFile(LPCWSTR filename, LPCWSTR color, LPCWSTR size,
|
||||
+ HTHEMEFILE *hthemefile, DWORD unknown)
|
||||
+{
|
||||
+ TRACE("(%s, %s, %s, %p, %d)\n", debugstr_w(filename), debugstr_w(color), debugstr_w(size),
|
||||
+ hthemefile, unknown);
|
||||
+
|
||||
+ if (!is_fake_theme(filename))
|
||||
+ return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
|
||||
+
|
||||
+ if (color && lstrcmpW(FAKE_THEME_COLOR, color) != 0)
|
||||
+ return HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
|
||||
+
|
||||
+ if (size && lstrcmpW(FAKE_THEME_SIZE, size) != 0)
|
||||
+ return HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
|
||||
+
|
||||
+ *hthemefile = (HTHEMEFILE)0xdeadbeef;
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI CloseThemeFile(HTHEMEFILE hthemefile)
|
||||
+{
|
||||
+ TRACE("(%p)\n", hthemefile);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI ApplyTheme(HTHEMEFILE hthemefile, char *unknown, HWND hwnd)
|
||||
+{
|
||||
+ TRACE("(%p, %s, %p)\n", hthemefile, unknown, hwnd);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI GetThemeDefaults(LPCWSTR filename, LPWSTR color, DWORD color_maxlen,
|
||||
+ LPWSTR size, DWORD size_maxlen)
|
||||
+{
|
||||
+ TRACE("(%s, %p, %d, %p, %d)\n", debugstr_w(filename), color, color_maxlen, size, size_maxlen);
|
||||
+
|
||||
+ if (!is_fake_theme(filename))
|
||||
+ return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
|
||||
+
|
||||
+ lstrcpynW(color, FAKE_THEME_COLOR, color_maxlen);
|
||||
+ lstrcpynW(size, FAKE_THEME_SIZE, size_maxlen);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI EnumThemes(LPCWSTR themepath, EnumThemeProc callback, LPVOID data)
|
||||
+{
|
||||
+ TRACE("(%s, %p, %p)\n", debugstr_w(themepath), callback, data);
|
||||
+
|
||||
+ /* FIXME: check path */
|
||||
+ callback(NULL, fake_msstyles_file, FAKE_THEME_NAME, FAKE_THEME_NAME, NULL, data);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI EnumThemeColors(LPWSTR filename, LPWSTR size, DWORD color_id, PTHEMENAMES colors)
|
||||
+{
|
||||
+ TRACE("(%s, %s, %d, %p)\n", debugstr_w(filename), debugstr_w(size), color_id, colors);
|
||||
+
|
||||
+ if (!is_fake_theme(filename))
|
||||
+ return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
|
||||
+
|
||||
+ if (size && lstrcmpW(FAKE_THEME_SIZE, size) != 0)
|
||||
+ return E_PROP_ID_UNSUPPORTED;
|
||||
+
|
||||
+ if (color_id != 0)
|
||||
+ return E_PROP_ID_UNSUPPORTED;
|
||||
+
|
||||
+ lstrcpynW(colors->szName, FAKE_THEME_COLOR,
|
||||
+ sizeof(colors->szName) / sizeof(WCHAR));
|
||||
+ lstrcpynW(colors->szDisplayName, FAKE_THEME_COLOR,
|
||||
+ sizeof(colors->szDisplayName) / sizeof(WCHAR));
|
||||
+ lstrcpynW(colors->szTooltip, FAKE_THEME_COLOR,
|
||||
+ sizeof(colors->szTooltip) / sizeof(WCHAR));
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI EnumThemeSizes(LPWSTR filename, LPWSTR color, DWORD size_id, PTHEMENAMES sizes)
|
||||
+{
|
||||
+ TRACE("(%s, %s, %d, %p)\n", debugstr_w(filename), debugstr_w(color), size_id, sizes);
|
||||
+
|
||||
+ if (!is_fake_theme(filename))
|
||||
+ return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
|
||||
+
|
||||
+ if (color && lstrcmpW(FAKE_THEME_COLOR, color) != 0)
|
||||
+ return E_PROP_ID_UNSUPPORTED;
|
||||
+
|
||||
+ if (size_id != 0)
|
||||
+ return E_PROP_ID_UNSUPPORTED;
|
||||
+
|
||||
+ lstrcpynW(sizes->szName, FAKE_THEME_SIZE,
|
||||
+ sizeof(sizes->szName) / sizeof(WCHAR));
|
||||
+ lstrcpynW(sizes->szDisplayName, FAKE_THEME_SIZE,
|
||||
+ sizeof(sizes->szDisplayName) / sizeof(WCHAR));
|
||||
+ lstrcpynW(sizes->szTooltip, FAKE_THEME_SIZE,
|
||||
+ sizeof(sizes->szTooltip) / sizeof(WCHAR));
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI ParseThemeIniFile(LPCWSTR filename, LPWSTR unknown,
|
||||
+ ParseThemeIniFileProc callback, LPVOID data)
|
||||
+{
|
||||
+ TRACE("(%s, %s, %p, %p)\n", debugstr_w(filename), debugstr_w(unknown), callback, data);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI CheckThemeSignature(LPCWSTR filename)
|
||||
+{
|
||||
+ if (!is_fake_theme(filename))
|
||||
+ return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
TRACE("(%p, %d, %p)\n", instance, reason, reserved);
|
||||
--
|
||||
2.5.0
|
||||
|
4
patches/uxtheme-GTK_Theming/definition
Normal file
4
patches/uxtheme-GTK_Theming/definition
Normal file
@ -0,0 +1,4 @@
|
||||
# based on https://github.com/akulinchev/uxthemegtk
|
||||
# sha1: ecbca8e848834180092d9078be0762a60617fcd7
|
||||
|
||||
Fixes: Add support for GTK3 theming
|
Loading…
Reference in New Issue
Block a user