Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/ButtonDrawData.java13
6 files changed, 60 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index ed75fb0d07..c8f8cfadcd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -11390,7 +11390,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1check)
OS_NATIVE_ENTER(env, that, _1gtk_1paint_1check_FUNC);
if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
- gtk_paint_check((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+/*
+ gtk_paint_check(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_paint_check)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+ }
+ }
fail:
if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
@@ -12868,6 +12876,24 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1background)
}
#endif
+#ifndef NO__1gtk_1render_1check
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1check)
+ (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+ OS_NATIVE_ENTER(env, that, _1gtk_1render_1check_FUNC);
+/*
+ gtk_render_check(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_render_check)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gtk_1render_1check_FUNC);
+}
+#endif
+
#ifndef NO__1gtk_1render_1focus
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1focus)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
index fc3c7a879a..b30532cb8b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
@@ -314,6 +314,7 @@
#define gtk_paint_hline_LIB LIB_GTK
#define gtk_paint_vline_LIB LIB_GTK
#define gtk_paint_flat_box_LIB LIB_GTK
+#define gtk_paint_check_LIB LIB_GTK
#define gtk_paint_option_LIB LIB_GTK LIB_GTK
#define gtk_paint_layout_LIB LIB_GTK
#define gtk_page_setup_get_bottom_margin_LIB LIB_GTK
@@ -385,6 +386,7 @@
#define gtk_printer_get_backend_LIB LIB_GTK
#define gtk_printer_get_name_LIB LIB_GTK
#define gtk_printer_is_default_LIB LIB_GTK
+#define gtk_render_check_LIB LIB_GTK
#define gtk_render_handle_LIB LIB_GTK
#define gtk_render_line_LIB LIB_GTK
#define gtk_render_focus_LIB LIB_GTK
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
index 8fb7a15c69..ab94e5b0e7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
@@ -953,6 +953,7 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1rc_1style_1set_1fg",
"_1gtk_1rc_1style_1set_1text",
"_1gtk_1render_1background",
+ "_1gtk_1render_1check",
"_1gtk_1render_1focus",
"_1gtk_1render_1frame",
"_1gtk_1render_1frame_1gap",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index 78c729d663..b6a58dfadd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
@@ -963,6 +963,7 @@ typedef enum {
_1gtk_1rc_1style_1set_1fg_FUNC,
_1gtk_1rc_1style_1set_1text_FUNC,
_1gtk_1render_1background_FUNC,
+ _1gtk_1render_1check_FUNC,
_1gtk_1render_1focus_FUNC,
_1gtk_1render_1frame_FUNC,
_1gtk_1render_1frame_1gap_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index adb834e19d..04a5369320 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -8741,7 +8741,7 @@ public static final void gtk_paint_box_gap(long /*int*/ style, long /*int*/ wind
}
}
/**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
* @param window cast=(GdkWindow *)
* @param widget cast=(GtkWidget *)
* @param detail cast=(const gchar *)
@@ -8756,6 +8756,22 @@ public static final void gtk_paint_check(long /*int*/ style, long /*int*/ window
}
}
/**
+ * @method flags=dynamic
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ */
+public static final native void _gtk_render_check(long /*int*/ context, long /*int*/ cairo, double x , double y, double width, double height);
+public static final void gtk_render_check(long /*int*/ context, long /*int*/ cairo, double x , double y, double width, double height) {
+ lock.lock();
+ try {
+ _gtk_render_check(context,cairo,x,y,width,height);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
* @param style cast=(GtkStyle *)
* @param window cast=(GdkWindow *)
* @param widget cast=(GtkWidget *)
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 10a43a55b4..a457f381cf 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
@@ -111,7 +111,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
gtk_render_frame (gtkStyle, drawable, OS.GTK_STATE_PRELIGHT, OS.GTK_SHADOW_ETCHED_OUT, null, checkButtonHandle, detail, prelight_x, prelight_y, prelight_width, prelight_height);
}
int state_type = getStateType(DrawData.WIDGET_WHOLE);
- OS.gtk_paint_check(gtkStyle, drawable, state_type, shadow_type, null, checkButtonHandle, detail, x, y, indicator_size, indicator_size);
+ gtk_render_check (gtkStyle, drawable, state_type, shadow_type, checkButtonHandle, detail, x, y, indicator_size, indicator_size);
if (clientArea != null) {
clientArea.x = bounds.x + 2 * indicator_spacing + border_width + indicator_size;
clientArea.y = bounds.y + border_width;
@@ -231,4 +231,15 @@ void gtk_render_option (long /*int*/ style, long /*int*/ window, int state_type,
}
}
+void gtk_render_check(long /*int*/ style, long /*int*/ window, int state_type, int shadow_type, 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_check(context, cairo, context, y, width, height);
+ Cairo.cairo_destroy (cairo);
+ } else {
+ OS.gtk_paint_check(style, window, state_type, shadow_type, null, widget, detail, x, y, width, height);
+ }
+}
+
}

Back to the top