Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2019-05-30 15:28:52 -0400
committerEric Williams2019-06-10 11:25:46 -0400
commit0b22592e3f6c547b0bec5a5b491bd41a583e8e60 (patch)
treeff72a2891a1d246cb8320107f596630b7f032ab8 /bundles/org.eclipse.swt/Eclipse SWT PI
parent1f251edf602f89449cb3c484a6fd9218d9dcc2aa (diff)
downloadeclipse.platform.swt-0b22592e3f6c547b0bec5a5b491bd41a583e8e60.tar.gz
eclipse.platform.swt-0b22592e3f6c547b0bec5a5b491bd41a583e8e60.tar.xz
eclipse.platform.swt-0b22592e3f6c547b0bec5a5b491bd41a583e8e60.zip
Bug 545032: [GTK] Implement native ImageLoader
Re-implement the native ImageLoader based on Xi's work. Differences from this patch vs the old one: -Image and Device use CAIRO_CONTENT_COLOR_ALPHA (4 channel) surfaces -ImageData data arrays provided to us in ImageLoader.* methods are already in RGBA order, big/little endian considerations are only needed when loading/saving data from/to Cairo -GdkPixbuf expects the data in RGBA byte order -Images with bit depth < 24 seem broken, due to Image and other places hardcoding bit depth to 32. This is broken before this patch as well (see bug 38232) Tested using the test snippet attached, as well as the snippets from bug 547529. Icons in a child Eclipse look fine. Test environment is Fedora 30 with GTK3.24.8. No AllNonBrowserTest failures. Change-Id: Ia7235100784bd34643503d6b2dfa26ad08998eb5 Signed-off-by: Eric Williams <ericwill@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c188
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java152
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java23
5 files changed, 395 insertions, 0 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 698a049061..f88e3fd40d 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
@@ -1527,6 +1527,90 @@ fail:
}
#endif
+#ifndef NO__1gdk_1pixbuf_1animation_1get_1iter
+JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1get_1iter)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1get_1iter_FUNC);
+ rc = (jlong)gdk_pixbuf_animation_get_iter((GdkPixbufAnimation *)arg0, (const GTimeVal *)arg1);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1get_1iter_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1pixbuf_1animation_1get_1static_1image
+JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1get_1static_1image)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1get_1static_1image_FUNC);
+ rc = (jlong)gdk_pixbuf_animation_get_static_image((GdkPixbufAnimation *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1get_1static_1image_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1pixbuf_1animation_1is_1static_1image
+JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1is_1static_1image)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1is_1static_1image_FUNC);
+ rc = (jboolean)gdk_pixbuf_animation_is_static_image((GdkPixbufAnimation *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1is_1static_1image_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1pixbuf_1animation_1iter_1advance
+JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1iter_1advance)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ jboolean rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1iter_1advance_FUNC);
+ rc = (jboolean)gdk_pixbuf_animation_iter_advance((GdkPixbufAnimationIter *)arg0, (const GTimeVal *)arg1);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1iter_1advance_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1pixbuf_1animation_1iter_1get_1delay_1time
+JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1iter_1get_1delay_1time)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1iter_1get_1delay_1time_FUNC);
+ rc = (jint)gdk_pixbuf_animation_iter_get_delay_time((GdkPixbufAnimationIter *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1iter_1get_1delay_1time_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1pixbuf_1animation_1iter_1get_1pixbuf
+JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1iter_1get_1pixbuf)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1iter_1get_1pixbuf_FUNC);
+ rc = (jlong)gdk_pixbuf_animation_iter_get_pixbuf((GdkPixbufAnimationIter *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1iter_1get_1pixbuf_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1pixbuf_1copy
+JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1copy)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1copy_FUNC);
+ rc = (jlong)gdk_pixbuf_copy((const GdkPixbuf *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1copy_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1gdk_1pixbuf_1copy_1area
JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1pixbuf_1copy_1area)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jlong arg5, jint arg6, jint arg7)
@@ -1537,6 +1621,42 @@ JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1pixbuf_1copy_1area)
}
#endif
+#ifndef NO__1gdk_1pixbuf_1format_1get_1name
+JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1format_1get_1name)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1format_1get_1name_FUNC);
+ rc = (jlong)gdk_pixbuf_format_get_name((GdkPixbufFormat *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1format_1get_1name_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1pixbuf_1get_1bits_1per_1sample
+JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1bits_1per_1sample)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1bits_1per_1sample_FUNC);
+ rc = (jint)gdk_pixbuf_get_bits_per_sample((const GdkPixbuf *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1bits_1per_1sample_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1pixbuf_1get_1byte_1length
+JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1byte_1length)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1byte_1length_FUNC);
+ rc = (jlong)gdk_pixbuf_get_byte_length((const GdkPixbuf *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1byte_1length_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1gdk_1pixbuf_1get_1has_1alpha
JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1has_1alpha)
(JNIEnv *env, jclass that, jlong arg0)
@@ -1561,6 +1681,18 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1height)
}
#endif
+#ifndef NO__1gdk_1pixbuf_1get_1n_1channels
+JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1n_1channels)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1n_1channels_FUNC);
+ rc = (jint)gdk_pixbuf_get_n_channels((const GdkPixbuf *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1n_1channels_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1gdk_1pixbuf_1get_1pixels
JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1pixels)
(JNIEnv *env, jclass that, jlong arg0)
@@ -1613,6 +1745,30 @@ fail:
}
#endif
+#ifndef NO__1gdk_1pixbuf_1loader_1get_1animation
+JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1get_1animation)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1get_1animation_FUNC);
+ rc = (jlong)gdk_pixbuf_loader_get_animation((GdkPixbufLoader *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1get_1animation_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1pixbuf_1loader_1get_1format
+JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1get_1format)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1get_1format_FUNC);
+ rc = (jlong)gdk_pixbuf_loader_get_format((GdkPixbufLoader *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1get_1format_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1gdk_1pixbuf_1loader_1get_1pixbuf
JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1get_1pixbuf)
(JNIEnv *env, jclass that, jlong arg0)
@@ -1665,6 +1821,18 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1new)
}
#endif
+#ifndef NO__1gdk_1pixbuf_1new_1from_1data
+JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1new_1from_1data)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jboolean arg2, jint arg3, jint arg4, jint arg5, jint arg6, jlong arg7, jlong arg8)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1new_1from_1data_FUNC);
+ rc = (jlong)gdk_pixbuf_new_from_data((const guchar *)arg0, (GdkColorspace)arg1, (gboolean)arg2, arg3, arg4, arg5, arg6, (GdkPixbufDestroyNotify)arg7, (gpointer)arg8);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1new_1from_1data_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1gdk_1pixbuf_1new_1from_1file
JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1new_1from_1file)
(JNIEnv *env, jclass that, jbyteArray arg0, jlongArray arg1)
@@ -14856,6 +15024,16 @@ fail:
}
#endif
+#ifndef NO__1g_1get_1current_1time
+JNIEXPORT void JNICALL OS_NATIVE(_1g_1get_1current_1time)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ OS_NATIVE_ENTER(env, that, _1g_1get_1current_1time_FUNC);
+ g_get_current_time((GTimeVal *)arg0);
+ OS_NATIVE_EXIT(env, that, _1g_1get_1current_1time_FUNC);
+}
+#endif
+
#ifndef NO__1g_1getenv
JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1getenv)
(JNIEnv *env, jclass that, jbyteArray arg0)
@@ -15821,6 +15999,16 @@ fail:
}
#endif
+#ifndef NO__1g_1time_1val_1add
+JNIEXPORT void JNICALL OS_NATIVE(_1g_1time_1val_1add)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ OS_NATIVE_ENTER(env, that, _1g_1time_1val_1add_FUNC);
+ g_time_val_add((GTimeVal *)arg0, (glong)arg1);
+ OS_NATIVE_EXIT(env, that, _1g_1time_1val_1add_FUNC);
+}
+#endif
+
#ifndef NO__1g_1timeout_1add
JNIEXPORT jint JNICALL OS_NATIVE(_1g_1timeout_1add)
(JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2)
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 dcb6536bff..3d9d40141a 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
@@ -125,17 +125,31 @@ char * GDK_nativeFunctionNames[] = {
"_1gdk_1monitor_1get_1workarea",
"_1gdk_1pango_1context_1get",
"_1gdk_1pango_1layout_1get_1clip_1region",
+ "_1gdk_1pixbuf_1animation_1get_1iter",
+ "_1gdk_1pixbuf_1animation_1get_1static_1image",
+ "_1gdk_1pixbuf_1animation_1is_1static_1image",
+ "_1gdk_1pixbuf_1animation_1iter_1advance",
+ "_1gdk_1pixbuf_1animation_1iter_1get_1delay_1time",
+ "_1gdk_1pixbuf_1animation_1iter_1get_1pixbuf",
+ "_1gdk_1pixbuf_1copy",
"_1gdk_1pixbuf_1copy_1area",
+ "_1gdk_1pixbuf_1format_1get_1name",
+ "_1gdk_1pixbuf_1get_1bits_1per_1sample",
+ "_1gdk_1pixbuf_1get_1byte_1length",
"_1gdk_1pixbuf_1get_1has_1alpha",
"_1gdk_1pixbuf_1get_1height",
+ "_1gdk_1pixbuf_1get_1n_1channels",
"_1gdk_1pixbuf_1get_1pixels",
"_1gdk_1pixbuf_1get_1rowstride",
"_1gdk_1pixbuf_1get_1width",
"_1gdk_1pixbuf_1loader_1close",
+ "_1gdk_1pixbuf_1loader_1get_1animation",
+ "_1gdk_1pixbuf_1loader_1get_1format",
"_1gdk_1pixbuf_1loader_1get_1pixbuf",
"_1gdk_1pixbuf_1loader_1new",
"_1gdk_1pixbuf_1loader_1write",
"_1gdk_1pixbuf_1new",
+ "_1gdk_1pixbuf_1new_1from_1data",
"_1gdk_1pixbuf_1new_1from_1file",
"_1gdk_1pixbuf_1save_1to_1bufferv",
"_1gdk_1pixbuf_1scale_1simple",
@@ -1225,6 +1239,7 @@ char * OS_nativeFunctionNames[] = {
"_1g_1filename_1from_1utf8",
"_1g_1filename_1to_1uri",
"_1g_1filename_1to_1utf8",
+ "_1g_1get_1current_1time",
"_1g_1getenv",
"_1g_1hash_1table_1get_1values",
"_1g_1icon_1new_1for_1string",
@@ -1299,6 +1314,7 @@ char * OS_nativeFunctionNames[] = {
"_1g_1string_1free",
"_1g_1string_1new_1len",
"_1g_1strtod",
+ "_1g_1time_1val_1add",
"_1g_1timeout_1add",
"_1g_1type_1add_1interface_1static",
"_1g_1type_1class_1peek",
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 c81fa779a3..acb253ec53 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
@@ -135,17 +135,31 @@ typedef enum {
_1gdk_1monitor_1get_1workarea_FUNC,
_1gdk_1pango_1context_1get_FUNC,
_1gdk_1pango_1layout_1get_1clip_1region_FUNC,
+ _1gdk_1pixbuf_1animation_1get_1iter_FUNC,
+ _1gdk_1pixbuf_1animation_1get_1static_1image_FUNC,
+ _1gdk_1pixbuf_1animation_1is_1static_1image_FUNC,
+ _1gdk_1pixbuf_1animation_1iter_1advance_FUNC,
+ _1gdk_1pixbuf_1animation_1iter_1get_1delay_1time_FUNC,
+ _1gdk_1pixbuf_1animation_1iter_1get_1pixbuf_FUNC,
+ _1gdk_1pixbuf_1copy_FUNC,
_1gdk_1pixbuf_1copy_1area_FUNC,
+ _1gdk_1pixbuf_1format_1get_1name_FUNC,
+ _1gdk_1pixbuf_1get_1bits_1per_1sample_FUNC,
+ _1gdk_1pixbuf_1get_1byte_1length_FUNC,
_1gdk_1pixbuf_1get_1has_1alpha_FUNC,
_1gdk_1pixbuf_1get_1height_FUNC,
+ _1gdk_1pixbuf_1get_1n_1channels_FUNC,
_1gdk_1pixbuf_1get_1pixels_FUNC,
_1gdk_1pixbuf_1get_1rowstride_FUNC,
_1gdk_1pixbuf_1get_1width_FUNC,
_1gdk_1pixbuf_1loader_1close_FUNC,
+ _1gdk_1pixbuf_1loader_1get_1animation_FUNC,
+ _1gdk_1pixbuf_1loader_1get_1format_FUNC,
_1gdk_1pixbuf_1loader_1get_1pixbuf_FUNC,
_1gdk_1pixbuf_1loader_1new_FUNC,
_1gdk_1pixbuf_1loader_1write_FUNC,
_1gdk_1pixbuf_1new_FUNC,
+ _1gdk_1pixbuf_1new_1from_1data_FUNC,
_1gdk_1pixbuf_1new_1from_1file_FUNC,
_1gdk_1pixbuf_1save_1to_1bufferv_FUNC,
_1gdk_1pixbuf_1scale_1simple_FUNC,
@@ -1199,6 +1213,7 @@ typedef enum {
_1g_1filename_1from_1utf8_FUNC,
_1g_1filename_1to_1uri_FUNC,
_1g_1filename_1to_1utf8_FUNC,
+ _1g_1get_1current_1time_FUNC,
_1g_1getenv_FUNC,
_1g_1hash_1table_1get_1values_FUNC,
_1g_1icon_1new_1for_1string_FUNC,
@@ -1273,6 +1288,7 @@ typedef enum {
_1g_1string_1free_FUNC,
_1g_1string_1new_1len_FUNC,
_1g_1strtod_FUNC,
+ _1g_1time_1val_1add_FUNC,
_1g_1timeout_1add_FUNC,
_1g_1type_1add_1interface_1static_FUNC,
_1g_1type_1class_1peek_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
index 9de1f9675d..6132c5c132 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
@@ -1459,6 +1459,72 @@ public class GDK extends OS {
lock.unlock();
}
}
+ /** @param animation cast=(GdkPixbufAnimation *) */
+ public static final native boolean _gdk_pixbuf_animation_is_static_image(long animation);
+ public static final boolean gdk_pixbuf_animation_is_static_image(long animation) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_animation_is_static_image(animation);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /** @param iter cast=(GdkPixbufAnimationIter *) */
+ public static final native int _gdk_pixbuf_animation_iter_get_delay_time(long iter);
+ public static final int gdk_pixbuf_animation_iter_get_delay_time(long iter) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_animation_iter_get_delay_time(iter);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /** @param iter cast=(GdkPixbufAnimationIter *) */
+ public static final native long _gdk_pixbuf_animation_iter_get_pixbuf(long iter);
+ public static final long gdk_pixbuf_animation_iter_get_pixbuf(long iter) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_animation_iter_get_pixbuf(iter);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /**
+ * @param iter cast=(GdkPixbufAnimationIter *)
+ * @param current_time cast=(const GTimeVal *)
+ */
+ public static final native boolean _gdk_pixbuf_animation_iter_advance(long iter, long current_time);
+ public static final boolean gdk_pixbuf_animation_iter_advance(long iter, long current_time) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_animation_iter_advance(iter, current_time);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /**
+ * @param animation cast=(GdkPixbufAnimation *)
+ * @param start_time cast=(const GTimeVal *)
+ */
+ public static final native long _gdk_pixbuf_animation_get_iter(long animation, long start_time);
+ public static final long gdk_pixbuf_animation_get_iter(long animation, long start_time) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_animation_get_iter(animation, start_time);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /** @param animation cast=(GdkPixbufAnimation *) */
+ public static final native long _gdk_pixbuf_animation_get_static_image(long animation);
+ public static final long gdk_pixbuf_animation_get_static_image(long animation) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_animation_get_static_image(animation);
+ } finally {
+ lock.unlock();
+ }
+ }
/**
* @param src_pixbuf cast=(GdkPixbuf *)
* @param dest_pixbuf cast=(GdkPixbuf *)
@@ -1522,6 +1588,92 @@ public class GDK extends OS {
lock.unlock();
}
}
+ /** @param pixbuf cast=(const GdkPixbuf *) */
+ public static final native long _gdk_pixbuf_get_byte_length(long pixbuf);
+ public static final long gdk_pixbuf_get_byte_length(long pixbuf) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_get_byte_length(pixbuf);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /** @param pixbuf cast=(const GdkPixbuf *) */
+ public static final native int _gdk_pixbuf_get_n_channels(long pixbuf);
+ public static final int gdk_pixbuf_get_n_channels(long pixbuf) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_get_n_channels(pixbuf);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /** @param pixbuf cast=(const GdkPixbuf *) */
+ public static final native int _gdk_pixbuf_get_bits_per_sample(long pixbuf);
+ public static final int gdk_pixbuf_get_bits_per_sample(long pixbuf) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_get_bits_per_sample(pixbuf);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /** @param pixbuf cast=(const GdkPixbuf *) */
+ public static final native long _gdk_pixbuf_copy(long pixbuf);
+ public static final long gdk_pixbuf_copy(long pixbuf) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_copy(pixbuf);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /** @param loader cast=(GdkPixbufLoader *) */
+ public static final native long _gdk_pixbuf_loader_get_format(long loader);
+ public static final long gdk_pixbuf_loader_get_format(long loader) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_loader_get_format(loader);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /** @param format cast=(GdkPixbufFormat *) */
+ public static final native long _gdk_pixbuf_format_get_name(long format);
+ public static final long gdk_pixbuf_format_get_name(long format) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_format_get_name(format);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /** @param loader cast=(GdkPixbufLoader *) */
+ public static final native long _gdk_pixbuf_loader_get_animation(long loader);
+ public static final long gdk_pixbuf_loader_get_animation(long loader) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_loader_get_animation(loader);
+ } finally {
+ lock.unlock();
+ }
+ }
+ /**
+ * @param data cast=(const guchar *)
+ * @param colorspace cast=(GdkColorspace)
+ * @param has_alpha cast=(gboolean)
+ * @param destroy_fn cast=(GdkPixbufDestroyNotify)
+ * @param destroy_fn_data cast=(gpointer)
+ */
+ public static final native long _gdk_pixbuf_new_from_data(long data, int colorspace, boolean has_alpha, int bits_per_sample, int width, int height, int rowstride, long destroy_fn, long destroy_fn_data);
+ public static final long gdk_pixbuf_new_from_data(long data, int colorspace, boolean has_alpha, int bits_per_sample, int width, int height, int rowstride, long destroy_fn, long destroy_fn_data) {
+ lock.lock();
+ try {
+ return _gdk_pixbuf_new_from_data(data, colorspace, has_alpha, bits_per_sample, width, height, rowstride, destroy_fn, destroy_fn_data);
+ } finally {
+ lock.unlock();
+ }
+ }
public static final native long _gdk_pixbuf_loader_new();
public static final long gdk_pixbuf_loader_new() {
lock.lock();
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 07ff45dec4..ba04f401e8 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
@@ -1721,6 +1721,29 @@ public static final long g_getenv(byte [] variable) {
lock.unlock();
}
}
+/** @param result cast=(GTimeVal *)*/
+public static final native void _g_get_current_time(long result);
+public static final void g_get_current_time(long result) {
+ lock.lock();
+ try {
+ _g_get_current_time(result);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
+ * @param result cast=(GTimeVal *)
+ * @param microseconds cast=(glong)
+ */
+public static final native void _g_time_val_add(long result, long microseconds);
+public static final void g_time_val_add(long result, long microseconds) {
+ lock.lock();
+ try {
+ _g_time_val_add(result, microseconds);
+ } finally {
+ lock.unlock();
+ }
+}
/**
* @param table cast=(GHashTable *)
*/

Back to the top