diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-10-04 13:53:15 -0400 |
---|---|---|
committer | Alexander Kurtakov <akurtako@redhat.com> | 2012-10-04 22:25:27 +0300 |
commit | 3fdc19a025bdb1d1c9714427e7323556f1c5dd33 (patch) | |
tree | 878dc1e3e55e146f7f52e4741b5f9a28216b5e33 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java | |
parent | 9004816c0eded49a87ffaf370b4fefa4dbb6d38b (diff) | |
download | eclipse.platform.swt-3fdc19a025bdb1d1c9714427e7323556f1c5dd33.tar.gz eclipse.platform.swt-3fdc19a025bdb1d1c9714427e7323556f1c5dd33.tar.xz eclipse.platform.swt-3fdc19a025bdb1d1c9714427e7323556f1c5dd33.zip |
Use gtk_render_frame instead of gtk_paint_flat_box for GTK+ 3 and higher.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java index ed56af4328..3a8ea6bf04 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java @@ -13,6 +13,7 @@ package org.eclipse.swt.widgets; import org.eclipse.swt.*; import org.eclipse.swt.internal.*; +import org.eclipse.swt.internal.cairo.Cairo; import org.eclipse.swt.internal.gtk.*; import org.eclipse.swt.events.*; @@ -2031,4 +2032,15 @@ long /*int*/ gdk_window_get_device_position (long /*int*/ window, int[] x, int[] } } +void gtk_render_frame (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_frame (context, cairo, context, y, width, height); + Cairo.cairo_destroy (cairo); + } else { + OS.gtk_paint_flat_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + } +} + } |