diff --git a/Headers/cairo/Win32CairoGState.h b/Headers/cairo/Win32CairoGState.h
new file mode 100644
index 0000000..45e35cb
--- /dev/null
+++ b/Headers/cairo/Win32CairoGState.h
@@ -0,0 +1,38 @@
+/*
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+ This file is part of GNUstep.
+
+ 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 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; see the file COPYING.LIB.
+ If not, see or write to the
+ Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef Win32CairoGState_h
+#define Win32CairoGState_h
+
+#include "cairo/CairoGState.h"
+
+
+@interface Win32CairoGState : CairoGState
+{
+}
+
+- (HDC) getHDC;
+- (void) releaseHDC: (HDC)hdc;
+
+@end
+
+#endif
diff --git a/Source/cairo/Win32CairoGState.m b/Source/cairo/Win32CairoGState.m
new file mode 100644
index 0000000..bff6b09
--- /dev/null
+++ b/Source/cairo/Win32CairoGState.m
@@ -0,0 +1,60 @@
+/*
+ Win32CairoGState.m
+
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+ August 8, 2012
+
+ This file is part of GNUstep.
+
+ 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 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; see the file COPYING.LIB.
+ If not, see or write to the
+ Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "cairo/Win32CairoGState.h"
+#include "cairo/CairoSurface.h"
+#include
+
+@implementation Win32CairoGState
+
++ (void) initialize
+{
+ if (self == [Win32CairoGState class])
+ {
+ }
+}
+
+- (HDC) getHDC
+{
+ if (_surface)
+ {
+ cairo_surface_flush([_surface surface]);
+ NSDebugLLog(@"CairoGState",
+ @"%s:_surface: %p hdc: %p\n", __PRETTY_FUNCTION__,
+ _surface, cairo_win32_surface_get_dc([_surface surface]));
+ return cairo_win32_surface_get_dc([_surface surface]);
+ }
+ NSLog(@"%s:_surface is NULL\n", __PRETTY_FUNCTION__);
+ return NULL;
+}
+
+- (void) releaseHDC: (HDC)hdc
+{
+ if (hdc && _surface)
+ cairo_surface_mark_dirty([_surface surface]);
+}
+
+@end