[gtk+] Make the MS Windows engine compile again. Nevertheless, it is not working and needs a lot of fixing
- From: Fridrich Strba <strba src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Make the MS Windows engine compile again. Nevertheless, it is not working and needs a lot of fixing
- Date: Thu, 2 Sep 2010 13:05:21 +0000 (UTC)
commit 97cd2500c34fd2419923ec06dc315dd9fd3340d1
Author: Fridrich Å trba <fridrich strba bluewin ch>
Date: Thu Sep 2 15:02:48 2010 +0200
Make the MS Windows engine compile again.
Nevertheless, it is not working and needs a lot of fixing before
it can be useful.
modules/engines/ms-windows/xp_theme.c | 33 +++++++++++++++++++++++++++++++++
modules/engines/ms-windows/xp_theme.h | 5 +++++
2 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/modules/engines/ms-windows/xp_theme.c b/modules/engines/ms-windows/xp_theme.c
index 5f083d9..a1ed6b0 100755
--- a/modules/engines/ms-windows/xp_theme.c
+++ b/modules/engines/ms-windows/xp_theme.c
@@ -37,6 +37,9 @@
#include "gdk/win32/gdkwin32.h"
#endif
+#include <cairo-win32.h>
+#include <gdk/gdk.h>
+
#include "xp_theme_defs.h"
#ifndef TMT_CAPTIONFONT
@@ -897,6 +900,7 @@ get_window_dc (GtkStyle *style,
gint x, gint y, gint width, gint height,
RECT *rect_out)
{
+#if 0
GdkDrawable *drawable = NULL;
GdkGC *gc = style->dark_gc[state_type];
gint x_offset, y_offset;
@@ -920,14 +924,43 @@ get_window_dc (GtkStyle *style,
dc_info_out->y_offset = y_offset;
return gdk_win32_hdc_get (drawable, gc, 0);
+#else
+ cairo_t *cr;
+ cairo_surface_t *crs;
+ gint x_offset, y_offset;
+ GdkWindowObject *private = (GdkWindowObject *)GDK_DRAWABLE(window);
+
+ cr = gdk_cairo_create (window);
+ crs = cairo_get_target (cr);
+ x_offset = -private->abs_x;
+ y_offset = -private->abs_y;
+
+
+ dc_info_out->data = NULL;
+
+ rect_out->left = x - x_offset;
+ rect_out->top = y - y_offset;
+ rect_out->right = rect_out->left + width;
+ rect_out->bottom = rect_out->top + height;
+
+ dc_info_out->cr = cr;
+ dc_info_out->x_offset = x_offset;
+ dc_info_out->y_offset = y_offset;
+
+ return cairo_win32_surface_get_dc (crs);
+#endif
}
void
release_window_dc (XpDCInfo *dc_info)
{
+#if 0
gdk_win32_hdc_release (dc_info->drawable, dc_info->gc, 0);
gdk_win32_end_direct_draw_libgtk_only (dc_info->data);
+#else
+ cairo_destroy (dc_info->cr);
+#endif
}
gboolean
diff --git a/modules/engines/ms-windows/xp_theme.h b/modules/engines/ms-windows/xp_theme.h
index dfacb43..4e2a1f1 100755
--- a/modules/engines/ms-windows/xp_theme.h
+++ b/modules/engines/ms-windows/xp_theme.h
@@ -115,8 +115,13 @@ typedef enum
typedef struct
{
+#if 0
GdkDrawable *drawable;
GdkGC *gc;
+#else
+ cairo_t *cr;
+ cairo_surface_t *crs;
+#endif
gint x_offset;
gint y_offset;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]