summaryrefslogtreecommitdiff
path: root/gdk/win32/gdkgc-win32.c
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2004-11-21 21:01:28 +0000
committerHans Breuer <hans@src.gnome.org>2004-11-21 21:01:28 +0000
commit6a3a2cd3447c539233053e1693ce4105a6487cf3 (patch)
tree18791109359c51a241fa585a1c28779acfd801a1 /gdk/win32/gdkgc-win32.c
parent506b6c642e4bd14bfdec4aa493c1ca3edab62230 (diff)
downloadgtk+-6a3a2cd3447c539233053e1693ce4105a6487cf3.tar.gz
updated
2004-11-21 Hans Breuer <hans@breuer.org> * gdk/makefile.msc.in gtk/stock-icons/makefile.msc gtk/makefile.msc.in demos/gtk-demo/makefile.msc.in : updated * gdk/win32/gdkdrawable-win32.c : implement gdk_win32_draw_glyphs_transformed() * gdk/win32/gdkgc-win32.c : implement _gdk_windowing_gc_get_foreground() * demos/gtk-demo/rotated_text.c : use G_PI
Diffstat (limited to 'gdk/win32/gdkgc-win32.c')
-rw-r--r--gdk/win32/gdkgc-win32.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/gdk/win32/gdkgc-win32.c b/gdk/win32/gdkgc-win32.c
index ed652ea1c0..49beed4569 100644
--- a/gdk/win32/gdkgc-win32.c
+++ b/gdk/win32/gdkgc-win32.c
@@ -1,6 +1,7 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * Copyright (C) 1998-2002 Tor Lillqvist
+ * Copyright (C) 1998-2004 Tor Lillqvist
+ * Copyright (C) 2000-2004 Hans Breuer
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1259,3 +1260,23 @@ _gdk_win32_gdkregion_to_hrgn (GdkRegion *region,
return (hrgn);
}
+
+void
+_gdk_windowing_gc_get_foreground (GdkGC *gc,
+ GdkColor *color)
+{
+ GdkGCWin32 *win32_gc;
+ GdkColormap *cmap;
+
+ g_return_if_fail (GDK_IS_GC_WIN32 (gc));
+
+ win32_gc = GDK_GC_WIN32 (gc);
+
+ color->pixel = win32_gc->foreground;
+ cmap = gdk_gc_get_colormap (gc);
+
+ if (cmap)
+ gdk_colormap_query_color (cmap, win32_gc->foreground, color);
+ else
+ g_warning ("No colormap in _gdk_windowing_gc_get_foreground");
+}