summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-01-20 03:29:56 (EST)
committer Silenio Quarti2012-01-20 12:41:58 (EST)
commit31a2a5aea4f752c906cf60c42ebcdb6129816aeb (patch)
treec1a0b1f89b560b66141f9fbb1db60e8b4386ff3d
parent68fd263cea74f91e7fe4706e0ba952e21764235f (diff)
downloadeclipse.platform.swt-31a2a5aea4f752c906cf60c42ebcdb6129816aeb.zip
eclipse.platform.swt-31a2a5aea4f752c906cf60c42ebcdb6129816aeb.tar.gz
eclipse.platform.swt-31a2a5aea4f752c906cf60c42ebcdb6129816aeb.tar.bz2
Get rid of gdk_pixbuf_render_to_drawable_alpha.
The function is deprecated (removed in gtk 3) and was used only for GTK older than 2.2.0 which is unsupported by SWT nowadays.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c5
-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.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java10
5 files changed, 3 insertions, 38 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 978787c..2dd60ad 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
@@ -6193,16 +6193,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pixbuf_1render_1to_1drawable)
}
#endif
-#ifndef NO__1gdk_1pixbuf_1render_1to_1drawable_1alpha
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pixbuf_1render_1to_1drawable_1alpha)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10, jint arg11, jint arg12)
-{
- OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1render_1to_1drawable_1alpha_FUNC);
- gdk_pixbuf_render_to_drawable_alpha((GdkPixbuf *)arg0, (GdkDrawable *)arg1, arg2, arg3, arg4, arg5, arg6, arg7, (GdkPixbufAlphaMode)arg8, arg9, (GdkRgbDither)arg10, arg11, arg12);
- OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1render_1to_1drawable_1alpha_FUNC);
-}
-#endif
-
#ifndef NO__1gdk_1pixbuf_1save_1to_1bufferv
JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1pixbuf_1save_1to_1bufferv)
(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLongArray arg2, jbyteArray arg3, jintLongArray arg4, jintLongArray arg5, jintLongArray arg6)
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 db2f4b5..e9e9d4c 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
@@ -18,8 +18,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 1382;
-int OS_nativeFunctionCallCount[1382];
+int OS_nativeFunctionCount = 1381;
+int OS_nativeFunctionCallCount[1381];
char * OS_nativeFunctionNames[] = {
#ifndef JNI64
"Call__IIII",
@@ -517,7 +517,6 @@ char * OS_nativeFunctionNames[] = {
"_1gdk_1pixbuf_1new_1from_1file",
"_1gdk_1pixbuf_1render_1pixmap_1and_1mask",
"_1gdk_1pixbuf_1render_1to_1drawable",
- "_1gdk_1pixbuf_1render_1to_1drawable_1alpha",
"_1gdk_1pixbuf_1save_1to_1bufferv",
"_1gdk_1pixbuf_1scale",
"_1gdk_1pixbuf_1scale_1simple",
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 e729c66..293480a 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
@@ -525,7 +525,6 @@ typedef enum {
_1gdk_1pixbuf_1new_1from_1file_FUNC,
_1gdk_1pixbuf_1render_1pixmap_1and_1mask_FUNC,
_1gdk_1pixbuf_1render_1to_1drawable_FUNC,
- _1gdk_1pixbuf_1render_1to_1drawable_1alpha_FUNC,
_1gdk_1pixbuf_1save_1to_1bufferv_FUNC,
_1gdk_1pixbuf_1scale_FUNC,
_1gdk_1pixbuf_1scale_1simple_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 2988aa5..b2acc6d 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
@@ -4737,21 +4737,6 @@ public static final void gdk_pixbuf_render_to_drawable(int /*long*/ pixbuf, int
}
/**
* @param pixbuf cast=(GdkPixbuf *)
- * @param drawable cast=(GdkDrawable *)
- * @param alpha_mode cast=(GdkPixbufAlphaMode)
- * @param dither cast=(GdkRgbDither)
- */
-public static final native void _gdk_pixbuf_render_to_drawable_alpha(int /*long*/ pixbuf, int /*long*/ drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_mode, int alpha_threshold, int dither, int x_dither, int y_dither);
-public static final void gdk_pixbuf_render_to_drawable_alpha(int /*long*/ pixbuf, int /*long*/ drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_mode, int alpha_threshold, int dither, int x_dither, int y_dither) {
- lock.lock();
- try {
- _gdk_pixbuf_render_to_drawable_alpha(pixbuf, drawable, src_x, src_y, dest_x, dest_y, width, height, alpha_mode, alpha_threshold, dither, x_dither, y_dither);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param pixbuf cast=(GdkPixbuf *)
* @param pixmap_return cast=(GdkDrawable **)
* @param mask_return cast=(GdkBitmap **)
*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
index 18a3741..bf75352 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
@@ -1008,15 +1008,7 @@ void drawImageAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHei
if (scaledPixbuf == 0) return;
pixbuf = scaledPixbuf;
}
- /*
- * Feature in GTK. gdk_draw_pixbuf was introduced in GTK+ 2.2.0 and
- * supports clipping.
- */
- if (OS.GTK_VERSION >= OS.VERSION (2, 2, 0)) {
- OS.gdk_draw_pixbuf(data.drawable, handle, pixbuf, 0, 0, destX, destY, destWidth, destHeight, OS.GDK_RGB_DITHER_NORMAL, 0, 0);
- } else {
- OS.gdk_pixbuf_render_to_drawable_alpha(pixbuf, data.drawable, 0, 0, destX, destY, destWidth, destHeight, OS.GDK_PIXBUF_ALPHA_BILEVEL, 128, OS.GDK_RGB_DITHER_NORMAL, 0, 0);
- }
+ OS.gdk_draw_pixbuf(data.drawable, handle, pixbuf, 0, 0, destX, destY, destWidth, destHeight, OS.GDK_RGB_DITHER_NORMAL, 0, 0);
OS.g_object_unref(pixbuf);
}
void drawImageMask(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight) {