diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-06-19 10:27:41 -0400 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-06-19 17:50:53 -0400 |
commit | 9a3f1e08acae6a5f050926a48e53d50c103a85e9 (patch) | |
tree | fcc60c3c69e9e386eaffc031be1c578e96d4d153 /bundles/org.eclipse.swt/Eclipse SWT PI | |
parent | 4df24be727bf7df22d7972cb27d4cc6882d010fa (diff) | |
download | eclipse.platform.swt-9a3f1e08acae6a5f050926a48e53d50c103a85e9.tar.gz eclipse.platform.swt-9a3f1e08acae6a5f050926a48e53d50c103a85e9.tar.xz eclipse.platform.swt-9a3f1e08acae6a5f050926a48e53d50c103a85e9.zip |
Use Cairo instead of deprecated functions in ToolTip widget.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI')
5 files changed, 35 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 3bf70f695e..97b16fc93e 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 @@ -5040,6 +5040,24 @@ fail: } #endif +#ifndef NO__1gdk_1cairo_1set_1source_1pixbuf +JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1set_1source_1pixbuf) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3) +{ + OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1pixbuf_FUNC); +/* + gdk_cairo_set_source_pixbuf(arg0, (const GdkPixbuf *)arg1, arg2, arg3); +*/ + { + OS_LOAD_FUNCTION(fp, gdk_cairo_set_source_pixbuf) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, const GdkPixbuf *, jdouble, jdouble))fp)(arg0, (const GdkPixbuf *)arg1, arg2, arg3); + } + } + OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1pixbuf_FUNC); +} +#endif + #ifndef NO__1gdk_1cairo_1set_1source_1window JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1set_1source_1window) (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) 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 5cad1917d7..310e9fb8b1 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 @@ -220,6 +220,7 @@ #define pango_cairo_font_map_get_default_LIB LIB_PANGOCAIRO #define pango_cairo_font_map_set_resolution_LIB LIB_PANGOCAIRO #define gdk_cairo_reset_clip_LIB LIB_GDK +#define gdk_cairo_set_source_pixbuf_LIB LIB_GDK #define gdk_cairo_set_source_color_LIB LIB_GDK #define gdk_cairo_set_source_window_LIB LIB_GDK #define gdk_cairo_region_LIB LIB_GDK 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 332cce96d1..a30c73c8f6 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 @@ -430,6 +430,7 @@ char * OS_nativeFunctionNames[] = { "_1gdk_1cairo_1region", "_1gdk_1cairo_1reset_1clip", "_1gdk_1cairo_1set_1source_1color", + "_1gdk_1cairo_1set_1source_1pixbuf", "_1gdk_1cairo_1set_1source_1window", "_1gdk_1color_1free", "_1gdk_1color_1parse", 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 a784fb1763..e8c483ef69 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 @@ -438,6 +438,7 @@ typedef enum { _1gdk_1cairo_1region_FUNC, _1gdk_1cairo_1reset_1clip_FUNC, _1gdk_1cairo_1set_1source_1color_FUNC, + _1gdk_1cairo_1set_1source_1pixbuf_FUNC, _1gdk_1cairo_1set_1source_1window_FUNC, _1gdk_1color_1free_FUNC, _1gdk_1color_1parse_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 6d058a72cc..4aab5e3597 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 @@ -3709,6 +3709,20 @@ public static final void gdk_cairo_set_source_color(int /*long*/ cairo, GdkColor } /** * @method flags=dynamic + * @param pixbuf cast=(const GdkPixbuf *) + */ +public static final native void _gdk_cairo_set_source_pixbuf(int /*long*/ cairo, int /*long*/ pixbuf, double pixbuf_x, double pixbuf_y); +public static final void gdk_cairo_set_source_pixbuf(int /*long*/ cairo, int /*long*/ pixbuf, double pixbuf_x, double pixbuf_y) { + lock.lock(); + try { + _gdk_cairo_set_source_pixbuf(cairo,pixbuf,pixbuf_x,pixbuf_y); + } + finally { + lock.unlock(); + } +} +/** + * @method flags=dynamic * @param window cast=(GdkWindow *) */ public static final native void _gdk_cairo_set_source_window(int /*long*/ cairo, int /*long*/ window, int x, int y); |