diff options
author | nyamatongwe <devnull@localhost> | 2011-12-12 17:47:48 +1100 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-12-12 17:47:48 +1100 |
commit | 0247bd1dca33fca3f34b4da142d2542a8508dd04 (patch) | |
tree | 5366dc12547ce22c88a543c58e62903138123395 /gtk/PlatGTK.cxx | |
parent | 8327355c17218e11ca9389bb38723c747e425984 (diff) | |
download | scintilla-mirror-0247bd1dca33fca3f34b4da142d2542a8508dd04.tar.gz |
On GTK+ 2.x, change SurfaceID from GdkDrawable* to a cairo_t* so that it is
the same as on GTK+ 3.x.
This simplifies compatibility and allows implementing printing on GTK+ 2.x.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rw-r--r-- | gtk/PlatGTK.cxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index e56847483..f1445afc2 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -346,7 +346,7 @@ void Font::Release() { namespace Scintilla { #endif -// On GTK+ 2.x, SurfaceID is a GdkDrawable* and on GTK+ 3.x, it is a cairo_t* +// SurfaceID is a cairo_t* class SurfaceImpl : public Surface { encodingType et; cairo_t *context; @@ -534,11 +534,7 @@ void SurfaceImpl::Init(SurfaceID sid, WindowID wid) { PLATFORM_ASSERT(sid); Release(); PLATFORM_ASSERT(wid); -#if GTK_CHECK_VERSION(3,0,0) context = cairo_reference(reinterpret_cast<cairo_t *>(sid)); -#else - context = gdk_cairo_create(reinterpret_cast<GdkDrawable *>(sid)); -#endif pcontext = gtk_widget_create_pango_context(PWidget(wid)); layout = pango_layout_new(pcontext); cairo_set_line_width(context, 1); |