Skip to content

Commit d626f60

Browse files
committed
[GTK] Fix compilation with gdk-pixbuf 2.44.x
Animation API is deprecated as per https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/250 .
1 parent 0865865 commit d626f60

File tree

2 files changed

+30
-5
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT PI/gtk

2 files changed

+30
-5
lines changed

bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,6 +1495,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
14951495
#endif
14961496

14971497
#ifndef NO_gdk_1pixbuf_1animation_1get_1static_1image
1498+
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
14981499
JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1get_1static_1image)
14991500
(JNIEnv *env, jclass that, jlong arg0)
15001501
{
@@ -1504,9 +1505,11 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1get_1static_1image)
15041505
GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1animation_1get_1static_1image_FUNC);
15051506
return rc;
15061507
}
1508+
G_GNUC_END_IGNORE_DEPRECATIONS
15071509
#endif
15081510

15091511
#ifndef NO_gdk_1pixbuf_1animation_1is_1static_1image
1512+
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
15101513
JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1is_1static_1image)
15111514
(JNIEnv *env, jclass that, jlong arg0)
15121515
{
@@ -1516,6 +1519,7 @@ JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1is_1static_1image)
15161519
GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1animation_1is_1static_1image_FUNC);
15171520
return rc;
15181521
}
1522+
G_GNUC_END_IGNORE_DEPRECATIONS
15191523
#endif
15201524

15211525
#ifndef NO_gdk_1pixbuf_1animation_1iter_1advance
@@ -1533,6 +1537,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
15331537
#endif
15341538

15351539
#ifndef NO_gdk_1pixbuf_1animation_1iter_1get_1delay_1time
1540+
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
15361541
JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1iter_1get_1delay_1time)
15371542
(JNIEnv *env, jclass that, jlong arg0)
15381543
{
@@ -1542,9 +1547,11 @@ JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1iter_1get_1delay_1time
15421547
GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1animation_1iter_1get_1delay_1time_FUNC);
15431548
return rc;
15441549
}
1550+
G_GNUC_END_IGNORE_DEPRECATIONS
15451551
#endif
15461552

15471553
#ifndef NO_gdk_1pixbuf_1animation_1iter_1get_1pixbuf
1554+
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
15481555
JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1iter_1get_1pixbuf)
15491556
(JNIEnv *env, jclass that, jlong arg0)
15501557
{
@@ -1554,6 +1561,7 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1iter_1get_1pixbuf)
15541561
GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1animation_1iter_1get_1pixbuf_FUNC);
15551562
return rc;
15561563
}
1564+
G_GNUC_END_IGNORE_DEPRECATIONS
15571565
#endif
15581566

15591567
#ifndef NO_gdk_1pixbuf_1copy
@@ -1751,6 +1759,7 @@ JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1pixbuf_1loader_1close)
17511759
#endif
17521760

17531761
#ifndef NO_gdk_1pixbuf_1loader_1get_1animation
1762+
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
17541763
JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1loader_1get_1animation)
17551764
(JNIEnv *env, jclass that, jlong arg0)
17561765
{
@@ -1760,6 +1769,7 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1loader_1get_1animation)
17601769
GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1loader_1get_1animation_FUNC);
17611770
return rc;
17621771
}
1772+
G_GNUC_END_IGNORE_DEPRECATIONS
17631773
#endif
17641774

17651775
#ifndef NO_gdk_1pixbuf_1loader_1get_1format

bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,11 +625,20 @@ public class GDK extends OS {
625625
*/
626626
public static final native long gdk_pango_layout_get_clip_region(long layout, int x_origin, int y_origin, int[] index_ranges, int n_ranges);
627627

628-
/** @param animation cast=(GdkPixbufAnimation *) */
628+
/**
629+
* @param animation cast=(GdkPixbufAnimation *)
630+
* @method flags=ignore_deprecations
631+
*/
629632
public static final native boolean gdk_pixbuf_animation_is_static_image(long animation);
630-
/** @param iter cast=(GdkPixbufAnimationIter *) */
633+
/**
634+
* @param iter cast=(GdkPixbufAnimationIter *)
635+
* @method flags=ignore_deprecations
636+
*/
631637
public static final native int gdk_pixbuf_animation_iter_get_delay_time(long iter);
632-
/** @param iter cast=(GdkPixbufAnimationIter *) */
638+
/**
639+
* @param iter cast=(GdkPixbufAnimationIter *)
640+
* @method flags=ignore_deprecations
641+
*/
633642
public static final native long gdk_pixbuf_animation_iter_get_pixbuf(long iter);
634643
/**
635644
* @method flags=ignore_deprecations
@@ -643,7 +652,10 @@ public class GDK extends OS {
643652
* @param start_time cast=(const GTimeVal *)
644653
*/
645654
public static final native long gdk_pixbuf_animation_get_iter(long animation, long start_time);
646-
/** @param animation cast=(GdkPixbufAnimation *) */
655+
/**
656+
* @param animation cast=(GdkPixbufAnimation *)
657+
* @method flags=ignore_deprecations
658+
*/
647659
public static final native long gdk_pixbuf_animation_get_static_image(long animation);
648660
/**
649661
* @param src_pixbuf cast=(GdkPixbuf *)
@@ -670,7 +682,10 @@ public class GDK extends OS {
670682
public static final native long gdk_pixbuf_loader_get_format(long loader);
671683
/** @param format cast=(GdkPixbufFormat *) */
672684
public static final native long gdk_pixbuf_format_get_name(long format);
673-
/** @param loader cast=(GdkPixbufLoader *) */
685+
/**
686+
* @param loader cast=(GdkPixbufLoader *)
687+
* @method flags=ignore_deprecations
688+
*/
674689
public static final native long gdk_pixbuf_loader_get_animation(long loader);
675690
/**
676691
* @param data cast=(const guchar *)

0 commit comments

Comments
 (0)