From 6670a2999420323cb4c63d7aaa47638a5abd98fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 22 Aug 2015 05:08:42 +0200
Subject: uxthemegtk: Print class name before calling vtable functions.

---
 dlls/uxtheme-gtk/button.c     | 1 +
 dlls/uxtheme-gtk/combobox.c   | 1 +
 dlls/uxtheme-gtk/edit.c       | 1 +
 dlls/uxtheme-gtk/header.c     | 4 +++-
 dlls/uxtheme-gtk/listbox.c    | 1 +
 dlls/uxtheme-gtk/menu.c       | 1 +
 dlls/uxtheme-gtk/rebar.c      | 1 +
 dlls/uxtheme-gtk/status.c     | 1 +
 dlls/uxtheme-gtk/tab.c        | 1 +
 dlls/uxtheme-gtk/toolbar.c    | 1 +
 dlls/uxtheme-gtk/trackbar.c   | 1 +
 dlls/uxtheme-gtk/uxtheme.c    | 4 ++++
 dlls/uxtheme-gtk/uxthemegtk.h | 1 +
 dlls/uxtheme-gtk/window.c     | 1 +
 14 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/dlls/uxtheme-gtk/button.c b/dlls/uxtheme-gtk/button.c
index b867448..3d8e6eb 100644
--- a/dlls/uxtheme-gtk/button.c
+++ b/dlls/uxtheme-gtk/button.c
@@ -483,6 +483,7 @@ static BOOL is_part_defined(int part_id, int state_id)
 
 static const uxgtk_theme_vtable_t button_vtable =
 {
+    "button",
     get_color,
     draw_background,
     get_part_size,
diff --git a/dlls/uxtheme-gtk/combobox.c b/dlls/uxtheme-gtk/combobox.c
index 38abb82..66299a9 100644
--- a/dlls/uxtheme-gtk/combobox.c
+++ b/dlls/uxtheme-gtk/combobox.c
@@ -191,6 +191,7 @@ static BOOL is_part_defined(int part_id, int state_id)
 
 static const uxgtk_theme_vtable_t combobox_vtable =
 {
+    "combobox",
     NULL, /* get_color */
     draw_background,
     NULL, /* get_part_size */
diff --git a/dlls/uxtheme-gtk/edit.c b/dlls/uxtheme-gtk/edit.c
index eb5f108..60b7b3f 100644
--- a/dlls/uxtheme-gtk/edit.c
+++ b/dlls/uxtheme-gtk/edit.c
@@ -180,6 +180,7 @@ static BOOL is_part_defined(int part_id, int state_id)
 
 static const uxgtk_theme_vtable_t edit_vtable =
 {
+    "edit",
     get_color,
     draw_background,
     NULL, /* get_part_size */
diff --git a/dlls/uxtheme-gtk/header.c b/dlls/uxtheme-gtk/header.c
index 11c0245..353c7ac 100644
--- a/dlls/uxtheme-gtk/header.c
+++ b/dlls/uxtheme-gtk/header.c
@@ -92,7 +92,9 @@ static BOOL is_part_defined(int part_id, int state_id)
     return (part_id == HP_HEADERITEM);
 }
 
-static const uxgtk_theme_vtable_t header_vtable = {
+static const uxgtk_theme_vtable_t header_vtable =
+{
+    "header",
     NULL, /* get_color */
     draw_background,
     NULL, /* get_part_size */
diff --git a/dlls/uxtheme-gtk/listbox.c b/dlls/uxtheme-gtk/listbox.c
index 53e1391..7450378 100644
--- a/dlls/uxtheme-gtk/listbox.c
+++ b/dlls/uxtheme-gtk/listbox.c
@@ -88,6 +88,7 @@ static BOOL is_part_defined(int part_id, int state_id)
 
 static const uxgtk_theme_vtable_t listbox_vtable =
 {
+    "listbox",
     NULL, /* get_color */
     draw_background,
     NULL, /* get_part_size */
diff --git a/dlls/uxtheme-gtk/menu.c b/dlls/uxtheme-gtk/menu.c
index b24a085..d6cdeca 100644
--- a/dlls/uxtheme-gtk/menu.c
+++ b/dlls/uxtheme-gtk/menu.c
@@ -154,6 +154,7 @@ static HRESULT get_color(uxgtk_theme_t *theme, int part_id, int state_id,
 
 static const uxgtk_theme_vtable_t menu_vtable =
 {
+    "menu",
     get_color,
     NULL, /* draw_background */
     NULL, /* get_part_size */
diff --git a/dlls/uxtheme-gtk/rebar.c b/dlls/uxtheme-gtk/rebar.c
index 03650ae..714a9e7 100644
--- a/dlls/uxtheme-gtk/rebar.c
+++ b/dlls/uxtheme-gtk/rebar.c
@@ -71,6 +71,7 @@ static BOOL is_part_defined(int part_id, int state_id)
 
 static const uxgtk_theme_vtable_t rebar_vtable =
 {
+    "rebar",
     NULL, /* get_color */
     draw_background,
     NULL, /* get_part_size */
diff --git a/dlls/uxtheme-gtk/status.c b/dlls/uxtheme-gtk/status.c
index e2a937a..8398360 100644
--- a/dlls/uxtheme-gtk/status.c
+++ b/dlls/uxtheme-gtk/status.c
@@ -122,6 +122,7 @@ static BOOL is_part_defined(int part_id, int state_id)
 
 static const uxgtk_theme_vtable_t status_vtable =
 {
+    "status",
     NULL, /* get_color */
     draw_background,
     get_part_size,
diff --git a/dlls/uxtheme-gtk/tab.c b/dlls/uxtheme-gtk/tab.c
index 31bdc0e..6ad40bb 100644
--- a/dlls/uxtheme-gtk/tab.c
+++ b/dlls/uxtheme-gtk/tab.c
@@ -166,6 +166,7 @@ static BOOL is_part_defined(int part_id, int state_id)
 
 static const uxgtk_theme_vtable_t tab_vtable =
 {
+    "tab",
     NULL, /* get_color */
     draw_background,
     NULL, /* get_part_size */
diff --git a/dlls/uxtheme-gtk/toolbar.c b/dlls/uxtheme-gtk/toolbar.c
index be8fbae..6158353 100644
--- a/dlls/uxtheme-gtk/toolbar.c
+++ b/dlls/uxtheme-gtk/toolbar.c
@@ -138,6 +138,7 @@ static BOOL is_part_defined(int part_id, int state_id)
 
 static const uxgtk_theme_vtable_t toolbar_vtable =
 {
+    "toolbar",
     NULL, /* get_color */
     draw_background,
     NULL, /* get_part_size */
diff --git a/dlls/uxtheme-gtk/trackbar.c b/dlls/uxtheme-gtk/trackbar.c
index 58df246..f576fbe 100644
--- a/dlls/uxtheme-gtk/trackbar.c
+++ b/dlls/uxtheme-gtk/trackbar.c
@@ -149,6 +149,7 @@ static BOOL is_part_defined(int part_id, int state_id)
 
 static const uxgtk_theme_vtable_t trackbar_vtable =
 {
+    "trackbar",
     NULL, /* get_color */
     draw_background,
     NULL, /* get_part_size */
diff --git a/dlls/uxtheme-gtk/uxtheme.c b/dlls/uxtheme-gtk/uxtheme.c
index 0050036..37af3bc 100644
--- a/dlls/uxtheme-gtk/uxtheme.c
+++ b/dlls/uxtheme-gtk/uxtheme.c
@@ -576,6 +576,7 @@ HRESULT WINAPI GetThemeColor(HTHEME htheme, int part_id, int state_id,
     if (color == NULL)
         return E_INVALIDARG;
 
+    TRACE("%s->get_color()\n", theme->vtable->classname);
     hr = theme->vtable->get_color(theme, part_id, state_id, prop_id, &rgba);
 
     if (SUCCEEDED(hr) && rgba.alpha > 0)
@@ -879,6 +880,7 @@ HRESULT WINAPI DrawThemeBackgroundEx(HTHEME htheme, HDC hdc, int part_id, int st
     surface = pcairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
     cr = pcairo_create(surface);
 
+    TRACE("%s->draw_background()\n", theme->vtable->classname);
     hr = theme->vtable->draw_background(theme, cr, part_id, state_id, width, height);
     if (SUCCEEDED(hr))
         paint_cairo_surface(surface, hdc, rect->left, rect->top, width, height);
@@ -1034,6 +1036,7 @@ HRESULT WINAPI GetThemePartSize(HTHEME htheme, HDC hdc, int part_id, int state_i
     if (rect == NULL || size == NULL)
         return E_INVALIDARG;
 
+    TRACE("%s->get_part_size()\n", theme->vtable->classname);
     return theme->vtable->get_part_size(theme, part_id, state_id, rect, size);
 }
 
@@ -1099,6 +1102,7 @@ BOOL WINAPI IsThemePartDefined(HTHEME htheme, int part_id, int state_id)
         return FALSE;
     }
 
+    TRACE("%s->is_part_defined()\n", theme->vtable->classname);
     return theme->vtable->is_part_defined(part_id, state_id);
 }
 
diff --git a/dlls/uxtheme-gtk/uxthemegtk.h b/dlls/uxtheme-gtk/uxthemegtk.h
index 17307f1..79037fb 100644
--- a/dlls/uxtheme-gtk/uxthemegtk.h
+++ b/dlls/uxtheme-gtk/uxthemegtk.h
@@ -32,6 +32,7 @@ typedef struct _uxgtk_theme_vtable uxgtk_theme_vtable_t;
 
 struct _uxgtk_theme_vtable
 {
+    const char *classname;
     HRESULT (*get_color)(uxgtk_theme_t *theme, int part_id, int state_id,
                          int prop_id, GdkRGBA *rgba);
     HRESULT (*draw_background)(uxgtk_theme_t *theme, cairo_t *cr, int part_id, int state_id,
diff --git a/dlls/uxtheme-gtk/window.c b/dlls/uxtheme-gtk/window.c
index cf617ef..8b1478c 100644
--- a/dlls/uxtheme-gtk/window.c
+++ b/dlls/uxtheme-gtk/window.c
@@ -141,6 +141,7 @@ static BOOL is_part_defined(int part_id, int state_id)
 
 static const uxgtk_theme_vtable_t window_vtable =
 {
+    "window",
     get_color,
     draw_background,
     NULL, /* get_part_size */
-- 
2.5.0

