Index: msw_style.c
===================================================================
RCS file: /cvs/gnome/gtk+/modules/engines/ms-windows/msw_style.c,v
retrieving revision 1.17
diff -u -B -r1.17 msw_style.c
--- msw_style.c	20 Mar 2005 23:10:14 -0000	1.17
+++ msw_style.c	27 Mar 2005 16:13:16 -0000
@@ -30,7 +30,7 @@
 
 #include "gtk/gtk.h"
 #include "gtk/gtk.h"
-#include "gdk/win32/gdkwin32.h"
+#include "gdk/gdkwin32.h"
 
 
 /* Default values, not normally used
@@ -877,9 +877,15 @@
     }
   else
     {
-      if (!xp_theme_draw(window, shadow == GTK_SHADOW_IN
-			 ? XP_THEME_ELEMENT_PRESSED_CHECKBOX
-			 : XP_THEME_ELEMENT_CHECKBOX,
+        GtkToggleButton  *togglebutton = GTK_TOGGLE_BUTTON(widget);
+        XpThemeElement theme_elt; 
+        if (gtk_toggle_button_get_inconsistent(togglebutton))
+            theme_elt=XP_THEME_ELEMENT_INCONSISTENT_CHECKBOX;
+        else if (gtk_toggle_button_get_active(togglebutton))
+            theme_elt = XP_THEME_ELEMENT_PRESSED_CHECKBOX;
+        else
+            theme_elt = XP_THEME_ELEMENT_CHECKBOX;
+      if (!xp_theme_draw(window, theme_elt,
 			 style, x, y, width, height, state, area))
         {
           draw_part (window, style->black_gc, area, x, y, CHECK_BLACK);
Index: msw_theme_main.c
===================================================================
RCS file: /cvs/gnome/gtk+/modules/engines/ms-windows/msw_theme_main.c,v
retrieving revision 1.8
diff -u -B -r1.8 msw_theme_main.c
--- msw_theme_main.c	20 Mar 2005 23:10:14 -0000	1.8
+++ msw_theme_main.c	27 Mar 2005 16:00:20 -0000
@@ -1,119 +1,237 @@
-/* MS-Windows Engine (aka GTK-Wimp)

- *

- * Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>

- * Includes code adapted from redmond95 by Owen Taylor, and

- * gtk-nativewin by Evan Martin

- *

- * This library is free software; you can redistribute it and/or

- * modify it under the terms of the GNU Library General Public

- * License as published by the Free Software Foundation; either

- * version 2 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

- * Library General Public License for more details.

- *

- * You should have received a copy of the GNU Library General Public

- * License along with this library; if not, write to the

- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,

- * Boston, MA 02111-1307, USA.

- */

-

-#include <windows.h>

-

-#include <gmodule.h>

-

-#include "gtk/gtk.h"

-

-#include "msw_style.h"

-#include "msw_rc_style.h"

-#include "xp_theme.h"

-

-#ifndef WM_THEMECHANGED

-#define WM_THEMECHANGED 0x031A /* winxp only */

-#endif

-

-static GModule * this_module = NULL;

-static void (*msw_rc_reset_styles) (GtkSettings * settings) = NULL;

-

-static GdkFilterReturn

-global_filter_func (void     *xevent,

-		    GdkEvent *event,

-		    gpointer  data)

-{

-  MSG *msg = (MSG *) xevent;

-

-  switch (msg->message)

-    {

-      /* catch theme changes */

-    case WM_THEMECHANGED:

-    case WM_SYSCOLORCHANGE:

-

-      if(msw_rc_reset_styles != NULL) {

-	  	xp_theme_reset ();

-	  	msw_style_init ();

-

-	  	/* force all gtkwidgets to redraw */

-		(*msw_rc_reset_styles) (gtk_settings_get_default());

-	  }

-

-      return GDK_FILTER_REMOVE;

-

-    case WM_SETTINGCHANGE:

-      /* catch cursor blink, etc... changes */

-      msw_style_setup_system_settings ();

-      return GDK_FILTER_REMOVE;

-

-    default:

-      return GDK_FILTER_CONTINUE;

-    }

-}

-

-G_MODULE_EXPORT void

-theme_init (GTypeModule *module)

-{

-  msw_rc_style_register_type (module);

-  msw_style_register_type (module);

-

-  /* this craziness is required because only gtk 2.4.x and later have

-     gtk_rc_reset_styles(). But we want to be able to run acceptly well

-     on any GTK 2.x.x platform. */

-  if(gtk_check_version(2,4,0) == NULL) {

-    this_module = g_module_open(NULL, 0);

-

-    if(this_module)

-      g_module_symbol (this_module, "gtk_rc_reset_styles",

-		       (gpointer *)(&msw_rc_reset_styles));

-  }

-

-  msw_style_init ();

-  gdk_window_add_filter (NULL, global_filter_func, NULL);

-}

-

-G_MODULE_EXPORT void

-theme_exit (void)

-{

-  gdk_window_remove_filter (NULL, global_filter_func, NULL);

-

-  if(this_module) {

-    g_module_close(this_module);

-    this_module = NULL;

-  }

-}

-

-G_MODULE_EXPORT GtkRcStyle *

-theme_create_rc_style (void)

-{

-  return g_object_new (MSW_TYPE_RC_STYLE, NULL);

-}

-

-/* The following function will be called by GTK+ when the module

- * is loaded and checks to see if we are compatible with the

- * version of GTK+ that loads us.

- */

-G_MODULE_EXPORT const gchar*

-g_module_check_init (GModule *module)

-{

-  return gtk_check_version (2,0,0);

-}

+/* MS-Windows Engine (aka GTK-Wimp)
+
+ *
+
+ * Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
+
+ * Includes code adapted from redmond95 by Owen Taylor, and
+
+ * gtk-nativewin by Evan Martin
+
+ *
+
+ * This library is free software; you can redistribute it and/or
+
+ * modify it under the terms of the GNU Library General Public
+
+ * License as published by the Free Software Foundation; either
+
+ * version 2 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
+
+ * Library General Public License for more details.
+
+ *
+
+ * You should have received a copy of the GNU Library General Public
+
+ * License along with this library; if not, write to the
+
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+
+ * Boston, MA 02111-1307, USA.
+
+ */
+
+
+
+#include <windows.h>
+
+#define g_module_open g_module_open_utf8
+#include <gmodule.h>
+
+
+
+#include "gtk/gtk.h"
+
+
+
+#include "msw_style.h"
+
+#include "msw_rc_style.h"
+
+#include "xp_theme.h"
+
+
+
+#ifndef WM_THEMECHANGED
+
+#define WM_THEMECHANGED 0x031A /* winxp only */
+
+#endif
+
+
+
+static GModule * this_module = NULL;
+
+static void (*msw_rc_reset_styles) (GtkSettings * settings) = NULL;
+
+
+
+static GdkFilterReturn
+
+global_filter_func (void     *xevent,
+
+		    GdkEvent *event,
+
+		    gpointer  data)
+
+{
+
+  MSG *msg = (MSG *) xevent;
+
+
+
+  switch (msg->message)
+
+    {
+
+      /* catch theme changes */
+
+    case WM_THEMECHANGED:
+
+    case WM_SYSCOLORCHANGE:
+
+
+
+      if(msw_rc_reset_styles != NULL) {
+
+	  	xp_theme_reset ();
+
+	  	msw_style_init ();
+
+
+
+	  	/* force all gtkwidgets to redraw */
+
+		(*msw_rc_reset_styles) (gtk_settings_get_default());
+
+	  }
+
+
+
+      return GDK_FILTER_REMOVE;
+
+
+
+    case WM_SETTINGCHANGE:
+
+      /* catch cursor blink, etc... changes */
+
+      msw_style_setup_system_settings ();
+
+      return GDK_FILTER_REMOVE;
+
+
+
+    default:
+
+      return GDK_FILTER_CONTINUE;
+
+    }
+
+}
+
+
+
+G_MODULE_EXPORT void
+
+theme_init (GTypeModule *module)
+
+{
+
+  msw_rc_style_register_type (module);
+
+  msw_style_register_type (module);
+
+
+
+  /* this craziness is required because only gtk 2.4.x and later have
+
+     gtk_rc_reset_styles(). But we want to be able to run acceptly well
+
+     on any GTK 2.x.x platform. */
+
+  if(gtk_check_version(2,4,0) == NULL) {
+
+    this_module = g_module_open(NULL, 0);
+
+
+
+    if(this_module)
+
+      g_module_symbol (this_module, "gtk_rc_reset_styles",
+
+		       (gpointer *)(&msw_rc_reset_styles));
+
+  }
+
+
+
+  msw_style_init ();
+
+  gdk_window_add_filter (NULL, global_filter_func, NULL);
+
+}
+
+
+
+G_MODULE_EXPORT void
+
+theme_exit (void)
+
+{
+
+  gdk_window_remove_filter (NULL, global_filter_func, NULL);
+
+
+
+  if(this_module) {
+
+    g_module_close(this_module);
+
+    this_module = NULL;
+
+  }
+
+}
+
+
+
+G_MODULE_EXPORT GtkRcStyle *
+
+theme_create_rc_style (void)
+
+{
+
+  return g_object_new (MSW_TYPE_RC_STYLE, NULL);
+
+}
+
+
+
+/* The following function will be called by GTK+ when the module
+
+ * is loaded and checks to see if we are compatible with the
+
+ * version of GTK+ that loads us.
+
+ */
+
+G_MODULE_EXPORT const gchar*
+
+g_module_check_init (GModule *module)
+
+{
+
+  return gtk_check_version (2,0,0);
+
+}
+
Index: xp_theme.c
===================================================================
RCS file: /cvs/gnome/gtk+/modules/engines/ms-windows/xp_theme.c,v
retrieving revision 1.35
diff -u -B -r1.35 xp_theme.c
--- xp_theme.c	20 Mar 2005 23:10:14 -0000	1.35
+++ xp_theme.c	27 Mar 2005 16:30:21 -0000
@@ -22,13 +22,13 @@
 
 #include "xp_theme.h"
 
-#include <config.h>
+// #include <config.h>
 #include <windows.h>
 #include <math.h>
 #include <string.h>
 #include <stdio.h>
 
-#include "gdk/win32/gdkwin32.h"
+#include "gdk/gdkwin32.h"
 
 #ifdef HAVE_UXTHEME_H
 #include <uxtheme.h>
@@ -47,6 +47,14 @@
 #define TMT_MSGBOXFONT 805
 #endif
 
+/* It seems those were missing from the headers
+ */
+ 
+#define    CBS_MIXEDNORMAL  9
+#define    CBS_MIXEDHOT  10
+#define    CBS_MIXEDPRESSED  11
+#define    CBS_MIXEDDISABLED  12 
+
 static const LPCWSTR class_descriptors[] =
 {
   L"Scrollbar", /* XP_THEME_CLASS_SCROLLBAR */
@@ -71,6 +79,7 @@
 {
   BP_CHECKBOX,
   BP_CHECKBOX,
+  BP_CHECKBOX,
   BP_PUSHBUTTON,
   HP_HEADERITEM,
   CP_DROPDOWNBUTTON,
@@ -254,6 +263,7 @@
       break;
 
     case XP_THEME_ELEMENT_PRESSED_CHECKBOX:
+    case XP_THEME_ELEMENT_INCONSISTENT_CHECKBOX:
     case XP_THEME_ELEMENT_CHECKBOX:
     case XP_THEME_ELEMENT_BUTTON:
     case XP_THEME_ELEMENT_DEFAULT_BUTTON:
@@ -521,6 +531,23 @@
           ret =  CBS_UNCHECKEDNORMAL;
         }
       break;
+      
+      case XP_THEME_ELEMENT_INCONSISTENT_CHECKBOX:
+      switch( state)
+      {
+        case GTK_STATE_SELECTED:
+         ret =  CBS_MIXEDPRESSED;
+         break;
+        case GTK_STATE_PRELIGHT:
+         ret =  CBS_MIXEDHOT;
+         break;
+        case GTK_STATE_INSENSITIVE:
+         ret =  CBS_MIXEDDISABLED;
+         break;
+        default:
+         ret =  CBS_MIXEDNORMAL;
+        }
+        break;
 
     case XP_THEME_ELEMENT_PRESSED_CHECKBOX:
     case XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON:
Index: xp_theme.h
===================================================================
RCS file: /cvs/gnome/gtk+/modules/engines/ms-windows/xp_theme.h,v
retrieving revision 1.15
diff -u -B -r1.15 xp_theme.h
--- xp_theme.h	30 Aug 2004 20:58:57 -0000	1.15
+++ xp_theme.h	27 Mar 2005 16:15:01 -0000
@@ -1,115 +1,232 @@
-/* MS-Windows Engine (aka GTK-Wimp)

- *

- * Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>

- *

- * This library is free software; you can redistribute it and/or

- * modify it under the terms of the GNU Library General Public

- * License as published by the Free Software Foundation; either

- * version 2 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

- * Library General Public License for more details.

- *

- * You should have received a copy of the GNU Library General Public

- * License along with this library; if not, write to the

- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,

- * Boston, MA 02111-1307, USA.

- */

-

-#ifndef XP_THEME_H

-#define XP_THEME_H

-

-#include <windows.h>

-

-#include "gtk/gtk.h"

-

-typedef enum

-{

-  XP_THEME_CLASS_SCROLLBAR = 0,

-  XP_THEME_CLASS_BUTTON,

-  XP_THEME_CLASS_HEADER,

-  XP_THEME_CLASS_COMBOBOX,

-  XP_THEME_CLASS_TAB,

-  XP_THEME_CLASS_EDIT,

-  XP_THEME_CLASS_TREEVIEW,

-  XP_THEME_CLASS_SPIN,

-  XP_THEME_CLASS_PROGRESS,

-  XP_THEME_CLASS_TOOLTIP,

-  XP_THEME_CLASS_REBAR,

-  XP_THEME_CLASS_TOOLBAR,

-  XP_THEME_CLASS_GLOBALS,

-  XP_THEME_CLASS_MENU,

-  XP_THEME_CLASS_WINDOW,

-  XP_THEME_CLASS_STATUS,

-  XP_THEME_CLASS__SIZEOF

-} XpThemeClass;

-

-typedef enum

-{

-  XP_THEME_ELEMENT_PRESSED_CHECKBOX = 0,

-  XP_THEME_ELEMENT_CHECKBOX,

-  XP_THEME_ELEMENT_BUTTON,

-  XP_THEME_ELEMENT_LIST_HEADER,

-  XP_THEME_ELEMENT_COMBOBUTTON,

-  XP_THEME_ELEMENT_BODY,

-  XP_THEME_ELEMENT_TAB_ITEM,

-  XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE,

-  XP_THEME_ELEMENT_TAB_PANE,

-  XP_THEME_ELEMENT_SCROLLBAR_H,

-  XP_THEME_ELEMENT_SCROLLBAR_V,

-  XP_THEME_ELEMENT_ARROW_UP,

-  XP_THEME_ELEMENT_ARROW_DOWN,

-  XP_THEME_ELEMENT_ARROW_LEFT,

-  XP_THEME_ELEMENT_ARROW_RIGHT,

-  XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_H,

-  XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_V,

-  XP_THEME_ELEMENT_TROUGH_H,

-  XP_THEME_ELEMENT_TROUGH_V,

-  XP_THEME_ELEMENT_EDIT_TEXT,

-  XP_THEME_ELEMENT_DEFAULT_BUTTON,

-  XP_THEME_ELEMENT_SPIN_BUTTON_UP,

-  XP_THEME_ELEMENT_SPIN_BUTTON_DOWN,

-  XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON,

-  XP_THEME_ELEMENT_RADIO_BUTTON,

-  XP_THEME_ELEMENT_TREEVIEW_EXPANDER_OPENED,

-  XP_THEME_ELEMENT_TREEVIEW_EXPANDER_CLOSED,

-  XP_THEME_ELEMENT_PROGRESS_BAR_H,

-  XP_THEME_ELEMENT_PROGRESS_BAR_V,

-  XP_THEME_ELEMENT_PROGRESS_TROUGH_H,

-  XP_THEME_ELEMENT_PROGRESS_TROUGH_V,

-  XP_THEME_ELEMENT_TOOLTIP,

-  XP_THEME_ELEMENT_REBAR,

-  XP_THEME_ELEMENT_REBAR_GRIPPER_H,

-  XP_THEME_ELEMENT_REBAR_GRIPPER_V,

-  XP_THEME_ELEMENT_REBAR_CHEVRON,

-  XP_THEME_ELEMENT_TOOLBAR_BUTTON,

-  XP_THEME_ELEMENT_MENU_ITEM,

-  XP_THEME_ELEMENT_MENU_SEPARATOR,

-  XP_THEME_ELEMENT_STATUS_GRIPPER,

-  XP_THEME_ELEMENT_STATUS_PANE,

-  XP_THEME_ELEMENT__SIZEOF

-} XpThemeElement;

-

-typedef enum

-{

-  XP_THEME_FONT_CAPTION,

-  XP_THEME_FONT_MENU,

-  XP_THEME_FONT_STATUS,

-  XP_THEME_FONT_MESSAGE

-} XpThemeFont;

-

-void xp_theme_init (void);

-void xp_theme_reset (void);

-void xp_theme_exit (void);

-gboolean xp_theme_draw (GdkWindow *win, XpThemeElement element,

-                        GtkStyle *style, int x, int y, int width,

-                        int height, GtkStateType state_type,

-                        GdkRectangle *area);

-gboolean xp_theme_is_drawable (XpThemeElement element);

-gboolean xp_theme_get_system_font (XpThemeClass klazz, XpThemeFont fontId, LOGFONT *lf);

-gboolean xp_theme_get_system_color (XpThemeClass klazz, int colorId, DWORD * pColor);

-gboolean xp_theme_get_system_metric (XpThemeClass klazz, int metricId, int * pVal);

-

-#endif /* XP_THEME_H */

+/* MS-Windows Engine (aka GTK-Wimp)
+
+ *
+
+ * Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
+
+ *
+
+ * This library is free software; you can redistribute it and/or
+
+ * modify it under the terms of the GNU Library General Public
+
+ * License as published by the Free Software Foundation; either
+
+ * version 2 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
+
+ * Library General Public License for more details.
+
+ *
+
+ * You should have received a copy of the GNU Library General Public
+
+ * License along with this library; if not, write to the
+
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+
+ * Boston, MA 02111-1307, USA.
+
+ */
+
+
+
+#ifndef XP_THEME_H
+
+#define XP_THEME_H
+
+
+
+#include <windows.h>
+
+
+
+#include "gtk/gtk.h"
+
+
+
+typedef enum
+
+{
+
+  XP_THEME_CLASS_SCROLLBAR = 0,
+
+  XP_THEME_CLASS_BUTTON,
+
+  XP_THEME_CLASS_HEADER,
+
+  XP_THEME_CLASS_COMBOBOX,
+
+  XP_THEME_CLASS_TAB,
+
+  XP_THEME_CLASS_EDIT,
+
+  XP_THEME_CLASS_TREEVIEW,
+
+  XP_THEME_CLASS_SPIN,
+
+  XP_THEME_CLASS_PROGRESS,
+
+  XP_THEME_CLASS_TOOLTIP,
+
+  XP_THEME_CLASS_REBAR,
+
+  XP_THEME_CLASS_TOOLBAR,
+
+  XP_THEME_CLASS_GLOBALS,
+
+  XP_THEME_CLASS_MENU,
+
+  XP_THEME_CLASS_WINDOW,
+
+  XP_THEME_CLASS_STATUS,
+
+  XP_THEME_CLASS__SIZEOF
+
+} XpThemeClass;
+
+
+
+typedef enum
+
+{
+
+  XP_THEME_ELEMENT_PRESSED_CHECKBOX = 0,
+
+  XP_THEME_ELEMENT_CHECKBOX,
+  
+  XP_THEME_ELEMENT_INCONSISTENT_CHECKBOX ,  
+
+  XP_THEME_ELEMENT_BUTTON,
+
+  XP_THEME_ELEMENT_LIST_HEADER,
+
+  XP_THEME_ELEMENT_COMBOBUTTON,
+
+  XP_THEME_ELEMENT_BODY,
+
+  XP_THEME_ELEMENT_TAB_ITEM,
+
+  XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE,
+
+  XP_THEME_ELEMENT_TAB_PANE,
+
+  XP_THEME_ELEMENT_SCROLLBAR_H,
+
+  XP_THEME_ELEMENT_SCROLLBAR_V,
+
+  XP_THEME_ELEMENT_ARROW_UP,
+
+  XP_THEME_ELEMENT_ARROW_DOWN,
+
+  XP_THEME_ELEMENT_ARROW_LEFT,
+
+  XP_THEME_ELEMENT_ARROW_RIGHT,
+
+  XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_H,
+
+  XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_V,
+
+  XP_THEME_ELEMENT_TROUGH_H,
+
+  XP_THEME_ELEMENT_TROUGH_V,
+
+  XP_THEME_ELEMENT_EDIT_TEXT,
+
+  XP_THEME_ELEMENT_DEFAULT_BUTTON,
+
+  XP_THEME_ELEMENT_SPIN_BUTTON_UP,
+
+  XP_THEME_ELEMENT_SPIN_BUTTON_DOWN,
+
+  XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON,
+
+  XP_THEME_ELEMENT_RADIO_BUTTON,
+
+  XP_THEME_ELEMENT_TREEVIEW_EXPANDER_OPENED,
+
+  XP_THEME_ELEMENT_TREEVIEW_EXPANDER_CLOSED,
+
+  XP_THEME_ELEMENT_PROGRESS_BAR_H,
+
+  XP_THEME_ELEMENT_PROGRESS_BAR_V,
+
+  XP_THEME_ELEMENT_PROGRESS_TROUGH_H,
+
+  XP_THEME_ELEMENT_PROGRESS_TROUGH_V,
+
+  XP_THEME_ELEMENT_TOOLTIP,
+
+  XP_THEME_ELEMENT_REBAR,
+
+  XP_THEME_ELEMENT_REBAR_GRIPPER_H,
+
+  XP_THEME_ELEMENT_REBAR_GRIPPER_V,
+
+  XP_THEME_ELEMENT_REBAR_CHEVRON,
+
+  XP_THEME_ELEMENT_TOOLBAR_BUTTON,
+
+  XP_THEME_ELEMENT_MENU_ITEM,
+
+  XP_THEME_ELEMENT_MENU_SEPARATOR,
+
+  XP_THEME_ELEMENT_STATUS_GRIPPER,
+
+  XP_THEME_ELEMENT_STATUS_PANE,
+
+  XP_THEME_ELEMENT__SIZEOF
+
+} XpThemeElement;
+
+
+
+typedef enum
+
+{
+
+  XP_THEME_FONT_CAPTION,
+
+  XP_THEME_FONT_MENU,
+
+  XP_THEME_FONT_STATUS,
+
+  XP_THEME_FONT_MESSAGE
+
+} XpThemeFont;
+
+
+
+void xp_theme_init (void);
+
+void xp_theme_reset (void);
+
+void xp_theme_exit (void);
+
+gboolean xp_theme_draw (GdkWindow *win, XpThemeElement element,
+
+                        GtkStyle *style, int x, int y, int width,
+
+                        int height, GtkStateType state_type,
+
+                        GdkRectangle *area);
+
+gboolean xp_theme_is_drawable (XpThemeElement element);
+
+gboolean xp_theme_get_system_font (XpThemeClass klazz, XpThemeFont fontId, LOGFONT *lf);
+
+gboolean xp_theme_get_system_color (XpThemeClass klazz, int colorId, DWORD * pColor);
+
+gboolean xp_theme_get_system_metric (XpThemeClass klazz, int metricId, int * pVal);
+
+
+
+#endif /* XP_THEME_H */
+