summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Theme
diff options
context:
space:
mode:
authorAnatoly Spektor <aspektor@redhat.com>2012-10-05 11:09:21 -0400
committerAlexander Kurtakov <akurtako@redhat.com>2012-10-05 18:17:22 +0300
commit95845bd4b129586375f1e778d3783f76522ec9ba (patch)
tree2e42e185415daa7697983dcc1bd9dad57b06bff6 /bundles/org.eclipse.swt/Eclipse SWT Theme
parent8c2a37834918d0f572b88b33a70b539336c6eb81 (diff)
downloadeclipse.platform.swt-95845bd4b129586375f1e778d3783f76522ec9ba.tar.gz
eclipse.platform.swt-95845bd4b129586375f1e778d3783f76522ec9ba.tar.xz
eclipse.platform.swt-95845bd4b129586375f1e778d3783f76522ec9ba.zip
Use gtk_render_option instead of gtk_paint_option for GTK+3 and higher
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Theme')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/ButtonDrawData.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/ButtonDrawData.java b/bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/ButtonDrawData.java
index aa6cc69cee..a414103e31 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/ButtonDrawData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/ButtonDrawData.java
@@ -13,6 +13,7 @@ package org.eclipse.swt.internal.theme;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
import org.eclipse.swt.internal.gtk.*;
public class ButtonDrawData extends DrawData {
@@ -219,4 +220,15 @@ int hit(Theme theme, Point position, Rectangle bounds) {
return bounds.contains(position) ? DrawData.WIDGET_WHOLE : DrawData.WIDGET_NOWHERE;
}
+void gtk_render_option (long /*int*/ style, long /*int*/ window, int state_type, int shadow_type, GdkRectangle area, long /*int*/ widget, byte[] detail, int x , int y, int width, int height) {
+ if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) {
+ long /*int*/ cairo = OS.gdk_cairo_create (window);
+ long /*int*/ context = OS.gtk_widget_get_style_context (style);
+ OS.gtk_render_option (context, cairo, x, y, width, height);
+ Cairo.cairo_destroy (cairo);
+ } else {
+ OS.gtk_paint_option (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+ }
+}
+
}