diff options
author | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-09-24 14:45:57 -0400 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-09-24 14:45:57 -0400 |
commit | 5721cfd149c1026b4c21848f64c2b57027ac8c7e (patch) | |
tree | b16600bca597a4a0dc9d27194d5761c53151a395 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org | |
parent | bc8036435837353efa5da8c19b6a3003dbb86045 (diff) | |
download | eclipse.platform.swt-5721cfd149c1026b4c21848f64c2b57027ac8c7e.tar.gz eclipse.platform.swt-5721cfd149c1026b4c21848f64c2b57027ac8c7e.tar.xz eclipse.platform.swt-5721cfd149c1026b4c21848f64c2b57027ac8c7e.zip |
Make 64-bit the default source code
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org')
57 files changed, 2159 insertions, 2159 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java index c544508b2a..c516c866a6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java @@ -117,7 +117,7 @@ void destroy() { device.gdkColors[pixel] = null; } } - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = OS.gdk_colormap_get_system(); OS.gdk_colormap_free_colors(colormap, handle, 1); handle = null; } @@ -244,7 +244,7 @@ void init(int red, int green, int blue) { gdkColor.red = (short)((red & 0xFF) | ((red & 0xFF) << 8)); gdkColor.green = (short)((green & 0xFF) | ((green & 0xFF) << 8)); gdkColor.blue = (short)((blue & 0xFF) | ((blue & 0xFF) << 8)); - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = OS.gdk_colormap_get_system(); if (!OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true)) { /* Allocate black. */ gdkColor = new GdkColor(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java index f66a8de530..6ac6cb7412 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java @@ -54,7 +54,7 @@ public final class Cursor extends Resource { * * @noreference This field is not intended to be referenced by clients. */ - public int /*long*/ handle; + public long /*int*/ handle; static final byte[] APPSTARTING_SRC = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, @@ -290,15 +290,15 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) { hotspotY >= source.height || hotspotY < 0) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } - int /*long*/ display = 0; + long /*int*/ display = 0; if (OS.GTK_VERSION >= OS.VERSION(2, 4, 0) && OS.gdk_display_supports_cursor_color(display = OS.gdk_display_get_default ())) { int width = source.width; int height = source.height; PaletteData palette = source.palette; - int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); + long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - int /*long*/ data = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ data = OS.gdk_pixbuf_get_pixels(pixbuf); byte[] buffer = source.data; if (!palette.isDirect || source.depth != 24 || stride != source.bytesPerLine || palette.redMask != 0xFF000000 || palette.greenMask != 0xFF0000 || palette.blueMask != 0xFF00) { buffer = new byte[source.width * source.height * 4]; @@ -432,10 +432,10 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) { init(); } -int /*long*/ createCursor(byte[] sourceData, byte[] maskData, int width, int height, int hotspotX, int hotspotY, boolean reverse) { - int /*long*/ sourcePixmap = OS.gdk_bitmap_create_from_data(0, sourceData, width, height); - int /*long*/ maskPixmap = OS.gdk_bitmap_create_from_data(0, maskData, width, height); - int /*long*/ cursor = 0; +long /*int*/ createCursor(byte[] sourceData, byte[] maskData, int width, int height, int hotspotX, int hotspotY, boolean reverse) { + long /*int*/ sourcePixmap = OS.gdk_bitmap_create_from_data(0, sourceData, width, height); + long /*int*/ maskPixmap = OS.gdk_bitmap_create_from_data(0, maskData, width, height); + long /*int*/ cursor = 0; if (sourcePixmap != 0 && maskPixmap != 0) { GdkColor foreground = new GdkColor(); if (!reverse) foreground.red = foreground.green = foreground.blue = (short)0xFFFF; @@ -485,7 +485,7 @@ public boolean equals(Object object) { * * @noreference This method is not intended to be referenced by clients. */ -public static Cursor gtk_new(Device device, int /*long*/ handle) { +public static Cursor gtk_new(Device device, long /*int*/ handle) { Cursor cursor = new Cursor(device); cursor.handle = handle; return cursor; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java index fd2a4ac32a..403eef490b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java @@ -36,8 +36,8 @@ public abstract class Device implements Drawable { * * @noreference This field is not intended to be referenced by clients. */ - protected int /*long*/ xDisplay; - int /*long*/ shellHandle; + protected long /*int*/ xDisplay; + long /*int*/ shellHandle; /* Debugging */ public static boolean DEBUG; @@ -55,7 +55,7 @@ public abstract class Device implements Drawable { boolean disposed; /* Warning and Error Handlers */ - int /*long*/ logProc; + long /*int*/ logProc; Callback logCallback; //NOT DONE - get list of valid names String [] log_domains = {"GLib-GObject", "GLib", "GObject", "Pango", "ATK", "GdkPixbuf", "Gdk", "Gtk", "GnomeVFS", "GIO"}; @@ -64,7 +64,7 @@ public abstract class Device implements Drawable { /* X Warning and Error Handlers */ static Callback XErrorCallback, XIOErrorCallback; - static int /*long*/ XErrorProc, XIOErrorProc, XNullErrorProc, XNullIOErrorProc; + static long /*int*/ XErrorProc, XIOErrorProc, XNullErrorProc, XNullIOErrorProc; static Device[] Devices = new Device[4]; /* @@ -82,7 +82,7 @@ public abstract class Device implements Drawable { /* Device dpi */ Point dpi; - int /*long*/ emptyTab; + long /*int*/ emptyTab; boolean useXRender; static boolean CAIRO_LOADED; @@ -173,7 +173,7 @@ void checkCairo() { } else { buffer = Converter.wcsToMbcs(null, "libcairo.so.2", true); } - int /*long*/ libcairo = OS.dlopen(buffer, flags); + long /*int*/ libcairo = OS.dlopen(buffer, flags); if (libcairo != 0) { OS.dlclose(libcairo); } else { @@ -272,7 +272,7 @@ void dispose_Object (Object object) { } } -static synchronized Device findDevice (int /*long*/ xDisplay) { +static synchronized Device findDevice (long /*int*/ xDisplay) { for (int i=0; i<Devices.length; i++) { Device device = Devices [i]; if (device != null && device.xDisplay == xDisplay) { @@ -427,13 +427,13 @@ public Point getDPI () { public FontData[] getFontList (String faceName, boolean scalable) { checkDevice (); if (!scalable) return new FontData[0]; - int /*long*/[] family = new int /*long*/[1]; - int /*long*/[] face = new int /*long*/[1]; - int /*long*/[] families = new int /*long*/[1]; + long /*int*/[] family = new long /*int*/[1]; + long /*int*/[] face = new long /*int*/[1]; + long /*int*/[] families = new long /*int*/[1]; int[] n_families = new int[1]; - int /*long*/[] faces = new int /*long*/[1]; + long /*int*/[] faces = new long /*int*/[1]; int[] n_faces = new int[1]; - int /*long*/ context = OS.gdk_pango_context_get(); + long /*int*/ context = OS.gdk_pango_context_get(); OS.pango_context_list_families(context, families, n_families); int nFds = 0; FontData[] fds = new FontData[faceName != null ? 4 : n_families[0]]; @@ -441,7 +441,7 @@ public FontData[] getFontList (String faceName, boolean scalable) { OS.memmove(family, families[0] + i * OS.PTR_SIZEOF, OS.PTR_SIZEOF); boolean match = true; if (faceName != null) { - int /*long*/ familyName = OS.pango_font_family_get_name(family[0]); + long /*int*/ familyName = OS.pango_font_family_get_name(family[0]); int length = OS.strlen(familyName); byte[] buffer = new byte[length]; OS.memmove(buffer, familyName, length); @@ -452,7 +452,7 @@ public FontData[] getFontList (String faceName, boolean scalable) { OS.pango_font_family_list_faces(family[0], faces, n_faces); for (int j=0; j<n_faces[0]; j++) { OS.memmove(face, faces[0] + j * OS.PTR_SIZEOF, OS.PTR_SIZEOF); - int /*long*/ fontDesc = OS.pango_font_face_describe(face[0]); + long /*int*/ fontDesc = OS.pango_font_face_describe(face[0]); Font font = Font.gtk_new(this, fontDesc); FontData data = font.getFontData()[0]; if (nFds == fds.length) { @@ -677,7 +677,7 @@ protected void init () { * * @noreference This method is not intended to be referenced by clients. */ -public abstract int /*long*/ internal_new_GC (GCData data); +public abstract long /*int*/ internal_new_GC (GCData data); /** * Invokes platform specific functionality to dispose a GC handle. @@ -694,7 +694,7 @@ public abstract int /*long*/ internal_new_GC (GCData data); * * @noreference This method is not intended to be referenced by clients. */ -public abstract void internal_dispose_GC (int /*long*/ hDC, GCData data); +public abstract void internal_dispose_GC (long /*int*/ hDC, GCData data); /** * Returns <code>true</code> if the device has been disposed, @@ -735,7 +735,7 @@ public boolean loadFont (String path) { return OS.FcConfigAppFontAddFile (0, buffer); } -int /*long*/ logProc (int /*long*/ log_domain, int /*long*/ log_level, int /*long*/ message, int /*long*/ user_data) { +long /*int*/ logProc (long /*int*/ log_domain, long /*int*/ log_level, long /*int*/ message, long /*int*/ user_data) { if (warningLevel == 0) { if (DEBUG || debug) { new Error ().printStackTrace (); @@ -806,7 +806,7 @@ protected void release () { shellHandle = 0; if (gdkColors != null) { - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = OS.gdk_colormap_get_system(); for (int i = 0; i < gdkColors.length; i++) { GdkColor color = gdkColors [i]; if (color != null) { @@ -899,7 +899,7 @@ public void setWarnings (boolean warnings) { } } -static int /*long*/ XErrorProc (int /*long*/ xDisplay, int /*long*/ xErrorEvent) { +static long /*int*/ XErrorProc (long /*int*/ xDisplay, long /*int*/ xErrorEvent) { Device device = findDevice (xDisplay); if (device != null) { if (device.warningLevel == 0) { @@ -917,7 +917,7 @@ static int /*long*/ XErrorProc (int /*long*/ xDisplay, int /*long*/ xErrorEvent) return 0; } -static int /*long*/ XIOErrorProc (int /*long*/ xDisplay) { +static long /*int*/ XIOErrorProc (long /*int*/ xDisplay) { Device device = findDevice (xDisplay); if (device != null) { if (DEBUG || device.debug) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java index 70a7b7d7b9..62a2cba10e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java @@ -44,7 +44,7 @@ public final class Font extends Resource { * * @noreference This field is not intended to be referenced by clients. */ - public int /*long*/ handle; + public long /*int*/ handle; Font(Device device) { super(device); @@ -180,7 +180,7 @@ public boolean equals(Object object) { public FontData[] getFontData() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); - int /*long*/ family = OS.pango_font_description_get_family(handle); + long /*int*/ family = OS.pango_font_description_get_family(handle); int length = OS.strlen(family); byte[] buffer = new byte[length]; OS.memmove(buffer, family, length); @@ -194,7 +194,7 @@ public FontData[] getFontData() { if (pangoStyle == OS.PANGO_STYLE_ITALIC) style |= SWT.ITALIC; if (pangoStyle == OS.PANGO_STYLE_OBLIQUE) style |= SWT.ROMAN; if (pangoWeight >= OS.PANGO_WEIGHT_BOLD) style |= SWT.BOLD; - int /*long*/ fontString = OS.pango_font_description_to_string (handle); + long /*int*/ fontString = OS.pango_font_description_to_string (handle); length = OS.strlen (fontString); buffer = new byte [length + 1]; OS.memmove (buffer, fontString, length); @@ -219,7 +219,7 @@ public FontData[] getFontData() { * * @noreference This method is not intended to be referenced by clients. */ -public static Font gtk_new(Device device, int /*long*/ handle) { +public static Font gtk_new(Device device, long /*int*/ handle) { Font font = new Font(device); font.handle = handle; return font; 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 61021eb94a..ac7c944e7b 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 @@ -69,7 +69,7 @@ public final class GC extends Resource { * * @noreference This field is not intended to be referenced by clients. */ - public int /*long*/ handle; + public long /*int*/ handle; Drawable drawable; GCData data; @@ -156,7 +156,7 @@ public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData(); data.style = checkStyle(style); - int /*long*/ gdkGC = drawable.internal_new_GC(data); + long /*int*/ gdkGC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); @@ -165,10 +165,10 @@ public GC(Drawable drawable, int style) { init(); } -static void addCairoString(int /*long*/ cairo, String string, float x, float y, Font font) { +static void addCairoString(long /*int*/ cairo, String string, float x, float y, Font font) { byte[] buffer = Converter.wcsToMbcs(null, string, true); if (OS.GTK_VERSION >= OS.VERSION(2, 8, 0)) { - int /*long*/ layout = OS.pango_cairo_create_layout(cairo); + long /*int*/ layout = OS.pango_cairo_create_layout(cairo); if (layout == 0) SWT.error(SWT.ERROR_NO_HANDLES); OS.pango_layout_set_text(layout, buffer, -1); OS.pango_layout_set_font_description(layout, font.handle); @@ -194,7 +194,7 @@ static int checkStyle (int style) { return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT); } -public static GC gtk_new(int /*long*/ handle, GCData data) { +public static GC gtk_new(long /*int*/ handle, GCData data) { GC gc = new GC(); gc.device = data.device; gc.init(null, data, handle); @@ -203,7 +203,7 @@ public static GC gtk_new(int /*long*/ handle, GCData data) { public static GC gtk_new(Drawable drawable, GCData data) { GC gc = new GC(); - int /*long*/ gdkGC = drawable.internal_new_GC(data); + long /*int*/ gdkGC = drawable.internal_new_GC(data); gc.device = data.device; gc.init(drawable, data, gdkGC); return gc; @@ -214,7 +214,7 @@ void checkGC (int mask) { if ((state & mask) == mask) return; state = (state ^ mask) & mask; data.state |= mask; - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { if ((state & (BACKGROUND | FOREGROUND)) != 0) { GdkColor color; @@ -230,7 +230,7 @@ void checkGC (int mask) { } if (pattern != null) { if ((data.style & SWT.MIRRORED) != 0 && pattern.surface != 0) { - int /*long*/ newPattern = Cairo.cairo_pattern_create_for_surface(pattern.surface); + long /*int*/ newPattern = Cairo.cairo_pattern_create_for_surface(pattern.surface); if (newPattern == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_pattern_set_extend(newPattern, Cairo.CAIRO_EXTEND_REPEAT); double[] matrix = {-1, 0, 0, 1, 0, 0}; @@ -390,10 +390,10 @@ void checkGC (int mask) { } } -int /*long*/ convertRgn(int /*long*/ rgn, double[] matrix) { - int /*long*/ newRgn = OS.gdk_region_new(); +long /*int*/ convertRgn(long /*int*/ rgn, double[] matrix) { + long /*int*/ newRgn = OS.gdk_region_new(); int[] nRects = new int[1]; - int /*long*/[] rects = new int /*long*/[1]; + long /*int*/[] rects = new long /*int*/[1]; OS.gdk_region_get_rectangles(rgn, rects, nRects); GdkRectangle rect = new GdkRectangle(); int[] pointArray = new int[8]; @@ -420,7 +420,7 @@ int /*long*/ convertRgn(int /*long*/ rgn, double[] matrix) { Cairo.cairo_matrix_transform_point(matrix, x, y); pointArray[6] = (int)x[0]; pointArray[7] = (int)Math.round(y[0]); - int /*long*/ polyRgn = OS.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE); + long /*int*/ polyRgn = OS.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE); OS.gdk_region_union(newRgn, polyRgn); OS.gdk_region_destroy(polyRgn); } @@ -449,7 +449,7 @@ public void copyArea(Image image, int x, int y) { if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (image.type != SWT.BITMAP || image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (OS.USE_CAIRO) { - int /*long*/ cairo = Cairo.cairo_create(image.surface); + long /*int*/ cairo = Cairo.cairo_create(image.surface); if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_translate(cairo, -x, -y); if (data.image != null) { @@ -461,10 +461,10 @@ public void copyArea(Image image, int x, int y) { int[] w = new int[1], h = new int[1]; OS.gdk_drawable_get_size(data.drawable, w, h); int width = w[0], height = h[0]; - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ xDrawable = OS.gdk_x11_drawable_get_xid(data.drawable); - int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); - int /*long*/ srcSurface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width, height); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDrawable = OS.gdk_x11_drawable_get_xid(data.drawable); + long /*int*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); + long /*int*/ srcSurface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width, height); Cairo.cairo_set_source_surface(cairo, srcSurface, 0, 0); } } else { @@ -476,7 +476,7 @@ public void copyArea(Image image, int x, int y) { return; } Rectangle rect = image.getBounds(); - int /*long*/ gdkGC = OS.gdk_gc_new(image.pixmap); + long /*int*/ gdkGC = OS.gdk_gc_new(image.pixmap); if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES); OS.gdk_gc_set_subwindow(gdkGC, OS.GDK_INCLUDE_INFERIORS); OS.gdk_draw_drawable(image.pixmap, gdkGC, data.drawable, x, y, 0, 0, rect.width, rect.height); @@ -524,7 +524,7 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d if (width <= 0 || height <= 0) return; int deltaX = destX - srcX, deltaY = destY - srcY; if (deltaX == 0 && deltaY == 0) return; - int /*long*/ drawable = data.drawable; + long /*int*/ drawable = data.drawable; if (OS.USE_CAIRO) { if (data.image != null) { Cairo.cairo_set_source_surface(handle, data.image.surface, deltaX, deltaY); @@ -546,15 +546,15 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d Cairo.cairo_paint(handle); Cairo.cairo_restore(handle); if (paint) { - int /*long*/ visibleRegion = OS.gdk_drawable_get_visible_region (drawable); + long /*int*/ visibleRegion = OS.gdk_drawable_get_visible_region (drawable); GdkRectangle srcRect = new GdkRectangle (); srcRect.x = srcX; srcRect.y = srcY; srcRect.width = width; srcRect.height = height; - int /*long*/ copyRegion = OS.gdk_region_rectangle (srcRect); + long /*int*/ copyRegion = OS.gdk_region_rectangle (srcRect); OS.gdk_region_intersect(copyRegion, visibleRegion); - int /*long*/ invalidateRegion = OS.gdk_region_rectangle (srcRect); + long /*int*/ invalidateRegion = OS.gdk_region_rectangle (srcRect); OS.gdk_region_subtract (invalidateRegion, visibleRegion); OS.gdk_region_offset (invalidateRegion, deltaX, deltaY); OS.gdk_window_invalidate_region(drawable, invalidateRegion, false); @@ -604,10 +604,10 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d } void createLayout() { - int /*long*/ context = OS.gdk_pango_context_get(); + long /*int*/ context = OS.gdk_pango_context_get(); if (context == 0) SWT.error(SWT.ERROR_NO_HANDLES); data.context = context; - int /*long*/ layout = OS.pango_layout_new(context); + long /*int*/ layout = OS.pango_layout_new(context); if (layout == 0) SWT.error(SWT.ERROR_NO_HANDLES); data.layout = layout; OS.pango_context_set_language(context, OS.gtk_get_default_language()); @@ -632,13 +632,13 @@ void disposeLayout() { void destroy() { if (data.disposeCairo) { - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) Cairo.cairo_destroy(cairo); } data.cairo = 0; /* Free resources */ - int /*long*/ clipRgn = data.clipRgn; + long /*int*/ clipRgn = data.clipRgn; if (clipRgn != 0) OS.gdk_region_destroy(clipRgn); Image image = data.image; if (image != null) { @@ -701,7 +701,7 @@ public void drawArc(int x, int y, int width, int height, int startAngle, int arc height = -height; } if (width == 0 || height == 0 || arcAngle == 0) return; - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset; if (width == height) { @@ -752,8 +752,8 @@ public void drawFocus(int x, int y, int width, int height) { * are not valid in the default style. The fix is to use a style * from a widget. */ - int /*long*/ style = OS.gtk_widget_get_style(data.device.shellHandle); - int /*long*/ cairo = data.cairo; + long /*int*/ style = OS.gtk_widget_get_style(data.device.shellHandle); + long /*int*/ cairo = data.cairo; if (cairo != 0) { checkGC(FOREGROUND); int[] lineWidth = new int[1]; @@ -868,7 +868,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, SWT.error(SWT.ERROR_INVALID_ARGUMENT); } } - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { if (data.alpha != 0) { srcImage.createSurface(); @@ -890,7 +890,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, case SWT.LOW: filter = Cairo.CAIRO_FILTER_FAST; break; case SWT.HIGH: filter = Cairo.CAIRO_FILTER_BEST; break; } - int /*long*/ pattern = Cairo.cairo_pattern_create_for_surface(srcImage.surface); + long /*int*/ pattern = Cairo.cairo_pattern_create_for_surface(srcImage.surface); if (pattern == 0) SWT.error(SWT.ERROR_NO_HANDLES); if (srcWidth != destWidth || srcHeight != destHeight) { /* @@ -912,8 +912,8 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, */ int version = Cairo.cairo_version (); if (version >= Cairo.CAIRO_VERSION_ENCODE(1, 4, 0) && version < Cairo.CAIRO_VERSION_ENCODE(1, 8, 0)) { - int /*long*/ surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, imgWidth * 3, imgHeight * 3); - int /*long*/ cr = Cairo.cairo_create(surface); + long /*int*/ surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, imgWidth * 3, imgHeight * 3); + long /*int*/ cr = Cairo.cairo_create(surface); Cairo.cairo_set_source_surface(cr, srcImage.surface, imgWidth, imgHeight); Cairo.cairo_paint(cr); Cairo.cairo_scale(cr, -1, -1); @@ -936,7 +936,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, Cairo.cairo_set_source_surface(cr, srcImage.surface, imgWidth, -imgHeight * 3); Cairo.cairo_paint(cr); Cairo.cairo_destroy(cr); - int /*long*/ newPattern = Cairo.cairo_pattern_create_for_surface(surface); + long /*int*/ newPattern = Cairo.cairo_pattern_create_for_surface(surface); Cairo.cairo_surface_destroy(surface); if (newPattern == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_pattern_destroy(pattern); @@ -977,7 +977,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, drawImageXRender(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, imgWidth, imgHeight, 0, -1); return; } - int /*long*/ pixbuf = scale(srcImage.pixmap, srcX, srcY, srcWidth, srcHeight, destWidth, destHeight); + long /*int*/ pixbuf = scale(srcImage.pixmap, srcX, srcY, srcWidth, srcHeight, destWidth, destHeight); if (pixbuf != 0) { OS.gdk_pixbuf_render_to_drawable(pixbuf, data.drawable, handle, 0, 0, destX, destY, destWidth, destHeight, OS.GDK_RGB_DITHER_NORMAL, 0, 0); OS.g_object_unref(pixbuf); @@ -994,12 +994,12 @@ void drawImageAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHei drawImageXRender(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, imgWidth, imgHeight, srcImage.mask, OS.PictStandardA8); return; } - int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight); + long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight); if (pixbuf == 0) return; - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = OS.gdk_colormap_get_system(); OS.gdk_pixbuf_get_from_drawable(pixbuf, srcImage.pixmap, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); byte[] line = new byte[stride]; byte alpha = (byte)srcImage.alpha; byte[] alphaData = srcImage.alphaData; @@ -1012,7 +1012,7 @@ void drawImageAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHei OS.memmove(pixels + (y * stride), line, stride); } if (srcWidth != destWidth || srcHeight != destHeight) { - int /*long*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, destWidth, destHeight, OS.GDK_INTERP_BILINEAR); + long /*int*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, destWidth, destHeight, OS.GDK_INTERP_BILINEAR); OS.g_object_unref(pixbuf); if (scaledPixbuf == 0) return; pixbuf = scaledPixbuf; @@ -1021,33 +1021,33 @@ void drawImageAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHei 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) { - int /*long*/ drawable = data.drawable; - int /*long*/ colorPixmap = srcImage.pixmap; + long /*int*/ drawable = data.drawable; + long /*int*/ colorPixmap = srcImage.pixmap; /* Generate the mask if necessary. */ if (srcImage.transparentPixel != -1) srcImage.createMask(); - int /*long*/ maskPixmap = srcImage.mask; + long /*int*/ maskPixmap = srcImage.mask; if (device.useXRender) { drawImageXRender(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, imgWidth, imgHeight, maskPixmap, OS.PictStandardA1); } else { if (srcWidth != destWidth || srcHeight != destHeight) { - int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight); + long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight); if (pixbuf != 0) { - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = OS.gdk_colormap_get_system(); OS.gdk_pixbuf_get_from_drawable(pixbuf, colorPixmap, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight); - int /*long*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight); + long /*int*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight); if (maskPixbuf != 0) { OS.gdk_pixbuf_get_from_drawable(maskPixbuf, maskPixmap, 0, srcX, srcY, 0, 0, srcWidth, srcHeight); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); byte[] line = new byte[stride]; int maskStride = OS.gdk_pixbuf_get_rowstride(maskPixbuf); - int /*long*/ maskPixels = OS.gdk_pixbuf_get_pixels(maskPixbuf); + long /*int*/ maskPixels = OS.gdk_pixbuf_get_pixels(maskPixbuf); byte[] maskLine = new byte[maskStride]; for (int y=0; y<srcHeight; y++) { - int /*long*/ offset = pixels + (y * stride); + long /*int*/ offset = pixels + (y * stride); OS.memmove(line, offset, stride); - int /*long*/ maskOffset = maskPixels + (y * maskStride); + long /*int*/ maskOffset = maskPixels + (y * maskStride); OS.memmove(maskLine, maskOffset, maskStride); for (int x=0; x<srcWidth; x++) { if (maskLine[x * 3] == 0) { @@ -1057,10 +1057,10 @@ void drawImageMask(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeig OS.memmove(offset, line, stride); } OS.g_object_unref(maskPixbuf); - int /*long*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, destWidth, destHeight, OS.GDK_INTERP_BILINEAR); + long /*int*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, destWidth, destHeight, OS.GDK_INTERP_BILINEAR); if (scaledPixbuf != 0) { - int /*long*/[] colorBuffer = new int /*long*/[1]; - int /*long*/[] maskBuffer = new int /*long*/[1]; + long /*int*/[] colorBuffer = new long /*int*/[1]; + long /*int*/[] maskBuffer = new long /*int*/[1]; OS.gdk_pixbuf_render_pixmap_and_mask(scaledPixbuf, colorBuffer, maskBuffer, 128); colorPixmap = colorBuffer[0]; maskPixmap = maskBuffer[0]; @@ -1081,9 +1081,9 @@ void drawImageMask(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeig int newHeight = srcY + srcHeight; int bytesPerLine = (newWidth + 7) / 8; byte[] maskData = new byte[bytesPerLine * newHeight]; - int /*long*/ mask = OS.gdk_bitmap_create_from_data(0, maskData, newWidth, newHeight); + long /*int*/ mask = OS.gdk_bitmap_create_from_data(0, maskData, newWidth, newHeight); if (mask != 0) { - int /*long*/ gc = OS.gdk_gc_new(mask); + long /*int*/ gc = OS.gdk_gc_new(mask); OS.gdk_region_offset(data.clipRgn, -destX + srcX, -destY + srcY); OS.gdk_gc_set_clip_region(gc, data.clipRgn); OS.gdk_region_offset(data.clipRgn, destX - srcX, destY - srcY); @@ -1115,19 +1115,19 @@ void drawImageMask(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeig /* Destroy the image mask if the there is a GC created on the image */ if (srcImage.transparentPixel != -1 && srcImage.memGC != null) srcImage.destroyMask(); } -void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight, int /*long*/ maskPixmap, int maskType) { +void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight, long /*int*/ maskPixmap, int maskType) { int translateX = 0, translateY = 0; - int /*long*/ drawable = data.drawable; + long /*int*/ drawable = data.drawable; if (data.image == null && !data.realDrawable) { int[] x = new int[1], y = new int[1]; - int /*long*/ [] real_drawable = new int /*long*/ [1]; + long /*int*/ [] real_drawable = new long /*int*/ [1]; OS.gdk_window_get_internal_paint_info(drawable, real_drawable, x, y); drawable = real_drawable[0]; translateX = -x[0]; translateY = -y[0]; } - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ maskPict = 0; + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ maskPict = 0; if (maskPixmap != 0) { int attribCount = 0; XRenderPictureAttributes attrib = null; @@ -1139,10 +1139,10 @@ void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcH maskPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(maskPixmap), OS.XRenderFindStandardFormat(xDisplay, maskType), attribCount, attrib); if (maskPict == 0) SWT.error(SWT.ERROR_NO_HANDLES); } - int /*long*/ format = OS.XRenderFindVisualFormat(xDisplay, OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system())); - int /*long*/ destPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(drawable), format, 0, null); + long /*int*/ format = OS.XRenderFindVisualFormat(xDisplay, OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system())); + long /*int*/ destPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(drawable), format, 0, null); if (destPict == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ srcPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(srcImage.pixmap), format, 0, null); + long /*int*/ srcPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(srcImage.pixmap), format, 0, null); if (srcPict == 0) SWT.error(SWT.ERROR_NO_HANDLES); if (srcWidth != destWidth || srcHeight != destHeight) { int[] transform = new int[]{(int)(((float)srcWidth / destWidth) * 65536), 0, 0, 0, (int)(((float)srcHeight / destHeight) * 65536), 0, 0, 0, 65536}; @@ -1151,7 +1151,7 @@ void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcH srcX *= destWidth / (float)srcWidth; srcY *= destHeight / (float)srcHeight; } - int /*long*/ clipping = data.clipRgn; + long /*int*/ clipping = data.clipRgn; if (data.damageRgn != 0) { if (clipping == 0) { clipping = data.damageRgn; @@ -1163,7 +1163,7 @@ void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcH } if (clipping != 0) { int[] nRects = new int[1]; - int /*long*/[] rects = new int /*long*/[1]; + long /*int*/[] rects = new long /*int*/[1]; OS.gdk_region_get_rectangles(clipping, rects, nRects); GdkRectangle rect = new GdkRectangle(); short[] xRects = new short[nRects[0] * 4]; @@ -1185,12 +1185,12 @@ void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcH OS.XRenderFreePicture(xDisplay, srcPict); if (maskPict != 0) OS.XRenderFreePicture(xDisplay, maskPict); } -int /*long*/ scale(int /*long*/ src, int srcX, int srcY, int srcWidth, int srcHeight, int destWidth, int destHeight) { - int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight); +long /*int*/ scale(long /*int*/ src, int srcX, int srcY, int srcWidth, int srcHeight, int destWidth, int destHeight) { + long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight); if (pixbuf == 0) return 0; - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = OS.gdk_colormap_get_system(); OS.gdk_pixbuf_get_from_drawable(pixbuf, src, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight); - int /*long*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, destWidth, destHeight, OS.GDK_INTERP_BILINEAR); + long /*int*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, destWidth, destHeight, OS.GDK_INTERP_BILINEAR); OS.g_object_unref(pixbuf); return scaledPixbuf; } @@ -1211,7 +1211,7 @@ int /*long*/ scale(int /*long*/ src, int srcX, int srcY, int srcWidth, int srcHe public void drawLine(int x1, int y1, int x2, int y2) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); checkGC(DRAW); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset; Cairo.cairo_move_to(cairo, x1 + xOffset, y1 + yOffset); @@ -1254,7 +1254,7 @@ public void drawOval(int x, int y, int width, int height) { y = y + height; height = -height; } - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset; if (width == height) { @@ -1301,11 +1301,11 @@ public void drawPath(Path path) { if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); initCairo(); checkGC(DRAW); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; Cairo.cairo_save(cairo); double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset; Cairo.cairo_translate(cairo, xOffset, yOffset); - int /*long*/ copy = Cairo.cairo_copy_path(path.handle); + long /*int*/ copy = Cairo.cairo_copy_path(path.handle); if (copy == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_append_path(cairo, copy); Cairo.cairo_path_destroy(copy); @@ -1333,7 +1333,7 @@ public void drawPath(Path path) { public void drawPoint (int x, int y) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); checkGC(DRAW); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { Cairo.cairo_rectangle(cairo, x, y, 1, 1); Cairo.cairo_fill(cairo); @@ -1363,7 +1363,7 @@ public void drawPolygon(int[] pointArray) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); checkGC(DRAW); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { drawPolyline(cairo, pointArray, true); Cairo.cairo_stroke(cairo); @@ -1393,7 +1393,7 @@ public void drawPolyline(int[] pointArray) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); checkGC(DRAW); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { drawPolyline(cairo, pointArray, false); Cairo.cairo_stroke(cairo); @@ -1402,7 +1402,7 @@ public void drawPolyline(int[] pointArray) { OS.gdk_draw_lines(data.drawable, handle, pointArray, pointArray.length / 2); } -void drawPolyline(int /*long*/ cairo, int[] pointArray, boolean close) { +void drawPolyline(long /*int*/ cairo, int[] pointArray, boolean close) { int count = pointArray.length / 2; if (count == 0) return; double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset; @@ -1439,7 +1439,7 @@ public void drawRectangle(int x, int y, int width, int height) { y = y + height; height = -height; } - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset; Cairo.cairo_rectangle(cairo, x + xOffset, y + yOffset, width, height); @@ -1509,7 +1509,7 @@ public void drawRoundRectangle(int x, int y, int width, int height, int arcWidth } if (naw < 0) naw = 0 - naw; if (nah < 0) nah = 0 - nah; - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset; if (naw == 0 || nah == 0) { @@ -1535,7 +1535,7 @@ public void drawRoundRectangle(int x, int y, int width, int height, int arcWidth } int naw2 = naw / 2; int nah2 = nah / 2; - int /*long*/ drawable = data.drawable; + long /*int*/ drawable = data.drawable; if (nw > naw) { if (nh > nah) { OS.gdk_draw_arc(drawable, handle, 0, nx, ny, naw, nah, 5760, 5760); @@ -1695,7 +1695,7 @@ public void drawText (String string, int x, int y, int flags) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (string.length() == 0) return; - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) { //TODO - honor flags @@ -1744,13 +1744,13 @@ public void drawText (String string, int x, int y, int flags) { if (!data.xorMode) { OS.gdk_draw_layout_with_colors(data.drawable, handle, x, y, data.layout, null, background); } else { - int /*long*/ layout = data.layout; + long /*int*/ layout = data.layout; if (data.stringWidth == -1) { computeStringSize(); } - int /*long*/ pixmap = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), data.stringWidth, data.stringHeight, -1); + long /*int*/ pixmap = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), data.stringWidth, data.stringHeight, -1); if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ gdkGC = OS.gdk_gc_new(pixmap); + long /*int*/ gdkGC = OS.gdk_gc_new(pixmap); if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES); GdkColor black = new GdkColor(); OS.gdk_gc_set_foreground(gdkGC, black); @@ -1823,7 +1823,7 @@ public void fillArc(int x, int y, int width, int height, int startAngle, int arc height = -height; } if (width == 0 || height == 0 || arcAngle == 0) return; - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { if (width == height) { if (arcAngle >= 0) { @@ -1900,9 +1900,9 @@ public void fillGradientRectangle(int x, int y, int width, int height, boolean v fillRectangle(x, y, width, height); return; } - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { - int /*long*/ pattern; + long /*int*/ pattern; if (vertical) { pattern = Cairo.cairo_pattern_create_linear (0.0, 0.0, 0.0, 1.0); } else { @@ -1952,7 +1952,7 @@ public void fillOval(int x, int y, int width, int height) { y = y + height; height = -height; } - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { if (width == height) { Cairo.cairo_arc_negative(cairo, x + width / 2f, y + height / 2f, width / 2f, 0, 2 * (float)Compatibility.PI); @@ -1998,8 +1998,8 @@ public void fillPath (Path path) { if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); initCairo(); checkGC(FILL); - int /*long*/ cairo = data.cairo; - int /*long*/ copy = Cairo.cairo_copy_path(path.handle); + long /*int*/ cairo = data.cairo; + long /*int*/ copy = Cairo.cairo_copy_path(path.handle); if (copy == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_append_path(cairo, copy); Cairo.cairo_path_destroy(copy); @@ -2029,7 +2029,7 @@ public void fillPolygon(int[] pointArray) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); checkGC(FILL); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { drawPolyline(cairo, pointArray, true); Cairo.cairo_fill(cairo); @@ -2064,7 +2064,7 @@ public void fillRectangle(int x, int y, int width, int height) { y = y + height; height = -height; } - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { Cairo.cairo_rectangle(cairo, x, y, width, height); Cairo.cairo_fill(cairo); @@ -2130,7 +2130,7 @@ public void fillRoundRectangle(int x, int y, int width, int height, int arcWidth } if (naw < 0) naw = 0 - naw; if (nah < 0) nah = 0 - nah; - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { if (naw == 0 || nah == 0) { Cairo.cairo_rectangle(cairo, x, y, width, height); @@ -2155,7 +2155,7 @@ public void fillRoundRectangle(int x, int y, int width, int height, int arcWidth } int naw2 = naw / 2; int nah2 = nah / 2; - int /*long*/ drawable = data.drawable; + long /*int*/ drawable = data.drawable; if (nw > naw) { if (nh > nah) { OS.gdk_draw_arc(drawable, handle, 1, nx, ny, naw, nah, 5760, 5760); @@ -2369,11 +2369,11 @@ public Rectangle getClipping() { width = w[0]; height = h[0]; /* Intersect visible bounds with clipping in device space and then convert then to user space */ - int /*long*/ cairo = data.cairo; - int /*long*/ clipRgn = data.clipRgn; - int /*long*/ damageRgn = data.damageRgn; + long /*int*/ cairo = data.cairo; + long /*int*/ clipRgn = data.clipRgn; + long /*int*/ damageRgn = data.damageRgn; if (clipRgn != 0 || damageRgn != 0 || cairo != 0) { - int /*long*/ rgn = OS.gdk_region_new(); + long /*int*/ rgn = OS.gdk_region_new(); GdkRectangle rect = new GdkRectangle(); rect.width = width; rect.height = height; @@ -2429,10 +2429,10 @@ public void getClipping(Region region) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); - int /*long*/ clipping = region.handle; + long /*int*/ clipping = region.handle; OS.gdk_region_subtract(clipping, clipping); - int /*long*/ cairo = data.cairo; - int /*long*/ clipRgn = data.clipRgn; + long /*int*/ cairo = data.cairo; + long /*int*/ clipRgn = data.clipRgn; if (clipRgn == 0) { GdkRectangle rect = new GdkRectangle(); int[] width = new int[1], height = new int[1]; @@ -2443,7 +2443,7 @@ public void getClipping(Region region) { } else { /* Convert clipping to device space if needed */ if (data.clippingTransform != null) { - int /*long*/ rgn = convertRgn(clipRgn, data.clippingTransform); + long /*int*/ rgn = convertRgn(clipRgn, data.clippingTransform); OS.gdk_region_union(clipping, rgn); OS.gdk_region_destroy(rgn); } else { @@ -2458,7 +2458,7 @@ public void getClipping(Region region) { double[] matrix = new double[6]; Cairo.cairo_get_matrix(cairo, matrix); Cairo.cairo_matrix_invert(matrix); - int /*long*/ rgn = convertRgn(clipping, matrix); + long /*int*/ rgn = convertRgn(clipping, matrix); OS.gdk_region_subtract(clipping, clipping); OS.gdk_region_union(clipping, rgn); OS.gdk_region_destroy(rgn); @@ -2479,7 +2479,7 @@ public void getClipping(Region region) { */ public int getFillRule() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo == 0) return SWT.FILL_EVEN_ODD; return Cairo.cairo_get_fill_rule(cairo) == Cairo.CAIRO_FILL_RULE_WINDING ? SWT.FILL_WINDING : SWT.FILL_EVEN_ODD; } @@ -2515,9 +2515,9 @@ public FontMetrics getFontMetrics() { if (data.context == 0) createLayout(); checkGC(FONT); Font font = data.font; - int /*long*/ context = data.context; - int /*long*/ lang = OS.pango_context_get_language(context); - int /*long*/ metrics = OS.pango_context_get_metrics(context, font.handle, lang); + long /*int*/ context = data.context; + long /*int*/ lang = OS.pango_context_get_language(context); + long /*int*/ metrics = OS.pango_context_get_metrics(context, font.handle, lang); FontMetrics fm = new FontMetrics(); fm.ascent = OS.PANGO_PIXELS(OS.pango_font_metrics_get_ascent(metrics)); fm.descent = OS.PANGO_PIXELS(OS.pango_font_metrics_get_descent(metrics)); @@ -2757,7 +2757,7 @@ void getSize(int[] width, int[] height) { return; } if (OS.USE_CAIRO) { - int /*long*/ surface = Cairo.cairo_get_target(handle); + long /*int*/ surface = Cairo.cairo_get_target(handle); switch (Cairo.cairo_surface_get_type(surface)) { case Cairo.CAIRO_SURFACE_TYPE_IMAGE: width[0] = Cairo.cairo_image_surface_get_width(surface); @@ -2792,13 +2792,13 @@ public int getTextAntialias() { if (data.cairo == 0) return SWT.DEFAULT; int antialias = Cairo.CAIRO_ANTIALIAS_DEFAULT; if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) { - int /*long*/ options = Cairo.cairo_font_options_create(); + long /*int*/ options = Cairo.cairo_font_options_create(); Cairo.cairo_get_font_options(data.cairo, options); antialias = Cairo.cairo_font_options_get_antialias(options); Cairo.cairo_font_options_destroy(options); } else { if (data.context != 0) { - int /*long*/ options = OS.pango_cairo_context_get_font_options(data.context); + long /*int*/ options = OS.pango_cairo_context_get_font_options(data.context); if (options != 0) antialias = Cairo.cairo_font_options_get_antialias(options); } } @@ -2833,7 +2833,7 @@ public void getTransform(Transform transform) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (transform == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { Cairo.cairo_get_matrix(cairo, transform.handle); double[] identity = identity(); @@ -2896,7 +2896,7 @@ double[] identity() { return identity; } -void init(Drawable drawable, GCData data, int /*long*/ gdkGC) { +void init(Drawable drawable, GCData data, long /*int*/ gdkGC) { if (data.foreground != null) data.state &= ~FOREGROUND; if (data.background != null) data.state &= ~(BACKGROUND | BACKGROUND_BG); if (data.font != null) data.state &= ~FONT; @@ -2915,7 +2915,7 @@ void init(Drawable drawable, GCData data, int /*long*/ gdkGC) { this.data = data; handle = gdkGC; if (OS.USE_CAIRO) { - int /*long*/ cairo = data.cairo = handle; + long /*int*/ cairo = data.cairo = handle; Cairo.cairo_set_fill_rule(cairo, Cairo.CAIRO_FILL_RULE_EVEN_ODD); data.state &= ~(BACKGROUND | FOREGROUND | FONT | LINE_WIDTH | LINE_CAP | LINE_JOIN | LINE_STYLE | DRAW_OFFSET); } else if (OS.INIT_CAIRO) { @@ -2924,27 +2924,27 @@ void init(Drawable drawable, GCData data, int /*long*/ gdkGC) { setClipping(data.clipRgn); if ((data.style & SWT.MIRRORED) != 0) { initCairo(); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; Cairo.cairo_set_matrix(cairo, identity()); } } void initCairo() { data.device.checkCairo(); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) return; if (OS.GTK_VERSION < OS.VERSION(2, 17, 0)) { - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); - int /*long*/ xDrawable = 0; + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); + long /*int*/ xDrawable = 0; int translateX = 0, translateY = 0; - int /*long*/ drawable = data.drawable; + long /*int*/ drawable = data.drawable; if (data.image != null) { xDrawable = OS.GDK_PIXMAP_XID(drawable); } else { if (!data.realDrawable) { int[] x = new int[1], y = new int[1]; - int /*long*/ [] real_drawable = new int /*long*/ [1]; + long /*int*/ [] real_drawable = new long /*int*/ [1]; OS.gdk_window_get_internal_paint_info(drawable, real_drawable, x, y); xDrawable = OS.gdk_x11_drawable_get_xid(real_drawable[0]); translateX = -x[0]; @@ -2962,7 +2962,7 @@ void initCairo() { width = w[0]; height = h[0]; } - int /*long*/ surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width, height); + long /*int*/ surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width, height); if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_surface_set_device_offset(surface, translateX, translateY); data.cairo = cairo = Cairo.cairo_create(surface); @@ -3086,7 +3086,7 @@ public void setAdvanced(boolean advanced) { } catch (SWTException e) {} } else { if (!data.disposeCairo) return; - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) Cairo.cairo_destroy(cairo); data.cairo = 0; data.interpolation = SWT.DEFAULT; @@ -3166,7 +3166,7 @@ public void setAntialias(int antialias) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } initCairo(); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; Cairo.cairo_set_antialias(cairo, mode); } @@ -3228,13 +3228,13 @@ public void setBackgroundPattern(Pattern pattern) { data.state &= ~BACKGROUND; } -static void setCairoFont(int /*long*/ cairo, Font font) { +static void setCairoFont(long /*int*/ cairo, Font font) { if (font == null || font.isDisposed()) return; setCairoFont(cairo, font.handle); } -static void setCairoFont(int /*long*/ cairo, int /*long*/ font) { - int /*long*/ family = OS.pango_font_description_get_family(font); +static void setCairoFont(long /*int*/ cairo, long /*int*/ font) { + long /*int*/ family = OS.pango_font_description_get_family(font); int length = OS.strlen(family); byte[] buffer = new byte[length + 1]; OS.memmove(buffer, family, length); @@ -3251,12 +3251,12 @@ static void setCairoFont(int /*long*/ cairo, int /*long*/ font) { Cairo.cairo_set_font_size(cairo, height); } -static void setCairoRegion(int /*long*/ cairo, int /*long*/ rgn) { +static void setCairoRegion(long /*int*/ cairo, long /*int*/ rgn) { if (OS.GTK_VERSION >= OS.VERSION(2, 8, 0)) { OS.gdk_cairo_region(cairo, rgn); } else { int[] nRects = new int[1]; - int /*long*/[] rects = new int /*long*/[1]; + long /*int*/[] rects = new long /*int*/[1]; OS.gdk_region_get_rectangles(rgn, rects, nRects); GdkRectangle rect = new GdkRectangle(); for (int i=0; i<nRects[0]; i++) { @@ -3267,7 +3267,7 @@ static void setCairoRegion(int /*long*/ cairo, int /*long*/ rgn) { } } -static void setCairoPatternColor(int /*long*/ pattern, int offset, Color c, int alpha) { +static void setCairoPatternColor(long /*int*/ pattern, int offset, Color c, int alpha) { GdkColor color = c.handle; double aa = (alpha & 0xFF) / (double)0xFF; double red = ((color.red & 0xFFFF) / (double)0xFFFF); @@ -3276,8 +3276,8 @@ static void setCairoPatternColor(int /*long*/ pattern, int offset, Color c, int Cairo.cairo_pattern_add_color_stop_rgba(pattern, offset, red, green, blue, aa); } -void setCairoClip(int /*long*/ damageRgn, int /*long*/ clipRgn) { - int /*long*/ cairo = data.cairo; +void setCairoClip(long /*int*/ damageRgn, long /*int*/ clipRgn) { + long /*int*/ cairo = data.cairo; if (OS.GTK_VERSION >= OS.VERSION(2,18,0) && data.drawable != 0) { OS.gdk_cairo_reset_clip(cairo, data.drawable); } else { @@ -3299,8 +3299,8 @@ void setCairoClip(int /*long*/ damageRgn, int /*long*/ clipRgn) { } } -void setClipping(int /*long*/ clipRgn) { - int /*long*/ cairo = data.cairo; +void setClipping(long /*int*/ clipRgn) { + long /*int*/ cairo = data.cairo; if (clipRgn == 0) { if (data.clipRgn != 0) { OS.gdk_region_destroy(data.clipRgn); @@ -3310,7 +3310,7 @@ void setClipping(int /*long*/ clipRgn) { data.clippingTransform = null; setCairoClip(data.damageRgn, 0); } else { - int /*long*/ clipping = data.damageRgn != 0 ? data.damageRgn : 0; + long /*int*/ clipping = data.damageRgn != 0 ? data.damageRgn : 0; OS.gdk_gc_set_clip_region(handle, clipping); } } else { @@ -3322,7 +3322,7 @@ void setClipping(int /*long*/ clipRgn) { Cairo.cairo_get_matrix(cairo, data.clippingTransform); setCairoClip(data.damageRgn, clipRgn); } else { - int /*long*/ clipping = clipRgn; + long /*int*/ clipping = clipRgn; if (data.damageRgn != 0) { clipping = OS.gdk_region_new(); OS.gdk_region_union(clipping, clipRgn); @@ -3363,7 +3363,7 @@ public void setClipping(int x, int y, int width, int height) { rect.y = y; rect.width = width; rect.height = height; - int /*long*/ clipRgn = OS.gdk_region_new(); + long /*int*/ clipRgn = OS.gdk_region_new(); OS.gdk_region_union_with_rect(clipRgn, rect); setClipping(clipRgn); OS.gdk_region_destroy(clipRgn); @@ -3401,8 +3401,8 @@ public void setClipping(Path path) { setClipping(0); if (path != null) { initCairo(); - int /*long*/ cairo = data.cairo; - int /*long*/ copy = Cairo.cairo_copy_path(path.handle); + long /*int*/ cairo = data.cairo; + long /*int*/ copy = Cairo.cairo_copy_path(path.handle); if (copy == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_append_path(cairo, copy); Cairo.cairo_path_destroy(copy); @@ -3505,7 +3505,7 @@ public void setFillRule(int rule) { } //TODO - need fill rule in X, GDK has no API initCairo(); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { Cairo.cairo_set_fill_rule(cairo, cairo_mode); } @@ -3896,7 +3896,7 @@ void setString(String string, int flags) { } byte[] buffer; int mnemonic, length = string.length (); - int /*long*/ layout = data.layout; + long /*int*/ layout = data.layout; char[] text = new char[length]; string.getChars(0, length, text, 0); if ((flags & SWT.DRAW_MNEMONIC) != 0 && (mnemonic = fixMnemonic(text)) != -1) { @@ -3909,8 +3909,8 @@ void setString(String string, int flags) { buffer = new byte[buffer1.length + buffer2.length]; System.arraycopy(buffer1, 0, buffer, 0, buffer1.length); System.arraycopy(buffer2, 0, buffer, buffer1.length, buffer2.length); - int /*long*/ attr_list = OS.pango_attr_list_new(); - int /*long*/ attr = OS.pango_attr_underline_new(OS.PANGO_UNDERLINE_LOW); + long /*int*/ attr_list = OS.pango_attr_list_new(); + long /*int*/ attr = OS.pango_attr_underline_new(OS.PANGO_UNDERLINE_LOW); PangoAttribute attribute = new PangoAttribute(); OS.memmove(attribute, attr, PangoAttribute.sizeof); attribute.start_index = buffer1.length; @@ -3972,7 +3972,7 @@ public void setTextAntialias(int antialias) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } initCairo(); - int /*long*/ options = Cairo.cairo_font_options_create(); + long /*int*/ options = Cairo.cairo_font_options_create(); Cairo.cairo_font_options_set_antialias(options, mode); if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) { Cairo.cairo_set_font_options(data.cairo, options); @@ -4014,7 +4014,7 @@ public void setTransform(Transform transform) { if (transform != null && transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (data.cairo == 0 && transform == null) return; initCairo(); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; double[] identity = identity(); if (transform != null) { Cairo.cairo_matrix_multiply(identity, transform.handle, identity); @@ -4046,7 +4046,7 @@ public void setTransform(Transform transform) { */ public void setXORMode(boolean xor) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { if (Cairo.cairo_version() >= Cairo.CAIRO_VERSION_ENCODE(1, 10, 0)) { Cairo.cairo_set_operator(handle, xor ? Cairo.CAIRO_OPERATOR_DIFFERENCE : Cairo.CAIRO_OPERATOR_OVER); @@ -4138,7 +4138,7 @@ public Point textExtent(String string) { public Point textExtent(String string, int flags) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) { //TODO - honor flags diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GCData.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GCData.java index 2259ddccc9..c956db36c8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GCData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GCData.java @@ -34,7 +34,7 @@ public final class GCData { public Font font; public Pattern foregroundPattern; public Pattern backgroundPattern; - public int /*long*/ clipRgn; + public long /*int*/ clipRgn; public float lineWidth; public int lineStyle = SWT.LINE_SOLID; public float[] lineDashes; @@ -46,12 +46,12 @@ public final class GCData { public int alpha = 0xFF; public int interpolation = SWT.DEFAULT; - public int /*long*/ context; - public int /*long*/ layout; - public int /*long*/ damageRgn; + public long /*int*/ context; + public long /*int*/ layout; + public long /*int*/ damageRgn; public Image image; - public int /*long*/ drawable; - public int /*long*/ cairo; + public long /*int*/ drawable; + public long /*int*/ cairo; public double cairoXoffset, cairoYoffset; public boolean disposeCairo; public double[] identity, clippingTransform; 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 4367e36358..bdb9f1d901 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 @@ -96,7 +96,7 @@ public final class Image extends Resource implements Drawable { * * @noreference This field is not intended to be referenced by clients. */ - public int /*long*/ pixmap; + public long /*int*/ pixmap; /** * The handle to the OS mask resource. @@ -110,7 +110,7 @@ public final class Image extends Resource implements Drawable { * * @noreference This field is not intended to be referenced by clients. */ - public int /*long*/ mask; + public long /*int*/ mask; /** * The handle to the OS cairo surface resource. @@ -124,7 +124,7 @@ public final class Image extends Resource implements Drawable { * * @noreference This field is not intended to be referenced by clients. */ - public int /*long*/ surface; + public long /*int*/ surface; /** * specifies the transparent pixel @@ -255,14 +255,14 @@ public Image(Device device, Image srcImage, int flag) { System.arraycopy(srcImage.alphaData, 0, alphaData, 0, alphaData.length); } - int /*long*/ imageSurface = srcImage.surface; + long /*int*/ imageSurface = srcImage.surface; int width = this.width = srcImage.width; int height = this.height = srcImage.height; int format = Cairo.cairo_surface_get_content(imageSurface) == Cairo.CAIRO_CONTENT_COLOR ? Cairo.CAIRO_FORMAT_RGB24 : Cairo.CAIRO_FORMAT_ARGB32; boolean hasAlpha = format == Cairo.CAIRO_FORMAT_ARGB32; surface = Cairo.cairo_image_surface_create(format, width, height); if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ cairo = Cairo.cairo_create(surface); + long /*int*/ cairo = Cairo.cairo_create(surface); if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE); Cairo.cairo_set_source_surface (cairo, imageSurface, 0, 0); @@ -270,7 +270,7 @@ public Image(Device device, Image srcImage, int flag) { Cairo.cairo_destroy(cairo); if (flag != SWT.IMAGE_COPY) { int stride = Cairo.cairo_image_surface_get_stride(surface); - int /*long*/ data = Cairo.cairo_image_surface_get_data(surface); + long /*int*/ data = Cairo.cairo_image_surface_get_data(surface); int oa, or, og, ob; if (OS.BIG_ENDIAN) { oa = 0; or = 1; og = 2; ob = 3; @@ -375,9 +375,9 @@ public Image(Device device, Image srcImage, int flag) { if ((srcImage.type == SWT.ICON && srcImage.mask != 0) || srcImage.transparentPixel != -1) { /* Generate the mask if necessary. */ if (srcImage.transparentPixel != -1) srcImage.createMask(); - int /*long*/ mask = OS.gdk_pixmap_new(0, width, height, 1); + long /*int*/ mask = OS.gdk_pixmap_new(0, width, height, 1); if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ gdkGC = OS.gdk_gc_new(mask); + long /*int*/ gdkGC = OS.gdk_gc_new(mask); if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES); OS.gdk_draw_drawable(mask, gdkGC, srcImage.mask, 0, 0, 0, 0, width, height); OS.g_object_unref(gdkGC); @@ -396,9 +396,9 @@ public Image(Device device, Image srcImage, int flag) { createAlphaMask(width, height); /* Create the new pixmap */ - int /*long*/ pixmap = OS.gdk_pixmap_new (OS.gdk_get_default_root_window(), width, height, -1); + long /*int*/ pixmap = OS.gdk_pixmap_new (OS.gdk_get_default_root_window(), width, height, -1); if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ gdkGC = OS.gdk_gc_new(pixmap); + long /*int*/ gdkGC = OS.gdk_gc_new(pixmap); if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES); this.pixmap = pixmap; @@ -408,12 +408,12 @@ public Image(Device device, Image srcImage, int flag) { } else { /* Retrieve the source pixmap data */ - int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); + long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = OS.gdk_colormap_get_system(); OS.gdk_pixbuf_get_from_drawable(pixbuf, srcImage.pixmap, colormap, 0, 0, 0, 0, width, height); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); /* Apply transformation */ switch (flag) { @@ -675,7 +675,7 @@ void initNative(String filename) { char [] chars = new char [length]; filename.getChars (0, length, chars, 0); byte [] buffer = Converter.wcsToMbcs(null, chars, true); - int /*long*/ pixbuf = OS.gdk_pixbuf_new_from_file(buffer, null); + long /*int*/ pixbuf = OS.gdk_pixbuf_new_from_file(buffer, null); if (pixbuf != 0) { try { createFromPixbuf (SWT.BITMAP, pixbuf); @@ -690,14 +690,14 @@ void createAlphaMask (int width, int height) { if (device.useXRender && (alpha != -1 || alphaData != null)) { mask = OS.gdk_pixmap_new(0, alpha != -1 ? 1 : width, alpha != -1 ? 1 : height, 8); if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ gc = OS.gdk_gc_new(mask); + long /*int*/ gc = OS.gdk_gc_new(mask); if (alpha != -1) { GdkColor color = new GdkColor(); color.pixel = (alpha & 0xFF) << 8 | (alpha & 0xFF); OS.gdk_gc_set_foreground(gc, color); OS.gdk_draw_rectangle(mask, gc, 1, 0, 0, 1, 1); } else { - int /*long*/ imagePtr = OS.gdk_drawable_get_image(mask, 0, 0, width, height); + long /*int*/ imagePtr = OS.gdk_drawable_get_image(mask, 0, 0, width, height); if (imagePtr == 0) SWT.error(SWT.ERROR_NO_HANDLES); GdkImage gdkImage = new GdkImage(); OS.memmove(gdkImage, imagePtr); @@ -717,18 +717,18 @@ void createAlphaMask (int width, int height) { } } -void createFromPixbuf(int type, int /*long*/ pixbuf) { +void createFromPixbuf(int type, long /*int*/ pixbuf) { this.type = type; boolean hasAlpha = OS.gdk_pixbuf_get_has_alpha(pixbuf); if (OS.USE_CAIRO) { int width = this.width = OS.gdk_pixbuf_get_width(pixbuf); int height = this.height = OS.gdk_pixbuf_get_height(pixbuf); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); int format = hasAlpha ? Cairo.CAIRO_FORMAT_ARGB32 : Cairo.CAIRO_FORMAT_RGB24; surface = Cairo.cairo_image_surface_create(format, width, height); if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ data = Cairo.cairo_image_surface_get_data(surface); + long /*int*/ data = Cairo.cairo_image_surface_get_data(surface); int cairoStride = Cairo.cairo_image_surface_get_stride(surface); int oa = 0, or = 0, og = 0, ob = 0; if (OS.BIG_ENDIAN) { @@ -785,7 +785,7 @@ void createFromPixbuf(int type, int /*long*/ pixbuf) { int width = OS.gdk_pixbuf_get_width(pixbuf); int height = OS.gdk_pixbuf_get_height(pixbuf); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); byte[] line = new byte[stride]; alphaData = new byte[width * height]; for (int y = 0; y < height; y++) { @@ -798,7 +798,7 @@ void createFromPixbuf(int type, int /*long*/ pixbuf) { } createAlphaMask(width, height); } - int /*long*/ [] pixmap_return = new int /*long*/ [1]; + long /*int*/ [] pixmap_return = new long /*int*/ [1]; OS.gdk_pixbuf_render_pixmap_and_mask(pixbuf, pixmap_return, null, 0); this.pixmap = pixmap_return[0]; if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES); @@ -813,7 +813,7 @@ void createMask() { int width = this.width; int height = this.height; int stride = Cairo.cairo_image_surface_get_stride(surface); - int /*long*/ surfaceData = Cairo.cairo_image_surface_get_data(surface); + long /*int*/ surfaceData = Cairo.cairo_image_surface_get_data(surface); int oa, or, og, ob, tr, tg, tb; if (OS.BIG_ENDIAN) { oa = 0; or = 1; og = 2; ob = 3; @@ -854,7 +854,7 @@ void createMask() { if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES); } -int /*long*/ createMask(ImageData image, boolean copy) { +long /*int*/ createMask(ImageData image, boolean copy) { ImageData mask = image.getTransparencyMask(); byte[] data = mask.data; byte[] maskData = copy ? new byte[data.length] : data; @@ -882,12 +882,12 @@ void createSurface() { this.width = width; this.height = height; if (mask != 0 || alpha != -1 || alphaData != null) { - int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); + long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = OS.gdk_colormap_get_system(); OS.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); byte[] line = new byte[stride]; int oa, or, og, ob; if (OS.BIG_ENDIAN) { @@ -896,13 +896,13 @@ void createSurface() { oa = 3; or = 2; og = 1; ob = 0; } if (mask != 0 && OS.gdk_drawable_get_depth(mask) == 1) { - int /*long*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); + long /*int*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); if (maskPixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); OS.gdk_pixbuf_get_from_drawable(maskPixbuf, mask, 0, 0, 0, 0, 0, width, height); int maskStride = OS.gdk_pixbuf_get_rowstride(maskPixbuf); - int /*long*/ maskPixels = OS.gdk_pixbuf_get_pixels(maskPixbuf); + long /*int*/ maskPixels = OS.gdk_pixbuf_get_pixels(maskPixbuf); byte[] maskLine = new byte[maskStride]; - int /*long*/ offset = pixels, maskOffset = maskPixels; + long /*int*/ offset = pixels, maskOffset = maskPixels; for (int y=0; y<height; y++) { OS.memmove(line, offset, stride); OS.memmove(maskLine, maskOffset, maskStride); @@ -925,7 +925,7 @@ void createSurface() { } OS.g_object_unref(maskPixbuf); } else if (alpha != -1) { - int /*long*/ offset = pixels; + long /*int*/ offset = pixels; for (int y=0; y<height; y++) { OS.memmove(line, offset, stride); for (int x=0, offset1=0; x<width; x++, offset1 += 4) { @@ -945,7 +945,7 @@ void createSurface() { offset += stride; } } else if (alphaData != null) { - int /*long*/ offset = pixels; + long /*int*/ offset = pixels; for (int y = 0; y < h [0]; y++) { OS.memmove (line, offset, stride); for (int x=0, offset1=0; x<width; x++, offset1 += 4) { @@ -966,7 +966,7 @@ void createSurface() { offset += stride; } } else { - int /*long*/ offset = pixels; + long /*int*/ offset = pixels; for (int y = 0; y < h [0]; y++) { OS.memmove (line, offset, stride); for (int x=0, offset1=0; x<width; x++, offset1 += 4) { @@ -983,14 +983,14 @@ void createSurface() { } } surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, width, height); - int /*long*/ data = Cairo.cairo_image_surface_get_data(surface); + long /*int*/ data = Cairo.cairo_image_surface_get_data(surface); OS.memmove(data, pixels, stride * height); Cairo.cairo_surface_mark_dirty(surface); OS.g_object_unref(pixbuf); } else { - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ xDrawable = OS.GDK_PIXMAP_XID(pixmap); - int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDrawable = OS.GDK_PIXMAP_XID(pixmap); + long /*int*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width, height); } /* Destroy the image mask if the there is a GC created on the image */ @@ -1105,12 +1105,12 @@ public ImageData getImageData() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (OS.USE_CAIRO) { - int /*long*/ surface = ImageList.convertSurface(this); + long /*int*/ surface = ImageList.convertSurface(this); int format = Cairo.cairo_image_surface_get_format(surface); int width = Cairo.cairo_image_surface_get_width(surface); int height = Cairo.cairo_image_surface_get_height(surface); int stride = Cairo.cairo_image_surface_get_stride(surface); - int /*long*/ surfaceData = Cairo.cairo_image_surface_get_data(surface); + long /*int*/ surfaceData = Cairo.cairo_image_surface_get_data(surface); boolean hasAlpha = format == Cairo.CAIRO_FORMAT_ARGB32; int oa, or, og, ob; if (OS.BIG_ENDIAN) { @@ -1162,12 +1162,12 @@ public ImageData getImageData() { 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); + long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = OS.gdk_colormap_get_system(); OS.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); byte[] srcData = new byte[stride * height]; OS.memmove(srcData, pixels, srcData.length); OS.g_object_unref(pixbuf); @@ -1178,7 +1178,7 @@ public ImageData getImageData() { if (transparentPixel == -1 && type == SWT.ICON && mask != 0) { /* Get the icon mask data */ - int /*long*/ gdkImagePtr = OS.gdk_drawable_get_image(mask, 0, 0, width, height); + long /*int*/ gdkImagePtr = OS.gdk_drawable_get_image(mask, 0, 0, width, height); if (gdkImagePtr == 0) SWT.error(SWT.ERROR_NO_HANDLES); GdkImage gdkImage = new GdkImage(); OS.memmove(gdkImage, gdkImagePtr); @@ -1230,7 +1230,7 @@ public ImageData getImageData() { * * @noreference This method is not intended to be referenced by clients. */ -public static Image gtk_new(Device device, int type, int /*long*/ pixmap, int /*long*/ mask) { +public static Image gtk_new(Device device, int type, long /*int*/ pixmap, long /*int*/ mask) { Image image = new Image(device); image.type = type; image.pixmap = pixmap; @@ -1255,7 +1255,7 @@ public static Image gtk_new(Device device, int type, int /*long*/ pixmap, int /* * * @noreference This method is not intended to be referenced by clients. */ -public static Image gtk_new_from_pixbuf(Device device, int type, int /*long*/ pixbuf) { +public static Image gtk_new_from_pixbuf(Device device, int type, long /*int*/ pixbuf) { Image image = new Image(device); image.createFromPixbuf(type, pixbuf); image.type = type; @@ -1291,16 +1291,16 @@ void init(int width, int height) { if (OS.GTK_VERSION >= OS.VERSION(2, 22, 0)) { surface = OS.gdk_window_create_similar_surface(OS.gdk_get_default_root_window(), Cairo.CAIRO_CONTENT_COLOR, width, height); } else { - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ xDrawable = OS.gdk_x11_drawable_get_xid(OS.gdk_get_default_root_window()); - int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); - int /*long*/ rootSurface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, 1, 1); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDrawable = OS.gdk_x11_drawable_get_xid(OS.gdk_get_default_root_window()); + long /*int*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); + long /*int*/ rootSurface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, 1, 1); if (rootSurface == 0) SWT.error(SWT.ERROR_NO_HANDLES); surface = Cairo.cairo_surface_create_similar(rootSurface, Cairo.CAIRO_CONTENT_COLOR, width, height); Cairo.cairo_surface_destroy(rootSurface); } if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ cairo = Cairo.cairo_create(surface); + long /*int*/ cairo = Cairo.cairo_create(surface); if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_set_source_rgb(cairo, 1, 1, 1); Cairo.cairo_rectangle(cairo, 0, 0, width, height); @@ -1317,9 +1317,9 @@ void init(int width, int height) { white.red = (short)0xFFFF; white.green = (short)0xFFFF; white.blue = (short)0xFFFF; - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = OS.gdk_colormap_get_system(); OS.gdk_colormap_alloc_color(colormap, white, true, true); - int /*long*/ gdkGC = OS.gdk_gc_new(pixmap); + long /*int*/ gdkGC = OS.gdk_gc_new(pixmap); OS.gdk_gc_set_foreground(gdkGC, white); OS.gdk_draw_rectangle(pixmap, gdkGC, 1, 0, 0, width, height); OS.g_object_unref(gdkGC); @@ -1340,7 +1340,7 @@ void init(ImageData image) { surface = Cairo.cairo_image_surface_create(format, width, height); if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); int stride = Cairo.cairo_image_surface_get_stride(surface); - int /*long*/ data = Cairo.cairo_image_surface_get_data(surface); + long /*int*/ data = Cairo.cairo_image_surface_get_data(surface); int oa = 0, or = 0, og = 0, ob = 0; int redMask, greenMask, blueMask, destDepth = 32, destOrder; if (OS.BIG_ENDIAN) { @@ -1465,10 +1465,10 @@ void init(ImageData image) { //TODO convert to XLIB surface if opaque for better performance return; } - int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); + long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - int /*long*/ data = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ data = OS.gdk_pixbuf_get_pixels(pixbuf); byte[] buffer = image.data; if (!palette.isDirect || image.depth != 24 || stride != image.bytesPerLine || palette.redMask != 0xFF0000 || palette.greenMask != 0xFF00 || palette.blueMask != 0xFF) { buffer = new byte[stride * height]; @@ -1499,9 +1499,9 @@ void init(ImageData image) { } } OS.memmove(data, buffer, stride * height); - int /*long*/ pixmap = OS.gdk_pixmap_new (OS.gdk_get_default_root_window(), width, height, -1); + long /*int*/ pixmap = OS.gdk_pixmap_new (OS.gdk_get_default_root_window(), width, height, -1); if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ gdkGC = OS.gdk_gc_new(pixmap); + long /*int*/ gdkGC = OS.gdk_gc_new(pixmap); if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES); OS.gdk_pixbuf_render_to_drawable(pixbuf, pixmap, gdkGC, 0, 0, 0, 0, width, height, OS.GDK_RGB_DITHER_NORMAL, 0, 0); OS.g_object_unref(gdkGC); @@ -1522,7 +1522,7 @@ void init(ImageData image) { transparentPixel = rgb.red << 16 | rgb.green << 8 | rgb.blue; } } - int /*long*/ mask = createMask(image, isIcon); + long /*int*/ mask = createMask(image, isIcon); if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES); this.mask = mask; if (isIcon) { @@ -1558,12 +1558,12 @@ void init(ImageData image) { * * @noreference This method is not intended to be referenced by clients. */ -public int /*long*/ internal_new_GC (GCData data) { +public long /*int*/ internal_new_GC (GCData data) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (type != SWT.BITMAP || memGC != null) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } - int /*long*/ gc; + long /*int*/ gc; if (OS.USE_CAIRO) { gc = Cairo.cairo_create(surface); } else { @@ -1603,8 +1603,8 @@ public int /*long*/ internal_new_GC (GCData data) { * * @noreference This method is not intended to be referenced by clients. */ -public void internal_dispose_GC (int /*long*/ hDC, GCData data) { - int /*long*/ gc = hDC; +public void internal_dispose_GC (long /*int*/ hDC, GCData data) { + long /*int*/ gc = hDC; if (OS.USE_CAIRO) { Cairo.cairo_destroy(gc); } else { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java index a2b8995ec7..2c4cae5667 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java @@ -40,7 +40,7 @@ public final class Region extends Resource { * * @noreference This field is not intended to be referenced by clients. */ - public int /*long*/ handle; + public long /*int*/ handle; /** * Constructs a new empty region. @@ -79,7 +79,7 @@ public Region(Device device) { init(); } -Region(Device device, int /*long*/ handle) { +Region(Device device, long /*int*/ handle) { super(device); this.handle = handle; } @@ -109,7 +109,7 @@ public void add (int[] pointArray) { * with enough points for a polygon. */ if (pointArray.length < 6) return; - int /*long*/ polyRgn = OS.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE); + long /*int*/ polyRgn = OS.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE); OS.gdk_region_union(handle, polyRgn); OS.gdk_region_destroy(polyRgn); } @@ -265,7 +265,7 @@ public Rectangle getBounds() { return new Rectangle(gdkRect.x, gdkRect.y, gdkRect.width, gdkRect.height); } -public static Region gtk_new(Device device, int /*long*/ handle) { +public static Region gtk_new(Device device, long /*int*/ handle) { return new Region(device, handle); } @@ -331,7 +331,7 @@ public void intersect(int x, int y, int width, int height) { gdkRect.y = y; gdkRect.width = width; gdkRect.height = height; - int /*long*/ rectRgn = OS.gdk_region_rectangle(gdkRect); + long /*int*/ rectRgn = OS.gdk_region_rectangle(gdkRect); OS.gdk_region_intersect(handle, rectRgn); OS.gdk_region_destroy(rectRgn); } @@ -462,7 +462,7 @@ public void subtract (int[] pointArray) { * with enough points for a polygon. */ if (pointArray.length < 6) return; - int /*long*/ polyRgn = OS.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE); + long /*int*/ polyRgn = OS.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE); OS.gdk_region_subtract(handle, polyRgn); OS.gdk_region_destroy(polyRgn); } @@ -515,7 +515,7 @@ public void subtract(int x, int y, int width, int height) { gdkRect.y = y; gdkRect.width = width; gdkRect.height = height; - int /*long*/ rectRgn = OS.gdk_region_rectangle(gdkRect); + long /*int*/ rectRgn = OS.gdk_region_rectangle(gdkRect); OS.gdk_region_subtract(handle, rectRgn); OS.gdk_region_destroy(rectRgn); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java index 67695a3d5d..c61fadbe30 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java @@ -54,7 +54,7 @@ public final class TextLayout extends Resource { int[] tabs; StyleItem[] styles; int stylesCount; - int /*long*/ layout, context, attrList, selAttrList; + long /*int*/ layout, context, attrList, selAttrList; int[] invalidOffsets; static final char LTR_MARK = '\u200E', RTL_MARK = '\u200F', ZWS = '\u200B', ZWNBS = '\uFEFF'; @@ -110,7 +110,7 @@ void computeRuns () { byte[] buffer = Converter.wcsToMbcs(null, segmentsText, false); OS.pango_layout_set_text (layout, buffer, buffer.length); if (stylesCount == 2 && styles[0].style == null && ascent == -1 && descent == -1 && segments == null) return; - int /*long*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ ptr = OS.pango_layout_get_text(layout); attrList = OS.pango_attr_list_new(); selAttrList = OS.pango_attr_list_new(); PangoAttribute attribute = new PangoAttribute(); @@ -129,12 +129,12 @@ void computeRuns () { int oldPos = 0, lineIndex = 0; PangoLayoutLine line = new PangoLayoutLine(); while (lineIndex < lineCount) { - int /*long*/ linePtr = OS.pango_layout_get_line(layout, lineIndex); + long /*int*/ linePtr = OS.pango_layout_get_line(layout, lineIndex); OS.memmove(line, linePtr, PangoLayoutLine.sizeof); int bytePos = line.start_index; /* Note: The length in bytes of ZWS and ZWNBS are both equals to 3 */ int offset = lineIndex * 6; - int /*long*/ attr = OS.pango_attr_shape_new (rect, rect); + long /*int*/ attr = OS.pango_attr_shape_new (rect, rect); OS.memmove (attribute, attr, PangoAttribute.sizeof); attribute.start_index = bytePos + offset; attribute.end_index = bytePos + offset + 3; @@ -196,7 +196,7 @@ void computeRuns () { byteEnd = Math.min(byteEnd, strlen); Font font = style.font; if (font != null && !font.isDisposed() && !defaultFont.equals(font)) { - int /*long*/ attr = OS.pango_attr_font_desc_new (font.handle); + long /*int*/ attr = OS.pango_attr_font_desc_new (font.handle); OS.memmove (attribute, attr, PangoAttribute.sizeof); attribute.start_index = byteStart; attribute.end_index = byteEnd; @@ -219,7 +219,7 @@ void computeRuns () { break; case SWT.UNDERLINE_LINK: { if (style.foreground == null) { - int /*long*/ attr = OS.pango_attr_foreground_new((short)0, (short)0x3333, (short)0x9999); + long /*int*/ attr = OS.pango_attr_foreground_new((short)0, (short)0x3333, (short)0x9999); OS.memmove (attribute, attr, PangoAttribute.sizeof); attribute.start_index = byteStart; attribute.end_index = byteEnd; @@ -230,7 +230,7 @@ void computeRuns () { break; } } - int /*long*/ attr = OS.pango_attr_underline_new(underlineStyle); + long /*int*/ attr = OS.pango_attr_underline_new(underlineStyle); OS.memmove(attribute, attr, PangoAttribute.sizeof); attribute.start_index = byteStart; attribute.end_index = byteEnd; @@ -251,7 +251,7 @@ void computeRuns () { } } if (style.strikeout) { - int /*long*/ attr = OS.pango_attr_strikethrough_new(true); + long /*int*/ attr = OS.pango_attr_strikethrough_new(true); OS.memmove(attribute, attr, PangoAttribute.sizeof); attribute.start_index = byteStart; attribute.end_index = byteEnd; @@ -274,7 +274,7 @@ void computeRuns () { Color foreground = style.foreground; if (foreground != null && !foreground.isDisposed()) { GdkColor fg = foreground.handle; - int /*long*/ attr = OS.pango_attr_foreground_new(fg.red, fg.green, fg.blue); + long /*int*/ attr = OS.pango_attr_foreground_new(fg.red, fg.green, fg.blue); OS.memmove (attribute, attr, PangoAttribute.sizeof); attribute.start_index = byteStart; attribute.end_index = byteEnd; @@ -284,7 +284,7 @@ void computeRuns () { Color background = style.background; if (background != null && !background.isDisposed()) { GdkColor bg = background.handle; - int /*long*/ attr = OS.pango_attr_background_new(bg.red, bg.green, bg.blue); + long /*int*/ attr = OS.pango_attr_background_new(bg.red, bg.green, bg.blue); OS.memmove (attribute, attr, PangoAttribute.sizeof); attribute.start_index = byteStart; attribute.end_index = byteEnd; @@ -297,7 +297,7 @@ void computeRuns () { rect.y = -(metrics.ascent * OS.PANGO_SCALE); rect.height = (metrics.ascent + metrics.descent) * OS.PANGO_SCALE; rect.width = metrics.width * OS.PANGO_SCALE; - int /*long*/ attr = OS.pango_attr_shape_new (rect, rect); + long /*int*/ attr = OS.pango_attr_shape_new (rect, rect); OS.memmove (attribute, attr, PangoAttribute.sizeof); attribute.start_index = byteStart; attribute.end_index = byteEnd; @@ -307,7 +307,7 @@ void computeRuns () { } int rise = style.rise; if (rise != 0) { - int /*long*/ attr = OS.pango_attr_rise_new (rise * OS.PANGO_SCALE); + long /*int*/ attr = OS.pango_attr_rise_new (rise * OS.PANGO_SCALE); OS.memmove (attribute, attr, PangoAttribute.sizeof); attribute.start_index = byteStart; attribute.end_index = byteEnd; @@ -436,15 +436,15 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo x += Math.min (indent, wrapIndent); boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1; GCData data = gc.data; - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if ((flags & (SWT.FULL_SELECTION | SWT.DELIMITER_SELECTION)) != 0 && (hasSelection || (flags & SWT.LAST_LINE_SELECTION) != 0)) { - int /*long*/[] attrs = new int /*long*/[1]; + long /*int*/[] attrs = new long /*int*/[1]; int[] nAttrs = new int[1]; PangoLogAttr logAttr = new PangoLogAttr(); PangoRectangle rect = new PangoRectangle(); int lineCount = OS.pango_layout_get_line_count(layout); - int /*long*/ ptr = OS.pango_layout_get_text(layout); - int /*long*/ iter = OS.pango_layout_get_iter(layout); + long /*int*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ iter = OS.pango_layout_get_iter(layout); if (selectionBackground == null) selectionBackground = device.getSystemColor(SWT.COLOR_LIST_SELECTION); if (cairo != 0) { Cairo.cairo_save(cairo); @@ -531,7 +531,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo boolean fullSelection = selectionStart == 0 && selectionEnd == length - 1; if (fullSelection) { if (cairo != 0) { - int /*long*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ ptr = OS.pango_layout_get_text(layout); if ((data.style & SWT.MIRRORED) != 0) { Cairo.cairo_save(cairo); Cairo.cairo_scale(cairo, -1, 1); @@ -546,7 +546,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo drawBorder(gc, x, y, selectionForeground.handle); } } else { - int /*long*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ ptr = OS.pango_layout_get_text(layout); int byteSelStart = (int)/*64*/(OS.g_utf16_offset_to_pointer(ptr, selectionStart) - ptr); int byteSelEnd = (int)/*64*/(OS.g_utf16_offset_to_pointer(ptr, selectionEnd + 1) - ptr); int strlen = OS.strlen(ptr); @@ -568,7 +568,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo OS.gdk_draw_layout(data.drawable, gc.handle, x, y, layout); drawBorder(gc, x, y, null); int[] ranges = new int[]{byteSelStart, byteSelEnd}; - int /*long*/ rgn = OS.gdk_pango_layout_get_clip_region(layout, x, y, ranges, ranges.length / 2); + long /*int*/ rgn = OS.gdk_pango_layout_get_clip_region(layout, x, y, ranges, ranges.length / 2); if (rgn != 0) { OS.gdk_gc_set_clip_region(gc.handle, rgn); OS.gdk_region_destroy(rgn); @@ -587,7 +587,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo void drawWithCairo(GC gc, int x, int y, int start, int end, boolean fullSelection, GdkColor fg, GdkColor bg) { GCData data = gc.data; - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; Cairo.cairo_save(cairo); if (!fullSelection) { Cairo.cairo_move_to(cairo, x, y); @@ -595,7 +595,7 @@ void drawWithCairo(GC gc, int x, int y, int start, int end, boolean fullSelectio drawBorder(gc, x, y, null); } int[] ranges = new int[]{start, end}; - int /*long*/ rgn = OS.gdk_pango_layout_get_clip_region(layout, x, y, ranges, ranges.length / 2); + long /*int*/ rgn = OS.gdk_pango_layout_get_clip_region(layout, x, y, ranges, ranges.length / 2); if (rgn != 0) { OS.gdk_cairo_region(cairo, rgn); Cairo.cairo_clip(cairo); @@ -614,9 +614,9 @@ void drawWithCairo(GC gc, int x, int y, int start, int end, boolean fullSelectio void drawBorder(GC gc, int x, int y, GdkColor selectionColor) { GCData data = gc.data; - int /*long*/ cairo = data.cairo; - int /*long*/ gdkGC = gc.handle; - int /*long*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ cairo = data.cairo; + long /*int*/ gdkGC = gc.handle; + long /*int*/ ptr = OS.pango_layout_get_text(layout); GdkGCValues gcValues = null; if (cairo != 0) { Cairo.cairo_save(cairo); @@ -636,10 +636,10 @@ void drawBorder(GC gc, int x, int y, GdkColor selectionColor) { int byteStart = (int)/*64*/(OS.g_utf16_offset_to_pointer(ptr, start) - ptr); int byteEnd = (int)/*64*/(OS.g_utf16_offset_to_pointer(ptr, end + 1) - ptr); int[] ranges = new int[]{byteStart, byteEnd}; - int /*long*/ rgn = OS.gdk_pango_layout_get_clip_region(layout, x, y, ranges, ranges.length / 2); + long /*int*/ rgn = OS.gdk_pango_layout_get_clip_region(layout, x, y, ranges, ranges.length / 2); if (rgn != 0) { int[] nRects = new int[1]; - int /*long*/[] rects = new int /*long*/[1]; + long /*int*/[] rects = new long /*int*/[1]; OS.gdk_region_get_rectangles(rgn, rects, nRects); GdkRectangle rect = new GdkRectangle(); GdkColor color = null; @@ -818,14 +818,14 @@ public Rectangle getBounds(int start, int end) { end = Math.min(Math.max(0, end), length - 1); start = translateOffset(start); end = translateOffset(end); - int /*long*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ ptr = OS.pango_layout_get_text(layout); int byteStart = (int)/*64*/(OS.g_utf16_offset_to_pointer (ptr, start) - ptr); int byteEnd = (int)/*64*/(OS.g_utf16_offset_to_pointer (ptr, end + 1) - ptr); int strlen = OS.strlen(ptr); byteStart = Math.min(byteStart, strlen); byteEnd = Math.min(byteEnd, strlen); int[] ranges = new int[]{byteStart, byteEnd}; - int /*long*/ clipRegion = OS.gdk_pango_layout_get_clip_region(layout, 0, 0, ranges, 1); + long /*int*/ clipRegion = OS.gdk_pango_layout_get_clip_region(layout, 0, 0, ranges, 1); if (clipRegion == 0) return new Rectangle(0, 0, 0, 0); GdkRectangle rect = new GdkRectangle(); @@ -835,9 +835,9 @@ public Rectangle getBounds(int start, int end) { * is to subtract these areas from the clip region. */ PangoRectangle pangoRect = new PangoRectangle(); - int /*long*/ iter = OS.pango_layout_get_iter(layout); + long /*int*/ iter = OS.pango_layout_get_iter(layout); if (iter == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ linesRegion = OS.gdk_region_new(); + long /*int*/ linesRegion = OS.gdk_region_new(); if (linesRegion == 0) SWT.error(SWT.ERROR_NO_HANDLES); int lineEnd = 0; do { @@ -953,17 +953,17 @@ public int getLevel(int offset) { int length = text.length(); if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_RANGE); offset = translateOffset(offset); - int /*long*/ iter = OS.pango_layout_get_iter(layout); + long /*int*/ iter = OS.pango_layout_get_iter(layout); if (iter == 0) SWT.error(SWT.ERROR_NO_HANDLES); int level = 0; PangoItem item = new PangoItem(); PangoLayoutRun run = new PangoLayoutRun(); - int /*long*/ ptr = OS.pango_layout_get_text(layout); - int /*long*/ byteOffset = OS.g_utf16_offset_to_pointer(ptr, offset) - ptr; + long /*int*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ byteOffset = OS.g_utf16_offset_to_pointer(ptr, offset) - ptr; int strlen = OS.strlen(ptr); byteOffset = Math.min(byteOffset, strlen); do { - int /*long*/ runPtr = OS.pango_layout_iter_get_run(iter); + long /*int*/ runPtr = OS.pango_layout_iter_get_run(iter); if (runPtr != 0) { OS.memmove(run, runPtr, PangoLayoutRun.sizeof); OS.memmove(item, run.item, PangoItem.sizeof); @@ -995,7 +995,7 @@ public Rectangle getLineBounds(int lineIndex) { computeRuns(); int lineCount = OS.pango_layout_get_line_count(layout); if (!(0 <= lineIndex && lineIndex < lineCount)) SWT.error(SWT.ERROR_INVALID_RANGE); - int /*long*/ iter = OS.pango_layout_get_iter(layout); + long /*int*/ iter = OS.pango_layout_get_iter(layout); if (iter == 0) SWT.error(SWT.ERROR_NO_HANDLES); for (int i = 0; i < lineIndex; i++) OS.pango_layout_iter_next_line(iter); PangoRectangle rect = new PangoRectangle(); @@ -1052,11 +1052,11 @@ public int getLineIndex(int offset) { if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_ARGUMENT); offset = translateOffset(offset); int line = 0; - int /*long*/ ptr = OS.pango_layout_get_text(layout); - int /*long*/ byteOffset = OS.g_utf16_offset_to_pointer(ptr,offset) - ptr; + long /*int*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ byteOffset = OS.g_utf16_offset_to_pointer(ptr,offset) - ptr; int strlen = OS.strlen(ptr); byteOffset = Math.min(byteOffset, strlen); - int /*long*/ iter = OS.pango_layout_get_iter(layout); + long /*int*/ iter = OS.pango_layout_get_iter(layout); if (iter == 0) SWT.error(SWT.ERROR_NO_HANDLES); while (OS.pango_layout_iter_next_line(iter)) { if (OS.pango_layout_iter_get_index(iter) > byteOffset) break; @@ -1088,9 +1088,9 @@ public FontMetrics getLineMetrics (int lineIndex) { PangoLayoutLine line = new PangoLayoutLine(); OS.memmove(line, OS.pango_layout_get_line(layout, lineIndex), PangoLayoutLine.sizeof); if (line.runs == 0) { - int /*long*/ font = this.font != null ? this.font.handle : device.systemFont.handle; - int /*long*/ lang = OS.pango_context_get_language(context); - int /*long*/ metrics = OS.pango_context_get_metrics(context, font, lang); + long /*int*/ font = this.font != null ? this.font.handle : device.systemFont.handle; + long /*int*/ lang = OS.pango_context_get_language(context); + long /*int*/ metrics = OS.pango_context_get_metrics(context, font, lang); ascent = OS.pango_font_metrics_get_ascent(metrics); descent = OS.pango_font_metrics_get_descent(metrics); OS.pango_font_metrics_unref(metrics); @@ -1121,10 +1121,10 @@ public int[] getLineOffsets() { computeRuns(); int lineCount = OS.pango_layout_get_line_count(layout); int[] offsets = new int [lineCount + 1]; - int /*long*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ ptr = OS.pango_layout_get_text(layout); PangoLayoutLine line = new PangoLayoutLine(); for (int i = 0; i < lineCount; i++) { - int /*long*/ linePtr = OS.pango_layout_get_line(layout, i); + long /*int*/ linePtr = OS.pango_layout_get_line(layout, i); OS.memmove(line, linePtr, PangoLayoutLine.sizeof); int pos = (int)/*64*/OS.g_utf16_pointer_to_offset(ptr, ptr + line.start_index); offsets[i] = untranslateOffset(pos); @@ -1155,7 +1155,7 @@ public Point getLocation(int offset, boolean trailing) { int length = text.length(); if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_RANGE); offset = translateOffset(offset); - int /*long*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ ptr = OS.pango_layout_get_text(layout); int byteOffset = (int)/*64*/(OS.g_utf16_offset_to_pointer(ptr, offset) - ptr); int strlen = OS.strlen(ptr); byteOffset = Math.min(byteOffset, strlen); @@ -1206,12 +1206,12 @@ int _getOffset (int offset, int movement, boolean forward) { } int step = forward ? 1 : -1; if ((movement & SWT.MOVEMENT_CHAR) != 0) return offset + step; - int /*long*/[] attrs = new int /*long*/[1]; + long /*int*/[] attrs = new long /*int*/[1]; int[] nAttrs = new int[1]; OS.pango_layout_get_log_attrs(layout, attrs, nAttrs); if (attrs[0] == 0) return offset + step; - int /*long*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ ptr = OS.pango_layout_get_text(layout); int utf8Offset = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, translateOffset(offset)); int utf8Length = (int)/*64*/OS.g_utf8_strlen(ptr, -1); utf8Offset += step; @@ -1329,7 +1329,7 @@ public int getOffset(int x, int y, int[] trailing) { * visual offset. The fix is to clamp the coordinates inside the * line bounds. */ - int /*long*/ iter = OS.pango_layout_get_iter(layout); + long /*int*/ iter = OS.pango_layout_get_iter(layout); if (iter == 0) SWT.error(SWT.ERROR_NO_HANDLES); PangoRectangle rect = new PangoRectangle(); do { @@ -1349,7 +1349,7 @@ public int getOffset(int x, int y, int[] trailing) { int[] index = new int[1]; int[] piTrailing = new int[1]; OS.pango_layout_xy_to_index(layout, x * OS.PANGO_SCALE, y * OS.PANGO_SCALE, index, piTrailing); - int /*long*/ ptr = OS.pango_layout_get_text(layout); + long /*int*/ ptr = OS.pango_layout_get_text(layout); int offset = (int)/*64*/OS.g_utf16_pointer_to_offset(ptr, ptr + index[0]); if (trailing != null) { trailing[0] = piTrailing[0]; @@ -2049,7 +2049,7 @@ public void setTabs(int[] tabs) { if (tabs == null) { OS.pango_layout_set_tabs(layout, device.emptyTab); } else { - int /*long*/ tabArray = OS.pango_tab_array_new(tabs.length, true); + long /*int*/ tabArray = OS.pango_tab_array_new(tabs.length, true); if (tabArray != 0) { for (int i = 0; i < tabs.length; i++) { OS.pango_tab_array_set_tab(tabArray, i, OS.PANGO_TAB_LEFT, tabs[i]); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/Converter.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/Converter.java index 779baed6f8..717965f98a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/Converter.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/Converter.java @@ -37,8 +37,8 @@ public static String defaultCodePage () { } public static char [] mbcsToWcs (String codePage, byte [] buffer) { - int /*long*/ [] items_written = new int /*long*/ [1]; - int /*long*/ ptr = OS.g_utf8_to_utf16 (buffer, buffer.length, null, items_written, null); + long /*int*/ [] items_written = new long /*int*/ [1]; + long /*int*/ ptr = OS.g_utf8_to_utf16 (buffer, buffer.length, null, items_written, null); if (ptr == 0) return EmptyCharArray; int length = (int)/*64*/items_written [0]; char [] chars = new char [length]; @@ -55,12 +55,12 @@ public static byte [] wcsToMbcs (String codePage, String string, boolean termina } public static byte [] wcsToMbcs (String codePage, char [] buffer, boolean terminate) { - int /*long*/ [] items_read = new int /*long*/ [1], items_written = new int /*long*/ [1]; + long /*int*/ [] items_read = new long /*int*/ [1], items_written = new long /*int*/ [1]; /* * Note that g_utf16_to_utf8() stops converting * when it finds the first NULL. */ - int /*long*/ ptr = OS.g_utf16_to_utf8 (buffer, buffer.length, items_read, items_written, null); + long /*int*/ ptr = OS.g_utf16_to_utf8 (buffer, buffer.length, items_read, items_written, null); if (ptr == 0) return terminate ? NullByteArray : EmptyByteArray; int written = (int)/*64*/items_written [0]; byte [] bytes = new byte [written + (terminate ? 1 : 0)]; 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 0a57b144e1..39d0c33ae9 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 @@ -17,24 +17,24 @@ import org.eclipse.swt.internal.gtk.*; import org.eclipse.swt.graphics.*; public class ImageList { - int /*long*/ [] pixbufs; + long /*int*/ [] pixbufs; int width = -1, height = -1; Image [] images; public ImageList() { images = new Image [4]; - pixbufs = new int /*long*/ [4]; + pixbufs = new long /*int*/ [4]; } -public static int /*long*/ convertSurface(Image image) { - int /*long*/ newSurface = image.surface; +public static long /*int*/ convertSurface(Image image) { + long /*int*/ newSurface = image.surface; int type = Cairo.cairo_surface_get_type(newSurface); if (type != Cairo.CAIRO_SURFACE_TYPE_IMAGE) { Rectangle bounds = image.getBounds(); int format = Cairo.cairo_surface_get_content(newSurface) == Cairo.CAIRO_CONTENT_COLOR ? Cairo.CAIRO_FORMAT_RGB24 : Cairo.CAIRO_FORMAT_ARGB32; newSurface = Cairo.cairo_image_surface_create(format, bounds.width, bounds.height); if (newSurface == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int /*long*/ cairo = Cairo.cairo_create(newSurface); + long /*int*/ cairo = Cairo.cairo_create(newSurface); if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE); Cairo.cairo_set_source_surface (cairo, image.surface, 0, 0); @@ -46,10 +46,10 @@ public static int /*long*/ convertSurface(Image image) { return newSurface; } -public static int /*long*/ createPixbuf(Image image) { - int /*long*/ pixbuf; +public static long /*int*/ createPixbuf(Image image) { + long /*int*/ pixbuf; if (OS.USE_CAIRO) { - int /*long*/ surface = convertSurface(image); + long /*int*/ surface = convertSurface(image); int format = Cairo.cairo_image_surface_get_format(surface); int width = Cairo.cairo_image_surface_get_width(surface); int height = Cairo.cairo_image_surface_get_height(surface); @@ -57,7 +57,7 @@ public static int /*long*/ createPixbuf(Image image) { pixbuf = OS.gdk_pixbuf_new (OS.GDK_COLORSPACE_RGB, hasAlpha, 8, width, height); if (pixbuf == 0) SWT.error (SWT.ERROR_NO_HANDLES); int stride = OS.gdk_pixbuf_get_rowstride (pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels (pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels (pixbuf); int oa, or, og, ob; if (OS.BIG_ENDIAN) { oa = 0; or = 1; og = 2; ob = 3; @@ -65,7 +65,7 @@ public static int /*long*/ createPixbuf(Image image) { oa = 3; or = 2; og = 1; ob = 0; } byte[] line = new byte[stride]; - int /*long*/ surfaceData = Cairo.cairo_image_surface_get_data(surface); + long /*int*/ surfaceData = Cairo.cairo_image_surface_get_data(surface); if (hasAlpha) { for (int y = 0; y < height; y++) { OS.memmove (line, surfaceData + (y * stride), stride); @@ -107,25 +107,25 @@ public static int /*long*/ createPixbuf(Image image) { } else { OS.gdk_drawable_get_size (image.pixmap, w, h); } - int /*long*/ colormap = OS.gdk_colormap_get_system (); + long /*int*/ colormap = OS.gdk_colormap_get_system (); boolean hasMask = image.mask != 0 && OS.gdk_drawable_get_depth (image.mask) == 1; if (hasMask) { pixbuf = OS.gdk_pixbuf_new (OS.GDK_COLORSPACE_RGB, true, 8, w [0], h [0]); if (pixbuf == 0) SWT.error (SWT.ERROR_NO_HANDLES); OS.gdk_pixbuf_get_from_drawable (pixbuf, image.pixmap, colormap, 0, 0, 0, 0, w [0], h [0]); - int /*long*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, w [0], h [0]); + long /*int*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, w [0], h [0]); if (maskPixbuf == 0) SWT.error (SWT.ERROR_NO_HANDLES); OS.gdk_pixbuf_get_from_drawable(maskPixbuf, image.mask, 0, 0, 0, 0, 0, w [0], h [0]); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); byte[] line = new byte[stride]; int maskStride = OS.gdk_pixbuf_get_rowstride(maskPixbuf); - int /*long*/ maskPixels = OS.gdk_pixbuf_get_pixels(maskPixbuf); + long /*int*/ maskPixels = OS.gdk_pixbuf_get_pixels(maskPixbuf); byte[] maskLine = new byte[maskStride]; for (int y=0; y<h[0]; y++) { - int /*long*/ offset = pixels + (y * stride); + long /*int*/ offset = pixels + (y * stride); OS.memmove(line, offset, stride); - int /*long*/ maskOffset = maskPixels + (y * maskStride); + long /*int*/ maskOffset = maskPixels + (y * maskStride); OS.memmove(maskLine, maskOffset, maskStride); for (int x=0; x<w[0]; x++) { if (maskLine[x * 3] == 0) { @@ -144,10 +144,10 @@ public static int /*long*/ createPixbuf(Image image) { if (hasAlpha) { byte [] alpha = data.alphaData; int stride = OS.gdk_pixbuf_get_rowstride (pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels (pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels (pixbuf); byte [] line = new byte [stride]; for (int y = 0; y < h [0]; y++) { - int /*long*/ offset = pixels + (y * stride); + long /*int*/ offset = pixels + (y * stride); OS.memmove (line, offset, stride); for (int x = 0; x < w [0]; x++) { line [x*4+3] = alpha [y*w [0]+x]; @@ -177,7 +177,7 @@ public int add (Image image) { Image [] newImages = new Image [images.length + 4]; System.arraycopy (images, 0, newImages, 0, images.length); images = newImages; - int /*long*/ [] newPixbufs = new int /*long*/ [pixbufs.length + 4]; + long /*int*/ [] newPixbufs = new long /*int*/ [pixbufs.length + 4]; System.arraycopy (pixbufs, 0, newPixbufs, 0, pixbufs.length); pixbufs = newPixbufs; } @@ -198,7 +198,7 @@ public Image get (int index) { return images [index]; } -public int /*long*/ getPixbuf (int index) { +public long /*int*/ getPixbuf (int index) { return pixbufs [index]; } @@ -210,7 +210,7 @@ public int indexOf (Image image) { return -1; } -public int indexOf (int /*long*/ pixbuf) { +public int indexOf (long /*int*/ pixbuf) { if (pixbuf == 0) return -1; for (int index=0; index<images.length; index++) { if (pixbuf == pixbufs [index]) return index; @@ -246,7 +246,7 @@ public void remove (Image image) { } void set (int index, Image image) { - int /*long*/ pixbuf = createPixbuf (image); + long /*int*/ pixbuf = createPixbuf (image); int w = OS.gdk_pixbuf_get_width(pixbuf); int h = OS.gdk_pixbuf_get_height(pixbuf); if (width == -1 || height == -1) { @@ -254,11 +254,11 @@ void set (int index, Image image) { height = h; } if (w != width || h != height) { - int /*long*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, width, height, OS.GDK_INTERP_BILINEAR); + long /*int*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, width, height, OS.GDK_INTERP_BILINEAR); OS.g_object_unref (pixbuf); pixbuf = scaledPixbuf; } - int /*long*/ oldPixbuf = pixbufs [index]; + long /*int*/ oldPixbuf = pixbufs [index]; if (oldPixbuf != 0) { if (images [index] == image) { OS.gdk_pixbuf_copy_area (pixbuf, 0, 0, width, height, oldPixbuf, 0, 0); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java index 6d1ba92794..7591b74907 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java @@ -45,7 +45,7 @@ import org.eclipse.swt.events.*; * @noextend This class is not intended to be subclassed by clients. */ public class Button extends Control { - int /*long*/ boxHandle, labelHandle, imageHandle, arrowHandle, groupHandle; + long /*int*/ boxHandle, labelHandle, imageHandle, arrowHandle, groupHandle; boolean selected, grayed; ImageList imageList; Image image; @@ -111,9 +111,9 @@ static int checkStyle (int style) { return style; } -static GtkBorder getBorder (byte[] border, int /*long*/ handle, int defaultBorder) { +static GtkBorder getBorder (byte[] border, long /*int*/ handle, int defaultBorder) { GtkBorder gtkBorder = new GtkBorder(); - int /*long*/ [] borderPtr = new int /*long*/ [1]; + long /*int*/ [] borderPtr = new long /*int*/ [1]; OS.gtk_widget_style_get (handle, border, borderPtr,0); if (borderPtr[0] != 0) { OS.memmove (gtkBorder, borderPtr[0], GtkBorder.sizeof); @@ -201,7 +201,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { indicatorHeight = indicatorSize [0] + 2 * indicatorSpacing [0]; trimWidth += indicatorHeight + indicatorSpacing [0]; } else { - int /*long*/ style = OS.gtk_widget_get_style (handle); + long /*int*/ style = OS.gtk_widget_get_style (handle); trimWidth += OS.gtk_style_get_xthickness (style) * 2; trimHeight += OS.gtk_style_get_ythickness (style) * 2; GtkBorder innerBorder = getBorder (OS.inner_border, handle, INNER_BORDER); @@ -223,7 +223,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { OS.g_object_get (boxHandle, OS.spacing, spacing, 0); imageWidth += spacing [0]; } - int /*long*/ labelLayout = OS.gtk_label_get_layout (labelHandle); + long /*int*/ labelLayout = OS.gtk_label_get_layout (labelHandle); int pangoWidth = OS.pango_layout_get_width (labelLayout); if (wHint != SWT.DEFAULT) { OS.pango_layout_set_width (labelLayout, Math.max (1, (wHint - imageWidth - trimWidth)) * OS.PANGO_SCALE); @@ -343,7 +343,7 @@ void deregister () { if (arrowHandle != 0) display.removeWidget (arrowHandle); } -int /*long*/ fontHandle () { +long /*int*/ fontHandle () { if (labelHandle != 0) return labelHandle; return super.fontHandle (); } @@ -459,14 +459,14 @@ public String getText () { return text; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_button_press_event (widget, event); +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_button_press_event (widget, event); if (result != 0) return result; if ((style & SWT.RADIO) != 0) selected = getSelection (); return result; } -int /*long*/ gtk_clicked (int /*long*/ widget) { +long /*int*/ gtk_clicked (long /*int*/ widget) { if ((style & SWT.RADIO) != 0) { if ((parent.getStyle () & SWT.NO_RADIO_GROUP) != 0) { setSelection (!selected); @@ -488,8 +488,8 @@ int /*long*/ gtk_clicked (int /*long*/ widget) { return 0; } -int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_focus_in_event (widget, event); +long /*int*/ gtk_focus_in_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_focus_in_event (widget, event); // widget could be disposed at this point if (handle == 0) return 0; if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { @@ -506,8 +506,8 @@ int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_focus_out_event (widget, event); +long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_focus_out_event (widget, event); // widget could be disposed at this point if (handle == 0) return 0; if ((style & SWT.PUSH) != 0) { @@ -519,8 +519,8 @@ int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_key_press_event (widget, event); +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_key_press_event (widget, event); if (result != 0) return result; if ((style & SWT.RADIO) != 0) selected = getSelection (); return result; @@ -756,7 +756,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize gtk_widget_get_allocation (boxHandle, allocation); int boxWidth = allocation.width; int boxHeight = allocation.height; - int /*long*/ labelLayout = OS.gtk_label_get_layout (labelHandle); + long /*int*/ labelLayout = OS.gtk_label_get_layout (labelHandle); int pangoWidth = OS.pango_layout_get_width (labelLayout); OS.pango_layout_set_width (labelLayout, -1); int [] w = new int [1], h = new int [1]; @@ -785,7 +785,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize return result; } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); if (labelHandle != 0) OS.gtk_widget_modify_font (labelHandle, font); if (imageHandle != 0) OS.gtk_widget_modify_font (imageHandle, font); @@ -860,7 +860,7 @@ public void setImage (Image image) { if (image.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); imageList = new ImageList (); int imageIndex = imageList.add (image); - int /*long*/ pixbuf = imageList.getPixbuf (imageIndex); + long /*int*/ pixbuf = imageList.getPixbuf (imageIndex); OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf); if (text.length () == 0) OS.gtk_widget_hide (labelHandle); OS.gtk_widget_show (imageHandle); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java index 9ebbe8e7e9..f45d8438fd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java @@ -144,46 +144,46 @@ public IME getIME () { return ime; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { if (ime != null) { - int /*long*/ result = ime.gtk_button_press_event (widget, event); + long /*int*/ result = ime.gtk_button_press_event (widget, event); if (result != 0) return result; } return super.gtk_button_press_event (widget, event); } -int /*long*/ gtk_commit (int /*long*/ imcontext, int /*long*/ text) { +long /*int*/ gtk_commit (long /*int*/ imcontext, long /*int*/ text) { if (ime != null) { - int /*long*/ result = ime.gtk_commit (imcontext, text); + long /*int*/ result = ime.gtk_commit (imcontext, text); if (result != 0) return result; } return super.gtk_commit (imcontext, text); } -int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ event) { if ((state & OBSCURED) != 0) return 0; boolean isFocus = caret != null && caret.isFocusCaret (); if (isFocus) caret.killFocus (); - int /*long*/ result = super.gtk_expose_event (widget, event); + long /*int*/ result = super.gtk_expose_event (widget, event); if (isFocus) caret.setFocus (); return result; } -int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_focus_in_event (widget, event); +long /*int*/ gtk_focus_in_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_focus_in_event (widget, event); if (caret != null) caret.setFocus (); return result; } -int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_focus_out_event (widget, event); +long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_focus_out_event (widget, event); if (caret != null) caret.killFocus (); return result; } -int /*long*/ gtk_preedit_changed (int /*long*/ imcontext) { +long /*int*/ gtk_preedit_changed (long /*int*/ imcontext) { if (ime != null) { - int /*long*/ result = ime.gtk_preedit_changed (imcontext); + long /*int*/ result = ime.gtk_preedit_changed (imcontext); if (result != 0) return result; } return super.gtk_preedit_changed (imcontext); @@ -249,16 +249,16 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b if (!isVisible ()) return; boolean isFocus = caret != null && caret.isFocusCaret (); if (isFocus) caret.killFocus (); - int /*long*/ window = paintWindow (); - int /*long*/ visibleRegion = OS.gdk_drawable_get_visible_region (window); + long /*int*/ window = paintWindow (); + long /*int*/ visibleRegion = OS.gdk_drawable_get_visible_region (window); GdkRectangle srcRect = new GdkRectangle (); srcRect.x = x; srcRect.y = y; srcRect.width = width; srcRect.height = height; - int /*long*/ copyRegion = OS.gdk_region_rectangle (srcRect); + long /*int*/ copyRegion = OS.gdk_region_rectangle (srcRect); OS.gdk_region_intersect(copyRegion, visibleRegion); - int /*long*/ invalidateRegion = OS.gdk_region_rectangle (srcRect); + long /*int*/ invalidateRegion = OS.gdk_region_rectangle (srcRect); OS.gdk_region_subtract (invalidateRegion, visibleRegion); OS.gdk_region_offset (invalidateRegion, deltaX, deltaY); GdkRectangle copyRect = new GdkRectangle(); @@ -276,7 +276,7 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b // gc.copyArea (x, y, width, height, destX, destY); // gc.dispose (); //TODO: Use Cairo - int /*long*/ gdkGC = OS.gdk_gc_new (window); + long /*int*/ gdkGC = OS.gdk_gc_new (window); OS.gdk_gc_set_exposures (gdkGC, true); OS.gdk_draw_drawable (window, gdkGC, window, copyRect.x, copyRect.y, copyRect.x + deltaX, copyRect.y + deltaY, copyRect.width, copyRect.height); OS.g_object_unref (gdkGC); @@ -398,7 +398,7 @@ public void setIME (IME ime) { } void updateCaret () { - int /*long*/ imHandle = imHandle (); + long /*int*/ imHandle = imHandle (); if (imHandle == 0) return; GdkRectangle rect = new GdkRectangle (); rect.x = caret.x; 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 8292ab796d..16f95662b2 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 @@ -97,14 +97,14 @@ void createWidget (int index) { boolean drawCaret () { if (parent == null) return false; if (parent.isDisposed ()) return false; - int /*long*/ window = parent.paintWindow (); + long /*int*/ window = parent.paintWindow (); if (OS.USE_CAIRO) { - int /*long*/ cairo = OS.gdk_cairo_create(window); + long /*int*/ cairo = OS.gdk_cairo_create(window); if (cairo == 0) error(SWT.ERROR_NO_HANDLES); Cairo.cairo_set_source_rgb(cairo, 1, 1, 1); Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_DIFFERENCE); if (image != null && !image.isDisposed() && image.mask == 0) { - int /*long*/ surface = Cairo.cairo_get_target(cairo); + long /*int*/ surface = Cairo.cairo_get_target(cairo); int nWidth = 0; switch (Cairo.cairo_surface_get_type(surface)) { case Cairo.CAIRO_SURFACE_TYPE_IMAGE: @@ -130,12 +130,12 @@ boolean drawCaret () { Cairo.cairo_destroy(cairo); return true; } - int /*long*/ gc = OS.gdk_gc_new (window); + long /*int*/ gc = OS.gdk_gc_new (window); GdkColor color = new GdkColor (); color.red = (short) 0xffff; color.green = (short) 0xffff; color.blue = (short) 0xffff; - int /*long*/ colormap = OS.gdk_colormap_get_system (); + long /*int*/ colormap = OS.gdk_colormap_get_system (); OS.gdk_colormap_alloc_color (colormap, color, true, true); OS.gdk_gc_set_foreground (gc, color); OS.gdk_gc_set_function (gc, OS.GDK_XOR); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java index aab32855cd..dea297df44 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java @@ -126,19 +126,19 @@ public RGB[] getRGBs() { */ public RGB open () { byte [] buffer = Converter.wcsToMbcs (null, title, true); - int /*long*/ handle = OS.gtk_color_selection_dialog_new (buffer); + long /*int*/ handle = OS.gtk_color_selection_dialog_new (buffer); Display display = parent != null ? parent.getDisplay (): Display.getCurrent (); if (parent != null) { - int /*long*/ shellHandle = parent.topHandle (); + long /*int*/ shellHandle = parent.topHandle (); OS.gtk_window_set_transient_for (handle, shellHandle); - int /*long*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle); + long /*int*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle); if (pixbufs != 0) { OS.gtk_window_set_icon_list (handle, pixbufs); OS.g_list_free (pixbufs); } } if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { - int /*long*/ group = OS.gtk_window_get_group(0); + long /*int*/ group = OS.gtk_window_get_group(0); OS.gtk_window_group_add_window (group, handle); } OS.gtk_window_set_modal (handle, true); @@ -153,7 +153,7 @@ public RGB open () { } OS.gtk_color_selection_set_has_palette (dialog.colorsel, true); if (rgbs != null) { - int /*long*/ colors = OS.g_malloc(GdkColor.sizeof * rgbs.length); + long /*int*/ colors = OS.g_malloc(GdkColor.sizeof * rgbs.length); for (int i=0; i<rgbs.length; i++) { RGB rgb = rgbs[i]; if (rgb != null) { @@ -163,14 +163,14 @@ public RGB open () { OS.memmove (colors + i * GdkColor.sizeof, color, GdkColor.sizeof); } } - int /*long*/ strPtr = OS.gtk_color_selection_palette_to_string(colors, rgbs.length); + long /*int*/ strPtr = OS.gtk_color_selection_palette_to_string(colors, rgbs.length); int length = OS.strlen (strPtr); buffer = new byte [length]; OS.memmove (buffer, strPtr, length); String paletteString = new String (Converter.mbcsToWcs (null, buffer)); buffer = Converter.wcsToMbcs (null, paletteString, true); OS.g_free (colors); - int /*long*/ settings = OS.gtk_settings_get_default (); + long /*int*/ settings = OS.gtk_settings_get_default (); if (settings != 0) { OS.gtk_settings_set_string_property(settings, OS.gtk_color_palette, buffer, Converter.wcsToMbcs (null, "gtk_color_selection_palette_to_string", true)); } @@ -182,7 +182,7 @@ public RGB open () { display.setModalDialog (this); } int signalId = 0; - int /*long*/ hookId = 0; + long /*int*/ hookId = 0; if ((style & SWT.RIGHT_TO_LEFT) != 0) { signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET()); hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0); @@ -209,9 +209,9 @@ public RGB open () { int blue = (color.blue >> 8) & 0xFF; rgb = new RGB (red, green, blue); } - int /*long*/ settings = OS.gtk_settings_get_default (); + long /*int*/ settings = OS.gtk_settings_get_default (); if (settings != 0) { - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; OS.g_object_get (settings, OS.gtk_color_palette, ptr, 0); if (ptr [0] != 0) { int length = OS.strlen (ptr [0]); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java index a0fcb98f99..d135c476a0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java @@ -57,9 +57,9 @@ import org.eclipse.swt.events.*; * @noextend This class is not intended to be subclassed by clients. */ public class Combo extends Composite { - int /*long*/ buttonHandle, entryHandle, textRenderer, cellHandle, popupHandle, menuHandle; + long /*int*/ buttonHandle, entryHandle, textRenderer, cellHandle, popupHandle, menuHandle; int lastEventTime, visibleCount = 10; - int /*long*/ gdkEventKey = 0; + long /*int*/ gdkEventKey = 0; int fixStart = -1, fixEnd = -1; String [] items = new String [0]; boolean selectionAdded; @@ -323,9 +323,9 @@ void clearText () { if ((style & SWT.READ_ONLY) != 0) { int index = OS.gtk_combo_box_get_active (handle); if (index != -1) { - int /*long*/ modelHandle = OS.gtk_combo_box_get_model (handle); - int /*long*/ [] ptr = new int /*long*/ [1]; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ modelHandle = OS.gtk_combo_box_get_model (handle); + long /*int*/ [] ptr = new long /*int*/ [1]; + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); OS.gtk_tree_model_get (modelHandle, iter, 0, ptr, -1); OS.g_free (iter); @@ -348,10 +348,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) { if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; int[] w = new int [1], h = new int [1]; OS.gtk_widget_realize (entryHandle); - int /*long*/ layout = OS.gtk_entry_get_layout (entryHandle); + long /*int*/ layout = OS.gtk_entry_get_layout (entryHandle); OS.pango_layout_get_size (layout, w, h); int xborder = Display.INNER_BORDER, yborder = Display.INNER_BORDER; - int /*long*/ style = OS.gtk_widget_get_style (entryHandle); + long /*int*/ style = OS.gtk_widget_get_style (entryHandle); xborder += OS.gtk_style_get_xthickness (style); yborder += OS.gtk_style_get_ythickness (style); int [] property = new int [1]; @@ -366,7 +366,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { GtkRequisition arrowRequesition = new GtkRequisition (); OS.gtk_widget_size_request (buttonHandle, arrowRequesition); GtkRequisition listRequesition = new GtkRequisition (); - int /*long*/ listParent = OS.gtk_bin_get_child(popupHandle); + long /*int*/ listParent = OS.gtk_bin_get_child(popupHandle); OS.gtk_widget_size_request (listParent, listRequesition); width = Math.max (listRequesition.width, width) + arrowRequesition.width; width = wHint == SWT.DEFAULT ? width : wHint; @@ -397,7 +397,7 @@ void createHandle (int index) { fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); gtk_widget_set_has_window (fixedHandle, true); - int /*long*/ oldList = OS.gtk_window_list_toplevels (); + long /*int*/ oldList = OS.gtk_window_list_toplevels (); if ((style & SWT.READ_ONLY) != 0) { handle = OS.gtk_combo_box_new_text (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); @@ -481,15 +481,15 @@ void deregister () { if (entryHandle != 0) display.removeWidget (entryHandle); if (popupHandle != 0) display.removeWidget (popupHandle); if (menuHandle != 0) display.removeWidget (menuHandle); - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) display.removeWidget (imContext); } -boolean filterKey (int keyval, int /*long*/ event) { +boolean filterKey (int keyval, long /*int*/ event) { int time = OS.gdk_event_get_time (event); if (time != lastEventTime) { lastEventTime = time; - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { return OS.gtk_im_context_filter_keypress (imContext, event); } @@ -498,18 +498,18 @@ boolean filterKey (int keyval, int /*long*/ event) { return false; } -int /*long*/ findPopupHandle (int /*long*/ oldList) { - int /*long*/ result = 0; - int /*long*/ currentList = OS.gtk_window_list_toplevels(); - int /*long*/ oldFromList = oldList; - int /*long*/ newFromList = OS.g_list_last(currentList); +long /*int*/ findPopupHandle (long /*int*/ oldList) { + long /*int*/ result = 0; + long /*int*/ currentList = OS.gtk_window_list_toplevels(); + long /*int*/ oldFromList = oldList; + long /*int*/ newFromList = OS.g_list_last(currentList); boolean isFound; while (newFromList != 0) { - int /*long*/ newToplevel = OS.g_list_data(newFromList); + long /*int*/ newToplevel = OS.g_list_data(newFromList); isFound = false; oldFromList = oldList; while (oldFromList != 0) { - int /*long*/ oldToplevel = OS.g_list_data(oldFromList); + long /*int*/ oldToplevel = OS.g_list_data(oldFromList); if (newToplevel == oldToplevel) { isFound = true; break; @@ -527,7 +527,7 @@ int /*long*/ findPopupHandle (int /*long*/ oldList) { return result; } -int /*long*/ findButtonHandle() { +long /*int*/ findButtonHandle() { /* * Feature in GTK. There is no API to query the button * handle from a combo box although it is possible to get the @@ -535,12 +535,12 @@ int /*long*/ findButtonHandle() { * fix is to walk the combo tree and find the first child that is * an instance of button. */ - int /*long*/ result = 0; + long /*int*/ result = 0; OS.gtk_container_forall (handle, display.allChildrenProc, 0); if (display.allChildren != 0) { - int /*long*/ list = display.allChildren; + long /*int*/ list = display.allChildren; while (list != 0) { - int /*long*/ widget = OS.g_list_data (list); + long /*int*/ widget = OS.g_list_data (list); if (OS.GTK_IS_BUTTON (widget)) { result = widget; break; @@ -552,14 +552,14 @@ int /*long*/ findButtonHandle() { return result; } -int /*long*/ findMenuHandle() { +long /*int*/ findMenuHandle() { if (popupHandle == 0) return 0; - int /*long*/ result = 0; + long /*int*/ result = 0; OS.gtk_container_forall (popupHandle, display.allChildrenProc, 0); if (display.allChildren != 0) { - int /*long*/ list = display.allChildren; + long /*int*/ list = display.allChildren; while (list != 0) { - int /*long*/ widget = OS.g_list_data (list); + long /*int*/ widget = OS.g_list_data (list); if (OS.G_OBJECT_TYPE (widget) == OS.GTK_TYPE_MENU ()) { result = widget; break; @@ -572,7 +572,7 @@ int /*long*/ findMenuHandle() { return result; } -void fixModal (int /*long*/ group, int /*long*/ modalGroup) { +void fixModal (long /*int*/ group, long /*int*/ modalGroup) { if (popupHandle != 0) { if (group != 0) { OS.gtk_window_group_add_window (group, popupHandle); @@ -594,7 +594,7 @@ void fixIM () { * filter has to be called by SWT. */ if (gdkEventKey != 0 && gdkEventKey != -1) { - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { OS.gtk_im_context_filter_keypress (imContext, gdkEventKey); gdkEventKey = -1; @@ -604,12 +604,12 @@ void fixIM () { gdkEventKey = 0; } -int /*long*/ fontHandle () { +long /*int*/ fontHandle () { if (entryHandle != 0) return entryHandle; return super.fontHandle (); } -int /*long*/ focusHandle () { +long /*int*/ focusHandle () { if (entryHandle != 0) return entryHandle; return super.focusHandle (); } @@ -632,9 +632,9 @@ void hookEvents () { OS.g_signal_connect_closure (entryHandle, OS.populate_popup, display.closures [POPULATE_POPUP], false); } - hookEvents(new int /*long*/ [] {buttonHandle, entryHandle, menuHandle}); + hookEvents(new long /*int*/ [] {buttonHandle, entryHandle, menuHandle}); - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { OS.g_signal_connect_closure (imContext, OS.commit, display.closures [COMMIT], false); int id = OS.g_signal_lookup (OS.commit, OS.gtk_im_context_get_type ()); @@ -643,10 +643,10 @@ void hookEvents () { } } -void hookEvents(int /*long*/ [] handles) { +void hookEvents(long /*int*/ [] handles) { int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK; for (int i=0; i<handles.length; i++) { - int /*long*/ eventHandle = handles [i]; + long /*int*/ eventHandle = handles [i]; if (eventHandle != 0) { /* Connect the mouse signals */ OS.gtk_widget_add_events (eventHandle, eventMask); @@ -675,7 +675,7 @@ void hookEvents(int /*long*/ [] handles) { } } -int /*long*/ imContext () { +long /*int*/ imContext () { return entryHandle != 0 ? OS.GTK_ENTRY_IM_CONTEXT (entryHandle) : 0; } @@ -722,9 +722,9 @@ boolean dragDetect(int x, int y, boolean filter, boolean dragOnTimeout, boolean[ if (filter && entryHandle != 0) { int [] index = new int [1]; int [] trailing = new int [1]; - int /*long*/ layout = OS.gtk_entry_get_layout (entryHandle); + long /*int*/ layout = OS.gtk_entry_get_layout (entryHandle); OS.pango_layout_xy_to_index (layout, x * OS.PANGO_SCALE, y * OS.PANGO_SCALE, index, trailing); - int /*long*/ ptr = OS.pango_layout_get_text (layout); + long /*int*/ ptr = OS.pango_layout_get_text (layout); int position = (int)/*64*/OS.g_utf8_pointer_to_offset (ptr, ptr + index[0]) + trailing[0]; int [] start = new int [1]; int [] end = new int [1]; @@ -740,11 +740,11 @@ boolean dragDetect(int x, int y, boolean filter, boolean dragOnTimeout, boolean[ return super.dragDetect (x, y, filter, dragOnTimeout, consume); } -int /*long*/ enterExitHandle () { +long /*int*/ enterExitHandle () { return fixedHandle; } -int /*long*/ eventWindow () { +long /*int*/ eventWindow () { return paintWindow (); } @@ -776,7 +776,7 @@ public Point getCaretLocation () { } int [] offset_x = new int [1], offset_y = new int [1]; OS.gtk_entry_get_layout_offsets (entryHandle, offset_x, offset_y); - int /*long*/ layout = OS.gtk_entry_get_layout (entryHandle); + long /*int*/ layout = OS.gtk_entry_get_layout (entryHandle); PangoRectangle pos = new PangoRectangle (); OS.pango_layout_index_to_pos (layout, index, pos); int x = offset_x [0] + OS.PANGO_PIXELS (pos.x) - getBorderWidth (); @@ -804,7 +804,7 @@ public int getCaretPosition () { if ((style & SWT.READ_ONLY) != 0) { return 0; } - int /*long*/ ptr = OS.gtk_entry_get_text (entryHandle); + long /*int*/ ptr = OS.gtk_entry_get_text (entryHandle); return (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, OS.gtk_editable_get_position (entryHandle)); } @@ -965,7 +965,7 @@ public Point getSelection () { int [] end = new int [1]; if (entryHandle != 0) { OS.gtk_editable_get_selection_bounds (entryHandle, start, end); - int /*long*/ ptr = OS.gtk_entry_get_text (entryHandle); + long /*int*/ ptr = OS.gtk_entry_get_text (entryHandle); start[0] = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start[0]); end[0] = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end[0]); } @@ -1003,7 +1003,7 @@ public int getSelectionIndex () { public String getText () { checkWidget(); if (entryHandle != 0) { - int /*long*/ str = OS.gtk_entry_get_text (entryHandle); + long /*int*/ str = OS.gtk_entry_get_text (entryHandle); if (str == 0) return ""; int length = OS.strlen (str); byte [] buffer = new byte [length]; @@ -1084,12 +1084,12 @@ public int getVisibleItemCount () { return visibleCount; } -int /*long*/ gtk_activate (int /*long*/ widget) { +long /*int*/ gtk_activate (long /*int*/ widget) { sendSelectionEvent (SWT.DefaultSelection); return 0; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { /* * Feature in GTK. Depending on where the user clicks, GTK prevents * the left mouse button event from being propagated. The fix is to @@ -1103,7 +1103,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { return super.gtk_button_press_event (widget, event); } -int /*long*/ gtk_changed (int /*long*/ widget) { +long /*int*/ gtk_changed (long /*int*/ widget) { if (widget == handle) { if (entryHandle == 0) { sendEvent(SWT.Modify); @@ -1133,7 +1133,7 @@ int /*long*/ gtk_changed (int /*long*/ widget) { * is to post the modify event when the user is typing. */ boolean keyPress = false; - int /*long*/ eventPtr = OS.gtk_get_current_event (); + long /*int*/ eventPtr = OS.gtk_get_current_event (); if (eventPtr != 0) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); @@ -1152,7 +1152,7 @@ int /*long*/ gtk_changed (int /*long*/ widget) { return 0; } -int /*long*/ gtk_commit (int /*long*/ imContext, int /*long*/ text) { +long /*int*/ gtk_commit (long /*int*/ imContext, long /*int*/ text) { if (text == 0) return 0; if (!OS.gtk_editable_get_editable (entryHandle)) return 0; int length = OS.strlen (text); @@ -1190,9 +1190,9 @@ int /*long*/ gtk_commit (int /*long*/ imContext, int /*long*/ text) { return 0; } -int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int /*long*/ end_pos) { +long /*int*/ gtk_delete_text (long /*int*/ widget, long /*int*/ start_pos, long /*int*/ end_pos) { if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0; - int /*long*/ ptr = OS.gtk_entry_get_text (entryHandle); + long /*int*/ ptr = OS.gtk_entry_get_text (entryHandle); if (end_pos == -1) end_pos = OS.g_utf8_strlen (ptr, -1); int start = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start_pos); int end = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end_pos); @@ -1215,7 +1215,7 @@ int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int / return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { /* * Feature in GTK. Depending on where the user clicks, GTK prevents * the left mouse button event from being propagated. The fix is to @@ -1265,12 +1265,12 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { return super.gtk_event_after(widget, gdkEvent); } -int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { fixIM (); return super.gtk_focus_out_event (widget, event); } -int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /*long*/ new_text_length, int /*long*/ position) { +long /*int*/ gtk_insert_text (long /*int*/ widget, long /*int*/ new_text, long /*int*/ new_text_length, long /*int*/ position) { if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0; if (new_text == 0 || new_text_length == 0) return 0; byte [] buffer = new byte [(int)/*64*/new_text_length]; @@ -1278,7 +1278,7 @@ int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /* String oldText = new String (Converter.mbcsToWcs (null, buffer)); int [] pos = new int [1]; OS.memmove (pos, position, 4); - int /*long*/ ptr = OS.gtk_entry_get_text (entryHandle); + long /*int*/ ptr = OS.gtk_entry_get_text (entryHandle); if (pos [0] == -1) pos [0] = (int)/*64*/OS.g_utf8_strlen (ptr, -1); int start = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, pos [0]); String newText = verifyText (oldText, start, start); @@ -1310,8 +1310,8 @@ int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /* return 0; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_key_press_event (widget, event); +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_key_press_event (widget, event); if (result != 0) { gdkEventKey = 0; fixIM (); @@ -1361,7 +1361,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_populate_popup (int /*long*/ widget, int /*long*/ menu) { +long /*int*/ gtk_populate_popup (long /*int*/ widget, long /*int*/ menu) { if ((style & SWT.RIGHT_TO_LEFT) != 0) { OS.gtk_widget_set_direction (menu, OS.GTK_TEXT_DIR_RTL); OS.gtk_container_forall (menu, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL); @@ -1369,7 +1369,7 @@ int /*long*/ gtk_populate_popup (int /*long*/ widget, int /*long*/ menu) { return 0; } -int /*long*/ gtk_selection_done(int /*long*/ menushell) { +long /*int*/ gtk_selection_done(long /*int*/ menushell) { int index = OS.gtk_combo_box_get_active (handle); if (indexSelected == -1){ indexSelected = index; @@ -1380,7 +1380,7 @@ int /*long*/ gtk_selection_done(int /*long*/ menushell) { return 0; } -int /*long*/ gtk_style_set (int /*long*/ widget, int /*long*/ previousStyle) { +long /*int*/ gtk_style_set (long /*int*/ widget, long /*int*/ previousStyle) { setButtonHandle (findButtonHandle ()); setMenuHandle (findMenuHandle ()); return super.gtk_style_set (widget, previousStyle); @@ -1443,12 +1443,12 @@ boolean isFocusHandle(int widget) { return super.isFocusHandle (widget); } -int /*long*/ paintWindow () { - int /*long*/ childHandle = entryHandle != 0 ? entryHandle : handle; +long /*int*/ paintWindow () { + long /*int*/ childHandle = entryHandle != 0 ? entryHandle : handle; OS.gtk_widget_realize (childHandle); - int /*long*/ window = gtk_widget_get_window (childHandle); + long /*int*/ window = gtk_widget_get_window (childHandle); if ((style & SWT.READ_ONLY) != 0) return window; - int /*long*/ children = OS.gdk_window_get_children (window); + long /*int*/ children = OS.gdk_window_get_children (window); if (children != 0) window = OS.g_list_data (children); OS.g_list_free (children); return window; @@ -1473,7 +1473,7 @@ public void paste () { if (entryHandle != 0) OS.gtk_editable_paste_clipboard (entryHandle); } -int /*long*/ parentingHandle() { +long /*int*/ parentingHandle() { return fixedHandle; } @@ -1483,7 +1483,7 @@ void register () { if (entryHandle != 0) display.addWidget (entryHandle, this); if (popupHandle != 0) display.addWidget (popupHandle, this); if (menuHandle != 0) display.addWidget (menuHandle, this); - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) display.addWidget (imContext, this); } @@ -1726,7 +1726,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize return super.setBounds (x, y, width, newHeight, move, resize); } -void setButtonHandle (int /*long*/ widget) { +void setButtonHandle (long /*int*/ widget) { if (buttonHandle == widget) return; if (buttonHandle != 0) { display.removeWidget (buttonHandle); @@ -1736,11 +1736,11 @@ void setButtonHandle (int /*long*/ widget) { if (buttonHandle != 0) { OS.g_object_ref (buttonHandle); display.addWidget (buttonHandle, this); - hookEvents (new int /*long*/[]{buttonHandle}); + hookEvents (new long /*int*/[]{buttonHandle}); } } -void setMenuHandle (int /*long*/ widget) { +void setMenuHandle (long /*int*/ widget) { if (menuHandle == widget) return; if (menuHandle != 0) { display.removeWidget (menuHandle); @@ -1750,11 +1750,11 @@ void setMenuHandle (int /*long*/ widget) { if (menuHandle != 0) { OS.g_object_ref (menuHandle); display.addWidget (menuHandle, this); - hookEvents (new int /*long*/[]{menuHandle}); + hookEvents (new long /*int*/[]{menuHandle}); } } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); if (entryHandle != 0) OS.gtk_widget_modify_font (entryHandle, font); OS.g_object_set (textRenderer, OS.font_desc, font, 0); @@ -1924,7 +1924,7 @@ public void setSelection (Point selection) { if (selection == null) error (SWT.ERROR_NULL_ARGUMENT); if ((style & SWT.READ_ONLY) != 0) return; if (entryHandle != 0) { - int /*long*/ ptr = OS.gtk_entry_get_text (entryHandle); + long /*int*/ ptr = OS.gtk_entry_get_text (entryHandle); int start = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, selection.x); int end = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, selection.y); OS.gtk_editable_set_position (entryHandle, start); @@ -1972,7 +1972,7 @@ public void setText (String string) { * fix is to block the firing of these events and fire them ourselves in a consistent manner. */ if (hooks (SWT.Verify) || filters (SWT.Verify)) { - int /*long*/ ptr = OS.gtk_entry_get_text (entryHandle); + long /*int*/ ptr = OS.gtk_entry_get_text (entryHandle); string = verifyText (string, 0, (int)/*64*/OS.g_utf16_strlen (ptr, -1)); if (string == null) return; } @@ -2052,9 +2052,9 @@ boolean translateTraversal (GdkEventKey keyEvent) { switch (key) { case OS.GDK_KP_Enter: case OS.GDK_Return: { - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { - int /*long*/ [] preeditString = new int /*long*/ [1]; + long /*int*/ [] preeditString = new long /*int*/ [1]; OS.gtk_im_context_get_preedit_string (imContext, preeditString, null, null); if (preeditString [0] != 0) { int length = OS.strlen (preeditString [0]); @@ -2073,7 +2073,7 @@ String verifyText (String string, int start, int end) { event.text = string; event.start = start; event.end = end; - int /*long*/ eventPtr = OS.gtk_get_current_event (); + long /*int*/ eventPtr = OS.gtk_get_current_event (); if (eventPtr != 0) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); 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 9c16040137..eef8fe5e1d 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 @@ -47,8 +47,8 @@ import org.eclipse.swt.graphics.*; * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Composite extends Scrollable { - public int /*long*/ embeddedHandle; - int /*long*/ imHandle, socketHandle; + public long /*int*/ embeddedHandle; + long /*int*/ imHandle, socketHandle; Layout layout; Control[] tabList; int layoutCount, backgroundMode; @@ -104,15 +104,15 @@ static int checkStyle (int style) { } Control [] _getChildren () { - int /*long*/ parentHandle = parentingHandle (); - int /*long*/ list = OS.gtk_container_get_children (parentHandle); + long /*int*/ parentHandle = parentingHandle (); + long /*int*/ list = OS.gtk_container_get_children (parentHandle); if (list == 0) return new Control [0]; int count = OS.g_list_length (list); Control [] children = new Control [count]; int i = 0; - int /*long*/ temp = list; + long /*int*/ temp = list; while (temp != 0) { - int /*long*/ handle = OS.g_list_data (temp); + long /*int*/ handle = OS.g_list_data (temp); if (handle != 0) { Widget widget = display.getWidget (handle); if (widget != null && widget != this) { @@ -206,7 +206,7 @@ protected void checkSubclass () { /* Do nothing - Subclassing is allowed */ } -int /*long*/ childStyle () { +long /*int*/ childStyle () { if (scrolledHandle != 0) return 0; return super.childStyle (); } @@ -267,9 +267,9 @@ void createHandle (int index, boolean fixed, boolean scrolled) { if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); gtk_widget_set_has_window (fixedHandle, true); } - int /*long*/ vadj = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10); + long /*int*/ vadj = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10); if (vadj == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ hadj = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10); + long /*int*/ hadj = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10); if (hadj == 0) error (SWT.ERROR_NO_HANDLES); scrolledHandle = OS.gtk_scrolled_window_new (hadj, vadj); if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES); @@ -367,7 +367,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height, int offs Control control = findBackgroundControl (); if (control != null) { GCData data = gc.getGCData (); - int /*long*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { Cairo.cairo_save (cairo); if (control.backgroundImage != null) { @@ -375,12 +375,12 @@ public void drawBackground (GC gc, int x, int y, int width, int height, int offs Cairo.cairo_translate (cairo, -pt.x - offsetX, -pt.y - offsetY); x += pt.x + offsetX; y += pt.y + offsetY; - int /*long*/ surface = control.backgroundImage.surface; + long /*int*/ surface = control.backgroundImage.surface; if (surface == 0) { - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual (OS.gdk_visual_get_system()); - int /*long*/ drawable = control.backgroundImage.pixmap; - int /*long*/ xDrawable = OS.GDK_PIXMAP_XID (drawable); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xVisual = OS.gdk_x11_visual_get_xvisual (OS.gdk_visual_get_system()); + long /*int*/ drawable = control.backgroundImage.pixmap; + long /*int*/ xDrawable = OS.GDK_PIXMAP_XID (drawable); int [] w = new int [1], h = new int [1]; gdk_pixmap_get_size (drawable, w, h); surface = Cairo.cairo_xlib_surface_create (xDisplay, xDrawable, xVisual, w [0], h [0]); @@ -388,7 +388,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height, int offs } else { Cairo.cairo_surface_reference(surface); } - int /*long*/ pattern = Cairo.cairo_pattern_create_for_surface (surface); + long /*int*/ pattern = Cairo.cairo_pattern_create_for_surface (surface); if (pattern == 0) error (SWT.ERROR_NO_HANDLES); Cairo.cairo_pattern_set_extend (pattern, Cairo.CAIRO_EXTEND_REPEAT); if ((data.style & SWT.MIRRORED) != 0) { @@ -406,7 +406,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height, int offs Cairo.cairo_fill (cairo); Cairo.cairo_restore (cairo); } else { - int /*long*/ gdkGC = gc.handle; + long /*int*/ gdkGC = gc.handle; GdkGCValues values = new GdkGCValues (); OS.gdk_gc_get_values (gdkGC, values); if (control.backgroundImage != null) { @@ -464,7 +464,7 @@ void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, De } } -void fixModal(int /*long*/ group, int /*long*/ modalGroup) { +void fixModal(long /*int*/ group, long /*int*/ modalGroup) { Control[] controls = _getChildren (); for (int i = 0; i < controls.length; i++) { controls[i].fixModal (group, modalGroup); @@ -503,15 +503,15 @@ void fixTabList (Control control) { void fixZOrder () { if ((state & CANVAS) != 0) return; - int /*long*/ parentHandle = parentingHandle (); - int /*long*/ parentWindow = gtk_widget_get_window (parentHandle); + long /*int*/ parentHandle = parentingHandle (); + long /*int*/ parentWindow = gtk_widget_get_window (parentHandle); if (parentWindow == 0) return; - int /*long*/ [] userData = new int /*long*/ [1]; - int /*long*/ windowList = OS.gdk_window_get_children (parentWindow); + long /*int*/ [] userData = new long /*int*/ [1]; + long /*int*/ windowList = OS.gdk_window_get_children (parentWindow); if (windowList != 0) { - int /*long*/ windows = windowList; + long /*int*/ windows = windowList; while (windows != 0) { - int /*long*/ window = OS.g_list_data (windows); + long /*int*/ window = OS.g_list_data (windows); if (window != redrawWindow) { OS.gdk_window_get_user_data (window, userData); if (userData [0] == 0 || OS.G_OBJECT_TYPE (userData [0]) != display.gtk_fixed_get_type ()) { @@ -524,12 +524,12 @@ void fixZOrder () { } } -int /*long*/ focusHandle () { +long /*int*/ focusHandle () { if (socketHandle != 0) return socketHandle; return super.focusHandle (); } -boolean forceFocus (int /*long*/ focusHandle) { +boolean forceFocus (long /*int*/ focusHandle) { if (socketHandle != 0) gtk_widget_set_can_focus (focusHandle, true); boolean result = super.forceFocus (focusHandle); if (socketHandle != 0) gtk_widget_set_can_focus (focusHandle, false); @@ -590,7 +590,7 @@ int getChildrenCount () { * NOTE: The current implementation will count * non-registered children. */ - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list == 0) return 0; int count = OS.g_list_length (list); OS.g_list_free (list); @@ -604,7 +604,7 @@ public Rectangle getClientArea () { return new Rectangle (0, 0, 0, 0); } forceResize (); - int /*long*/ clientHandle = clientHandle (); + long /*int*/ clientHandle = clientHandle (); GtkAllocation allocation = new GtkAllocation(); gtk_widget_get_allocation (clientHandle, allocation); int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; @@ -690,8 +690,8 @@ public Control [] getTabList () { return tabList; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_button_press_event (widget, event); +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_button_press_event (widget, event); if (result != 0) return result; if ((state & CANVAS) != 0) { if ((style & SWT.NO_FOCUS) == 0 && hooksKeys ()) { @@ -705,7 +705,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { +long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { if ((state & OBSCURED) != 0) return 0; if ((state & CANVAS) == 0) { return super.gtk_expose_event (widget, eventPtr); @@ -716,7 +716,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { if (!hooks (SWT.Paint) && !filters (SWT.Paint)) return 0; GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove(gdkEvent, eventPtr, GdkEventExpose.sizeof); - int /*long*/ [] rectangles = new int /*long*/ [1]; + long /*int*/ [] rectangles = new long /*int*/ [1]; int [] n_rectangles = new int [1]; OS.gdk_region_get_rectangles (gdkEvent.region, rectangles, n_rectangles); GdkRectangle rect = new GdkRectangle (); @@ -728,7 +728,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { event.width = rect.width; event.height = rect.height; if ((style & SWT.MIRRORED) != 0) event.x = getClientWidth () - event.width - event.x; - int /*long*/ damageRgn = OS.gdk_region_new (); + long /*int*/ damageRgn = OS.gdk_region_new (); OS.gdk_region_union_with_rect (damageRgn, rect); GCData data = new GCData (); data.damageRgn = damageRgn; @@ -742,8 +742,8 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { return 0; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_key_press_event (widget, event); +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_key_press_event (widget, event); if (result != 0) return result; /* * Feature in GTK. The default behavior when the return key @@ -763,30 +763,30 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ directionType) { +long /*int*/ gtk_focus (long /*int*/ widget, long /*int*/ directionType) { if (widget == socketHandle) return 0; return super.gtk_focus (widget, directionType); } -int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_focus_in_event (widget, event); +long /*int*/ gtk_focus_in_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_focus_in_event (widget, event); return (state & CANVAS) != 0 ? 1 : result; } -int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_focus_out_event (widget, event); +long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_focus_out_event (widget, event); return (state & CANVAS) != 0 ? 1 : result; } -int /*long*/ gtk_map (int /*long*/ widget) { +long /*int*/ gtk_map (long /*int*/ widget) { fixZOrder (); return 0; } -int /*long*/ gtk_realize (int /*long*/ widget) { - int /*long*/ result = super.gtk_realize (widget); +long /*int*/ gtk_realize (long /*int*/ widget) { + long /*int*/ result = super.gtk_realize (widget); if ((style & SWT.NO_BACKGROUND) != 0) { - int /*long*/ window = gtk_widget_get_window (paintHandle ()); + long /*int*/ window = gtk_widget_get_window (paintHandle ()); if (window != 0) OS.gdk_window_set_back_pixmap (window, 0, false); } if (socketHandle != 0) { @@ -795,16 +795,16 @@ int /*long*/ gtk_realize (int /*long*/ widget) { return result; } -int /*long*/ gtk_scroll_child (int /*long*/ widget, int /*long*/ scrollType, int /*long*/ horizontal) { +long /*int*/ gtk_scroll_child (long /*int*/ widget, long /*int*/ scrollType, long /*int*/ horizontal) { /* Stop GTK scroll child signal for canvas */ OS.g_signal_stop_emission_by_name (widget, OS.scroll_child); return 1; } -int /*long*/ gtk_style_set (int /*long*/ widget, int /*long*/ previousStyle) { - int /*long*/ result = super.gtk_style_set (widget, previousStyle); +long /*int*/ gtk_style_set (long /*int*/ widget, long /*int*/ previousStyle) { + long /*int*/ result = super.gtk_style_set (widget, previousStyle); if ((style & SWT.NO_BACKGROUND) != 0) { - int /*long*/ window = gtk_widget_get_window (paintHandle ()); + long /*int*/ window = gtk_widget_get_window (paintHandle ()); if (window != 0) OS.gdk_window_set_back_pixmap (window, 0, false); } return result; @@ -828,7 +828,7 @@ boolean hooksKeys () { return hooks (SWT.KeyDown) || hooks (SWT.KeyUp); } -int /*long*/ imHandle () { +long /*int*/ imHandle () { return imHandle; } @@ -1123,16 +1123,16 @@ void markLayout (boolean changed, boolean all) { } } -void moveAbove (int /*long*/ child, int /*long*/ sibling) { +void moveAbove (long /*int*/ child, long /*int*/ sibling) { if (child == sibling) return; - int /*long*/ parentHandle = parentingHandle (); + long /*int*/ parentHandle = parentingHandle (); GtkFixed fixed = new GtkFixed (); OS.memmove (fixed, parentHandle); - int /*long*/ children = fixed.children; + long /*int*/ children = fixed.children; if (children == 0) return; - int /*long*/ [] data = new int /*long*/ [1]; - int /*long*/ [] widget = new int /*long*/ [1]; - int /*long*/ childData = 0, childLink = 0, siblingLink = 0, temp = children; + long /*int*/ [] data = new long /*int*/ [1]; + long /*int*/ [] widget = new long /*int*/ [1]; + long /*int*/ childData = 0, childLink = 0, siblingLink = 0, temp = children; while (temp != 0) { OS.memmove (data, temp, OS.PTR_SIZEOF); OS.memmove (widget, data [0], OS.PTR_SIZEOF); @@ -1160,20 +1160,20 @@ void moveAbove (int /*long*/ child, int /*long*/ sibling) { OS.memmove (parentHandle, fixed); } -void moveBelow (int /*long*/ child, int /*long*/ sibling) { +void moveBelow (long /*int*/ child, long /*int*/ sibling) { if (child == sibling) return; - int /*long*/ parentHandle = parentingHandle (); + long /*int*/ parentHandle = parentingHandle (); if (sibling == 0 && parentHandle == fixedHandle) { moveAbove (child, scrolledHandle != 0 ? scrolledHandle : handle); return; } GtkFixed fixed = new GtkFixed (); OS.memmove (fixed, parentHandle); - int /*long*/ children = fixed.children; + long /*int*/ children = fixed.children; if (children == 0) return; - int /*long*/ [] data = new int /*long*/ [1]; - int /*long*/ [] widget = new int /*long*/ [1]; - int /*long*/ childData = 0, childLink = 0, siblingLink = 0, temp = children; + long /*int*/ [] data = new long /*int*/ [1]; + long /*int*/ [] widget = new long /*int*/ [1]; + long /*int*/ childData = 0, childLink = 0, siblingLink = 0, temp = children; while (temp != 0) { OS.memmove (data, temp, OS.PTR_SIZEOF); OS.memmove (widget, data [0], OS.PTR_SIZEOF); @@ -1205,7 +1205,7 @@ void moveChildren(int oldWidth) { Control[] children = _getChildren (); for (int i = 0; i < children.length; i++) { Control child = children[i]; - int /*long*/ topHandle = child.topHandle (); + long /*int*/ topHandle = child.topHandle (); GtkAllocation allocation = new GtkAllocation(); gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; @@ -1247,12 +1247,12 @@ Point minimumSize (int wHint, int hHint, boolean changed) { return new Point (width, height); } -int /*long*/ parentingHandle () { +long /*int*/ parentingHandle () { if ((state & CANVAS) != 0) return handle; return fixedHandle != 0 ? fixedHandle : handle; } -void printWidget (GC gc, int /*long*/ drawable, int depth, int x, int y) { +void printWidget (GC gc, long /*int*/ drawable, int depth, int x, int y) { Region oldClip = new Region (gc.getDevice ()); Region newClip = new Region (gc.getDevice ()); gc.getClipping (oldClip); 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 91407953dd..98260057c0 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 @@ -44,8 +44,8 @@ import org.eclipse.swt.internal.gtk.*; * @noextend This class is not intended to be subclassed by clients. */ public abstract class Control extends Widget implements Drawable { - int /*long*/ fixedHandle; - int /*long*/ redrawWindow, enableWindow; + long /*int*/ fixedHandle; + long /*int*/ redrawWindow, enableWindow; int drawCount; Composite parent; Cursor cursor; @@ -104,13 +104,13 @@ Font defaultFont () { void deregister () { super.deregister (); if (fixedHandle != 0) display.removeWidget (fixedHandle); - int /*long*/ imHandle = imHandle (); + long /*int*/ imHandle = imHandle (); if (imHandle != 0) display.removeWidget (imHandle); } -void drawBackground (Control control, int /*long*/ window, int /*long*/ region, int x, int y, int width, int height) { +void drawBackground (Control control, long /*int*/ window, long /*int*/ region, int x, int y, int width, int height) { if (OS.USE_CAIRO) { - int /*long*/ cairo = OS.gdk_cairo_create(window); + long /*int*/ cairo = OS.gdk_cairo_create(window); if (cairo == 0) error (SWT.ERROR_NO_HANDLES); if (region != 0) { OS.gdk_cairo_region(cairo, region); @@ -121,7 +121,7 @@ void drawBackground (Control control, int /*long*/ window, int /*long*/ region, Cairo.cairo_translate (cairo, -pt.x, -pt.y); x += pt.x; y += pt.y; - int /*long*/ pattern = Cairo.cairo_pattern_create_for_surface (control.backgroundImage.surface); + long /*int*/ pattern = Cairo.cairo_pattern_create_for_surface (control.backgroundImage.surface); if (pattern == 0) error (SWT.ERROR_NO_HANDLES); Cairo.cairo_pattern_set_extend (pattern, Cairo.CAIRO_EXTEND_REPEAT); if ((style & SWT.MIRRORED) != 0) { @@ -139,7 +139,7 @@ void drawBackground (Control control, int /*long*/ window, int /*long*/ region, Cairo.cairo_destroy(cairo); return; } - int /*long*/ gdkGC = OS.gdk_gc_new (window); + long /*int*/ gdkGC = OS.gdk_gc_new (window); if (region != 0) OS.gdk_gc_set_clip_region (gdkGC, region); if (control.backgroundImage != null) { Point pt = display.map (this, control, 0, 0); @@ -156,8 +156,8 @@ void drawBackground (Control control, int /*long*/ window, int /*long*/ region, } boolean drawGripper (int x, int y, int width, int height, boolean vertical) { - int /*long*/ paintHandle = paintHandle (); - int /*long*/ window = gtk_widget_get_window (paintHandle); + long /*int*/ paintHandle = paintHandle (); + long /*int*/ window = gtk_widget_get_window (paintHandle); if (window == 0) return false; int orientation = vertical ? OS.GTK_ORIENTATION_HORIZONTAL : OS.GTK_ORIENTATION_VERTICAL; if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - width - x; @@ -169,16 +169,16 @@ void enableWidget (boolean enabled) { OS.gtk_widget_set_sensitive (handle, enabled); } -int /*long*/ enterExitHandle () { +long /*int*/ enterExitHandle () { return eventHandle (); } -int /*long*/ eventHandle () { +long /*int*/ eventHandle () { return handle; } -int /*long*/ eventWindow () { - int /*long*/ eventHandle = eventHandle (); +long /*int*/ eventWindow () { + long /*int*/ eventHandle = eventHandle (); OS.gtk_widget_realize (eventHandle); return gtk_widget_get_window (eventHandle); } @@ -190,7 +190,7 @@ void fixFocus (Control focusControl) { if (control.setFocus ()) return; } shell.setSavedFocus (focusControl); - int /*long*/ focusHandle = shell.vboxHandle; + long /*int*/ focusHandle = shell.vboxHandle; gtk_widget_set_can_focus (focusHandle, true); OS.gtk_widget_grab_focus (focusHandle); // widget could be disposed at this point @@ -202,7 +202,7 @@ void fixStyle () { if (fixedHandle != 0) fixStyle (fixedHandle); } -void fixStyle (int /*long*/ handle) { +void fixStyle (long /*int*/ handle) { /* * Feature in GTK. Some GTK themes apply a different background to * the contents of a GtkNotebook. However, in an SWT TabFolder, the @@ -216,7 +216,7 @@ void fixStyle (int /*long*/ handle) { */ if ((state & BACKGROUND) != 0) return; if ((state & THEME_BACKGROUND) == 0) return; - int /*long*/ childStyle = parent.childStyle (); + long /*int*/ childStyle = parent.childStyle (); if (childStyle != 0) { GdkColor color = new GdkColor(); OS.gtk_style_get_bg (childStyle, 0, color); @@ -224,11 +224,11 @@ void fixStyle (int /*long*/ handle) { } } -int /*long*/ focusHandle () { +long /*int*/ focusHandle () { return handle; } -int /*long*/ fontHandle () { +long /*int*/ fontHandle () { return handle; } @@ -256,7 +256,7 @@ boolean hasFocus () { void hookEvents () { /* Connect the keyboard signals */ - int /*long*/ focusHandle = focusHandle (); + long /*int*/ focusHandle = focusHandle (); int focusMask = OS.GDK_KEY_PRESS_MASK | OS.GDK_KEY_RELEASE_MASK | OS.GDK_FOCUS_CHANGE_MASK; OS.gtk_widget_add_events (focusHandle, focusMask); OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [POPUP_MENU], 0, display.closures [POPUP_MENU], false); @@ -268,7 +268,7 @@ void hookEvents () { OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [FOCUS_OUT_EVENT], 0, display.closures [FOCUS_OUT_EVENT], false); /* Connect the mouse signals */ - int /*long*/ eventHandle = eventHandle (); + long /*int*/ eventHandle = eventHandle (); int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK; OS.gtk_widget_add_events (eventHandle, eventMask); OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.closures [BUTTON_PRESS_EVENT], false); @@ -277,7 +277,7 @@ void hookEvents () { OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [SCROLL_EVENT], 0, display.closures [SCROLL_EVENT], false); /* Connect enter/exit signals */ - int /*long*/ enterExitHandle = enterExitHandle (); + long /*int*/ enterExitHandle = enterExitHandle (); int enterExitMask = OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK; OS.gtk_widget_add_events (enterExitHandle, enterExitMask); OS.g_signal_connect_closure_by_id (enterExitHandle, display.signalIds [ENTER_NOTIFY_EVENT], 0, display.closures [ENTER_NOTIFY_EVENT], false); @@ -293,7 +293,7 @@ void hookEvents () { * The signal is hooked to the fixedHandle to catch events sent to * lightweight widgets. */ - int /*long*/ blockHandle = fixedHandle != 0 ? fixedHandle : eventHandle; + long /*int*/ blockHandle = fixedHandle != 0 ? fixedHandle : eventHandle; OS.g_signal_connect_closure_by_id (blockHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.closures [BUTTON_PRESS_EVENT_INVERSE], true); OS.g_signal_connect_closure_by_id (blockHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.closures [BUTTON_RELEASE_EVENT_INVERSE], true); OS.g_signal_connect_closure_by_id (blockHandle, display.signalIds [MOTION_NOTIFY_EVENT], 0, display.closures [MOTION_NOTIFY_EVENT_INVERSE], true); @@ -305,7 +305,7 @@ void hookEvents () { } /* Connect the paint signal */ - int /*long*/ paintHandle = paintHandle (); + long /*int*/ paintHandle = paintHandle (); int paintMask = OS.GDK_EXPOSURE_MASK | OS.GDK_VISIBILITY_NOTIFY_MASK; OS.gtk_widget_add_events (paintHandle, paintMask); OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [EXPOSE_EVENT], 0, display.closures [EXPOSE_EVENT_INVERSE], false); @@ -322,7 +322,7 @@ void hookEvents () { /* Connect the Input Method signals */ OS.g_signal_connect_closure_by_id (handle, display.signalIds [REALIZE], 0, display.closures [REALIZE], true); OS.g_signal_connect_closure_by_id (handle, display.signalIds [UNREALIZE], 0, display.closures [UNREALIZE], false); - int /*long*/ imHandle = imHandle (); + long /*int*/ imHandle = imHandle (); if (imHandle != 0) { OS.g_signal_connect_closure (imHandle, OS.commit, display.closures [COMMIT], false); OS.g_signal_connect_closure (imHandle, OS.preedit_changed, display.closures [PREEDIT_CHANGED], false); @@ -330,11 +330,11 @@ void hookEvents () { OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [STYLE_SET], 0, display.closures [STYLE_SET], false); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); OS.g_signal_connect_closure_by_id (topHandle, display.signalIds [MAP], 0, display.closures [MAP], true); } -int /*long*/ hoverProc (int /*long*/ widget) { +long /*int*/ hoverProc (long /*int*/ widget) { int [] x = new int [1], y = new int [1], mask = new int [1]; OS.gdk_window_get_pointer (0, x, y, mask); sendMouseEvent (SWT.MouseHover, 0, /*time*/0, x [0], y [0], false, mask [0]); @@ -342,14 +342,14 @@ int /*long*/ hoverProc (int /*long*/ widget) { return 0; } -int /*long*/ topHandle() { +long /*int*/ topHandle() { if (fixedHandle != 0) return fixedHandle; return super.topHandle (); } -int /*long*/ paintHandle () { - int /*long*/ topHandle = topHandle (); - int /*long*/ paintHandle = handle; +long /*int*/ paintHandle () { + long /*int*/ topHandle = topHandle (); + long /*int*/ paintHandle = handle; while (paintHandle != topHandle) { if (gtk_widget_get_has_window (paintHandle)) break; paintHandle = OS.gtk_widget_get_parent (paintHandle); @@ -357,8 +357,8 @@ int /*long*/ paintHandle () { return paintHandle; } -int /*long*/ paintWindow () { - int /*long*/ paintHandle = paintHandle (); +long /*int*/ paintWindow () { + long /*int*/ paintHandle = paintHandle (); OS.gtk_widget_realize (paintHandle); return gtk_widget_get_window (paintHandle); } @@ -384,27 +384,27 @@ public boolean print (GC gc) { checkWidget (); if (gc == null) error (SWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); OS.gtk_widget_realize (topHandle); - int /*long*/ window = gtk_widget_get_window (topHandle); + long /*int*/ window = gtk_widget_get_window (topHandle); GCData data = gc.getGCData (); OS.gdk_window_process_updates (window, true); - int /*long*/ drawable = data.drawable; + long /*int*/ drawable = data.drawable; if (drawable == 0) drawable = OS.gdk_get_default_root_window(); printWidget (gc, drawable, OS.gdk_drawable_get_depth (drawable), 0, 0); return true; } -void printWidget (GC gc, int /*long*/ drawable, int depth, int x, int y) { +void printWidget (GC gc, long /*int*/ drawable, int depth, int x, int y) { boolean obscured = (state & OBSCURED) != 0; state &= ~OBSCURED; - int /*long*/ topHandle = topHandle (); - int /*long*/ window = gtk_widget_get_window (topHandle); + long /*int*/ topHandle = topHandle (); + long /*int*/ window = gtk_widget_get_window (topHandle); printWindow (true, this, gc, drawable, depth, window, x, y); if (obscured) state |= OBSCURED; } -void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable, int depth, int /*long*/ window, int x, int y) { +void printWindow (boolean first, Control control, GC gc, long /*int*/ drawable, int depth, long /*int*/ window, int x, int y) { if (OS.gdk_drawable_get_depth (window) != depth) return; GdkRectangle rect = new GdkRectangle (); int [] width = new int [1], height = new int [1]; @@ -412,13 +412,13 @@ void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable, rect.width = width [0]; rect.height = height [0]; OS.gdk_window_begin_paint_rect (window, rect); - int /*long*/ [] real_drawable = new int /*long*/ [1]; + long /*int*/ [] real_drawable = new long /*int*/ [1]; int [] x_offset = new int [1], y_offset = new int [1]; OS.gdk_window_get_internal_paint_info (window, real_drawable, x_offset, y_offset); - int /*long*/ [] userData = new int /*long*/ [1]; + long /*int*/ [] userData = new long /*int*/ [1]; OS.gdk_window_get_user_data (window, userData); if (userData [0] != 0) { - int /*long*/ eventPtr = OS.gdk_event_new (OS.GDK_EXPOSE); + long /*int*/ eventPtr = OS.gdk_event_new (OS.GDK_EXPOSE); GdkEventExpose event = new GdkEventExpose (); event.type = OS.GDK_EXPOSE; event.window = OS.g_object_ref (window); @@ -434,7 +434,7 @@ void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable, if (!first) { int [] cX = new int [1], cY = new int [1]; OS.gdk_window_get_position (window, cX, cY); - int /*long*/ parentWindow = OS.gdk_window_get_parent (window); + long /*int*/ parentWindow = OS.gdk_window_get_parent (window); int [] pW = new int [1], pH = new int [1]; gdk_window_get_size (parentWindow, pW, pH); srcX = x_offset [0] - cX [0]; @@ -445,18 +445,18 @@ void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable, destHeight = Math.min (cY [0] + height [0], pH [0]); } GCData gcData = gc.getGCData(); - int /*long*/ cairo = gcData.cairo; + long /*int*/ cairo = gcData.cairo; if (cairo != 0) { - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); - int /*long*/ xDrawable = OS.GDK_PIXMAP_XID(real_drawable [0]); - int /*long*/ surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width [0], height [0]); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); + long /*int*/ xDrawable = OS.GDK_PIXMAP_XID(real_drawable [0]); + long /*int*/ surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width [0], height [0]); if (surface == 0) error(SWT.ERROR_NO_HANDLES); Cairo.cairo_save(cairo); Cairo.cairo_rectangle(cairo, destX , destY, destWidth, destHeight); Cairo.cairo_clip(cairo); Cairo.cairo_translate(cairo, destX, destY); - int /*long*/ pattern = Cairo.cairo_pattern_create_for_surface(surface); + long /*int*/ pattern = Cairo.cairo_pattern_create_for_surface(surface); if (pattern == 0) error(SWT.ERROR_NO_HANDLES); Cairo.cairo_pattern_set_filter(pattern, Cairo.CAIRO_FILTER_BEST); Cairo.cairo_set_source(cairo, pattern); @@ -472,13 +472,13 @@ void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable, OS.gdk_draw_drawable (drawable, gc.handle, real_drawable [0], srcX, srcY, destX, destY, destWidth, destHeight); } OS.gdk_window_end_paint (window); - int /*long*/ children = OS.gdk_window_get_children (window); + long /*int*/ children = OS.gdk_window_get_children (window); if (children != 0) { - int /*long*/ windows = children; + long /*int*/ windows = children; while (windows != 0) { - int /*long*/ child = OS.g_list_data (windows); + long /*int*/ child = OS.g_list_data (windows); if (OS.gdk_window_is_visible (child)) { - int /*long*/ [] data = new int /*long*/ [1]; + long /*int*/ [] data = new long /*int*/ [1]; OS.gdk_window_get_user_data (child, data); if (data [0] != 0) { Widget widget = display.findWidget (data [0]); @@ -592,7 +592,7 @@ void checkMirrored () { if ((style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.MIRRORED; } -int /*long*/ childStyle () { +long /*int*/ childStyle () { return parent.childStyle (); } @@ -652,7 +652,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { return computeNativeSize (handle, wHint, hHint, changed); } -Point computeNativeSize (int /*long*/ h, int wHint, int hHint, boolean changed) { +Point computeNativeSize (long /*int*/ h, int wHint, int hHint, boolean changed) { int width = wHint, height = hHint; if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { GtkRequisition requisition = new GtkRequisition (); @@ -678,7 +678,7 @@ void forceResize () { * topHandle. Note that all calls to gtk_widget_size_allocate() * must be preceded by a call to gtk_widget_size_request(). */ - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); GtkRequisition requisition = new GtkRequisition (); gtk_widget_size_request (topHandle, requisition); GtkAllocation allocation = new GtkAllocation (); @@ -733,7 +733,7 @@ Accessible _getAccessible () { */ public Rectangle getBounds () { checkWidget(); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; @@ -800,7 +800,7 @@ void markLayout (boolean changed, boolean all) { /* Do nothing */ } -void modifyStyle (int /*long*/ handle, int /*long*/ style) { +void modifyStyle (long /*int*/ handle, long /*int*/ style) { super.modifyStyle(handle, style); /* * Bug in GTK. When changing the style of a control that @@ -811,8 +811,8 @@ void modifyStyle (int /*long*/ handle, int /*long*/ style) { } void moveHandle (int x, int y) { - int /*long*/ topHandle = topHandle (); - int /*long*/ parentHandle = parent.parentingHandle (); + long /*int*/ topHandle = topHandle (); + long /*int*/ parentHandle = parent.parentingHandle (); /* * Feature in GTK. Calling gtk_fixed_move() to move a child causes * the whole parent to redraw. This is a performance problem. The @@ -830,13 +830,13 @@ void moveHandle (int x, int y) { } void resizeHandle (int width, int height) { - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); OS.gtk_widget_set_size_request (topHandle, width, height); if (topHandle != handle) OS.gtk_widget_set_size_request (handle, width, height); } int setBounds (int x, int y, int width, int height, boolean move, boolean resize) { - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); boolean sendMove = move; GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (topHandle, allocation); @@ -955,7 +955,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize */ public Point getLocation () { checkWidget(); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; @@ -1022,7 +1022,7 @@ public void setLocation(int x, int y) { */ public Point getSize () { checkWidget(); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (topHandle, allocation); int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; @@ -1074,15 +1074,15 @@ public void setSize (Point size) { public void setRegion (Region region) { checkWidget (); if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); - int /*long*/ window = gtk_widget_get_window (topHandle ()); - int /*long*/ shape_region = (region == null) ? 0 : region.handle; + long /*int*/ window = gtk_widget_get_window (topHandle ()); + long /*int*/ shape_region = (region == null) ? 0 : region.handle; OS.gdk_window_shape_combine_region (window, shape_region, 0, 0); this.region = region; } void setRelations () { - int /*long*/ parentHandle = parent.parentingHandle (); - int /*long*/ list = OS.gtk_container_get_children (parentHandle); + long /*int*/ parentHandle = parent.parentingHandle (); + long /*int*/ list = OS.gtk_container_get_children (parentHandle); if (list == 0) return; int count = OS.g_list_length (list); if (count > 1) { @@ -1090,7 +1090,7 @@ void setRelations () { * the receiver is the last item in the list, so its predecessor will * be the second-last item in the list */ - int /*long*/ handle = OS.g_list_nth_data (list, count - 2); + long /*int*/ handle = OS.g_list_nth_data (list, count - 2); if (handle != 0) { Widget widget = display.getWidget (handle); if (widget != null && widget != this) { @@ -1138,7 +1138,7 @@ boolean isDescribedByLabel () { return true; } -boolean isFocusHandle (int /*long*/ widget) { +boolean isFocusHandle (long /*int*/ widget) { return widget == focusHandle (); } @@ -1279,7 +1279,7 @@ public void setLayoutData (Object layoutData) { */ public Point toControl (int x, int y) { checkWidget (); - int /*long*/ window = eventWindow (); + long /*int*/ window = eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); x -= origin_x [0]; @@ -1328,7 +1328,7 @@ public Point toControl (Point point) { */ public Point toDisplay (int x, int y) { checkWidget(); - int /*long*/ window = eventWindow (); + long /*int*/ window = eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - x; @@ -2219,7 +2219,7 @@ boolean dragDetect (int button, int count, int stateMask, int x, int y) { boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean [] consume) { boolean quit = false, dragging = false; while (!quit) { - int /*long*/ eventPtr = 0; + long /*int*/ eventPtr = 0; /* * There should be an event on the queue already, but * in cases where there isn't one, stop trying after @@ -2274,8 +2274,8 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean return dragging; } -boolean filterKey (int keyval, int /*long*/ event) { - int /*long*/ imHandle = imHandle (); +boolean filterKey (int keyval, long /*int*/ event) { + long /*int*/ imHandle = imHandle (); if (imHandle != 0) { return OS.gtk_im_context_filter_keypress (imHandle, event); } @@ -2297,13 +2297,13 @@ void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, De oldDecorations.fixDecorations (newDecorations, this, menus); } -int /*long*/ fixedMapProc (int /*long*/ widget) { +long /*int*/ fixedMapProc (long /*int*/ widget) { gtk_widget_set_mapped (widget, true); - int /*long*/ widgetList = OS.gtk_container_get_children (widget); + long /*int*/ widgetList = OS.gtk_container_get_children (widget); if (widgetList != 0) { - int /*long*/ widgets = widgetList; + long /*int*/ widgets = widgetList; while (widgets != 0) { - int /*long*/ child = OS.g_list_data (widgets); + long /*int*/ child = OS.g_list_data (widgets); if (gtk_widget_get_visible (child) && OS.gtk_widget_get_child_visible (child) && !gtk_widget_get_mapped (child)) { OS.gtk_widget_map (child); } @@ -2317,7 +2317,7 @@ int /*long*/ fixedMapProc (int /*long*/ widget) { return 0; } -void fixModal(int /*long*/ group, int /*long*/ modalGroup) { +void fixModal(long /*int*/ group, long /*int*/ modalGroup) { } /** @@ -2343,7 +2343,7 @@ public boolean forceFocus () { return forceFocus (focusHandle ()); } -boolean forceFocus (int /*long*/ focusHandle) { +boolean forceFocus (long /*int*/ focusHandle) { if (gtk_widget_has_focus (focusHandle)) return true; /* When the control is zero sized it must be realized */ OS.gtk_widget_realize (focusHandle); @@ -2351,8 +2351,8 @@ boolean forceFocus (int /*long*/ focusHandle) { // widget could be disposed at this point if (isDisposed ()) return false; Shell shell = getShell (); - int /*long*/ shellHandle = shell.shellHandle; - int /*long*/ handle = OS.gtk_window_get_focus (shellHandle); + long /*int*/ shellHandle = shell.shellHandle; + long /*int*/ handle = OS.gtk_window_get_focus (shellHandle); while (handle != 0) { if (handle == focusHandle) { /* Cancel any previous ignoreFocus requests */ @@ -2413,7 +2413,7 @@ public Image getBackgroundImage () { } GdkColor getBgColor () { - int /*long*/ fontHandle = fontHandle (); + long /*int*/ fontHandle = fontHandle (); OS.gtk_widget_realize (fontHandle); GdkColor color = new GdkColor (); OS.gtk_style_get_bg (OS.gtk_widget_get_style (fontHandle), OS.GTK_STATE_NORMAL, color); @@ -2421,7 +2421,7 @@ GdkColor getBgColor () { } GdkColor getBaseColor () { - int /*long*/ fontHandle = fontHandle (); + long /*int*/ fontHandle = fontHandle (); OS.gtk_widget_realize (fontHandle); GdkColor color = new GdkColor (); OS.gtk_style_get_base (OS.gtk_widget_get_style (fontHandle), OS.GTK_STATE_NORMAL, color); @@ -2521,8 +2521,8 @@ public Font getFont () { return font != null ? font : defaultFont (); } -int /*long*/ getFontDescription () { - int /*long*/ fontHandle = fontHandle (); +long /*int*/ getFontDescription () { + long /*int*/ fontHandle = fontHandle (); OS.gtk_widget_realize (fontHandle); return OS.gtk_style_get_font_desc (OS.gtk_widget_get_style (fontHandle)); } @@ -2547,7 +2547,7 @@ GdkColor getForegroundColor () { } GdkColor getFgColor () { - int /*long*/ fontHandle = fontHandle (); + long /*int*/ fontHandle = fontHandle (); OS.gtk_widget_realize (fontHandle); GdkColor color = new GdkColor (); OS.gtk_style_get_fg (OS.gtk_widget_get_style (fontHandle), OS.GTK_STATE_NORMAL, color); @@ -2559,7 +2559,7 @@ Point getIMCaretPos () { } GdkColor getTextColor () { - int /*long*/ fontHandle = fontHandle (); + long /*int*/ fontHandle = fontHandle (); OS.gtk_widget_realize (fontHandle); GdkColor color = new GdkColor (); OS.gtk_style_get_text (OS.gtk_widget_get_style (fontHandle), OS.GTK_STATE_NORMAL, color); @@ -2616,7 +2616,7 @@ public Menu getMenu () { public Monitor getMonitor () { checkWidget(); Monitor monitor = null; - int /*long*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = OS.gdk_screen_get_default (); if (screen != 0) { int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, paintWindow ()); GdkRectangle dest = new GdkRectangle (); @@ -2785,11 +2785,11 @@ public boolean getVisible () { return (state & HIDDEN) == 0; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { return gtk_button_press_event (widget, event, true); } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event, boolean sendMouseDown) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event, boolean sendMouseDown) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); if (gdkEvent.type == OS.GDK_3BUTTON_PRESS) return 0; @@ -2804,10 +2804,10 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event, bo if (((shell.style & SWT.ON_TOP) != 0) && (((shell.style & SWT.NO_FOCUS) == 0) || ((style & SWT.NO_FOCUS) == 0))) { shell.forceActive(); } - int /*long*/ result = 0; + long /*int*/ result = 0; if (gdkEvent.type == OS.GDK_BUTTON_PRESS) { display.clickCount = 1; - int /*long*/ nextEvent = OS.gdk_event_peek (); + long /*int*/ nextEvent = OS.gdk_event_peek (); if (nextEvent != 0) { int eventType = OS.GDK_EVENT_TYPE (nextEvent); if (eventType == OS.GDK_2BUTTON_PRESS) display.clickCount = 2; @@ -2854,13 +2854,13 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event, bo return result; } -int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); return sendMouseEvent (SWT.MouseUp, gdkEvent.button, display.clickCount, 0, false, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1; } -int /*long*/ gtk_commit (int /*long*/ imcontext, int /*long*/ text) { +long /*int*/ gtk_commit (long /*int*/ imcontext, long /*int*/ text) { if (text == 0) return 0; int length = OS.strlen (text); if (length == 0) return 0; @@ -2871,7 +2871,7 @@ int /*long*/ gtk_commit (int /*long*/ imcontext, int /*long*/ text) { return 0; } -int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_enter_notify_event (long /*int*/ widget, long /*int*/ event) { if (OS.GTK_VERSION >= OS.VERSION (2, 12, 0)) { /* * Feature in GTK. Children of a shell will inherit and display the shell's @@ -2884,7 +2884,7 @@ int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) { char [] chars = fixMnemonic (toolTipText, false); buffer = Converter.wcsToMbcs (null, chars, true); } - int /*long*/ toolHandle = getShell().handle; + long /*int*/ toolHandle = getShell().handle; OS.gtk_widget_set_tooltip_text (toolHandle, buffer); } if (display.currentControl == this) return 0; @@ -2914,7 +2914,7 @@ boolean checkSubwindow () { return false; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { @@ -2956,7 +2956,7 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { } } else { display.ignoreFocus = false; - int /*long*/ grabHandle = OS.gtk_grab_get_current (); + long /*int*/ grabHandle = OS.gtk_grab_get_current (); if (grabHandle != 0) { if (OS.G_OBJECT_TYPE (grabHandle) == OS.GTK_TYPE_MENU ()) { display.ignoreFocus = true; @@ -2972,7 +2972,7 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { return 0; } -int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { +long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { if ((state & OBSCURED) != 0) return 0; if (!hooks (SWT.Paint) && !filters (SWT.Paint)) return 0; GdkEventExpose gdkEvent = new GdkEventExpose (); @@ -2993,34 +2993,34 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { return 0; } -int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ directionType) { +long /*int*/ gtk_focus (long /*int*/ widget, long /*int*/ directionType) { /* Stop GTK traversal for every widget */ return 1; } -int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus_in_event (long /*int*/ widget, long /*int*/ event) { // widget could be disposed at this point if (handle != 0) { Control oldControl = display.imControl; if (oldControl != this) { if (oldControl != null && !oldControl.isDisposed ()) { - int /*long*/ oldIMHandle = oldControl.imHandle (); + long /*int*/ oldIMHandle = oldControl.imHandle (); if (oldIMHandle != 0) OS.gtk_im_context_reset (oldIMHandle); } } if (hooks (SWT.KeyDown) || hooks (SWT.KeyUp)) { - int /*long*/ imHandle = imHandle (); + long /*int*/ imHandle = imHandle (); if (imHandle != 0) OS.gtk_im_context_focus_in (imHandle); } } return 0; } -int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { // widget could be disposed at this point if (handle != 0) { if (hooks (SWT.KeyDown) || hooks (SWT.KeyUp)) { - int /*long*/ imHandle = imHandle (); + long /*int*/ imHandle = imHandle (); if (imHandle != 0) { OS.gtk_im_context_focus_out (imHandle); } @@ -3029,7 +3029,7 @@ int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { return 0; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, event, GdkEventKey.sizeof); @@ -3049,16 +3049,16 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { return super.gtk_key_press_event (widget, event); } -int /*long*/ gtk_key_release_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_key_release_event (long /*int*/ widget, long /*int*/ event) { if (!hasFocus ()) return 0; - int /*long*/ imHandle = imHandle (); + long /*int*/ imHandle = imHandle (); if (imHandle != 0) { if (OS.gtk_im_context_filter_keypress (imHandle, event)) return 1; } return super.gtk_key_release_event (widget, event); } -int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_leave_notify_event (long /*int*/ widget, long /*int*/ event) { if (display.currentControl != this) return 0; display.removeMouseHoverTimeout (handle); int result = 0; @@ -3073,15 +3073,15 @@ int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_mnemonic_activate (int /*long*/ widget, int /*long*/ arg1) { +long /*int*/ gtk_mnemonic_activate (long /*int*/ widget, long /*int*/ arg1) { int result = 0; - int /*long*/ eventPtr = OS.gtk_get_current_event (); + long /*int*/ eventPtr = OS.gtk_get_current_event (); if (eventPtr != 0) { GdkEventKey keyEvent = new GdkEventKey (); OS.memmove (keyEvent, eventPtr, GdkEventKey.sizeof); if (keyEvent.type == OS.GDK_KEY_PRESS) { Control focusControl = display.getFocusControl (); - int /*long*/ focusHandle = focusControl != null ? focusControl.focusHandle () : 0; + long /*int*/ focusHandle = focusControl != null ? focusControl.focusHandle () : 0; if (focusHandle != 0) { display.mnemonicControl = this; OS.gtk_widget_event (focusHandle, eventPtr); @@ -3094,7 +3094,7 @@ int /*long*/ gtk_mnemonic_activate (int /*long*/ widget, int /*long*/ arg1) { return result; } -int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { GdkEventMotion gdkEvent = new GdkEventMotion (); OS.memmove (gdkEvent, event, GdkEventMotion.sizeof); if (this == display.currentControl && (hooks (SWT.MouseHover) || filters (SWT.MouseHover))) { @@ -3104,7 +3104,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { int state = gdkEvent.state; if (gdkEvent.is_hint != 0) { int [] pointer_x = new int [1], pointer_y = new int [1], mask = new int [1]; - int /*long*/ window = eventWindow (); + long /*int*/ window = eventWindow (); OS.gdk_window_get_pointer (window, pointer_x, pointer_y, mask); x = pointer_x [0]; y = pointer_y [0]; @@ -3114,22 +3114,22 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_popup_menu (int /*long*/ widget) { +long /*int*/ gtk_popup_menu (long /*int*/ widget) { if (!hasFocus()) return 0; int [] x = new int [1], y = new int [1]; OS.gdk_window_get_pointer (0, x, y, null); return showMenu (x [0], y [0], SWT.MENU_KEYBOARD) ? 1 : 0; } -int /*long*/ gtk_preedit_changed (int /*long*/ imcontext) { +long /*int*/ gtk_preedit_changed (long /*int*/ imcontext) { display.showIMWindow (this); return 0; } -int /*long*/ gtk_realize (int /*long*/ widget) { - int /*long*/ imHandle = imHandle (); +long /*int*/ gtk_realize (long /*int*/ widget) { + long /*int*/ imHandle = imHandle (); if (imHandle != 0) { - int /*long*/ window = gtk_widget_get_window (paintHandle ()); + long /*int*/ window = gtk_widget_get_window (paintHandle ()); OS.gtk_im_context_set_client_window (imHandle, window); } if (backgroundImage != null) { @@ -3138,7 +3138,7 @@ int /*long*/ gtk_realize (int /*long*/ widget) { return 0; } -int /*long*/ gtk_scroll_event (int /*long*/ widget, int /*long*/ eventPtr) { +long /*int*/ gtk_scroll_event (long /*int*/ widget, long /*int*/ eventPtr) { GdkEventScroll gdkEvent = new GdkEventScroll (); OS.memmove (gdkEvent, eventPtr, GdkEventScroll.sizeof); switch (gdkEvent.direction) { @@ -3154,25 +3154,25 @@ int /*long*/ gtk_scroll_event (int /*long*/ widget, int /*long*/ eventPtr) { return 0; } -int /*long*/ gtk_show_help (int /*long*/ widget, int /*long*/ helpType) { +long /*int*/ gtk_show_help (long /*int*/ widget, long /*int*/ helpType) { if (!hasFocus ()) return 0; return sendHelpEvent (helpType) ? 1 : 0; } -int /*long*/ gtk_style_set (int /*long*/ widget, int /*long*/ previousStyle) { +long /*int*/ gtk_style_set (long /*int*/ widget, long /*int*/ previousStyle) { if (backgroundImage != null) { setBackgroundPixmap (backgroundImage); } return 0; } -int /*long*/ gtk_unrealize (int /*long*/ widget) { - int /*long*/ imHandle = imHandle (); +long /*int*/ gtk_unrealize (long /*int*/ widget) { + long /*int*/ imHandle = imHandle (); if (imHandle != 0) OS.gtk_im_context_set_client_window (imHandle, 0); return 0; } -int /*long*/ gtk_visibility_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_visibility_notify_event (long /*int*/ widget, long /*int*/ event) { /* * As of GTK 2.17.11, obscured controls no longer send expose * events. It is no longer necessary to track visiblity notify @@ -3181,8 +3181,8 @@ int /*long*/ gtk_visibility_notify_event (int /*long*/ widget, int /*long*/ even if (OS.GTK_VERSION >= OS.VERSION (2, 17, 11)) return 0; GdkEventVisibility gdkEvent = new GdkEventVisibility (); OS.memmove (gdkEvent, event, GdkEventVisibility.sizeof); - int /*long*/ paintWindow = paintWindow(); - int /*long*/ window = gdkEvent.window; + long /*int*/ paintWindow = paintWindow(); + long /*int*/ window = gdkEvent.window; if (window == paintWindow) { if (gdkEvent.state == OS.GDK_VISIBILITY_FULLY_OBSCURED) { state |= OBSCURED; @@ -3201,7 +3201,7 @@ int /*long*/ gtk_visibility_notify_event (int /*long*/ widget, int /*long*/ even return 0; } -void gtk_widget_set_has_window (int /*long*/ fixedHandle, boolean value) { +void gtk_widget_set_has_window (long /*int*/ fixedHandle, boolean value) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { OS.gtk_widget_set_has_window (fixedHandle, value); } else { @@ -3209,7 +3209,7 @@ void gtk_widget_set_has_window (int /*long*/ fixedHandle, boolean value) { } } -void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) { +void gtk_widget_size_request (long /*int*/ widget, GtkRequisition requisition) { OS.gtk_widget_size_request (widget, requisition); } @@ -3228,11 +3228,11 @@ void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) { * * @noreference This method is not intended to be referenced by clients. */ -public int /*long*/ internal_new_GC (GCData data) { +public long /*int*/ internal_new_GC (GCData data) { checkWidget (); - int /*long*/ window = paintWindow (); + long /*int*/ window = paintWindow (); if (window == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ gc; + long /*int*/ gc; if (OS.USE_CAIRO) { gc = OS.gdk_cairo_create (window); } else { @@ -3259,7 +3259,7 @@ public int /*long*/ internal_new_GC (GCData data) { return gc; } -int /*long*/ imHandle () { +long /*int*/ imHandle () { return 0; } @@ -3278,9 +3278,9 @@ int /*long*/ imHandle () { * * @noreference This method is not intended to be referenced by clients. */ -public void internal_dispose_GC (int /*long*/ hDC, GCData data) { +public void internal_dispose_GC (long /*int*/ hDC, GCData data) { checkWidget (); - int /*long*/ gc = hDC; + long /*int*/ gc = hDC; if (OS.USE_CAIRO) { Cairo.cairo_destroy (gc); } else { @@ -3423,7 +3423,7 @@ boolean mnemonicMatch (char key) { void register () { super.register (); if (fixedHandle != 0) display.addWidget (fixedHandle, this); - int /*long*/ imHandle = imHandle (); + long /*int*/ imHandle = imHandle (); if (imHandle != 0) display.addWidget (imHandle, this); } @@ -3499,7 +3499,7 @@ void redrawChildren () { void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) { if (!gtk_widget_get_realized(handle)) return; - int /*long*/ window = paintWindow (); + long /*int*/ window = paintWindow (); GdkRectangle rect = new GdkRectangle (); if (redrawAll) { int [] w = new int [1], h = new int [1]; @@ -3553,7 +3553,7 @@ void releaseWidget () { super.releaseWidget (); if (display.currentControl == this) display.currentControl = null; display.removeMouseHoverTimeout (handle); - int /*long*/ imHandle = imHandle (); + long /*int*/ imHandle = imHandle (); if (imHandle != 0) { OS.gtk_im_context_reset (imHandle); OS.gtk_im_context_set_client_window (imHandle, 0); @@ -3578,7 +3578,7 @@ void releaseWidget () { region = null; } -void restackWindow (int /*long*/ window, int /*long*/ sibling, boolean above) { +void restackWindow (long /*int*/ window, long /*int*/ sibling, boolean above) { if (OS.GTK_VERSION >= OS.VERSION (2, 17, 11)) { OS.gdk_window_restack (window, sibling, above); } else { @@ -3591,8 +3591,8 @@ void restackWindow (int /*long*/ window, int /*long*/ sibling, boolean above) { * When the receiver is not a top level shell, XReconfigureWMWindow () * behaves the same as XConfigureWindow (). */ - int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window); - int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (window); + long /*int*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window); + long /*int*/ xWindow = OS.gdk_x11_drawable_get_xid (window); int xScreen = OS.XDefaultScreen (xDisplay); int flags = OS.CWStackMode | OS.CWSibling; XWindowChanges changes = new XWindowChanges (); @@ -3646,7 +3646,7 @@ void sendFocusEvent (int type) { } } -boolean sendHelpEvent (int /*long*/ helpType) { +boolean sendHelpEvent (long /*int*/ helpType) { Control control = this; while (control != null) { if (control.hooks (SWT.Help)) { @@ -3677,7 +3677,7 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen event.x = (int)x; event.y = (int)y; } else { - int /*long*/ window = eventWindow (); + long /*int*/ window = eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); event.x = (int)x - origin_x [0]; @@ -3733,7 +3733,7 @@ public void setBackground (Color color) { } boolean set = false; if (gdkColor == null) { - int /*long*/ style = OS.gtk_widget_get_modifier_style (handle); + long /*int*/ style = OS.gtk_widget_get_modifier_style (handle); set = (OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL) & OS.GTK_RC_BG) != 0; } else { GdkColor oldColor = getBackgroundColor (); @@ -3750,10 +3750,10 @@ public void setBackground (Color color) { } } -void setBackgroundColor (int /*long*/ handle, GdkColor color) { +void setBackgroundColor (long /*int*/ handle, GdkColor color) { int index = OS.GTK_STATE_NORMAL; - int /*long*/ style = OS.gtk_widget_get_modifier_style (handle); - int /*long*/ ptr = OS.gtk_rc_style_get_bg_pixmap_name (style, index); + long /*int*/ style = OS.gtk_widget_get_modifier_style (handle); + long /*int*/ ptr = OS.gtk_rc_style_get_bg_pixmap_name (style, index); if (ptr != 0) OS.g_free (ptr); ptr = 0; @@ -3821,7 +3821,7 @@ public void setBackgroundImage (Image image) { } void setBackgroundPixmap (Image image) { - int /*long*/ window = gtk_widget_get_window (paintHandle ()); + long /*int*/ window = gtk_widget_get_window (paintHandle ()); if (window != 0) { if (image.pixmap != 0) { OS.gdk_window_set_back_pixmap (window, image.pixmap, false); @@ -3833,11 +3833,11 @@ void setBackgroundPixmap (Image image) { * * For now draw background in windowProc(). */ -// int /*long*/ surface = image.surface; +// long /*int*/ surface = image.surface; // int type = Cairo.cairo_surface_get_type(surface); // switch (type) { // case Cairo.CAIRO_SURFACE_TYPE_XLIB: -// int /*long*/ pixmap = OS.gdk_pixmap_foreign_new(Cairo.cairo_xlib_surface_get_drawable(surface)); +// long /*int*/ pixmap = OS.gdk_pixmap_foreign_new(Cairo.cairo_xlib_surface_get_drawable(surface)); // OS.gdk_window_set_back_pixmap (window, pixmap, false); // OS.g_object_unref(pixmap); // break; @@ -3896,14 +3896,14 @@ public void setCursor (Cursor cursor) { setCursor (cursor != null ? cursor.handle : 0); } -void setCursor (int /*long*/ cursor) { - int /*long*/ window = eventWindow (); +void setCursor (long /*int*/ cursor) { + long /*int*/ window = eventWindow (); if (window != 0) { OS.gdk_window_set_cursor (window, cursor); if (!OS.GDK_WINDOWING_X11 ()) { OS.gdk_flush (); } else { - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); OS.XFlush (xDisplay); } } @@ -3971,9 +3971,9 @@ public void setEnabled (boolean enabled) { } } else { OS.gtk_widget_realize (handle); - int /*long*/ parentHandle = parent.eventHandle (); - int /*long*/ window = parent.eventWindow (); - int /*long*/ topHandle = topHandle (); + long /*int*/ parentHandle = parent.eventHandle (); + long /*int*/ window = parent.eventWindow (); + long /*int*/ topHandle = topHandle (); GdkWindowAttr attributes = new GdkWindowAttr (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (topHandle, allocation); @@ -4037,7 +4037,7 @@ public void setFont (Font font) { checkWidget(); if (((state & FONT) == 0) && font == null) return; this.font = font; - int /*long*/ fontDesc; + long /*int*/ fontDesc; if (font == null) { fontDesc = defaultFont ().handle; } else { @@ -4052,7 +4052,7 @@ public void setFont (Font font) { setFontDescription (fontDesc); } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { OS.gtk_widget_modify_font (handle, font); } @@ -4083,7 +4083,7 @@ public void setForeground (Color color) { } boolean set = false; if (gdkColor == null) { - int /*long*/ style = OS.gtk_widget_get_modifier_style (handle); + long /*int*/ style = OS.gtk_widget_get_modifier_style (handle); set = (OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL) & OS.GTK_RC_FG) != 0; } else { GdkColor oldColor = getForegroundColor (); @@ -4111,7 +4111,7 @@ void setInitialBounds () { * first sized. The fix is to set the value to (0, 0) as * expected by SWT. */ - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation(); if ((parent.style & SWT.MIRRORED) != 0) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { @@ -4234,7 +4234,7 @@ public boolean setParent (Composite parent) { if (this.parent == parent) return true; if (!isReparentable ()) return false; OS.gtk_widget_realize (parent.handle); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; @@ -4256,7 +4256,7 @@ public boolean setParent (Composite parent) { newDecorations.fixAccelGroup (); oldDecorations.fixAccelGroup (); } - int /*long*/ newParent = parent.parentingHandle(); + long /*int*/ newParent = parent.parentingHandle(); OS.gtk_widget_reparent(topHandle, newParent); OS.gtk_fixed_move (newParent, topHandle, x, y); /* @@ -4286,7 +4286,7 @@ void setParentBackground () { if (fixedHandle != 0) setBackgroundColor (fixedHandle, null); } -void setParentWindow (int /*long*/ widget) { +void setParentWindow (long /*int*/ widget) { } boolean setRadioSelection (boolean value) { @@ -4321,7 +4321,7 @@ public void setRedraw (boolean redraw) { if (redraw) { if (--drawCount == 0) { if (redrawWindow != 0) { - int /*long*/ window = paintWindow (); + long /*int*/ window = paintWindow (); /* Explicitly hiding the window avoids flicker on GTK+ >= 2.6 */ OS.gdk_window_hide (redrawWindow); OS.gdk_window_destroy (redrawWindow); @@ -4332,7 +4332,7 @@ public void setRedraw (boolean redraw) { } else { if (drawCount++ == 0) { if (gtk_widget_get_realized (handle)) { - int /*long*/ window = paintWindow (); + long /*int*/ window = paintWindow (); Rectangle rect = getBounds (); GdkWindowAttr attributes = new GdkWindowAttr (); attributes.width = rect.width; @@ -4447,7 +4447,7 @@ public void setTouchEnabled(boolean enabled) { public void setVisible (boolean visible) { checkWidget(); if (((state & HIDDEN) == 0) == visible) return; - int /*long*/ topHandle = topHandle(); + long /*int*/ topHandle = topHandle(); if (visible) { /* * It is possible (but unlikely), that application @@ -4528,11 +4528,11 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi } } - int /*long*/ topHandle = topHandle (); - int /*long*/ siblingHandle = sibling != null ? sibling.topHandle () : 0; - int /*long*/ window = gtk_widget_get_window (topHandle); + long /*int*/ topHandle = topHandle (); + long /*int*/ siblingHandle = sibling != null ? sibling.topHandle () : 0; + long /*int*/ window = gtk_widget_get_window (topHandle); if (window != 0) { - int /*long*/ siblingWindow = 0; + long /*int*/ siblingWindow = 0; if (sibling != null) { if (above && sibling.enableWindow != 0) { siblingWindow = enableWindow; @@ -4540,7 +4540,7 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi siblingWindow = OS.GTK_WIDGET_WINDOW (siblingHandle); } } - int /*long*/ redrawWindow = fixChildren ? parent.redrawWindow : 0; + long /*int*/ redrawWindow = fixChildren ? parent.redrawWindow : 0; if (!OS.GDK_WINDOWING_X11 () || (siblingWindow == 0 && (!above || redrawWindow == 0))) { if (above) { OS.gdk_window_raise (window); @@ -4551,7 +4551,7 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi OS.gdk_window_lower (window); } } else { - int /*long*/ siblingW = siblingWindow != 0 ? siblingWindow : redrawWindow; + long /*int*/ siblingW = siblingWindow != 0 ? siblingWindow : redrawWindow; boolean stack_mode = above; if (redrawWindow != 0 && siblingWindow == 0) stack_mode = false; restackWindow (window, siblingW, stack_mode); @@ -4639,8 +4639,8 @@ boolean showMenu (int x, int y, int detail) { void showWidget () { // Comment this line to disable zero-sized widgets state |= ZERO_WIDTH | ZERO_HEIGHT; - int /*long*/ topHandle = topHandle (); - int /*long*/ parentHandle = parent.parentingHandle (); + long /*int*/ topHandle = topHandle (); + long /*int*/ parentHandle = parent.parentingHandle (); parent.setParentWindow (topHandle); OS.gtk_container_add (parentHandle, topHandle); if (handle != 0 && handle != topHandle) OS.gtk_widget_show (handle); @@ -5082,7 +5082,7 @@ void update (boolean all, boolean flush) { // checkWidget(); if (!gtk_widget_get_visible (topHandle ())) return; if (!gtk_widget_get_realized (handle)) return; - int /*long*/ window = paintWindow (); + long /*int*/ window = paintWindow (); if (flush) display.flushExposes (window, all); OS.gdk_window_process_updates (window, all); OS.gdk_flush (); @@ -5100,7 +5100,7 @@ void updateLayout (boolean all) { /* Do nothing */ } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { switch ((int)/*64*/user_data) { case EXPOSE_EVENT_INVERSE: { if ((state & OBSCURED) != 0) break; @@ -5109,8 +5109,8 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ us if (control != null && control.backgroundImage != null) { GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof); - int /*long*/ paintWindow = paintWindow(); - int /*long*/ window = gdkEvent.window; + long /*int*/ paintWindow = paintWindow(); + long /*int*/ window = gdkEvent.window; if (window != paintWindow) break; drawBackground(control, window, gdkEvent.region, gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height); } @@ -5120,10 +5120,10 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ us if (control != null && control.backgroundImage != null) { GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof); - int /*long*/ paintWindow = paintWindow(); - int /*long*/ window = gdkEvent.window; + long /*int*/ paintWindow = paintWindow(); + long /*int*/ window = gdkEvent.window; if (window != paintWindow) break; - int /*long*/ gdkGC = OS.gdk_gc_new (window); + long /*int*/ gdkGC = OS.gdk_gc_new (window); OS.gdk_gc_set_clip_region (gdkGC, gdkEvent.region); int[] dest_x = new int[1], dest_y = new int[1]; OS.gtk_widget_translate_coordinates (paintHandle (), control.paintHandle (), 0, 0, dest_x, dest_y); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java index 96cd6be002..c64230064b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java @@ -435,7 +435,7 @@ void dropDownCalendar(boolean drop) { display.addFilter(SWT.MouseDown, clickListener); } -int /*long*/ focusHandle () { +long /*int*/ focusHandle () { if (text != null) return text.handle; return super.focusHandle (); } @@ -687,17 +687,17 @@ public int getYear () { } } -int /*long*/ gtk_day_selected (int /*long*/ widget) { +long /*int*/ gtk_day_selected (long /*int*/ widget) { sendSelectionEvent (); return 0; } -int /*long*/ gtk_day_selected_double_click (int /*long*/ widget) { +long /*int*/ gtk_day_selected_double_click (long /*int*/ widget) { sendSelectionEvent (SWT.DefaultSelection); return 0; } -int /*long*/ gtk_month_changed (int /*long*/ widget) { +long /*int*/ gtk_month_changed (long /*int*/ widget) { /* * Feature in GTK. "month-changed" signal is emitted when the * calendar is displayed though the day/month is not changed. diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java index 70e1d66a6c..aea02d3370 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java @@ -103,7 +103,7 @@ public class Decorations extends Canvas { Menu [] menus; Control savedFocus; Button defaultButton, saveDefault; - int /*long*/ accelGroup, vboxHandle; + long /*int*/ accelGroup, vboxHandle; Decorations () { /* Do nothing */ @@ -172,17 +172,17 @@ void _setImages (Image [] images) { sort (bestImages); images = bestImages; } - int /*long*/ pixbufs = 0; + long /*int*/ pixbufs = 0; if (images != null) { for (int i = 0; i < images.length; i++) { Image image = images [i]; - int /*long*/ pixbuf = ImageList.createPixbuf (image); + long /*int*/ pixbuf = ImageList.createPixbuf (image); pixbufs = OS.g_list_append (pixbufs, pixbuf); } } OS.gtk_window_set_icon_list (topHandle (), pixbufs); - int /*long*/ [] data = new int /*long*/ [1]; - int /*long*/ temp = pixbufs; + long /*int*/ [] data = new long /*int*/ [1]; + long /*int*/ temp = pixbufs; while (temp != 0) { OS.memmove (data, temp, OS.PTR_SIZEOF); OS.g_object_unref (data [0]); @@ -233,7 +233,7 @@ void createAccelGroup () { accelGroup = OS.gtk_accel_group_new (); if (accelGroup == 0) error (SWT.ERROR_NO_HANDLES); //FIXME - what should we do for Decorations - int /*long*/ shellHandle = topHandle (); + long /*int*/ shellHandle = topHandle (); OS.gtk_window_add_accel_group (shellHandle, accelGroup); } @@ -244,7 +244,7 @@ void createWidget (int index) { void destroyAccelGroup () { if (accelGroup == 0) return; - int /*long*/ shellHandle = topHandle (); + long /*int*/ shellHandle = topHandle (); OS.gtk_window_remove_accel_group (shellHandle, accelGroup); //TEMPORARY CODE // OS.g_object_unref (accelGroup); @@ -547,7 +547,7 @@ boolean restoreFocus () { */ public void setDefaultButton (Button button) { checkWidget(); - int /*long*/ buttonHandle = 0; + long /*int*/ buttonHandle = 0; if (button != null) { if (button.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (button.menuShell () != this) error (SWT.ERROR_INVALID_PARENT); @@ -766,7 +766,7 @@ boolean traverseReturn () { * key. */ if (!button.isVisible () || !button.isEnabled ()) return true; - int /*long*/ shellHandle = _getShell ().topHandle (); + long /*int*/ shellHandle = _getShell ().topHandle (); return OS.gtk_window_activate_default (shellHandle); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java index d10d2b8bf1..14891b2434 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java @@ -119,9 +119,9 @@ public String open () { } String openChooserDialog () { byte [] titleBytes = Converter.wcsToMbcs (null, title, true); - int /*long*/ shellHandle = parent.topHandle (); + long /*int*/ shellHandle = parent.topHandle (); Display display = parent != null ? parent.getDisplay (): Display.getCurrent (); - int /*long*/ handle = 0; + long /*int*/ handle = 0; if (display.getDismissalAlignment() == SWT.RIGHT) { handle = OS.gtk_file_chooser_dialog_new (titleBytes, shellHandle, OS.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, OS.GTK_STOCK_CANCEL (), OS.GTK_RESPONSE_CANCEL, OS.GTK_STOCK_OK (), OS.GTK_RESPONSE_OK, 0); } else { @@ -129,11 +129,11 @@ String openChooserDialog () { } if (handle == 0) error (SWT.ERROR_NO_HANDLES); if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { - int /*long*/ group = OS.gtk_window_get_group(0); + long /*int*/ group = OS.gtk_window_get_group(0); OS.gtk_window_group_add_window (group, handle); } OS.gtk_window_set_modal (handle, true); - int /*long*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle); + long /*int*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle); if (pixbufs != 0) { OS.gtk_window_set_icon_list (handle, pixbufs); OS.g_list_free (pixbufs); @@ -151,7 +151,7 @@ String openChooserDialog () { * when setting a file name that is not a true canonical path. * The fix is to use the canonical path. */ - int /*long*/ ptr = OS.realpath (buffer, null); + long /*int*/ ptr = OS.realpath (buffer, null); if (ptr != 0) { OS.gtk_file_chooser_set_current_folder (handle, ptr); OS.g_free (ptr); @@ -159,7 +159,7 @@ String openChooserDialog () { } if (message.length () > 0) { byte [] buffer = Converter.wcsToMbcs (null, message, true); - int /*long*/ box = 0; + long /*int*/ box = 0; if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) { box = OS.gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, 0); OS.gtk_box_set_homogeneous (box, false); @@ -167,7 +167,7 @@ String openChooserDialog () { box = OS.gtk_hbox_new (false, 0); } if (box == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ label = OS.gtk_label_new (buffer); + long /*int*/ label = OS.gtk_label_new (buffer); if (label == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (box, label); OS.gtk_widget_show (label); @@ -183,7 +183,7 @@ String openChooserDialog () { display.setModalDialog (this); } int signalId = 0; - int /*long*/ hookId = 0; + long /*int*/ hookId = 0; if ((style & SWT.RIGHT_TO_LEFT) != 0) { signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET()); hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0); @@ -203,14 +203,14 @@ String openChooserDialog () { display.setModalDialog (oldModal); } if (response == OS.GTK_RESPONSE_OK) { - int /*long*/ path = OS.gtk_file_chooser_get_filename (handle); + long /*int*/ path = OS.gtk_file_chooser_get_filename (handle); if (path != 0) { - int /*long*/ utf8Ptr = OS.g_filename_to_utf8 (path, -1, null, null, null); + long /*int*/ utf8Ptr = OS.g_filename_to_utf8 (path, -1, null, null, null); if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (path); if (path != utf8Ptr) OS.g_free (path); if (utf8Ptr != 0) { - int /*long*/ [] items_written = new int /*long*/ [1]; - int /*long*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null); + long /*int*/ [] items_written = new long /*int*/ [1]; + long /*int*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null); OS.g_free (utf8Ptr); if (utf16Ptr != 0) { int clength = (int)/*64*/items_written [0]; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java index d478017676..3735b03dc3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java @@ -99,30 +99,30 @@ public class Display extends Device { /* Events Dispatching and Callback */ int gdkEventCount; - int /*long*/ [] gdkEvents; + long /*int*/ [] gdkEvents; Widget [] gdkEventWidgets; int [] dispatchEvents; Event [] eventQueue; - int /*long*/ fds; + long /*int*/ fds; int allocated_nfds; boolean wake; int [] max_priority = new int [1], timeout = new int [1]; Callback eventCallback, filterCallback; - int /*long*/ eventProc, filterProc, windowProc2, windowProc3, windowProc4, windowProc5; + long /*int*/ eventProc, filterProc, windowProc2, windowProc3, windowProc4, windowProc5; Callback windowCallback2, windowCallback3, windowCallback4, windowCallback5; EventTable eventTable, filterTable; static String APP_NAME = "SWT"; //$NON-NLS-1$ static String APP_VERSION = ""; //$NON-NLS-1$ static final String DISPATCH_EVENT_KEY = "org.eclipse.swt.internal.gtk.dispatchEvent"; //$NON-NLS-1$ static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget"; //$NON-NLS-1$ - int /*long*/ [] closures; + long /*int*/ [] closures; int [] signalIds; - int /*long*/ shellMapProcClosure; + long /*int*/ shellMapProcClosure; /* Widget Table */ int [] indexTable; int freeSlot; - int /*long*/ lastHandle; + long /*int*/ lastHandle; Widget lastWidget; Widget [] widgetTable; final static int GROW_SIZE = 1024; @@ -153,7 +153,7 @@ public class Display extends Device { /* Input method resources */ Control imControl; - int /*long*/ preeditWindow, preeditLabel; + long /*int*/ preeditWindow, preeditLabel; /* Sync/Async Widget Communication */ Synchronizer synchronizer = new Synchronizer (this); @@ -174,40 +174,40 @@ public class Display extends Device { int [] timerIds; Runnable [] timerList; Callback timerCallback; - int /*long*/ timerProc; + long /*int*/ timerProc; Callback windowTimerCallback; - int /*long*/ windowTimerProc; + long /*int*/ windowTimerProc; /* Caret */ Caret currentCaret; Callback caretCallback; int caretId; - int /*long*/ caretProc; + long /*int*/ caretProc; /* Mnemonics */ Control mnemonicControl; /* Mouse hover */ int mouseHoverId; - int /*long*/ mouseHoverHandle, mouseHoverProc; + long /*int*/ mouseHoverHandle, mouseHoverProc; Callback mouseHoverCallback; /* Menu position callback */ - int /*long*/ menuPositionProc; + long /*int*/ menuPositionProc; Callback menuPositionCallback; /* Tooltip size allocate callback */ - int /*long*/ sizeAllocateProc; + long /*int*/ sizeAllocateProc; Callback sizeAllocateCallback; - int /*long*/ sizeRequestProc; + long /*int*/ sizeRequestProc; Callback sizeRequestCallback; /* Shell map callback */ - int /*long*/ shellMapProc; + long /*int*/ shellMapProc; Callback shellMapCallback; /* Idle proc callback */ - int /*long*/ idleProc; + long /*int*/ idleProc; int idleHandle; Callback idleCallback; static final String ADD_IDLE_PROC_KEY = "org.eclipse.swt.internal.gtk.addIdleProc"; //$NON-NLS-1$ @@ -216,27 +216,27 @@ public class Display extends Device { boolean idleNeeded; /* GtkTreeView callbacks */ - int /*long*/ cellDataProc; + long /*int*/ cellDataProc; Callback cellDataCallback; /* Set direction callback */ - int /*long*/ setDirectionProc; + long /*int*/ setDirectionProc; Callback setDirectionCallback; static final String GET_DIRECTION_PROC_KEY = "org.eclipse.swt.internal.gtk.getDirectionProc"; //$NON-NLS-1$ /* Set emissionProc callback */ - int /*long*/ emissionProc; + long /*int*/ emissionProc; Callback emissionProcCallback; static final String GET_EMISSION_PROC_KEY = "org.eclipse.swt.internal.gtk.getEmissionProc"; //$NON-NLS-1$ /* Get all children callback */ - int /*long*/ allChildrenProc, allChildren; + long /*int*/ allChildrenProc, allChildren; Callback allChildrenCallback; /* Settings callbacks */ - int /*long*/ signalProc; + long /*int*/ signalProc; Callback signalCallback; - int /*long*/ shellHandle; + long /*int*/ shellHandle; boolean settingsChanged, runSettings; static final int STYLE_SET = 1; static final int PROPERTY_NOTIFY = 2; @@ -248,14 +248,14 @@ public class Display extends Device { Control currentControl; /* Flush exposes */ - int /*long*/ checkIfEventProc; + long /*int*/ checkIfEventProc; Callback checkIfEventCallback; - int /*long*/ flushWindow; + long /*int*/ flushWindow; boolean flushAll; GdkRectangle flushRect = new GdkRectangle (); XExposeEvent exposeEvent = new XExposeEvent (); XVisibilityEvent visibilityEvent = new XVisibilityEvent (); - int /*long*/ [] flushData = new int /*long*/ [1]; + long /*int*/ [] flushData = new long /*int*/ [1]; /* System Resources */ Font systemFont; @@ -285,7 +285,7 @@ public class Display extends Device { int lastEventTime, lastUserEventTime; /* Pango layout constructor */ - int /*long*/ pangoLayoutNewProc; + long /*int*/ pangoLayoutNewProc; /* Custom Resize */ double resizeLocationX, resizeLocationY; @@ -293,16 +293,16 @@ public class Display extends Device { int resizeMode; /* Fixed Subclass */ - static int /*long*/ fixed_type; - static int /*long*/ fixed_info_ptr; + static long /*int*/ fixed_type; + static long /*int*/ fixed_info_ptr; static Callback fixedClassInitCallback, fixedMapCallback, fixedSizeAllocateCallback; - static int /*long*/ fixedClassInitProc, fixedMapProc, fixedSizeAllocateProc, oldFixedSizeAllocateProc; + static long /*int*/ fixedClassInitProc, fixedMapProc, fixedSizeAllocateProc, oldFixedSizeAllocateProc; /* Renderer Subclass */ - static int /*long*/ text_renderer_type, pixbuf_renderer_type, toggle_renderer_type; - static int /*long*/ text_renderer_info_ptr, pixbuf_renderer_info_ptr, toggle_renderer_info_ptr; + static long /*int*/ text_renderer_type, pixbuf_renderer_type, toggle_renderer_type; + static long /*int*/ text_renderer_info_ptr, pixbuf_renderer_info_ptr, toggle_renderer_info_ptr; static Callback rendererClassInitCallback, rendererRenderCallback, rendererGetSizeCallback; - static int /*long*/ rendererClassInitProc, rendererRenderProc, rendererGetSizeProc; + static long /*int*/ rendererClassInitProc, rendererRenderProc, rendererGetSizeProc; /* Key Mappings */ static final int [] [] KeyTable = { @@ -550,16 +550,16 @@ void addLayoutDeferred (Composite comp) { layoutDeferred[layoutDeferredCount++] = comp; } -void addGdkEvent (int /*long*/ event) { +void addGdkEvent (long /*int*/ event) { if (gdkEvents == null) { int length = GROW_SIZE; - gdkEvents = new int /*long*/ [length]; + gdkEvents = new long /*int*/ [length]; gdkEventWidgets = new Widget [length]; gdkEventCount = 0; } if (gdkEventCount == gdkEvents.length) { int length = gdkEventCount + GROW_SIZE; - int /*long*/ [] newEvents = new int /*long*/ [length]; + long /*int*/ [] newEvents = new long /*int*/ [length]; System.arraycopy (gdkEvents, 0, newEvents, 0, gdkEventCount); gdkEvents = newEvents; Widget [] newWidgets = new Widget [length]; @@ -567,7 +567,7 @@ void addGdkEvent (int /*long*/ event) { gdkEventWidgets = newWidgets; } Widget widget = null; - int /*long*/ handle = OS.gtk_get_event_widget (event); + long /*int*/ handle = OS.gtk_get_event_widget (event); if (handle != 0) { do { widget = getWidget (handle); @@ -618,7 +618,7 @@ public void addListener (int eventType, Listener listener) { eventTable.hook (eventType, listener); } -int /*long*/ allChildrenProc (int /*long*/ widget, int /*long*/ recurse) { +long /*int*/ allChildrenProc (long /*int*/ widget, long /*int*/ recurse) { allChildren = OS.g_list_append (allChildren, widget); if (recurse != 0 && OS.GTK_IS_CONTAINER (widget)) { OS.gtk_container_forall (widget, allChildrenProc, recurse); @@ -626,7 +626,7 @@ int /*long*/ allChildrenProc (int /*long*/ widget, int /*long*/ recurse) { return 0; } -void addMouseHoverTimeout (int /*long*/ handle) { +void addMouseHoverTimeout (long /*int*/ handle) { if (mouseHoverId != 0) OS.g_source_remove (mouseHoverId); mouseHoverId = OS.g_timeout_add (400, mouseHoverProc, handle); mouseHoverHandle = handle; @@ -660,7 +660,7 @@ void addSkinnableWidget (Widget widget) { skinList [skinCount++] = widget; } -void addWidget (int /*long*/ handle, Widget widget) { +void addWidget (long /*int*/ handle, Widget widget) { if (handle == 0) return; if (freeSlot == -1) { int length = (freeSlot = indexTable.length) + GROW_SIZE; @@ -733,12 +733,12 @@ public void beep () { if (!OS.GDK_WINDOWING_X11 ()) { OS.gdk_flush (); } else { - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); OS.XFlush (xDisplay); } } -int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*long*/ tree_model, int /*long*/ iter, int /*long*/ data) { +long /*int*/ cellDataProc (long /*int*/ tree_column, long /*int*/ cell, long /*int*/ tree_model, long /*int*/ iter, long /*int*/ data) { Widget widget = getWidget (data); if (widget == null) return 0; return widget.cellDataProc (tree_column, cell, tree_model, iter, data); @@ -761,7 +761,7 @@ static void checkDisplay (Thread thread, boolean multiple) { } } -int /*long*/ checkIfEventProc (int /*long*/ display, int /*long*/ xEvent, int /*long*/ userData) { +long /*int*/ checkIfEventProc (long /*int*/ display, long /*int*/ xEvent, long /*int*/ userData) { int type = OS.X_EVENT_TYPE (xEvent); switch (type) { case OS.VisibilityNotify: @@ -777,7 +777,7 @@ int /*long*/ checkIfEventProc (int /*long*/ display, int /*long*/ xEvent, int /* default: return 0; } - int /*long*/ window = 0; + long /*int*/ window = 0; if (OS.GTK_VERSION >= OS.VERSION (2, 24, 0)) { window = OS.gdk_x11_window_lookup_for_display(OS.gdk_display_get_default(), OS.X_EVENT_WINDOW (xEvent)); } else { @@ -786,7 +786,7 @@ int /*long*/ checkIfEventProc (int /*long*/ display, int /*long*/ xEvent, int /* if (window == 0) return 0; if (flushWindow != 0) { if (flushAll) { - int /*long*/ tempWindow = window; + long /*int*/ tempWindow = window; do { if (tempWindow == flushWindow) break; } while ((tempWindow = OS.gdk_window_get_parent (tempWindow)) != 0); @@ -811,7 +811,7 @@ int /*long*/ checkIfEventProc (int /*long*/ display, int /*long*/ xEvent, int /* case OS.VisibilityNotify: { OS.memmove (visibilityEvent, xEvent, XVisibilityEvent.sizeof); OS.gdk_window_get_user_data (window, flushData); - int /*long*/ handle = flushData [0]; + long /*int*/ handle = flushData [0]; Widget widget = handle != 0 ? getWidget (handle) : null; if (widget != null && widget instanceof Control) { Control control = (Control) widget; @@ -909,11 +909,11 @@ void createDisplay (DeviceData data) { if (OS.GTK_VERSION < OS.VERSION(2, 24, 0)) { OS.gtk_set_locale(); } - if (!OS.gtk_init_check (new int /*long*/ [] {0}, null)) { + if (!OS.gtk_init_check (new long /*int*/ [] {0}, null)) { SWT.error (SWT.ERROR_NO_HANDLES, null, " [gtk_init_check() failed]"); //$NON-NLS-1$ } if (OS.GDK_WINDOWING_X11 ()) xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ ptr = OS.gtk_check_version (MAJOR, MINOR, MICRO); + long /*int*/ ptr = OS.gtk_check_version (MAJOR, MINOR, MICRO); if (ptr != 0) { int length = OS.strlen (ptr); byte [] buffer = new byte [length]; @@ -1011,14 +1011,14 @@ void createDisplay (DeviceData data) { OS.gdk_window_add_filter (0, filterProc, 0); if (OS.GDK_WINDOWING_X11 ()) { - int /*long*/ xWindow; + long /*int*/ xWindow; if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){ xWindow = OS.gdk_x11_drawable_get_xid (OS.gtk_widget_get_window (shellHandle)); } else { xWindow = OS.gdk_x11_drawable_get_xid (OS.GTK_WIDGET_WINDOW (shellHandle)); } byte[] atomName = Converter.wcsToMbcs (null, "SWT_Window_" + APP_NAME, true); //$NON-NLS-1$ - int /*long*/ atom = OS.XInternAtom (xDisplay, atomName, false); + long /*int*/ atom = OS.XInternAtom (xDisplay, atomName, false); OS.XSetSelectionOwner (xDisplay, atom, xWindow, OS.CurrentTime); OS.XGetSelectionOwner (xDisplay, atom); } @@ -1031,9 +1031,9 @@ void createDisplay (DeviceData data) { } Image createImage (String name) { - int /*long*/ style = OS.gtk_widget_get_default_style (); + long /*int*/ style = OS.gtk_widget_get_default_style (); byte[] buffer = Converter.wcsToMbcs (null, name, true); - int /*long*/ pixbuf = OS.gtk_icon_set_render_icon ( + long /*int*/ pixbuf = OS.gtk_icon_set_render_icon ( OS.gtk_icon_factory_lookup_default (buffer), style, OS.GTK_TEXT_DIR_NONE, OS.GTK_STATE_NORMAL, OS.GTK_ICON_SIZE_DIALOG, 0, 0); if (pixbuf == 0) return null; @@ -1041,7 +1041,7 @@ Image createImage (String name) { int height = OS.gdk_pixbuf_get_height (pixbuf); int stride = OS.gdk_pixbuf_get_rowstride (pixbuf); boolean hasAlpha = OS.gdk_pixbuf_get_has_alpha (pixbuf); - int /*long*/ pixels = OS.gdk_pixbuf_get_pixels (pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels (pixbuf); byte [] data = new byte [stride * height]; OS.memmove (data, pixels, data.length); OS.g_object_unref (pixbuf); @@ -1093,7 +1093,7 @@ protected void destroy () { void destroyDisplay () { } -int /*long*/ emissionProc (int /*long*/ ihint, int /*long*/ n_param_values, int /*long*/ param_values, int /*long*/ data) { +long /*int*/ emissionProc (long /*int*/ ihint, long /*int*/ n_param_values, long /*int*/ param_values, long /*int*/ data) { if (OS.gtk_widget_get_toplevel (OS.g_value_peek_pointer(param_values)) == data) { OS.gtk_widget_set_direction (OS.g_value_peek_pointer(param_values), OS.GTK_TEXT_DIR_RTL); } @@ -1162,7 +1162,7 @@ void error (int code) { SWT.error (code); } -int /*long*/ eventProc (int /*long*/ event, int /*long*/ data) { +long /*int*/ eventProc (long /*int*/ event, long /*int*/ data) { /* * Use gdk_event_get_time() rather than event.time or * gtk_get_current_event_time(). If the event does not @@ -1219,7 +1219,7 @@ int /*long*/ eventProc (int /*long*/ event, int /*long*/ data) { * * @noreference This method is not intended to be referenced by clients. */ -public Widget findWidget (int /*long*/ handle) { +public Widget findWidget (long /*int*/ handle) { checkDevice (); return getWidget (handle); } @@ -1248,7 +1248,7 @@ public Widget findWidget (int /*long*/ handle) { * * @since 3.1 */ -public Widget findWidget (int /*long*/ handle, int /*long*/ id) { +public Widget findWidget (long /*int*/ handle, long /*int*/ id) { checkDevice (); return null; } @@ -1270,12 +1270,12 @@ public Widget findWidget (int /*long*/ handle, int /*long*/ id) { * * @since 3.3 */ -public Widget findWidget (Widget widget, int /*long*/ id) { +public Widget findWidget (Widget widget, long /*int*/ id) { checkDevice (); return null; } -static int /*long*/ fixedClassInitProc (int /*long*/ g_class, int /*long*/ class_data) { +static long /*int*/ fixedClassInitProc (long /*int*/ g_class, long /*int*/ class_data) { GtkWidgetClass klass = new GtkWidgetClass (); OS.memmove (klass, g_class); klass.map = fixedMapProc; @@ -1285,21 +1285,21 @@ static int /*long*/ fixedClassInitProc (int /*long*/ g_class, int /*long*/ class return 0; } -static int /*long*/ fixedMapProc (int /*long*/ handle) { +static long /*int*/ fixedMapProc (long /*int*/ handle) { Display display = getCurrent (); Widget widget = display.getWidget (handle); if (widget != null) return widget.fixedMapProc (handle); return 0; } -static int /*long*/ fixedSizeAllocateProc (int /*long*/ handle, int /*long*/ allocation) { +static long /*int*/ fixedSizeAllocateProc (long /*int*/ handle, long /*int*/ allocation) { Display display = getCurrent (); Widget widget = display.getWidget (handle); if (widget != null) return widget.fixedSizeAllocateProc (handle, allocation); return OS.Call (oldFixedSizeAllocateProc, handle, allocation); } -static int /*long*/ rendererClassInitProc (int /*long*/ g_class, int /*long*/ class_data) { +static long /*int*/ rendererClassInitProc (long /*int*/ g_class, long /*int*/ class_data) { GtkCellRendererClass klass = new GtkCellRendererClass (); OS.memmove (klass, g_class); klass.render = rendererRenderProc; @@ -1308,28 +1308,28 @@ static int /*long*/ rendererClassInitProc (int /*long*/ g_class, int /*long*/ cl return 0; } -static int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ handle, int /*long*/ cell_area, int /*long*/ x_offset, int /*long*/ y_offset, int /*long*/ width, int /*long*/ height) { +static long /*int*/ rendererGetSizeProc (long /*int*/ cell, long /*int*/ handle, long /*int*/ cell_area, long /*int*/ x_offset, long /*int*/ y_offset, long /*int*/ width, long /*int*/ height) { Display display = getCurrent (); Widget widget = display.getWidget (handle); if (widget != null) return widget.rendererGetSizeProc (cell, handle, cell_area, x_offset, y_offset, width, height); return 0; } -static int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*long*/ handle, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ expose_area, int /*long*/ flags) { +static long /*int*/ rendererRenderProc (long /*int*/ cell, long /*int*/ window, long /*int*/ handle, long /*int*/ background_area, long /*int*/ cell_area, long /*int*/ expose_area, long /*int*/ flags) { Display display = getCurrent (); Widget widget = display.getWidget (handle); if (widget != null) return widget.rendererRenderProc (cell, window, handle, background_area, cell_area, expose_area, flags); return 0; } -void flushExposes (int /*long*/ window, boolean all) { +void flushExposes (long /*int*/ window, boolean all) { OS.gdk_flush (); OS.gdk_flush (); if (OS.GDK_WINDOWING_X11 ()) { this.flushWindow = window; this.flushAll = all; - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ xEvent = OS.g_malloc (XEvent.sizeof); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xEvent = OS.g_malloc (XEvent.sizeof); OS.XCheckIfEvent (xDisplay, xEvent, checkIfEventProc, 0); OS.g_free (xEvent); this.flushWindow = 0; @@ -1382,7 +1382,7 @@ public static Display getCurrent () { int getCaretBlinkTime () { // checkDevice (); - int /*long*/ settings = OS.gtk_settings_get_default (); + long /*int*/ settings = OS.gtk_settings_get_default (); if (settings == 0) return 500; int [] buffer = new int [1]; OS.g_object_get (settings, OS.gtk_cursor_blink, buffer, 0); @@ -1412,9 +1412,9 @@ int getCaretBlinkTime () { public Control getCursorControl () { checkDevice(); int[] x = new int[1], y = new int[1]; - int /*long*/ handle = 0; - int /*long*/ [] user_data = new int /*long*/ [1]; - int /*long*/ window = OS.gdk_window_at_pointer (x,y); + long /*int*/ handle = 0; + long /*int*/ [] user_data = new long /*int*/ [1]; + long /*int*/ window = OS.gdk_window_at_pointer (x,y); if (window != 0) { OS.gdk_window_get_user_data (window, user_data); handle = user_data [0]; @@ -1427,8 +1427,8 @@ public Control getCursorControl () { if (!OS.GDK_WINDOWING_X11 ()) return null; OS.gdk_error_trap_push (); int[] unusedInt = new int[1]; - int /*long*/[] unusedPtr = new int /*long*/[1], buffer = new int /*long*/[1]; - int /*long*/ xWindow, xParent = OS.XDefaultRootWindow (xDisplay); + long /*int*/[] unusedPtr = new long /*int*/[1], buffer = new long /*int*/[1]; + long /*int*/ xWindow, xParent = OS.XDefaultRootWindow (xDisplay); do { if (OS.XQueryPointer (xDisplay, xParent, unusedPtr, buffer, unusedInt, unusedInt, unusedInt, unusedInt, unusedInt) == 0) { handle = 0; @@ -1436,7 +1436,7 @@ public Control getCursorControl () { } if ((xWindow = buffer [0]) != 0) { xParent = xWindow; - int /*long*/ gdkWindow = 0; + long /*int*/ gdkWindow = 0; if (OS.GTK_VERSION >= OS.VERSION (2, 24, 0)) { gdkWindow = OS.gdk_x11_window_lookup_for_display(OS.gdk_display_get_default(), xWindow); } else { @@ -1461,15 +1461,15 @@ public Control getCursorControl () { return null; } -static GtkBorder getEntryInnerBorder (int /*long*/ handle) { +static GtkBorder getEntryInnerBorder (long /*int*/ handle) { GtkBorder gtkBorder = new GtkBorder(); if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { - int /*long*/ border = OS.gtk_entry_get_inner_border (handle); + long /*int*/ border = OS.gtk_entry_get_inner_border (handle); if (border != 0) { OS.memmove (gtkBorder, border, GtkBorder.sizeof); return gtkBorder; } - int /*long*/ [] borderPtr = new int /*long*/ [1]; + long /*int*/ [] borderPtr = new long /*int*/ [1]; OS.gtk_widget_style_get (handle, OS.inner_border, borderPtr,0); if (borderPtr[0] != 0) { OS.memmove (gtkBorder, borderPtr[0], GtkBorder.sizeof); @@ -1494,7 +1494,7 @@ boolean filters (int eventType) { return filterTable.hooks (eventType); } -int /*long*/ filterProc (int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*/ data) { +long /*int*/ filterProc (long /*int*/ xEvent, long /*int*/ gdkEvent, long /*int*/ data) { Widget widget = getWidget (data); if (widget == null) return 0; return widget.filterProc (xEvent, gdkEvent, data); @@ -1610,19 +1610,19 @@ public Object getData () { return data; } -int /*long*/ gtk_fixed_get_type () { +long /*int*/ gtk_fixed_get_type () { return fixed_type; } -int /*long*/ gtk_cell_renderer_text_get_type () { +long /*int*/ gtk_cell_renderer_text_get_type () { return text_renderer_type; } -int /*long*/ gtk_cell_renderer_pixbuf_get_type () { +long /*int*/ gtk_cell_renderer_pixbuf_get_type () { return pixbuf_renderer_type; } -int /*long*/ gtk_cell_renderer_toggle_get_type () { +long /*int*/ gtk_cell_renderer_toggle_get_type () { return toggle_renderer_type; } @@ -1684,7 +1684,7 @@ public int getDismissalAlignment () { checkDevice (); int [] buffer = new int [1]; if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) { - int /*long*/ settings = OS.gtk_settings_get_default (); + long /*int*/ settings = OS.gtk_settings_get_default (); OS.g_object_get (settings, OS.gtk_alternative_button_order, buffer, 0); } return buffer [0] == 1 ? SWT.LEFT : SWT.RIGHT; @@ -1704,7 +1704,7 @@ public int getDismissalAlignment () { */ public int getDoubleClickTime () { checkDevice (); - int /*long*/ settings = OS.gtk_settings_get_default (); + long /*int*/ settings = OS.gtk_settings_get_default (); int [] buffer = new int [1]; OS.g_object_get (settings, OS.gtk_double_click_time, buffer, 0); return buffer [0]; @@ -1729,8 +1729,8 @@ public Control getFocusControl () { return focusControl; } if (activeShell == null) return null; - int /*long*/ shellHandle = activeShell.shellHandle; - int /*long*/ handle = OS.gtk_window_get_focus (shellHandle); + long /*int*/ shellHandle = activeShell.shellHandle; + long /*int*/ handle = OS.gtk_window_get_focus (shellHandle); if (handle == 0) return null; do { Widget widget = getWidget (handle); @@ -1827,12 +1827,12 @@ Dialog getModalDialog () { */ Rectangle getWorkArea() { byte[] name = Converter.wcsToMbcs (null, "_NET_WORKAREA", true); //$NON-NLS-1$ - int /*long*/ atom = OS.gdk_atom_intern (name, true); + long /*int*/ atom = OS.gdk_atom_intern (name, true); if (atom == OS.GDK_NONE) return null; - int /*long*/[] actualType = new int /*long*/[1]; + long /*int*/[] actualType = new long /*int*/[1]; int[] actualFormat = new int[1]; int[] actualLength = new int[1]; - int /*long*/[] data = new int /*long*/[1]; + long /*int*/[] data = new long /*int*/[1]; if (!OS.gdk_property_get (OS.gdk_get_default_root_window(), atom, OS.GDK_NONE, 0, 16, 0, actualType, actualFormat, actualLength, data)) { return null; } @@ -1863,7 +1863,7 @@ public Monitor [] getMonitors () { checkDevice (); Monitor [] monitors = null; Rectangle workArea = getWorkArea(); - int /*long*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = OS.gdk_screen_get_default (); if (screen != 0) { int monitorCount = OS.gdk_screen_get_n_monitors (screen); if (monitorCount > 0) { @@ -2183,12 +2183,12 @@ void initializeSystemColors () { GdkColor gdkColor; /* Get Tooltip resources */ - int /*long*/ tooltipShellHandle = OS.gtk_window_new (OS.GTK_WINDOW_POPUP); + long /*int*/ tooltipShellHandle = OS.gtk_window_new (OS.GTK_WINDOW_POPUP); if (tooltipShellHandle == 0) error (SWT.ERROR_NO_HANDLES); byte[] gtk_tooltips = Converter.wcsToMbcs (null, "gtk-tooltips", true); //$NON-NLS-1$ OS.gtk_widget_set_name (tooltipShellHandle, gtk_tooltips); OS.gtk_widget_realize (tooltipShellHandle); - int /*long*/ tooltipStyle = OS.gtk_widget_get_style (tooltipShellHandle); + long /*int*/ tooltipStyle = OS.gtk_widget_get_style (tooltipShellHandle); gdkColor = new GdkColor(); OS.gtk_style_get_fg (tooltipStyle, OS.GTK_STATE_NORMAL, gdkColor); COLOR_INFO_FOREGROUND = gdkColor; @@ -2198,7 +2198,7 @@ void initializeSystemColors () { OS.gtk_widget_destroy (tooltipShellHandle); /* Get Shell resources */ - int /*long*/ style = OS.gtk_widget_get_style (shellHandle); + long /*int*/ style = OS.gtk_widget_get_style (shellHandle); gdkColor = new GdkColor(); OS.gtk_style_get_black (style, gdkColor); COLOR_WIDGET_DARK_SHADOW = gdkColor; @@ -2279,8 +2279,8 @@ void initializeSystemColors () { public Font getSystemFont () { checkDevice (); if (systemFont != null) return systemFont; - int /*long*/ style = OS.gtk_widget_get_style (shellHandle); - int /*long*/ defaultFont = OS.pango_font_description_copy (OS.gtk_style_get_font_desc (style)); + long /*int*/ style = OS.gtk_widget_get_style (shellHandle); + long /*int*/ defaultFont = OS.pango_font_description_copy (OS.gtk_style_get_font_desc (style)); return systemFont = Font.gtk_new (this, defaultFont); } @@ -2353,10 +2353,10 @@ public boolean getTouchEnabled() { return false; } -Widget getWidget (int /*long*/ handle) { +Widget getWidget (long /*int*/ handle) { if (handle == 0) return null; if (lastWidget != null && lastHandle == handle) return lastWidget; - int /*long*/ index = OS.g_object_get_qdata (handle, SWT_OBJECT_INDEX) - 1; + long /*int*/ index = OS.g_object_get_qdata (handle, SWT_OBJECT_INDEX) - 1; if (0 <= index && index < widgetTable.length) { lastHandle = handle; return lastWidget = widgetTable [(int)/*64*/index]; @@ -2364,7 +2364,7 @@ Widget getWidget (int /*long*/ handle) { return null; } -int /*long*/ idleProc (int /*long*/ data) { +long /*int*/ idleProc (long /*int*/ data) { boolean result = runAsyncMessages (false); if (!result) { synchronized (idleLock) { @@ -2394,7 +2394,7 @@ protected void init () { } void initializeCallbacks () { - closures = new int /*long*/ [Widget.LAST_SIGNAL]; + closures = new long /*int*/ [Widget.LAST_SIGNAL]; signalIds = new int [Widget.LAST_SIGNAL]; /* Cache signals for GtkWidget */ @@ -2599,8 +2599,8 @@ void initializeCallbacks () { } void initializeSubclasses () { - int /*long*/ pangoLayoutType = OS.PANGO_TYPE_LAYOUT (); - int /*long*/ pangoLayoutClass = OS.g_type_class_ref (pangoLayoutType); + long /*int*/ pangoLayoutType = OS.PANGO_TYPE_LAYOUT (); + long /*int*/ pangoLayoutClass = OS.g_type_class_ref (pangoLayoutType); pangoLayoutNewProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (pangoLayoutClass); OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, OS.pangoLayoutNewProc_CALLBACK(pangoLayoutNewProc)); OS.g_type_class_unref (pangoLayoutClass); @@ -2618,10 +2618,10 @@ void initializeSystemSettings () { * fix is to for the initializaion by creating * a temporary GtkEntry. */ - int /*long*/ entry = OS.gtk_entry_new (); + long /*int*/ entry = OS.gtk_entry_new (); OS.gtk_widget_destroy (entry); int [] buffer2 = new int [1]; - int /*long*/ settings = OS.gtk_settings_get_default (); + long /*int*/ settings = OS.gtk_settings_get_default (); OS.g_object_get (settings, OS.gtk_entry_select_on_focus, buffer2, 0); entrySelectOnFocus = buffer2 [0] != 0; } @@ -2636,9 +2636,9 @@ void initializeWidgetTable () { void initializeWindowManager () { /* Get the window manager name */ windowManager = ""; //$NON-NLS-1$ - int /*long*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = OS.gdk_screen_get_default (); if (screen != 0) { - int /*long*/ ptr2 = OS.gdk_x11_screen_get_window_manager_name (screen); + long /*int*/ ptr2 = OS.gdk_x11_screen_get_window_manager_name (screen); if (ptr2 != 0) { int length = OS.strlen (ptr2); if (length > 0) { @@ -2665,8 +2665,8 @@ void initializeWindowManager () { * * @noreference This method is not intended to be referenced by clients. */ -public void internal_dispose_GC (int /*long*/ hDC, GCData data) { - int /*long*/ gc = hDC; +public void internal_dispose_GC (long /*int*/ hDC, GCData data) { + long /*int*/ gc = hDC; if (OS.USE_CAIRO) { Cairo.cairo_destroy (gc); } else { @@ -2696,10 +2696,10 @@ public void internal_dispose_GC (int /*long*/ hDC, GCData data) { * * @noreference This method is not intended to be referenced by clients. */ -public int /*long*/ internal_new_GC (GCData data) { +public long /*int*/ internal_new_GC (GCData data) { if (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED); - int /*long*/ root = OS.gdk_get_default_root_window(); - int /*long*/ gc; + long /*int*/ root = OS.gdk_get_default_root_window(); + long /*int*/ gc; if (OS.USE_CAIRO) { gc = OS.gdk_cairo_create (root); if (gc == 0) error (SWT.ERROR_NO_HANDLES); @@ -2812,7 +2812,7 @@ public Point map (Control from, Control to, int x, int y) { Point point = new Point (x, y); if (from == to) return point; if (from != null) { - int /*long*/ window = from.eventWindow (); + long /*int*/ window = from.eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); if ((from.style & SWT.MIRRORED) != 0) point.x = from.getClientWidth () - point.x; @@ -2820,7 +2820,7 @@ public Point map (Control from, Control to, int x, int y) { point.y += origin_y [0]; } if (to != null) { - int /*long*/ window = to.eventWindow (); + long /*int*/ window = to.eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); point.x -= origin_x [0]; @@ -2889,7 +2889,7 @@ static char mbcsToWcs (char ch) { return result [0]; } -int /*long*/ menuPositionProc (int /*long*/ menu, int /*long*/ x, int /*long*/ y, int /*long*/ push_in, int /*long*/ user_data) { +long /*int*/ menuPositionProc (long /*int*/ menu, long /*int*/ x, long /*int*/ y, long /*int*/ push_in, long /*int*/ user_data) { Widget widget = getWidget (menu); if (widget == null) return 0; return widget.menuPositionProc (menu, x, y, push_in, user_data); @@ -2941,7 +2941,7 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei if (from == to) return rect; boolean fromRTL = false, toRTL = false; if (from != null) { - int /*long*/ window = from.eventWindow (); + long /*int*/ window = from.eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); if (fromRTL = (from.style & SWT.MIRRORED) != 0) rect.x = from.getClientWidth() - rect.x; @@ -2949,7 +2949,7 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei rect.y += origin_y [0]; } if (to != null) { - int /*long*/ window = to.eventWindow (); + long /*int*/ window = to.eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); rect.x -= origin_x [0]; @@ -2960,7 +2960,7 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei return rect; } -int /*long*/ mouseHoverProc (int /*long*/ handle) { +long /*int*/ mouseHoverProc (long /*int*/ handle) { Widget widget = getWidget (handle); if (widget == null) return 0; return widget.hoverProc (handle); @@ -3040,13 +3040,13 @@ public boolean post (Event event) { if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); if (!OS.GDK_WINDOWING_X11()) return false; - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); int type = event.type; switch (type) { case SWT.KeyDown: case SWT.KeyUp: { int keyCode = 0; - int /*long*/ keysym = untranslateKey (event.keyCode); + long /*int*/ keysym = untranslateKey (event.keyCode); if (keysym != 0) keyCode = OS.XKeysymToKeycode (xDisplay, keysym); if (keyCode == 0) { char key = event.character; @@ -3128,7 +3128,7 @@ void postEvent (Event event) { void putGdkEvents () { if (gdkEventCount != 0) { for (int i = 0; i < gdkEventCount; i++) { - int /*long*/ event = gdkEvents [i]; + long /*int*/ event = gdkEvents [i]; Widget widget = gdkEventWidgets [i]; if (widget == null || !widget.isDisposed ()) { OS.gdk_event_put (event); @@ -3387,8 +3387,8 @@ void releaseDisplay () { signalProc = 0; /* Dispose subclass */ - int /*long*/ pangoLayoutType = OS.PANGO_TYPE_LAYOUT (); - int /*long*/ pangoLayoutClass = OS.g_type_class_ref (pangoLayoutType); + long /*int*/ pangoLayoutType = OS.PANGO_TYPE_LAYOUT (); + long /*int*/ pangoLayoutClass = OS.g_type_class_ref (pangoLayoutType); OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, pangoLayoutNewProc); OS.g_type_class_unref (pangoLayoutClass); pangoLayoutNewProc = 0; @@ -3447,9 +3447,9 @@ public void removeFilter (int eventType, Listener listener) { if (filterTable.size () == 0) filterTable = null; } -int /*long*/ removeGdkEvent () { +long /*int*/ removeGdkEvent () { if (gdkEventCount == 0) return 0; - int /*long*/ event = gdkEvents [0]; + long /*int*/ event = gdkEvents [0]; --gdkEventCount; System.arraycopy (gdkEvents, 1, gdkEvents, 0, gdkEventCount); System.arraycopy (gdkEventWidgets, 1, gdkEventWidgets, 0, gdkEventCount); @@ -3498,7 +3498,7 @@ public void removeListener (int eventType, Listener listener) { eventTable.unhook (eventType, listener); } -void removeMouseHoverTimeout (int /*long*/ handle) { +void removeMouseHoverTimeout (long /*int*/ handle) { if (handle != mouseHoverHandle) return; if (mouseHoverId != 0) OS.g_source_remove (mouseHoverId); mouseHoverId = 0; @@ -3515,7 +3515,7 @@ void removePopup (Menu menu) { } } -Widget removeWidget (int /*long*/ handle) { +Widget removeWidget (long /*int*/ handle) { if (handle == 0) return null; lastWidget = null; Widget widget = null; @@ -3719,8 +3719,8 @@ public static void setAppVersion (String version) { public void setCursorLocation (int x, int y) { checkDevice (); if (OS.GDK_WINDOWING_X11 ()) { - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ xWindow = OS.XDefaultRootWindow (xDisplay); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xWindow = OS.XDefaultRootWindow (xDisplay); OS.XWarpPointer (xDisplay, OS.None, xWindow, 0, 0, 0, 0, x, y); } } @@ -3788,7 +3788,7 @@ public void setData (String key, Object value) { } if (key.equals (ADD_WIDGET_KEY)) { Object [] data = (Object []) value; - int /*long*/ handle = ((LONG) data [0]).value; + long /*int*/ handle = ((LONG) data [0]).value; Widget widget = (Widget) data [1]; if (widget != null) { addWidget (handle, widget); @@ -3877,10 +3877,10 @@ public void setData (Object data) { this.data = data; } -int /*long*/ setDirectionProc (int /*long*/ widget, int /*long*/ direction) { +long /*int*/ setDirectionProc (long /*int*/ widget, long /*int*/ direction) { OS.gtk_widget_set_direction (widget, (int)/*64*/ direction); if (OS.GTK_IS_MENU_ITEM (widget)) { - int /*long*/ submenu = OS.gtk_menu_item_get_submenu (widget); + long /*int*/ submenu = OS.gtk_menu_item_get_submenu (widget); if (submenu != 0) { OS.gtk_widget_set_direction (submenu, (int)/*64*/ direction); OS.gtk_container_forall (submenu, setDirectionProc, direction); @@ -3955,9 +3955,9 @@ void showIMWindow (Control control) { OS.gtk_container_add (preeditWindow, preeditLabel); OS.gtk_widget_show (preeditLabel); } - int /*long*/ [] preeditString = new int /*long*/ [1]; - int /*long*/ [] pangoAttrs = new int /*long*/ [1]; - int /*long*/ imHandle = control.imHandle (); + long /*int*/ [] preeditString = new long /*int*/ [1]; + long /*int*/ [] pangoAttrs = new long /*int*/ [1]; + long /*int*/ imHandle = control.imHandle (); OS.gtk_im_context_get_preedit_string (imHandle, preeditString, pangoAttrs, null); if (preeditString [0] != 0 && OS.strlen (preeditString [0]) > 0) { Control widget = control.findBackgroundControl (); @@ -4011,7 +4011,7 @@ public boolean sleep () { fds = OS.g_malloc (OS.GPollFD_sizeof () * allocated_nfds); } max_priority [0] = timeout [0] = 0; - int /*long*/ context = OS.g_main_context_default (); + long /*int*/ context = OS.g_main_context_default (); boolean result = false; do { if (OS.g_main_context_acquire (context)) { @@ -4022,7 +4022,7 @@ public boolean sleep () { allocated_nfds = nfds; fds = OS.g_malloc (OS.GPollFD_sizeof() * allocated_nfds); } - int /*long*/ poll = OS.g_main_context_get_poll_func (context); + long /*int*/ poll = OS.g_main_context_get_poll_func (context); if (poll != 0) { if (nfds > 0 || timeout [0] != 0) { /* @@ -4116,7 +4116,7 @@ public void timerExec (int milliseconds, Runnable runnable) { } } -int /*long*/ timerProc (int /*long*/ i) { +long /*int*/ timerProc (long /*int*/ i) { if (timerList == null) return 0; int index = (int)/*64*/i; if (0 <= index && index < timerList.length) { @@ -4128,7 +4128,7 @@ int /*long*/ timerProc (int /*long*/ i) { return 0; } -int /*long*/ caretProc (int /*long*/ clientData) { +long /*int*/ caretProc (long /*int*/ clientData) { caretId = 0; if (currentCaret == null) { return 0; @@ -4143,13 +4143,13 @@ int /*long*/ caretProc (int /*long*/ clientData) { return 0; } -int /*long*/ sizeAllocateProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ sizeAllocateProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { Widget widget = getWidget (user_data); if (widget == null) return 0; return widget.sizeAllocateProc (handle, arg0, user_data); } -int /*long*/ sizeRequestProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ sizeRequestProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { Widget widget = getWidget (user_data); if (widget == null) return 0; return widget.sizeRequestProc (handle, arg0, user_data); @@ -4207,13 +4207,13 @@ void setCurrentCaret (Caret caret) { caretId = OS.g_timeout_add (blinkRate, caretProc, 0); } -int /*long*/ shellMapProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ shellMapProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { Widget widget = getWidget (handle); if (widget == null) return 0; return widget.shellMapProc (handle, arg0, user_data); } -int /*long*/ signalProc (int /*long*/ gobject, int /*long*/ arg1, int /*long*/ user_data) { +long /*int*/ signalProc (long /*int*/ gobject, long /*int*/ arg1, long /*int*/ user_data) { switch((int)/*64*/user_data) { case STYLE_SET: settingsChanged = true; @@ -4223,19 +4223,19 @@ int /*long*/ signalProc (int /*long*/ gobject, int /*long*/ arg1, int /*long*/ u OS.memmove (gdkEvent, arg1); if (gdkEvent.type == OS.GDK_PROPERTY_NOTIFY) { byte[] name = Converter.wcsToMbcs (null, "org.eclipse.swt.filePath.message", true); //$NON-NLS-1$ - int /*long*/ atom = OS.gdk_x11_atom_to_xatom (OS.gdk_atom_intern (name, true)); + long /*int*/ atom = OS.gdk_x11_atom_to_xatom (OS.gdk_atom_intern (name, true)); if (atom == OS.gdk_x11_atom_to_xatom (gdkEvent.atom)) { - int /*long*/ xWindow; + long /*int*/ xWindow; if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){ xWindow = OS.gdk_x11_drawable_get_xid (OS.gtk_widget_get_window( shellHandle)); } else { xWindow = OS.gdk_x11_drawable_get_xid (OS.GTK_WIDGET_WINDOW( shellHandle)); } - int /*long*/ [] type = new int /*long*/ [1]; + long /*int*/ [] type = new long /*int*/ [1]; int [] format = new int [1]; int [] nitems = new int [1]; int [] bytes_after = new int [1]; - int /*long*/ [] data = new int /*long*/ [1]; + long /*int*/ [] data = new long /*int*/ [1]; OS.XGetWindowProperty (OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()), xWindow, atom, 0, -1, true, OS.AnyPropertyType, type, format, nitems, bytes_after, data); @@ -4367,31 +4367,31 @@ static char wcsToMbcs (char ch) { return 0; } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ user_data) { Widget widget = getWidget (handle); if (widget == null) return 0; return widget.windowProc (handle, user_data); } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { Widget widget = getWidget (handle); if (widget == null) return 0; return widget.windowProc (handle, arg0, user_data); } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ user_data) { Widget widget = getWidget (handle); if (widget == null) return 0; return widget.windowProc (handle, arg0, arg1, user_data); } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ user_data) { Widget widget = getWidget (handle); if (widget == null) return 0; return widget.windowProc (handle, arg0, arg1, arg2, user_data); } -int /*long*/ windowTimerProc (int /*long*/ handle) { +long /*int*/ windowTimerProc (long /*int*/ handle) { Widget widget = getWidget (handle); if (widget == null) return 0; return widget.timerProc (handle); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java index c515ebaf77..8f4b923e3c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java @@ -138,7 +138,7 @@ void createHandle (int index) { OS.gtk_scrolled_window_set_policy (scrolledHandle, OS.GTK_POLICY_NEVER, OS.GTK_POLICY_AUTOMATIC); OS.gtk_container_add (fixedHandle, scrolledHandle); OS.gtk_scrolled_window_add_with_viewport (scrolledHandle, handle); - int /*long*/ viewport = OS.gtk_bin_get_child (scrolledHandle); + long /*int*/ viewport = OS.gtk_bin_get_child (scrolledHandle); OS.gtk_viewport_set_shadow_type (viewport, OS.GTK_SHADOW_NONE); } else { OS.gtk_container_add (fixedHandle, handle); @@ -178,11 +178,11 @@ void destroyItem (ExpandItem item) { layoutItems (index, true); } -int /*long*/ eventHandle () { +long /*int*/ eventHandle () { return fixedHandle; } -boolean forceFocus (int /*long*/ focusHandle) { +boolean forceFocus (long /*int*/ focusHandle) { if (lastFocus != null && lastFocus.setFocus ()) return true; for (int i = 0; i < itemCount; i++) { ExpandItem item = items [i]; @@ -288,9 +288,9 @@ public int getSpacing () { return spacing; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { if (!hasFocus ()) return 0; - int /*long*/ result = super.gtk_key_press_event (widget, event); + long /*int*/ result = super.gtk_key_press_event (widget, event); if (result != 0) return result; int index = 0; while (index < itemCount) { @@ -349,13 +349,13 @@ void layoutItems (int index, boolean setScrollbar) { } } -int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { - int /*long*/ result = super.gtk_size_allocate (widget, allocation); +long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { + long /*int*/ result = super.gtk_size_allocate (widget, allocation); layoutItems (0, false); return result; } -int /*long*/ parentingHandle () { +long /*int*/ parentingHandle () { return fixedHandle; } @@ -404,7 +404,7 @@ void reskinChildren (int flags) { super.reskinChildren (flags); } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); for (int i = 0; i < itemCount; i++) { items[i].setFontDescription (font); @@ -435,7 +435,7 @@ void setScrollbar () { ExpandItem item = items [itemCount - 1]; int maxHeight = item.y + getBandHeight () + spacing; if (item.expanded) maxHeight += item.height; - int /*long*/ adjustmentHandle = OS.gtk_scrolled_window_get_vadjustment (scrolledHandle); + long /*int*/ adjustmentHandle = OS.gtk_scrolled_window_get_vadjustment (scrolledHandle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, adjustmentHandle); yCurrentScroll = (int)adjustment.value; @@ -457,7 +457,7 @@ void setScrollbar () { gtk_widget_get_allocation (fixedHandle, allocation); int width = allocation.width - spacing * 2; if (policy == OS.GTK_POLICY_ALWAYS) { - int /*long*/ vHandle = 0; + long /*int*/ vHandle = 0; if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) { vHandle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR (scrolledHandle); } else { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java index 311e6b802b..93673774d4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java @@ -39,7 +39,7 @@ public class ExpandItem extends Item { ExpandBar parent; Control control; ImageList imageList; - int /*long*/ clientHandle, boxHandle, labelHandle, imageHandle; + long /*int*/ clientHandle, boxHandle, labelHandle, imageHandle; boolean expanded; int x, y, width, height; int imageHeight, imageWidth; @@ -311,7 +311,7 @@ int getPreferredWidth (GC gc) { return width; } -int /*long*/ gtk_activate (int /*long*/ widget) { +long /*int*/ gtk_activate (long /*int*/ widget) { Event event = new Event (); event.item = this; int type = OS.gtk_expander_get_expanded (handle) ? SWT.Collapse : SWT.Expand; @@ -319,23 +319,23 @@ int /*long*/ gtk_activate (int /*long*/ widget) { return 0; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { setFocus (); return 0; } -int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { gtk_widget_set_can_focus (handle, false); parent.lastFocus = this; return 0; } -int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { +long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { parent.layoutItems (0, false); return 0; } -int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_enter_notify_event (long /*int*/ widget, long /*int*/ event) { parent.gtk_enter_notify_event(widget, event); return 0; } @@ -495,7 +495,7 @@ boolean setFocus () { return result; } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { OS.gtk_widget_modify_font (handle, font); if (labelHandle != 0) OS.gtk_widget_modify_font (labelHandle, font); if (imageHandle != 0) OS.gtk_widget_modify_font (imageHandle, font); @@ -534,7 +534,7 @@ public void setImage (Image image) { if (image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); imageList = new ImageList (); int imageIndex = imageList.add (image); - int /*long*/ pixbuf = imageList.getPixbuf (imageIndex); + long /*int*/ pixbuf = imageList.getPixbuf (imageIndex); OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf); if (text.length () == 0) OS.gtk_widget_hide (labelHandle); OS.gtk_widget_show (imageHandle); @@ -569,7 +569,7 @@ void showWidget (int index) { if (labelHandle != 0) OS.gtk_widget_show (labelHandle); } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ user_data) { switch ((int)/*64*/user_data) { case ACTIVATE_INVERSE: { expanded = OS.gtk_expander_get_expanded (handle); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java index b57f25accb..23ba263587 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java @@ -45,7 +45,7 @@ public class FileDialog extends Dialog { int filterIndex = -1; boolean overwrite = false; boolean uriMode; - int /*long*/ handle; + long /*int*/ handle; static final char SEPARATOR = System.getProperty ("file.separator").charAt (0); static final char EXTENSION_SEPARATOR = ';'; static final char FILE_EXTENSION_SEPARATOR = '.'; @@ -102,7 +102,7 @@ String computeResultChooserDialog () { /* MULTI is only valid if the native dialog's action is Open */ fullPath = null; if ((style & SWT.MULTI) != 0) { - int /*long*/ list = 0; + long /*int*/ list = 0; if (uriMode) { list = OS.gtk_file_chooser_get_uris (handle); } else { @@ -110,11 +110,11 @@ String computeResultChooserDialog () { } int listLength = OS.g_slist_length (list); fileNames = new String [listLength]; - int /*long*/ current = list; + long /*int*/ current = list; int writePos = 0; for (int i = 0; i < listLength; i++) { - int /*long*/ name = OS.g_slist_data (current); - int /*long*/ utf8Ptr = 0; + long /*int*/ name = OS.g_slist_data (current); + long /*int*/ utf8Ptr = 0; if (uriMode) { utf8Ptr = name; } else { @@ -123,8 +123,8 @@ String computeResultChooserDialog () { } if (name != utf8Ptr) OS.g_free (name); if (utf8Ptr != 0) { - int /*long*/ [] items_written = new int /*long*/ [1]; - int /*long*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null); + long /*int*/ [] items_written = new long /*int*/ [1]; + long /*int*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null); OS.g_free (utf8Ptr); if (utf16Ptr != 0) { int clength = (int)/*64*/items_written [0]; @@ -144,11 +144,11 @@ String computeResultChooserDialog () { } OS.g_slist_free (list); } else { - int /*long*/ utf8Ptr = 0; + long /*int*/ utf8Ptr = 0; if (uriMode) { utf8Ptr = OS.gtk_file_chooser_get_uri (handle); } else { - int /*long*/ path = OS.gtk_file_chooser_get_filename (handle); + long /*int*/ path = OS.gtk_file_chooser_get_filename (handle); if (path != 0) { utf8Ptr = OS.g_filename_to_utf8 (path, -1, null, null, null); if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (path); @@ -156,8 +156,8 @@ String computeResultChooserDialog () { } } if (utf8Ptr != 0) { - int /*long*/ [] items_written = new int /*long*/ [1]; - int /*long*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null); + long /*int*/ [] items_written = new long /*int*/ [1]; + long /*int*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null); OS.g_free (utf8Ptr); if (utf16Ptr != 0) { int clength = (int)/*64*/items_written [0]; @@ -171,9 +171,9 @@ String computeResultChooserDialog () { } } filterIndex = -1; - int /*long*/ filter = OS.gtk_file_chooser_get_filter (handle); + long /*int*/ filter = OS.gtk_file_chooser_get_filter (handle); if (filter != 0) { - int /*long*/ filterNamePtr = OS.gtk_file_filter_get_name (filter); + long /*int*/ filterNamePtr = OS.gtk_file_filter_get_name (filter); if (filterNamePtr != 0) { int length = OS.strlen (filterNamePtr); byte[] buffer = new byte [length]; @@ -317,7 +317,7 @@ String openChooserDialog () { int action = (style & SWT.SAVE) != 0 ? OS.GTK_FILE_CHOOSER_ACTION_SAVE : OS.GTK_FILE_CHOOSER_ACTION_OPEN; - int /*long*/ shellHandle = parent.topHandle (); + long /*int*/ shellHandle = parent.topHandle (); Display display = parent != null ? parent.getDisplay (): Display.getCurrent (); if (display.getDismissalAlignment() == SWT.RIGHT) { handle = OS.gtk_file_chooser_dialog_new (titleBytes, shellHandle, action, OS.GTK_STOCK_CANCEL (), OS.GTK_RESPONSE_CANCEL, OS.GTK_STOCK_OK (), OS.GTK_RESPONSE_OK, 0); @@ -327,10 +327,10 @@ String openChooserDialog () { if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_window_set_modal (handle, true); if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { - int /*long*/ group = OS.gtk_window_get_group(0); + long /*int*/ group = OS.gtk_window_get_group(0); OS.gtk_window_group_add_window (group, handle); } - int /*long*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle); + long /*int*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle); if (pixbufs != 0) { OS.gtk_window_set_icon_list (handle, pixbufs); OS.g_list_free (pixbufs); @@ -347,7 +347,7 @@ String openChooserDialog () { display.setModalDialog (this); } int signalId = 0; - int /*long*/ hookId = 0; + long /*int*/ hookId = 0; if ((style & SWT.RIGHT_TO_LEFT) != 0) { signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET()); hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0); @@ -394,7 +394,7 @@ void presetChooserDialog () { * when setting a file name that is not a true canonical path. * The fix is to use the canonical path. */ - int /*long*/ ptr = OS.realpath (buffer, null); + long /*int*/ ptr = OS.realpath (buffer, null); OS.gtk_file_chooser_set_current_folder (handle, ptr); OS.g_free (ptr); } @@ -425,7 +425,7 @@ void presetChooserDialog () { * when setting a file name that is not a true canonical path. * The fix is to use the canonical path. */ - int /*long*/ ptr = OS.realpath (buffer, null); + long /*int*/ ptr = OS.realpath (buffer, null); if (ptr != 0) { if (fileName.length() > 0) { OS.gtk_file_chooser_set_filename (handle, ptr); @@ -447,10 +447,10 @@ void presetChooserDialog () { /* Set the extension filters */ if (filterNames == null) filterNames = new String [0]; if (filterExtensions == null) filterExtensions = new String [0]; - int /*long*/ initialFilter = 0; + long /*int*/ initialFilter = 0; for (int i = 0; i < filterExtensions.length; i++) { if (filterExtensions [i] != null) { - int /*long*/ filter = OS.gtk_file_filter_new (); + long /*int*/ filter = OS.gtk_file_filter_new (); if (filterNames.length > i && filterNames [i] != null) { byte [] name = Converter.wcsToMbcs (null, filterNames [i], true); OS.gtk_file_filter_set_name (filter, name); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java index 81e2e1d8ea..905110d34d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java @@ -151,28 +151,28 @@ public RGB getRGB () { * </ul> */ public FontData open () { - int /*long*/ handle; + long /*int*/ handle; byte [] titleBytes; titleBytes = Converter.wcsToMbcs (null, title, true); Display display = parent != null ? parent.getDisplay (): Display.getCurrent (); handle = OS.gtk_font_selection_dialog_new (titleBytes); if (parent!=null) { - int /*long*/ shellHandle = parent.topHandle (); + long /*int*/ shellHandle = parent.topHandle (); OS.gtk_window_set_transient_for(handle, shellHandle); - int /*long*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle); + long /*int*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle); if (pixbufs != 0) { OS.gtk_window_set_icon_list (handle, pixbufs); OS.g_list_free (pixbufs); } } if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { - int /*long*/ group = OS.gtk_window_get_group(0); + long /*int*/ group = OS.gtk_window_get_group(0); OS.gtk_window_group_add_window (group, handle); } OS.gtk_window_set_modal (handle, true); if (fontData != null) { Font font = new Font (display, fontData); - int /*long*/ fontName = OS.pango_font_description_to_string (font.handle); + long /*int*/ fontName = OS.pango_font_description_to_string (font.handle); int length = OS.strlen (fontName); byte [] buffer = new byte [length + 1]; OS.memmove (buffer, fontName, length); @@ -187,7 +187,7 @@ public FontData open () { display.setModalDialog (this); } int signalId = 0; - int /*long*/ hookId = 0; + long /*int*/ hookId = 0; if ((style & SWT.RIGHT_TO_LEFT) != 0) { signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET()); hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0); @@ -208,12 +208,12 @@ public FontData open () { } boolean success = response == OS.GTK_RESPONSE_OK; if (success) { - int /*long*/ fontName = OS.gtk_font_selection_dialog_get_font_name (handle); + long /*int*/ fontName = OS.gtk_font_selection_dialog_get_font_name (handle); int length = OS.strlen (fontName); byte [] buffer = new byte [length + 1]; OS.memmove (buffer, fontName, length); OS.g_free (fontName); - int /*long*/ fontDesc = OS.pango_font_description_from_string (buffer); + long /*int*/ fontDesc = OS.pango_font_description_from_string (buffer); Font font = Font.gtk_new (display, fontDesc); fontData = font.getFontData () [0]; OS.pango_font_description_free (fontDesc); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java index 0045057364..0a30a8d093 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java @@ -41,7 +41,7 @@ import org.eclipse.swt.graphics.*; * @noextend This class is not intended to be subclassed by clients. */ public class Group extends Composite { - int /*long*/ clientHandle, labelHandle; + long /*int*/ clientHandle, labelHandle; String text = ""; /** @@ -96,7 +96,7 @@ protected void checkSubclass () { if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS); } -int /*long*/ clientHandle () { +long /*int*/ clientHandle () { return clientHandle; } @@ -159,7 +159,7 @@ void enableWidget (boolean enabled) { OS.gtk_widget_set_sensitive (labelHandle, enabled); } -int /*long*/ eventHandle () { +long /*int*/ eventHandle () { return fixedHandle; } @@ -203,7 +203,7 @@ boolean mnemonicMatch (char key) { return mnemonicMatch (labelHandle, key); } -int /*long*/ parentingHandle() { +long /*int*/ parentingHandle() { return fixedHandle; } @@ -229,7 +229,7 @@ void setBackgroundColor (GdkColor color) { setBackgroundColor(fixedHandle, color); } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); OS.gtk_widget_modify_font (labelHandle, font); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java index 4a4e2c0e9b..11e85a9f98 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java @@ -242,14 +242,14 @@ public boolean getWideCaret () { return false; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { if (!isInlineEnabled ()) return 0; - int /*long*/ imHandle = imHandle (); + long /*int*/ imHandle = imHandle (); if (imHandle != 0) OS.gtk_im_context_reset (imHandle); return 0; } -int /*long*/ gtk_commit (int /*long*/ imcontext, int /*long*/ textPtr) { +long /*int*/ gtk_commit (long /*int*/ imcontext, long /*int*/ textPtr) { if (!isInlineEnabled ()) return 0; boolean doit = true; ranges = null; @@ -278,14 +278,14 @@ int /*long*/ gtk_commit (int /*long*/ imcontext, int /*long*/ textPtr) { return doit ? 0 : 1; } -int /*long*/ gtk_preedit_changed (int /*long*/ imcontext) { +long /*int*/ gtk_preedit_changed (long /*int*/ imcontext) { if (!isInlineEnabled ()) return 0; ranges = null; styles = null; commitCount = 0; - int /*long*/ imHandle = imHandle (); - int /*long*/ [] preeditString = new int /*long*/ [1]; - int /*long*/ [] pangoAttrs = new int /*long*/ [1]; + long /*int*/ imHandle = imHandle (); + long /*int*/ [] preeditString = new long /*int*/ [1]; + long /*int*/ [] pangoAttrs = new long /*int*/ [1]; int [] cursorPos = new int [1]; OS.gtk_im_context_get_preedit_string (imHandle, preeditString, pangoAttrs, cursorPos); caretOffset = cursorPos [0]; @@ -297,7 +297,7 @@ int /*long*/ gtk_preedit_changed (int /*long*/ imcontext) { chars = Converter.mbcsToWcs (null, buffer); if (pangoAttrs [0] != 0) { int count = 0; - int /*long*/ iterator = OS.pango_attr_list_get_iterator (pangoAttrs [0]); + long /*int*/ iterator = OS.pango_attr_list_get_iterator (pangoAttrs [0]); while (OS.pango_attr_iterator_next (iterator)) count++; OS.pango_attr_iterator_destroy (iterator); ranges = new int [count * 2]; @@ -312,7 +312,7 @@ int /*long*/ gtk_preedit_changed (int /*long*/ imcontext) { ranges [i * 2] = (int)/*64*/OS.g_utf16_pointer_to_offset (preeditString [0], preeditString [0] + start [0]); ranges [i * 2 + 1] = (int)/*64*/OS.g_utf16_pointer_to_offset (preeditString [0], preeditString [0] + end [0]) - 1; styles [i] = new TextStyle (null, null, null); - int /*long*/ attr = OS.pango_attr_iterator_get (iterator, OS.PANGO_ATTR_FOREGROUND); + long /*int*/ attr = OS.pango_attr_iterator_get (iterator, OS.PANGO_ATTR_FOREGROUND); if (attr != 0) { OS.memmove (attrColor, attr, PangoAttrColor.sizeof); GdkColor color = new GdkColor (); @@ -395,7 +395,7 @@ int /*long*/ gtk_preedit_changed (int /*long*/ imcontext) { return 1; } -int /*long*/ imHandle () { +long /*int*/ imHandle () { return parent.imHandle (); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java index d7f8ab56ee..c75b7d6046 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java @@ -50,7 +50,7 @@ import org.eclipse.swt.graphics.*; * @noextend This class is not intended to be subclassed by clients. */ public class Label extends Control { - int /*long*/ frameHandle, labelHandle, imageHandle; + long /*int*/ frameHandle, labelHandle, imageHandle; ImageList imageList; Image image; String text; @@ -132,7 +132,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { boolean fixWrap = labelHandle != 0 && (style & SWT.WRAP) != 0 && gtk_widget_get_visible (labelHandle); if (fixWrap || frameHandle != 0) forceResize (); if (fixWrap) { - int /*long*/ labelLayout = OS.gtk_label_get_layout (labelHandle); + long /*int*/ labelLayout = OS.gtk_label_get_layout (labelHandle); int pangoWidth = OS.pango_layout_get_width (labelLayout); if (wHint != SWT.DEFAULT) { OS.pango_layout_set_width (labelLayout, wHint * OS.PANGO_SCALE); @@ -176,11 +176,11 @@ public Point computeSize (int wHint, int hHint, boolean changed) { * muliple lines of text. */ if (hHint == SWT.DEFAULT && labelHandle != 0) { - int /*long*/ layout = OS.gtk_label_get_layout (labelHandle); - int /*long*/ context = OS.pango_layout_get_context (layout); - int /*long*/ lang = OS.pango_context_get_language (context); - int /*long*/ font = getFontDescription (); - int /*long*/ metrics = OS.pango_context_get_metrics (context, font, lang); + long /*int*/ layout = OS.gtk_label_get_layout (labelHandle); + long /*int*/ context = OS.pango_layout_get_context (layout); + long /*int*/ lang = OS.pango_context_get_language (context); + long /*int*/ font = getFontDescription (); + long /*int*/ metrics = OS.pango_context_get_metrics (context, font, lang); int ascent = OS.PANGO_PIXELS (OS.pango_font_metrics_get_ascent (metrics)); int descent = OS.PANGO_PIXELS (OS.pango_font_metrics_get_descent (metrics)); OS.pango_font_metrics_unref (metrics); @@ -189,7 +189,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { OS.g_object_get (labelHandle, OS.ypad, buffer, 0); fontHeight += 2 * buffer [0]; if (frameHandle != 0) { - int /*long*/ style = OS.gtk_widget_get_style (frameHandle); + long /*int*/ style = OS.gtk_widget_get_style (frameHandle); fontHeight += 2 * OS.gtk_style_get_ythickness (style); fontHeight += 2 * OS.gtk_container_get_border_width (frameHandle); } @@ -251,7 +251,7 @@ void deregister () { if (imageHandle != 0) display.removeWidget (imageHandle); } -int /*long*/ eventHandle () { +long /*int*/ eventHandle () { return fixedHandle; } @@ -484,7 +484,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize return result; } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); if (labelHandle != 0) OS.gtk_widget_modify_font (labelHandle, font); if (imageHandle != 0) OS.gtk_widget_modify_font (imageHandle, font); @@ -529,7 +529,7 @@ public void setImage (Image image) { if (image != null) { imageList = new ImageList (); int imageIndex = imageList.add (image); - int /*long*/ pixbuf = imageList.getPixbuf (imageIndex); + long /*int*/ pixbuf = imageList.getPixbuf (imageIndex); OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf); OS.gtk_widget_hide (labelHandle); OS.gtk_widget_show (imageHandle); @@ -585,8 +585,8 @@ void showWidget () { if (labelHandle != 0) OS.gtk_widget_show (labelHandle); } -int /*long*/ gtk_separator_new (int orientation) { - int /*long*/ separator = 0; +long /*int*/ gtk_separator_new (int orientation) { + long /*int*/ separator = 0; if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) { separator = OS.gtk_separator_new (orientation); } else { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java index 2bceea8310..42945186d3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java @@ -284,8 +284,8 @@ public String getText () { return text; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_button_press_event (widget, event); +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_button_press_event (widget, event); if (result != 0) return result; GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); @@ -323,8 +323,8 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_button_release_event (widget, event); +long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_button_release_event (widget, event); if (result != 0) return result; if (focusIndex == -1) return result; GdkEventButton gdkEvent = new GdkEventButton (); @@ -347,8 +347,8 @@ int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) return result; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { - int /*long*/ result = super.gtk_event_after (widget, gdkEvent); +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { + long /*int*/ result = super.gtk_event_after (widget, gdkEvent); GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { @@ -359,7 +359,7 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { return result; } -int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { +long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { if ((state & OBSCURED) != 0) return 0; GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove (gdkEvent, eventPtr, GdkEventExpose.sizeof); @@ -399,8 +399,8 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { return 0; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { - int /*long*/ result = super.gtk_key_press_event (widget, eventPtr); +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { + long /*int*/ result = super.gtk_key_press_event (widget, eventPtr); if (result != 0) return result; if (focusIndex == -1) return result; GdkEventKey gdkEvent = new GdkEventKey (); @@ -429,8 +429,8 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { return result; } -int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_motion_notify_event (widget, event); +long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_motion_notify_event (widget, event); if (result != 0) return result; GdkEventMotion gdkEvent = new GdkEventMotion (); OS.memmove (gdkEvent, event, GdkEventMotion.sizeof); @@ -695,7 +695,7 @@ int setBounds(int x, int y, int width, int height, boolean move, boolean resize) return result; } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); layout.setFont (Font.gtk_new (display, font)); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java index f7dbfe5506..17f46889cd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java @@ -40,7 +40,7 @@ import org.eclipse.swt.events.*; * @noextend This class is not intended to be subclassed by clients. */ public class List extends Scrollable { - int /*long*/ modelHandle; + long /*int*/ modelHandle; static final int TEXT_COLUMN = 0; @@ -96,7 +96,7 @@ public void add (String string) { checkWidget(); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); byte [] buffer = Converter.wcsToMbcs (null, string, true); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (iter == 0) error (SWT.ERROR_ITEM_NOT_ADDED); OS.gtk_list_store_append (modelHandle, iter); OS.gtk_list_store_set (modelHandle, iter, TEXT_COLUMN, buffer, -1); @@ -134,7 +134,7 @@ public void add (String string, int index) { error (SWT.ERROR_INVALID_RANGE); } byte [] buffer = Converter.wcsToMbcs (null, string, true); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (iter == 0) error (SWT.ERROR_ITEM_NOT_ADDED); /* * Feature in GTK. It is much faster to append to a list store @@ -196,14 +196,14 @@ void createHandle (int index) { * Columns: * 0 - text */ - int /*long*/ [] types = new int /*long*/ [] {OS.G_TYPE_STRING ()}; + long /*int*/ [] types = new long /*int*/ [] {OS.G_TYPE_STRING ()}; modelHandle = OS.gtk_list_store_newv (types.length, types); if (modelHandle == 0) error (SWT.ERROR_NO_HANDLES); handle = OS.gtk_tree_view_new_with_model (modelHandle); if (handle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ textRenderer = OS.gtk_cell_renderer_text_new (); + long /*int*/ textRenderer = OS.gtk_cell_renderer_text_new (); if (textRenderer == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ columnHandle = OS.gtk_tree_view_column_new (); + long /*int*/ columnHandle = OS.gtk_tree_view_column_new (); if (columnHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_tree_view_column_pack_start (columnHandle, textRenderer, true); OS.gtk_tree_view_column_add_attribute (columnHandle, textRenderer, OS.text, TEXT_COLUMN); @@ -213,7 +213,7 @@ void createHandle (int index) { OS.gtk_container_add (scrolledHandle, handle); int mode = (style & SWT.MULTI) != 0 ? OS.GTK_SELECTION_MULTIPLE : OS.GTK_SELECTION_BROWSE; - int /*long*/ selectionHandle = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selectionHandle = OS.gtk_tree_view_get_selection (handle); OS.gtk_tree_selection_set_mode (selectionHandle, mode); OS.gtk_tree_view_set_headers_visible (handle, false); int hsp = (style & SWT.H_SCROLL) != 0 ? OS.GTK_POLICY_AUTOMATIC : OS.GTK_POLICY_NEVER; @@ -279,8 +279,8 @@ void deregister() { public void deselect (int index) { checkWidget(); if (!(0 <= index && index < OS.gtk_tree_model_iter_n_children (modelHandle, 0))) return; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); OS.gtk_tree_selection_unselect_iter (selection, iter); @@ -310,8 +310,8 @@ public void deselect (int start, int end) { if (start >= count && end >= count) return; start = Math.min (count - 1, Math.max (0, start)); end = Math.min (count - 1, Math.max (0, end)); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int index=start; index<=end; index++) { OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); @@ -341,9 +341,9 @@ public void deselect (int start, int end) { public void deselect (int [] indices) { checkWidget(); if (indices == null) error (SWT.ERROR_NULL_ARGUMENT); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); int count = OS.gtk_tree_model_iter_n_children (modelHandle, 0); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int i=0; i<indices.length; i++) { int index = indices [i]; @@ -365,7 +365,7 @@ public void deselect (int [] indices) { */ public void deselectAll () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_selection_unselect_all (selection); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -374,10 +374,10 @@ public void deselectAll () { boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean [] consume) { boolean selected = false; if (filter) { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; if (OS.gtk_tree_view_get_path_at_pos (handle, x, y, path, null, null, null)) { if (path [0] != 0) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); if (OS.gtk_tree_selection_path_is_selected (selection, path [0])) selected = true; OS.gtk_tree_path_free (path [0]); } @@ -390,7 +390,7 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean return dragDetect; } -int /*long*/ eventWindow () { +long /*int*/ eventWindow () { return paintWindow (); } @@ -411,10 +411,10 @@ GdkColor getBackgroundColor () { */ public int getFocusIndex () { checkWidget(); - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_tree_view_get_cursor (handle, path, null); if (path [0] == 0) return -1; - int /*long*/ indices = OS.gtk_tree_path_get_indices (path [0]); + long /*int*/ indices = OS.gtk_tree_path_get_indices (path [0]); int [] index = new int []{-1}; if (indices != 0) OS.memmove (index, indices, 4); OS.gtk_tree_path_free (path [0]); @@ -445,8 +445,8 @@ public String getItem (int index) { if (!(0 <= index && index < OS.gtk_tree_model_iter_n_children (modelHandle, 0))) { error (SWT.ERROR_INVALID_RANGE); } - int /*long*/ [] ptr = new int /*long*/ [1]; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ [] ptr = new long /*int*/ [1]; + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); OS.gtk_tree_model_get (modelHandle, iter, 0, ptr, -1); OS.g_free (iter); @@ -487,13 +487,13 @@ public int getItemCount () { public int getItemHeight () { checkWidget(); int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, 0); - int /*long*/ column = OS.gtk_tree_view_get_column (handle, 0); + long /*int*/ column = OS.gtk_tree_view_get_column (handle, 0); if (itemCount == 0) { int [] w = new int [1], h = new int [1]; OS.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h); return h [0]; } else { - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_get_iter_first (modelHandle, iter); OS.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false); int [] w = new int [1], h = new int [1]; @@ -522,9 +522,9 @@ public int getItemHeight () { public String [] getItems () { checkWidget(); int count = OS.gtk_tree_model_iter_n_children (modelHandle, 0); - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; String [] result = new String [count]; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); for (int index=0; index<count; index++) { OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); OS.gtk_tree_model_get (modelHandle, iter, 0, ptr, -1); @@ -578,7 +578,7 @@ public String [] getSelection () { */ public int getSelectionCount () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); return OS.gtk_tree_selection_count_selected_rows (selection); } @@ -595,14 +595,14 @@ public int getSelectionCount () { */ public int getSelectionIndex () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); - int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); if (list != 0) { int count = OS.g_list_length (list); int [] index = new int [1]; for (int i=0; i<count; i++) { - int /*long*/ data = OS.g_list_nth_data (list, i); - int /*long*/ indices = OS.gtk_tree_path_get_indices (data); + long /*int*/ data = OS.g_list_nth_data (list, i); + long /*int*/ indices = OS.gtk_tree_path_get_indices (data); if (indices != 0) { OS.memmove (index, indices, 4); for (int j = i; j < count; j++) { @@ -637,15 +637,15 @@ public int getSelectionIndex () { */ public int [] getSelectionIndices () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); - int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); if (list != 0) { int count = OS.g_list_length (list); int [] treeSelection = new int [count]; int length = 0; for (int i=0; i<count; i++) { - int /*long*/ data = OS.g_list_nth_data (list, i); - int /*long*/ indices = OS.gtk_tree_path_get_indices (data); + long /*int*/ data = OS.g_list_nth_data (list, i); + long /*int*/ indices = OS.gtk_tree_path_get_indices (data); if (indices != 0) { int [] index = new int [1]; OS.memmove (index, indices, 4); @@ -676,23 +676,23 @@ public int [] getSelectionIndices () { */ public int getTopIndex () { checkWidget(); - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_widget_realize (handle); if (!OS.gtk_tree_view_get_path_at_pos (handle, 1, 1, path, null, null, null)) return 0; if (path [0] == 0) return 0; - int /*long*/ indices = OS.gtk_tree_path_get_indices (path[0]); + long /*int*/ indices = OS.gtk_tree_path_get_indices (path[0]); int[] index = new int [1]; if (indices != 0) OS.memmove (index, indices, 4); OS.gtk_tree_path_free (path [0]); return index [0]; } -int /*long*/ gtk_changed (int /*long*/ widget) { +long /*int*/ gtk_changed (long /*int*/ widget) { sendSelectionEvent (SWT.Selection); return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { switch (OS.GDK_EVENT_TYPE (gdkEvent)) { case OS.GDK_EXPOSE: { /* @@ -711,8 +711,8 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { return super.gtk_event_after (widget, gdkEvent); } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_button_press_event (widget, event); +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_button_press_event (widget, event); if (result != 0) return result; /* * Feature in GTK. In a multi-select list view, when multiple items are already @@ -726,10 +726,10 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { OS.memmove (gdkEvent, event, GdkEventButton.sizeof); int button = gdkEvent.button; if (button == 3 && gdkEvent.type == OS.GDK_BUTTON_PRESS) { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; if (OS.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null)) { if (path [0] != 0) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); if (OS.gtk_tree_selection_path_is_selected (selection, path [0])) result = 1; OS.gtk_tree_path_free (path [0]); } @@ -744,10 +744,10 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { * widget from automatically selecting the first item. */ if ((style & SWT.SINGLE) != 0 && getSelectionCount () == 0) { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; if (OS.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null)) { if (path [0] != 0) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_view_set_cursor (handle, path [0], 0, false); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -767,8 +767,8 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_popup_menu (int /*long*/ widget) { - int /*long*/ result = super.gtk_popup_menu (widget); +long /*int*/ gtk_popup_menu (long /*int*/ widget) { + long /*int*/ result = super.gtk_popup_menu (widget); /* * Bug in GTK. The context menu for the typeahead in GtkTreeViewer * opens in the bottom right corner of the screen when Shift+F10 @@ -781,14 +781,14 @@ int /*long*/ gtk_popup_menu (int /*long*/ widget) { return OS.GTK_VERSION < OS.VERSION (2, 6, 5) ? 1 : result; } -int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long*/ column) { +long /*int*/ gtk_row_activated (long /*int*/ tree, long /*int*/ path, long /*int*/ column) { sendSelectionEvent (SWT.DefaultSelection); return 0; } void hookEvents () { super.hookEvents(); - int /*long*/ selection = OS.gtk_tree_view_get_selection(handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection(handle); OS.g_signal_connect_closure (selection, OS.changed, display.closures [CHANGED], false); OS.g_signal_connect_closure (handle, OS.row_activated, display.closures [ROW_ACTIVATED], false); } @@ -861,15 +861,15 @@ public int indexOf (String string, int start) { */ public boolean isSelected (int index) { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); byte [] buffer = Converter.wcsToMbcs (null, Integer.toString (index), true); - int /*long*/ path = OS.gtk_tree_path_new_from_string (buffer); + long /*int*/ path = OS.gtk_tree_path_new_from_string (buffer); boolean answer = OS.gtk_tree_selection_path_is_selected (selection, path); OS.gtk_tree_path_free (path); return answer; } -int /*long*/ paintWindow () { +long /*int*/ paintWindow () { OS.gtk_widget_realize (handle); return OS.gtk_tree_view_get_bin_window (handle); } @@ -904,9 +904,9 @@ public void remove (int index) { if (!(0 <= index && index < OS.gtk_tree_model_iter_n_children (modelHandle, 0))) { error (SWT.ERROR_INVALID_RANGE); } - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_list_store_remove (modelHandle, iter); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -936,8 +936,8 @@ public void remove (int start, int end) { if (!(0 <= start && start <= end && end < count)) { error (SWT.ERROR_INVALID_RANGE); } - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int index=end; index>=start; index--) { OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); @@ -998,8 +998,8 @@ public void remove (int [] indices) { if (!(0 <= start && start <= end && end < count)) { error (SWT.ERROR_INVALID_RANGE); } - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); int last = -1; for (int i=0; i<newIndices.length; i++) { @@ -1024,7 +1024,7 @@ public void remove (int [] indices) { */ public void removeAll () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_list_store_clear (modelHandle); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -1070,13 +1070,13 @@ public void removeSelectionListener(SelectionListener listener) { public void select (int index) { checkWidget(); if (!(0 <= index && index < OS.gtk_tree_model_iter_n_children (modelHandle, 0))) return; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); OS.gtk_tree_selection_select_iter (selection, iter); if ((style & SWT.SINGLE) != 0) { - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_set_cursor (handle, path, 0, false); OS.gtk_tree_path_free (path); } @@ -1113,14 +1113,14 @@ public void select (int start, int end) { if (count == 0 || start >= count) return; start = Math.max (0, start); end = Math.min (end, count - 1); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int index=start; index<=end; index++) { OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); OS.gtk_tree_selection_select_iter (selection, iter); if ((style & SWT.SINGLE) != 0) { - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_set_cursor (handle, path, 0, false); OS.gtk_tree_path_free (path); } @@ -1156,9 +1156,9 @@ public void select (int [] indices) { if (indices == null) error (SWT.ERROR_NULL_ARGUMENT); int length = indices.length; if (length == 0 || ((style & SWT.SINGLE) != 0 && length > 1)) return; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); int count = OS.gtk_tree_model_iter_n_children (modelHandle, 0); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int i=0; i<length; i++) { int index = indices [i]; @@ -1166,7 +1166,7 @@ public void select (int [] indices) { OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); OS.gtk_tree_selection_select_iter (selection, iter); if ((style & SWT.SINGLE) != 0) { - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_set_cursor (handle, path, 0, false); OS.gtk_tree_path_free (path); } @@ -1188,7 +1188,7 @@ public void select (int [] indices) { public void selectAll () { checkWidget(); if ((style & SWT.SINGLE) != 0) return; - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_selection_select_all (selection); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -1202,10 +1202,10 @@ void selectFocusIndex (int index) { */ int count = OS.gtk_tree_model_iter_n_children (modelHandle, 0); if (!(0 <= index && index < count)) return; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_view_set_cursor (handle, path, 0, false); /* @@ -1272,7 +1272,7 @@ public void setItem (int index, String string) { if (!(0 <= index && index < OS.gtk_tree_model_iter_n_children (modelHandle, 0))) { error (SWT.ERROR_INVALID_RANGE); } - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); byte [] buffer = Converter.wcsToMbcs (null, string, true); OS.gtk_list_store_set (modelHandle, iter, TEXT_COLUMN, buffer, -1); @@ -1299,11 +1299,11 @@ public void setItems (String [] items) { for (int i=0; i<items.length; i++) { if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT); } - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_list_store_clear (modelHandle); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (iter == 0) error (SWT.ERROR_ITEM_NOT_ADDED); for (int i=0; i<items.length; i++) { String string = items [i]; @@ -1477,9 +1477,9 @@ public void setSelection (String [] items) { public void setTopIndex (int index) { checkWidget(); if (!(0 <= index && index < OS.gtk_tree_model_iter_n_children (modelHandle, 0))) return; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0, 0); if (OS.GTK_VERSION < OS.VERSION (2, 8, 0)) { /* @@ -1516,9 +1516,9 @@ public void showSelection () { checkWidget(); int index = getSelectionIndex (); if (index == -1) return; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); /* * This code intentionally commented. * Bug in GTK. According to the documentation, gtk_tree_view_scroll_to_cell diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java index 5bb5e3e674..35659415f7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java @@ -43,7 +43,7 @@ public class Menu extends Widget { boolean hasLocation; MenuItem cascade, selectedItem; Decorations parent; - int /*long*/ imItem, imSeparator, imHandle; + long /*int*/ imItem, imSeparator, imHandle; ImageList imageList; /** @@ -208,9 +208,9 @@ void _setVisible (boolean visible) { OS.gtk_menu_shell_set_take_focus (handle, false); } } - int /*long*/ address = hasLocation ? display.menuPositionProc: 0; + long /*int*/ address = hasLocation ? display.menuPositionProc: 0; hasLocation = false; - int /*long*/ data = 0; + long /*int*/ data = 0; if ((OS.GTK_VERSION >= OS.VERSION (2, 10, 0))) { /* * Popup-menu to the status icon should be aligned to @@ -240,7 +240,7 @@ void _setVisible (boolean visible) { } } -void addAccelerators (int /*long*/ accelGroup) { +void addAccelerators (long /*int*/ accelGroup) { MenuItem [] items = getItems (); for (int i = 0; i < items.length; i++) { MenuItem item = items[i]; @@ -306,7 +306,7 @@ void createHandle (int index) { if ((style & SWT.BAR) != 0) { handle = OS.gtk_menu_bar_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ vboxHandle = parent.vboxHandle; + long /*int*/ vboxHandle = parent.vboxHandle; OS.gtk_container_add (vboxHandle, handle); OS.gtk_box_set_child_packing (vboxHandle, handle, false, true, 0, OS.GTK_PACK_START); } else { @@ -315,9 +315,9 @@ void createHandle (int index) { } } -void createIMMenu (int /*long*/ imHandle) { +void createIMMenu (long /*int*/ imHandle) { boolean showInputMethod = false; - int /*long*/ settings = OS.gtk_settings_get_default (); + long /*int*/ settings = OS.gtk_settings_get_default (); if (settings != 0) { int [] buffer = new int [1]; OS.g_object_get (settings, OS.gtk_show_input_method_menu, buffer, 0); @@ -349,7 +349,7 @@ void createIMMenu (int /*long*/ imHandle) { OS.gtk_widget_show (imItem); OS.gtk_menu_shell_insert (handle, imItem, -1); } - int /*long*/ imSubmenu = OS.gtk_menu_new (); + long /*int*/ imSubmenu = OS.gtk_menu_new (); OS.gtk_im_multicontext_append_menuitems (imHandle, imSubmenu); OS.gtk_menu_item_set_submenu (imItem, imSubmenu); } @@ -375,7 +375,7 @@ void fixMenus (Decorations newParent) { if (!gtk_widget_get_mapped (handle)) { return new Rectangle (0, 0, 0, 0); } - int /*long*/ window = gtk_widget_get_window (handle); + long /*int*/ window = gtk_widget_get_window (handle); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); GtkAllocation allocation = new GtkAllocation (); @@ -441,13 +441,13 @@ public boolean getEnabled () { */ public MenuItem getItem (int index) { checkWidget(); - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list == 0) error (SWT.ERROR_CANNOT_GET_ITEM); int count = OS.g_list_length (list); if (imSeparator != 0) count--; if (imItem != 0) count--; if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE); - int /*long*/ data = OS.g_list_nth_data (list, index); + long /*int*/ data = OS.g_list_nth_data (list, index); OS.g_list_free (list); if (data == 0) error (SWT.ERROR_CANNOT_GET_ITEM); return (MenuItem) display.getWidget (data); @@ -465,7 +465,7 @@ public MenuItem getItem (int index) { */ public int getItemCount () { checkWidget(); - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list == 0) return 0; int count = OS.g_list_length (list); OS.g_list_free (list); @@ -492,7 +492,7 @@ public int getItemCount () { */ public MenuItem [] getItems () { checkWidget(); - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list == 0) return new MenuItem [0]; int count = OS.g_list_length (list); if (imSeparator != 0) count--; @@ -500,7 +500,7 @@ public MenuItem [] getItems () { MenuItem [] items = new MenuItem [count]; int index = 0; for (int i=0; i<count; i++) { - int /*long*/ data = OS.g_list_nth_data (list, i); + long /*int*/ data = OS.g_list_nth_data (list, i); MenuItem item = (MenuItem) display.getWidget (data); if (item != null) items [index++] = item; } @@ -644,7 +644,7 @@ public boolean getVisible () { return gtk_widget_get_mapped (handle); } -int /*long*/ gtk_hide (int /*long*/ widget) { +long /*int*/ gtk_hide (long /*int*/ widget) { if ((style & SWT.POP_UP) != 0) { if (display.activeShell != null) display.activeShell = getShell (); } @@ -670,7 +670,7 @@ int /*long*/ gtk_hide (int /*long*/ widget) { return 0; } -int /*long*/ gtk_show (int /*long*/ widget) { +long /*int*/ gtk_show (long /*int*/ widget) { if ((style & SWT.POP_UP) != 0) { if (display.activeShell != null) display.activeShell = getShell (); return 0; @@ -687,7 +687,7 @@ int /*long*/ gtk_show (int /*long*/ widget) { } -int /*long*/ gtk_show_help (int /*long*/ widget, int /*long*/ helpType) { +long /*int*/ gtk_show_help (long /*int*/ widget, long /*int*/ helpType) { if (sendHelpEvent (helpType)) { OS.gtk_menu_shell_deactivate (handle); return 1; @@ -772,7 +772,7 @@ public boolean isVisible () { return getVisible (); } -int /*long*/ menuPositionProc (int /*long*/ menu, int /*long*/ x, int /*long*/ y, int /*long*/ push_in, int /*long*/ user_data) { +long /*int*/ menuPositionProc (long /*int*/ menu, long /*int*/ x, long /*int*/ y, long /*int*/ push_in, long /*int*/ user_data) { /* * Feature in GTK. The menu position function sets the position of the * top-left pixel of the menu. If the menu would be off-screen, GTK will @@ -860,7 +860,7 @@ public void removeMenuListener (MenuListener listener) { eventTable.unhook (SWT.Show, listener); } -void removeAccelerators (int /*long*/ accelGroup) { +void removeAccelerators (long /*int*/ accelGroup) { MenuItem [] items = getItems (); for (int i = 0; i < items.length; i++) { MenuItem item = items[i]; @@ -901,7 +901,7 @@ void reskinChildren (int flags) { super.reskinChildren (flags); } -boolean sendHelpEvent (int /*long*/ helpType) { +boolean sendHelpEvent (long /*int*/ helpType) { if (selectedItem != null && !selectedItem.isDisposed()) { if (selectedItem.hooks (SWT.Help)) { selectedItem.postEvent (SWT.Help); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java index f05769a34c..781ee567d4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java @@ -38,7 +38,7 @@ import org.eclipse.swt.events.*; */ public class MenuItem extends Item { Menu parent, menu; - int /*long*/ groupHandle; + long /*int*/ groupHandle; int accelerator, userId; /** @@ -127,11 +127,11 @@ public MenuItem (Menu parent, int style, int index) { createWidget (index); } -void addAccelerator (int /*long*/ accelGroup) { +void addAccelerator (long /*int*/ accelGroup) { updateAccelerator (accelGroup, true); } -void addAccelerators (int /*long*/ accelGroup) { +void addAccelerators (long /*int*/ accelGroup) { addAccelerator (accelGroup); if (menu != null) menu.addAccelerators (accelGroup); } @@ -258,7 +258,7 @@ void createHandle (int index) { if (groupHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.g_object_ref (groupHandle); g_object_ref_sink (groupHandle); - int /*long*/ group = OS.gtk_radio_menu_item_get_group (groupHandle); + long /*int*/ group = OS.gtk_radio_menu_item_get_group (groupHandle); handle = OS.gtk_radio_menu_item_new_with_label (group, buffer); break; case SWT.CHECK: @@ -271,10 +271,10 @@ void createHandle (int index) { } if (handle == 0) error (SWT.ERROR_NO_HANDLES); if ((style & SWT.SEPARATOR) == 0) { - int /*long*/ label = OS.gtk_bin_get_child (handle); + long /*int*/ label = OS.gtk_bin_get_child (handle); OS.gtk_accel_label_set_accel_widget (label, 0); } - int /*long*/ parentHandle = parent.handle; + long /*int*/ parentHandle = parent.handle; boolean enabled = gtk_widget_get_sensitive (parentHandle); if (!enabled) OS.gtk_widget_set_sensitive (parentHandle, true); OS.gtk_menu_shell_insert (parentHandle, handle, index); @@ -306,7 +306,7 @@ public int getAccelerator () { return accelerator; } -int /*long*/ getAccelGroup () { +long /*int*/ getAccelGroup () { Menu menu = parent; while (menu != null && menu.cascade != null) { menu = menu.cascade.parent; @@ -427,7 +427,7 @@ public boolean getSelection () { return OS.gtk_check_menu_item_get_active(handle); } -int /*long*/ gtk_activate (int /*long*/ widget) { +long /*int*/ gtk_activate (long /*int*/ widget) { if ((style & SWT.CASCADE) != 0 && menu != null) return 0; /* * Bug in GTK. When an ancestor menu is disabled and @@ -446,13 +446,13 @@ int /*long*/ gtk_activate (int /*long*/ widget) { return 0; } -int /*long*/ gtk_select (int /*long*/ item) { +long /*int*/ gtk_select (long /*int*/ item) { parent.selectedItem = this; sendEvent (SWT.Arm); return 0; } -int /*long*/ gtk_show_help (int /*long*/ widget, int /*long*/ helpType) { +long /*int*/ gtk_show_help (long /*int*/ widget, long /*int*/ helpType) { boolean handled = hooks (SWT.Help); if (handled) { postEvent (SWT.Help); @@ -511,7 +511,7 @@ void releaseParent () { void releaseWidget () { super.releaseWidget (); - int /*long*/ accelGroup = getAccelGroup (); + long /*int*/ accelGroup = getAccelGroup (); if (accelGroup != 0) removeAccelerator (accelGroup); if (groupHandle != 0) OS.g_object_unref (groupHandle); groupHandle = 0; @@ -519,11 +519,11 @@ void releaseWidget () { parent = null; } -void removeAccelerator (int /*long*/ accelGroup) { +void removeAccelerator (long /*int*/ accelGroup) { updateAccelerator (accelGroup, false); } -void removeAccelerators (int /*long*/ accelGroup) { +void removeAccelerators (long /*int*/ accelGroup) { removeAccelerator (accelGroup); if (menu != null) menu.removeAccelerators (accelGroup); } @@ -635,7 +635,7 @@ void selectRadio () { public void setAccelerator (int accelerator) { checkWidget(); if (this.accelerator == accelerator) return; - int /*long*/ accelGroup = getAccelGroup (); + long /*int*/ accelGroup = getAccelGroup (); if (accelGroup != 0) removeAccelerator (accelGroup); this.accelerator = accelerator; if (accelGroup != 0) addAccelerator (accelGroup); @@ -657,7 +657,7 @@ public void setAccelerator (int accelerator) { public void setEnabled (boolean enabled) { checkWidget(); if (gtk_widget_get_sensitive (handle) == enabled) return; - int /*long*/ accelGroup = getAccelGroup (); + long /*int*/ accelGroup = getAccelGroup (); if (accelGroup != 0) removeAccelerator (accelGroup); OS.gtk_widget_set_sensitive (handle, enabled); if (accelGroup != 0) addAccelerator (accelGroup); @@ -713,8 +713,8 @@ public void setImage (Image image) { } else { imageList.put (imageIndex, image); } - int /*long*/ pixbuf = imageList.getPixbuf (imageIndex); - int /*long*/ imageHandle = OS.gtk_image_new_from_pixbuf (pixbuf); + long /*int*/ pixbuf = imageList.getPixbuf (imageIndex); + long /*int*/ imageHandle = OS.gtk_image_new_from_pixbuf (pixbuf); OS.gtk_image_menu_item_set_image (handle, imageHandle); OS.gtk_widget_show (imageHandle); } else { @@ -766,7 +766,7 @@ public void setMenu (Menu menu) { /* Assign the new menu */ Menu oldMenu = this.menu; if (oldMenu == menu) return; - int /*long*/ accelGroup = getAccelGroup (); + long /*int*/ accelGroup = getAccelGroup (); if (accelGroup != 0) removeAccelerators (accelGroup); if (oldMenu != null) { oldMenu.cascade = null; @@ -881,15 +881,15 @@ public void setText (String string) { } char [] chars = fixMnemonic (string); byte [] buffer = Converter.wcsToMbcs (null, chars, true); - int /*long*/ label = OS.gtk_bin_get_child (handle); + long /*int*/ label = OS.gtk_bin_get_child (handle); if (label != 0 && OS.GTK_IS_LABEL(label)) { OS.gtk_label_set_text_with_mnemonic (label, buffer); if (OS.GTK_VERSION < OS.VERSION(3, 0, 0)) { if (OS.GTK_IS_ACCEL_LABEL(label)) { buffer = Converter.wcsToMbcs (null, accelString, true); - int /*long*/ ptr = OS.g_malloc (buffer.length); + long /*int*/ ptr = OS.g_malloc (buffer.length); OS.memmove (ptr, buffer, buffer.length); - int /*long*/ oldPtr = OS.GTK_ACCEL_LABEL_GET_ACCEL_STRING (label); + long /*int*/ oldPtr = OS.GTK_ACCEL_LABEL_GET_ACCEL_STRING (label); OS.GTK_ACCEL_LABEL_SET_ACCEL_STRING (label, ptr); if (oldPtr != 0) OS.g_free (oldPtr); } @@ -897,7 +897,7 @@ public void setText (String string) { } } -void updateAccelerator (int /*long*/ accelGroup, boolean add) { +void updateAccelerator (long /*int*/ accelGroup, boolean add) { if (accelerator == 0 || !getEnabled ()) return; if ((accelerator & SWT.COMMAND) != 0) return; int mask = 0; @@ -975,7 +975,7 @@ boolean updateAcceleratorText (boolean show) { } } if (keysym != 0) { - int /*long*/ accelGroup = getAccelGroup (); + long /*int*/ accelGroup = getAccelGroup (); if (show) { OS.gtk_widget_add_accelerator (handle, OS.activate, accelGroup, keysym, mask, OS.GTK_ACCEL_VISIBLE); } else { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java index fbb0e8fe24..3d3aeeea15 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java @@ -41,7 +41,7 @@ import org.eclipse.swt.internal.gtk.*; public class MessageBox extends Dialog { String message = ""; - int /*long*/ handle; + long /*int*/ handle; /** * Constructs a new instance of this class given only its parent. * @@ -140,7 +140,7 @@ public void setMessage (String string) { * </ul> */ public int open () { - int /*long*/ parentHandle = (parent != null) ? parent.topHandle() : 0; + long /*int*/ parentHandle = (parent != null) ? parent.topHandle() : 0; int dialogFlags = OS.GTK_DIALOG_DESTROY_WITH_PARENT; if ((style & (SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) { dialogFlags |= OS.GTK_DIALOG_MODAL; @@ -154,7 +154,7 @@ public int open () { handle = OS.gtk_message_dialog_new(parentHandle, dialogFlags, messageType, 0, buffer); if (handle == 0) error(SWT.ERROR_NO_HANDLES); if (parentHandle != 0) { - int /*long*/ pixbufs = OS.gtk_window_get_icon_list (parentHandle); + long /*int*/ pixbufs = OS.gtk_window_get_icon_list (parentHandle); if (pixbufs != 0) { OS.gtk_window_set_icon_list (handle, pixbufs); OS.g_list_free (pixbufs); @@ -172,7 +172,7 @@ public int open () { * dialog to the same window group as of the shells. */ if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { - int /*long*/ group = OS.gtk_window_get_group(0); + long /*int*/ group = OS.gtk_window_get_group(0); OS.gtk_window_group_add_window (group, handle); } @@ -181,7 +181,7 @@ public int open () { display.setModalDialog (this); } int signalId = 0; - int /*long*/ hookId = 0; + long /*int*/ hookId = 0; if ((style & SWT.RIGHT_TO_LEFT) != 0) { signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET()); hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java index 30a87bcb95..69559df1f7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java @@ -161,8 +161,8 @@ public int getState () { return SWT.NORMAL; } -int /*long*/ gtk_realize (int /*long*/ widget) { - int /*long*/ result = super.gtk_realize (widget); +long /*int*/ gtk_realize (long /*int*/ widget) { + long /*int*/ result = super.gtk_realize (widget); if (result != 0) return result; /* * Bug in GTK. When a progress bar has been unrealized after being @@ -275,7 +275,7 @@ public void setState (int state) { //NOT IMPLEMENTED } -int /*long*/ timerProc (int /*long*/ widget) { +long /*int*/ timerProc (long /*int*/ widget) { if (isVisible ()) OS.gtk_progress_bar_pulse (handle); return 1; } @@ -298,7 +298,7 @@ void updateBar (int selection, int minimum, int maximum) { * but unexpected. The fix is to force all * outstanding redraws to be delivered. */ - int /*long*/ window = paintWindow (); + long /*int*/ window = paintWindow (); OS.gdk_window_process_updates (window, false); OS.gdk_flush (); } 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 dbc04e8c55..c2da121da4 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 @@ -40,7 +40,7 @@ import org.eclipse.swt.events.*; public class Sash extends Control { boolean dragging; int startX, startY, lastX, lastY; - int /*long*/ defaultCursor; + long /*int*/ defaultCursor; private final static int INCREMENT = 1; private final static int PAGE_INCREMENT = 9; @@ -145,12 +145,12 @@ void createHandle (int index) { void drawBand (int x, int y, int width, int height) { if ((style & SWT.SMOOTH) != 0) return; //TODO: Use Cairo - int /*long*/ window = gtk_widget_get_window (parent.paintHandle()); + long /*int*/ window = gtk_widget_get_window (parent.paintHandle()); if (window == 0) return; byte [] bits = {-86, 85, -86, 85, -86, 85, -86, 85}; - int /*long*/ stipplePixmap = OS.gdk_bitmap_create_from_data (window, bits, 8, 8); - int /*long*/ gc = OS.gdk_gc_new (window); - int /*long*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ stipplePixmap = OS.gdk_bitmap_create_from_data (window, bits, 8, 8); + long /*int*/ gc = OS.gdk_gc_new (window); + long /*int*/ colormap = OS.gdk_colormap_get_system(); GdkColor color = new GdkColor (); OS.gdk_color_white (colormap, color); OS.gdk_gc_set_foreground (gc, color); @@ -163,8 +163,8 @@ void drawBand (int x, int y, int width, int height) { OS.g_object_unref (gc); } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr) { - int /*long*/ result = super.gtk_button_press_event (widget, eventPtr); +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ eventPtr) { + long /*int*/ result = super.gtk_button_press_event (widget, eventPtr); if (result != 0) return result; GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); @@ -172,7 +172,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr) if (button != 1) return 0; if (gdkEvent.type == OS.GDK_2BUTTON_PRESS) return 0; if (gdkEvent.type == OS.GDK_3BUTTON_PRESS) return 0; - int /*long*/ window = gtk_widget_get_window (widget); + long /*int*/ window = gtk_widget_get_window (widget); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); startX = (int) (gdkEvent.x_root - origin_x [0]); @@ -212,8 +212,8 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr) return result; } -int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ eventPtr) { - int /*long*/ result = super.gtk_button_release_event (widget, eventPtr); +long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ eventPtr) { + long /*int*/ result = super.gtk_button_release_event (widget, eventPtr); if (result != 0) return result; GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); @@ -244,8 +244,8 @@ int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ eventPt return result; } -int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_focus_in_event (widget, event); +long /*int*/ gtk_focus_in_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_focus_in_event (widget, event); if (result != 0) return result; // widget could be disposed at this point if (handle != 0) { @@ -257,8 +257,8 @@ int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) { return 0; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { - int /*long*/ result = super.gtk_key_press_event (widget, eventPtr); +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { + long /*int*/ result = super.gtk_key_press_event (widget, eventPtr); if (result != 0) return result; GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); @@ -295,9 +295,9 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { if (newX == lastX && newY == lastY) return result; /* Ensure that the pointer image does not change */ - int /*long*/ window = gtk_widget_get_window (handle); + long /*int*/ window = gtk_widget_get_window (handle); int grabMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK; - int /*long*/ gdkCursor = cursor != null ? cursor.handle : defaultCursor; + long /*int*/ gdkCursor = cursor != null ? cursor.handle : defaultCursor; int ptrGrabResult = gdk_pointer_grab (window, OS.GDK_OWNERSHIP_NONE, false, grabMask, window, gdkCursor, OS.GDK_CURRENT_TIME); /* The event must be sent because its doit flag is used. */ @@ -334,8 +334,8 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { return result; } -int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr) { - int /*long*/ result = super.gtk_motion_notify_event (widget, eventPtr); +long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ eventPtr) { + long /*int*/ result = super.gtk_motion_notify_event (widget, eventPtr); if (result != 0) return result; if (!dragging) return 0; GdkEventMotion gdkEvent = new GdkEventMotion (); @@ -400,7 +400,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr return result; } -int /*long*/ gtk_realize (int /*long*/ widget) { +long /*int*/ gtk_realize (long /*int*/ widget) { setCursor (cursor != null ? cursor.handle : 0); return super.gtk_realize (widget); } @@ -441,7 +441,7 @@ public void removeSelectionListener(SelectionListener listener) { eventTable.unhook (SWT.DefaultSelection,listener); } -void setCursor (int /*long*/ cursor) { +void setCursor (long /*int*/ cursor) { super.setCursor (cursor != 0 ? cursor : defaultCursor); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java index 4d925481c7..fbb9afb23f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java @@ -126,7 +126,7 @@ void createHandle (int index) { fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); gtk_widget_set_has_window (fixedHandle, true); - int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0); + long /*int*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0); if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES); if ((style & SWT.HORIZONTAL) != 0) { handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment); @@ -158,7 +158,7 @@ void hookEvents () { */ public int getIncrement () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.step_increment; @@ -176,7 +176,7 @@ public int getIncrement () { */ public int getMaximum () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.upper; @@ -194,7 +194,7 @@ public int getMaximum () { */ public int getMinimum () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.lower; @@ -214,7 +214,7 @@ public int getMinimum () { */ public int getPageIncrement () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.page_increment; @@ -232,13 +232,13 @@ public int getPageIncrement () { */ public int getSelection () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.value; } -int /*long*/ gtk_value_changed (int /*long*/ adjustment) { +long /*int*/ gtk_value_changed (long /*int*/ adjustment) { sendSelectionEvent (SWT.Selection); return 0; } @@ -373,8 +373,8 @@ public void setSelection (int value) { OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED); } -int /*long*/ gtk_scale_new (int orientation, int /*long*/ adjustment) { - int /*long*/ scale = 0; +long /*int*/ gtk_scale_new (int orientation, long /*int*/ adjustment) { + long /*int*/ scale = 0; if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) { scale = OS.gtk_scale_new (orientation, adjustment); } else { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java index e09afe3c7b..2d282c4efb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java @@ -84,7 +84,7 @@ import org.eclipse.swt.events.*; */ public class ScrollBar extends Widget { Scrollable parent; - int /*long*/ adjustmentHandle; + long /*int*/ adjustmentHandle; int detail; boolean dragSent; @@ -357,7 +357,7 @@ public Rectangle getThumbBounds () { } Rectangle rect = new Rectangle(x, y, width, height); int [] origin_x = new int [1], origin_y = new int [1]; - int /*long*/ window = gtk_widget_get_window (parent.scrolledHandle); + long /*int*/ window = gtk_widget_get_window (parent.scrolledHandle); if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y); rect.x += origin_x [0]; rect.y += origin_y [0]; @@ -429,7 +429,7 @@ public Rectangle getThumbTrackBounds () { } Rectangle rect = new Rectangle(x, y, width, height); int [] origin_x = new int [1], origin_y = new int [1]; - int /*long*/ window = gtk_widget_get_window (parent.scrolledHandle); + long /*int*/ window = gtk_widget_get_window (parent.scrolledHandle); if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y); rect.x += origin_x [0]; rect.y += origin_y [0]; @@ -459,7 +459,7 @@ public Rectangle getThumbTrackBounds () { */ public boolean getVisible () { checkWidget (); - int /*long*/ scrolledHandle = parent.scrolledHandle; + long /*int*/ scrolledHandle = parent.scrolledHandle; int [] hsp = new int [1], vsp = new int [1]; OS.gtk_scrolled_window_get_policy (scrolledHandle, hsp, vsp); if ((style & SWT.HORIZONTAL) != 0) { @@ -469,20 +469,20 @@ public boolean getVisible () { } } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr) { - int /*long*/ result = super.gtk_button_press_event (widget, eventPtr); +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ eventPtr) { + long /*int*/ result = super.gtk_button_press_event (widget, eventPtr); if (result != 0) return result; detail = OS.GTK_SCROLL_NONE; dragSent = false; return result; } -int /*long*/ gtk_change_value (int /*long*/ widget, int /*long*/ scroll, int /*long*/ value1, int /*long*/ value2) { +long /*int*/ gtk_change_value (long /*int*/ widget, long /*int*/ scroll, long /*int*/ value1, long /*int*/ value2) { detail = (int)/*64*/scroll; return 0; } -void gtk_range_get_slider_range (int /*long*/ widget, int [] slider_start, int [] slider_end) { +void gtk_range_get_slider_range (long /*int*/ widget, int [] slider_start, int [] slider_end) { if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) { OS.gtk_range_get_slider_range (widget, slider_start, slider_end); } else { @@ -491,7 +491,7 @@ void gtk_range_get_slider_range (int /*long*/ widget, int [] slider_start, int [ } } -int /*long*/ gtk_value_changed (int /*long*/ adjustment) { +long /*int*/ gtk_value_changed (long /*int*/ adjustment) { Event event = new Event (); dragSent = detail == OS.GTK_SCROLL_JUMP; switch (detail) { @@ -518,7 +518,7 @@ int /*long*/ gtk_value_changed (int /*long*/ adjustment) { return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent gtkEvent = new GdkEvent (); OS.memmove (gtkEvent, gdkEvent, GdkEvent.sizeof); switch (gtkEvent.type) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java index 89f5371ec5..9d6d313a8e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java @@ -33,7 +33,7 @@ import org.eclipse.swt.graphics.*; * @noextend This class is not intended to be subclassed by clients. */ public abstract class Scrollable extends Control { - int /*long*/ scrolledHandle; + long /*int*/ scrolledHandle; ScrollBar horizontalBar, verticalBar; /** @@ -74,7 +74,7 @@ public Scrollable (Composite parent, int style) { super (parent, style); } -int /*long*/ clientHandle () { +long /*int*/ clientHandle () { return handle; } @@ -116,7 +116,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) { trimWidth += vScrollBarWidth (); if (scrolledHandle != 0) { if (OS.gtk_scrolled_window_get_shadow_type (scrolledHandle) != OS.GTK_SHADOW_NONE) { - int /*long*/ style = OS.gtk_widget_get_style (scrolledHandle); + long /*int*/ style = OS.gtk_widget_get_style (scrolledHandle); int xthickness = OS.gtk_style_get_xthickness (style); int ythickness = OS.gtk_style_get_ythickness (style); trimX -= xthickness; @@ -203,7 +203,7 @@ public int getBorderWidth () { public Rectangle getClientArea () { checkWidget (); forceResize (); - int /*long*/ clientHandle = clientHandle (); + long /*int*/ clientHandle = clientHandle (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (clientHandle, allocation); int x = allocation.x; @@ -268,8 +268,8 @@ public ScrollBar getVerticalBar () { return verticalBar; } -int /*long*/ gtk_scroll_event (int /*long*/ widget, int /*long*/ eventPtr) { - int /*long*/ result = super.gtk_scroll_event (widget, eventPtr); +long /*int*/ gtk_scroll_event (long /*int*/ widget, long /*int*/ eventPtr) { + long /*int*/ result = super.gtk_scroll_event (widget, eventPtr); /* * Feature in GTK. Scrolled windows do not scroll if the scrollbars @@ -303,7 +303,7 @@ int /*long*/ gtk_scroll_event (int /*long*/ widget, int /*long*/ eventPtr) { int hScrollBarWidth() { if (horizontalBar==null) return 0; - int /*long*/ hBarHandle = 0; + long /*int*/ hBarHandle = 0; if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) { hBarHandle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR (scrolledHandle); } else { @@ -361,9 +361,9 @@ void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boole super.redrawWidget (x, y, width, height, redrawAll, all, trim); if (!gtk_widget_get_realized (handle)) return; if (!trim) return; - int /*long*/ topHandle = topHandle (), paintHandle = paintHandle (); + long /*int*/ topHandle = topHandle (), paintHandle = paintHandle (); if (topHandle == paintHandle) return; - int /*long*/ window = gtk_widget_get_window (topHandle); + long /*int*/ window = gtk_widget_get_window (topHandle); GdkRectangle rect = new GdkRectangle (); if (redrawAll) { GtkAllocation allocation = new GtkAllocation (); @@ -413,7 +413,7 @@ void showWidget () { if (scrolledHandle != 0) OS.gtk_widget_show (scrolledHandle); } -int /*long*/ topHandle () { +long /*int*/ topHandle () { if (fixedHandle != 0) return fixedHandle; if (scrolledHandle != 0) return scrolledHandle; return super.topHandle (); @@ -425,7 +425,7 @@ void updateScrollBarValue (ScrollBar bar) { int vScrollBarWidth() { if (verticalBar == null) return 0; - int /*long*/ vBarHandle = 0; + long /*int*/ vBarHandle = 0; if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) { vBarHandle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR (scrolledHandle); } else { 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 5f1a5416bc..e02976f04b 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 @@ -118,7 +118,7 @@ import org.eclipse.swt.events.*; * @noextend This class is not intended to be subclassed by clients. */ public class Shell extends Decorations { - int /*long*/ shellHandle, tooltipsHandle, tooltipWindow, group, modalGroup; + long /*int*/ shellHandle, tooltipsHandle, tooltipWindow, group, modalGroup; boolean mapped, moved, resized, opened, fullScreen, showWithParent, modified, center; int oldX, oldY, oldWidth, oldHeight; int minWidth, minHeight; @@ -254,7 +254,7 @@ public Shell (Display display, int style) { this (display, null, style, 0, false); } -Shell (Display display, Shell parent, int style, int /*long*/ handle, boolean embedded) { +Shell (Display display, Shell parent, int style, long /*int*/ handle, boolean embedded) { super (); checkSubclass (); if (display == null) display = Display.getCurrent (); @@ -359,7 +359,7 @@ public Shell (Shell parent, int style) { this (parent != null ? parent.display : null, parent, style, 0, false); } -public static Shell gtk_new (Display display, int /*long*/ handle) { +public static Shell gtk_new (Display display, long /*int*/ handle) { return new Shell (display, null, SWT.NO_TRIM, handle, true); } @@ -382,7 +382,7 @@ public static Shell gtk_new (Display display, int /*long*/ handle) { * * @since 3.3 */ -public static Shell internal_new (Display display, int /*long*/ handle) { +public static Shell internal_new (Display display, long /*int*/ handle) { return new Shell (display, null, SWT.NO_TRIM, handle, false); } @@ -455,7 +455,7 @@ void adjustTrim () { gtk_widget_get_allocation (shellHandle, allocation); int width = allocation.width; int height = allocation.height; - int /*long*/ window = gtk_widget_get_window (shellHandle); + long /*int*/ window = gtk_widget_get_window (shellHandle); GdkRectangle rect = new GdkRectangle (); OS.gdk_window_get_frame_extents (window, rect); int trimWidth = Math.max (0, rect.width - width); @@ -510,7 +510,7 @@ void bringToTop (boolean force) { if (!force) { if (activeShell == null) return; if (!display.activePending) { - int /*long*/ focusHandle = OS.gtk_window_get_focus (activeShell.shellHandle); + long /*int*/ focusHandle = OS.gtk_window_get_focus (activeShell.shellHandle); if (focusHandle != 0 && !gtk_widget_has_focus (focusHandle)) return; } } @@ -538,10 +538,10 @@ void bringToTop (boolean force) { * window. The fix is to use XSetInputFocus() to force * the focus. */ - int /*long*/ window = gtk_widget_get_window (shellHandle); + long /*int*/ window = gtk_widget_get_window (shellHandle); if ((xFocus || (style & SWT.ON_TOP) != 0) && OS.GDK_WINDOWING_X11 ()) { - int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window); - int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (window); + long /*int*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window); + long /*int*/ xWindow = OS.gdk_x11_drawable_get_xid (window); OS.gdk_error_trap_push (); /* Use CurrentTime instead of the last event time to ensure that the shell becomes active */ OS.XSetInputFocus (xDisplay, xWindow, OS.RevertToParent, OS.CurrentTime); @@ -591,7 +591,7 @@ void checkOpen () { if (!opened) resized = false; } -int /*long*/ childStyle () { +long /*int*/ childStyle () { return 0; } @@ -695,7 +695,7 @@ void createHandle (int index) { } else { vboxHandle = OS.gtk_bin_get_child (shellHandle); if (vboxHandle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ children = OS.gtk_container_get_children (vboxHandle); + long /*int*/ children = OS.gtk_container_get_children (vboxHandle); if (OS.g_list_length (children) > 0) { scrolledHandle = OS.g_list_data (children); } @@ -715,7 +715,7 @@ void createHandle (int index) { OS.gtk_widget_realize (shellHandle); } -int /*long*/ filterProc (int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*/ data2) { +long /*int*/ filterProc (long /*int*/ xEvent, long /*int*/ gdkEvent, long /*int*/ data2) { int eventType = OS.X_EVENT_TYPE (xEvent); if (eventType != OS.FocusOut && eventType != OS.FocusIn) return 0; XFocusChangeEvent xFocusEvent = new XFocusChangeEvent(); @@ -812,7 +812,7 @@ void hookEvents () { OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [MAP_EVENT], 0, display.shellMapProcClosure, false); OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [ENTER_NOTIFY_EVENT], 0, display.closures [ENTER_NOTIFY_EVENT], false); OS.g_signal_connect_closure (shellHandle, OS.move_focus, display.closures [MOVE_FOCUS], false); - int /*long*/ window = gtk_widget_get_window (shellHandle); + long /*int*/ window = gtk_widget_get_window (shellHandle); OS.gdk_window_add_filter (window, display.filterProc, shellHandle); if (isCustomResize ()) { int mask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK; @@ -853,7 +853,7 @@ void releaseParent () { /* Do nothing */ } -int /*long*/ topHandle () { +long /*int*/ topHandle () { return shellHandle; } @@ -884,15 +884,15 @@ void fixShell (Shell newShell, Control control) { } } -int /*long*/ fixedSizeAllocateProc(int /*long*/ widget, int /*long*/ allocationPtr) { +long /*int*/ fixedSizeAllocateProc(long /*int*/ widget, long /*int*/ allocationPtr) { int clientWidth = 0; if ((style & SWT.MIRRORED) != 0) clientWidth = getClientWidth (); - int /*long*/ result = super.fixedSizeAllocateProc (widget, allocationPtr); + long /*int*/ result = super.fixedSizeAllocateProc (widget, allocationPtr); if ((style & SWT.MIRRORED) != 0) moveChildren (clientWidth); return result; } -void fixStyle (int /*long*/ handle) { +void fixStyle (long /*int*/ handle) { } void forceResize () { @@ -1160,7 +1160,7 @@ public Shell [] getShells () { return result; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { if (widget == shellHandle) { if (isCustomResize ()) { if ((style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) { @@ -1186,7 +1186,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { return super.gtk_button_press_event (widget, event); } -int /*long*/ gtk_configure_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_configure_event (long /*int*/ widget, long /*int*/ event) { int [] x = new int [1], y = new int [1]; OS.gtk_window_get_position (shellHandle, x, y); if (!moved || oldX != x [0] || oldY != y [0]) { @@ -1199,25 +1199,25 @@ int /*long*/ gtk_configure_event (int /*long*/ widget, int /*long*/ event) { return 0; } -int /*long*/ gtk_delete_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_delete_event (long /*int*/ widget, long /*int*/ event) { if (isEnabled()) closeWidget (); return 1; } -int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_enter_notify_event (long /*int*/ widget, long /*int*/ event) { if (widget != shellHandle) { return super.gtk_enter_notify_event (widget, event); } return 0; } -int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ event) { if (widget == shellHandle) { if (isCustomResize ()) { GdkEventExpose gdkEventExpose = new GdkEventExpose (); OS.memmove (gdkEventExpose, event, GdkEventExpose.sizeof); - int /*long*/ style = OS.gtk_widget_get_style (widget); - int /*long*/ window = gtk_widget_get_window (widget); + long /*int*/ style = OS.gtk_widget_get_style (widget); + long /*int*/ window = gtk_widget_get_window (widget); int [] width = new int [1]; int [] height = new int [1]; gdk_window_get_size (window, width, height); @@ -1241,7 +1241,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) { return super.gtk_expose_event (widget, event); } -int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ directionType) { +long /*int*/ gtk_focus (long /*int*/ widget, long /*int*/ directionType) { switch ((int)/*64*/directionType) { case OS.GTK_DIR_TAB_FORWARD: case OS.GTK_DIR_TAB_BACKWARD: @@ -1258,13 +1258,13 @@ int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ directionType) { return super.gtk_focus (widget, directionType); } -int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_leave_notify_event (long /*int*/ widget, long /*int*/ event) { if (widget == shellHandle) { if (isCustomResize ()) { GdkEventCrossing gdkEvent = new GdkEventCrossing (); OS.memmove (gdkEvent, event, GdkEventCrossing.sizeof); if ((gdkEvent.state & OS.GDK_BUTTON1_MASK) == 0) { - int /*long*/ window = gtk_widget_get_window (shellHandle); + long /*int*/ window = gtk_widget_get_window (shellHandle); OS.gdk_window_set_cursor (window, 0); display.resizeMode = 0; } @@ -1274,17 +1274,17 @@ int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) { return super.gtk_leave_notify_event (widget, event); } -int /*long*/ gtk_move_focus (int /*long*/ widget, int /*long*/ directionType) { +long /*int*/ gtk_move_focus (long /*int*/ widget, long /*int*/ directionType) { Control control = display.getFocusControl (); if (control != null) { - int /*long*/ focusHandle = control.focusHandle (); + long /*int*/ focusHandle = control.focusHandle (); OS.gtk_widget_child_focus (focusHandle, (int)/*64*/directionType); } OS.g_signal_stop_emission_by_name (shellHandle, OS.move_focus); return 1; } -int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { if (widget == shellHandle) { if (isCustomResize ()) { GdkEventMotion gdkEvent = new GdkEventMotion (); @@ -1343,8 +1343,8 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { } else { int mode = getResizeMode (gdkEvent.x, gdkEvent.y); if (mode != display.resizeMode) { - int /*long*/ window = gtk_widget_get_window (shellHandle); - int /*long*/ cursor = OS.gdk_cursor_new (mode); + long /*int*/ window = gtk_widget_get_window (shellHandle); + long /*int*/ cursor = OS.gdk_cursor_new (mode); OS.gdk_window_set_cursor (window, cursor); OS.gdk_cursor_unref (cursor); display.resizeMode = mode; @@ -1356,7 +1356,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { return super.gtk_motion_notify_event (widget, event); } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { if (widget == shellHandle) { /* Stop menu mnemonics when the shell is disabled */ if ((state & DISABLED) != 0) return 1; @@ -1364,8 +1364,8 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { if (menuBar != null && !menuBar.isDisposed ()) { Control focusControl = display.getFocusControl (); if (focusControl != null && (focusControl.hooks (SWT.KeyDown) || focusControl.filters (SWT.KeyDown))) { - int /*long*/ [] accel = new int /*long*/ [1]; - int /*long*/ setting = OS.gtk_settings_get_default (); + long /*int*/ [] accel = new long /*int*/ [1]; + long /*int*/ setting = OS.gtk_settings_get_default (); OS.g_object_get (setting, OS.gtk_menu_bar_accel, accel, 0); if (accel [0] != 0) { int [] keyval = new int [1]; @@ -1388,7 +1388,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { return super.gtk_key_press_event (widget, event); } -int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { +long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { GtkAllocation widgetAllocation = new GtkAllocation (); gtk_widget_get_allocation (shellHandle, widgetAllocation); int width = widgetAllocation.width; @@ -1401,9 +1401,9 @@ int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { return 0; } -int /*long*/ gtk_realize (int /*long*/ widget) { - int /*long*/ result = super.gtk_realize (widget); - int /*long*/ window = gtk_widget_get_window (shellHandle); +long /*int*/ gtk_realize (long /*int*/ widget) { + long /*int*/ result = super.gtk_realize (widget); + long /*int*/ window = gtk_widget_get_window (shellHandle); if ((style & SWT.SHELL_TRIM) != SWT.SHELL_TRIM) { int decorations = 0; if ((style & SWT.NO_TRIM) == 0) { @@ -1429,7 +1429,7 @@ int /*long*/ gtk_realize (int /*long*/ widget) { return result; } -int /*long*/ gtk_window_state_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_window_state_event (long /*int*/ widget, long /*int*/ event) { GdkEventWindowState gdkEvent = new GdkEventWindowState (); OS.memmove (gdkEvent, event, GdkEventWindowState.sizeof); minimized = (gdkEvent.new_window_state & OS.GDK_WINDOW_STATE_ICONIFIED) != 0; @@ -1697,13 +1697,13 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize return result; } -void setCursor (int /*long*/ cursor) { +void setCursor (long /*int*/ cursor) { if (enableWindow != 0) { OS.gdk_window_set_cursor (enableWindow, cursor); if (!OS.GDK_WINDOWING_X11 ()) { OS.gdk_flush (); } else { - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); OS.XFlush (xDisplay); } } @@ -1736,9 +1736,9 @@ public void setEnabled (boolean enabled) { enableWindow = 0; } } else { - int /*long*/ parentHandle = shellHandle; + long /*int*/ parentHandle = shellHandle; OS.gtk_widget_realize (parentHandle); - int /*long*/ window = gtk_widget_get_window (parentHandle); + long /*int*/ window = gtk_widget_get_window (parentHandle); Rectangle rect = getBounds (); GdkWindowAttr attributes = new GdkWindowAttr (); attributes.width = rect.width; @@ -1753,7 +1753,7 @@ public void setEnabled (boolean enabled) { if (!OS.GDK_WINDOWING_X11 ()) { OS.gdk_flush (); } else { - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); OS.XFlush (xDisplay); } } @@ -1827,7 +1827,7 @@ void setInitialBounds () { if ((state & FOREIGN_HANDLE) != 0) return; int width = OS.gdk_screen_width () * 5 / 8; int height = OS.gdk_screen_height () * 5 / 8; - int /*long*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = OS.gdk_screen_get_default (); if (screen != 0) { if (OS.gdk_screen_get_n_monitors (screen) > 1) { int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, paintWindow ()); @@ -1862,13 +1862,13 @@ public void setMenuBar (Menu menu) { if (menu.parent != this) error (SWT.ERROR_INVALID_PARENT); } if (menuBar != null) { - int /*long*/ menuHandle = menuBar.handle; + long /*int*/ menuHandle = menuBar.handle; OS.gtk_widget_hide (menuHandle); destroyAccelGroup (); } menuBar = menu; if (menuBar != null) { - int /*long*/ menuHandle = menu.handle; + long /*int*/ menuHandle = menu.handle; OS.gtk_widget_show (menuHandle); createAccelGroup (); menuBar.addAccelerators (accelGroup); @@ -2125,7 +2125,7 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations) { if (mapped) setZOrder (sibling, above, false, false); } -int /*long*/ shellMapProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ shellMapProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { mapped = true; display.dispatchEvents = null; return 0; @@ -2150,12 +2150,12 @@ void showWidget () { if (vboxHandle != 0) OS.gtk_widget_show (vboxHandle); } -int /*long*/ sizeAllocateProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ sizeAllocateProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { int offset = 16; int [] x = new int [1], y = new int [1]; OS.gdk_window_get_pointer (0, x, y, null); y [0] += offset; - int /*long*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = OS.gdk_screen_get_default (); if (screen != 0) { int monitorNumber = OS.gdk_screen_get_monitor_at_point (screen, x[0], y[0]); GdkRectangle dest = new GdkRectangle (); @@ -2175,7 +2175,7 @@ int /*long*/ sizeAllocateProc (int /*long*/ handle, int /*long*/ arg0, int /*lon return 0; } -int /*long*/ sizeRequestProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ sizeRequestProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { OS.gtk_widget_hide (handle); return 0; } @@ -2222,7 +2222,7 @@ int trimWidth () { void updateModal () { if (OS.GTK_IS_PLUG (shellHandle)) return; - int /*long*/ group = 0; + long /*int*/ group = 0; boolean isModalShell = false; if (display.getModalDialog () == null) { Shell modal = getModalShell (); @@ -2400,23 +2400,23 @@ void releaseWidget () { tooltipsHandle = 0; if (group != 0) OS.g_object_unref (group); group = modalGroup = 0; - int /*long*/ window = gtk_widget_get_window (shellHandle); + long /*int*/ window = gtk_widget_get_window (shellHandle); OS.gdk_window_remove_filter(window, display.filterProc, shellHandle); lastActive = null; } -void setToolTipText (int /*long*/ tipWidget, String string) { +void setToolTipText (long /*int*/ tipWidget, String string) { setToolTipText (tipWidget, tipWidget, string); } -void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String string) { +void setToolTipText (long /*int*/ rootWidget, long /*int*/ tipWidget, String string) { if (OS.GTK_VERSION >= OS.VERSION (2, 12, 0)) { byte [] buffer = null; if (string != null && string.length () > 0) { char [] chars = fixMnemonic (string, false); buffer = Converter.wcsToMbcs (null, chars, true); } - int /*long*/ oldTooltip = OS.gtk_widget_get_tooltip_text (rootWidget); + long /*int*/ oldTooltip = OS.gtk_widget_get_tooltip_text (rootWidget); boolean same = false; if (buffer == null && oldTooltip == 0) { same = true; @@ -2434,12 +2434,12 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str * 2 fake GDK_MOTION_NOTIFY events (to mimic the GTK call) which * contain the proper x and y coordinates. */ - int /*long*/ eventPtr = 0; - int /*long*/ tipWindow = gtk_widget_get_window (rootWidget); + long /*int*/ eventPtr = 0; + long /*int*/ tipWindow = gtk_widget_get_window (rootWidget); if (tipWindow != 0) { int [] x = new int [1], y = new int [1]; - int /*long*/ window = OS.gdk_window_at_pointer (x, y); - int /*long*/ [] user_data = new int /*long*/ [1]; + long /*int*/ window = OS.gdk_window_at_pointer (x, y); + long /*int*/ [] user_data = new long /*int*/ [1]; if (window != 0) OS.gdk_window_get_user_data (window, user_data); if (tipWidget == user_data [0]) { eventPtr = OS.gdk_event_new (OS.GDK_MOTION_NOTIFY); @@ -2466,9 +2466,9 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str char [] chars = fixMnemonic (string, false); buffer = Converter.wcsToMbcs (null, chars, true); } - int /*long*/ tipData = OS.gtk_tooltips_data_get(tipWidget); + long /*int*/ tipData = OS.gtk_tooltips_data_get(tipWidget); if (tipData != 0) { - int /*long*/ oldTooltip = OS.GTK_TOOLTIPS_GET_TIP_TEXT(tipData); + long /*int*/ oldTooltip = OS.GTK_TOOLTIPS_GET_TIP_TEXT(tipData); if (string == null && oldTooltip == 0) { return; } else if (string != null && oldTooltip != 0) { @@ -2496,7 +2496,7 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str * where it's deprecated. */ OS.gtk_tooltips_force_window (tooltipsHandle); - int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (tooltipsHandle); + long /*int*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (tooltipsHandle); if (tipWindow != 0 && tipWindow != tooltipWindow) { OS.g_signal_connect (tipWindow, OS.size_allocate, display.sizeAllocateProc, shellHandle); tooltipWindow = tipWindow; @@ -2512,9 +2512,9 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str if (tipWindow != 0) { if (gtk_widget_get_visible (tipWidget) || gtk_widget_get_realized (tipWidget)) { int [] x = new int [1], y = new int [1]; - int /*long*/ window = OS.gdk_window_at_pointer (x, y); + long /*int*/ window = OS.gdk_window_at_pointer (x, y); if (window != 0) { - int /*long*/ [] user_data = new int /*long*/ [1]; + long /*int*/ [] user_data = new long /*int*/ [1]; OS.gdk_window_get_user_data (window, user_data); if (tipWidget == user_data [0]) { /* @@ -2528,7 +2528,7 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str int handler_id = OS.g_signal_connect (tipWindow, OS.size_request, display.sizeRequestProc, shellHandle); OS.gtk_tooltips_set_tip (tooltipsHandle, tipWidget, buffer, null); OS.gtk_widget_hide (tipWindow); - int /*long*/ data = OS.gtk_tooltips_data_get (tipWidget); + long /*int*/ data = OS.gtk_tooltips_data_get (tipWidget); OS.GTK_TOOLTIPS_SET_ACTIVE (tooltipsHandle, data); OS.gtk_tooltips_set_tip (tooltipsHandle, tipWidget, buffer, null); if (handler_id != 0) OS.g_signal_handler_disconnect (tipWindow, handler_id); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java index 61a3f21d5e..82bc85f83a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java @@ -153,7 +153,7 @@ void createHandle (int index) { fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); gtk_widget_set_has_window (fixedHandle, true); - int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10); + long /*int*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10); if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES); if ((style & SWT.HORIZONTAL) != 0) { handle = gtk_scrollbar_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment); @@ -175,20 +175,20 @@ void createHandle (int index) { OS.gtk_container_add (fixedHandle, handle); } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr) { - int /*long*/ result = super.gtk_button_press_event (widget, eventPtr); +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ eventPtr) { + long /*int*/ result = super.gtk_button_press_event (widget, eventPtr); if (result != 0) return result; detail = OS.GTK_SCROLL_NONE; dragSent = false; return result; } -int /*long*/ gtk_change_value (int /*long*/ widget, int /*long*/ scroll, int /*long*/ value1, int /*long*/ value2) { +long /*int*/ gtk_change_value (long /*int*/ widget, long /*int*/ scroll, long /*int*/ value1, long /*int*/ value2) { detail = (int)/*64*/scroll; return 0; } -int /*long*/ gtk_value_changed (int /*long*/ adjustment) { +long /*int*/ gtk_value_changed (long /*int*/ adjustment) { Event event = new Event (); dragSent = detail == OS.GTK_SCROLL_JUMP; switch (detail) { @@ -214,7 +214,7 @@ int /*long*/ gtk_value_changed (int /*long*/ adjustment) { return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent gtkEvent = new GdkEvent (); OS.memmove (gtkEvent, gdkEvent, GdkEvent.sizeof); switch (gtkEvent.type) { @@ -247,13 +247,13 @@ void hookEvents () { void register () { super.register (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); display.addWidget (hAdjustment, this); } void deregister () { super.deregister (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); display.removeWidget (hAdjustment); } @@ -284,7 +284,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { */ public int getIncrement () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.step_increment; @@ -302,7 +302,7 @@ public int getIncrement () { */ public int getMaximum () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.upper; @@ -320,7 +320,7 @@ public int getMaximum () { */ public int getMinimum () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.lower; @@ -340,7 +340,7 @@ public int getMinimum () { */ public int getPageIncrement () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.page_increment; @@ -358,7 +358,7 @@ public int getPageIncrement () { */ public int getSelection () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.value; @@ -376,7 +376,7 @@ public int getSelection () { */ public int getThumb () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.page_size; @@ -443,7 +443,7 @@ public void setIncrement (int value) { */ public void setMaximum (int value) { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); int minimum = (int) adjustment.lower; @@ -473,7 +473,7 @@ public void setMaximum (int value) { public void setMinimum (int value) { checkWidget (); if (value < 0) return; - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); int maximum = (int) adjustment.upper; @@ -556,7 +556,7 @@ public void setSelection (int value) { public void setThumb (int value) { checkWidget (); if (value < 1) return; - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); value = (int) Math.min (value, (int)(adjustment.upper - adjustment.lower)); @@ -597,7 +597,7 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i if (increment < 1) return; if (pageIncrement < 1) return; thumb = Math.min (thumb, maximum - minimum); - int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); adjustment.value = Math.min (Math.max (selection, minimum), maximum - thumb); @@ -613,8 +613,8 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED); } -int /*long*/ gtk_scrollbar_new (int orientation, int /*long*/ adjustment) { - int /*long*/ scrollbar = 0; +long /*int*/ gtk_scrollbar_new (int orientation, long /*int*/ adjustment) { + long /*int*/ scrollbar = 0; if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) { scrollbar = OS.gtk_scrollbar_new (orientation, adjustment); } else { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java index fbb57ce8d4..995f6e1051 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java @@ -45,7 +45,7 @@ import org.eclipse.swt.events.*; public class Spinner extends Composite { static final int MIN_ARROW_WIDTH = 6; int lastEventTime = 0; - int /*long*/ gdkEventKey = 0; + long /*int*/ gdkEventKey = 0; int fixStart = -1, fixEnd = -1; double climbRate = 1; @@ -203,8 +203,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) { if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; int[] w = new int [1], h = new int [1]; OS.gtk_widget_realize (handle); - int /*long*/ layout = OS.gtk_entry_get_layout (handle); - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ layout = OS.gtk_entry_get_layout (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); int digits = OS.gtk_spin_button_get_digits (handle); @@ -222,7 +222,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { string = buffer.toString (); } byte [] buffer1 = Converter.wcsToMbcs (null, string, false); - int /*long*/ ptr = OS.pango_layout_get_text (layout); + long /*int*/ ptr = OS.pango_layout_get_text (layout); int length = OS.strlen (ptr); byte [] buffer2 = new byte [length]; OS.memmove (buffer2, ptr, length); @@ -240,7 +240,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); int xborder = 0, yborder = 0; - int /*long*/ style = OS.gtk_widget_get_style (handle); + long /*int*/ style = OS.gtk_widget_get_style (handle); if ((this.style & SWT.BORDER) != 0) { xborder += OS.gtk_style_get_xthickness (style); yborder += OS.gtk_style_get_ythickness (style); @@ -252,7 +252,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) { xborder += property [0]; yborder += property [0]; } - int /*long*/ fontDesc = OS.gtk_style_get_font_desc (style); + long /*int*/ fontDesc = OS.gtk_style_get_font_desc (style); int fontSize = OS.pango_font_description_get_size (fontDesc); int arrowSize = Math.max (OS.PANGO_PIXELS (fontSize), MIN_ARROW_WIDTH); arrowSize = arrowSize - arrowSize % 2; @@ -291,7 +291,7 @@ void createHandle (int index) { fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); gtk_widget_set_has_window (fixedHandle, true); - int /*long*/ adjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0); + long /*int*/ adjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0); if (adjustment == 0) error (SWT.ERROR_NO_HANDLES); handle = OS.gtk_spin_button_new (adjustment, climbRate, 0); if (handle == 0) error (SWT.ERROR_NO_HANDLES); @@ -320,23 +320,23 @@ public void cut () { void deregister () { super.deregister (); - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) display.removeWidget (imContext); } -int /*long*/ eventWindow () { +long /*int*/ eventWindow () { return paintWindow (); } -int /*long*/ enterExitHandle () { +long /*int*/ enterExitHandle () { return fixedHandle; } -boolean filterKey (int keyval, int /*long*/ event) { +boolean filterKey (int keyval, long /*int*/ event) { int time = OS.gdk_event_get_time (event); if (time != lastEventTime) { lastEventTime = time; - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { return OS.gtk_im_context_filter_keypress (imContext, event); } @@ -355,7 +355,7 @@ void fixIM () { * filter has to be called by SWT. */ if (gdkEventKey != 0 && gdkEventKey != -1) { - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { OS.gtk_im_context_filter_keypress (imContext, gdkEventKey); gdkEventKey = -1; @@ -371,7 +371,7 @@ GdkColor getBackgroundColor () { public int getBorderWidth () { checkWidget(); - int /*long*/ style = OS.gtk_widget_get_style (handle); + long /*int*/ style = OS.gtk_widget_get_style (handle); if ((this.style & SWT.BORDER) != 0) { return OS.gtk_style_get_xthickness (style); } @@ -395,7 +395,7 @@ GdkColor getForegroundColor () { */ public int getIncrement () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); int digits = OS.gtk_spin_button_get_digits (handle); @@ -416,7 +416,7 @@ public int getIncrement () { */ public int getMaximum () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); int digits = OS.gtk_spin_button_get_digits (handle); @@ -437,7 +437,7 @@ public int getMaximum () { */ public int getMinimum () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); int digits = OS.gtk_spin_button_get_digits (handle); @@ -459,7 +459,7 @@ public int getMinimum () { */ public int getPageIncrement () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); int digits = OS.gtk_spin_button_get_digits (handle); @@ -480,7 +480,7 @@ public int getPageIncrement () { */ public int getSelection () { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); int digits = OS.gtk_spin_button_get_digits (handle); @@ -505,7 +505,7 @@ public int getSelection () { */ public String getText () { checkWidget (); - int /*long*/ str = OS.gtk_entry_get_text (handle); + long /*int*/ str = OS.gtk_entry_get_text (handle); if (str == 0) return ""; int length = OS.strlen (str); byte [] buffer = new byte [length]; @@ -552,26 +552,26 @@ public int getDigits () { } String getDecimalSeparator () { - int /*long*/ ptr = OS.localeconv_decimal_point (); + long /*int*/ ptr = OS.localeconv_decimal_point (); int length = OS.strlen (ptr); byte [] buffer = new byte [length]; OS.memmove (buffer, ptr, length); return new String (Converter.mbcsToWcs (null, buffer)); } -int /*long*/ gtk_activate (int /*long*/ widget) { +long /*int*/ gtk_activate (long /*int*/ widget) { sendSelectionEvent (SWT.DefaultSelection); return 0; } -int /*long*/ gtk_changed (int /*long*/ widget) { - int /*long*/ str = OS.gtk_entry_get_text (handle); +long /*int*/ gtk_changed (long /*int*/ widget) { + long /*int*/ str = OS.gtk_entry_get_text (handle); int length = OS.strlen (str); if (length > 0) { - int /*long*/ [] endptr = new int /*long*/ [1]; + long /*int*/ [] endptr = new long /*int*/ [1]; double value = OS.g_strtod (str, endptr); if (endptr [0] == str + length) { - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); if (value != adjustment.value && adjustment.lower <= value && value <= adjustment.upper) { @@ -588,7 +588,7 @@ int /*long*/ gtk_changed (int /*long*/ widget) { * is to post the modify event when the user is typing. */ boolean keyPress = false; - int /*long*/ eventPtr = OS.gtk_get_current_event (); + long /*int*/ eventPtr = OS.gtk_get_current_event (); if (eventPtr != 0) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); @@ -607,7 +607,7 @@ int /*long*/ gtk_changed (int /*long*/ widget) { return 0; } -int /*long*/ gtk_commit (int /*long*/ imContext, int /*long*/ text) { +long /*int*/ gtk_commit (long /*int*/ imContext, long /*int*/ text) { if (text == 0) return 0; if (!OS.gtk_editable_get_editable (handle)) return 0; int length = OS.strlen (text); @@ -645,9 +645,9 @@ int /*long*/ gtk_commit (int /*long*/ imContext, int /*long*/ text) { return 0; } -int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int /*long*/ end_pos) { +long /*int*/ gtk_delete_text (long /*int*/ widget, long /*int*/ start_pos, long /*int*/ end_pos) { if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0; - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); if (end_pos == -1) end_pos = OS.g_utf8_strlen (ptr, -1); int start = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start_pos); int end = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end_pos); @@ -670,17 +670,17 @@ int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int / return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { if (cursor != null) setCursor (cursor.handle); return super.gtk_event_after (widget, gdkEvent); } -int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { fixIM (); return super.gtk_focus_out_event (widget, event); } -int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /*long*/ new_text_length, int /*long*/ position) { +long /*int*/ gtk_insert_text (long /*int*/ widget, long /*int*/ new_text, long /*int*/ new_text_length, long /*int*/ position) { // if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0; if (new_text == 0 || new_text_length == 0) return 0; byte [] buffer = new byte [(int)/*64*/new_text_length]; @@ -688,7 +688,7 @@ int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /* String oldText = new String (Converter.mbcsToWcs (null, buffer)); int [] pos = new int [1]; OS.memmove (pos, position, 4); - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); if (pos [0] == -1) pos [0] = (int)/*64*/OS.g_utf8_strlen (ptr, -1); int start = (int)/*64*/OS.g_utf16_pointer_to_offset (ptr, pos [0]); String newText = verifyText (oldText, start, start); @@ -720,15 +720,15 @@ int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /* return 0; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_key_press_event (widget, event); +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_key_press_event (widget, event); if (result != 0) fixIM (); if (gdkEventKey == -1) result = 1; gdkEventKey = 0; return result; } -int /*long*/ gtk_populate_popup (int /*long*/ widget, int /*long*/ menu) { +long /*int*/ gtk_populate_popup (long /*int*/ widget, long /*int*/ menu) { if ((style & SWT.RIGHT_TO_LEFT) != 0) { OS.gtk_widget_set_direction (menu, OS.GTK_TEXT_DIR_RTL); OS.gtk_container_forall (menu, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL); @@ -736,7 +736,7 @@ int /*long*/ gtk_populate_popup (int /*long*/ widget, int /*long*/ menu) { return 0; } -int /*long*/ gtk_value_changed (int /*long*/ widget) { +long /*int*/ gtk_value_changed (long /*int*/ widget) { sendSelectionEvent (SWT.Selection); return 0; } @@ -749,7 +749,7 @@ void hookEvents () { OS.g_signal_connect_closure (handle, OS.value_changed, display.closures [VALUE_CHANGED], false); OS.g_signal_connect_closure (handle, OS.activate, display.closures [ACTIVATE], false); OS.g_signal_connect_closure (handle, OS.populate_popup, display.closures [POPULATE_POPUP], false); - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { OS.g_signal_connect_closure (imContext, OS.commit, display.closures [COMMIT], false); int id = OS.g_signal_lookup (OS.commit, OS.gtk_im_context_get_type ()); @@ -758,13 +758,13 @@ void hookEvents () { } } -int /*long*/ imContext () { +long /*int*/ imContext () { return OS.GTK_ENTRY_IM_CONTEXT (handle); } -int /*long*/ paintWindow () { - int /*long*/ window = super.paintWindow (); - int /*long*/ children = OS.gdk_window_get_children (window); +long /*int*/ paintWindow () { + long /*int*/ window = super.paintWindow (); + long /*int*/ children = OS.gdk_window_get_children (window); if (children != 0) window = OS.g_list_data (children); OS.g_list_free (children); return window; @@ -789,7 +789,7 @@ public void paste () { void register () { super.register (); - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) display.addWidget (imContext, this); } @@ -876,14 +876,14 @@ void setBackgroundColor (GdkColor color) { OS.gtk_widget_modify_base (handle, 0, color); } -void setCursor (int /*long*/ cursor) { - int /*long*/ defaultCursor = 0; +void setCursor (long /*int*/ cursor) { + long /*int*/ defaultCursor = 0; if (cursor == 0) defaultCursor = OS.gdk_cursor_new (OS.GDK_XTERM); super.setCursor (cursor != 0 ? cursor : defaultCursor); if (cursor == 0) OS.gdk_cursor_unref (defaultCursor); } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); } @@ -902,7 +902,7 @@ void setFontDescription (int /*long*/ font) { public void setIncrement (int value) { checkWidget (); if (value < 1) return; - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); double newValue = value; @@ -928,7 +928,7 @@ public void setIncrement (int value) { */ public void setMaximum (int value) { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); double newValue = value; @@ -955,7 +955,7 @@ public void setMaximum (int value) { */ public void setMinimum (int value) { checkWidget (); - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); double newValue = value; @@ -982,7 +982,7 @@ public void setMinimum (int value) { public void setPageIncrement (int value) { checkWidget (); if (value < 1) return; - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); double newValue = value; @@ -1069,7 +1069,7 @@ public void setDigits (int value) { if (value < 0) error (SWT.ERROR_INVALID_ARGUMENT); int digits = OS.gtk_spin_button_get_digits (handle); if (value == digits) return; - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); int diff = Math.abs (value - digits); @@ -1139,7 +1139,7 @@ public void setValues (int selection, int minimum, int maximum, int digits, int * depending upon the value of digits. */ climbRate = 1.0 / factor; - int /*long*/ adjustment = OS.gtk_spin_button_get_adjustment(handle); + long /*int*/ adjustment = OS.gtk_spin_button_get_adjustment(handle); OS.gtk_spin_button_configure (handle, adjustment, climbRate, digits); OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED); } @@ -1153,9 +1153,9 @@ boolean translateTraversal (GdkEventKey keyEvent) { switch (key) { case OS.GDK_KP_Enter: case OS.GDK_Return: { - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { - int /*long*/ [] preeditString = new int /*long*/ [1]; + long /*int*/ [] preeditString = new long /*int*/ [1]; OS.gtk_im_context_get_preedit_string (imContext, preeditString, null, null); if (preeditString [0] != 0) { int length = OS.strlen (preeditString [0]); @@ -1174,7 +1174,7 @@ String verifyText (String string, int start, int end) { event.text = string; event.start = start; event.end = end; - int /*long*/ eventPtr = OS.gtk_get_current_event (); + long /*int*/ eventPtr = OS.gtk_get_current_event (); if (eventPtr != 0) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); @@ -1195,7 +1195,7 @@ String verifyText (String string, int start, int end) { index = 0; } if (string.length () > 0) { - int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); if (adjustment.lower < 0 && string.charAt (0) == '-') index++; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java index e8ff75e44b..ba5eb62a7e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java @@ -101,8 +101,8 @@ protected void checkSubclass () { if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS); } -int /*long*/ childStyle () { - int /*long*/ rcStyle = OS.gtk_widget_get_modifier_style (handle); +long /*int*/ childStyle () { + long /*int*/ rcStyle = OS.gtk_widget_get_modifier_style (handle); if ((OS.gtk_rc_style_get_color_flags (rcStyle, 0) & OS.GTK_RC_BG) != 0) return 0; OS.gtk_widget_realize (handle); return OS.gtk_widget_get_style (handle); @@ -140,7 +140,7 @@ public void addSelectionListener(SelectionListener listener) { addListener(SWT.DefaultSelection,typedListener); } -int /*long*/ clientHandle () { +long /*int*/ clientHandle () { int index = OS.gtk_notebook_get_current_page (handle); if (index != -1 && items [index] != null) { return items [index].pageHandle; @@ -165,7 +165,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); forceResize (); - int /*long*/ clientHandle = clientHandle (); + long /*int*/ clientHandle = clientHandle (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (clientHandle, allocation); int clientX = allocation.x; @@ -205,7 +205,7 @@ void createWidget (int index) { } void createItem (TabItem item, int index) { - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); int itemCount = 0; if (list != 0) { itemCount = OS.g_list_length (list); @@ -217,15 +217,15 @@ void createItem (TabItem item, int index) { System.arraycopy (items, 0, newItems, 0, items.length); items = newItems; } - int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0); + long /*int*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0); if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null); + long /*int*/ labelHandle = OS.gtk_label_new_with_mnemonic (null); if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ imageHandle = OS.gtk_image_new (); + long /*int*/ imageHandle = OS.gtk_image_new (); if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (boxHandle, imageHandle); OS.gtk_container_add (boxHandle, labelHandle); - int /*long*/ pageHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); + long /*int*/ pageHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (pageHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, SWITCH_PAGE); OS.gtk_notebook_insert_page (handle, pageHandle, boxHandle, index); @@ -287,7 +287,7 @@ void destroyItem (TabItem item) { } } -int /*long*/ eventHandle () { +long /*int*/ eventHandle () { return handle; } @@ -309,7 +309,7 @@ int /*long*/ eventHandle () { public TabItem getItem (int index) { checkWidget(); if (!(0 <= index && index < getItemCount())) error (SWT.ERROR_INVALID_RANGE); - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list == 0) error (SWT.ERROR_CANNOT_GET_ITEM); int itemCount = OS.g_list_length (list); OS.g_list_free (list); @@ -338,7 +338,7 @@ public TabItem getItem (int index) { public TabItem getItem(Point point) { checkWidget(); if (point == null) error (SWT.ERROR_NULL_ARGUMENT); - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list == 0) return null; int itemCount = OS.g_list_length (list); OS.g_list_free (list); @@ -362,7 +362,7 @@ public TabItem getItem(Point point) { */ public int getItemCount () { checkWidget(); - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list == 0) return 0; int itemCount = OS.g_list_length (list); OS.g_list_free (list); @@ -432,11 +432,11 @@ public int getSelectionIndex () { return OS.gtk_notebook_get_current_page (handle); } -int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ directionType) { +long /*int*/ gtk_focus (long /*int*/ widget, long /*int*/ directionType) { return 0; } -int /*long*/ gtk_switch_page (int /*long*/ widget, int /*long*/ page, int /*long*/ page_num) { +long /*int*/ gtk_switch_page (long /*int*/ widget, long /*int*/ page, long /*int*/ page_num) { int index = OS.gtk_notebook_get_current_page (handle); if (index != -1) { Control control = items [index].getControl (); @@ -481,7 +481,7 @@ void hookEvents () { public int indexOf (TabItem item) { checkWidget(); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list == 0) return -1; int count = OS.g_list_length (list); OS.g_list_free (list); @@ -498,7 +498,7 @@ Point minimumSize (int wHint, int hHint, boolean flushCache) { Control child = children [i]; int index = 0; int count = 0; - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list != 0) { count = OS.g_list_length (list); OS.g_list_free (list); @@ -523,7 +523,7 @@ Point minimumSize (int wHint, int hHint, boolean flushCache) { boolean mnemonicHit (char key) { int itemCount = getItemCount (); for (int i=0; i<itemCount; i++) { - int /*long*/ labelHandle = items [i].labelHandle; + long /*int*/ labelHandle = items [i].labelHandle; if (labelHandle != 0 && mnemonicHit (labelHandle, key)) return true; } return false; @@ -532,7 +532,7 @@ boolean mnemonicHit (char key) { boolean mnemonicMatch (char key) { int itemCount = getItemCount (); for (int i=0; i<itemCount; i++) { - int /*long*/ labelHandle = items [i].labelHandle; + long /*int*/ labelHandle = items [i].labelHandle; if (labelHandle != 0 && mnemonicHit (labelHandle, key)) return true; } return false; @@ -593,7 +593,7 @@ public void removeSelectionListener (SelectionListener listener) { void reskinChildren (int flags) { if (items != null) { - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list != 0){ int count = OS.g_list_length (list); OS.g_list_free (list); @@ -621,7 +621,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize return result; } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); TabItem [] items = getItems (); for (int i = 0; i < items.length; i++) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java index 8a5b3fcde0..81a1df23b4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java @@ -34,7 +34,7 @@ import org.eclipse.swt.graphics.*; * @noextend This class is not intended to be subclassed by clients. */ public class TabItem extends Item { - int /*long*/ labelHandle, imageHandle, pageHandle; + long /*int*/ labelHandle, imageHandle, pageHandle; Control control; TabFolder parent; String toolTipText; @@ -208,12 +208,12 @@ public String getToolTipText () { return toolTipText; } -int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_enter_notify_event (long /*int*/ widget, long /*int*/ event) { parent.gtk_enter_notify_event (widget, event); return 0; } -int /*long*/ gtk_mnemonic_activate (int /*long*/ widget, int /*long*/ arg1) { +long /*int*/ gtk_mnemonic_activate (long /*int*/ widget, long /*int*/ arg1) { return parent.gtk_mnemonic_activate (widget, arg1); } @@ -283,7 +283,7 @@ public void setControl (Control control) { if (oldControl != null) oldControl.setVisible (false); } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { OS.gtk_widget_modify_font (labelHandle, font); OS.gtk_widget_modify_font (imageHandle, font); } @@ -306,7 +306,7 @@ public void setImage (Image image) { } else { imageList.put (imageIndex, image); } - int /*long*/ pixbuf = imageList.getPixbuf (imageIndex); + long /*int*/ pixbuf = imageList.getPixbuf (imageIndex); OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf); OS.gtk_widget_show (imageHandle); } else { 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 6c08ac3d7b..f6d24aead3 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 @@ -68,9 +68,9 @@ import org.eclipse.swt.events.*; * @noextend This class is not intended to be subclassed by clients. */ public class Table extends Composite { - int /*long*/ modelHandle, checkRenderer; + long /*int*/ modelHandle, checkRenderer; int itemCount, columnCount, lastIndexOf, sortDirection; - int /*long*/ ignoreCell; + long /*int*/ ignoreCell; TableItem [] items; TableColumn [] columns; TableItem currentItem; @@ -170,9 +170,9 @@ static int checkStyle (int style) { return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0); } -int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*long*/ tree_model, int /*long*/ iter, int /*long*/ data) { +long /*int*/ cellDataProc (long /*int*/ tree_column, long /*int*/ cell, long /*int*/ tree_model, long /*int*/ iter, long /*int*/ data) { if (cell == ignoreCell) return 0; - int /*long*/ path = OS.gtk_tree_model_get_path (tree_model, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (tree_model, iter); int [] index = new int [1]; OS.memmove (index, OS.gtk_tree_path_get_indices (path), 4); TableItem item = _getItem (index[0]); @@ -200,7 +200,7 @@ int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*lo setData = checkData (item); } } - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; if (setData) { ptr [0] = 0; if (isPixbuf) { @@ -307,7 +307,7 @@ public void addSelectionListener (SelectionListener listener) { addListener (SWT.DefaultSelection, typedListener); } -int calculateWidth (int /*long*/ column, int /*long*/ iter) { +int calculateWidth (long /*int*/ column, long /*int*/ iter) { OS.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false); /* * Bug in GTK. The width calculated by gtk_tree_view_column_cell_get_size() @@ -323,16 +323,16 @@ int calculateWidth (int /*long*/ column, int /*long*/ iter) { int [] w = new int [1]; OS.gtk_widget_style_get(handle, OS.focus_line_width, w, 0); width += 2 * w [0]; - int /*long*/ list = 0; + long /*int*/ list = 0; if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) { list = OS.gtk_cell_layout_get_cells(column); } else { list = OS.gtk_tree_view_column_get_cell_renderers (column); } if (list == 0) return 0; - int /*long*/ temp = list; + long /*int*/ temp = list; while (temp != 0) { - int /*long*/ renderer = OS.g_list_data (temp); + long /*int*/ renderer = OS.g_list_data (temp); if (renderer != 0) { OS.gtk_cell_renderer_get_size (renderer, handle, null, null, null, w, null); width += w [0]; @@ -506,19 +506,19 @@ void createColumn (TableColumn column, int index) { modelIndex++; } if (modelIndex == modelLength) { - int /*long*/ oldModel = modelHandle; - int /*long*/[] types = getColumnTypes (columnCount + 4); // grow by 4 rows at a time - int /*long*/ newModel = OS.gtk_list_store_newv (types.length, types); + long /*int*/ oldModel = modelHandle; + long /*int*/[] types = getColumnTypes (columnCount + 4); // grow by 4 rows at a time + long /*int*/ newModel = OS.gtk_list_store_newv (types.length, types); if (newModel == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int [] ptr1 = new int [1]; for (int i=0; i<itemCount; i++) { - int /*long*/ newItem = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ newItem = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (newItem == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_list_store_append (newModel, newItem); TableItem item = items [i]; if (item != null) { - int /*long*/ oldItem = item.handle; + long /*int*/ oldItem = item.handle; /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */ for (int j=0; j<FOREGROUND_COLUMN; j++) { OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1); @@ -550,7 +550,7 @@ void createColumn (TableColumn column, int index) { setModel (newModel); } } - int /*long*/ columnHandle = OS.gtk_tree_view_column_new (); + long /*int*/ columnHandle = OS.gtk_tree_view_column_new (); if (columnHandle == 0) error (SWT.ERROR_NO_HANDLES); if (index == 0 && columnCount > 0) { TableColumn checkColumn = columns [0]; @@ -601,7 +601,7 @@ void createHandle (int index) { gtk_widget_set_has_window (fixedHandle, true); scrolledHandle = OS.gtk_scrolled_window_new (0, 0); if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ [] types = getColumnTypes (1); + long /*int*/ [] types = getColumnTypes (1); modelHandle = OS.gtk_list_store_newv (types.length, types); if (modelHandle == 0) error (SWT.ERROR_NO_HANDLES); handle = OS.gtk_tree_view_new_with_model (modelHandle); @@ -616,7 +616,7 @@ void createHandle (int index) { OS.gtk_container_add (scrolledHandle, handle); int mode = (style & SWT.MULTI) != 0 ? OS.GTK_SELECTION_MULTIPLE : OS.GTK_SELECTION_BROWSE; - int /*long*/ selectionHandle = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selectionHandle = OS.gtk_tree_view_get_selection (handle); OS.gtk_tree_selection_set_mode (selectionHandle, mode); OS.gtk_tree_view_set_headers_visible (handle, false); int hsp = (style & SWT.H_SCROLL) != 0 ? OS.GTK_POLICY_AUTOMATIC : OS.GTK_POLICY_NEVER; @@ -658,11 +658,11 @@ void createItem (TableColumn column, int index) { } else { createColumn (column, index); } - int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 3); + long /*int*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 3); if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null); + long /*int*/ labelHandle = OS.gtk_label_new_with_mnemonic (null); if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ imageHandle = OS.gtk_image_new (); + long /*int*/ imageHandle = OS.gtk_image_new (); if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (boxHandle, imageHandle); OS.gtk_container_add (boxHandle, labelHandle); @@ -671,7 +671,7 @@ void createItem (TableColumn column, int index) { column.labelHandle = labelHandle; column.imageHandle = imageHandle; OS.gtk_tree_view_column_set_widget (column.handle, boxHandle); - int /*long*/ widget = OS.gtk_widget_get_parent (boxHandle); + long /*int*/ widget = OS.gtk_widget_get_parent (boxHandle); while (widget != handle) { if (OS.GTK_IS_BUTTON (widget)) { column.buttonHandle = widget; @@ -737,7 +737,7 @@ void createItem (TableItem item, int index) { items [index] = item; } -void createRenderers (int /*long*/ columnHandle, int modelIndex, boolean check, int columnStyle) { +void createRenderers (long /*int*/ columnHandle, int modelIndex, boolean check, int columnStyle) { OS.gtk_tree_view_column_clear (columnHandle); if ((style & SWT.CHECK) != 0 && check) { OS.gtk_tree_view_column_pack_start (columnHandle, checkRenderer, false); @@ -749,9 +749,9 @@ void createRenderers (int /*long*/ columnHandle, int modelIndex, boolean check, OS.g_object_set_qdata (checkRenderer, Display.SWT_OBJECT_INDEX1, columnHandle); } } - int /*long*/ pixbufRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_pixbuf_get_type (), 0) : OS.gtk_cell_renderer_pixbuf_new (); + long /*int*/ pixbufRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_pixbuf_get_type (), 0) : OS.gtk_cell_renderer_pixbuf_new (); if (pixbufRenderer == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ textRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_text_get_type (), 0) : OS.gtk_cell_renderer_text_new (); + long /*int*/ textRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_text_get_type (), 0) : OS.gtk_cell_renderer_text_new (); if (textRenderer == 0) error (SWT.ERROR_NO_HANDLES); if (ownerDraw) { @@ -849,7 +849,7 @@ public void deselect (int index) { checkWidget(); if (index < 0 || index >= itemCount) return; boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_selection_unselect_iter (selection, _getItem (index).handle); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -874,7 +874,7 @@ public void deselect (int index) { public void deselect (int start, int end) { checkWidget(); boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int index=start; index<=end; index++) { if (index < 0 || index >= itemCount) continue; @@ -905,7 +905,7 @@ public void deselect (int [] indices) { checkWidget(); if (indices == null) error (SWT.ERROR_NULL_ARGUMENT); boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int i=0; i<indices.length; i++) { int index = indices[i]; @@ -927,7 +927,7 @@ public void deselect (int [] indices) { public void deselectAll () { checkWidget(); boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_selection_unselect_all (selection); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -941,7 +941,7 @@ void destroyItem (TableColumn column) { index++; } if (index == columnCount) return; - int /*long*/ columnHandle = column.handle; + long /*int*/ columnHandle = column.handle; if (columnCount == 1) { firstCustomDraw = column.customDraw; } @@ -949,19 +949,19 @@ void destroyItem (TableColumn column) { columns [columnCount] = null; OS.gtk_tree_view_remove_column (handle, columnHandle); if (columnCount == 0) { - int /*long*/ oldModel = modelHandle; - int /*long*/[] types = getColumnTypes (1); - int /*long*/ newModel = OS.gtk_list_store_newv (types.length, types); + long /*int*/ oldModel = modelHandle; + long /*int*/[] types = getColumnTypes (1); + long /*int*/ newModel = OS.gtk_list_store_newv (types.length, types); if (newModel == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int [] ptr1 = new int [1]; for (int i=0; i<itemCount; i++) { - int /*long*/ newItem = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ newItem = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (newItem == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_list_store_append (newModel, newItem); TableItem item = items [i]; if (item != null) { - int /*long*/ oldItem = item.handle; + long /*int*/ oldItem = item.handle; /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */ for (int j=0; j<FOREGROUND_COLUMN; j++) { OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1); @@ -1007,13 +1007,13 @@ void destroyItem (TableColumn column) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null) { - int /*long*/ iter = item.handle; + long /*int*/ iter = item.handle; int modelIndex = column.modelIndex; - OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, (int /*long*/)0, -1); - OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_TEXT, (int /*long*/)0, -1); - OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (int /*long*/)0, -1); - OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (int /*long*/)0, -1); - OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FONT, (int /*long*/)0, -1); + OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, (long /*int*/)0, -1); + OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_TEXT, (long /*int*/)0, -1); + OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (long /*int*/)0, -1); + OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (long /*int*/)0, -1); + OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FONT, (long /*int*/)0, -1); Font [] cellFont = item.cellFont; if (cellFont != null) { @@ -1063,7 +1063,7 @@ void destroyItem (TableItem item) { index++; } if (index == itemCount) return; - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_list_store_remove (modelHandle, item.handle); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -1075,10 +1075,10 @@ void destroyItem (TableItem item) { boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean [] consume) { boolean selected = false; if (filter) { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; if (OS.gtk_tree_view_get_path_at_pos (handle, x, y, path, null, null, null)) { if (path [0] != 0) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); if (OS.gtk_tree_selection_path_is_selected (selection, path [0])) selected = true; OS.gtk_tree_path_free (path [0]); } @@ -1091,7 +1091,7 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean return dragDetect; } -int /*long*/ eventWindow () { +long /*int*/ eventWindow () { return paintWindow (); } @@ -1129,13 +1129,13 @@ public Rectangle getClientArea () { checkWidget (); forceResize (); OS.gtk_widget_realize (handle); - int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle); - int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle); + long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle); + long /*int*/ binWindow = OS.gtk_tree_view_get_bin_window (handle); int [] binX = new int [1], binY = new int [1]; OS.gdk_window_get_origin (binWindow, binX, binY); int [] fixedX = new int [1], fixedY = new int [1]; OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY); - int /*long*/ clientHandle = clientHandle (); + long /*int*/ clientHandle = clientHandle (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (clientHandle, allocation); int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; @@ -1202,8 +1202,8 @@ public int getColumnCount () { return columnCount; } -int /*long*/[] getColumnTypes (int columnCount) { - int /*long*/[] types = new int /*long*/ [FIRST_COLUMN + (columnCount * CELL_TYPES)]; +long /*int*/[] getColumnTypes (int columnCount) { + long /*int*/[] types = new long /*int*/ [FIRST_COLUMN + (columnCount * CELL_TYPES)]; // per row data types [CHECKED_COLUMN] = OS.G_TYPE_BOOLEAN (); types [GRAYED_COLUMN] = OS.G_TYPE_BOOLEAN (); @@ -1252,13 +1252,13 @@ int /*long*/[] getColumnTypes (int columnCount) { public int [] getColumnOrder () { checkWidget (); if (columnCount == 0) return new int [0]; - int /*long*/ list = OS.gtk_tree_view_get_columns (handle); + long /*int*/ list = OS.gtk_tree_view_get_columns (handle); if (list == 0) return new int [0]; int i = 0, count = OS.g_list_length (list); int [] order = new int [count]; - int /*long*/ temp = list; + long /*int*/ temp = list; while (temp != 0) { - int /*long*/ column = OS.g_list_data (temp); + long /*int*/ column = OS.g_list_data (temp); if (column != 0) { for (int j=0; j<columnCount; j++) { if (columns [j].handle == column) { @@ -1308,11 +1308,11 @@ public TableColumn [] getColumns () { } TableItem getFocusItem () { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_tree_view_get_cursor (handle, path, null); if (path [0] == 0) return null; TableItem item = null; - int /*long*/ indices = OS.gtk_tree_path_get_indices (path [0]); + long /*int*/ indices = OS.gtk_tree_path_get_indices (path [0]); if (indices != 0) { int [] index = new int []{-1}; OS.memmove (index, indices, 4); @@ -1360,7 +1360,7 @@ public int getHeaderHeight () { GtkRequisition requisition = new GtkRequisition (); int height = 0; for (int i=0; i<columnCount; i++) { - int /*long*/ buttonHandle = columns [i].buttonHandle; + long /*int*/ buttonHandle = columns [i].buttonHandle; if (buttonHandle != 0) { OS.gtk_widget_size_request (buttonHandle, requisition); height = Math.max (height, requisition.height); @@ -1369,8 +1369,8 @@ public int getHeaderHeight () { return height; } OS.gtk_widget_realize (handle); - int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle); - int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle); + long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle); + long /*int*/ binWindow = OS.gtk_tree_view_get_bin_window (handle); int [] binY = new int [1]; OS.gdk_window_get_origin (binWindow, null, binY); int [] fixedY = new int [1]; @@ -1447,11 +1447,11 @@ public TableItem getItem (int index) { public TableItem getItem (Point point) { checkWidget(); if (point == null) error (SWT.ERROR_NULL_ARGUMENT); - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_widget_realize (handle); if (!OS.gtk_tree_view_get_path_at_pos (handle, point.x, point.y, path, null, null, null)) return null; if (path [0] == 0) return null; - int /*long*/ indices = OS.gtk_tree_path_get_indices (path [0]); + long /*int*/ indices = OS.gtk_tree_path_get_indices (path [0]); TableItem item = null; if (indices != 0) { int [] index = new int [1]; @@ -1491,7 +1491,7 @@ public int getItemCount () { public int getItemHeight () { checkWidget(); if (itemCount == 0) { - int /*long*/ column = OS.gtk_tree_view_get_column (handle, 0); + long /*int*/ column = OS.gtk_tree_view_get_column (handle, 0); int [] w = new int [1], h = new int [1]; ignoreSize = true; OS.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h); @@ -1499,11 +1499,11 @@ public int getItemHeight () { return h [0]; } else { int height = 0; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_get_iter_first (modelHandle, iter); int columnCount = Math.max (1, this.columnCount); for (int i=0; i<columnCount; i++) { - int /*long*/ column = OS.gtk_tree_view_get_column (handle, i); + long /*int*/ column = OS.gtk_tree_view_get_column (handle, i); OS.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false); int [] w = new int [1], h = new int [1]; OS.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h); @@ -1566,8 +1566,8 @@ public boolean getLinesVisible() { return OS.gtk_tree_view_get_rules_hint (handle); } -int /*long*/ getPixbufRenderer (int /*long*/ column) { - int /*long*/ list = 0; +long /*int*/ getPixbufRenderer (long /*int*/ column) { + long /*int*/ list = 0; if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) { list = OS.gtk_cell_layout_get_cells(column); } else { @@ -1576,10 +1576,10 @@ int /*long*/ getPixbufRenderer (int /*long*/ column) { if (list == 0) return 0; int count = OS.g_list_length (list); - int /*long*/ pixbufRenderer = 0; + long /*int*/ pixbufRenderer = 0; int i = 0; while (i < count) { - int /*long*/ renderer = OS.g_list_nth_data (list, i); + long /*int*/ renderer = OS.g_list_nth_data (list, i); if (OS.GTK_IS_CELL_RENDERER_PIXBUF (renderer)) { pixbufRenderer = renderer; break; @@ -1608,15 +1608,15 @@ int /*long*/ getPixbufRenderer (int /*long*/ column) { */ public TableItem [] getSelection () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); - int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); if (list != 0) { int count = OS.g_list_length (list); int [] treeSelection = new int [count]; int length = 0; for (int i=0; i<count; i++) { - int /*long*/ data = OS.g_list_nth_data (list, i); - int /*long*/ indices = OS.gtk_tree_path_get_indices (data); + long /*int*/ data = OS.g_list_nth_data (list, i); + long /*int*/ indices = OS.gtk_tree_path_get_indices (data); if (indices != 0) { int [] index = new int [1]; OS.memmove (index, indices, 4); @@ -1645,7 +1645,7 @@ public TableItem [] getSelection () { */ public int getSelectionCount () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); return OS.gtk_tree_selection_count_selected_rows (selection); } @@ -1662,14 +1662,14 @@ public int getSelectionCount () { */ public int getSelectionIndex () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); - int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); if (list != 0) { int count = OS.g_list_length (list); int [] index = new int [1]; for (int i=0; i<count; i++) { - int /*long*/ data = OS.g_list_nth_data (list, i); - int /*long*/ indices = OS.gtk_tree_path_get_indices (data); + long /*int*/ data = OS.g_list_nth_data (list, i); + long /*int*/ indices = OS.gtk_tree_path_get_indices (data); if (indices != 0) { OS.memmove (index, indices, 4); for (int j = i; j < count; j++) { @@ -1704,15 +1704,15 @@ public int getSelectionIndex () { */ public int [] getSelectionIndices () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); - int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); if (list != 0) { int count = OS.g_list_length (list); int [] treeSelection = new int [count]; int length = 0; for (int i=0; i<count; i++) { - int /*long*/ data = OS.g_list_nth_data (list, i); - int /*long*/ indices = OS.gtk_tree_path_get_indices (data); + long /*int*/ data = OS.g_list_nth_data (list, i); + long /*int*/ indices = OS.gtk_tree_path_get_indices (data); if (indices != 0) { int [] index = new int [1]; OS.memmove (index, indices, 4); @@ -1771,8 +1771,8 @@ public int getSortDirection () { return sortDirection; } -int /*long*/ getTextRenderer (int /*long*/ column) { - int /*long*/ list = 0; +long /*int*/ getTextRenderer (long /*int*/ column) { + long /*int*/ list = 0; if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) { list = OS.gtk_cell_layout_get_cells(column); } else { @@ -1780,10 +1780,10 @@ int /*long*/ getTextRenderer (int /*long*/ column) { } if (list == 0) return 0; int count = OS.g_list_length (list); - int /*long*/ textRenderer = 0; + long /*int*/ textRenderer = 0; int i = 0; while (i < count) { - int /*long*/ renderer = OS.g_list_nth_data (list, i); + long /*int*/ renderer = OS.g_list_nth_data (list, i); if (OS.GTK_IS_CELL_RENDERER_TEXT (renderer)) { textRenderer = renderer; break; @@ -1808,22 +1808,22 @@ int /*long*/ getTextRenderer (int /*long*/ column) { */ public int getTopIndex () { checkWidget(); - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_widget_realize (handle); if (!OS.gtk_tree_view_get_path_at_pos (handle, 1, 1, path, null, null, null)) return 0; if (path [0] == 0) return 0; - int /*long*/ indices = OS.gtk_tree_path_get_indices (path[0]); + long /*int*/ indices = OS.gtk_tree_path_get_indices (path[0]); int[] index = new int [1]; if (indices != 0) OS.memmove (index, indices, 4); OS.gtk_tree_path_free (path [0]); return index [0]; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); if (gdkEvent.window != OS.gtk_tree_view_get_bin_window (handle)) return 0; - int /*long*/ result = super.gtk_button_press_event (widget, event); + long /*int*/ result = super.gtk_button_press_event (widget, event); if (result != 0) return result; /* * Feature in GTK. In a multi-select table view, when multiple items are already @@ -1835,10 +1835,10 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { */ int button = gdkEvent.button; if (button == 3 && gdkEvent.type == OS.GDK_BUTTON_PRESS) { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; if (OS.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null)) { if (path [0] != 0) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); if (OS.gtk_tree_selection_path_is_selected (selection, path [0])) result = 1; OS.gtk_tree_path_free (path [0]); } @@ -1853,10 +1853,10 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { * widget from automatically selecting the first item. */ if ((style & SWT.SINGLE) != 0 && getSelectionCount () == 0) { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; if (OS.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null)) { if (path [0] != 0) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_view_set_cursor (handle, path [0], 0, false); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -1876,13 +1876,13 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ window = OS.GDK_EVENT_WINDOW (event); +long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ window = OS.GDK_EVENT_WINDOW (event); if (window != OS.gtk_tree_view_get_bin_window (handle)) return 0; return super.gtk_button_release_event (widget, event); } -int /*long*/ gtk_changed (int /*long*/ widget) { +long /*int*/ gtk_changed (long /*int*/ widget) { TableItem item = getFocusItem (); if (item != null) { Event event = new Event (); @@ -1892,7 +1892,7 @@ int /*long*/ gtk_changed (int /*long*/ widget) { return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { switch (OS.GDK_EVENT_TYPE (gdkEvent)) { case OS.GDK_EXPOSE: { /* @@ -1911,22 +1911,22 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { return super.gtk_event_after (widget, gdkEvent); } -int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { +long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { if ((state & OBSCURED) != 0) return 0; if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) { Control control = findBackgroundControl (); if (control != null) { GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove (gdkEvent, eventPtr, GdkEventExpose.sizeof); - int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle); + long /*int*/ window = OS.gtk_tree_view_get_bin_window (handle); if (window == gdkEvent.window) { int [] width = new int [1], height = new int [1]; gdk_window_get_size (window, width, height); int bottom = 0; if (itemCount != 0) { - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, itemCount - 1); - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (handle, path, 0, rect); bottom = rect.y + rect.height; @@ -1942,8 +1942,8 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { return super.gtk_expose_event (widget, eventPtr); } -int /*long*/ gtk_popup_menu (int /*long*/ widget) { - int /*long*/ result = super.gtk_popup_menu (widget); +long /*int*/ gtk_popup_menu (long /*int*/ widget) { + long /*int*/ result = super.gtk_popup_menu (widget); /* * Bug in GTK. The context menu for the typeahead in GtkTreeViewer * opens in the bottom right corner of the screen when Shift+F10 @@ -1956,15 +1956,15 @@ int /*long*/ gtk_popup_menu (int /*long*/ widget) { return OS.GTK_VERSION < OS.VERSION (2, 6, 5) ? 1 : result; } -int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ window = OS.GDK_EVENT_WINDOW (event); +long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ window = OS.GDK_EVENT_WINDOW (event); if (window != OS.gtk_tree_view_get_bin_window (handle)) return 0; return super.gtk_motion_notify_event (widget, event); } -int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long*/ column) { +long /*int*/ gtk_row_activated (long /*int*/ tree, long /*int*/ path, long /*int*/ column) { TableItem item = null; - int /*long*/ indices = OS.gtk_tree_path_get_indices (path); + long /*int*/ indices = OS.gtk_tree_path_get_indices (path); if (indices != 0) { int [] index = new int []{-1}; OS.memmove (index, indices, 4); @@ -1976,30 +1976,30 @@ int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long return 0; } -int /*long*/ gtk_row_deleted (int /*long*/ model, int /*long*/ path) { +long /*int*/ gtk_row_deleted (long /*int*/ model, long /*int*/ path) { if (ignoreAccessibility) { OS.g_signal_stop_emission_by_name (model, OS.row_deleted); } return 0; } -int /*long*/ gtk_row_inserted (int /*long*/ model, int /*long*/ path, int /*long*/ iter) { +long /*int*/ gtk_row_inserted (long /*int*/ model, long /*int*/ path, long /*int*/ iter) { if (ignoreAccessibility) { OS.g_signal_stop_emission_by_name (model, OS.row_inserted); } return 0; } -int /*long*/ gtk_start_interactive_search(int /*long*/ widget) { +long /*int*/ gtk_start_interactive_search(long /*int*/ widget) { if (!searchEnabled()) { OS.g_signal_stop_emission_by_name(widget, OS.start_interactive_search); return 1; } return 0; } -int /*long*/ gtk_toggled (int /*long*/ renderer, int /*long*/ pathStr) { - int /*long*/ path = OS.gtk_tree_path_new_from_string (pathStr); +long /*int*/ gtk_toggled (long /*int*/ renderer, long /*int*/ pathStr) { + long /*int*/ path = OS.gtk_tree_path_new_from_string (pathStr); if (path == 0) return 0; - int /*long*/ indices = OS.gtk_tree_path_get_indices (path); + long /*int*/ indices = OS.gtk_tree_path_get_indices (path); if (indices != 0) { int [] index = new int [1]; OS.memmove (index, indices, 4); @@ -2014,7 +2014,7 @@ int /*long*/ gtk_toggled (int /*long*/ renderer, int /*long*/ pathStr) { return 0; } -void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) { +void gtk_widget_size_request (long /*int*/ widget, GtkRequisition requisition) { /* * Bug in GTK. For some reason, gtk_widget_size_request() fails * to include the height of the tree view items when there are @@ -2025,17 +2025,17 @@ void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) { super.gtk_widget_size_request (widget, requisition); return; } - int /*long*/ columns = OS.gtk_tree_view_get_columns (handle), list = columns; + long /*int*/ columns = OS.gtk_tree_view_get_columns (handle), list = columns; boolean fixVisible = columns != 0; while (list != 0) { - int /*long*/ column = OS.g_list_data (list); + long /*int*/ column = OS.g_list_data (list); if (OS.gtk_tree_view_column_get_visible (column)) { fixVisible = false; break; } list = OS.g_list_next (list); } - int /*long*/ columnHandle = 0; + long /*int*/ columnHandle = 0; if (fixVisible) { columnHandle = OS.g_list_data (columns); OS.gtk_tree_view_column_set_visible (columnHandle, true); @@ -2048,13 +2048,13 @@ void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) { } void hideFirstColumn () { - int /*long*/ firstColumn = OS.gtk_tree_view_get_column (handle, 0); + long /*int*/ firstColumn = OS.gtk_tree_view_get_column (handle, 0); OS.gtk_tree_view_column_set_visible (firstColumn, false); } void hookEvents () { super.hookEvents (); - int /*long*/ selection = OS.gtk_tree_view_get_selection(handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection(handle); OS.g_signal_connect_closure (selection, OS.changed, display.closures [CHANGED], false); OS.g_signal_connect_closure (handle, OS.row_activated, display.closures [ROW_ACTIVATED], false); if (checkRenderer != 0) { @@ -2145,9 +2145,9 @@ public int indexOf (TableItem item) { */ public boolean isSelected (int index) { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); byte [] buffer = Converter.wcsToMbcs (null, Integer.toString (index), true); - int /*long*/ path = OS.gtk_tree_path_new_from_string (buffer); + long /*int*/ path = OS.gtk_tree_path_new_from_string (buffer); boolean answer = OS.gtk_tree_selection_path_is_selected (selection, path); OS.gtk_tree_path_free (path); return answer; @@ -2155,7 +2155,7 @@ public boolean isSelected (int index) { boolean mnemonicHit (char key) { for (int i=0; i<columnCount; i++) { - int /*long*/ labelHandle = columns [i].labelHandle; + long /*int*/ labelHandle = columns [i].labelHandle; if (labelHandle != 0 && mnemonicHit (labelHandle, key)) return true; } return false; @@ -2163,13 +2163,13 @@ boolean mnemonicHit (char key) { boolean mnemonicMatch (char key) { for (int i=0; i<columnCount; i++) { - int /*long*/ labelHandle = columns [i].labelHandle; + long /*int*/ labelHandle = columns [i].labelHandle; if (labelHandle != 0 && mnemonicMatch (labelHandle, key)) return true; } return false; } -int /*long*/ paintWindow () { +long /*int*/ paintWindow () { OS.gtk_widget_realize (handle); return OS.gtk_tree_view_get_bin_window (handle); } @@ -2259,7 +2259,7 @@ void releaseWidget () { public void remove (int index) { checkWidget(); if (!(0 <= index && index < itemCount)) error (SWT.ERROR_ITEM_NOT_REMOVED); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); TableItem item = items [index]; boolean disposed = false; if (item != null) { @@ -2272,7 +2272,7 @@ public void remove (int index) { OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); } if (!disposed) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_list_store_remove (modelHandle, iter); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -2304,8 +2304,8 @@ public void remove (int start, int end) { if (!(0 <= start && start <= end && end < itemCount)) { error (SWT.ERROR_INVALID_RANGE); } - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (iter == 0) error (SWT.ERROR_NO_HANDLES); if (fixAccessibility ()) { ignoreAccessibility = true; @@ -2357,9 +2357,9 @@ public void remove (int [] indices) { if (!(0 <= start && start <= end && end < itemCount)) { error (SWT.ERROR_INVALID_RANGE); } - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); int last = -1; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (iter == 0) error (SWT.ERROR_NO_HANDLES); if (fixAccessibility ()) { ignoreAccessibility = true; @@ -2413,7 +2413,7 @@ public void removeAll () { } items = new TableItem [4]; itemCount = 0; - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); if (fixAccessibility ()) { ignoreAccessibility = true; @@ -2474,29 +2474,29 @@ public void removeSelectionListener(SelectionListener listener) { eventTable.unhook (SWT.DefaultSelection,listener); } -int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /*long*/ cell_area, int /*long*/ x_offset, int /*long*/ y_offset, int /*long*/ width, int /*long*/ height) { - int /*long*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell)); +long /*int*/ rendererGetSizeProc (long /*int*/ cell, long /*int*/ widget, long /*int*/ cell_area, long /*int*/ x_offset, long /*int*/ y_offset, long /*int*/ width, long /*int*/ height) { + long /*int*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell)); GtkCellRendererClass klass = new GtkCellRendererClass (); OS.memmove (klass, g_class); OS.call_get_size (klass.get_size, cell, handle, cell_area, x_offset, y_offset, width, height); if (!ignoreSize && OS.GTK_IS_CELL_RENDERER_TEXT (cell)) { - int /*long*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2); + long /*int*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2); TableItem item = null; boolean isSelected = false; if (iter != 0) { - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); int [] buffer = new int [1]; OS.memmove (buffer, OS.gtk_tree_path_get_indices (path), 4); int index = buffer [0]; item = _getItem (index); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); isSelected = OS.gtk_tree_selection_path_is_selected (selection, path); OS.gtk_tree_path_free (path); } if (item != null) { int columnIndex = 0; if (columnCount > 0) { - int /*long*/ columnHandle = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX1); + long /*int*/ columnHandle = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX1); for (int i = 0; i < columnCount; i++) { if (columns [i].handle == columnHandle) { columnIndex = i; @@ -2536,18 +2536,18 @@ int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /* return 0; } -int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*long*/ widget, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ expose_area, int /*long*/ flags) { +long /*int*/ rendererRenderProc (long /*int*/ cell, long /*int*/ window, long /*int*/ widget, long /*int*/ background_area, long /*int*/ cell_area, long /*int*/ expose_area, long /*int*/ flags) { TableItem item = null; - int /*long*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2); + long /*int*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2); if (iter != 0) { - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); int [] buffer = new int [1]; OS.memmove (buffer, OS.gtk_tree_path_get_indices (path), 4); int index = buffer [0]; item = _getItem (index); OS.gtk_tree_path_free (path); } - int /*long*/ columnHandle = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX1); + long /*int*/ columnHandle = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX1); int columnIndex = 0; if (columnCount > 0) { for (int i = 0; i < columnCount; i++) { @@ -2561,7 +2561,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l if (OS.GTK_IS_CELL_RENDERER_TOGGLE (cell) || (OS.GTK_IS_CELL_RENDERER_PIXBUF (cell) && (columnIndex != 0 || (style & SWT.CHECK) == 0))) { drawFlags = (int)/*64*/flags; drawState = SWT.FOREGROUND; - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; OS.gtk_tree_model_get (modelHandle, item.handle, Table.BACKGROUND_COLUMN, ptr, -1); if (ptr [0] == 0) { int modelIndex = columnCount == 0 ? Table.FIRST_COLUMN : columns [columnIndex].modelIndex; @@ -2575,7 +2575,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l if ((flags & OS.GTK_CELL_RENDERER_FOCUSED) != 0) drawState |= SWT.FOCUSED; GdkRectangle rect = new GdkRectangle (); - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_get_background_area (handle, path, columnHandle, rect); OS.gtk_tree_path_free (path); @@ -2589,7 +2589,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l } //send out measure before erase - int /*long*/ textRenderer = getTextRenderer (columnHandle); + long /*int*/ textRenderer = getTextRenderer (columnHandle); if (textRenderer != 0) OS.gtk_cell_renderer_get_size (textRenderer, handle, null, null, null, null, null); @@ -2627,7 +2627,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l if ((drawState & SWT.SELECTED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_SELECTED; if ((drawState & SWT.FOCUSED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_FOCUSED; if ((drawState & SWT.SELECTED) != 0) { - int /*long*/ style = OS.gtk_widget_get_style (widget); + long /*int*/ style = OS.gtk_widget_get_style (widget); //TODO - parity and sorted byte[] detail = Converter.wcsToMbcs (null, "cell_odd", true); OS.gtk_paint_flat_box (style, window, OS.GTK_STATE_SELECTED, OS.GTK_SHADOW_NONE, rect, widget, detail, rect.x, rect.y, rect.width, rect.height); @@ -2638,7 +2638,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l } } } - int /*long*/ result = 0; + long /*int*/ result = 0; if ((drawState & SWT.BACKGROUND) != 0 && (drawState & SWT.SELECTED) == 0) { GC gc = new GC (this); gc.setBackground (item.getBackground (columnIndex)); @@ -2648,7 +2648,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l gc.dispose (); } if ((drawState & SWT.FOREGROUND) != 0 || OS.GTK_IS_CELL_RENDERER_TOGGLE (cell)) { - int /*long*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell)); + long /*int*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell)); GtkCellRendererClass klass = new GtkCellRendererClass (); OS.memmove (klass, g_class); if (drawForeground != null && OS.GTK_IS_CELL_RENDERER_TEXT (cell)) { @@ -2660,7 +2660,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l if (OS.GTK_IS_CELL_RENDERER_TEXT (cell)) { if (hooks (SWT.PaintItem)) { GdkRectangle rect = new GdkRectangle (); - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_get_background_area (handle, path, columnHandle, rect); OS.gtk_tree_path_free (path); ignoreSize = true; @@ -2711,8 +2711,8 @@ void resetCustomDraw () { for (int i=0; i<end; i++) { boolean customDraw = columnCount != 0 ? columns [i].customDraw : firstCustomDraw; if (customDraw) { - int /*long*/ column = OS.gtk_tree_view_get_column (handle, i); - int /*long*/ textRenderer = getTextRenderer (column); + long /*int*/ column = OS.gtk_tree_view_get_column (handle, i); + long /*int*/ textRenderer = getTextRenderer (column); OS.gtk_tree_view_column_set_cell_data_func (column, textRenderer, 0, 0, 0); if (columnCount != 0) columns [i].customDraw = false; } @@ -2765,12 +2765,12 @@ public void select (int index) { checkWidget(); if (!(0 <= index && index < itemCount)) return; boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); TableItem item = _getItem (index); OS.gtk_tree_selection_select_iter (selection, item.handle); if ((style & SWT.SINGLE) != 0) { - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); OS.gtk_tree_view_set_cursor (handle, path, 0, false); OS.gtk_tree_path_free (path); } @@ -2808,13 +2808,13 @@ public void select (int start, int end) { start = Math.max (0, start); end = Math.min (end, itemCount - 1); boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int index=start; index<=end; index++) { TableItem item = _getItem (index); OS.gtk_tree_selection_select_iter (selection, item.handle); if ((style & SWT.SINGLE) != 0) { - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); OS.gtk_tree_view_set_cursor (handle, path, 0, false); OS.gtk_tree_path_free (path); } @@ -2852,7 +2852,7 @@ public void select (int [] indices) { int length = indices.length; if (length == 0 || ((style & SWT.SINGLE) != 0 && length > 1)) return; boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int i=0; i<length; i++) { int index = indices [i]; @@ -2860,7 +2860,7 @@ public void select (int [] indices) { TableItem item = _getItem (index); OS.gtk_tree_selection_select_iter (selection, item.handle); if ((style & SWT.SINGLE) != 0) { - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); OS.gtk_tree_view_set_cursor (handle, path, 0, false); OS.gtk_tree_path_free (path); } @@ -2884,7 +2884,7 @@ public void selectAll () { checkWidget(); if ((style & SWT.SINGLE) != 0) return; boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_selection_select_all (selection); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -2899,8 +2899,8 @@ void selectFocusIndex (int index) { */ if (!(0 <= index && index < itemCount)) return; TableItem item = _getItem (index); - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_view_set_cursor (handle, path, 0, false); /* @@ -2987,13 +2987,13 @@ public void setColumnOrder (int [] order) { seen [index] = true; } for (int i=0; i<order.length; i++) { - int /*long*/ column = columns [order [i]].handle; - int /*long*/ baseColumn = i == 0 ? 0 : columns [order [i-1]].handle; + long /*int*/ column = columns [order [i]].handle; + long /*int*/ baseColumn = i == 0 ? 0 : columns [order [i-1]].handle; OS.gtk_tree_view_move_column_after (handle, column, baseColumn); } } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); TableColumn[] columns = getColumns (); for (int i = 0; i < columns.length; i++) { @@ -3048,7 +3048,7 @@ public void setItemCount (int count) { System.arraycopy (items, 0, newItems, 0, itemCount); items = newItems; if (isVirtual) { - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (iter == 0) error (SWT.ERROR_NO_HANDLES); if (fixAccessibility ()) { ignoreAccessibility = true; @@ -3095,7 +3095,7 @@ public void setLinesVisible (boolean show) { } } -void setModel (int /*long*/ newModel) { +void setModel (long /*int*/ newModel) { display.removeWidget (modelHandle); OS.g_object_unref (modelHandle); modelHandle = newModel; @@ -3121,8 +3121,8 @@ void setParentBackground () { recreateRenderers (); } -void setParentWindow (int /*long*/ widget) { - int /*long*/ window = eventWindow (); +void setParentWindow (long /*int*/ widget) { + long /*int*/ window = eventWindow (); OS.gtk_widget_set_parent_window (widget, window); } @@ -3140,7 +3140,7 @@ public void setRedraw (boolean redraw) { } } -void setScrollWidth (int /*long*/ column, TableItem item) { +void setScrollWidth (long /*int*/ column, TableItem item) { if (columnCount != 0 || currentItem == item) return; int width = OS.gtk_tree_view_column_get_fixed_width (column); int itemWidth = calculateWidth (column, item.handle); @@ -3397,7 +3397,7 @@ public void setSelection (TableItem [] items) { public void setTopIndex (int index) { checkWidget(); if (!(0 <= index && index < itemCount)) return; - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, _getItem (index).handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, _getItem (index).handle); OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0f, 0f); if (OS.GTK_VERSION < OS.VERSION (2, 8, 0)) { /* @@ -3471,10 +3471,10 @@ boolean showFirstColumn () { */ int columnCount = Math.max (1, this.columnCount); for (int i=0; i<columnCount; i++) { - int /*long*/ column = OS.gtk_tree_view_get_column (handle, i); + long /*int*/ column = OS.gtk_tree_view_get_column (handle, i); if (OS.gtk_tree_view_column_get_visible (column)) return false; } - int /*long*/ firstColumn = OS.gtk_tree_view_get_column (handle, 0); + long /*int*/ firstColumn = OS.gtk_tree_view_get_column (handle, 0); OS.gtk_tree_view_column_set_visible (firstColumn, true); return true; } @@ -3505,8 +3505,8 @@ public void showItem (TableItem item) { showItem (item.handle); } -void showItem (int /*long*/ iter) { - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); +void showItem (long /*int*/ iter) { + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); /* * This code intentionally commented. * Bug in GTK. According to the documentation, gtk_tree_view_scroll_to_cell @@ -3572,19 +3572,19 @@ void updateScrollBarValue (ScrollBar bar) { * The fix is to queue a resize event for each child to * force the position to be corrected. */ - int /*long*/ parentHandle = parentingHandle (); - int /*long*/ list = OS.gtk_container_get_children (parentHandle); + long /*int*/ parentHandle = parentingHandle (); + long /*int*/ list = OS.gtk_container_get_children (parentHandle); if (list == 0) return; - int /*long*/ temp = list; + long /*int*/ temp = list; while (temp != 0) { - int /*long*/ widget = OS.g_list_data (temp); + long /*int*/ widget = OS.g_list_data (temp); if (widget != 0) OS.gtk_widget_queue_resize (widget); temp = OS.g_list_next (temp); } OS.g_list_free (list); } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { switch ((int)/*64*/user_data) { case EXPOSE_EVENT_INVERSE: { /* @@ -3598,7 +3598,7 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ us if (control != null) { GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof); - int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle); + long /*int*/ window = OS.gtk_tree_view_get_bin_window (handle); if (window == gdkEvent.window) { drawBackground (control, window, gdkEvent.region, gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java index 8f2bca2160..1062f41804 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java @@ -36,7 +36,7 @@ import org.eclipse.swt.events.*; * @noextend This class is not intended to be subclassed by clients. */ public class TableColumn extends Item { - int /*long*/ labelHandle, imageHandle, buttonHandle; + long /*int*/ labelHandle, imageHandle, buttonHandle; Table parent; int modelIndex, lastButton, lastTime, lastX, lastWidth; boolean customDraw, useFixedWidth; @@ -324,7 +324,7 @@ public int getWidth () { return OS.gtk_tree_view_column_get_width (handle); } -int /*long*/ gtk_clicked (int /*long*/ widget) { +long /*int*/ gtk_clicked (long /*int*/ widget) { /* * There is no API to get a double click on a table column. Normally, when * the mouse is double clicked, this is indicated by GDK_2BUTTON_PRESS @@ -334,7 +334,7 @@ int /*long*/ gtk_clicked (int /*long*/ widget) { */ boolean doubleClick = false; boolean postEvent = true; - int /*long*/ eventPtr = OS.gtk_get_current_event (); + long /*int*/ eventPtr = OS.gtk_get_current_event (); if (eventPtr != 0) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); @@ -366,7 +366,7 @@ int /*long*/ gtk_clicked (int /*long*/ widget) { return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { @@ -382,11 +382,11 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { return 0; } -int /*long*/ gtk_mnemonic_activate (int /*long*/ widget, int /*long*/ arg1) { +long /*int*/ gtk_mnemonic_activate (long /*int*/ widget, long /*int*/ arg1) { return parent.gtk_mnemonic_activate (widget, arg1); } -int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { +long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { useFixedWidth = false; GtkAllocation widgetAllocation = new GtkAllocation (); gtk_widget_get_allocation (widget, widgetAllocation); @@ -440,7 +440,7 @@ public void pack () { } } } else { - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (OS.gtk_tree_model_get_iter_first (parent.modelHandle, iter)) { do { width = Math.max (width, parent.calculateWidth (handle, iter)); @@ -547,7 +547,7 @@ public void setAlignment (int alignment) { parent.createRenderers (handle, modelIndex, index == 0, style); } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { OS.gtk_widget_modify_font (labelHandle, font); OS.gtk_widget_modify_font (imageHandle, font); } @@ -562,7 +562,7 @@ public void setImage (Image image) { } int imageIndex = headerImageList.indexOf (image); if (imageIndex == -1) imageIndex = headerImageList.add (image); - int /*long*/ pixbuf = headerImageList.getPixbuf (imageIndex); + long /*int*/ pixbuf = headerImageList.getPixbuf (imageIndex); OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf); OS.gtk_widget_show (imageHandle); } else { @@ -708,14 +708,14 @@ public void setWidth (int width) { */ if (width != 0) { if (buttonHandle != 0) { - int /*long*/ window = OS.gtk_widget_get_parent_window (buttonHandle); + long /*int*/ window = OS.gtk_widget_get_parent_window (buttonHandle); if (window != 0) { - int /*long*/ windowList = OS.gdk_window_get_children (window); + long /*int*/ windowList = OS.gdk_window_get_children (window); if (windowList != 0) { - int /*long*/ windows = windowList; - int /*long*/ [] userData = new int /*long*/ [1]; + long /*int*/ windows = windowList; + long /*int*/ [] userData = new long /*int*/ [1]; while (windows != 0) { - int /*long*/ child = OS.g_list_data (windows); + long /*int*/ child = OS.g_list_data (windows); OS.gdk_window_get_user_data (child, userData); if (userData[0] == buttonHandle) { OS.gdk_window_lower (child); 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 7eb81b0adf..618367bb66 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 @@ -127,7 +127,7 @@ static Table checkNull (Table control) { } Color _getBackground () { - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; OS.gtk_tree_model_get (parent.modelHandle, handle, Table.BACKGROUND_COLUMN, ptr, -1); if (ptr [0] == 0) return parent.getBackground (); GdkColor gdkColor = new GdkColor (); @@ -139,7 +139,7 @@ Color _getBackground () { Color _getBackground (int index) { int count = Math.max (1, parent.columnCount); if (0 > index || index > count - 1) return _getBackground (); - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex; OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_BACKGROUND, ptr, -1); if (ptr [0] == 0) return _getBackground (); @@ -156,7 +156,7 @@ boolean _getChecked () { } Color _getForeground () { - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; OS.gtk_tree_model_get (parent.modelHandle, handle, Table.FOREGROUND_COLUMN, ptr, -1); if (ptr [0] == 0) return parent.getForeground (); GdkColor gdkColor = new GdkColor (); @@ -168,7 +168,7 @@ Color _getForeground () { Color _getForeground (int index) { int count = Math.max (1, parent.columnCount); if (0 > index || index > count - 1) return _getForeground (); - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex; OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_FOREGROUND, ptr, -1); if (ptr [0] == 0) return _getForeground (); @@ -181,7 +181,7 @@ Color _getForeground (int index) { Image _getImage (int index) { int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count - 1) return null; - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex; OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_PIXBUF, ptr, -1); if (ptr [0] == 0) return null; @@ -195,7 +195,7 @@ Image _getImage (int index) { String _getText (int index) { int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count - 1) return ""; - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex; OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_TEXT, ptr, -1); if (ptr [0] == 0) return ""; @@ -219,7 +219,7 @@ void clear () { OS.gtk_list_store_set (parent.modelHandle, handle, i, 0, -1); } for (int i=Table.FOREGROUND_COLUMN; i<columnCount; i++) { - OS.gtk_list_store_set (parent.modelHandle, handle, i, (int /*long*/)0, -1); + OS.gtk_list_store_set (parent.modelHandle, handle, i, (long /*int*/)0, -1); } /* * Bug in GTK. When using fixed-height-mode, @@ -278,14 +278,14 @@ public Rectangle getBounds () { // shifted a bit too far right on later versions of GTK - however, old Tree also had this problem checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = OS.gtk_tree_view_get_column (parentHandle, 0); + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = OS.gtk_tree_view_get_column (parentHandle, 0); if (column == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ textRenderer = parent.getTextRenderer (column); - int /*long*/ pixbufRenderer = parent.getPixbufRenderer (column); + long /*int*/ textRenderer = parent.getTextRenderer (column); + long /*int*/ pixbufRenderer = parent.getPixbufRenderer (column); if (textRenderer == 0 || pixbufRenderer == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); boolean isExpander = OS.gtk_tree_model_iter_n_children (parent.modelHandle, handle) > 0; @@ -358,15 +358,15 @@ public Color getBackground (int index) { public Rectangle getBounds (int index) { checkWidget(); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (index >= 0 && index < parent.columnCount) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); @@ -541,18 +541,18 @@ public Image getImage (int index) { public Rectangle getImageBounds (int index) { checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (index >= 0 && index < parent.columnCount) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ pixbufRenderer = parent.getPixbufRenderer (column); + long /*int*/ pixbufRenderer = parent.getPixbufRenderer (column); if (pixbufRenderer == 0) return new Rectangle (0, 0, 0, 0); GdkRectangle rect = new GdkRectangle (); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); OS.gtk_tree_path_free (path); @@ -651,19 +651,19 @@ public Rectangle getTextBounds (int index) { if (0 > index || index > count - 1) return new Rectangle (0, 0, 0, 0); // TODO fully test on early and later versions of GTK // shifted a bit too far right on later versions of GTK - however, old Tree also had this problem - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (index >= 0 && index < parent.columnCount) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ textRenderer = parent.getTextRenderer (column); - int /*long*/ pixbufRenderer = parent.getPixbufRenderer (column); + long /*int*/ textRenderer = parent.getTextRenderer (column); + long /*int*/ pixbufRenderer = parent.getPixbufRenderer (column); if (textRenderer == 0 || pixbufRenderer == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); boolean isExpander = OS.gtk_tree_model_iter_n_children (parent.modelHandle, handle) > 0; @@ -702,12 +702,12 @@ public Rectangle getTextBounds (int index) { void redraw () { if (gtk_widget_get_realized (parent.handle)) { - int /*long*/ parentHandle = parent.handle; - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ parentHandle = parent.handle; + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, 0, rect); OS.gtk_tree_path_free (path); - int /*long*/ window = OS.gtk_tree_view_get_bin_window (parentHandle); + long /*int*/ window = OS.gtk_tree_view_get_bin_window (parentHandle); rect.x = 0; int [] w = new int [1], h = new int [1]; gdk_window_get_size (window, w, h); @@ -812,16 +812,16 @@ public void setBackground (int index, Color color) { boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { if ((parent.style & SWT.VIRTUAL) == 0) { - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (parent.columnCount > 0) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return; - int /*long*/ textRenderer = parent.getTextRenderer (column); - int /*long*/ imageRenderer = parent.getPixbufRenderer (column); + long /*int*/ textRenderer = parent.getTextRenderer (column); + long /*int*/ imageRenderer = parent.getPixbufRenderer (column); OS.gtk_tree_view_column_set_cell_data_func (column, textRenderer, display.cellDataProc, parentHandle, 0); OS.gtk_tree_view_column_set_cell_data_func (column, imageRenderer, display.cellDataProc, parentHandle, 0); } @@ -885,7 +885,7 @@ public void setFont (Font font){ if (oldFont == font) return; this.font = font; if (oldFont != null && oldFont.equals (font)) return; - int /*long*/ fontHandle = font != null ? font.handle : 0; + long /*int*/ fontHandle = font != null ? font.handle : 0; OS.gtk_list_store_set (parent.modelHandle, handle, Table.FONT_COLUMN, fontHandle, -1); /* * Bug in GTK. When using fixed-height-mode, @@ -936,7 +936,7 @@ public void setFont (int index, Font font) { if (oldFont != null && oldFont.equals (font)) return; int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex; - int /*long*/ fontHandle = font != null ? font.handle : 0; + long /*int*/ fontHandle = font != null ? font.handle : 0; OS.gtk_list_store_set (parent.modelHandle, handle, modelIndex + Table.CELL_FONT, fontHandle, -1); /* * Bug in GTK. When using fixed-height-mode, @@ -954,16 +954,16 @@ public void setFont (int index, Font font) { boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { if ((parent.style & SWT.VIRTUAL) == 0) { - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (parent.columnCount > 0) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return; - int /*long*/ textRenderer = parent.getTextRenderer (column); - int /*long*/ imageRenderer = parent.getPixbufRenderer (column); + long /*int*/ textRenderer = parent.getTextRenderer (column); + long /*int*/ imageRenderer = parent.getPixbufRenderer (column); OS.gtk_tree_view_column_set_cell_data_func (column, textRenderer, display.cellDataProc, parentHandle, 0); OS.gtk_tree_view_column_set_cell_data_func (column, imageRenderer, display.cellDataProc, parentHandle, 0); } @@ -1059,16 +1059,16 @@ public void setForeground (int index, Color color){ boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { if ((parent.style & SWT.VIRTUAL) == 0) { - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (parent.columnCount > 0) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return; - int /*long*/ textRenderer = parent.getTextRenderer (column); - int /*long*/ imageRenderer = parent.getPixbufRenderer (column); + long /*int*/ textRenderer = parent.getTextRenderer (column); + long /*int*/ imageRenderer = parent.getPixbufRenderer (column); OS.gtk_tree_view_column_set_cell_data_func (column, textRenderer, display.cellDataProc, parentHandle, 0); OS.gtk_tree_view_column_set_cell_data_func (column, imageRenderer, display.cellDataProc, parentHandle, 0); } @@ -1131,7 +1131,7 @@ public void setImage (int index, Image image) { } int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count - 1) return; - int /*long*/ pixbuf = 0; + long /*int*/ pixbuf = 0; if (image != null) { ImageList imageList = parent.imageList; if (imageList == null) imageList = parent.imageList = new ImageList (); @@ -1158,10 +1158,10 @@ public void setImage (int index, Image image) { */ if ((parent.style & SWT.VIRTUAL) != 0 && parent.currentItem == null) { if (image != null) { - int /*long*/parentHandle = parent.handle; - int /*long*/ column = OS.gtk_tree_view_get_column (parentHandle, index); + long /*int*/parentHandle = parent.handle; + long /*int*/ column = OS.gtk_tree_view_get_column (parentHandle, index); int [] w = new int [1]; - int /*long*/ pixbufRenderer = parent.getPixbufRenderer(column); + long /*int*/ pixbufRenderer = parent.getPixbufRenderer(column); OS.gtk_tree_view_column_cell_get_position (column, pixbufRenderer, null, w); if (w[0] < image.getBounds().width) { /* @@ -1169,7 +1169,7 @@ public void setImage (int index, Image image) { * are relying on the fact that it is done as part of modifying * the style. */ - int /*long*/ style = OS.gtk_widget_get_modifier_style (parentHandle); + long /*int*/ style = OS.gtk_widget_get_modifier_style (parentHandle); parent.modifyStyle (parentHandle, style); } } 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 fdcb01cd48..f45e9ab5a3 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 @@ -57,9 +57,9 @@ import org.eclipse.swt.events.*; * @noextend This class is not intended to be subclassed by clients. */ public class Text extends Scrollable { - int /*long*/ bufferHandle; + long /*int*/ bufferHandle; int tabs = 8, lastEventTime = 0; - int /*long*/ gdkEventKey = 0; + long /*int*/ gdkEventKey = 0; int fixStart = -1, fixEnd = -1; boolean doubleClick; String message = ""; @@ -392,7 +392,7 @@ public void append (String string) { OS.gtk_text_buffer_get_end_iter (bufferHandle, position); OS.gtk_text_buffer_insert (bufferHandle, position, buffer, buffer.length); OS.gtk_text_buffer_place_cursor (bufferHandle, position); - int /*long*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); + long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_view_scroll_mark_onscreen (handle, mark); } applySegments (); @@ -429,7 +429,7 @@ void applySegments () { separator [0] = segmentsChars [i]; } byte [] buffer = Converter.wcsToMbcs (null, separator, false); - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); pos [0] = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, pos [0]); OS.gtk_editable_insert_text (handle, buffer, buffer.length, pos); } @@ -443,7 +443,7 @@ void applySegments () { byte [] endIter = new byte [ITER_SIZEOF]; for (int i = 0; i < nSegments; i++) { OS.gtk_text_buffer_get_bounds (bufferHandle, startIter, endIter); - int /*long*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, startIter, endIter, true); + long /*int*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, startIter, endIter, true); OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, pos, (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, segments[i] + i)); OS.g_free (ptr); if (segmentsChars != null && segmentsChars.length > i) { @@ -466,7 +466,7 @@ void clearSegments (boolean applyText) { OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); if (applyText) { OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_TEXT); - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); int start, end; for (int i = 0; i < nSegments; i++) { start = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, segments[i]); @@ -485,7 +485,7 @@ void clearSegments (boolean applyText) { byte [] startIter = new byte [ITER_SIZEOF], endIter = new byte [ITER_SIZEOF]; for (int i = 0; i < nSegments; i++) { OS.gtk_text_buffer_get_bounds (bufferHandle, startIter, endIter); - int /*long*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, startIter, endIter, true); + long /*int*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, startIter, endIter, true); OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, start, (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, segments[i])); OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, end, (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, segments[i] + 1)); OS.gtk_text_buffer_delete (bufferHandle, start, end); @@ -512,8 +512,8 @@ public void clearSelection () { OS.gtk_editable_select_region (handle, position, position); } else { byte [] position = new byte [ITER_SIZEOF]; - int /*long*/ insertMark = OS.gtk_text_buffer_get_insert (bufferHandle); - int /*long*/ selectionMark = OS.gtk_text_buffer_get_selection_bound (bufferHandle); + long /*int*/ insertMark = OS.gtk_text_buffer_get_insert (bufferHandle); + long /*int*/ selectionMark = OS.gtk_text_buffer_get_selection_bound (bufferHandle); OS.gtk_text_buffer_get_iter_at_mark (bufferHandle, position, insertMark); OS.gtk_text_buffer_move_mark (bufferHandle, selectionMark, position); OS.gtk_text_buffer_move_mark (bufferHandle, insertMark, position); @@ -527,13 +527,13 @@ public Point computeSize (int wHint, int hHint, boolean changed) { int[] w = new int [1], h = new int [1]; if ((style & SWT.SINGLE) != 0) { OS.gtk_widget_realize (handle); - int /*long*/ layout = OS.gtk_entry_get_layout (handle); + long /*int*/ layout = OS.gtk_entry_get_layout (handle); OS.pango_layout_get_size (layout, w, h); } else { byte [] start = new byte [ITER_SIZEOF], end = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_get_bounds (bufferHandle, start, end); - int /*long*/ text = OS.gtk_text_buffer_get_text (bufferHandle, start, end, true); - int /*long*/ layout = OS.gtk_widget_create_pango_layout (handle, text); + long /*int*/ text = OS.gtk_text_buffer_get_text (bufferHandle, start, end, true); + long /*int*/ layout = OS.gtk_widget_create_pango_layout (handle, text); OS.g_free (text); OS.pango_layout_set_width (layout, wHint * OS.PANGO_SCALE); OS.pango_layout_get_size (layout, w, h); @@ -543,7 +543,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { int height = OS.PANGO_PIXELS (h [0]); if ((style & SWT.SINGLE) != 0 && message.length () > 0) { byte [] buffer = Converter.wcsToMbcs (null, message, true); - int /*long*/ layout = OS.gtk_widget_create_pango_layout (handle, buffer); + long /*int*/ layout = OS.gtk_widget_create_pango_layout (handle, buffer); OS.pango_layout_get_size (layout, w, h); OS.g_object_unref (layout); width = Math.max (width, OS.PANGO_PIXELS (w [0])); @@ -562,7 +562,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) { int xborder = 0, yborder = 0; if ((style & SWT.SINGLE) != 0) { if ((style & SWT.BORDER) != 0) { - int /*long*/ style = OS.gtk_widget_get_style (handle); + long /*int*/ style = OS.gtk_widget_get_style (handle); xborder += OS.gtk_style_get_xthickness (style); yborder += OS.gtk_style_get_ythickness (style); } @@ -607,7 +607,7 @@ public void copy () { if ((style & SWT.SINGLE) != 0) { OS.gtk_editable_copy_clipboard (handle); } else { - int /*long*/ clipboard = OS.gtk_clipboard_get (OS.GDK_NONE); + long /*int*/ clipboard = OS.gtk_clipboard_get (OS.GDK_NONE); clearSegments (true); OS.gtk_text_buffer_copy_clipboard (bufferHandle, clipboard); applySegments (); @@ -631,7 +631,7 @@ public void cut () { if ((style & SWT.SINGLE) != 0) { OS.gtk_editable_cut_clipboard (handle); } else { - int /*long*/ clipboard = OS.gtk_clipboard_get (OS.GDK_NONE); + long /*int*/ clipboard = OS.gtk_clipboard_get (OS.GDK_NONE); clearSegments (true); OS.gtk_text_buffer_cut_clipboard (bufferHandle, clipboard, OS.gtk_text_view_get_editable (handle)); applySegments (); @@ -670,7 +670,7 @@ char [] deprocessText (char [] text, int start, int end) { void deregister () { super.deregister (); if (bufferHandle != 0) display.removeWidget (bufferHandle); - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) display.removeWidget (imContext); } @@ -698,9 +698,9 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean if ((style & SWT.SINGLE) != 0) { int [] index = new int [1]; int [] trailing = new int [1]; - int /*long*/ layout = OS.gtk_entry_get_layout (handle); + long /*int*/ layout = OS.gtk_entry_get_layout (handle); OS.pango_layout_xy_to_index (layout, x * OS.PANGO_SCALE, y * OS.PANGO_SCALE, index, trailing); - int /*long*/ ptr = OS.pango_layout_get_text (layout); + long /*int*/ ptr = OS.pango_layout_get_text (layout); position = (int)/*64*/OS.g_utf8_pointer_to_offset (ptr, ptr + index[0]) + trailing[0]; } else { byte [] p = new byte [ITER_SIZEOF]; @@ -719,15 +719,15 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean return super.dragDetect (x, y, filter, dragOnTimeout, consume); } -int /*long*/ eventWindow () { +long /*int*/ eventWindow () { return paintWindow (); } -boolean filterKey (int keyval, int /*long*/ event) { +boolean filterKey (int keyval, long /*int*/ event) { int time = OS.gdk_event_get_time (event); if (time != lastEventTime) { lastEventTime = time; - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { return OS.gtk_im_context_filter_keypress (imContext, event); } @@ -746,7 +746,7 @@ void fixIM () { * filter has to be called by SWT. */ if (gdkEventKey != 0 && gdkEventKey != -1) { - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { OS.gtk_im_context_filter_keypress (imContext, gdkEventKey); gdkEventKey = -1; @@ -763,7 +763,7 @@ GdkColor getBackgroundColor () { public int getBorderWidth () { checkWidget(); if ((style & SWT.MULTI) != 0) return super.getBorderWidth (); - int /*long*/ style = OS.gtk_widget_get_style (handle); + long /*int*/ style = OS.gtk_widget_get_style (handle); if ((this.style & SWT.BORDER) != 0) { return OS.gtk_style_get_xthickness (style); } @@ -787,7 +787,7 @@ public int getCaretLineNumber () { checkWidget (); if ((style & SWT.SINGLE) != 0) return 0; byte [] position = new byte [ITER_SIZEOF]; - int /*long*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); + long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_buffer_get_iter_at_mark (bufferHandle, position, mark); return OS.gtk_text_iter_get_line (position); } @@ -812,7 +812,7 @@ public Point getCaretLocation () { } int [] offset_x = new int [1], offset_y = new int [1]; OS.gtk_entry_get_layout_offsets (handle, offset_x, offset_y); - int /*long*/ layout = OS.gtk_entry_get_layout (handle); + long /*int*/ layout = OS.gtk_entry_get_layout (handle); PangoRectangle pos = new PangoRectangle (); OS.pango_layout_index_to_pos (layout, index, pos); int x = offset_x [0] + OS.PANGO_PIXELS (pos.x) - getBorderWidth (); @@ -820,7 +820,7 @@ public Point getCaretLocation () { return new Point (x, y); } byte [] position = new byte [ITER_SIZEOF]; - int /*long*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); + long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_buffer_get_iter_at_mark (bufferHandle, position, mark); GdkRectangle rect = new GdkRectangle (); OS.gtk_text_view_get_iter_location (handle, position, rect); @@ -847,15 +847,15 @@ public int getCaretPosition () { checkWidget (); int result; if ((style & SWT.SINGLE) != 0) { - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); result = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, OS.gtk_editable_get_position (handle)); } else { byte [] position = new byte [ITER_SIZEOF]; - int /*long*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); + long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_buffer_get_iter_at_mark (bufferHandle, position, mark); byte [] zero = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_get_iter_at_offset(bufferHandle, zero, 0); - int /*long*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, zero, position, true); + long /*int*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, zero, position, true); result = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, OS.gtk_text_iter_get_offset (position)); OS.g_free (ptr); } @@ -876,13 +876,13 @@ public int getCharCount () { checkWidget (); int result; if ((style & SWT.SINGLE) != 0) { - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); result = (int)/*64*/OS.g_utf16_strlen (ptr, -1); } else { byte [] startIter = new byte [ITER_SIZEOF]; byte [] endIter = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_get_bounds (bufferHandle, startIter, endIter); - int /*long*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, startIter, endIter, true); + long /*int*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, startIter, endIter, true); result = (int)/*64*/OS.g_utf16_strlen(ptr, -1); OS.g_free (ptr); } @@ -1051,16 +1051,16 @@ public int getOrientation () { if ((style & SWT.SINGLE) != 0) { int [] index = new int [1]; int [] trailing = new int [1]; - int /*long*/ layout = OS.gtk_entry_get_layout (handle); + long /*int*/ layout = OS.gtk_entry_get_layout (handle); OS.pango_layout_xy_to_index (layout, point.x * OS.PANGO_SCALE, point.y * OS.PANGO_SCALE, index, trailing); - int /*long*/ ptr = OS.pango_layout_get_text (layout); + long /*int*/ ptr = OS.pango_layout_get_text (layout); position = (int)/*64*/OS.g_utf16_pointer_to_offset (ptr, ptr + index[0]) + trailing[0]; } else { byte [] p = new byte [ITER_SIZEOF]; OS.gtk_text_view_get_iter_at_location (handle, p, point.x, point.y); byte [] zero = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_get_iter_at_offset(bufferHandle, zero, 0); - int /*long*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, zero, p, true); + long /*int*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, zero, p, true); position = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, OS.gtk_text_iter_get_offset (p)); OS.g_free (ptr); } @@ -1092,7 +1092,7 @@ public Point getSelection () { int [] start = new int [1]; int [] end = new int [1]; OS.gtk_editable_get_selection_bounds (handle, start, end); - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); start[0] = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start[0]); end[0] = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end[0]); selection = new Point (start [0], end [0]); @@ -1102,7 +1102,7 @@ public Point getSelection () { OS.gtk_text_buffer_get_selection_bounds (bufferHandle, startIter, endIter); byte [] zero = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_get_iter_at_offset(bufferHandle, zero, 0); - int /*long*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, zero, endIter, true); + long /*int*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, zero, endIter, true); int start = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, OS.gtk_text_iter_get_offset (startIter)); int end = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, OS.gtk_text_iter_get_offset (endIter)); OS.g_free (ptr); @@ -1167,7 +1167,7 @@ public int getTabs () { int getTabWidth (int tabs) { byte[] buffer = Converter.wcsToMbcs(null, " ", true); - int /*long*/ layout = OS.gtk_widget_create_pango_layout (handle, buffer); + long /*int*/ layout = OS.gtk_widget_create_pango_layout (handle, buffer); int [] width = new int [1]; int [] height = new int [1]; OS.pango_layout_get_size (layout, width, height); @@ -1247,7 +1247,7 @@ public String getText (int start, int end) { */ public char [] getTextChars () { checkWidget (); - int /*long*/ address; + long /*int*/ address; if ((style & SWT.SINGLE) != 0) { address = OS.gtk_entry_get_text (handle); } else { @@ -1345,13 +1345,13 @@ public int getTopPixel () { return lineTop [0]; } -int /*long*/ gtk_activate (int /*long*/ widget) { +long /*int*/ gtk_activate (long /*int*/ widget) { sendSelectionEvent (SWT.DefaultSelection); return 0; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ result = super.gtk_button_press_event (widget, event); +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ result = super.gtk_button_press_event (widget, event); if (result != 0) return result; GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); @@ -1366,7 +1366,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { } -int /*long*/ gtk_changed (int /*long*/ widget) { +long /*int*/ gtk_changed (long /*int*/ widget) { /* * Feature in GTK. When the user types, GTK positions * the caret after sending the changed signal. This @@ -1375,7 +1375,7 @@ int /*long*/ gtk_changed (int /*long*/ widget) { * is to post the modify event when the user is typing. */ boolean keyPress = false; - int /*long*/ eventPtr = OS.gtk_get_current_event (); + long /*int*/ eventPtr = OS.gtk_get_current_event (); if (eventPtr != 0) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); @@ -1393,14 +1393,14 @@ int /*long*/ gtk_changed (int /*long*/ widget) { } if ((style & SWT.SEARCH) != 0) { if ((style & SWT.ICON_CANCEL) != 0) { - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); OS.gtk_entry_set_icon_sensitive (handle, OS.GTK_ENTRY_ICON_SECONDARY, OS.g_utf16_strlen (ptr, -1) > 0); } } return 0; } -int /*long*/ gtk_commit (int /*long*/ imContext, int /*long*/ text) { +long /*int*/ gtk_commit (long /*int*/ imContext, long /*int*/ text) { if (text == 0) return 0; if ((style & SWT.SINGLE) != 0) { if (!OS.gtk_editable_get_editable (handle)) return 0; @@ -1442,7 +1442,7 @@ int /*long*/ gtk_commit (int /*long*/ imContext, int /*long*/ text) { return 0; } -int /*long*/ gtk_delete_range (int /*long*/ widget, int /*long*/ iter1, int /*long*/ iter2) { +long /*int*/ gtk_delete_range (long /*int*/ widget, long /*int*/ iter1, long /*int*/ iter2) { if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0; byte [] startIter = new byte [ITER_SIZEOF]; byte [] endIter = new byte [ITER_SIZEOF]; @@ -1452,7 +1452,7 @@ int /*long*/ gtk_delete_range (int /*long*/ widget, int /*long*/ iter1, int /*lo int end = OS.gtk_text_iter_get_offset (endIter); byte [] zero = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_get_iter_at_offset(bufferHandle, zero, 0); - int /*long*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, zero, endIter, true); + long /*int*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, zero, endIter, true); start = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start); end = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end); OS.g_free (ptr); @@ -1484,9 +1484,9 @@ int /*long*/ gtk_delete_range (int /*long*/ widget, int /*long*/ iter1, int /*lo return 0; } -int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int /*long*/ end_pos) { +long /*int*/ gtk_delete_text (long /*int*/ widget, long /*int*/ start_pos, long /*int*/ end_pos) { if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0; - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); if (end_pos == -1) end_pos = OS.g_utf8_strlen (ptr, -1); int start = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start_pos); int end = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end_pos); @@ -1516,7 +1516,7 @@ int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int / return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { if (cursor != null) setCursor (cursor.handle); /* * Feature in GTK. The gtk-entry-select-on-focus property is a global @@ -1532,7 +1532,7 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { GdkEventFocus gdkEventFocus = new GdkEventFocus (); OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof); if (gdkEventFocus.in == 0) { - int /*long*/ settings = OS.gtk_settings_get_default (); + long /*int*/ settings = OS.gtk_settings_get_default (); OS.g_object_set (settings, OS.gtk_entry_select_on_focus, true, 0); } break; @@ -1541,29 +1541,29 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { return super.gtk_event_after (widget, gdkEvent); } -int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ event) { if ((state & OBSCURED) != 0) return 0; - int /*long*/ result = super.gtk_expose_event (widget, event); + long /*int*/ result = super.gtk_expose_event (widget, event); if ((style & SWT.SINGLE) != 0 && message.length () > 0) { - int /*long*/ str = OS.gtk_entry_get_text (handle); + long /*int*/ str = OS.gtk_entry_get_text (handle); if (!gtk_widget_has_focus (handle) && OS.strlen (str) == 0) { GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove (gdkEvent, event, GdkEventExpose.sizeof); - int /*long*/ window = paintWindow (); + long /*int*/ window = paintWindow (); int [] w = new int [1], h = new int [1]; 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; - int /*long*/ context = OS.gtk_widget_get_pango_context (handle); - int /*long*/ lang = OS.pango_context_get_language (context); - int /*long*/ metrics = OS.pango_context_get_metrics (context, getFontDescription (), lang); + long /*int*/ context = OS.gtk_widget_get_pango_context (handle); + long /*int*/ lang = OS.pango_context_get_language (context); + long /*int*/ metrics = OS.pango_context_get_metrics (context, getFontDescription (), lang); int ascent = OS.PANGO_PIXELS (OS.pango_font_metrics_get_ascent (metrics)); int descent = OS.PANGO_PIXELS (OS.pango_font_metrics_get_descent (metrics)); OS.pango_font_metrics_unref (metrics); byte [] buffer = Converter.wcsToMbcs (null, message, true); - int /*long*/ layout = OS.gtk_widget_create_pango_layout (handle, buffer); - int /*long*/ line = OS.pango_layout_get_line (layout, 0); + long /*int*/ layout = OS.gtk_widget_create_pango_layout (handle, buffer); + long /*int*/ line = OS.pango_layout_get_line (layout, 0); PangoRectangle rect = new PangoRectangle (); OS.pango_layout_line_get_extents (line, null, rect); rect.y = OS.PANGO_PIXELS (rect.y); @@ -1586,19 +1586,19 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) { case SWT.CENTER: x = (width - rect.width) / 2; break; case SWT.RIGHT: x = rtl ? innerBorder.left : width - rect.width; break; } - int /*long*/ style = OS.gtk_widget_get_style (handle); + long /*int*/ style = OS.gtk_widget_get_style (handle); GdkColor textColor = new GdkColor (); OS.gtk_style_get_text (style, OS.GTK_STATE_INSENSITIVE, textColor); GdkColor baseColor = new GdkColor (); OS.gtk_style_get_base (style, OS.GTK_STATE_NORMAL, baseColor); if (OS.USE_CAIRO) { - int /*long*/ cairo = OS.gdk_cairo_create(window); + long /*int*/ cairo = OS.gdk_cairo_create(window); Cairo.cairo_set_source_rgba(cairo, (textColor.red & 0xFFFF) / (float)0xFFFF, (textColor.green & 0xFFFF) / (float)0xFFFF, (textColor.blue & 0xFFFF) / (float)0xFFFF, 1); Cairo.cairo_move_to(cairo, x, y); OS.pango_cairo_show_layout(cairo, layout); Cairo.cairo_destroy(cairo); } else { - int /*long*/ gc = OS.gdk_gc_new (window); + long /*int*/ gc = OS.gdk_gc_new (window); OS.gdk_draw_layout_with_colors (window, gc, x, y, layout, textColor, baseColor); OS.g_object_unref (gc); } @@ -1608,13 +1608,13 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { fixIM (); return super.gtk_focus_out_event (widget, event); } -int /*long*/ gtk_grab_focus (int /*long*/ widget) { - int /*long*/ result = super.gtk_grab_focus (widget); +long /*int*/ gtk_grab_focus (long /*int*/ widget) { + long /*int*/ result = super.gtk_grab_focus (widget); /* * Feature in GTK. GtkEntry widgets select their text on focus in, * clearing the previous selection. This behavior is controlled by @@ -1623,13 +1623,13 @@ int /*long*/ gtk_grab_focus (int /*long*/ widget) { * the entry has done focus in processing. */ if ((style & SWT.SINGLE) != 0 && display.entrySelectOnFocus) { - int /*long*/ settings = OS.gtk_settings_get_default (); + long /*int*/ settings = OS.gtk_settings_get_default (); OS.g_object_set (settings, OS.gtk_entry_select_on_focus, false, 0); } return result; } -int /*long*/ gtk_icon_release (int /*long*/ widget, int /*long*/ icon_pos, int /*long*/ event) { +long /*int*/ gtk_icon_release (long /*int*/ widget, long /*int*/ icon_pos, long /*int*/ event) { Event e = new Event(); if (icon_pos == OS.GTK_ENTRY_ICON_PRIMARY) { e.detail = SWT.ICON_SEARCH; @@ -1641,7 +1641,7 @@ int /*long*/ gtk_icon_release (int /*long*/ widget, int /*long*/ icon_pos, int / return 0; } -int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /*long*/ new_text_length, int /*long*/ position) { +long /*int*/ gtk_insert_text (long /*int*/ widget, long /*int*/ new_text, long /*int*/ new_text_length, long /*int*/ position) { if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0; if (new_text == 0 || new_text_length == 0) return 0; byte [] buffer = new byte [(int)/*64*/new_text_length]; @@ -1649,7 +1649,7 @@ int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /* String oldText = new String (Converter.mbcsToWcs (null, buffer)); int [] pos = new int [1]; OS.memmove (pos, position, 4); - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); if (pos [0] == -1) pos [0] = (int)/*64*/OS.g_utf8_strlen (ptr, -1); /* Use the selection when the text was deleted */ int start = pos [0], end = pos [0]; @@ -1689,7 +1689,7 @@ int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /* return 0; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { boolean handleSegments = false, segmentsCleared = false; if (hooks (SWT.Segments) || filters (SWT.Segments)) { GdkEventKey gdkEvent = new GdkEventKey (); @@ -1702,7 +1702,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { } } } - int /*long*/ result = super.gtk_key_press_event (widget, event); + long /*int*/ result = super.gtk_key_press_event (widget, event); if (result != 0) fixIM (); if (gdkEventKey == -1) result = 1; gdkEventKey = 0; @@ -1712,7 +1712,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_populate_popup (int /*long*/ widget, int /*long*/ menu) { +long /*int*/ gtk_populate_popup (long /*int*/ widget, long /*int*/ menu) { if ((style & SWT.RIGHT_TO_LEFT) != 0) { OS.gtk_widget_set_direction (menu, OS.GTK_TEXT_DIR_RTL); OS.gtk_container_forall (menu, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL); @@ -1720,7 +1720,7 @@ int /*long*/ gtk_populate_popup (int /*long*/ widget, int /*long*/ menu) { return 0; } -int /*long*/ gtk_text_buffer_insert_text (int /*long*/ widget, int /*long*/ iter, int /*long*/ text, int /*long*/ length) { +long /*int*/ gtk_text_buffer_insert_text (long /*int*/ widget, long /*int*/ iter, long /*int*/ text, long /*int*/ length) { if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0; byte [] position = new byte [ITER_SIZEOF]; OS.memmove (position, iter, position.length); @@ -1733,7 +1733,7 @@ int /*long*/ gtk_text_buffer_insert_text (int /*long*/ widget, int /*long*/ iter } byte [] zero = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_get_iter_at_offset(bufferHandle, zero, 0); - int /*long*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, zero, position, true); + long /*int*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, zero, position, true); start = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start); end = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end); OS.g_free(ptr); @@ -1773,7 +1773,7 @@ void hookEvents () { OS.g_signal_connect_closure (bufferHandle, OS.delete_range, display.closures [DELETE_RANGE], false); OS.g_signal_connect_closure (handle, OS.populate_popup, display.closures [POPULATE_POPUP], false); } - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { OS.g_signal_connect_closure (imContext, OS.commit, display.closures [COMMIT], false); int id = OS.g_signal_lookup (OS.commit, OS.gtk_im_context_get_type ()); @@ -1795,7 +1795,7 @@ void hookEvents () { OS.g_signal_connect_closure (handle, OS.direction_changed, display.closures [DIRECTION_CHANGED], true); } -int /*long*/ imContext () { +long /*int*/ imContext () { if ((style & SWT.SINGLE) != 0) { return OS.gtk_editable_get_editable (handle) ? OS.GTK_ENTRY_IM_CONTEXT (handle) : 0; } @@ -1837,16 +1837,16 @@ public void insert (String string) { } OS.gtk_text_buffer_insert (bufferHandle, start, buffer, buffer.length); OS.gtk_text_buffer_place_cursor (bufferHandle, start); - int /*long*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); + long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_view_scroll_mark_onscreen (handle, mark); } applySegments (); } -int /*long*/ paintWindow () { +long /*int*/ paintWindow () { if ((style & SWT.SINGLE) != 0) { - int /*long*/ window = super.paintWindow (); - int /*long*/ children = OS.gdk_window_get_children (window); + long /*int*/ window = super.paintWindow (); + long /*int*/ children = OS.gdk_window_get_children (window); if (children != 0) { /* * When search or cancel icons are added to Text, those @@ -1882,7 +1882,7 @@ public void paste () { if ((style & SWT.SINGLE) != 0) { OS.gtk_editable_paste_clipboard (handle); } else { - int /*long*/ clipboard = OS.gtk_clipboard_get (OS.GDK_NONE); + long /*int*/ clipboard = OS.gtk_clipboard_get (OS.GDK_NONE); clearSegments (true); OS.gtk_text_buffer_paste_clipboard (bufferHandle, clipboard, null, OS.gtk_text_view_get_editable (handle)); applySegments (); @@ -1892,7 +1892,7 @@ public void paste () { void register () { super.register (); if (bufferHandle != 0) display.addWidget (bufferHandle, this); - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) display.addWidget (imContext, this); } @@ -1907,7 +1907,7 @@ void releaseWidget () { * it around until ownership of the clipboard is lost. */ if ((style & SWT.MULTI) != 0) { - int /*long*/ clipboard = OS.gtk_clipboard_get (OS.GDK_NONE); + long /*int*/ clipboard = OS.gtk_clipboard_get (OS.GDK_NONE); OS.gtk_text_buffer_paste_clipboard (bufferHandle, clipboard, null, OS.gtk_text_view_get_editable (handle)); } } @@ -2034,8 +2034,8 @@ public void selectAll () { byte [] end = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, start, 0); OS.gtk_text_buffer_get_end_iter (bufferHandle, end); - int /*long*/ insertMark = OS.gtk_text_buffer_get_insert (bufferHandle); - int /*long*/ selectionMark = OS.gtk_text_buffer_get_selection_bound (bufferHandle); + long /*int*/ insertMark = OS.gtk_text_buffer_get_insert (bufferHandle); + long /*int*/ selectionMark = OS.gtk_text_buffer_get_selection_bound (bufferHandle); OS.gtk_text_buffer_move_mark (bufferHandle, selectionMark, start); OS.gtk_text_buffer_move_mark (bufferHandle, insertMark, end); } @@ -2046,8 +2046,8 @@ void setBackgroundColor (GdkColor color) { OS.gtk_widget_modify_base (handle, 0, color); } -void setCursor (int /*long*/ cursor) { - int /*long*/ defaultCursor = 0; +void setCursor (long /*int*/ cursor) { + long /*int*/ defaultCursor = 0; if (cursor == 0) defaultCursor = OS.gdk_cursor_new (OS.GDK_XTERM); super.setCursor (cursor != 0 ? cursor : defaultCursor); if (cursor == 0) OS.gdk_cursor_unref (defaultCursor); @@ -2126,7 +2126,7 @@ public void setEditable (boolean editable) { } } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); setTabStops (tabs); } @@ -2205,19 +2205,19 @@ public void setSelection (int start) { checkWidget (); start = translateOffset (start); if ((style & SWT.SINGLE) != 0) { - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); start = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, start); OS.gtk_editable_set_position (handle, start); } else { byte [] startIter = new byte [ITER_SIZEOF]; byte [] endIter = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_get_bounds (bufferHandle, startIter, endIter); - int /*long*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, startIter, endIter, true); + long /*int*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, startIter, endIter, true); start = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, start); OS.g_free (ptr); OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, startIter, start); OS.gtk_text_buffer_place_cursor (bufferHandle, startIter); - int /*long*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); + long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_view_scroll_mark_onscreen (handle, mark); } } @@ -2252,7 +2252,7 @@ public void setSelection (int start, int end) { start = translateOffset (start); end = translateOffset (end); if ((style & SWT.SINGLE) != 0) { - int /*long*/ ptr = OS.gtk_entry_get_text (handle); + long /*int*/ ptr = OS.gtk_entry_get_text (handle); start = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, start); end = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, end); OS.gtk_editable_set_position (handle, start); @@ -2261,14 +2261,14 @@ public void setSelection (int start, int end) { byte [] startIter = new byte [ITER_SIZEOF]; byte [] endIter = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_get_bounds (bufferHandle, startIter, endIter); - int /*long*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, startIter, endIter, true); + long /*int*/ ptr = OS.gtk_text_buffer_get_text (bufferHandle, startIter, endIter, true); start = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, start); end = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, end); OS.g_free (ptr); OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, startIter, start); OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, endIter, end); - int /*long*/ insertMark = OS.gtk_text_buffer_get_insert (bufferHandle); - int /*long*/ selectionMark = OS.gtk_text_buffer_get_selection_bound (bufferHandle); + long /*int*/ insertMark = OS.gtk_text_buffer_get_insert (bufferHandle); + long /*int*/ selectionMark = OS.gtk_text_buffer_get_selection_bound (bufferHandle); OS.gtk_text_buffer_move_mark (bufferHandle, selectionMark, startIter); OS.gtk_text_buffer_move_mark (bufferHandle, insertMark, endIter); } @@ -2334,7 +2334,7 @@ public void setTabs (int tabs) { void setTabStops (int tabs) { if ((style & SWT.SINGLE) != 0) return; int tabWidth = getTabWidth (tabs); - int /*long*/ tabArray = OS.pango_tab_array_new (1, false); + long /*int*/ tabArray = OS.pango_tab_array_new (1, false); OS.pango_tab_array_set_tab (tabArray, 0, OS.PANGO_TAB_LEFT, tabWidth); OS.gtk_text_view_set_tabs (handle, tabArray); OS.pango_tab_array_free (tabArray); @@ -2431,7 +2431,7 @@ void setText (char [] text) { OS.g_signal_handlers_unblock_matched (bufferHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, TEXT_BUFFER_INSERT_TEXT); OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, position, 0); OS.gtk_text_buffer_place_cursor (bufferHandle, position); - int /*long*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); + long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_view_scroll_mark_onscreen (handle, mark); } sendEvent (SWT.Modify); @@ -2511,7 +2511,7 @@ public void setTopIndex (int index) { public void showSelection () { checkWidget (); if ((style & SWT.SINGLE) != 0) return; - int /*long*/ mark = OS.gtk_text_buffer_get_selection_bound (bufferHandle); + long /*int*/ mark = OS.gtk_text_buffer_get_selection_bound (bufferHandle); OS.gtk_text_view_scroll_mark_onscreen (handle, mark); mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_view_scroll_mark_onscreen (handle, mark); @@ -2530,9 +2530,9 @@ boolean translateTraversal (GdkEventKey keyEvent) { switch (key) { case OS.GDK_KP_Enter: case OS.GDK_Return: { - int /*long*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { - int /*long*/ [] preeditString = new int /*long*/ [1]; + long /*int*/ [] preeditString = new long /*int*/ [1]; OS.gtk_im_context_get_preedit_string (imContext, preeditString, null, null); if (preeditString [0] != 0) { int length = OS.strlen (preeditString [0]); @@ -2574,7 +2574,7 @@ String verifyText (String string, int start, int end) { event.text = string; event.start = start; event.end = end; - int /*long*/ eventPtr = OS.gtk_get_current_event (); + long /*int*/ eventPtr = OS.gtk_get_current_event (); if (eventPtr != 0) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); @@ -2596,7 +2596,7 @@ String verifyText (String string, int start, int end) { return event.text; } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ user_data) { if (hooks (SWT.Segments) || filters (SWT.Segments) || segments != null) { switch ((int)/*64*/user_data) { case BACKSPACE: @@ -2618,7 +2618,7 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ user_data) { return super.windowProc (handle, user_data); } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { if (hooks (SWT.Segments) || filters (SWT.Segments) || segments != null) { switch ((int)/*64*/user_data) { case DIRECTION_CHANGED: { @@ -2631,7 +2631,7 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ us return super.windowProc (handle, arg0, user_data); } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ user_data) { if (hooks (SWT.Segments) || filters (SWT.Segments) || segments != null) { switch ((int)/*64*/user_data) { case DELETE_FROM_CURSOR: { @@ -2647,7 +2647,7 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ ar return super.windowProc (handle, arg0, arg1, user_data); } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ user_data) { if (hooks (SWT.Segments) || filters (SWT.Segments) || segments != null) { switch ((int)/*64*/user_data) { case MOVE_CURSOR: { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java index 0ba8e94db7..96ebcbf79a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java @@ -204,11 +204,11 @@ Widget [] computeTabList () { return result; } -int /*long*/ eventHandle () { +long /*int*/ eventHandle () { return fixedHandle; } -int /*long*/ enterExitHandle() { +long /*int*/ enterExitHandle() { return handle; } @@ -226,10 +226,10 @@ void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, De } } -boolean forceFocus (int /*long*/ focusHandle) { +boolean forceFocus (long /*int*/ focusHandle) { int dir = OS.GTK_DIR_TAB_FORWARD; if ((style & SWT.MIRRORED) != 0) dir = OS.GTK_DIR_TAB_BACKWARD; - int /*long*/ childHandle = handle; + long /*int*/ childHandle = handle; if (currentFocusItem != null) childHandle = currentFocusItem.handle; /* * Feature in GTK. GtkToolBar takes care of navigating through @@ -298,7 +298,7 @@ public ToolItem getItem (Point point) { */ public int getItemCount () { checkWidget(); - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list == 0) return 0; int itemCount = OS.g_list_length (list); OS.g_list_free (list); @@ -327,13 +327,13 @@ public ToolItem [] getItems () { } ToolItem [] _getItems () { - int /*long*/ list = OS.gtk_container_get_children (handle); + long /*int*/ list = OS.gtk_container_get_children (handle); if (list == 0) return new ToolItem [0]; int count = OS.g_list_length (list); ToolItem [] items = new ToolItem [count]; int index = 0; for (int i=0; i<count; i++) { - int /*long*/ data = OS.g_list_nth_data (list, i); + long /*int*/ data = OS.g_list_nth_data (list, i); Widget widget = display.getWidget (data); if (widget != null) items [index++] = (ToolItem) widget; } @@ -383,9 +383,9 @@ ToolItem [] _getTabItemList () { return tabItemList; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { if (!hasFocus ()) return 0; - int /*long*/ result = super.gtk_key_press_event (widget, eventPtr); + long /*int*/ result = super.gtk_key_press_event (widget, eventPtr); if (result != 0) return result; GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); @@ -394,7 +394,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { if (OS.GTK_VERSION < OS.VERSION (2, 6, 0) && (currentFocusItem != null) && (currentFocusItem.style & SWT.DROP_DOWN) != 0) { Event event = new Event (); event.detail = SWT.ARROW; - int /*long*/ topHandle = currentFocusItem.topHandle (); + long /*int*/ topHandle = currentFocusItem.topHandle (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (topHandle, allocation); event.x = allocation.x; @@ -412,7 +412,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { } } -int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ directionType) { +long /*int*/ gtk_focus (long /*int*/ widget, long /*int*/ directionType) { return 0; } @@ -449,7 +449,7 @@ public int indexOf (ToolItem item) { return -1; } -static int /*long*/ MenuItemSelectedProc (int /*long*/ widget, int /*long*/ user_data) { +static long /*int*/ MenuItemSelectedProc (long /*int*/ widget, long /*int*/ user_data) { Display display = Display.getCurrent (); ToolItem item = (ToolItem) display.getWidget (user_data); if (item != null) { @@ -458,7 +458,7 @@ static int /*long*/ MenuItemSelectedProc (int /*long*/ widget, int /*long*/ user return 0; } -int /*long*/ menuItemSelected (int /*long*/ widget, ToolItem item) { +long /*int*/ menuItemSelected (long /*int*/ widget, ToolItem item) { Event event = new Event (); switch (item.style) { case SWT.DROP_DOWN : @@ -490,7 +490,7 @@ int /*long*/ menuItemSelected (int /*long*/ widget, ToolItem item) { boolean mnemonicHit (char key) { ToolItem [] items = getItems (); for (int i=0; i<items.length; i++) { - int /*long*/ labelHandle = items [i].labelHandle; + long /*int*/ labelHandle = items [i].labelHandle; if (labelHandle != 0 && mnemonicHit (labelHandle, key)) return true; } return false; @@ -499,7 +499,7 @@ boolean mnemonicHit (char key) { boolean mnemonicMatch (char key) { ToolItem [] items = getItems (); for (int i=0; i<items.length; i++) { - int /*long*/ labelHandle = items [i].labelHandle; + long /*int*/ labelHandle = items [i].labelHandle; if (labelHandle != 0 && mnemonicMatch (labelHandle, key)) return true; } return false; @@ -576,7 +576,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize return result; } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); ToolItem [] items = getItems (); for (int i = 0; i < items.length; i++) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java index 742d742ead..b88ece03c1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java @@ -38,8 +38,8 @@ import org.eclipse.swt.events.*; * @noextend This class is not intended to be subclassed by clients. */ public class ToolItem extends Item { - int /*long*/ arrowHandle, arrowBoxHandle, labelHandle, imageHandle; - int /*long*/ eventHandle, proxyMenuItem; + long /*int*/ arrowHandle, arrowBoxHandle, labelHandle, imageHandle; + long /*int*/ eventHandle, proxyMenuItem; ToolBar parent; Control control; Image hotImage, disabledImage; @@ -203,8 +203,8 @@ void createHandle (int index) { * disabled when it does not contain menu. The fix is to * find the arrow button handle and enable it. */ - int /*long*/ child = OS.gtk_bin_get_child (handle); - int /*long*/ list = OS.gtk_container_get_children (child); + long /*int*/ child = OS.gtk_bin_get_child (handle); + long /*int*/ list = OS.gtk_container_get_children (child); arrowHandle = OS.g_list_nth_data (list, 1); OS.gtk_widget_set_sensitive (arrowHandle, true); OS.gtk_widget_set_size_request(OS.gtk_bin_get_child(arrowHandle), 8, 6); @@ -315,7 +315,7 @@ public void dispose () { public Rectangle getBounds () { checkWidget(); parent.forceResize (); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; @@ -379,7 +379,7 @@ public Image getDisabledImage () { */ public boolean getEnabled () { checkWidget(); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); return gtk_widget_get_sensitive (topHandle); } @@ -469,13 +469,13 @@ public String getToolTipText () { public int getWidth () { checkWidget(); parent.forceResize (); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation(); gtk_widget_get_allocation (topHandle, allocation); return allocation.width; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); GtkAllocation allocation = new GtkAllocation (); @@ -483,14 +483,14 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { double x = gdkEvent.x + allocation.x; double y = gdkEvent.y + allocation.y; OS.memmove (event, gdkEvent, GdkEventButton.sizeof); - int /*long*/ result = parent.gtk_button_press_event (widget, event); + long /*int*/ result = parent.gtk_button_press_event (widget, event); gdkEvent.x = x; gdkEvent.y = y; OS.memmove (event, gdkEvent, GdkEventButton.sizeof); return result; } -int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); GtkAllocation allocation = new GtkAllocation (); @@ -498,21 +498,21 @@ int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) double x = gdkEvent.x + allocation.x; double y = gdkEvent.y + allocation.y; OS.memmove (event, gdkEvent, GdkEventButton.sizeof); - int /*long*/ result = parent.gtk_button_release_event (widget, event); + long /*int*/ result = parent.gtk_button_release_event (widget, event); gdkEvent.x = x; gdkEvent.y = y; OS.memmove(event, gdkEvent, GdkEventButton.sizeof); return result; } -int /*long*/ gtk_clicked (int /*long*/ widget) { +long /*int*/ gtk_clicked (long /*int*/ widget) { Event event = new Event (); if ((style & SWT.DROP_DOWN) != 0) { - int /*long*/ eventPtr = OS.gtk_get_current_event (); + long /*int*/ eventPtr = OS.gtk_get_current_event (); if (eventPtr != 0) { GdkEvent gdkEvent = new GdkEvent (); OS.memmove (gdkEvent, eventPtr, GdkEvent.sizeof); - int /*long*/ topHandle = topHandle(); + long /*int*/ topHandle = topHandle(); switch (gdkEvent.type) { case OS.GDK_KEY_RELEASE: //Fall Through.. case OS.GDK_BUTTON_PRESS: @@ -569,7 +569,7 @@ int /*long*/ gtk_clicked (int /*long*/ widget) { return 0; } -int /*long*/ gtk_create_menu_proxy (int /*long*/ widget) { +long /*int*/ gtk_create_menu_proxy (long /*int*/ widget) { /* * Feature in GTK. If the item is a radio/check button * with only image, then that image does not appear in @@ -593,12 +593,12 @@ int /*long*/ gtk_create_menu_proxy (int /*long*/ widget) { if (imageList != null) { int index = imageList.indexOf (image); if (index != -1) { - int /*long*/ pixbuf = imageList.getPixbuf (index); + long /*int*/ pixbuf = imageList.getPixbuf (index); byte[] label = null; int [] showImages = new int []{1}; - int /*long*/ settings = OS.gtk_settings_get_default(); + long /*int*/ settings = OS.gtk_settings_get_default(); if (settings != 0) { - int /*long*/ property = OS.g_object_class_find_property(OS.G_OBJECT_GET_CLASS(settings), OS.gtk_menu_images); + long /*int*/ property = OS.g_object_class_find_property(OS.G_OBJECT_GET_CLASS(settings), OS.gtk_menu_images); if (property != 0) OS.g_object_get (settings, OS.gtk_menu_images, showImages, 0); } @@ -620,8 +620,8 @@ int /*long*/ gtk_create_menu_proxy (int /*long*/ widget) { else { label = Converter.wcsToMbcs(null, text, true); } - int /*long*/ menuItem = OS.gtk_image_menu_item_new_with_label (label); - int /*long*/ menuImage = OS.gtk_image_new_from_pixbuf (pixbuf); + long /*int*/ menuItem = OS.gtk_image_menu_item_new_with_label (label); + long /*int*/ menuImage = OS.gtk_image_new_from_pixbuf (pixbuf); OS.gtk_image_menu_item_set_image (menuItem, menuImage); OS.gtk_tool_item_set_proxy_menu_item (widget, buffer, menuItem); /* @@ -638,7 +638,7 @@ int /*long*/ gtk_create_menu_proxy (int /*long*/ widget) { return 0; } -int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_enter_notify_event (long /*int*/ widget, long /*int*/ event) { parent.gtk_enter_notify_event (widget, event); drawHotImage = (parent.style & SWT.FLAT) != 0 && hotImage != null; if (drawHotImage) { @@ -646,7 +646,7 @@ int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) { if (imageList != null) { int index = imageList.indexOf (hotImage); if (index != -1 && imageHandle != 0) { - int /*long*/ pixbuf = imageList.getPixbuf (index); + long /*int*/ pixbuf = imageList.getPixbuf (index); OS.gtk_image_set_from_pixbuf(imageHandle, pixbuf); } } @@ -654,7 +654,7 @@ int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) { return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { @@ -670,18 +670,18 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { return 0; } -int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus_in_event (long /*int*/ widget, long /*int*/ event) { parent.hasChildFocus = true; parent.currentFocusItem = this; return 0; } -int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { parent.hasChildFocus = false; return 0; } -int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_leave_notify_event (long /*int*/ widget, long /*int*/ event) { parent.gtk_leave_notify_event (widget, event); if (drawHotImage) { drawHotImage = false; @@ -690,7 +690,7 @@ int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) { if (imageList != null) { int index = imageList.indexOf (image); if (index != -1 && imageHandle != 0) { - int /*long*/ pixbuf = imageList.getPixbuf (index); + long /*int*/ pixbuf = imageList.getPixbuf (index); OS.gtk_image_set_from_pixbuf(imageHandle, pixbuf); } } @@ -699,12 +699,12 @@ int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) { return 0; } -int /*long*/ gtk_map (int /*long*/ widget) { +long /*int*/ gtk_map (long /*int*/ widget) { parent.fixZOrder (); return 0; } -int /*long*/ gtk_mnemonic_activate (int /*long*/ widget, int /*long*/ arg1) { +long /*int*/ gtk_mnemonic_activate (long /*int*/ widget, long /*int*/ arg1) { return parent.gtk_mnemonic_activate (widget, arg1); } @@ -719,7 +719,7 @@ void hookEvents () { */ eventHandle = OS.gtk_bin_get_child(handle); if ((style & SWT.DROP_DOWN) != 0 && OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) { - int /*long*/ list = OS.gtk_container_get_children(eventHandle); + long /*int*/ list = OS.gtk_container_get_children(eventHandle); eventHandle = OS.g_list_nth_data(list, 0); if (arrowHandle != 0) OS.g_signal_connect_closure (arrowHandle, OS.clicked, display.closures [CLICKED], false); } @@ -748,7 +748,7 @@ void hookEvents () { OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.closures [BUTTON_RELEASE_EVENT], false); OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [EVENT_AFTER], 0, display.closures[EVENT_AFTER], false); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); OS.g_signal_connect_closure_by_id (topHandle, display.signalIds [MAP], 0, display.closures [MAP], true); } @@ -946,7 +946,7 @@ public void setDisabledImage (Image image) { */ public void setEnabled (boolean enabled) { checkWidget(); - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); if (gtk_widget_get_sensitive (topHandle) == enabled) return; OS.gtk_widget_set_sensitive (topHandle, enabled); if (enabled) { @@ -980,7 +980,7 @@ boolean setFocus () { return OS.gtk_widget_child_focus (handle, OS.GTK_DIR_TAB_FORWARD); } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { if (labelHandle != 0) OS.gtk_widget_modify_font (labelHandle, font); } @@ -1034,7 +1034,7 @@ public void setImage (Image image) { } else { imageList.put (imageIndex, image); } - int /*long*/ pixbuf = imageList.getPixbuf (imageIndex); + long /*int*/ pixbuf = imageList.getPixbuf (imageIndex); OS.gtk_image_set_from_pixbuf(imageHandle, pixbuf); } else { OS.gtk_image_set_from_pixbuf(imageHandle, 0); @@ -1192,10 +1192,10 @@ public void setToolTipText (String string) { } void setToolTipText (Shell shell, String newString) { - int /*long*/ child = OS.gtk_bin_get_child (handle); + long /*int*/ child = OS.gtk_bin_get_child (handle); if ((style & SWT.DROP_DOWN) != 0) { if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) { - int /*long*/ list = OS.gtk_container_get_children (child); + long /*int*/ list = OS.gtk_container_get_children (child); child = OS.g_list_nth_data (list, 0); } if (arrowHandle != 0) shell.setToolTipText (arrowHandle, newString); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java index 2dd7b19b88..92ec814d9e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java @@ -47,7 +47,7 @@ public class ToolTip extends Widget { String text, message; TrayItem item; int x, y, timerId; - int /*long*/ layoutText = 0, layoutMessage = 0; + long /*int*/ layoutText = 0, layoutMessage = 0; int [] borderPolygon; boolean spikeAbove, autohide; @@ -135,7 +135,7 @@ public void addSelectionListener (SelectionListener listener) { } void configure () { - int /*long*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = OS.gdk_screen_get_default (); OS.gtk_widget_realize (handle); int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (handle)); GdkRectangle dest = new GdkRectangle (); @@ -249,9 +249,9 @@ void configure () { OS.gtk_window_move (handle, Math.min(dest.width - w, x - w + 17), y - h - TIP_HEIGHT); } } - int /*long*/ rgn = OS.gdk_region_polygon (polyline, polyline.length / 2, OS.GDK_EVEN_ODD_RULE); + long /*int*/ rgn = OS.gdk_region_polygon (polyline, polyline.length / 2, OS.GDK_EVEN_ODD_RULE); OS.gtk_widget_realize (handle); - int /*long*/ window = gtk_widget_get_window (handle); + long /*int*/ window = gtk_widget_get_window (handle); OS.gdk_window_shape_combine_region (window, rgn, 0, 0); OS.gdk_region_destroy (rgn); } @@ -297,14 +297,14 @@ void deregister () { super.deregister (); if ((style & SWT.BALLOON) == 0) { if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) { - int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); + long /*int*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); if (tipWindow != 0) display.removeWidget (tipWindow); } } } void destroyWidget () { - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); if (parent != null) parent.removeTooTip (this); releaseHandle (); if (topHandle != 0 && (state & HANDLE) != 0) { @@ -337,7 +337,7 @@ Point getLocation () { int x = this.x; int y = this.y; if (item != null) { - int /*long*/ itemHandle = item.handle; + long /*int*/ itemHandle = item.handle; if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { GdkRectangle area = new GdkRectangle (); OS.gtk_status_icon_get_geometry (itemHandle, 0, area, 0); @@ -345,7 +345,7 @@ Point getLocation () { y = area.y + area.height / 2; } else { OS.gtk_widget_realize (itemHandle); - int /*long*/ window = gtk_widget_get_window (itemHandle); + long /*int*/ window = gtk_widget_get_window (itemHandle); int [] px = new int [1], py = new int [1]; OS.gdk_window_get_origin (window, px, py); GtkAllocation allocation = new GtkAllocation (); @@ -468,25 +468,25 @@ public boolean getVisible () { checkWidget (); if ((style & SWT.BALLOON) != 0) return gtk_widget_get_visible (handle); if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) { - int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); + long /*int*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); return OS.GTK_WIDGET_VISIBLE (tipWindow); } return false; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { sendSelectionEvent (SWT.Selection, null, true); setVisible (false); return 0; } -int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { +long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { if ((state & OBSCURED) != 0) return 0; - int /*long*/ window = gtk_widget_get_window (handle); + long /*int*/ window = gtk_widget_get_window (handle); int x = BORDER + PADDING; int y = BORDER + PADDING; if (OS.USE_CAIRO) { - int /*long*/ cairo = OS.gdk_cairo_create(window); + long /*int*/ cairo = OS.gdk_cairo_create(window); if (cairo == 0) error (SWT.ERROR_NO_HANDLES); int count = borderPolygon.length / 2; if (count == 0) return 0; @@ -507,8 +507,8 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { case SWT.ICON_WARNING: buffer = Converter.wcsToMbcs (null, "gtk-dialog-warning", true); break; } if (buffer != null) { - int /*long*/ style = OS.gtk_widget_get_default_style (); - int /*long*/ pixbuf = OS.gtk_icon_set_render_icon ( + long /*int*/ style = OS.gtk_widget_get_default_style (); + long /*int*/ pixbuf = OS.gtk_icon_set_render_icon ( OS.gtk_icon_factory_lookup_default (buffer), style, OS.GTK_TEXT_DIR_NONE, @@ -540,7 +540,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { Cairo.cairo_destroy(cairo); return 0; } - int /*long*/ gdkGC = OS.gdk_gc_new (window); + long /*int*/ gdkGC = OS.gdk_gc_new (window); OS.gdk_draw_polygon (window, gdkGC, 0, borderPolygon, borderPolygon.length / 2); if (spikeAbove) y += TIP_HEIGHT; if (layoutText != 0) { @@ -552,8 +552,8 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { case SWT.ICON_WARNING: buffer = Converter.wcsToMbcs (null, "gtk-dialog-warning", true); break; } if (buffer != null) { - int /*long*/ style = OS.gtk_widget_get_default_style (); - int /*long*/ pixbuf = OS.gtk_icon_set_render_icon ( + long /*int*/ style = OS.gtk_widget_get_default_style (); + long /*int*/ pixbuf = OS.gtk_icon_set_render_icon ( OS.gtk_icon_factory_lookup_default (buffer), style, OS.GTK_TEXT_DIR_NONE, @@ -583,11 +583,11 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { return 0; } -int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { +long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { Point point = getLocation (); int x = point.x; int y = point.y; - int /*long*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = OS.gdk_screen_get_default (); OS.gtk_widget_realize (widget); int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget)); GdkRectangle dest = new GdkRectangle (); @@ -609,7 +609,7 @@ void hookEvents () { OS.g_signal_connect_closure (handle, OS.button_press_event, display.closures [BUTTON_PRESS_EVENT], false); } else { if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) { - int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); + long /*int*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); if (tipWindow != 0) { OS.g_signal_connect_closure (tipWindow, OS.size_allocate, display.closures [SIZE_ALLOCATE], false); OS.gtk_widget_add_events (tipWindow, OS.GDK_BUTTON_PRESS_MASK); @@ -642,7 +642,7 @@ void register () { super.register (); if ((style & SWT.BALLOON) == 0) { if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) { - int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); + long /*int*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); if (tipWindow != 0) display.addWidget (tipWindow, this); } } @@ -732,7 +732,7 @@ public void setLocation (int x, int y) { if (gtk_widget_get_visible (handle)) configure (); } else { if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) { - int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); + long /*int*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); if (gtk_widget_get_visible (tipWindow)) { OS.gtk_window_move (tipWindow, x, y); } @@ -825,13 +825,13 @@ public void setText (String string) { if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) { OS.pango_layout_set_auto_dir (layoutText, false); } - int /*long*/ boldAttr = OS.pango_attr_weight_new (OS.PANGO_WEIGHT_BOLD); + long /*int*/ boldAttr = OS.pango_attr_weight_new (OS.PANGO_WEIGHT_BOLD); PangoAttribute attribute = new PangoAttribute (); OS.memmove (attribute, boldAttr, PangoAttribute.sizeof); attribute.start_index = 0; attribute.end_index = buffer.length; OS.memmove (boldAttr, attribute, PangoAttribute.sizeof); - int /*long*/ attrList = OS.pango_attr_list_new (); + long /*int*/ attrList = OS.pango_attr_list_new (); OS.pango_attr_list_insert (attrList, boldAttr); OS.pango_layout_set_attributes (layoutText, attrList); OS.pango_attr_list_unref (attrList); @@ -865,7 +865,7 @@ public void setVisible (boolean visible) { configure (); OS.gtk_widget_show (handle); } else { - int /*long*/ vboxHandle = parent.vboxHandle; + long /*int*/ vboxHandle = parent.vboxHandle; StringBuffer string = new StringBuffer (text); if (text.length () > 0) string.append ("\n\n"); string.append (message); @@ -874,7 +874,7 @@ public void setVisible (boolean visible) { OS.gtk_widget_set_tooltip_text(vboxHandle, buffer); } else { OS.gtk_tooltips_set_tip (handle, vboxHandle, buffer, null); - int /*long*/ data = OS.gtk_tooltips_data_get (vboxHandle); + long /*int*/ data = OS.gtk_tooltips_data_get (vboxHandle); OS.GTK_TOOLTIPS_SET_ACTIVE (handle, data); OS.gtk_tooltips_set_tip (handle, vboxHandle, buffer, null); } @@ -884,7 +884,7 @@ public void setVisible (boolean visible) { if ((style & SWT.BALLOON) != 0) { OS.gtk_widget_hide (handle); } else { - int /*long*/ vboxHandle = parent.vboxHandle; + long /*int*/ vboxHandle = parent.vboxHandle; byte[] buffer = Converter.wcsToMbcs(null, "", true); if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) { OS.gtk_widget_set_tooltip_text(vboxHandle, buffer); @@ -895,12 +895,12 @@ public void setVisible (boolean visible) { } } -int /*long*/ timerProc (int /*long*/ widget) { +long /*int*/ timerProc (long /*int*/ widget) { if ((style & SWT.BALLOON) != 0) { OS.gtk_widget_hide (handle); } else { if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) { - int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); + long /*int*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle); OS.gtk_widget_hide (tipWindow); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java index 17f929b3db..8ecf5d5815 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java @@ -42,7 +42,7 @@ import org.eclipse.swt.events.*; public class Tracker extends Widget { Composite parent; Cursor cursor; - int /*long*/ lastCursor, window; + long /*int*/ lastCursor, window; boolean tracking, cancelled, grabbed, stippled; Rectangle [] rectangles = new Rectangle [0], proportions = rectangles; Rectangle bounds; @@ -306,15 +306,15 @@ Rectangle [] computeProportions (Rectangle [] rects) { } void drawRectangles (Rectangle [] rects) { - int /*long*/ window = OS.gdk_get_default_root_window(); + long /*int*/ window = OS.gdk_get_default_root_window(); if (parent != null) { window = gtk_widget_get_window (parent.paintHandle()); } if (window == 0) return; //TODO: Use Cairo - int /*long*/ gc = OS.gdk_gc_new (window); + long /*int*/ gc = OS.gdk_gc_new (window); if (gc == 0) return; - int /*long*/ colormap = OS.gdk_colormap_get_system (); + long /*int*/ colormap = OS.gdk_colormap_get_system (); GdkColor color = new GdkColor (); OS.gdk_color_white (colormap, color); OS.gdk_gc_set_foreground (gc, color); @@ -367,17 +367,17 @@ public boolean getStippled () { } boolean grab () { - int /*long*/ cursor = this.cursor != null ? this.cursor.handle : 0; + long /*int*/ cursor = this.cursor != null ? this.cursor.handle : 0; int result = gdk_pointer_grab (window, OS.GDK_OWNERSHIP_NONE, false, OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK, window, cursor, OS.GDK_CURRENT_TIME); return result == OS.GDK_GRAB_SUCCESS; } -int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) { return gtk_mouse (OS.GDK_BUTTON_RELEASE, widget, event); } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { - int /*long*/ result = super.gtk_key_press_event (widget, eventPtr); +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { + long /*int*/ result = super.gtk_key_press_event (widget, eventPtr); if (result != 0) return result; GdkEventKey keyEvent = new GdkEventKey (); OS.memmove (keyEvent, eventPtr, GdkEventKey.sizeof); @@ -511,8 +511,8 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { return result; } -int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr) { - int /*long*/ cursor = this.cursor != null ? this.cursor.handle : 0; +long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ eventPtr) { + long /*int*/ cursor = this.cursor != null ? this.cursor.handle : 0; if (cursor != lastCursor) { ungrab (); grabbed = grab (); @@ -521,7 +521,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr return gtk_mouse (OS.GDK_MOTION_NOTIFY, widget, eventPtr); } -int /*long*/ gtk_mouse (int eventType, int /*long*/ widget, int /*long*/ eventPtr) { +long /*int*/ gtk_mouse (int eventType, long /*int*/ widget, long /*int*/ eventPtr) { int [] newX = new int [1], newY = new int [1]; OS.gdk_window_get_pointer (window, newX, newY, null); if (oldX != newX [0] || oldY != newY [0]) { @@ -712,7 +712,7 @@ public boolean open () { Display display = this.display; while (tracking) { if (parent != null && parent.isDisposed ()) break; - int /*long*/ eventPtr; + long /*int*/ eventPtr; while (true) { display.runSkin (); display.runDeferredLayouts (); @@ -725,7 +725,7 @@ public boolean open () { } } OS.memmove (gdkEvent, eventPtr, GdkEvent.sizeof); - int /*long*/ widget = OS.gtk_get_event_widget (eventPtr); + long /*int*/ widget = OS.gtk_get_event_widget (eventPtr); switch (gdkEvent.type) { case OS.GDK_MOTION_NOTIFY: gtk_motion_notify_event (widget, eventPtr); break; case OS.GDK_BUTTON_RELEASE: gtk_button_release_event (widget, eventPtr); break; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java index 917575298b..2b28c146b5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java @@ -40,8 +40,8 @@ public class TrayItem extends Item { Tray parent; ToolTip toolTip; String toolTipText; - int /*long*/ imageHandle; - int /*long*/ tooltipsHandle; + long /*int*/ imageHandle; + long /*int*/ tooltipsHandle; ImageList imageList; Image highlightImage; @@ -165,20 +165,20 @@ void createHandle (int index) { OS.gtk_container_add (handle, imageHandle); OS.gtk_widget_show (handle); OS.gtk_widget_show (imageHandle); - int /*long*/ id = OS.gtk_plug_get_id (handle); + long /*int*/ id = OS.gtk_plug_get_id (handle); int monitor = 0; - int /*long*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = OS.gdk_screen_get_default (); if (screen != 0) { monitor = OS.gdk_screen_get_number (screen); } byte [] trayBuffer = Converter.wcsToMbcs (null, "_NET_SYSTEM_TRAY_S" + monitor, true); - int /*long*/ trayAtom = OS.gdk_atom_intern (trayBuffer, true); - int /*long*/ xTrayAtom = OS.gdk_x11_atom_to_xatom (trayAtom); - int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - int /*long*/ trayWindow = OS.XGetSelectionOwner (xDisplay, xTrayAtom); + long /*int*/ trayAtom = OS.gdk_atom_intern (trayBuffer, true); + long /*int*/ xTrayAtom = OS.gdk_x11_atom_to_xatom (trayAtom); + long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ trayWindow = OS.XGetSelectionOwner (xDisplay, xTrayAtom); byte [] messageBuffer = Converter.wcsToMbcs (null, "_NET_SYSTEM_TRAY_OPCODE", true); - int /*long*/ messageAtom = OS.gdk_atom_intern (messageBuffer, true); - int /*long*/ xMessageAtom = OS.gdk_x11_atom_to_xatom (messageAtom); + long /*int*/ messageAtom = OS.gdk_atom_intern (messageBuffer, true); + long /*int*/ xMessageAtom = OS.gdk_x11_atom_to_xatom (messageAtom); XClientMessageEvent event = new XClientMessageEvent (); event.type = OS.ClientMessage; event.window = trayWindow; @@ -187,7 +187,7 @@ void createHandle (int index) { event.data [0] = OS.GDK_CURRENT_TIME; event.data [1] = OS.SYSTEM_TRAY_REQUEST_DOCK; event.data [2] = id; - int /*long*/ clientEvent = OS.g_malloc (XClientMessageEvent.sizeof); + long /*int*/ clientEvent = OS.g_malloc (XClientMessageEvent.sizeof); OS.memmove (clientEvent, event, XClientMessageEvent.sizeof); OS.XSendEvent (xDisplay, trayWindow, false, OS.NoEventMask, clientEvent); OS.g_free (clientEvent); @@ -273,7 +273,7 @@ public String getToolTipText () { return toolTipText; } -int /*long*/ gtk_activate (int /*long*/ widget) { +long /*int*/ gtk_activate (long /*int*/ widget) { sendSelectionEvent (SWT.Selection); /* * Feature in GTK. GTK will generate a single-click event before sending @@ -281,10 +281,10 @@ int /*long*/ gtk_activate (int /*long*/ widget) { * the single-click as the current event and for the double-click in the * event queue. */ - int /*long*/ nextEvent = OS.gdk_event_peek (); + long /*int*/ nextEvent = OS.gdk_event_peek (); if (nextEvent != 0) { int nextEventType = OS.GDK_EVENT_TYPE (nextEvent); - int /*long*/ currEvent = OS.gtk_get_current_event (); + long /*int*/ currEvent = OS.gtk_get_current_event (); int currEventType = 0; if (currEvent != 0) { currEventType = OS.GDK_EVENT_TYPE (currEvent); @@ -298,7 +298,7 @@ int /*long*/ gtk_activate (int /*long*/ widget) { return 0; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ eventPtr) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); if (gdkEvent.type == OS.GDK_3BUTTON_PRESS) return 0; @@ -314,7 +314,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr) return 0; } -int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { +long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { if (image != null && image.mask != 0) { if (OS.gdk_drawable_get_depth (image.mask) == 1) { GtkAllocation widgetAllocation = new GtkAllocation (); @@ -322,7 +322,7 @@ int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { int xoffset = (int) Math.floor (widgetAllocation.x + ((widgetAllocation.width -OS.GTK_WIDGET_REQUISITION_WIDTH (widget)) * 0.5) + 0.5); int yoffset = (int) Math.floor (widgetAllocation.y + ((widgetAllocation.height - OS.GTK_WIDGET_REQUISITION_HEIGHT (widget)) * 0.5) + 0.5); Rectangle b = image.getBounds(); - int /*long*/ gdkImagePtr = OS.gdk_drawable_get_image (image.mask, 0, 0, b.width, b.height); + long /*int*/ gdkImagePtr = OS.gdk_drawable_get_image (image.mask, 0, 0, b.width, b.height); if (gdkImagePtr == 0) error(SWT.ERROR_NO_HANDLES); GdkImage gdkImage = new GdkImage(); OS.memmove (gdkImage, gdkImagePtr); @@ -341,7 +341,7 @@ int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { } } OS.gtk_widget_realize (handle); - int /*long*/ window = gtk_widget_get_window (handle); + long /*int*/ window = gtk_widget_get_window (handle); OS.gdk_window_shape_combine_region (window, region.handle, 0, 0); region.dispose (); } @@ -349,7 +349,7 @@ int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { return 0; } -int /*long*/ gtk_status_icon_popup_menu (int /*long*/ widget, int /*long*/ button, int /*long*/ activate_time) { +long /*int*/ gtk_status_icon_popup_menu (long /*int*/ widget, long /*int*/ button, long /*int*/ activate_time) { /* * GTK provides a MenuPositionFunc for GtkStatusIcon in order * to set the popup-menu aligned to the tray. @@ -519,7 +519,7 @@ public void setImage (Image image) { } else { imageList.put (imageIndex, image); } - int /*long*/ pixbuf = imageList.getPixbuf (imageIndex); + long /*int*/ pixbuf = imageList.getPixbuf (imageIndex); if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { OS.gtk_status_icon_set_from_pixbuf (handle, pixbuf); OS.gtk_status_icon_set_visible (handle, true); 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 c8f04a5751..e38fe42eba 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 @@ -75,9 +75,9 @@ import org.eclipse.swt.events.*; * @noextend This class is not intended to be subclassed by clients. */ public class Tree extends Composite { - int /*long*/ modelHandle, checkRenderer; + long /*int*/ modelHandle, checkRenderer; int columnCount, sortDirection; - int /*long*/ ignoreCell; + long /*int*/ ignoreCell; TreeItem[] items; TreeColumn [] columns; TreeColumn sortColumn; @@ -155,14 +155,14 @@ void _addListener (int eventType, Listener listener) { } } -TreeItem _getItem (int /*long*/ iter) { +TreeItem _getItem (long /*int*/ iter) { int id = getId (iter, true); if (items [id] != null) return items [id]; - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); int depth = OS.gtk_tree_path_get_depth (path); int [] indices = new int [depth]; OS.memmove (indices, OS.gtk_tree_path_get_indices (path), 4*depth); - int /*long*/ parentIter = 0; + long /*int*/ parentIter = 0; if (depth > 1) { OS.gtk_tree_path_up (path); parentIter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); @@ -174,8 +174,8 @@ TreeItem _getItem (int /*long*/ iter) { return items [id]; } -TreeItem _getItem (int /*long*/ parentIter, int index) { - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); +TreeItem _getItem (long /*int*/ parentIter, int index) { + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child(modelHandle, iter, parentIter, index); int id = getId (iter, true); OS.g_free (iter); @@ -183,7 +183,7 @@ TreeItem _getItem (int /*long*/ parentIter, int index) { return items [id] = new TreeItem (this, parentIter, SWT.NONE, index, false); } -int getId (int /*long*/ iter, boolean queryModel) { +int getId (long /*int*/ iter, boolean queryModel) { if (queryModel) { int[] value = new int[1]; OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, value, -1); @@ -219,7 +219,7 @@ static int checkStyle (int style) { return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0); } -int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*long*/ tree_model, int /*long*/ iter, int /*long*/ data) { +long /*int*/ cellDataProc (long /*int*/ tree_column, long /*int*/ cell, long /*int*/ tree_model, long /*int*/ iter, long /*int*/ data) { if (cell == ignoreCell) return 0; TreeItem item = _getItem (iter); if (item != null) OS.g_object_set_qdata (cell, Display.SWT_OBJECT_INDEX2, item.handle); @@ -245,7 +245,7 @@ int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*lo setData = checkData (item); } } - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; if (setData) { if (isPixbuf) { ptr [0] = 0; @@ -381,7 +381,7 @@ public void addTreeListener(TreeListener listener) { addListener (SWT.Collapse, typedListener); } -int calculateWidth (int /*long*/ column, int /*long*/ iter, boolean recurse) { +int calculateWidth (long /*int*/ column, long /*int*/ iter, boolean recurse) { OS.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false); /* * Bug in GTK. The width calculated by gtk_tree_view_column_cell_get_size() @@ -395,7 +395,7 @@ int calculateWidth (int /*long*/ column, int /*long*/ iter, boolean recurse) { int width = 0; int [] w = new int [1]; - int /*long*/ path = 0; + long /*int*/ path = 0; if (OS.gtk_tree_view_get_expander_column (handle) == column) { /* indent */ @@ -410,16 +410,16 @@ int calculateWidth (int /*long*/ column, int /*long*/ iter, boolean recurse) { } OS.gtk_widget_style_get(handle, OS.focus_line_width, w, 0); width += 2 * w [0]; - int /*long*/ list = 0; + long /*int*/ list = 0; if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) { list = OS.gtk_cell_layout_get_cells(column); } else { list = OS.gtk_tree_view_column_get_cell_renderers (column); } if (list == 0) return 0; - int /*long*/ temp = list; + long /*int*/ temp = list; while (temp != 0) { - int /*long*/ renderer = OS.g_list_data (temp); + long /*int*/ renderer = OS.g_list_data (temp); if (renderer != 0) { OS.gtk_cell_renderer_get_size (renderer, handle, null, null, null, w, null); width += w [0]; @@ -432,7 +432,7 @@ int calculateWidth (int /*long*/ column, int /*long*/ iter, boolean recurse) { if (path == 0) path = OS.gtk_tree_model_get_path (modelHandle, iter); boolean expanded = OS.gtk_tree_view_row_expanded (handle, path); if (expanded) { - int /*long*/ childIter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ childIter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); boolean valid = OS.gtk_tree_model_iter_children (modelHandle, childIter, iter); while (valid) { width = Math.max (width, calculateWidth (column, childIter, true)); @@ -478,8 +478,8 @@ public void clear(int index, boolean all) { clear (0, index, all); } -void clear (int /*long*/ parentIter, int index, boolean all) { - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); +void clear (long /*int*/ parentIter, int index, boolean all) { + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child(modelHandle, iter, parentIter, index); int[] value = new int[1]; OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, value, -1); @@ -514,10 +514,10 @@ public void clearAll (boolean all) { checkWidget (); clearAll (all, 0); } -void clearAll (boolean all, int /*long*/ parentIter) { +void clearAll (boolean all, long /*int*/ parentIter) { int length = OS.gtk_tree_model_iter_n_children (modelHandle, parentIter); if (length == 0) return; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); boolean valid = OS.gtk_tree_model_iter_children (modelHandle, iter, parentIter); int[] value = new int[1]; while (valid) { @@ -545,15 +545,15 @@ public Point computeSize (int wHint, int hHint, boolean changed) { return size; } -void copyModel (int /*long*/ oldModel, int oldStart, int /*long*/ newModel, int newStart, int /*long*/ [] types, int /*long*/ oldParent, int /*long*/ newParent, int modelLength) { - int /*long*/ iter = OS.g_malloc(OS.GtkTreeIter_sizeof ()); +void copyModel (long /*int*/ oldModel, int oldStart, long /*int*/ newModel, int newStart, long /*int*/ [] types, long /*int*/ oldParent, long /*int*/ newParent, int modelLength) { + long /*int*/ iter = OS.g_malloc(OS.GtkTreeIter_sizeof ()); if (OS.gtk_tree_model_iter_children (oldModel, iter, oldParent)) { - int /*long*/ [] oldItems = new int /*long*/ [OS.gtk_tree_model_iter_n_children (oldModel, oldParent)]; + long /*int*/ [] oldItems = new long /*int*/ [OS.gtk_tree_model_iter_n_children (oldModel, oldParent)]; int oldIndex = 0; - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int [] ptr1 = new int [1]; do { - int /*long*/ newItem = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ newItem = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (newItem == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_tree_store_append (newModel, newItem, newParent); OS.gtk_tree_model_get (oldModel, iter, ID_COLUMN, ptr1, -1); @@ -562,7 +562,7 @@ void copyModel (int /*long*/ oldModel, int oldStart, int /*long*/ newModel, int if (index != -1) { item = items [index]; if (item != null) { - int /*long*/ oldItem = item.handle; + long /*int*/ oldItem = item.handle; oldItems[oldIndex++] = oldItem; /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */ for (int j = 0; j < FOREGROUND_COLUMN; j++) { @@ -614,7 +614,7 @@ void copyModel (int /*long*/ oldModel, int oldStart, int /*long*/ newModel, int } } while (OS.gtk_tree_model_iter_next(oldModel, iter)); for (int i = 0; i < oldItems.length; i++) { - int /*long*/ oldItem = oldItems [i]; + long /*int*/ oldItem = oldItems [i]; if (oldItem != 0) { OS.gtk_tree_store_remove (oldModel, oldItem); OS.g_free (oldItem); @@ -647,16 +647,16 @@ void createColumn (TreeColumn column, int index) { modelIndex++; } if (modelIndex == modelLength) { - int /*long*/ oldModel = modelHandle; - int /*long*/[] types = getColumnTypes (columnCount + 4); // grow by 4 rows at a time - int /*long*/ newModel = OS.gtk_tree_store_newv (types.length, types); + long /*int*/ oldModel = modelHandle; + long /*int*/[] types = getColumnTypes (columnCount + 4); // grow by 4 rows at a time + long /*int*/ newModel = OS.gtk_tree_store_newv (types.length, types); if (newModel == 0) error (SWT.ERROR_NO_HANDLES); - copyModel (oldModel, FIRST_COLUMN, newModel, FIRST_COLUMN, types, (int /*long*/)0, (int /*long*/)0, modelLength); + copyModel (oldModel, FIRST_COLUMN, newModel, FIRST_COLUMN, types, (long /*int*/)0, (long /*int*/)0, modelLength); OS.gtk_tree_view_set_model (handle, newModel); setModel (newModel); } } - int /*long*/ columnHandle = OS.gtk_tree_view_column_new (); + long /*int*/ columnHandle = OS.gtk_tree_view_column_new (); if (columnHandle == 0) error (SWT.ERROR_NO_HANDLES); if (index == 0 && columnCount > 0) { TreeColumn checkColumn = columns [0]; @@ -707,7 +707,7 @@ void createHandle (int index) { gtk_widget_set_has_window (fixedHandle, true); scrolledHandle = OS.gtk_scrolled_window_new (0, 0); if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ [] types = getColumnTypes (1); + long /*int*/ [] types = getColumnTypes (1); modelHandle = OS.gtk_tree_store_newv (types.length, types); if (modelHandle == 0) error (SWT.ERROR_NO_HANDLES); handle = OS.gtk_tree_view_new_with_model (modelHandle); @@ -722,7 +722,7 @@ void createHandle (int index) { OS.gtk_container_add (scrolledHandle, handle); int mode = (style & SWT.MULTI) != 0 ? OS.GTK_SELECTION_MULTIPLE : OS.GTK_SELECTION_BROWSE; - int /*long*/ selectionHandle = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selectionHandle = OS.gtk_tree_view_get_selection (handle); OS.gtk_tree_selection_set_mode (selectionHandle, mode); OS.gtk_tree_view_set_headers_visible (handle, false); int hsp = (style & SWT.H_SCROLL) != 0 ? OS.GTK_POLICY_AUTOMATIC : OS.GTK_POLICY_NEVER; @@ -769,11 +769,11 @@ void createItem (TreeColumn column, int index) { } else { createColumn (column, index); } - int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 3); + long /*int*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 3); if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null); + long /*int*/ labelHandle = OS.gtk_label_new_with_mnemonic (null); if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ imageHandle = OS.gtk_image_new (); + long /*int*/ imageHandle = OS.gtk_image_new (); if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (boxHandle, imageHandle); OS.gtk_container_add (boxHandle, labelHandle); @@ -782,7 +782,7 @@ void createItem (TreeColumn column, int index) { column.labelHandle = labelHandle; column.imageHandle = imageHandle; OS.gtk_tree_view_column_set_widget (column.handle, boxHandle); - int /*long*/ widget = OS.gtk_widget_get_parent (boxHandle); + long /*int*/ widget = OS.gtk_widget_get_parent (boxHandle); while (widget != handle) { if (OS.GTK_IS_BUTTON (widget)) { column.buttonHandle = widget; @@ -816,7 +816,7 @@ void createItem (TreeColumn column, int index) { } } -void createItem (TreeItem item, int /*long*/ parentIter, int index) { +void createItem (TreeItem item, long /*int*/ parentIter, int index) { int count = OS.gtk_tree_model_iter_n_children (modelHandle, parentIter); if (index == -1) index = count; if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE); @@ -836,7 +836,7 @@ void createItem (TreeItem item, int /*long*/ parentIter, int index) { modelChanged = true; } -void createRenderers (int /*long*/ columnHandle, int modelIndex, boolean check, int columnStyle) { +void createRenderers (long /*int*/ columnHandle, int modelIndex, boolean check, int columnStyle) { OS.gtk_tree_view_column_clear (columnHandle); if ((style & SWT.CHECK) != 0 && check) { OS.gtk_tree_view_column_pack_start (columnHandle, checkRenderer, false); @@ -848,9 +848,9 @@ void createRenderers (int /*long*/ columnHandle, int modelIndex, boolean check, OS.g_object_set_qdata (checkRenderer, Display.SWT_OBJECT_INDEX1, columnHandle); } } - int /*long*/ pixbufRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_pixbuf_get_type (), 0) : OS.gtk_cell_renderer_pixbuf_new (); + long /*int*/ pixbufRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_pixbuf_get_type (), 0) : OS.gtk_cell_renderer_pixbuf_new (); if (pixbufRenderer == 0) error (SWT.ERROR_NO_HANDLES); - int /*long*/ textRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_text_get_type (), 0) : OS.gtk_cell_renderer_text_new (); + long /*int*/ textRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_text_get_type (), 0) : OS.gtk_cell_renderer_text_new (); if (textRenderer == 0) error (SWT.ERROR_NO_HANDLES); if (ownerDraw) { @@ -954,7 +954,7 @@ public void deselect (TreeItem item) { if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_selection_unselect_iter (selection, item.handle); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -972,7 +972,7 @@ public void deselect (TreeItem item) { public void deselectAll() { checkWidget(); boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_selection_unselect_all (selection); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -986,7 +986,7 @@ void destroyItem (TreeColumn column) { index++; } if (index == columnCount) return; - int /*long*/ columnHandle = column.handle; + long /*int*/ columnHandle = column.handle; if (columnCount == 1) { firstCustomDraw = column.customDraw; } @@ -994,11 +994,11 @@ void destroyItem (TreeColumn column) { columns [columnCount] = null; OS.gtk_tree_view_remove_column (handle, columnHandle); if (columnCount == 0) { - int /*long*/ oldModel = modelHandle; - int /*long*/[] types = getColumnTypes (1); - int /*long*/ newModel = OS.gtk_tree_store_newv (types.length, types); + long /*int*/ oldModel = modelHandle; + long /*int*/[] types = getColumnTypes (1); + long /*int*/ newModel = OS.gtk_tree_store_newv (types.length, types); if (newModel == 0) error (SWT.ERROR_NO_HANDLES); - copyModel(oldModel, column.modelIndex, newModel, FIRST_COLUMN, types, (int /*long*/)0, (int /*long*/)0, FIRST_COLUMN + CELL_TYPES); + copyModel(oldModel, column.modelIndex, newModel, FIRST_COLUMN, types, (long /*int*/)0, (long /*int*/)0, FIRST_COLUMN + CELL_TYPES); OS.gtk_tree_view_set_model (handle, newModel); setModel (newModel); createColumn (null, 0); @@ -1006,13 +1006,13 @@ void destroyItem (TreeColumn column) { for (int i=0; i<items.length; i++) { TreeItem item = items [i]; if (item != null) { - int /*long*/ iter = item.handle; + long /*int*/ iter = item.handle; int modelIndex = column.modelIndex; - OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, (int /*long*/)0, -1); - OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_TEXT, (int /*long*/)0, -1); - OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (int /*long*/)0, -1); - OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (int /*long*/)0, -1); - OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FONT, (int /*long*/)0, -1); + OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, (long /*int*/)0, -1); + OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_TEXT, (long /*int*/)0, -1); + OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (long /*int*/)0, -1); + OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (long /*int*/)0, -1); + OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FONT, (long /*int*/)0, -1); Font [] cellFont = item.cellFont; if (cellFont != null) { @@ -1060,7 +1060,7 @@ void destroyItem (TreeColumn column) { void destroyItem (TreeItem item) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_store_remove (modelHandle, item.handle); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -1070,10 +1070,10 @@ void destroyItem (TreeItem item) { boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean [] consume) { boolean selected = false; if (filter) { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; if (OS.gtk_tree_view_get_path_at_pos (handle, x, y, path, null, null, null)) { if (path [0] != 0) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); if (OS.gtk_tree_selection_path_is_selected (selection, path [0])) selected = true; OS.gtk_tree_path_free (path [0]); } @@ -1086,7 +1086,7 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean return dragDetect; } -int /*long*/ eventWindow () { +long /*int*/ eventWindow () { return paintWindow (); } @@ -1124,13 +1124,13 @@ public Rectangle getClientArea () { checkWidget (); forceResize (); OS.gtk_widget_realize (handle); - int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle); - int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle); + long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle); + long /*int*/ binWindow = OS.gtk_tree_view_get_bin_window (handle); int [] binX = new int [1], binY = new int [1]; OS.gdk_window_get_origin (binWindow, binX, binY); int [] fixedX = new int [1], fixedY = new int [1]; OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY); - int /*long*/ clientHandle = clientHandle (); + long /*int*/ clientHandle = clientHandle (); GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (clientHandle, allocation); int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; @@ -1232,13 +1232,13 @@ public int getColumnCount () { public int [] getColumnOrder () { checkWidget (); if (columnCount == 0) return new int [0]; - int /*long*/ list = OS.gtk_tree_view_get_columns (handle); + long /*int*/ list = OS.gtk_tree_view_get_columns (handle); if (list == 0) return new int [0]; int i = 0, count = OS.g_list_length (list); int [] order = new int [count]; - int /*long*/ temp = list; + long /*int*/ temp = list; while (temp != 0) { - int /*long*/ column = OS.g_list_data (temp); + long /*int*/ column = OS.g_list_data (temp); if (column != 0) { for (int j=0; j<columnCount; j++) { if (columns [j].handle == column) { @@ -1253,8 +1253,8 @@ public int [] getColumnOrder () { return order; } -int /*long*/[] getColumnTypes (int columnCount) { - int /*long*/[] types = new int /*long*/ [FIRST_COLUMN + (columnCount * CELL_TYPES)]; +long /*int*/[] getColumnTypes (int columnCount) { + long /*int*/[] types = new long /*int*/ [FIRST_COLUMN + (columnCount * CELL_TYPES)]; // per row data types [ID_COLUMN] = OS.G_TYPE_INT (); types [CHECKED_COLUMN] = OS.G_TYPE_BOOLEAN (); @@ -1310,11 +1310,11 @@ public TreeColumn [] getColumns () { } TreeItem getFocusItem () { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_tree_view_get_cursor (handle, path, null); if (path [0] == 0) return null; TreeItem item = null; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (OS.gtk_tree_model_get_iter (modelHandle, iter, path [0])) { int [] index = new int [1]; OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, index, -1); @@ -1365,7 +1365,7 @@ public int getHeaderHeight () { GtkRequisition requisition = new GtkRequisition (); int height = 0; for (int i=0; i<columnCount; i++) { - int /*long*/ buttonHandle = columns [i].buttonHandle; + long /*int*/ buttonHandle = columns [i].buttonHandle; if (buttonHandle != 0) { OS.gtk_widget_size_request (buttonHandle, requisition); height = Math.max (height, requisition.height); @@ -1374,8 +1374,8 @@ public int getHeaderHeight () { return height; } OS.gtk_widget_realize (handle); - int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle); - int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle); + long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle); + long /*int*/ binWindow = OS.gtk_tree_view_get_bin_window (handle); int [] binY = new int [1]; OS.gdk_window_get_origin (binWindow, null, binY); int [] fixedY = new int [1]; @@ -1458,16 +1458,16 @@ public TreeItem getItem (int index) { public TreeItem getItem (Point point) { checkWidget (); if (point == null) error (SWT.ERROR_NULL_ARGUMENT); - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_widget_realize (handle); int x = point.x; int y = point.y; if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - x; - int /*long*/ [] columnHandle = new int /*long*/ [1]; + long /*int*/ [] columnHandle = new long /*int*/ [1]; if (!OS.gtk_tree_view_get_path_at_pos (handle, x, y, path, columnHandle, null, null)) return null; if (path [0] == 0) return null; TreeItem item = null; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (OS.gtk_tree_model_get_iter (modelHandle, iter, path [0])) { boolean overExpander = false; if (OS.gtk_tree_view_get_expander_column (handle) == columnHandle [0]) { @@ -1527,7 +1527,7 @@ public int getItemHeight () { checkWidget (); int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, 0); if (itemCount == 0) { - int /*long*/ column = OS.gtk_tree_view_get_column (handle, 0); + long /*int*/ column = OS.gtk_tree_view_get_column (handle, 0); int [] w = new int [1], h = new int [1]; ignoreSize = true; OS.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h); @@ -1535,11 +1535,11 @@ public int getItemHeight () { return h [0]; } else { int height = 0; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_get_iter_first (modelHandle, iter); int columnCount = Math.max (1, this.columnCount); for (int i=0; i<columnCount; i++) { - int /*long*/ column = OS.gtk_tree_view_get_column (handle, i); + long /*int*/ column = OS.gtk_tree_view_get_column (handle, i); OS.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false); int [] w = new int [1], h = new int [1]; OS.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h); @@ -1572,7 +1572,7 @@ public TreeItem [] getItems () { return getItems (0); } -TreeItem [] getItems (int /*long*/ parent) { +TreeItem [] getItems (long /*int*/ parent) { int length = OS.gtk_tree_model_iter_n_children (modelHandle, parent); TreeItem[] result = new TreeItem [length]; if (length == 0) return result; @@ -1583,7 +1583,7 @@ TreeItem [] getItems (int /*long*/ parent) { } else { int i = 0; int[] index = new int [1]; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); boolean valid = OS.gtk_tree_model_iter_children (modelHandle, iter, parent); while (valid) { OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, index, -1); @@ -1637,8 +1637,8 @@ public TreeItem getParentItem () { return null; } -int /*long*/ getPixbufRenderer (int /*long*/ column) { - int /*long*/ list = 0; +long /*int*/ getPixbufRenderer (long /*int*/ column) { + long /*int*/ list = 0; if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) { list = OS.gtk_cell_layout_get_cells(column); } else { @@ -1646,10 +1646,10 @@ int /*long*/ getPixbufRenderer (int /*long*/ column) { } if (list == 0) return 0; int count = OS.g_list_length (list); - int /*long*/ pixbufRenderer = 0; + long /*int*/ pixbufRenderer = 0; int i = 0; while (i < count) { - int /*long*/ renderer = OS.g_list_nth_data (list, i); + long /*int*/ renderer = OS.g_list_nth_data (list, i); if (OS.GTK_IS_CELL_RENDERER_PIXBUF (renderer)) { pixbufRenderer = renderer; break; @@ -1678,15 +1678,15 @@ int /*long*/ getPixbufRenderer (int /*long*/ column) { */ public TreeItem[] getSelection () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); - int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null); if (list != 0) { int count = OS.g_list_length (list); TreeItem [] treeSelection = new TreeItem [count]; int length = 0; for (int i=0; i<count; i++) { - int /*long*/ data = OS.g_list_nth_data (list, i); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ data = OS.g_list_nth_data (list, i); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (OS.gtk_tree_model_get_iter (modelHandle, iter, data)) { treeSelection [length] = _getItem (iter); length++; @@ -1717,7 +1717,7 @@ public TreeItem[] getSelection () { */ public int getSelectionCount () { checkWidget(); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); return OS.gtk_tree_selection_count_selected_rows (selection); } @@ -1763,8 +1763,8 @@ public int getSortDirection () { return sortDirection; } -int /*long*/ getTextRenderer (int /*long*/ column) { - int /*long*/ list = 0; +long /*int*/ getTextRenderer (long /*int*/ column) { + long /*int*/ list = 0; if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) { list = OS.gtk_cell_layout_get_cells(column); } else { @@ -1772,10 +1772,10 @@ int /*long*/ getTextRenderer (int /*long*/ column) { } if (list == 0) return 0; int count = OS.g_list_length (list); - int /*long*/ textRenderer = 0; + long /*int*/ textRenderer = 0; int i = 0; while (i < count) { - int /*long*/ renderer = OS.g_list_nth_data (list, i); + long /*int*/ renderer = OS.g_list_nth_data (list, i); if (OS.GTK_IS_CELL_RENDERER_TEXT (renderer)) { textRenderer = renderer; break; @@ -1802,12 +1802,12 @@ int /*long*/ getTextRenderer (int /*long*/ column) { */ public TreeItem getTopItem () { checkWidget (); - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_widget_realize (handle); if (!OS.gtk_tree_view_get_path_at_pos (handle, 1, 1, path, null, null, null)) return null; if (path [0] == 0) return null; TreeItem item = null; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof()); if (OS.gtk_tree_model_get_iter (modelHandle, iter, path [0])) { item = _getItem (iter); } @@ -1816,11 +1816,11 @@ public TreeItem getTopItem () { return item; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); if (gdkEvent.window != OS.gtk_tree_view_get_bin_window (handle)) return 0; - int /*long*/ result = super.gtk_button_press_event (widget, event); + long /*int*/ result = super.gtk_button_press_event (widget, event); if (result != 0) return result; /* * Feature in GTK. In a multi-select tree view, when multiple items are already @@ -1832,10 +1832,10 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { */ int button = gdkEvent.button; if (button == 3 && gdkEvent.type == OS.GDK_BUTTON_PRESS) { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; if (OS.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null)) { if (path [0] != 0) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); if (OS.gtk_tree_selection_path_is_selected (selection, path [0])) result = 1; OS.gtk_tree_path_free (path [0]); } @@ -1850,10 +1850,10 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { * widget from automatically selecting the first item. */ if ((style & SWT.SINGLE) != 0 && getSelectionCount () == 0) { - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; if (OS.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null)) { if (path [0] != 0) { - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_view_set_cursor (handle, path [0], 0, false); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -1873,13 +1873,13 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { return result; } -int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ window = OS.GDK_EVENT_WINDOW (event); +long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ window = OS.GDK_EVENT_WINDOW (event); if (window != OS.gtk_tree_view_get_bin_window (handle)) return 0; return super.gtk_button_release_event (widget, event); } -int /*long*/ gtk_changed (int /*long*/ widget) { +long /*int*/ gtk_changed (long /*int*/ widget) { TreeItem item = getFocusItem (); if (item != null) { Event event = new Event (); @@ -1889,7 +1889,7 @@ int /*long*/ gtk_changed (int /*long*/ widget) { return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { switch (OS.GDK_EVENT_TYPE (gdkEvent)) { case OS.GDK_EXPOSE: { /* @@ -1908,32 +1908,32 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { return super.gtk_event_after (widget, gdkEvent); } -int /*long*/ gtk_expand_collapse_cursor_row (int /*long*/ widget, int /*long*/ logical, int /*long*/ expand, int /*long*/ open_all) { +long /*int*/ gtk_expand_collapse_cursor_row (long /*int*/ widget, long /*int*/ logical, long /*int*/ expand, long /*int*/ open_all) { // FIXME - this flag is never cleared. It should be cleared when the expand all operation completes. if (expand != 0 && open_all != 0) expandAll = true; return 0; } -int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { +long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { if ((state & OBSCURED) != 0) return 0; if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) { Control control = findBackgroundControl (); if (control != null) { GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove (gdkEvent, eventPtr, GdkEventExpose.sizeof); - int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle); + long /*int*/ window = OS.gtk_tree_view_get_bin_window (handle); if (window == gdkEvent.window) { int [] width = new int [1], height = new int [1]; gdk_window_get_size (window, width, height); - int /*long*/ parent = 0; + long /*int*/ parent = 0; int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, parent); GdkRectangle rect = new GdkRectangle (); boolean expanded = true; while (itemCount != 0 && expanded && height [0] > (rect.y + rect.height)) { - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, parent, itemCount - 1); itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, iter); - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_get_cell_area (handle, path, 0, rect); expanded = OS.gtk_tree_view_row_expanded (handle, path); OS.gtk_tree_path_free (path); @@ -1950,14 +1950,14 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) { return super.gtk_expose_event (widget, eventPtr); } -int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { - int /*long*/ window = OS.GDK_EVENT_WINDOW (event); +long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { + long /*int*/ window = OS.GDK_EVENT_WINDOW (event); if (window != OS.gtk_tree_view_get_bin_window (handle)) return 0; return super.gtk_motion_notify_event (widget, event); } -int /*long*/ gtk_popup_menu (int /*long*/ widget) { - int /*long*/ result = super.gtk_popup_menu (widget); +long /*int*/ gtk_popup_menu (long /*int*/ widget) { + long /*int*/ result = super.gtk_popup_menu (widget); /* * Bug in GTK. The context menu for the typeahead in GtkTreeViewer * opens in the bottom right corner of the screen when Shift+F10 @@ -1970,10 +1970,10 @@ int /*long*/ gtk_popup_menu (int /*long*/ widget) { return OS.GTK_VERSION < OS.VERSION (2, 6, 5) ? 1 : result; } -int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long*/ column) { +long /*int*/ gtk_row_activated (long /*int*/ tree, long /*int*/ path, long /*int*/ column) { if (path == 0) return 0; TreeItem item = null; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (OS.gtk_tree_model_get_iter (modelHandle, iter, path)) { int [] index = new int [1]; OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, index, -1); @@ -1986,21 +1986,21 @@ int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long return 0; } -int /*long*/ gtk_row_deleted (int /*long*/ model, int /*long*/ path) { +long /*int*/ gtk_row_deleted (long /*int*/ model, long /*int*/ path) { if (ignoreAccessibility) { OS.g_signal_stop_emission_by_name (model, OS.row_deleted); } return 0; } -int /*long*/ gtk_row_inserted (int /*long*/ model, int /*long*/ path, int /*long*/ iter) { +long /*int*/ gtk_row_inserted (long /*int*/ model, long /*int*/ path, long /*int*/ iter) { if (ignoreAccessibility) { OS.g_signal_stop_emission_by_name (model, OS.row_inserted); } return 0; } -int /*long*/ gtk_start_interactive_search(int /*long*/ widget) { +long /*int*/ gtk_start_interactive_search(long /*int*/ widget) { if (!searchEnabled()) { OS.g_signal_stop_emission_by_name(widget, OS.start_interactive_search); return 1; @@ -2008,7 +2008,7 @@ int /*long*/ gtk_start_interactive_search(int /*long*/ widget) { return 0; } -int /*long*/ gtk_test_collapse_row (int /*long*/ tree, int /*long*/ iter, int /*long*/ path) { +long /*int*/ gtk_test_collapse_row (long /*int*/ tree, long /*int*/ iter, long /*int*/ path) { int [] index = new int [1]; OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, index, -1); TreeItem item = items [index [0]]; @@ -2046,7 +2046,7 @@ int /*long*/ gtk_test_collapse_row (int /*long*/ tree, int /*long*/ iter, int /* return 0; } -int /*long*/ gtk_test_expand_row (int /*long*/ tree, int /*long*/ iter, int /*long*/ path) { +long /*int*/ gtk_test_expand_row (long /*int*/ tree, long /*int*/ iter, long /*int*/ path) { int [] index = new int [1]; OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, index, -1); TreeItem item = items [index [0]]; @@ -2088,11 +2088,11 @@ int /*long*/ gtk_test_expand_row (int /*long*/ tree, int /*long*/ iter, int /*lo return 0; } -int /*long*/ gtk_toggled (int /*long*/ renderer, int /*long*/ pathStr) { - int /*long*/ path = OS.gtk_tree_path_new_from_string (pathStr); +long /*int*/ gtk_toggled (long /*int*/ renderer, long /*int*/ pathStr) { + long /*int*/ path = OS.gtk_tree_path_new_from_string (pathStr); if (path == 0) return 0; TreeItem item = null; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof()); if (OS.gtk_tree_model_get_iter (modelHandle, iter, path)) { item = _getItem (iter); } @@ -2108,7 +2108,7 @@ int /*long*/ gtk_toggled (int /*long*/ renderer, int /*long*/ pathStr) { return 0; } -void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) { +void gtk_widget_size_request (long /*int*/ widget, GtkRequisition requisition) { /* * Bug in GTK. For some reason, gtk_widget_size_request() fails * to include the height of the tree view items when there are @@ -2119,17 +2119,17 @@ void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) { super.gtk_widget_size_request (widget, requisition); return; } - int /*long*/ columns = OS.gtk_tree_view_get_columns (handle), list = columns; + long /*int*/ columns = OS.gtk_tree_view_get_columns (handle), list = columns; boolean fixVisible = columns != 0; while (list != 0) { - int /*long*/ column = OS.g_list_data (list); + long /*int*/ column = OS.g_list_data (list); if (OS.gtk_tree_view_column_get_visible (column)) { fixVisible = false; break; } list = OS.g_list_next (list); } - int /*long*/ columnHandle = 0; + long /*int*/ columnHandle = 0; if (fixVisible) { columnHandle = OS.g_list_data (columns); OS.gtk_tree_view_column_set_visible (columnHandle, true); @@ -2142,13 +2142,13 @@ void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) { } void hideFirstColumn () { - int /*long*/ firstColumn = OS.gtk_tree_view_get_column (handle, 0); + long /*int*/ firstColumn = OS.gtk_tree_view_get_column (handle, 0); OS.gtk_tree_view_column_set_visible (firstColumn, false); } void hookEvents () { super.hookEvents (); - int /*long*/ selection = OS.gtk_tree_view_get_selection(handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection(handle); OS.g_signal_connect_closure (selection, OS.changed, display.closures [CHANGED], false); OS.g_signal_connect_closure (handle, OS.row_activated, display.closures [ROW_ACTIVATED], false); OS.g_signal_connect_closure (handle, OS.test_expand_row, display.closures [TEST_EXPAND_ROW], false); @@ -2217,10 +2217,10 @@ public int indexOf (TreeItem item) { if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); int index = -1; - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); int depth = OS.gtk_tree_path_get_depth (path); if (depth == 1) { - int /*long*/ indices = OS.gtk_tree_path_get_indices (path); + long /*int*/ indices = OS.gtk_tree_path_get_indices (path); if (indices != 0) { int[] temp = new int[1]; OS.memmove (temp, indices, 4); @@ -2233,7 +2233,7 @@ public int indexOf (TreeItem item) { boolean mnemonicHit (char key) { for (int i=0; i<columnCount; i++) { - int /*long*/ labelHandle = columns [i].labelHandle; + long /*int*/ labelHandle = columns [i].labelHandle; if (labelHandle != 0 && mnemonicHit (labelHandle, key)) return true; } return false; @@ -2241,13 +2241,13 @@ boolean mnemonicHit (char key) { boolean mnemonicMatch (char key) { for (int i=0; i<columnCount; i++) { - int /*long*/ labelHandle = columns [i].labelHandle; + long /*int*/ labelHandle = columns [i].labelHandle; if (labelHandle != 0 && mnemonicMatch (labelHandle, key)) return true; } return false; } -int /*long*/ paintWindow () { +long /*int*/ paintWindow () { OS.gtk_widget_realize (handle); return OS.gtk_tree_view_get_bin_window (handle); } @@ -2294,9 +2294,9 @@ void releaseItem (TreeItem item, boolean release) { items [index [0]] = null; } -void releaseItems (int /*long*/ parentIter) { +void releaseItems (long /*int*/ parentIter) { int[] index = new int [1]; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); boolean valid = OS.gtk_tree_model_iter_children (modelHandle, iter, parentIter); while (valid) { releaseItems (iter); @@ -2346,14 +2346,14 @@ void releaseWidget () { currentItem = null; } -void remove (int /*long*/ parentIter, int start, int end) { +void remove (long /*int*/ parentIter, int start, int end) { if (start > end) return; int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, parentIter); if (!(0 <= start && start <= end && end < itemCount)) { error (SWT.ERROR_INVALID_RANGE); } - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (iter == 0) error (SWT.ERROR_NO_HANDLES); if (fixAccessibility ()) { ignoreAccessibility = true; @@ -2393,7 +2393,7 @@ public void removeAll () { if (item != null && !item.isDisposed ()) item.release (false); } items = new TreeItem[4]; - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); if (fixAccessibility ()) { ignoreAccessibility = true; @@ -2477,19 +2477,19 @@ public void removeTreeListener(TreeListener listener) { eventTable.unhook (SWT.Collapse, listener); } -int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /*long*/ cell_area, int /*long*/ x_offset, int /*long*/ y_offset, int /*long*/ width, int /*long*/ height) { - int /*long*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell)); +long /*int*/ rendererGetSizeProc (long /*int*/ cell, long /*int*/ widget, long /*int*/ cell_area, long /*int*/ x_offset, long /*int*/ y_offset, long /*int*/ width, long /*int*/ height) { + long /*int*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell)); GtkCellRendererClass klass = new GtkCellRendererClass (); OS.memmove (klass, g_class); OS.call_get_size (klass.get_size, cell, handle, cell_area, x_offset, y_offset, width, height); if (!ignoreSize && OS.GTK_IS_CELL_RENDERER_TEXT (cell)) { - int /*long*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2); + long /*int*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2); TreeItem item = null; if (iter != 0) item = _getItem (iter); if (item != null) { int columnIndex = 0; if (columnCount > 0) { - int /*long*/ columnHandle = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX1); + long /*int*/ columnHandle = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX1); for (int i = 0; i < columnCount; i++) { if (columns [i].handle == columnHandle) { columnIndex = i; @@ -2516,8 +2516,8 @@ int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /* event.gc = gc; event.width = contentWidth [0]; event.height = contentHeight [0]; - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); if (OS.gtk_tree_selection_path_is_selected (selection, path)) { event.detail = SWT.SELECTED; } @@ -2534,11 +2534,11 @@ int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /* return 0; } -int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*long*/ widget, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ expose_area, int /*long*/ flags) { +long /*int*/ rendererRenderProc (long /*int*/ cell, long /*int*/ window, long /*int*/ widget, long /*int*/ background_area, long /*int*/ cell_area, long /*int*/ expose_area, long /*int*/ flags) { TreeItem item = null; - int /*long*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2); + long /*int*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2); if (iter != 0) item = _getItem (iter); - int /*long*/ columnHandle = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX1); + long /*int*/ columnHandle = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX1); int columnIndex = 0; if (columnCount > 0) { for (int i = 0; i < columnCount; i++) { @@ -2552,7 +2552,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l if (OS.GTK_IS_CELL_RENDERER_TOGGLE (cell) || (OS.GTK_IS_CELL_RENDERER_PIXBUF (cell) && (columnIndex != 0 || (style & SWT.CHECK) == 0))) { drawFlags = (int)/*64*/flags; drawState = SWT.FOREGROUND; - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; OS.gtk_tree_model_get (modelHandle, item.handle, Tree.BACKGROUND_COLUMN, ptr, -1); if (ptr [0] == 0) { int modelIndex = columnCount == 0 ? Tree.FIRST_COLUMN : columns [columnIndex].modelIndex; @@ -2566,7 +2566,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l if ((flags & OS.GTK_CELL_RENDERER_FOCUSED) != 0) drawState |= SWT.FOCUSED; GdkRectangle rect = new GdkRectangle (); - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_get_background_area (handle, path, columnHandle, rect); OS.gtk_tree_path_free (path); @@ -2580,7 +2580,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l } //send out measure before erase - int /*long*/ textRenderer = getTextRenderer (columnHandle); + long /*int*/ textRenderer = getTextRenderer (columnHandle); if (textRenderer != 0) OS.gtk_cell_renderer_get_size (textRenderer, handle, null, null, null, null, null); if (hooks (SWT.EraseItem)) { @@ -2617,7 +2617,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l if ((drawState & SWT.SELECTED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_SELECTED; if ((drawState & SWT.FOCUSED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_FOCUSED; if ((drawState & SWT.SELECTED) != 0) { - int /*long*/ style = OS.gtk_widget_get_style (widget); + long /*int*/ style = OS.gtk_widget_get_style (widget); //TODO - parity and sorted byte[] detail = Converter.wcsToMbcs (null, "cell_odd", true); OS.gtk_paint_flat_box (style, window, OS.GTK_STATE_SELECTED, OS.GTK_SHADOW_NONE, rect, widget, detail, rect.x, rect.y, rect.width, rect.height); @@ -2628,7 +2628,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l } } } - int /*long*/ result = 0; + long /*int*/ result = 0; if ((drawState & SWT.BACKGROUND) != 0 && (drawState & SWT.SELECTED) == 0) { GC gc = new GC (this); gc.setBackground (item.getBackground (columnIndex)); @@ -2638,7 +2638,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l gc.dispose (); } if ((drawState & SWT.FOREGROUND) != 0 || OS.GTK_IS_CELL_RENDERER_TOGGLE (cell)) { - int /*long*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell)); + long /*int*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell)); GtkCellRendererClass klass = new GtkCellRendererClass (); OS.memmove (klass, g_class); if (drawForeground != null && OS.GTK_IS_CELL_RENDERER_TEXT (cell)) { @@ -2651,7 +2651,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l if (hooks (SWT.PaintItem)) { GdkRectangle rect = new GdkRectangle (); GdkRectangle clipRect = new GdkRectangle (); - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_get_cell_area (handle, path, columnHandle, rect); OS.gtk_tree_view_get_background_area (handle, path, columnHandle, clipRect); OS.gtk_tree_path_free (path); @@ -2715,8 +2715,8 @@ void resetCustomDraw () { for (int i=0; i<end; i++) { boolean customDraw = columnCount != 0 ? columns [i].customDraw : firstCustomDraw; if (customDraw) { - int /*long*/ column = OS.gtk_tree_view_get_column (handle, i); - int /*long*/ textRenderer = getTextRenderer (column); + long /*int*/ column = OS.gtk_tree_view_get_column (handle, i); + long /*int*/ textRenderer = getTextRenderer (column); OS.gtk_tree_view_column_set_cell_data_func (column, textRenderer, 0, 0, 0); if (columnCount != 0) columns [i].customDraw = false; } @@ -2777,7 +2777,7 @@ public void setInsertMark (TreeItem item, boolean before) { if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parent != this) return; Rectangle rect = item.getBounds(); - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_widget_realize (handle); if (!OS.gtk_tree_view_get_path_at_pos(handle, rect.x, rect.y, path, null, null, null)) return; if (path [0] == 0) return; @@ -2786,7 +2786,7 @@ public void setInsertMark (TreeItem item, boolean before) { OS.gtk_tree_path_free (path [0]); } -void setItemCount (int /*long*/ parentIter, int count) { +void setItemCount (long /*int*/ parentIter, int count) { int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, parentIter); if (count == itemCount) return; boolean isVirtual = (style & SWT.VIRTUAL) != 0; @@ -2797,7 +2797,7 @@ void setItemCount (int /*long*/ parentIter, int count) { ignoreAccessibility = true; } for (int i=itemCount; i<count; i++) { - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (iter == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_tree_store_append (modelHandle, iter, parentIter); OS.gtk_tree_store_set (modelHandle, iter, ID_COLUMN, -1, -1); @@ -2856,7 +2856,7 @@ public void select (TreeItem item) { if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_selection_select_iter (selection, item.handle); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -2878,7 +2878,7 @@ public void selectAll () { checkWidget(); if ((style & SWT.SINGLE) != 0) return; boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.gtk_tree_selection_select_all (selection); OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); @@ -2956,15 +2956,15 @@ public void setColumnOrder (int [] order) { if (seen [index]) error (SWT.ERROR_INVALID_ARGUMENT); seen [index] = true; } - int /*long*/ baseColumn = 0; + long /*int*/ baseColumn = 0; for (int i=0; i<order.length; i++) { - int /*long*/ column = columns [order [i]].handle; + long /*int*/ column = columns [order [i]].handle; OS.gtk_tree_view_move_column_after (handle, column, baseColumn); baseColumn = column; } } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { super.setFontDescription (font); TreeColumn[] columns = getColumns (); for (int i = 0; i < columns.length; i++) { @@ -3024,7 +3024,7 @@ public void setLinesVisible (boolean show) { } } -void setModel (int /*long*/ newModel) { +void setModel (long /*int*/ newModel) { display.removeWidget (modelHandle); OS.g_object_unref (modelHandle); modelHandle = newModel; @@ -3054,12 +3054,12 @@ void setParentBackground () { recreateRenderers (); } -void setParentWindow (int /*long*/ widget) { - int /*long*/ window = eventWindow (); +void setParentWindow (long /*int*/ widget) { + long /*int*/ window = eventWindow (); OS.gtk_widget_set_parent_window (widget, window); } -void setScrollWidth (int /*long*/ column, TreeItem item) { +void setScrollWidth (long /*int*/ column, TreeItem item) { if (columnCount != 0 || currentItem == item) return; int width = OS.gtk_tree_view_column_get_fixed_width (column); int itemWidth = calculateWidth (column, item.handle, true); @@ -3125,7 +3125,7 @@ public void setSelection (TreeItem [] items) { int length = items.length; if (length == 0 || ((style & SWT.SINGLE) != 0 && length > 1)) return; boolean fixColumn = showFirstColumn (); - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); boolean first = true; for (int i = 0; i < length; i++) { @@ -3133,7 +3133,7 @@ public void setSelection (TreeItem [] items) { if (item == null) continue; if (item.isDisposed ()) break; if (item.parent != this) continue; - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); showItem (path, false); if (first) { OS.gtk_tree_view_set_cursor (handle, path, 0, false); @@ -3226,7 +3226,7 @@ public void setTopItem (TreeItem item) { if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT); if (item.parent != this) return; - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); showItem (path, false); OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0f, 0f); if (OS.GTK_VERSION < OS.VERSION (2, 8, 0)) { @@ -3301,10 +3301,10 @@ boolean showFirstColumn () { */ int columnCount = Math.max (1, this.columnCount); for (int i=0; i<columnCount; i++) { - int /*long*/ column = OS.gtk_tree_view_get_column (handle, i); + long /*int*/ column = OS.gtk_tree_view_get_column (handle, i); if (OS.gtk_tree_view_column_get_visible (column)) return false; } - int /*long*/ firstColumn = OS.gtk_tree_view_get_column (handle, 0); + long /*int*/ firstColumn = OS.gtk_tree_view_get_column (handle, 0); OS.gtk_tree_view_column_set_visible (firstColumn, true); return true; } @@ -3327,13 +3327,13 @@ public void showSelection () { if (items.length != 0 && items [0] != null) showItem (items [0]); } -void showItem (int /*long*/ path, boolean scroll) { +void showItem (long /*int*/ path, boolean scroll) { int depth = OS.gtk_tree_path_get_depth (path); if (depth > 1) { int [] indices = new int [depth - 1]; - int /*long*/ indicesPtr = OS.gtk_tree_path_get_indices (path); + long /*int*/ indicesPtr = OS.gtk_tree_path_get_indices (path); OS.memmove (indices, indicesPtr, indices.length * 4); - int /*long*/ tempPath = OS.gtk_tree_path_new (); + long /*int*/ tempPath = OS.gtk_tree_path_new (); for (int i=0; i<indices.length; i++) { OS.gtk_tree_path_append_index (tempPath, indices [i]); OS.gtk_tree_view_expand_row (handle, tempPath, false); @@ -3409,7 +3409,7 @@ public void showItem (TreeItem item) { if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT); if (item.parent != this) return; - int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); + long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); showItem (path, true); OS.gtk_tree_path_free (path); } @@ -3423,19 +3423,19 @@ void updateScrollBarValue (ScrollBar bar) { * The fix is to queue a resize event for each child to * force the position to be corrected. */ - int /*long*/ parentHandle = parentingHandle (); - int /*long*/ list = OS.gtk_container_get_children (parentHandle); + long /*int*/ parentHandle = parentingHandle (); + long /*int*/ list = OS.gtk_container_get_children (parentHandle); if (list == 0) return; - int /*long*/ temp = list; + long /*int*/ temp = list; while (temp != 0) { - int /*long*/ widget = OS.g_list_data (temp); + long /*int*/ widget = OS.g_list_data (temp); if (widget != 0) OS.gtk_widget_queue_resize (widget); temp = OS.g_list_next (temp); } OS.g_list_free (list); } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { switch ((int)/*64*/user_data) { case EXPOSE_EVENT_INVERSE: { /* @@ -3450,7 +3450,7 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ us if (control != null) { GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof); - int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle); + long /*int*/ window = OS.gtk_tree_view_get_bin_window (handle); if (window == gdkEvent.window) { drawBackground (control, window, gdkEvent.region, gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java index 29ba6ea279..23e0956e2c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java @@ -38,7 +38,7 @@ import org.eclipse.swt.events.*; * @noextend This class is not intended to be subclassed by clients. */ public class TreeColumn extends Item { - int /*long*/ labelHandle, imageHandle, buttonHandle; + long /*int*/ labelHandle, imageHandle, buttonHandle; Tree parent; int modelIndex, lastButton, lastTime, lastX, lastWidth; boolean customDraw, useFixedWidth; @@ -326,7 +326,7 @@ public int getWidth () { return OS.gtk_tree_view_column_get_width (handle); } -int /*long*/ gtk_clicked (int /*long*/ widget) { +long /*int*/ gtk_clicked (long /*int*/ widget) { /* * There is no API to get a double click on a table column. Normally, when * the mouse is double clicked, this is indicated by GDK_2BUTTON_PRESS @@ -336,7 +336,7 @@ int /*long*/ gtk_clicked (int /*long*/ widget) { */ boolean doubleClick = false; boolean postEvent = true; - int /*long*/ eventPtr = OS.gtk_get_current_event (); + long /*int*/ eventPtr = OS.gtk_get_current_event (); if (eventPtr != 0) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); @@ -368,7 +368,7 @@ int /*long*/ gtk_clicked (int /*long*/ widget) { return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { @@ -384,11 +384,11 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) { return 0; } -int /*long*/ gtk_mnemonic_activate (int /*long*/ widget, int /*long*/ arg1) { +long /*int*/ gtk_mnemonic_activate (long /*int*/ widget, long /*int*/ arg1) { return parent.gtk_mnemonic_activate (widget, arg1); } -int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { +long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { useFixedWidth = false; GtkAllocation widgetAllocation = new GtkAllocation(); gtk_widget_get_allocation (widget, widgetAllocation); @@ -437,7 +437,7 @@ public void pack () { if ((parent.style & SWT.VIRTUAL) != 0) { //NOT DONE } else { - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (OS.gtk_tree_model_get_iter_first (parent.modelHandle, iter)) { do { width = Math.max (width, parent.calculateWidth (handle, iter, true)); @@ -544,7 +544,7 @@ public void setAlignment (int alignment) { parent.createRenderers (handle, modelIndex, index == 0, style); } -void setFontDescription (int /*long*/ font) { +void setFontDescription (long /*int*/ font) { OS.gtk_widget_modify_font (labelHandle, font); OS.gtk_widget_modify_font (imageHandle, font); } @@ -559,7 +559,7 @@ public void setImage (Image image) { } int imageIndex = headerImageList.indexOf (image); if (imageIndex == -1) imageIndex = headerImageList.add (image); - int /*long*/ pixbuf = headerImageList.getPixbuf (imageIndex); + long /*int*/ pixbuf = headerImageList.getPixbuf (imageIndex); OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf); OS.gtk_widget_show (imageHandle); } else { @@ -703,14 +703,14 @@ public void setWidth (int width) { */ if (width != 0) { if (buttonHandle != 0) { - int /*long*/ window = OS.gtk_widget_get_parent_window (buttonHandle); + long /*int*/ window = OS.gtk_widget_get_parent_window (buttonHandle); if (window != 0) { - int /*long*/ windowList = OS.gdk_window_get_children (window); + long /*int*/ windowList = OS.gdk_window_get_children (window); if (windowList != 0) { - int /*long*/ windows = windowList; - int /*long*/ [] userData = new int /*long*/ [1]; + long /*int*/ windows = windowList; + long /*int*/ [] userData = new long /*int*/ [1]; while (windows != 0) { - int /*long*/ child = OS.g_list_data (windows); + long /*int*/ child = OS.g_list_data (windows); OS.gdk_window_get_user_data (child, userData); if (userData[0] == buttonHandle) { OS.gdk_window_lower (child); 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 7b07001b15..4efb9a692f 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 @@ -181,7 +181,7 @@ public TreeItem (TreeItem parentItem, int style, int index) { this (checkNull (parentItem).parent, parentItem.handle, style, checkIndex (index), true); } -TreeItem (Tree parent, int /*long*/ parentIter, int style, int index, boolean create) { +TreeItem (Tree parent, long /*int*/ parentIter, int style, int index, boolean create) { super (parent, style); this.parent = parent; if (create) { @@ -212,7 +212,7 @@ protected void checkSubclass () { } Color _getBackground () { - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.BACKGROUND_COLUMN, ptr, -1); if (ptr [0] == 0) return parent.getBackground (); GdkColor gdkColor = new GdkColor (); @@ -224,7 +224,7 @@ Color _getBackground () { Color _getBackground (int index) { int count = Math.max (1, parent.columnCount); if (0 > index || index > count - 1) return _getBackground (); - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex; OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_BACKGROUND, ptr, -1); if (ptr [0] == 0) return _getBackground (); @@ -241,7 +241,7 @@ boolean _getChecked () { } Color _getForeground () { - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.FOREGROUND_COLUMN, ptr, -1); if (ptr [0] == 0) return parent.getForeground (); GdkColor gdkColor = new GdkColor (); @@ -253,7 +253,7 @@ Color _getForeground () { Color _getForeground (int index) { int count = Math.max (1, parent.columnCount); if (0 > index || index > count - 1) return _getForeground (); - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex; OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_FOREGROUND, ptr, -1); if (ptr [0] == 0) return _getForeground (); @@ -266,7 +266,7 @@ Color _getForeground (int index) { Image _getImage (int index) { int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count - 1) return null; - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex; OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_PIXBUF, ptr, -1); if (ptr [0] == 0) return null; @@ -280,7 +280,7 @@ Image _getImage (int index) { String _getText (int index) { int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count - 1) return ""; - int /*long*/ [] ptr = new int /*long*/ [1]; + long /*int*/ [] ptr = new long /*int*/ [1]; int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex; OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_TEXT, ptr, -1); if (ptr [0] == 0) return ""; //$NON-NLS-1$ @@ -300,7 +300,7 @@ void clear () { OS.gtk_tree_store_set (parent.modelHandle, handle, i, 0, -1); } for (int i=Tree.FOREGROUND_COLUMN; i<columnCount; i++) { - OS.gtk_tree_store_set (parent.modelHandle, handle, i, (int /*long*/)0, -1); + OS.gtk_tree_store_set (parent.modelHandle, handle, i, (long /*int*/)0, -1); } /* * Bug in GTK. When using fixed-height-mode, @@ -432,15 +432,15 @@ public Rectangle getBounds (int index) { // TODO fully test on early and later versions of GTK checkWidget(); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (index >= 0 && index < parent.columnCount) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); @@ -494,14 +494,14 @@ public Rectangle getBounds () { // shifted a bit too far right on later versions of GTK - however, old Tree also had this problem checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = OS.gtk_tree_view_get_column (parentHandle, 0); + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = OS.gtk_tree_view_get_column (parentHandle, 0); if (column == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ textRenderer = parent.getTextRenderer (column); - int /*long*/ pixbufRenderer = parent.getPixbufRenderer (column); + long /*int*/ textRenderer = parent.getTextRenderer (column); + long /*int*/ pixbufRenderer = parent.getPixbufRenderer (column); if (textRenderer == 0 || pixbufRenderer == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); boolean isExpander = OS.gtk_tree_model_iter_n_children (parent.modelHandle, handle) > 0; @@ -585,7 +585,7 @@ public boolean getChecked () { */ public boolean getExpanded () { checkWidget(); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); boolean answer = OS.gtk_tree_view_row_expanded (parent.handle, path); OS.gtk_tree_path_free (path); return answer; @@ -737,18 +737,18 @@ public Rectangle getImageBounds (int index) { // TODO fully test on early and later versions of GTK checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (index >= 0 && index < parent.getColumnCount ()) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ pixbufRenderer = parent.getPixbufRenderer (column); + long /*int*/ pixbufRenderer = parent.getPixbufRenderer (column); if (pixbufRenderer == 0) return new Rectangle (0, 0, 0, 0); GdkRectangle rect = new GdkRectangle (); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); if ((parent.getStyle () & SWT.MIRRORED) != 0) rect.x = parent.getClientWidth () - rect.width - rect.x; @@ -883,12 +883,12 @@ public Tree getParent () { */ public TreeItem getParentItem () { checkWidget(); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); TreeItem item = null; int depth = OS.gtk_tree_path_get_depth (path); if (depth > 1) { OS.gtk_tree_path_up (path); - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (OS.gtk_tree_model_get_iter (parent.modelHandle, iter, path)) { item = parent._getItem (iter); } @@ -946,19 +946,19 @@ public Rectangle getTextBounds (int index) { if (0 > index || index > count - 1) return new Rectangle (0, 0, 0, 0); // TODO fully test on early and later versions of GTK // shifted a bit too far right on later versions of GTK - however, old Tree also had this problem - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (index >= 0 && index < parent.columnCount) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ textRenderer = parent.getTextRenderer (column); - int /*long*/ pixbufRenderer = parent.getPixbufRenderer (column); + long /*int*/ textRenderer = parent.getTextRenderer (column); + long /*int*/ pixbufRenderer = parent.getPixbufRenderer (column); if (textRenderer == 0 || pixbufRenderer == 0) return new Rectangle (0, 0, 0, 0); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); boolean isExpander = OS.gtk_tree_model_iter_n_children (parent.modelHandle, handle) > 0; @@ -1032,8 +1032,8 @@ public int indexOf (TreeItem item) { if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); int index = -1; boolean isParent = false; - int /*long*/ currentPath = OS.gtk_tree_model_get_path (parent.modelHandle, handle); - int /*long*/ parentPath = OS.gtk_tree_model_get_path (parent.modelHandle, item.handle); + long /*int*/ currentPath = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ parentPath = OS.gtk_tree_model_get_path (parent.modelHandle, item.handle); int depth = OS.gtk_tree_path_get_depth (parentPath); if (depth > 1 && OS.gtk_tree_path_up(parentPath)) { if (OS.gtk_tree_path_compare(currentPath, parentPath) == 0) isParent = true; @@ -1041,9 +1041,9 @@ public int indexOf (TreeItem item) { OS.gtk_tree_path_free (currentPath); OS.gtk_tree_path_free (parentPath); if (!isParent) return index; - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, item.handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, item.handle); if (depth > 1) { - int /*long*/ indices = OS.gtk_tree_path_get_indices (path); + long /*int*/ indices = OS.gtk_tree_path_get_indices (path); if (indices != 0) { int[] temp = new int[depth]; OS.memmove (temp, indices, 4 * temp.length); @@ -1055,13 +1055,13 @@ public int indexOf (TreeItem item) { } void redraw () { - int /*long*/ parentHandle = parent.handle; + long /*int*/ parentHandle = parent.handle; if (gtk_widget_get_realized (parentHandle)) { - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, 0, rect); OS.gtk_tree_path_free (path); - int /*long*/ window = OS.gtk_tree_view_get_bin_window (parentHandle); + long /*int*/ window = OS.gtk_tree_view_get_bin_window (parentHandle); rect.x = 0; int [] w = new int [1], h = new int [1]; gdk_window_get_size (window, w, h); @@ -1102,15 +1102,15 @@ void releaseWidget () { */ public void removeAll () { checkWidget (); - int /*long*/ modelHandle = parent.modelHandle; + long /*int*/ modelHandle = parent.modelHandle; int length = OS.gtk_tree_model_iter_n_children (modelHandle, handle); if (length == 0) return; - int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (iter == 0) error (SWT.ERROR_NO_HANDLES); if (parent.fixAccessibility ()) { parent.ignoreAccessibility = true; } - int /*long*/ selection = OS.gtk_tree_view_get_selection (parent.handle); + long /*int*/ selection = OS.gtk_tree_view_get_selection (parent.handle); int [] value = new int [1]; while (OS.gtk_tree_model_iter_children (modelHandle, iter, handle)) { OS.gtk_tree_model_get (modelHandle, iter, Tree.ID_COLUMN, value, -1); @@ -1215,16 +1215,16 @@ public void setBackground (int index, Color color) { boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { if ((parent.style & SWT.VIRTUAL) == 0) { - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (parent.columnCount > 0) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return; - int /*long*/ textRenderer = parent.getTextRenderer (column); - int /*long*/ imageRenderer = parent.getPixbufRenderer (column); + long /*int*/ textRenderer = parent.getTextRenderer (column); + long /*int*/ imageRenderer = parent.getPixbufRenderer (column); OS.gtk_tree_view_column_set_cell_data_func (column, textRenderer, display.cellDataProc, parentHandle, 0); OS.gtk_tree_view_column_set_cell_data_func (column, imageRenderer, display.cellDataProc, parentHandle, 0); } @@ -1275,7 +1275,7 @@ public void setChecked (boolean checked) { */ public void setExpanded (boolean expanded) { checkWidget(); - int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); + long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); if (expanded != OS.gtk_tree_view_row_expanded (parent.handle, path)) { if (expanded) { OS.g_signal_handlers_block_matched (parent.handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, TEST_EXPAND_ROW); @@ -1318,7 +1318,7 @@ public void setFont (Font font){ if (oldFont == font) return; this.font = font; if (oldFont != null && oldFont.equals (font)) return; - int /*long*/ fontHandle = font != null ? font.handle : 0; + long /*int*/ fontHandle = font != null ? font.handle : 0; OS.gtk_tree_store_set (parent.modelHandle, handle, Tree.FONT_COLUMN, fontHandle, -1); /* * Bug in GTK. When using fixed-height-mode, @@ -1369,7 +1369,7 @@ public void setFont (int index, Font font) { if (oldFont != null && oldFont.equals (font)) return; int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex; - int /*long*/ fontHandle = font != null ? font.handle : 0; + long /*int*/ fontHandle = font != null ? font.handle : 0; OS.gtk_tree_store_set (parent.modelHandle, handle, modelIndex + Tree.CELL_FONT, fontHandle, -1); /* * Bug in GTK. When using fixed-height-mode, @@ -1387,16 +1387,16 @@ public void setFont (int index, Font font) { boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { if ((parent.style & SWT.VIRTUAL) == 0) { - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (parent.columnCount > 0) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return; - int /*long*/ textRenderer = parent.getTextRenderer (column); - int /*long*/ imageRenderer = parent.getPixbufRenderer (column); + long /*int*/ textRenderer = parent.getTextRenderer (column); + long /*int*/ imageRenderer = parent.getPixbufRenderer (column); OS.gtk_tree_view_column_set_cell_data_func (column, textRenderer, display.cellDataProc, parentHandle, 0); OS.gtk_tree_view_column_set_cell_data_func (column, imageRenderer, display.cellDataProc, parentHandle, 0); } @@ -1494,16 +1494,16 @@ public void setForeground (int index, Color color){ boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { if ((parent.style & SWT.VIRTUAL) == 0) { - int /*long*/ parentHandle = parent.handle; - int /*long*/ column = 0; + long /*int*/ parentHandle = parent.handle; + long /*int*/ column = 0; if (parent.columnCount > 0) { column = parent.columns [index].handle; } else { column = OS.gtk_tree_view_get_column (parentHandle, index); } if (column == 0) return; - int /*long*/ textRenderer = parent.getTextRenderer (column); - int /*long*/ imageRenderer = parent.getPixbufRenderer (column); + long /*int*/ textRenderer = parent.getTextRenderer (column); + long /*int*/ imageRenderer = parent.getPixbufRenderer (column); OS.gtk_tree_view_column_set_cell_data_func (column, textRenderer, display.cellDataProc, parentHandle, 0); OS.gtk_tree_view_column_set_cell_data_func (column, imageRenderer, display.cellDataProc, parentHandle, 0); } @@ -1568,7 +1568,7 @@ public void setImage (int index, Image image) { } int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count - 1) return; - int /*long*/ pixbuf = 0; + long /*int*/ pixbuf = 0; if (image != null) { ImageList imageList = parent.imageList; if (imageList == null) imageList = parent.imageList = new ImageList (); @@ -1597,10 +1597,10 @@ public void setImage (int index, Image image) { */ if ((parent.style & SWT.VIRTUAL) != 0 && parent.currentItem == null) { if (image != null) { - int /*long*/parentHandle = parent.handle; - int /*long*/ column = OS.gtk_tree_view_get_column (parentHandle, index); + long /*int*/parentHandle = parent.handle; + long /*int*/ column = OS.gtk_tree_view_get_column (parentHandle, index); int [] w = new int [1]; - int /*long*/ pixbufRenderer = parent.getPixbufRenderer(column); + long /*int*/ pixbufRenderer = parent.getPixbufRenderer(column); OS.gtk_tree_view_column_cell_get_position (column, pixbufRenderer, null, w); if (w[0] < image.getBounds().width) { /* @@ -1608,7 +1608,7 @@ public void setImage (int index, Image image) { * are relying on the fact that it is done as part of modifying * the style. */ - int /*long*/ style = OS.gtk_widget_get_modifier_style (parentHandle); + long /*int*/ style = OS.gtk_widget_get_modifier_style (parentHandle); parent.modifyStyle (parentHandle, style); } } 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 afe1444725..8d86e07d3a 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 @@ -56,7 +56,7 @@ public abstract class Widget { * * @noreference This field is not intended to be referenced by clients. */ - public int /*long*/ handle; + public long /*int*/ handle; int style, state; Display display; EventTable eventTable; @@ -298,7 +298,7 @@ public void addDisposeListener (DisposeListener listener) { addListener (SWT.Dispose, typedListener); } -int /*long*/ paintWindow () { +long /*int*/ paintWindow () { return 0; } @@ -314,7 +314,7 @@ static int checkBits (int style, int int0, int int1, int int2, int int3, int int return style; } -int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*long*/ tree_model, int /*long*/ iter, int /*long*/ data) { +long /*int*/ cellDataProc (long /*int*/ tree_column, long /*int*/ cell, long /*int*/ tree_model, long /*int*/ iter, long /*int*/ data) { return 0; } @@ -435,7 +435,7 @@ void deregister () { } void destroyWidget () { - int /*long*/ topHandle = topHandle (); + long /*int*/ topHandle = topHandle (); releaseHandle (); if (topHandle != 0 && (state & HANDLE) != 0) { OS.gtk_widget_destroy (topHandle); @@ -634,271 +634,271 @@ public int getStyle () { } -int /*long*/ gtk_activate (int /*long*/ widget) { +long /*int*/ gtk_activate (long /*int*/ widget) { return 0; } -int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_changed (int /*long*/ widget) { +long /*int*/ gtk_changed (long /*int*/ widget) { return 0; } -int /*long*/ gtk_change_value (int /*long*/ widget, int /*long*/ scroll, int /*long*/ value1, int /*long*/ value2) { +long /*int*/ gtk_change_value (long /*int*/ widget, long /*int*/ scroll, long /*int*/ value1, long /*int*/ value2) { return 0; } -int /*long*/ gtk_clicked (int /*long*/ widget) { +long /*int*/ gtk_clicked (long /*int*/ widget) { return 0; } -int /*long*/ gtk_commit (int /*long*/ imcontext, int /*long*/ text) { +long /*int*/ gtk_commit (long /*int*/ imcontext, long /*int*/ text) { return 0; } -int /*long*/ gtk_configure_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_configure_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_create_menu_proxy (int /*long*/ widget) { +long /*int*/ gtk_create_menu_proxy (long /*int*/ widget) { return 0; } -int /*long*/ gtk_day_selected (int /*long*/ widget) { +long /*int*/ gtk_day_selected (long /*int*/ widget) { return 0; } -int /*long*/ gtk_day_selected_double_click (int /*long*/ widget) { +long /*int*/ gtk_day_selected_double_click (long /*int*/ widget) { return 0; } -int /*long*/ gtk_delete_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_delete_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_delete_range (int /*long*/ widget, int /*long*/ iter1, int /*long*/ iter2) { +long /*int*/ gtk_delete_range (long /*int*/ widget, long /*int*/ iter1, long /*int*/ iter2) { return 0; } -int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int /*long*/ end_pos) { +long /*int*/ gtk_delete_text (long /*int*/ widget, long /*int*/ start_pos, long /*int*/ end_pos) { return 0; } -int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_enter_notify_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_expand_collapse_cursor_row (int /*long*/ widget, int /*long*/ logical, int /*long*/ expand, int /*long*/ open_all) { +long /*int*/ gtk_expand_collapse_cursor_row (long /*int*/ widget, long /*int*/ logical, long /*int*/ expand, long /*int*/ open_all) { return 0; } -int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus_in_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_grab_focus (int /*long*/ widget) { +long /*int*/ gtk_grab_focus (long /*int*/ widget) { return 0; } -int /*long*/ gtk_hide (int /*long*/ widget) { +long /*int*/ gtk_hide (long /*int*/ widget) { return 0; } -int /*long*/ gtk_icon_release (int /*long*/ widget, int /*long*/ icon_pos, int /*long*/ event) { +long /*int*/ gtk_icon_release (long /*int*/ widget, long /*int*/ icon_pos, long /*int*/ event) { return 0; } -int /*long*/ gtk_input (int /*long*/ widget, int /*long*/ arg1) { +long /*int*/ gtk_input (long /*int*/ widget, long /*int*/ arg1) { return 0; } -int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /*long*/ new_text_length, int /*long*/ position) { +long /*int*/ gtk_insert_text (long /*int*/ widget, long /*int*/ new_text, long /*int*/ new_text_length, long /*int*/ position) { return 0; } -int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, event, GdkEventKey.sizeof); return sendKeyEvent (SWT.KeyDown, gdkEvent) ? 0 : 1; } -int /*long*/ gtk_key_release_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_key_release_event (long /*int*/ widget, long /*int*/ event) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, event, GdkEventKey.sizeof); return sendKeyEvent (SWT.KeyUp, gdkEvent) ? 0 : 1; } -int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_leave_notify_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_map (int /*long*/ widget) { +long /*int*/ gtk_map (long /*int*/ widget) { return 0; } -int /*long*/ gtk_map_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_map_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_mnemonic_activate (int /*long*/ widget, int /*long*/ arg1) { +long /*int*/ gtk_mnemonic_activate (long /*int*/ widget, long /*int*/ arg1) { return 0; } -int /*long*/ gtk_month_changed (int /*long*/ widget) { +long /*int*/ gtk_month_changed (long /*int*/ widget) { return 0; } -int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_move_focus (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_move_focus (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_output (int /*long*/ widget) { +long /*int*/ gtk_output (long /*int*/ widget) { return 0; } -int /*long*/ gtk_populate_popup (int /*long*/ widget, int /*long*/ menu) { +long /*int*/ gtk_populate_popup (long /*int*/ widget, long /*int*/ menu) { return 0; } -int /*long*/ gtk_popup_menu (int /*long*/ widget) { +long /*int*/ gtk_popup_menu (long /*int*/ widget) { return 0; } -int /*long*/ gtk_preedit_changed (int /*long*/ imcontext) { +long /*int*/ gtk_preedit_changed (long /*int*/ imcontext) { return 0; } -int /*long*/ gtk_realize (int /*long*/ widget) { +long /*int*/ gtk_realize (long /*int*/ widget) { return 0; } -int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long*/ column) { +long /*int*/ gtk_row_activated (long /*int*/ tree, long /*int*/ path, long /*int*/ column) { return 0; } -int /*long*/ gtk_row_deleted (int /*long*/ model, int /*long*/ path) { +long /*int*/ gtk_row_deleted (long /*int*/ model, long /*int*/ path) { return 0; } -int /*long*/ gtk_row_inserted (int /*long*/ model, int /*long*/ path, int /*long*/ iter) { +long /*int*/ gtk_row_inserted (long /*int*/ model, long /*int*/ path, long /*int*/ iter) { return 0; } -int /*long*/ gtk_scroll_child (int /*long*/ widget, int /*long*/ scrollType, int /*long*/ horizontal) { +long /*int*/ gtk_scroll_child (long /*int*/ widget, long /*int*/ scrollType, long /*int*/ horizontal) { return 0; } -int /*long*/ gtk_scroll_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_scroll_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_select (int /*long*/ item) { +long /*int*/ gtk_select (long /*int*/ item) { return 0; } -int /*long*/ gtk_selection_done (int /*long*/ menushell) { +long /*int*/ gtk_selection_done (long /*int*/ menushell) { return 0; } -int /*long*/ gtk_show (int /*long*/ widget) { +long /*int*/ gtk_show (long /*int*/ widget) { return 0; } -int /*long*/ gtk_show_help (int /*long*/ widget, int /*long*/ helpType) { +long /*int*/ gtk_show_help (long /*int*/ widget, long /*int*/ helpType) { return 0; } -int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { +long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { return 0; } -int /*long*/ gtk_status_icon_popup_menu (int /*long*/ handle, int /*long*/ button, int /*long*/ activate_time) { +long /*int*/ gtk_status_icon_popup_menu (long /*int*/ handle, long /*int*/ button, long /*int*/ activate_time) { return 0; } -int /*long*/ gtk_start_interactive_search (int /*long*/ widget) { +long /*int*/ gtk_start_interactive_search (long /*int*/ widget) { return 0; } -int /*long*/ gtk_style_set (int /*long*/ widget, int /*long*/ previousStyle) { +long /*int*/ gtk_style_set (long /*int*/ widget, long /*int*/ previousStyle) { return 0; } -int /*long*/ gtk_switch_page (int /*long*/ widget, int /*long*/ page, int /*long*/ page_num) { +long /*int*/ gtk_switch_page (long /*int*/ widget, long /*int*/ page, long /*int*/ page_num) { return 0; } -int /*long*/ gtk_test_collapse_row (int /*long*/ tree, int /*long*/ iter, int /*long*/ path) { +long /*int*/ gtk_test_collapse_row (long /*int*/ tree, long /*int*/ iter, long /*int*/ path) { return 0; } -int /*long*/ gtk_test_expand_row (int /*long*/ tree, int /*long*/ iter, int /*long*/ path) { +long /*int*/ gtk_test_expand_row (long /*int*/ tree, long /*int*/ iter, long /*int*/ path) { return 0; } -int /*long*/ gtk_text_buffer_insert_text (int /*long*/ widget, int /*long*/ iter, int /*long*/ text, int /*long*/ length) { +long /*int*/ gtk_text_buffer_insert_text (long /*int*/ widget, long /*int*/ iter, long /*int*/ text, long /*int*/ length) { return 0; } -int /*long*/ gtk_timer () { +long /*int*/ gtk_timer () { return 0; } -int /*long*/ gtk_toggled (int /*long*/ renderer, int /*long*/ pathStr) { +long /*int*/ gtk_toggled (long /*int*/ renderer, long /*int*/ pathStr) { return 0; } -int /*long*/ gtk_unmap (int /*long*/ widget) { +long /*int*/ gtk_unmap (long /*int*/ widget) { return 0; } -int /*long*/ gtk_unmap_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_unmap_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int /*long*/ gtk_unrealize (int /*long*/ widget) { +long /*int*/ gtk_unrealize (long /*int*/ widget) { return 0; } -int /*long*/ gtk_value_changed (int /*long*/ adjustment) { +long /*int*/ gtk_value_changed (long /*int*/ adjustment) { return 0; } -int /*long*/ gtk_visibility_notify_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_visibility_notify_event (long /*int*/ widget, long /*int*/ event) { return 0; } -void gtk_widget_get_allocation (int /*long*/ widget, GtkAllocation allocation) { +void gtk_widget_get_allocation (long /*int*/ widget, GtkAllocation allocation) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { OS.gtk_widget_get_allocation (widget, allocation); } else { @@ -909,7 +909,7 @@ void gtk_widget_get_allocation (int /*long*/ widget, GtkAllocation allocation) { } } -boolean gtk_widget_get_mapped (int /*long*/ widget) { +boolean gtk_widget_get_mapped (long /*int*/ widget) { if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) { return OS.gtk_widget_get_mapped (widget); } else { @@ -917,7 +917,7 @@ boolean gtk_widget_get_mapped (int /*long*/ widget) { } } -boolean gtk_widget_has_focus (int /*long*/ widget) { +boolean gtk_widget_has_focus (long /*int*/ widget) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { return OS.gtk_widget_has_focus (widget); } else { @@ -925,21 +925,21 @@ boolean gtk_widget_has_focus (int /*long*/ widget) { } } -int /*long*/ gtk_window_state_event (int /*long*/ widget, int /*long*/ event) { +long /*int*/ gtk_window_state_event (long /*int*/ widget, long /*int*/ event) { return 0; } -int fontHeight (int /*long*/ font, int /*long*/ widgetHandle) { - int /*long*/ context = OS.gtk_widget_get_pango_context (widgetHandle); - int /*long*/ lang = OS.pango_context_get_language (context); - int /*long*/ metrics = OS.pango_context_get_metrics (context, font, lang); +int fontHeight (long /*int*/ font, long /*int*/ widgetHandle) { + long /*int*/ context = OS.gtk_widget_get_pango_context (widgetHandle); + long /*int*/ lang = OS.pango_context_get_language (context); + long /*int*/ metrics = OS.pango_context_get_metrics (context, font, lang); int ascent = OS.pango_font_metrics_get_ascent (metrics); int descent = OS.pango_font_metrics_get_descent (metrics); OS.pango_font_metrics_unref (metrics); return OS.PANGO_PIXELS (ascent + descent); } -int /*long*/ filterProc(int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*/ data2) { +long /*int*/ filterProc(long /*int*/ xEvent, long /*int*/ gdkEvent, long /*int*/ data2) { return 0; } @@ -947,11 +947,11 @@ boolean filters (int eventType) { return display.filters (eventType); } -int /*long*/ fixedMapProc (int /*long*/ widget) { +long /*int*/ fixedMapProc (long /*int*/ widget) { return 0; } -int /*long*/ fixedSizeAllocateProc(int /*long*/ widget, int /*long*/ allocationPtr) { +long /*int*/ fixedSizeAllocateProc(long /*int*/ widget, long /*int*/ allocationPtr) { return OS.Call (Display.oldFixedSizeAllocateProc, widget, allocationPtr); } @@ -1054,15 +1054,15 @@ boolean hooks (int eventType) { return eventTable.hooks (eventType); } -int /*long*/ hoverProc (int /*long*/ widget) { +long /*int*/ hoverProc (long /*int*/ widget) { return 0; } -int /*long*/ menuPositionProc (int /*long*/ menu, int /*long*/ x, int /*long*/ y, int /*long*/ push_in, int /*long*/ user_data) { +long /*int*/ menuPositionProc (long /*int*/ menu, long /*int*/ x, long /*int*/ y, long /*int*/ push_in, long /*int*/ user_data) { return 0; } -boolean mnemonicHit (int /*long*/ mnemonicHandle, char key) { +boolean mnemonicHit (long /*int*/ mnemonicHandle, char key) { if (!mnemonicMatch (mnemonicHandle, key)) return false; OS.g_signal_handlers_block_matched (mnemonicHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, MNEMONIC_ACTIVATE); boolean result = OS.gtk_widget_mnemonic_activate (mnemonicHandle, false); @@ -1070,13 +1070,13 @@ boolean mnemonicHit (int /*long*/ mnemonicHandle, char key) { return result; } -boolean mnemonicMatch (int /*long*/ mnemonicHandle, char key) { +boolean mnemonicMatch (long /*int*/ mnemonicHandle, char key) { int keyval1 = OS.gdk_keyval_to_lower (OS.gdk_unicode_to_keyval (key)); int keyval2 = OS.gdk_keyval_to_lower (OS.gtk_label_get_mnemonic_keyval (mnemonicHandle)); return keyval1 == keyval2; } -void modifyStyle (int /*long*/ handle, int /*long*/ style) { +void modifyStyle (long /*int*/ handle, long /*int*/ style) { OS.gtk_widget_modify_style (handle, style); } @@ -1221,11 +1221,11 @@ protected void removeListener (int eventType, SWTEventListener handler) { eventTable.unhook (eventType, handler); } -int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ handle, int /*long*/ cell_area, int /*long*/ x_offset, int /*long*/ y_offset, int /*long*/ width, int /*long*/ height) { +long /*int*/ rendererGetSizeProc (long /*int*/ cell, long /*int*/ handle, long /*int*/ cell_area, long /*int*/ x_offset, long /*int*/ y_offset, long /*int*/ width, long /*int*/ height) { return 0; } -int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*long*/ handle, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ expose_area, int /*long*/ flags) { +long /*int*/ rendererRenderProc (long /*int*/ cell, long /*int*/ window, long /*int*/ handle, long /*int*/ background_area, long /*int*/ cell_area, long /*int*/ expose_area, long /*int*/ flags) { return 0; } @@ -1356,7 +1356,7 @@ boolean sendKeyEvent (int type, GdkEventKey keyEvent) { char [] sendIMKeyEvent (int type, GdkEventKey keyEvent, char [] chars) { int index = 0, count = 0, state = 0; - int /*long*/ ptr = 0; + long /*int*/ ptr = 0; if (keyEvent == null) { ptr = OS.gtk_get_current_event (); if (ptr != 0) { @@ -1420,7 +1420,7 @@ void sendSelectionEvent (int eventType, Event event, boolean send) { return; } if (event == null) event = new Event (); - int /*long*/ ptr = OS.gtk_get_current_event (); + long /*int*/ ptr = OS.gtk_get_current_event (); if (ptr != 0) { GdkEvent gdkEvent = new GdkEvent (); OS.memmove (gdkEvent, ptr, GdkEvent.sizeof); @@ -1554,8 +1554,8 @@ public void setData (String key, Object value) { if (key.equals(SWT.SKIN_CLASS) || key.equals(SWT.SKIN_ID)) this.reskin(SWT.ALL); } -void setForegroundColor (int /*long*/ handle, GdkColor color) { - int /*long*/ style = OS.gtk_widget_get_modifier_style (handle); +void setForegroundColor (long /*int*/ handle, GdkColor color) { + long /*int*/ style = OS.gtk_widget_get_modifier_style (handle); OS.gtk_rc_style_set_fg (style, OS.GTK_STATE_NORMAL, color); OS.gtk_rc_style_set_fg (style, OS.GTK_STATE_ACTIVE, color); OS.gtk_rc_style_set_fg (style, OS.GTK_STATE_PRELIGHT, color); @@ -1689,18 +1689,18 @@ boolean setTabItemFocus (boolean next) { return false; } -int /*long*/ shellMapProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ shellMapProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { return 0; } -int /*long*/ sizeAllocateProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ sizeAllocateProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { return 0; } -int /*long*/ sizeRequestProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ sizeRequestProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { return 0; } -int /*long*/ g_object_ref_sink (int /*long*/ object) { +long /*int*/ g_object_ref_sink (long /*int*/ object) { if (OS.GLIB_VERSION >= OS.VERSION (2, 10, 0)) { return OS.g_object_ref_sink (object); } else { @@ -1709,7 +1709,7 @@ int /*long*/ g_object_ref_sink (int /*long*/ object) { return 0; } -boolean gtk_widget_get_sensitive (int /*long*/ widget) { +boolean gtk_widget_get_sensitive (long /*int*/ widget) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { return OS.gtk_widget_get_sensitive (widget); } else { @@ -1717,7 +1717,7 @@ boolean gtk_widget_get_sensitive (int /*long*/ widget) { } } -boolean gtk_widget_get_visible (int /*long*/ widget) { +boolean gtk_widget_get_visible (long /*int*/ widget) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { return OS.gtk_widget_get_visible (widget); } else { @@ -1725,7 +1725,7 @@ boolean gtk_widget_get_visible (int /*long*/ widget) { } } -boolean gtk_widget_get_realized (int /*long*/ widget) { +boolean gtk_widget_get_realized (long /*int*/ widget) { if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) { return OS.gtk_widget_get_realized (widget); } else { @@ -1733,7 +1733,7 @@ boolean gtk_widget_get_realized (int /*long*/ widget) { } } -boolean gtk_widget_get_can_default (int /*long*/ widget){ +boolean gtk_widget_get_can_default (long /*int*/ widget){ if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { return OS.gtk_widget_get_can_default (widget); } else { @@ -1741,7 +1741,7 @@ boolean gtk_widget_get_can_default (int /*long*/ widget){ } } -boolean gtk_widget_get_has_window (int /*long*/ widget) { +boolean gtk_widget_get_has_window (long /*int*/ widget) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { return OS.gtk_widget_get_has_window (widget); } else { @@ -1749,7 +1749,7 @@ boolean gtk_widget_get_has_window (int /*long*/ widget) { } } -int /*long*/ gtk_widget_get_window (int /*long*/ widget){ +long /*int*/ gtk_widget_get_window (long /*int*/ widget){ if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){ return OS.gtk_widget_get_window (widget); } else { @@ -1757,7 +1757,7 @@ int /*long*/ gtk_widget_get_window (int /*long*/ widget){ } } -void gtk_widget_set_can_default (int /*long*/ widget, boolean can_default) { +void gtk_widget_set_can_default (long /*int*/ widget, boolean can_default) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { OS.gtk_widget_set_can_default (widget, can_default); } else { @@ -1769,7 +1769,7 @@ void gtk_widget_set_can_default (int /*long*/ widget, boolean can_default) { } } -void gtk_widget_set_can_focus (int /*long*/ widget, boolean can_focus) { +void gtk_widget_set_can_focus (long /*int*/ widget, boolean can_focus) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { OS.gtk_widget_set_can_focus (widget, can_focus); } else { @@ -1781,7 +1781,7 @@ void gtk_widget_set_can_focus (int /*long*/ widget, boolean can_focus) { } } -void gtk_widget_set_mapped (int /*long*/ widget, boolean mapped) { +void gtk_widget_set_mapped (long /*int*/ widget, boolean mapped) { if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) { OS.gtk_widget_set_mapped (widget, mapped); } else { @@ -1793,7 +1793,7 @@ void gtk_widget_set_mapped (int /*long*/ widget, boolean mapped) { } } -void gtk_widget_set_visible (int /*long*/ widget, boolean visible) { +void gtk_widget_set_visible (long /*int*/ widget, boolean visible) { if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) { OS.gtk_widget_set_visible (widget,visible); } else { @@ -1805,7 +1805,7 @@ void gtk_widget_set_visible (int /*long*/ widget, boolean visible) { } } -void gtk_widget_set_receives_default (int /*long*/ widget, boolean receives_default) { +void gtk_widget_set_receives_default (long /*int*/ widget, boolean receives_default) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { OS.gtk_widget_set_receives_default (widget, receives_default); } else { @@ -1817,7 +1817,7 @@ void gtk_widget_set_receives_default (int /*long*/ widget, boolean receives_defa } } -void gdk_pixmap_get_size (int /*long*/ pixmap, int[] width, int[] height) { +void gdk_pixmap_get_size (long /*int*/ pixmap, int[] width, int[] height) { if (OS.GTK_VERSION >= OS.VERSION (2, 24, 0)) { OS.gdk_pixmap_get_size (pixmap, width, height); } else { @@ -1825,7 +1825,7 @@ void gdk_pixmap_get_size (int /*long*/ pixmap, int[] width, int[] height) { } } -void gdk_window_get_size (int /*long*/ drawable, int[] width, int[] height) { +void gdk_window_get_size (long /*int*/ 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); @@ -1834,8 +1834,8 @@ void gdk_window_get_size (int /*long*/ drawable, int[] width, int[] height) { } } -int /*long*/ gtk_box_new (int orientation, boolean homogeneous, int spacing) { - int /*long*/ box = 0; +long /*int*/ gtk_box_new (int orientation, boolean homogeneous, int spacing) { + long /*int*/ box = 0; if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) { box = OS.gtk_box_new (orientation, spacing); OS.gtk_box_set_homogeneous (box, homogeneous); @@ -1849,17 +1849,17 @@ int /*long*/ gtk_box_new (int orientation, boolean homogeneous, int spacing) { return box; } -int gdk_pointer_grab (int /*long*/ window, int grab_ownership, boolean owner_events, int event_mask, int /*long*/ confine_to, int /*long*/ cursor, int time_) { +int gdk_pointer_grab (long /*int*/ window, int grab_ownership, boolean owner_events, int event_mask, long /*int*/ confine_to, long /*int*/ cursor, int time_) { if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) { - int /*long*/ display = 0; + long /*int*/ display = 0; if( window != 0) { display = OS.gdk_window_get_display (window); } else { window = OS.gdk_get_default_root_window (); display = OS.gdk_window_get_display (window); } - int /*long*/ device_manager = OS.gdk_display_get_device_manager (display); - int /*long*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager); + long /*int*/ device_manager = OS.gdk_display_get_device_manager (display); + long /*int*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager); return OS.gdk_device_grab (pointer, window, grab_ownership, owner_events, event_mask, cursor, time_); } else { return OS.gdk_pointer_grab (window, owner_events, event_mask, confine_to, cursor, time_); @@ -1881,11 +1881,11 @@ public String toString () { return getName () + " {" + string + "}"; } -int /*long*/ topHandle () { +long /*int*/ topHandle () { return handle; } -int /*long*/ timerProc (int /*long*/ widget) { +long /*int*/ timerProc (long /*int*/ widget) { return 0; } @@ -1893,7 +1893,7 @@ boolean translateTraversal (int event) { return false; } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ user_data) { switch ((int)/*64*/user_data) { case ACTIVATE: return gtk_activate (handle); case CHANGED: return gtk_changed (handle); @@ -1920,13 +1920,13 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ user_data) { } } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { switch ((int)/*64*/user_data) { case EXPOSE_EVENT_INVERSE: { GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof); - int /*long*/ paintWindow = paintWindow(); - int /*long*/ window = gdkEvent.window; + long /*int*/ paintWindow = paintWindow(); + long /*int*/ window = gdkEvent.window; if (window != paintWindow) return 0; return (state & OBSCURED) != 0 ? 1 : 0; } @@ -1969,7 +1969,7 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ us } } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ user_data) { switch ((int)/*64*/user_data) { case DELETE_RANGE: return gtk_delete_range (handle, arg0, arg1); case DELETE_TEXT: return gtk_delete_text (handle, arg0, arg1); @@ -1985,7 +1985,7 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ ar } } -int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ user_data) { +long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ user_data) { switch ((int)/*64*/user_data) { case CHANGE_VALUE: return gtk_change_value (handle, arg0, arg1, arg2); case EXPAND_COLLAPSE_CURSOR_ROW: return gtk_expand_collapse_cursor_row (handle, arg0, arg1, arg2); |