summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatoly Spektor <aspektor@redhat.com>2012-08-15 15:00:37 -0400
committerAnatoly Spektor <aspektor@redhat.com>2012-08-15 15:00:37 -0400
commitf9b1702d538b7119b88c12bc0de93297d0f1bfff (patch)
tree84de82d41d6f934fe5bb1bd1b08027ee573a93ce
parent390e16e87916237b4b4a491c6ddf80f8de406bfc (diff)
parenta104ef04f5c11c447be0b7779b1621be8be740f1 (diff)
downloadeclipse.platform.swt-f9b1702d538b7119b88c12bc0de93297d0f1bfff.tar.gz
eclipse.platform.swt-f9b1702d538b7119b88c12bc0de93297d0f1bfff.tar.xz
eclipse.platform.swt-f9b1702d538b7119b88c12bc0de93297d0f1bfff.zip
Merge branch 'master' of http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.git
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/version.txt2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java17
-rw-r--r--bundles/org.eclipse.swt/buildFragment.xml4
25 files changed, 117 insertions, 45 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
index fdb6313674..0eb7b5caee 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
@@ -111,7 +111,11 @@ public class TableDragSourceEffect extends DragSourceEffect {
int /*long*/ path = OS.g_list_nth_data (list, i);
OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
pixmaps[i] = OS.gtk_tree_view_create_row_drag_icon(handle, path);
- OS.gdk_drawable_get_size(pixmaps[i], w, h);
+ if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+ OS.gdk_pixmap_get_size(pixmaps[i], w, h);
+ } else {
+ OS.gdk_drawable_get_size(pixmaps[i], w, h);
+ }
width = Math.max(width, w[0]);
height = rect.y + h[0] - yy[0];
yy[i] = rect.y;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
index 78e4cd1b58..5be5ddad9a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
@@ -110,7 +110,11 @@ public class TreeDragSourceEffect extends DragSourceEffect {
int /*long*/ path = OS.g_list_nth_data (list, i);
OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
pixmaps[i] = OS.gtk_tree_view_create_row_drag_icon(handle, path);
- OS.gdk_drawable_get_size(pixmaps[i], w, h);
+ if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+ OS.gdk_pixmap_get_size(pixmaps[i], w, h);
+ } else {
+ OS.gdk_drawable_get_size(pixmaps[i], w, h);
+ }
width = Math.max(width, w[0]);
height = rect.y + h[0] - yy[0];
yy[i] = rect.y;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java
index 5c77bc9148..1925df0a91 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java
@@ -26,7 +26,7 @@ public class Library {
/**
* SWT Minor version number (must be in the range 0..999)
*/
- static int MINOR_VERSION = 301;
+ static int MINOR_VERSION = 302;
/**
* SWT revision number (must be >= 0)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
index d68d8e069a..fc4b28e9e2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
@@ -26,7 +26,7 @@ public class Library {
/**
* SWT Minor version number (must be in the range 0..999)
*/
- static int MINOR_VERSION = 301;
+ static int MINOR_VERSION = 302;
/**
* SWT revision number (must be >= 0)
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 b71852b2c0..37e7de34e8 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
@@ -5238,7 +5238,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1drawable_1get_1size)
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
}
- gdk_drawable_get_size((GdkDrawable *)arg0, (gint *)lparg1, (gint *)lparg2);
+/*
+ gdk_drawable_get_size(arg0, (gint *)lparg1, (gint *)lparg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_drawable_get_size)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, gint *, gint *))fp)(arg0, (gint *)lparg1, (gint *)lparg2);
+ }
+ }
fail:
#ifdef JNI_VERSION_1_2
if (IS_JNI_1_2) {
@@ -5692,7 +5700,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1values)
GdkGCValues _arg1, *lparg1=NULL;
OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1values_FUNC);
if (arg1) if ((lparg1 = getGdkGCValuesFields(env, arg1, &_arg1)) == NULL) goto fail;
- gdk_gc_set_values((GdkGC *)arg0, (GdkGCValues *)lparg1, (GdkGCValuesMask)arg2);
+/*
+ gdk_gc_set_values(arg0, (GdkGCValues *)lparg1, arg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_gc_set_values)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, GdkGCValues *, jint))fp)(arg0, (GdkGCValues *)lparg1, arg2);
+ }
+ }
fail:
OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1values_FUNC);
}
@@ -6018,7 +6034,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pixbuf_1render_1to_1drawable)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10, jint arg11)
{
OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1render_1to_1drawable_FUNC);
- gdk_pixbuf_render_to_drawable((GdkPixbuf *)arg0, (GdkDrawable *)arg1, (GdkGC *)arg2, arg3, arg4, arg5, arg6, arg7, arg8, (GdkRgbDither)arg9, arg10, arg11);
+/*
+ gdk_pixbuf_render_to_drawable(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_pixbuf_render_to_drawable)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong, jint, jint, jint, jint, jint, jint, jint, jint, jint))fp)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1render_1to_1drawable_FUNC);
}
#endif
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 2671afd6da..d66a7c730c 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
@@ -166,6 +166,7 @@
#define gdk_draw_point_LIB LIB_GDK
#define gdk_draw_polygon_LIB LIB_GDK
#define gdk_draw_image_LIB LIB_GDK
+#define gdk_drawable_get_size_LIB LIB_GDK
#define gdk_gc_set_background_LIB LIB_GDK
#define gdk_gc_set_clip_mask_LIB LIB_GDK
#define gdk_gc_set_clip_origin_LIB LIB_GDK
@@ -174,6 +175,7 @@
#define gdk_gc_set_line_attributes_LIB LIB_GDK
#define gdk_gc_set_tile_LIB LIB_GDK
#define gdk_gc_set_ts_origin_LIB LIB_GDK
+#define gdk_gc_set_values_LIB LIB_GDK
#define gdk_gc_get_values_LIB LIB_GDK
#define gdk_pixbuf_save_to_bufferv_LIB LIB_GDK
#define gdk_screen_get_default_LIB LIB_GDK
@@ -182,6 +184,7 @@
#define gdk_screen_get_monitor_geometry_LIB LIB_GDK
#define gdk_screen_get_n_monitors_LIB LIB_GDK
#define gdk_screen_get_number_LIB LIB_GDK
+#define gdk_pixbuf_render_to_drawable_LIB LIB_GDK
#define gtk_scrolled_window_get_hscrollbar_LIB LIB_GTK
#define gtk_scrolled_window_get_vscrollbar_LIB LIB_GTK
#define gtk_status_icon_get_geometry_LIB LIB_GTK
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 d221129a8e..597a56c91a 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
@@ -3905,7 +3905,7 @@ public static final int /*long*/ gdk_drawable_get_image(int /*long*/ drawable, i
}
}
/**
- * @param drawable cast=(GdkDrawable *)
+ * @method flags=dynamic
* @param width cast=(gint *),flags=no_in critical
* @param height cast=(gint *),flags=no_in critical
*/
@@ -4267,9 +4267,8 @@ public static final void gdk_gc_set_ts_origin(int /*long*/ gc, int x, int y) {
}
}
/**
- * @param gc cast=(GdkGC *)
+ * @method flags=dynamic
* @param values cast=(GdkGCValues *),flags=no_out
- * @param values_mask cast=(GdkGCValuesMask)
*/
public static final native void _gdk_gc_set_values(int /*long*/ gc, GdkGCValues values, int values_mask);
public static final void gdk_gc_set_values(int /*long*/ gc, GdkGCValues values, int values_mask) {
@@ -4526,10 +4525,7 @@ public static final int /*long*/ gdk_pixbuf_new_from_file(byte[] filename, int /
}
}
/**
- * @param pixbuf cast=(GdkPixbuf *)
- * @param drawable cast=(GdkDrawable *)
- * @param gc cast=(GdkGC *)
- * @param dither cast=(GdkRgbDither)
+ * @method flags=dynamic
*/
public static final native void _gdk_pixbuf_render_to_drawable(int /*long*/ pixbuf, int /*long*/ drawable, int /*long*/ gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int dither, int x_dither, int y_dither);
public static final void gdk_pixbuf_render_to_drawable(int /*long*/ pixbuf, int /*long*/ drawable, int /*long*/ gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int dither, int x_dither, int y_dither) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
index 866a3abeef..0edfe16fff 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
@@ -81,14 +81,14 @@ public abstract class Widget {
static final int RESIZING = 1<<19;
/* WebKit fixes */
- static final int WEBKIT_EVENTS_FIX = 1<<19;
+ static final int WEBKIT_EVENTS_FIX = 1<<20;
static final String WEBKIT_EVENTS_FIX_KEY = "org.eclipse.swt.internal.webKitEventsFix"; //$NON-NLS-1$
static final String GLCONTEXT_KEY = "org.eclipse.swt.internal.cocoa.glcontext"; //$NON-NLS-1$
static final String IS_ACTIVE = "org.eclipse.swt.internal.isActive"; //$NON-NLS-1$
/* Notify of the opportunity to skin this widget */
- static final int SKIN_NEEDED = 1<<20;
+ static final int SKIN_NEEDED = 1<<21;
/* Default size for widgets */
static final int DEFAULT_WIDTH = 64;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak b/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak
index d1a5a09d68..fd1528fe6b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak
@@ -10,5 +10,5 @@
#*******************************************************************************
maj_ver=4
-min_ver=301
-comma_ver=4,3,0,1
+min_ver=302
+comma_ver=4,3,0,2
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt b/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt
index 17a1440c47..7201ac84ef 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt
@@ -1 +1 @@
-version 4.301 \ No newline at end of file
+version 4.302 \ No newline at end of file
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 a5dc056ffc..61021eb94a 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
@@ -2751,11 +2751,10 @@ void getSize(int[] width, int[] height) {
if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
width[0] = OS.gdk_window_get_width(data.drawable);
height[0] = OS.gdk_window_get_height(data.drawable);
- return;
} else {
OS.gdk_drawable_get_size(data.drawable, width, height);
- return;
}
+ return;
}
if (OS.USE_CAIRO) {
int /*long*/ surface = Cairo.cairo_get_target(handle);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
index 9f7fda7368..917dad9c5a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
@@ -363,7 +363,11 @@ public Image(Device device, Image srcImage, int flag) {
/* Get source image size */
int[] w = new int[1], h = new int[1];
- OS.gdk_drawable_get_size(srcImage.pixmap, w, h);
+ if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+ OS.gdk_pixmap_get_size(srcImage.pixmap, w, h);
+ } else {
+ OS.gdk_drawable_get_size(srcImage.pixmap, w, h);
+ }
int width = w[0];
int height = h[0];
@@ -869,7 +873,11 @@ void createSurface() {
/* Generate the mask if necessary. */
if (transparentPixel != -1) createMask();
int[] w = new int[1], h = new int[1];
- OS.gdk_drawable_get_size(pixmap, w, h);
+ if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+ OS.gdk_pixmap_get_size(pixmap, w, h);
+ } else {
+ OS.gdk_drawable_get_size(pixmap, w, h);
+ }
int width = w[0], height = h[0];
if (mask != 0 || alpha != -1 || alphaData != null) {
int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height);
@@ -1069,7 +1077,11 @@ public Rectangle getBounds() {
return new Rectangle(0, 0, width, height);
}
int[] w = new int[1]; int[] h = new int[1];
- OS.gdk_drawable_get_size(pixmap, w, h);
+ if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+ OS.gdk_pixmap_get_size(pixmap, w, h);
+ } else {
+ OS.gdk_drawable_get_size(pixmap, w, h);
+ }
return new Rectangle(0, 0, width = w[0], height = h[0]);
}
@@ -1142,7 +1154,11 @@ public ImageData getImageData() {
return data;
}
int[] w = new int[1], h = new int[1];
- OS.gdk_drawable_get_size(pixmap, w, h);
+ if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+ OS.gdk_pixmap_get_size(pixmap, w, h);
+ } else {
+ OS.gdk_drawable_get_size(pixmap, w, h);
+ }
int width = w[0], height = h[0];
int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height);
if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java
index 0bb0f4d85e..0a57b144e1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java
@@ -102,7 +102,11 @@ public static int /*long*/ createPixbuf(Image image) {
Cairo.cairo_surface_destroy(surface);
} else {
int [] w = new int [1], h = new int [1];
- OS.gdk_drawable_get_size (image.pixmap, w, h);
+ if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+ OS.gdk_pixmap_get_size(image.pixmap, w, h);
+ } else {
+ OS.gdk_drawable_get_size (image.pixmap, w, h);
+ }
int /*long*/ colormap = OS.gdk_colormap_get_system ();
boolean hasMask = image.mask != 0 && OS.gdk_drawable_get_depth (image.mask) == 1;
if (hasMask) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java
index 800ef4425e..8292ab796d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java
@@ -141,7 +141,7 @@ boolean drawCaret () {
OS.gdk_gc_set_function (gc, OS.GDK_XOR);
if (image != null && !image.isDisposed() && image.mask == 0) {
int[] width = new int[1]; int[] height = new int[1];
- OS.gdk_drawable_get_size(image.pixmap, width, height);
+ gdk_pixmap_get_size (image.pixmap, width, height);
int nX = x;
if ((parent.style & SWT.MIRRORED) != 0) nX = parent.getClientWidth () - width[0] - nX;
OS.gdk_draw_drawable(window, gc, image.pixmap, 0, 0, nX, y, width[0], height[0]);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
index 8d68182c7d..09e5150b5b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
@@ -382,7 +382,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height, int offs
int /*long*/ drawable = control.backgroundImage.pixmap;
int /*long*/ xDrawable = OS.GDK_PIXMAP_XID (drawable);
int [] w = new int [1], h = new int [1];
- OS.gdk_drawable_get_size (drawable, w, h);
+ gdk_pixmap_get_size (drawable, w, h);
surface = Cairo.cairo_xlib_surface_create (xDisplay, xDrawable, xVisual, w [0], h [0]);
if (surface == 0) error (SWT.ERROR_NO_HANDLES);
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 209fadab90..ec35babb3f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -408,7 +408,7 @@ void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable,
if (OS.gdk_drawable_get_depth (window) != depth) return;
GdkRectangle rect = new GdkRectangle ();
int [] width = new int [1], height = new int [1];
- OS.gdk_drawable_get_size (window, width, height);
+ gdk_window_get_size (window, width, height);
rect.width = width [0];
rect.height = height [0];
OS.gdk_window_begin_paint_rect (window, rect);
@@ -436,7 +436,7 @@ void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable,
OS.gdk_window_get_position (window, cX, cY);
int /*long*/ parentWindow = OS.gdk_window_get_parent (window);
int [] pW = new int [1], pH = new int [1];
- OS.gdk_drawable_get_size (parentWindow, pW, pH);
+ gdk_window_get_size (parentWindow, pW, pH);
srcX = x_offset [0] - cX [0];
srcY = y_offset [0] - cY [0];
destX = x - cX [0];
@@ -3259,7 +3259,7 @@ int /*long*/ gtk_visibility_notify_event (int /*long*/ widget, int /*long*/ even
} else {
if ((state & OBSCURED) != 0) {
int [] width = new int [1], height = new int [1];
- OS.gdk_drawable_get_size (window, width, height);
+ gdk_window_get_size (window, width, height);
GdkRectangle rect = new GdkRectangle ();
rect.width = width [0];
rect.height = height [0];
@@ -3573,7 +3573,7 @@ void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boole
GdkRectangle rect = new GdkRectangle ();
if (redrawAll) {
int [] w = new int [1], h = new int [1];
- OS.gdk_drawable_get_size (window, w, h);
+ gdk_window_get_size (window, w, h);
rect.width = w [0];
rect.height = h [0];
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java
index 7485d194c6..c5f7d7e901 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java
@@ -393,6 +393,9 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr
int y = 0;
int width = 0;
int height = 0;
+ int parentBorder = 0;
+ int parentWidth = 0;
+ int parentHeight = 0;
GtkAllocation allocation = new GtkAllocation ();
if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
OS.gtk_widget_get_allocation(handle, allocation);
@@ -400,15 +403,17 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr
y = allocation.y;
width = allocation.width;
height = allocation.height;
+ OS.gtk_widget_get_allocation(parent.handle, allocation);
+ parentWidth = allocation.width;
+ parentHeight = allocation.height;
} else {
x = OS.GTK_WIDGET_X (handle);
y = OS.GTK_WIDGET_Y (handle);
width = OS.GTK_WIDGET_WIDTH (handle);
height = OS.GTK_WIDGET_HEIGHT (handle);
+ parentWidth = OS.GTK_WIDGET_WIDTH (parent.handle);
+ parentHeight = OS.GTK_WIDGET_HEIGHT (parent.handle);
}
- int parentBorder = 0;
- int parentWidth = OS.GTK_WIDGET_WIDTH (parent.handle);
- int parentHeight = OS.GTK_WIDGET_HEIGHT (parent.handle);
int newX = lastX, newY = lastY;
if ((style & SWT.VERTICAL) != 0) {
newX = Math.min (Math.max (0, eventX + x - startX - parentBorder), parentWidth - width);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 2f5964ebe6..b48eeea42e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -1255,7 +1255,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) {
int /*long*/ window = gtk_widget_get_window (widget);
int [] width = new int [1];
int [] height = new int [1];
- OS.gdk_drawable_get_size (window, width, height);
+ gdk_window_get_size (window, width, height);
GdkRectangle area = new GdkRectangle ();
area.x = gdkEventExpose.area_x;
area.y = gdkEventExpose.area_y;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 240749f2ea..1b38aa9357 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -1143,7 +1143,7 @@ public Rectangle getClientArea () {
int getClientWidth () {
int [] w = new int [1], h = new int [1];
OS.gtk_widget_realize (handle);
- OS.gdk_drawable_get_size(OS.gtk_tree_view_get_bin_window(handle), w, h);
+ gdk_window_get_size(OS.gtk_tree_view_get_bin_window(handle), w, h);
return w[0];
}
@@ -1918,7 +1918,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle);
if (window == gdkEvent.window) {
int [] width = new int [1], height = new int [1];
- OS.gdk_drawable_get_size (window, width, height);
+ gdk_window_get_size (window, width, height);
int bottom = 0;
if (itemCount != 0) {
int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
index a7fba59163..1a2a5e48b9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
@@ -706,7 +706,7 @@ void redraw () {
int /*long*/ window = OS.gtk_tree_view_get_bin_window (parentHandle);
rect.x = 0;
int [] w = new int [1], h = new int [1];
- OS.gdk_drawable_get_size (window, w, h);
+ gdk_window_get_size (window, w, h);
rect.width = w [0];
OS.gdk_window_invalidate_rect (window, rect, false);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
index 55f335308c..fdcb01cd48 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
@@ -1551,7 +1551,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) {
OS.memmove (gdkEvent, event, GdkEventExpose.sizeof);
int /*long*/ window = paintWindow ();
int [] w = new int [1], h = new int [1];
- OS.gdk_drawable_get_size (window, w, h);
+ gdk_window_get_size (window, w, h);
GtkBorder innerBorder = Display.getEntryInnerBorder (handle);
int width = w [0] - innerBorder.left - innerBorder.right;
int height = h [0] - innerBorder.top - innerBorder.bottom;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index 94065d380d..5f2cb67736 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -1144,7 +1144,7 @@ public Rectangle getClientArea () {
int getClientWidth () {
int [] w = new int [1], h = new int [1];
OS.gtk_widget_realize (handle);
- OS.gdk_drawable_get_size(OS.gtk_tree_view_get_bin_window(handle), w, h);
+ gdk_window_get_size(OS.gtk_tree_view_get_bin_window(handle), w, h);
return w[0];
}
@@ -1927,7 +1927,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle);
if (window == gdkEvent.window) {
int [] width = new int [1], height = new int [1];
- OS.gdk_drawable_get_size (window, width, height);
+ gdk_window_get_size (window, width, height);
int /*long*/ parent = 0;
int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, parent);
GdkRectangle rect = new GdkRectangle ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
index 608876b4e9..b42956aa90 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
@@ -1060,7 +1060,7 @@ void redraw () {
int /*long*/ window = OS.gtk_tree_view_get_bin_window (parentHandle);
rect.x = 0;
int [] w = new int [1], h = new int [1];
- OS.gdk_drawable_get_size (window, w, h);
+ gdk_window_get_size (window, w, h);
rect.width = w [0];
OS.gdk_window_invalidate_rect (window, rect, false);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
index bf9d1c108a..57ab0fc48e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
@@ -1806,6 +1806,23 @@ void gtk_widget_set_receives_default (int /*long*/ widget, boolean receives_defa
}
}
+void gdk_pixmap_get_size (int /*long*/ pixmap, int[] width, int[] height) {
+ if (OS.GTK_VERSION >= OS.VERSION (2, 24, 0)) {
+ OS.gdk_pixmap_get_size (pixmap, width, height);
+ } else {
+ OS.gdk_drawable_get_size (pixmap, width, height);
+ }
+}
+
+void gdk_window_get_size (int /*long*/ drawable, int[] width, int[] height) {
+ if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+ width[0] = OS.gdk_window_get_width (drawable);
+ height[0] = OS.gdk_window_get_height (drawable);
+ } else {
+ OS.gdk_drawable_get_size (drawable, width, height);
+ }
+}
+
/**
* Returns a string containing a concise, human-readable
* description of the receiver.
diff --git a/bundles/org.eclipse.swt/buildFragment.xml b/bundles/org.eclipse.swt/buildFragment.xml
index 5cbb412c1b..6779396048 100644
--- a/bundles/org.eclipse.swt/buildFragment.xml
+++ b/bundles/org.eclipse.swt/buildFragment.xml
@@ -477,9 +477,9 @@
<fileset dir="${build.result.folder}/@dot" includes="**" />
</copy>
<copy todir="${destination.temp.folder}/${full.name}">
- <fileset dir="${fragmentdir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,libcairo-swt.so,META-INF/" />
+ <fileset dir="${fragmentdir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,META-INF/" />
</copy>
- <chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,libcairo-swt.so" />
+ <chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
<antcall target="apitools.generation">
<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>