Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2012-09-24 18:45:57 +0000
committerSilenio Quarti2012-09-24 18:45:57 +0000
commit5721cfd149c1026b4c21848f64c2b57027ac8c7e (patch)
treeb16600bca597a4a0dc9d27194d5761c53151a395 /bundles/org.eclipse.swt/Eclipse SWT
parentbc8036435837353efa5da8c19b6a3003dbb86045 (diff)
downloadeclipse.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')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java142
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java68
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java80
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java62
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java196
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java362
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java88
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java128
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java46
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java144
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java412
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Drawable.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Callback.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TouchSource.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/bidi/org/eclipse/swt/internal/BidiUtil.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java290
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GCData.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java122
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java98
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/Converter.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java152
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java128
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java366
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java298
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java156
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java46
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java134
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java114
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java356
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java92
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java214
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java72
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java60
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java374
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java116
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java244
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java102
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GCData.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java44
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java316
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java174
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java198
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java76
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java72
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java190
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java86
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java398
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java54
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java212
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java46
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java60
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java52
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java138
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java72
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java52
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java408
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java56
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java104
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java76
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java480
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java114
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java104
183 files changed, 5690 insertions, 5690 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java
index 4a2cb56ccf..97402ebade 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java
@@ -49,7 +49,7 @@ public class Path extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
boolean moved, closed = true;
@@ -78,7 +78,7 @@ public class Path extends Resource {
public Path (Device device) {
super(device);
this.device.checkCairo();
- int /*long*/ surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, 1, 1);
+ long /*int*/ surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, 1, 1);
if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
handle = Cairo.cairo_create(surface);
Cairo.cairo_surface_destroy(surface);
@@ -121,12 +121,12 @@ public Path (Device device, Path path, float flatness) {
super(device);
if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (path.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, 1, 1);
+ long /*int*/ surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, 1, 1);
if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
handle = Cairo.cairo_create(surface);
Cairo.cairo_surface_destroy(surface);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ copy;
+ long /*int*/ copy;
flatness = Math.max(0, flatness);
if (flatness == 0) {
copy = Cairo.cairo_copy_path(path.handle);
@@ -251,7 +251,7 @@ public void addPath(Path path) {
if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (path.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
moved = false;
- 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(handle, copy);
Cairo.cairo_path_destroy(copy);
@@ -350,8 +350,8 @@ public boolean contains(float x, float y, GC gc, boolean outline) {
gc.initCairo();
gc.checkGC(GC.LINE_CAP | GC.LINE_JOIN | GC.LINE_STYLE | GC.LINE_WIDTH);
boolean result = false;
- int /*long*/ cairo = gc.data.cairo;
- int /*long*/ copy = Cairo.cairo_copy_path(handle);
+ long /*int*/ cairo = gc.data.cairo;
+ long /*int*/ copy = Cairo.cairo_copy_path(handle);
if (copy == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Cairo.cairo_append_path(cairo, copy);
Cairo.cairo_path_destroy(copy);
@@ -409,7 +409,7 @@ public void getBounds(float[] bounds) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (bounds.length < 4) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ copy = Cairo.cairo_copy_path(handle);
+ long /*int*/ copy = Cairo.cairo_copy_path(handle);
if (copy == 0) SWT.error(SWT.ERROR_NO_HANDLES);
cairo_path_t path = new cairo_path_t();
Cairo.memmove(path, copy, cairo_path_t.sizeof);
@@ -421,7 +421,7 @@ public void getBounds(float[] bounds) {
double[] points = new double[6];
cairo_path_data_t data = new cairo_path_data_t();
while (i < path.num_data) {
- int /*long*/ offset = path.data + i * cairo_path_data_t.sizeof;
+ long /*int*/ offset = path.data + i * cairo_path_data_t.sizeof;
Cairo.memmove(data, offset, cairo_path_data_t.sizeof);
switch (data.type) {
case Cairo.CAIRO_PATH_MOVE_TO:
@@ -502,7 +502,7 @@ public void getCurrentPoint(float[] point) {
*/
public PathData getPathData() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- int /*long*/ copy = Cairo.cairo_copy_path(handle);
+ long /*int*/ copy = Cairo.cairo_copy_path(handle);
if (copy == 0) SWT.error(SWT.ERROR_NO_HANDLES);
cairo_path_t path = new cairo_path_t();
Cairo.memmove(path, copy, cairo_path_t.sizeof);
@@ -514,7 +514,7 @@ public PathData getPathData() {
double[] points = new double[6];
cairo_path_data_t data = new cairo_path_data_t();
while (i < path.num_data) {
- int /*long*/ offset = path.data + i * cairo_path_data_t.sizeof;
+ long /*int*/ offset = path.data + i * cairo_path_data_t.sizeof;
Cairo.memmove(data, offset, cairo_path_data_t.sizeof);
switch (data.type) {
case Cairo.CAIRO_PATH_MOVE_TO:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java
index 9e94116ef0..848ea49ae6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java
@@ -46,9 +46,9 @@ public class Pattern extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
- int /*long*/ surface;
+ long /*int*/ surface;
/**
* Constructs a new Pattern given an image. Drawing with the resulting
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java
index 8e156278e6..fce4b2d67c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java
@@ -451,8 +451,8 @@ public void copyArea(Image image, int x, int y) {
for (int i = 0; i < count[0]; i++) {
int display = displays[i];
OS.CGDisplayBounds(display, rect);
- int /*long*/ srcImage = 0;
- int /*long*/ address = OS.VERSION >= 0x1070 ? 0 : OS.CGDisplayBaseAddress(display);
+ long /*int*/ srcImage = 0;
+ long /*int*/ address = OS.VERSION >= 0x1070 ? 0 : OS.CGDisplayBaseAddress(display);
if (address != 0) {
int width = OS.CGDisplayPixelsWide(display);
int height = OS.CGDisplayPixelsHigh(display);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java
index f4d1cb61a0..2a7b660ecf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java
@@ -43,7 +43,7 @@ public final class Color extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public float /*double*/ [] handle;
+ public double /*float*/ [] handle;
Color(Device device) {
super(device);
@@ -126,7 +126,7 @@ public boolean equals(Object object) {
if (object == this) return true;
if (!(object instanceof Color)) return false;
Color color = (Color)object;
- float /*double*/ [] rgbColor = color.handle;
+ double /*float*/ [] rgbColor = color.handle;
if (handle == rgbColor) return true;
return device == color.device &&
(int)(handle[0] * 255) == (int)(rgbColor[0] * 255) &&
@@ -220,8 +220,8 @@ public RGB getRGB () {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Color cocoa_new(Device device, float /*double*/ [] handle) {
- float /*double*/ [] rgbColor = handle;
+public static Color cocoa_new(Device device, double /*float*/ [] handle) {
+ double /*float*/ [] rgbColor = handle;
Color color = new Color(device);
color.handle = rgbColor;
return color;
@@ -233,7 +233,7 @@ void init(int red, int green, int blue) {
(blue > 255) || (blue < 0)) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- float /*double*/ [] rgbColor = new float /*double*/ [4];
+ double /*float*/ [] rgbColor = new double /*float*/ [4];
rgbColor[0] = red / 255f;
rgbColor[1] = green / 255f;
rgbColor[2] = blue / 255f;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java
index 43dff75607..986ef93fbf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java
@@ -243,7 +243,7 @@ public Rectangle getBounds () {
checkDevice ();
NSScreen screen = getPrimaryScreen();
NSRect frame = screen.frame();
- float /*double*/ scaleFactor = screen.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = screen.userSpaceScaleFactor();
frame.x /= scaleFactor;
frame.y /= scaleFactor;
frame.width /= scaleFactor;
@@ -368,7 +368,7 @@ public FontData[] getFontList (String faceName, boolean scalable) {
NSArray families = NSFontManager.sharedFontManager().availableFontFamilies();
FontData[] fds = new FontData[100];
if (families != null) {
- int /*long*/ familyCount = families.count();
+ long /*int*/ familyCount = families.count();
for (int i = 0; i < familyCount; i++) {
NSString nsFamily = new NSString(families.objectAtIndex(i));
String name = nsFamily.getString();
@@ -379,8 +379,8 @@ public FontData[] getFontList (String faceName, boolean scalable) {
for (int j = 0; j < fontCount; j++) {
NSArray fontDetails = new NSArray(fonts.objectAtIndex(j));
String nsName = new NSString(fontDetails.objectAtIndex(0)).getString();
- int /*long*/ weight = new NSNumber(fontDetails.objectAtIndex(2)).integerValue();
- int /*long*/ traits = new NSNumber(fontDetails.objectAtIndex(3)).integerValue();
+ long /*int*/ weight = new NSNumber(fontDetails.objectAtIndex(2)).integerValue();
+ long /*int*/ traits = new NSNumber(fontDetails.objectAtIndex(3)).integerValue();
int style = SWT.NORMAL;
if ((traits & OS.NSItalicFontMask) != 0) style |= SWT.ITALIC;
if (weight == 9) style |= SWT.BOLD;
@@ -533,7 +533,7 @@ protected void init () {
/* Initialize the system font slot */
boolean smallFonts = System.getProperty("org.eclipse.swt.internal.carbon.smallFonts") != null;
- float /*double*/ systemFontSize = smallFonts ? NSFont.smallSystemFontSize() : NSFont.systemFontSize();
+ double /*float*/ systemFontSize = smallFonts ? NSFont.smallSystemFontSize() : NSFont.systemFontSize();
Point dpi = this.dpi = getDPI(), screenDPI = getScreenDPI();
NSFont font = NSFont.systemFontOfSize(systemFontSize * dpi.y / screenDPI.y);
font.retain();
@@ -555,7 +555,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.
@@ -572,7 +572,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,
@@ -611,7 +611,7 @@ public boolean loadFont (String path) {
if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
boolean result = false;
NSString nsPath = NSString.stringWith(path);
- int /*long*/ fsRepresentation = nsPath.fileSystemRepresentation();
+ long /*int*/ fsRepresentation = nsPath.fileSystemRepresentation();
if (fsRepresentation != 0) {
byte [] fsRef = new byte [80];
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java
index 05b54f215f..45862474fd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java
@@ -248,7 +248,7 @@ public FontData[] getFontData() {
NSString str = handle.fontName();
String nsName = str.getString();
NSFontManager manager = NSFontManager.sharedFontManager();
- int /*long*/ traits = manager.traitsOfFont(handle);
+ long /*int*/ traits = manager.traitsOfFont(handle);
int style = SWT.NORMAL;
if ((traits & OS.NSItalicFontMask) != 0) style |= SWT.ITALIC;
if ((traits & OS.NSBoldFontMask) != 0) style |= SWT.BOLD;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java
index 451e4074c3..00c8c62d65 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java
@@ -75,8 +75,8 @@ public final class GC extends Resource {
CGPathElement element;
int count, typeCount;
byte[] types;
- float /*double*/[] points;
- float /*double*/ [] point;
+ double /*float*/[] points;
+ double /*float*/ [] point;
static final int TAB_COUNT = 32;
@@ -168,7 +168,7 @@ public GC(Drawable drawable, int style) {
try {
GCData data = new GCData();
data.style = checkStyle(style);
- int /*long*/ contextId = drawable.internal_new_GC(data);
+ long /*int*/ contextId = drawable.internal_new_GC(data);
Device device = data.device;
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
@@ -204,13 +204,13 @@ static int checkStyle (int style) {
*/
public static GC cocoa_new(Drawable drawable, GCData data) {
GC gc = new GC();
- int /*long*/ context = drawable.internal_new_GC(data);
+ long /*int*/ context = drawable.internal_new_GC(data);
gc.device = data.device;
gc.init(drawable, data, context);
return gc;
}
-int /*long*/ applierFunc(int /*long*/ info, int /*long*/ elementPtr) {
+long /*int*/ applierFunc(long /*int*/ info, long /*int*/ elementPtr) {
OS.memmove(element, elementPtr, CGPathElement.sizeof);
int type = 0, length = 1;
switch (element.type) {
@@ -252,7 +252,7 @@ NSAutoreleasePool checkGC (int mask) {
NSRect rect = view.convertRect_toView_(view.bounds(), null);
if (data.paintRect == null) {
transform.translateXBy(rect.x, rect.y + rect.height);
- float /*double*/ userSpaceScaleFactor = view.window().userSpaceScaleFactor();
+ double /*float*/ userSpaceScaleFactor = view.window().userSpaceScaleFactor();
transform.scaleXBy(userSpaceScaleFactor, userSpaceScaleFactor);
} else {
transform.translateXBy(0, rect.height);
@@ -288,7 +288,7 @@ NSAutoreleasePool checkGC (int mask) {
if (pattern != null) {
if (pattern.color != null) pattern.color.setStroke();
} else {
- float /*double*/ [] color = data.foreground;
+ double /*float*/ [] color = data.foreground;
if (data.fg != null) data.fg.release();
NSColor fg = data.fg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
fg.retain();
@@ -300,7 +300,7 @@ NSAutoreleasePool checkGC (int mask) {
if (pattern != null) {
if (pattern.color != null) pattern.color.setFill();
} else {
- float /*double*/ [] color = data.foreground;
+ double /*float*/ [] color = data.foreground;
if (data.fg != null) data.fg.release();
NSColor fg = data.fg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
fg.retain();
@@ -313,7 +313,7 @@ NSAutoreleasePool checkGC (int mask) {
if (pattern != null) {
if (pattern.color != null) pattern.color.setFill();
} else {
- float /*double*/ [] color = data.background;
+ double /*float*/ [] color = data.background;
if (data.bg != null) data.bg.release();
NSColor bg = data.bg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
bg.retain();
@@ -344,7 +344,7 @@ NSAutoreleasePool checkGC (int mask) {
case SWT.LINE_CUSTOM: dashes = data.lineDashes; break;
}
if (dashes != null) {
- float /*double*/[] lengths = new float /*double*/[dashes.length];
+ double /*float*/[] lengths = new double /*float*/[dashes.length];
for (int i = 0; i < lengths.length; i++) {
lengths[i] = width == 0 || data.lineStyle == SWT.LINE_CUSTOM ? dashes[i] : dashes[i] * width;
}
@@ -381,9 +381,9 @@ NSAutoreleasePool checkGC (int mask) {
if (data.transform != null) {
size = data.transform.transformSize(size);
}
- float /*double*/ scaling = size.width;
+ double /*float*/ scaling = size.width;
if (scaling < 0) scaling = -scaling;
- float /*double*/ strokeWidth = data.lineWidth * scaling;
+ double /*float*/ strokeWidth = data.lineWidth * scaling;
if (strokeWidth == 0 || ((int)strokeWidth % 2) == 1) {
data.drawXOffset = 0.5f / scaling;
}
@@ -467,7 +467,7 @@ public void copyArea(Image image, int x, int y) {
NSGraphicsContext context = NSGraphicsContext.graphicsContextWithBitmapImageRep(imageRep);
NSGraphicsContext.static_saveGraphicsState();
NSGraphicsContext.setCurrentContext(context);
- int /*long*/ contextID = OS.objc_msgSend(NSApplication.sharedApplication().id, OS.sel_contextID);
+ long /*int*/ contextID = OS.objc_msgSend(NSApplication.sharedApplication().id, OS.sel_contextID);
OS.CGContextCopyWindowContentsToRect(context.graphicsPort(), destRect, contextID, window.windowNumber(), srcRect);
NSGraphicsContext.static_restoreGraphicsState();
return;
@@ -481,35 +481,35 @@ public void copyArea(Image image, int x, int y) {
rect.size.width = size.width;
rect.size.height = size.height;
int displayCount = 16;
- int /*long*/ displays = OS.malloc(4 * displayCount), countPtr = OS.malloc(4);
+ long /*int*/ displays = OS.malloc(4 * displayCount), countPtr = OS.malloc(4);
if (OS.CGGetDisplaysWithRect(rect, displayCount, displays, countPtr) != 0) return;
int[] count = new int[1], display = new int[1];
OS.memmove(count, countPtr, OS.PTR_SIZEOF);
for (int i = 0; i < count[0]; i++) {
OS.memmove(display, displays + (i * 4), 4);
OS.CGDisplayBounds(display[0], rect);
- int /*long*/ srcImage = 0;
- int /*long*/ address = OS.VERSION >= 0x1070 ? 0 : OS.CGDisplayBaseAddress(display[0]);
+ long /*int*/ srcImage = 0;
+ long /*int*/ address = OS.VERSION >= 0x1070 ? 0 : OS.CGDisplayBaseAddress(display[0]);
if (address != 0) {
- int /*long*/ width = OS.CGDisplayPixelsWide(display[0]);
- int /*long*/ height = OS.CGDisplayPixelsHigh(display[0]);
- int /*long*/ bpr = OS.CGDisplayBytesPerRow(display[0]);
- int /*long*/ bpp = OS.CGDisplayBitsPerPixel(display[0]);
- int /*long*/ bps = OS.CGDisplayBitsPerSample(display[0]);
+ long /*int*/ width = OS.CGDisplayPixelsWide(display[0]);
+ long /*int*/ height = OS.CGDisplayPixelsHigh(display[0]);
+ long /*int*/ bpr = OS.CGDisplayBytesPerRow(display[0]);
+ long /*int*/ bpp = OS.CGDisplayBitsPerPixel(display[0]);
+ long /*int*/ bps = OS.CGDisplayBitsPerSample(display[0]);
int bitmapInfo = OS.kCGImageAlphaNoneSkipFirst;
switch ((int)/*63*/bpp) {
case 16: bitmapInfo |= OS.kCGBitmapByteOrder16Host; break;
case 32: bitmapInfo |= OS.kCGBitmapByteOrder32Host; break;
}
if (OS.__BIG_ENDIAN__() && OS.VERSION >= 0x1040) {
- int /*long*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
- int /*long*/ context = OS.CGBitmapContextCreate(address, width, height, bps, bpr, colorspace, bitmapInfo);
+ long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long /*int*/ context = OS.CGBitmapContextCreate(address, width, height, bps, bpr, colorspace, bitmapInfo);
OS.CGColorSpaceRelease(colorspace);
srcImage = OS.CGBitmapContextCreateImage(context);
OS.CGContextRelease(context);
} else {
- int /*long*/ provider = OS.CGDataProviderCreateWithData(0, address, bpr * height, 0);
- int /*long*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long /*int*/ provider = OS.CGDataProviderCreateWithData(0, address, bpr * height, 0);
+ long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
srcImage = OS.CGImageCreate(width, height, bps, bpp, bpr, colorspace, bitmapInfo, provider, 0, true, 0);
OS.CGColorSpaceRelease(colorspace);
OS.CGDataProviderRelease(provider);
@@ -530,23 +530,23 @@ public void copyArea(Image image, int x, int y) {
}
}
-void copyArea (Image image, int x, int y, int /*long*/ srcImage) {
+void copyArea (Image image, int x, int y, long /*int*/ srcImage) {
if (srcImage == 0) return;
NSBitmapImageRep rep = image.getRepresentation();
- int /*long*/ bpc = rep.bitsPerSample();
- int /*long*/ width = rep.pixelsWide();
- int /*long*/ height = rep.pixelsHigh();
- int /*long*/ bpr = rep.bytesPerRow();
- int /*long*/ data = rep.bitmapData();
- int /*long*/ format = rep.bitmapFormat();
+ long /*int*/ bpc = rep.bitsPerSample();
+ long /*int*/ width = rep.pixelsWide();
+ long /*int*/ height = rep.pixelsHigh();
+ long /*int*/ bpr = rep.bytesPerRow();
+ long /*int*/ data = rep.bitmapData();
+ long /*int*/ format = rep.bitmapFormat();
int alphaInfo;
if (rep.hasAlpha()) {
alphaInfo = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? OS.kCGImageAlphaFirst : OS.kCGImageAlphaLast;
} else {
alphaInfo = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? OS.kCGImageAlphaNoneSkipFirst : OS.kCGImageAlphaNoneSkipLast;
}
- int /*long*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
- int /*long*/ context = OS.CGBitmapContextCreate(data, width, height, bpc, bpr, colorspace, alphaInfo);
+ long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long /*int*/ context = OS.CGBitmapContextCreate(data, width, height, bpc, bpr, colorspace, alphaInfo);
OS.CGColorSpaceRelease(colorspace);
if (context != 0) {
CGRect rect = new CGRect();
@@ -712,14 +712,14 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
}
}
-static int /*long*/ createCGPathRef(NSBezierPath nsPath) {
- int /*long*/ count = nsPath.elementCount();
+static long /*int*/ createCGPathRef(NSBezierPath nsPath) {
+ long /*int*/ count = nsPath.elementCount();
if (count > 0) {
- int /*long*/ cgPath = OS.CGPathCreateMutable();
+ long /*int*/ cgPath = OS.CGPathCreateMutable();
if (cgPath == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ points = OS.malloc(NSPoint.sizeof * 3);
+ long /*int*/ points = OS.malloc(NSPoint.sizeof * 3);
if (points == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- float /*double*/ [] pt = new float /*double*/ [6];
+ double /*float*/ [] pt = new double /*float*/ [6];
for (int i = 0; i < count; i++) {
int element = (int)/*64*/nsPath.elementAtIndex(i, points);
switch (element) {
@@ -777,7 +777,7 @@ NSAttributedString createString(String string, int flags, boolean draw) {
} else {
NSColor fg = data.fg;
if (fg == null) {
- float /*double*/ [] color = data.foreground;
+ double /*float*/ [] color = data.foreground;
fg = data.fg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
fg.retain();
}
@@ -822,16 +822,16 @@ NSAttributedString createString(String string, int flags, boolean draw) {
return attribStr;
}
-NSBezierPath createNSBezierPath (int /*long*/ cgPath) {
+NSBezierPath createNSBezierPath (long /*int*/ cgPath) {
Callback callback = new Callback(this, "applierFunc", 2);
- int /*long*/ proc = callback.getAddress();
+ long /*int*/ proc = callback.getAddress();
if (proc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
count = typeCount = 0;
element = new CGPathElement();
OS.CGPathApply(cgPath, 0, proc);
types = new byte[typeCount];
- points = new float /*double*/ [count];
- point = new float /*double*/ [6];
+ points = new double /*float*/ [count];
+ point = new double /*float*/ [6];
count = typeCount = 0;
OS.CGPathApply(cgPath, 0, proc);
callback.dispose();
@@ -860,18 +860,18 @@ NSBezierPath createNSBezierPath (int /*long*/ cgPath) {
bezierPath.curveToPoint(nsPoint, nsPoint2, nsPoint3);
break;
case SWT.PATH_QUAD_TO:
- float /*double*/ currentX = nsPoint.x;
- float /*double*/ currentY = nsPoint.y;
+ double /*float*/ currentX = nsPoint.x;
+ double /*float*/ currentY = nsPoint.y;
nsPoint2.x = points[j++];
nsPoint2.y = points[j++];
nsPoint.x = points[j++];
nsPoint.y = points[j++];
- float /*double*/ x0 = currentX;
- float /*double*/ y0 = currentY;
- float /*double*/ cx1 = x0 + 2 * (nsPoint2.x - x0) / 3;
- float /*double*/ cy1 = y0 + 2 * (nsPoint2.y - y0) / 3;
- float /*double*/ cx2 = cx1 + (nsPoint.x - x0) / 3;
- float /*double*/ cy2 = cy1 + (nsPoint.y - y0) / 3;
+ double /*float*/ x0 = currentX;
+ double /*float*/ y0 = currentY;
+ double /*float*/ cx1 = x0 + 2 * (nsPoint2.x - x0) / 3;
+ double /*float*/ cy1 = y0 + 2 * (nsPoint2.y - y0) / 3;
+ double /*float*/ cx2 = cx1 + (nsPoint.x - x0) / 3;
+ double /*float*/ cy2 = cy1 + (nsPoint.y - y0) / 3;
nsPoint2.x = cx1;
nsPoint2.y = cy1;
nsPoint3.x = cx2;
@@ -970,7 +970,7 @@ public void drawArc(int x, int y, int width, int height, int startAngle, int arc
try {
handle.saveGraphicsState();
NSAffineTransform transform = NSAffineTransform.transform();
- float /*double*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
+ double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
transform.translateXBy(x + xOffset + width / 2f, y + yOffset + height / 2f);
transform.scaleXBy(width / 2f, height / 2f);
NSBezierPath path = data.path;
@@ -1341,7 +1341,7 @@ public void drawPolygon(int[] pointArray) {
if (pointArray.length < 4) return;
NSAutoreleasePool pool = checkGC(DRAW);
try {
- float /*double*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
+ double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
NSBezierPath path = data.path;
NSPoint pt = new NSPoint();
pt.x = pointArray[0] + xOffset;
@@ -1390,7 +1390,7 @@ public void drawPolyline(int[] pointArray) {
if (pointArray.length < 4) return;
NSAutoreleasePool pool = checkGC(DRAW);
try {
- float /*double*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
+ double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
NSBezierPath path = data.path;
NSPoint pt = new NSPoint();
pt.x = pointArray[0] + xOffset;
@@ -1699,7 +1699,7 @@ public void drawText (String string, int x, int y, int flags) {
} else {
NSColor bg = data.bg;
if (bg == null) {
- float /*double*/ [] color = data.background;
+ double /*float*/ [] color = data.background;
bg = data.bg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
bg.retain();
}
@@ -1777,7 +1777,7 @@ public void fillArc(int x, int y, int width, int height, int startAngle, int arc
try {
handle.saveGraphicsState();
NSAffineTransform transform = NSAffineTransform.transform();
- float /*double*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
+ double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
transform.translateXBy(x + xOffset + width / 2f, y + yOffset + height / 2f);
transform.scaleXBy(width / 2f, height / 2f);
NSBezierPath path = data.path;
@@ -1924,16 +1924,16 @@ void fillPattern(NSBezierPath path, Pattern pattern) {
NSPoint end = new NSPoint();
end.x = pattern.pt2.x;
end.y = pattern.pt2.y;
- float /*double*/ difx = end.x - start.x;
- float /*double*/ dify = end.y - start.y;
+ double /*float*/ difx = end.x - start.x;
+ double /*float*/ dify = end.y - start.y;
if (difx == 0 && dify == 0) {
- float /*double*/ [] color = pattern.color1;
+ double /*float*/ [] color = pattern.color1;
NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f).setFill();
path.fill();
handle.restoreGraphicsState();
return;
}
- float /*double*/ startx, starty, endx, endy;
+ double /*float*/ startx, starty, endx, endy;
if (difx == 0 || dify == 0) {
startx = bounds.x;
starty = bounds.y;
@@ -1946,13 +1946,13 @@ void fillPattern(NSBezierPath path, Pattern pattern) {
endy = bounds.y;
}
} else {
- float /*double*/ m = (end.y-start.y)/(end.x - start.x);
- float /*double*/ b = end.y - (m * end.x);
- float /*double*/ m2 = -1/m; //perpendicular slope
- float /*double*/ b2 = bounds.y - (m2 * bounds.x);
+ double /*float*/ m = (end.y-start.y)/(end.x - start.x);
+ double /*float*/ b = end.y - (m * end.x);
+ double /*float*/ m2 = -1/m; //perpendicular slope
+ double /*float*/ b2 = bounds.y - (m2 * bounds.x);
startx = endx = (b - b2) / (m2 - m);
b2 = (bounds.y + bounds.height) - (m2 * bounds.x);
- float /*double*/ x2 = (b - b2) / (m2 - m);
+ double /*float*/ x2 = (b - b2) / (m2 - m);
startx = difx > 0 ? Math.min(startx, x2) : Math.max(startx, x2);
endx = difx < 0 ? Math.min(endx, x2) : Math.max(endx, x2);
b2 = bounds.y - (m2 * (bounds.x + bounds.width));
@@ -2202,8 +2202,8 @@ public void fillRoundRectangle(int x, int y, int width, int height, int arcWidth
void strokePattern(NSBezierPath path, Pattern pattern) {
handle.saveGraphicsState();
- int /*long*/ cgPath = createCGPathRef(path);
- int /*long*/ cgContext = handle.graphicsPort();
+ long /*int*/ cgPath = createCGPathRef(path);
+ long /*int*/ cgContext = handle.graphicsPort();
OS.CGContextSaveGState(cgContext);
initCGContext(cgContext);
OS.CGContextAddPath(cgContext, cgPath);
@@ -2476,7 +2476,7 @@ public void getClipping(Region region) {
int pointCount = 0;
Region clipRgn = new Region(device);
int[] pointArray = new int[count * 2];
- int /*long*/ points = OS.malloc(NSPoint.sizeof);
+ long /*int*/ points = OS.malloc(NSPoint.sizeof);
if (points == 0) SWT.error(SWT.ERROR_NO_HANDLES);
NSPoint pt = new NSPoint();
for (int i = 0; i < count; i++) {
@@ -2898,7 +2898,7 @@ public int hashCode() {
return handle != null ? (int)/*64*/handle.id : 0;
}
-void init(Drawable drawable, GCData data, int /*long*/ context) {
+void init(Drawable drawable, GCData data, long /*int*/ context) {
if (data.foreground != null) data.state &= ~(FOREGROUND | FOREGROUND_FILL);
if (data.background != null) data.state &= ~BACKGROUND;
if (data.font != null) data.state &= ~FONT;
@@ -2916,7 +2916,7 @@ void init(Drawable drawable, GCData data, int /*long*/ context) {
data.path.retain();
}
-void initCGContext(int /*long*/ cgContext) {
+void initCGContext(long /*int*/ cgContext) {
int state = data.state;
if ((state & LINE_WIDTH) != 0) {
OS.CGContextSetLineWidth(cgContext, data.lineWidth == 0 ? 1 : data.lineWidth);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java
index feed56809a..6ebc657bbc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java
@@ -29,8 +29,8 @@ import org.eclipse.swt.internal.cocoa.*;
public final class GCData {
public Device device;
public int style, state = -1;
- public float /*double*/ [] foreground;
- public float /*double*/ [] background;
+ public double /*float*/ [] foreground;
+ public double /*float*/ [] background;
public Pattern foregroundPattern;
public Pattern backgroundPattern;
public Font font;
@@ -52,12 +52,12 @@ public final class GCData {
public NSLayoutManager layoutManager;
public NSTextContainer textContainer;
public NSColor fg, bg;
- public float /*double*/ drawXOffset, drawYOffset;
+ public double /*float*/ drawXOffset, drawYOffset;
public NSRect paintRect;
public NSBezierPath path;
public NSAffineTransform transform, inverseTransform;
public NSBezierPath clipPath, visiblePath;
- public int /*long*/ visibleRgn;
+ public long /*int*/ visibleRgn;
public NSView view;
public NSSize size;
public Thread thread;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
index 2b66916a15..874af76699 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
@@ -230,7 +230,7 @@ public Image(Device device, Image srcImage, int flag) {
int width = (int)size.width;
int height = (int)size.height;
NSBitmapImageRep srcRep = srcImage.getRepresentation();
- int /*long*/ bpr = srcRep.bytesPerRow();
+ long /*int*/ bpr = srcRep.bytesPerRow();
/* Copy transparent pixel and alpha data when necessary */
transparentPixel = srcImage.transparentPixel;
@@ -240,9 +240,9 @@ public Image(Device device, Image srcImage, int flag) {
System.arraycopy(srcImage.alphaData, 0, alphaData, 0, alphaData.length);
}
- int /*long*/ srcData = srcRep.bitmapData();
- int /*long*/ format = srcRep.bitmapFormat();
- int /*long*/ bpp = srcRep.bitsPerPixel();
+ long /*int*/ srcData = srcRep.bitmapData();
+ long /*int*/ format = srcRep.bitmapFormat();
+ long /*int*/ bpp = srcRep.bitsPerPixel();
/* Create the image */
handle = (NSImage)new NSImage().alloc();
@@ -253,7 +253,7 @@ public Image(Device device, Image srcImage, int flag) {
rep.release();
handle.setCacheMode(OS.NSImageCacheNever);
- int /*long*/ data = rep.bitmapData();
+ long /*int*/ data = rep.bitmapData();
OS.memmove(data, srcData, width * height * 4);
if (flag != SWT.IMAGE_COPY) {
final int redOffset, greenOffset, blueOffset;
@@ -553,11 +553,11 @@ void createAlpha () {
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
NSBitmapImageRep imageRep = getRepresentation();
- int /*long*/ height = imageRep.pixelsHigh();
- int /*long*/ bpr = imageRep.bytesPerRow();
- int /*long*/ bitmapData = imageRep.bitmapData();
- int /*long*/ format = imageRep.bitmapFormat();
- int /*long*/ dataSize = height * bpr;
+ long /*int*/ height = imageRep.pixelsHigh();
+ long /*int*/ bpr = imageRep.bytesPerRow();
+ long /*int*/ bitmapData = imageRep.bitmapData();
+ long /*int*/ format = imageRep.bitmapFormat();
+ long /*int*/ dataSize = height * bpr;
byte[] srcData = new byte[(int)/*64*/dataSize];
OS.memmove(srcData, bitmapData, dataSize);
if (transparentPixel != -1) {
@@ -578,7 +578,7 @@ void createAlpha () {
srcData[i] = a;
}
} else {
- int /*long*/ width = imageRep.pixelsWide();
+ long /*int*/ width = imageRep.pixelsWide();
int offset = 0, alphaOffset = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? 0 : 3;
for (int y = 0; y<height; y++) {
for (int x = 0; x<width; x++) {
@@ -647,7 +647,7 @@ public Color getBackground() {
int red = (transparentPixel >> 16) & 0xFF;
int green = (transparentPixel >> 8) & 0xFF;
int blue = (transparentPixel >> 0) & 0xFF;
- return Color.cocoa_new(device, new float /*double*/ []{red / 255f, green / 255f, blue / 255f, 1});
+ return Color.cocoa_new(device, new double /*float*/ []{red / 255f, green / 255f, blue / 255f, 1});
}
/**
@@ -697,13 +697,13 @@ public ImageData getImageData() {
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
NSBitmapImageRep imageRep = getRepresentation();
- int /*long*/ width = imageRep.pixelsWide();
- int /*long*/ height = imageRep.pixelsHigh();
- int /*long*/ bpr = imageRep.bytesPerRow();
- int /*long*/ bpp = imageRep.bitsPerPixel();
- int /*long*/ bitmapData = imageRep.bitmapData();
- int /*long*/ bitmapFormat = imageRep.bitmapFormat();
- int /*long*/ dataSize = height * bpr;
+ long /*int*/ width = imageRep.pixelsWide();
+ long /*int*/ height = imageRep.pixelsHigh();
+ long /*int*/ bpr = imageRep.bytesPerRow();
+ long /*int*/ bpp = imageRep.bitsPerPixel();
+ long /*int*/ bitmapData = imageRep.bitmapData();
+ long /*int*/ bitmapFormat = imageRep.bitmapFormat();
+ long /*int*/ dataSize = height * bpr;
byte[] srcData = new byte[(int)/*64*/dataSize];
OS.memmove(srcData, bitmapData, dataSize);
@@ -727,7 +727,7 @@ public ImageData getImageData() {
if (transparentPixel == -1 && type == SWT.ICON) {
/* Get the icon mask data */
int maskPad = 2;
- int /*long*/ maskBpl = (((width + 7) / 8) + (maskPad - 1)) / maskPad * maskPad;
+ long /*int*/ maskBpl = (((width + 7) / 8) + (maskPad - 1)) / maskPad * maskPad;
byte[] maskData = new byte[(int)/*64*/(height * maskBpl)];
int offset = 0, maskOffset = 0;
for (int y = 0; y<height; y++) {
@@ -792,7 +792,7 @@ NSBitmapImageRep getRepresentation () {
}
NSArray reps = handle.representations();
NSSize size = handle.size();
- int /*long*/ count = reps.count();
+ long /*int*/ count = reps.count();
NSBitmapImageRep bestRep = null;
for (int i = 0; i < count; i++) {
rep = new NSBitmapImageRep(reps.objectAtIndex(i));
@@ -1008,8 +1008,8 @@ void initNative(String filename) {
rect.height = height;
/* Compute the pixels */
- int /*long*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
- int /*long*/ ctx = OS.CGBitmapContextCreate(rep.bitmapData(), width, height, 8, bpr, colorspace, OS.kCGImageAlphaNoneSkipFirst);
+ long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long /*int*/ ctx = OS.CGBitmapContextCreate(rep.bitmapData(), width, height, 8, bpr, colorspace, OS.kCGImageAlphaNoneSkipFirst);
OS.CGColorSpaceRelease(colorspace);
NSGraphicsContext.static_saveGraphicsState();
NSGraphicsContext.setCurrentContext(NSGraphicsContext.graphicsContextWithGraphicsPort(ctx, false));
@@ -1019,10 +1019,10 @@ void initNative(String filename) {
if (hasAlpha) {
/* Compute the alpha values */
- int /*long*/ bitmapBytesPerRow = width;
- int /*long*/ bitmapByteCount = bitmapBytesPerRow * height;
- int /*long*/ alphaBitmapData = OS.malloc(bitmapByteCount);
- int /*long*/ alphaBitmapCtx = OS.CGBitmapContextCreate(alphaBitmapData, width, height, 8, bitmapBytesPerRow, 0, OS.kCGImageAlphaOnly);
+ long /*int*/ bitmapBytesPerRow = width;
+ long /*int*/ bitmapByteCount = bitmapBytesPerRow * height;
+ long /*int*/ alphaBitmapData = OS.malloc(bitmapByteCount);
+ long /*int*/ alphaBitmapCtx = OS.CGBitmapContextCreate(alphaBitmapData, width, height, 8, bitmapBytesPerRow, 0, OS.kCGImageAlphaOnly);
NSGraphicsContext.static_saveGraphicsState();
NSGraphicsContext.setCurrentContext(NSGraphicsContext.graphicsContextWithGraphicsPort(alphaBitmapCtx, false));
nativeRep.drawInRect(rect);
@@ -1108,7 +1108,7 @@ void initNative(String filename) {
*
* @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 (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (type != SWT.BITMAP || memGC != null) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -1166,8 +1166,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*/ context = hDC;
+public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
+ long /*int*/ context = hDC;
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
@@ -1244,10 +1244,10 @@ public void setBackground(Color color) {
byte newGreen = (byte)((int)(color.handle[1] * 255) & 0xFF);
byte newBlue = (byte)((int)(color.handle[2] * 255) & 0xFF);
NSBitmapImageRep imageRep = getRepresentation();
- int /*long*/ bpr = imageRep.bytesPerRow();
- int /*long*/ data = imageRep.bitmapData();
- int /*long*/ format = imageRep.bitmapFormat();
- int /*long*/ bpp = imageRep.bitsPerPixel();
+ long /*int*/ bpr = imageRep.bytesPerRow();
+ long /*int*/ data = imageRep.bitmapData();
+ long /*int*/ format = imageRep.bitmapFormat();
+ long /*int*/ bpp = imageRep.bitsPerPixel();
final int redOffset, greenOffset, blueOffset;
if (bpp == 32 && (format & OS.NSAlphaFirstBitmapFormat) == 0) {
redOffset = 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java
index f8615f409a..e1bb639f0f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java
@@ -131,7 +131,7 @@ public Path (Device device, Path path, float flatness) {
if (flatness == 0) {
handle = new NSBezierPath(path.handle.copy().id);
} else {
- float /*double*/ defaultFlatness = NSBezierPath.defaultFlatness();
+ double /*float*/ defaultFlatness = NSBezierPath.defaultFlatness();
NSBezierPath.setDefaultFlatness(flatness);
handle = path.handle.bezierPathByFlatteningPath();
handle.retain();
@@ -236,7 +236,7 @@ public void addArc(float x, float y, float width, float height, float startAngle
void appendBezierPath (NSBezierPath path) {
int count = (int)/*64*/path.elementCount();
- int /*long*/ points = OS.malloc(3 * NSPoint.sizeof);
+ long /*int*/ points = OS.malloc(3 * NSPoint.sizeof);
if (points == 0) SWT.error(SWT.ERROR_NO_HANDLES);
NSPoint pt1 = new NSPoint();
NSPoint pt2 = new NSPoint();
@@ -383,8 +383,8 @@ public void addString(String string, float x, float y, Font font) {
attrStr.release();
range = layoutManager.glyphRangeForTextContainer(textContainer);
if (range.length != 0) {
- int /*long*/ glyphs = OS.malloc((range.length + 1) * 4);
- int /*long*/ count = layoutManager.getGlyphs(glyphs, range);
+ long /*int*/ glyphs = OS.malloc((range.length + 1) * 4);
+ long /*int*/ count = layoutManager.getGlyphs(glyphs, range);
NSBezierPath path = NSBezierPath.bezierPath();
for (int i = 0; i < count; i++) {
NSPoint pt = layoutManager.locationForGlyphAtIndex(i);
@@ -462,12 +462,12 @@ public boolean contains(float x, float y, GC gc, boolean outline) {
try {
//TODO - see windows
if (outline) {
- int /*long*/ pixel = OS.malloc(4);
+ long /*int*/ pixel = OS.malloc(4);
if (pixel == 0) SWT.error(SWT.ERROR_NO_HANDLES);
int[] buffer = new int[]{0xFFFFFFFF};
OS.memmove(pixel, buffer, 4);
- int /*long*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
- int /*long*/ context = OS.CGBitmapContextCreate(pixel, 1, 1, 8, 4, colorspace, OS.kCGImageAlphaNoneSkipFirst);
+ long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long /*int*/ context = OS.CGBitmapContextCreate(pixel, 1, 1, 8, 4, colorspace, OS.kCGImageAlphaNoneSkipFirst);
OS.CGColorSpaceRelease(colorspace);
if (context == 0) {
OS.free(pixel);
@@ -490,7 +490,7 @@ public boolean contains(float x, float y, GC gc, boolean outline) {
OS.CGContextSetLineJoin(context, joinStyle);
OS.CGContextSetLineWidth(context, data.lineWidth);
OS.CGContextTranslateCTM(context, -x + 0.5f, -y + 0.5f);
- int /*long*/ path = GC.createCGPathRef(handle);
+ long /*int*/ path = GC.createCGPathRef(handle);
OS.CGContextAddPath(context, path);
OS.CGPathRelease(path);
OS.CGContextStrokePath(context);
@@ -630,7 +630,7 @@ public PathData getPathData() {
int pointCount = 0, typeCount = 0;
byte[] types = new byte[count];
float[] pointArray = new float[count * 6];
- int /*long*/ points = OS.malloc(3 * NSPoint.sizeof);
+ long /*int*/ points = OS.malloc(3 * NSPoint.sizeof);
if (points == 0) SWT.error(SWT.ERROR_NO_HANDLES);
NSPoint pt = new NSPoint();
for (int i = 0; i < count; i++) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java
index 46875f961c..4ef3c3b15e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java
@@ -37,7 +37,7 @@ public class Pattern extends Resource {
NSGradient gradient;
NSPoint pt1, pt2;
Image image;
- float /*double*/ [] color1, color2;
+ double /*float*/ [] color1, color2;
int alpha1, alpha2;
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java
index 68351dc271..3a30f34db1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java
@@ -41,7 +41,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.
@@ -86,18 +86,18 @@ public Region(Device device) {
}
}
-Region(Device device, int /*long*/ handle) {
+Region(Device device, long /*int*/ handle) {
super(device);
this.handle = handle;
}
-public static Region cocoa_new(Device device, int /*long*/ handle) {
+public static Region cocoa_new(Device device, long /*int*/ handle) {
return new Region(device, handle);
}
-static int /*long*/ polyToRgn(int[] poly, int length) {
+static long /*int*/ polyToRgn(int[] poly, int length) {
short[] r = new short[4];
- int /*long*/ polyRgn = OS.NewRgn(), rectRgn = OS.NewRgn();
+ long /*int*/ polyRgn = OS.NewRgn(), rectRgn = OS.NewRgn();
int minY = poly[1], maxY = poly[1];
for (int y = 3; y < length; y += 2) {
if (poly[y] < minY) minY = poly[y];
@@ -140,11 +140,11 @@ static int /*long*/ polyToRgn(int[] poly, int length) {
return polyRgn;
}
-static int /*long*/ polyRgn(int[] pointArray, int count) {
+static long /*int*/ polyRgn(int[] pointArray, int count) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- int /*long*/ polyRgn;
+ long /*int*/ polyRgn;
if (C.PTR_SIZEOF == 4) {
polyRgn = OS.NewRgn();
OS.OpenRgn();
@@ -197,7 +197,7 @@ void add(int[] pointArray, int count) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- int /*long*/ polyRgn = polyRgn(pointArray, count);
+ long /*int*/ polyRgn = polyRgn(pointArray, count);
OS.UnionRgn(handle, polyRgn, handle);
OS.DisposeRgn(polyRgn);
} finally {
@@ -256,7 +256,7 @@ public void add(int x, int y, int width, int height) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- int /*long*/ rectRgn = OS.NewRgn();
+ long /*int*/ rectRgn = OS.NewRgn();
short[] r = new short[4];
OS.SetRect(r, (short)x, (short)y, (short)(x + width),(short)(y + height));
OS.RectRgn(rectRgn, r);
@@ -342,9 +342,9 @@ public boolean contains(Point pt) {
NSAffineTransform transform;
void convertRgn(NSAffineTransform transform) {
- int /*long*/ newRgn = OS.NewRgn();
+ long /*int*/ newRgn = OS.NewRgn();
Callback callback = new Callback(this, "convertRgn", 4);
- int /*long*/ proc = callback.getAddress();
+ long /*int*/ proc = callback.getAddress();
if (proc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
this.transform = transform;
OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, proc, newRgn);
@@ -354,7 +354,7 @@ void convertRgn(NSAffineTransform transform) {
OS.DisposeRgn(newRgn);
}
-int /*long*/ convertRgn(int /*long*/ message, int /*long*/ rgn, int /*long*/ r, int /*long*/ newRgn) {
+long /*int*/ convertRgn(long /*int*/ message, long /*int*/ rgn, long /*int*/ r, long /*int*/ newRgn) {
if (message == OS.kQDRegionToRectsMsgParse) {
short[] rect = new short[4];
OS.memmove(rect, r, rect.length * 2);
@@ -384,7 +384,7 @@ int /*long*/ convertRgn(int /*long*/ message, int /*long*/ rgn, int /*long*/ r,
points[i++] = (short)Math.round(point.y);
points[i++] = startX;
points[i++] = startY;
- int /*long*/ polyRgn = polyRgn(points, points.length);
+ long /*int*/ polyRgn = polyRgn(points, points.length);
OS.UnionRgn(newRgn, polyRgn, newRgn);
OS.DisposeRgn(polyRgn);
}
@@ -454,7 +454,7 @@ NSBezierPath getPath() {
NSPoint pt = new NSPoint();
short[] rect = new short[4];
-int /*long*/ regionToRects(int /*long*/ message, int /*long*/ rgn, int /*long*/ r, int /*long*/ path) {
+long /*int*/ regionToRects(long /*int*/ message, long /*int*/ rgn, long /*int*/ r, long /*int*/ path) {
if (message == OS.kQDRegionToRectsMsgParse) {
OS.memmove(rect, r, rect.length * 2);
pt.x = rect[1];
@@ -532,7 +532,7 @@ public void intersect(int x, int y, int width, int height) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- int /*long*/ rectRgn = OS.NewRgn();
+ long /*int*/ rectRgn = OS.NewRgn();
short[] r = new short[4];
OS.SetRect(r, (short)x, (short)y, (short)(x + width),(short)(y + height));
OS.RectRgn(rectRgn, r);
@@ -683,7 +683,7 @@ public void subtract (int[] pointArray) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- int /*long*/ polyRgn = polyRgn(pointArray, pointArray.length);
+ long /*int*/ polyRgn = polyRgn(pointArray, pointArray.length);
OS.DiffRgn(handle, polyRgn, handle);
OS.DisposeRgn(polyRgn);
} finally {
@@ -737,7 +737,7 @@ public void subtract(int x, int y, int width, int height) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- int /*long*/ rectRgn = OS.NewRgn();
+ long /*int*/ rectRgn = OS.NewRgn();
short[] r = new short[4];
OS.SetRect(r, (short)x, (short)y, (short)(x + width),(short)(y + height));
OS.RectRgn(rectRgn, r);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
index 87bf0a7eb9..04e7476e6a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
@@ -67,7 +67,7 @@ public final class TextLayout extends Resource {
static class StyleItem {
TextStyle style;
int start;
- int /*long*/ jniRef;
+ long /*int*/ jniRef;
NSCell cell;
public String toString () {
return "StyleItem {" + start + ", " + style + "}";
@@ -205,7 +205,7 @@ void computeRuns() {
}
attrStr.addAttribute(OS.NSParagraphStyleAttributeName, paragraph, range);
paragraph.release();
- int /*long*/ textLength = attrStr.length();
+ long /*int*/ textLength = attrStr.length();
for (int i = 0; i < stylesCount - 1; i++) {
StyleItem run = styles[i];
if (run.style == null) continue;
@@ -314,8 +314,8 @@ void computeRuns() {
int numberOfLines;
layoutManager.glyphRangeForTextContainer(textContainer);
- int /*long*/ numberOfGlyphs = layoutManager.numberOfGlyphs(), index;
- int /*long*/ rangePtr = OS.malloc(NSRange.sizeof);
+ long /*int*/ numberOfGlyphs = layoutManager.numberOfGlyphs(), index;
+ long /*int*/ rangePtr = OS.malloc(NSRange.sizeof);
NSRange lineRange = new NSRange();
for (numberOfLines = 0, index = 0; index < numberOfGlyphs; numberOfLines++){
layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
@@ -442,7 +442,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
pt.x = x;
pt.y = y;
NSRange range = new NSRange();
- int /*long*/ numberOfGlyphs = layoutManager.numberOfGlyphs();
+ long /*int*/ numberOfGlyphs = layoutManager.numberOfGlyphs();
if (numberOfGlyphs > 0) {
range.location = 0;
range.length = numberOfGlyphs;
@@ -457,8 +457,8 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
if (hasSelection) {
range.location = translateOffset(selectionStart);
range.length = translateOffset(selectionEnd - selectionStart + 1);
- int /*long*/ [] rectCount = new int /*long*/ [1];
- int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
+ long /*int*/ [] rectCount = new long /*int*/ [1];
+ long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
for (int k = 0; k < rectCount[0]; k++, pArray += NSRect.sizeof) {
OS.memmove(rect, pArray, NSRect.sizeof);
fixRect(rect);
@@ -483,7 +483,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
if (numberOfGlyphs > 0) {
range.location = 0;
range.length = numberOfGlyphs;
- float /*double*/ [] fg = gc.data.foreground;
+ double /*float*/ [] fg = gc.data.foreground;
boolean defaultFg = fg[0] == 0 && fg[1] == 0 && fg[2] == 0 && fg[3] == 1 && gc.data.alpha == 255;
if (!defaultFg) {
for (int i = 0; i < stylesCount - 1; i++) {
@@ -527,12 +527,12 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
range.location = Math.max(lineStart, start);
range.length = Math.min(lineEnd, end) + 1 - range.location;
if (range.length > 0) {
- int /*long*/ [] rectCount = new int /*long*/ [1];
- int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
+ long /*int*/ [] rectCount = new long /*int*/ [1];
+ long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
NSRect rect = new NSRect();
gc.handle.saveGraphicsState();
- float /*double*/ baseline = layoutManager.typesetter().baselineOffsetInLayoutManager(layoutManager, lineStart);
- float /*double*/ [] color = null;
+ double /*float*/ baseline = layoutManager.typesetter().baselineOffsetInLayoutManager(layoutManager, lineStart);
+ double /*float*/ [] color = null;
if (style.underlineColor != null) color = style.underlineColor.handle;
if (color == null && style.foreground != null) color = style.foreground.handle;
if (color != null) {
@@ -541,15 +541,15 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
for (int k = 0; k < rectCount[0]; k++, pArray += NSRect.sizeof) {
OS.memmove(rect, pArray, NSRect.sizeof);
fixRect(rect);
- float /*double*/ underlineX = pt.x + rect.x;
- float /*double*/ underlineY = pt.y + rect.y + rect.height - baseline + 1;
+ double /*float*/ underlineX = pt.x + rect.x;
+ double /*float*/ underlineY = pt.y + rect.y + rect.height - baseline + 1;
NSBezierPath path = NSBezierPath.bezierPath();
switch (style.underlineStyle) {
case SWT.UNDERLINE_ERROR: {
path.setLineWidth(2f);
path.setLineCapStyle(OS.NSRoundLineCapStyle);
path.setLineJoinStyle(OS.NSRoundLineJoinStyle);
- path.setLineDash(new float /*double*/ []{1, 3f}, 2, 0);
+ path.setLineDash(new double /*float*/ []{1, 3f}, 2, 0);
point.x = underlineX;
point.y = underlineY + 0.5f;
path.moveToPoint(point);
@@ -563,10 +563,10 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
path.setLineWidth(1.0f);
path.setLineCapStyle(OS.NSButtLineCapStyle);
path.setLineJoinStyle(OS.NSMiterLineJoinStyle);
- float /*double*/ lineBottom = pt.y + rect.y + rect.height;
+ double /*float*/ lineBottom = pt.y + rect.y + rect.height;
float squigglyThickness = 1;
float squigglyHeight = 2 * squigglyThickness;
- float /*double*/ squigglyY = Math.min(underlineY - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
+ double /*float*/ squigglyY = Math.min(underlineY - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
float[] points = computePolyline((int)underlineX, (int)squigglyY, (int)(underlineX + rect.width), (int)(squigglyY + squigglyHeight));
point.x = points[0] + 0.5f;
point.y = points[1] + 0.5f;
@@ -595,11 +595,11 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
range.location = Math.max(lineStart, start);
range.length = Math.min(lineEnd, end) + 1 - range.location;
if (range.length > 0) {
- int /*long*/ [] rectCount = new int /*long*/ [1];
- int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
+ long /*int*/ [] rectCount = new long /*int*/ [1];
+ long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
NSRect rect = new NSRect();
gc.handle.saveGraphicsState();
- float /*double*/ [] color = null;
+ double /*float*/ [] color = null;
if (style.borderColor != null) color = style.borderColor.handle;
if (color == null && style.foreground != null) color = style.foreground.handle;
if (color != null) {
@@ -612,9 +612,9 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
case SWT.BORDER_DASH: dashes = width != 0 ? GC.LINE_DASH : GC.LINE_DASH_ZERO; break;
case SWT.BORDER_DOT: dashes = width != 0 ? GC.LINE_DOT : GC.LINE_DOT_ZERO; break;
}
- float /*double*/ [] lengths = null;
+ double /*float*/ [] lengths = null;
if (dashes != null) {
- lengths = new float /*double*/[dashes.length];
+ lengths = new double /*float*/[dashes.length];
for (int k = 0; k < lengths.length; k++) {
lengths[k] = width == 0 ? dashes[k] : dashes[k] * width;
}
@@ -645,7 +645,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
}
void fixRect(NSRect rect) {
- float /*double*/ right = -1;
+ double /*float*/ right = -1;
for (int j = 0; j < lineBounds.length; j++) {
NSRect line = lineBounds[j];
if (rect.y <= line.y && line.y <= rect.y + rect.height) {
@@ -771,8 +771,8 @@ public Rectangle getBounds(int start, int end) {
NSRange range = new NSRange();
range.location = start;
range.length = end - start + 1;
- int /*long*/ [] rectCount = new int /*long*/ [1];
- int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
+ long /*int*/ [] rectCount = new long /*int*/ [1];
+ long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
NSRect rect = new NSRect();
int left = 0x7FFFFFFF, right = 0;
int top = 0x7FFFFFFF, bottom = 0;
@@ -879,7 +879,7 @@ 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*/ glyphOffset = layoutManager.glyphIndexForCharacterAtIndex(offset);
+ long /*int*/ glyphOffset = layoutManager.glyphIndexForCharacterAtIndex(offset);
NSRange range = new NSRange();
range.location = glyphOffset;
range.length = 1;
@@ -1070,7 +1070,7 @@ public Point getLocation(int offset, boolean trailing) {
return new Point((int)(rect.x + rect.width), (int)rect.y);
} else {
offset = translateOffset(offset);
- int /*long*/ glyphIndex = layoutManager.glyphIndexForCharacterAtIndex(offset);
+ long /*int*/ glyphIndex = layoutManager.glyphIndexForCharacterAtIndex(offset);
NSRect rect = layoutManager.lineFragmentUsedRectForGlyphAtIndex(glyphIndex, 0);
NSPoint point = layoutManager.locationForGlyphAtIndex(glyphIndex);
boolean rtl = false;
@@ -1078,13 +1078,13 @@ public Point getLocation(int offset, boolean trailing) {
range.location = glyphIndex;
range.length = 1;
byte[] bidiLevels = new byte[1];
- int /*long*/ result = layoutManager.getGlyphsInRange(range, 0, 0, 0, 0, bidiLevels);
+ long /*int*/ result = layoutManager.getGlyphsInRange(range, 0, 0, 0, 0, bidiLevels);
if (result > 0) {
rtl = (bidiLevels[0] & 1) != 0;
}
if (trailing != rtl) {
- int /*long*/ [] rectCount = new int /*long*/ [1];
- int /*long*/ pArray = layoutManager.rectArrayForGlyphRange(range, range, textContainer, rectCount);
+ long /*int*/ [] rectCount = new long /*int*/ [1];
+ long /*int*/ pArray = layoutManager.rectArrayForGlyphRange(range, range, textContainer, rectCount);
if (rectCount[0] > 0) {
NSRect bounds = new NSRect();
OS.memmove(bounds, pArray, NSRect.sizeof);
@@ -1261,8 +1261,8 @@ public int getOffset(int x, int y, int[] trailing) {
NSPoint pt = new NSPoint();
pt.x = x;
pt.y = y;
- float /*double*/[] partialFraction = new float /*double*/[1];
- int /*long*/ glyphIndex = layoutManager.glyphIndexForPoint(pt, textContainer, partialFraction);
+ double /*float*/[] partialFraction = new double /*float*/[1];
+ long /*int*/ glyphIndex = layoutManager.glyphIndexForPoint(pt, textContainer, partialFraction);
int offset = (int)/*64*/layoutManager.characterIndexForGlyphAtIndex(glyphIndex);
offset = Math.min(untranslateOffset(offset), length - 1);
if (trailing != null) {
@@ -1557,14 +1557,14 @@ void initClasses () {
if (OS.objc_lookUpClass(className) != 0) return;
textLayoutCallback2 = new Callback(getClass(), "textLayoutProc", 2);
- int /*long*/ proc2 = textLayoutCallback2.getAddress();
+ long /*int*/ proc2 = textLayoutCallback2.getAddress();
if (proc2 == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
- int /*long*/ cellBaselineOffsetProc = OS.CALLBACK_cellBaselineOffset(proc2);
- int /*long*/ cellSizeProc = OS.CALLBACK_NSTextAttachmentCell_cellSize(proc2);
+ long /*int*/ cellBaselineOffsetProc = OS.CALLBACK_cellBaselineOffset(proc2);
+ long /*int*/ cellSizeProc = OS.CALLBACK_NSTextAttachmentCell_cellSize(proc2);
byte[] types = {'*','\0'};
int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF == 4 ? 2 : 3;
- int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSCell, className, 0);
+ long /*int*/ cls = OS.objc_allocateClassPair(OS.class_NSCell, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.class_addProtocol(cls, OS.protocol_NSTextAttachmentCell);
OS.class_addMethod(cls, OS.sel_cellSize, cellSizeProc, "@:");
@@ -2159,8 +2159,8 @@ public String toString () {
return "TextLayout {" + text + "}";
}
-static int /*long*/ textLayoutProc(int /*long*/ id, int /*long*/ sel) {
- int /*long*/ [] jniRef = new int /*long*/ [1];
+static long /*int*/ textLayoutProc(long /*int*/ id, long /*int*/ sel) {
+ long /*int*/ [] jniRef = new long /*int*/ [1];
OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (jniRef[0] == 0) return 0;
StyleItem run = (StyleItem) OS.JNIGetObject(jniRef[0]);
@@ -2174,14 +2174,14 @@ static int /*long*/ textLayoutProc(int /*long*/ id, int /*long*/ sel) {
size.width = metrics.width;
size.height = metrics.ascent + metrics.descent;
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc(NSSize.sizeof);
+ long /*int*/ result = OS.malloc(NSSize.sizeof);
OS.memmove(result, size, NSSize.sizeof);
return result;
} else if (sel == OS.sel_cellBaselineOffset) {
NSPoint point = new NSPoint();
point.y = -metrics.descent;
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc(NSPoint.sizeof);
+ long /*int*/ result = OS.malloc(NSPoint.sizeof);
OS.memmove(result, point, NSPoint.sizeof);
return result;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
index c03fa48bcc..5a4010bc88 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
@@ -135,7 +135,7 @@ public void addSelectionListener(SelectionListener listener) {
addListener(SWT.DefaultSelection,typedListener);
}
-NSSize cellSizeForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSSize cellSizeForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
NSSize size = super.cellSizeForBounds(id, sel, cellFrame);
if (image != null && ((style & (SWT.CHECK|SWT.RADIO)) !=0)) {
NSSize imageSize = image.handle.size();
@@ -161,7 +161,7 @@ NSSize cellSizeForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
NSAttributedString attribStr = createString(text, null, foreground, style, true, true, true);
NSRect rect = attribStr.boundingRectWithSize(wrapSize, OS.NSStringDrawingUsesLineFragmentOrigin);
attribStr.release();
- float /*double*/ trimHeight = size.height - titleRect.height;
+ double /*float*/ trimHeight = size.height - titleRect.height;
size.height = rect.height;
if (image != null && ((style & (SWT.CHECK|SWT.RADIO)) !=0)) {
NSSize imageSize = image.handle.size();
@@ -294,7 +294,7 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
return dragging;
}
-void drawImageWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ image, NSRect rect, int /*long*/ view) {
+void drawImageWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ image, NSRect rect, long /*int*/ view) {
/*
* Feature in Cocoa. Images touch the edge of rounded buttons
* when set to small size. The fix to subclass the button cell
@@ -310,7 +310,7 @@ void drawImageWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ i
super.drawImageWithFrameInView(id, sel, image, rect, view);
}
-void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cellRect, int /*long*/ viewid) {
+void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ viewid) {
if ((style & (SWT.CHECK|SWT.RADIO)) != 0 && backgroundImage != null) {
fillBackground (new NSView(viewid), NSGraphicsContext.currentContext(), cellRect, -1);
}
@@ -318,8 +318,8 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cel
if (image != null && ((style & (SWT.CHECK|SWT.RADIO)) !=0)) {
NSSize imageSize = image.handle.size();
NSCell nsCell = new NSCell(id);
- float /*double*/ x = 0;
- float /*double*/ y = (imageSize.height - cellRect.height)/2f;
+ double /*float*/ x = 0;
+ double /*float*/ y = (imageSize.height - cellRect.height)/2f;
NSRect imageRect = nsCell.imageRectForBounds(cellRect);
NSSize stringSize = ((NSButton)view).attributedTitle().size();
switch (style & (SWT.LEFT|SWT.RIGHT|SWT.CENTER)) {
@@ -349,7 +349,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cel
}
-NSRect drawTitleWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ title, NSRect titleRect, int /*long*/ view) {
+NSRect drawTitleWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ title, NSRect titleRect, long /*int*/ view) {
boolean wrap = (style & SWT.WRAP) != 0 && text.length() != 0;
if (wrap) {
NSSize wrapSize = new NSSize();
@@ -380,7 +380,7 @@ boolean drawsBackground() {
return background != null || backgroundImage != null;
}
-void drawWidget (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if ((style & SWT.ARROW) != 0) {
NSRect frame = view.frame();
int arrowSize = Math.min((int)frame.height, (int)frame.width) / 2;
@@ -541,7 +541,7 @@ boolean isDescribedByLabel () {
* This will cause the on state to momentarily appear while clicking on the checkbox. To avoid this, we override [NSCell nextState]
* to go directly to the desired state if we have a grayed checkbox.
*/
-int /*long*/ nextState(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ nextState(long /*int*/ id, long /*int*/ sel) {
if ((style & SWT.CHECK) != 0 && grayed) {
return ((NSButton)view).state() == OS.NSMixedState ? OS.NSOffState : OS.NSMixedState;
}
@@ -706,7 +706,7 @@ void setFont (NSFont font) {
}
}
-void setForeground (float /*double*/ [] color) {
+void setForeground (double /*float*/ [] color) {
((NSButton)view).setAttributedTitle(createString());
}
@@ -872,7 +872,7 @@ public void setText (String string) {
updateAlignment ();
}
-NSRect titleRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSRect titleRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
NSRect rect = super.titleRectForBounds(id, sel, cellFrame);
if (image != null && ((style & (SWT.CHECK|SWT.RADIO)) !=0)) {
NSSize imageSize = image.handle.size();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java
index b2b5edd798..707e765b30 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java
@@ -58,7 +58,7 @@ Canvas () {
/* Do nothing */
}
-int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+long /*int*/ attributedSubstringFromRange (long /*int*/ id, long /*int*/ sel, long /*int*/ range) {
if (ime != null) return ime.attributedSubstringFromRange (id, sel, range);
return super.attributedSubstringFromRange(id, sel, range);
}
@@ -106,7 +106,7 @@ public Canvas (Composite parent, int style) {
super (parent, style);
}
-int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ point) {
+long /*int*/ characterIndexForPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ point) {
if (ime != null) return ime.characterIndexForPoint (id, sel, point);
return super.characterIndexForPoint (id, sel, point);
}
@@ -136,7 +136,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height) {
drawBackground(gc, x, y, width, height, 0, 0);
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
super.drawBackground(id, context, rect);
if (glcontext != null) {
if (isObscured()) {
@@ -144,7 +144,7 @@ void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
context.saveGraphicsState();
context.setCompositingOperation(OS.NSCompositeClear);
if (visiblePath == null) {
- int /*long*/ visibleRegion = getVisibleRegion();
+ long /*int*/ visibleRegion = getVisibleRegion();
visiblePath = getPath(visibleRegion);
OS.DisposeRgn(visibleRegion);
}
@@ -157,17 +157,17 @@ void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
}
}
-void drawRect (int /*long*/ id, int /*long*/ sel, NSRect rect) {
+void drawRect (long /*int*/ id, long /*int*/ sel, NSRect rect) {
if (glcontext != null && glcontext.view() == null) glcontext.setView(view);
super.drawRect(id, sel, rect);
}
-void drawWidget (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
super.drawWidget (id, context, rect);
if (caret == null) return;
if (caret.isShowing) {
- int /*long*/ ctx = context.graphicsPort();
+ long /*int*/ ctx = context.graphicsPort();
OS.CGContextSaveGState (ctx);
OS.CGContextSetBlendMode (ctx, OS.kCGBlendModeDifference);
Image image = caret.image;
@@ -182,18 +182,18 @@ void drawWidget (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
NSSize size = imageHandle.size();
destRect.size.width = size.width;
destRect.size.height = size.height;
- int /*long*/ data = rep.bitmapData();
- int /*long*/ format = rep.bitmapFormat();
- int /*long*/ bpr = rep.bytesPerRow();
+ long /*int*/ data = rep.bitmapData();
+ long /*int*/ format = rep.bitmapFormat();
+ long /*int*/ bpr = rep.bytesPerRow();
int alphaInfo;
if (rep.hasAlpha()) {
alphaInfo = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? OS.kCGImageAlphaFirst : OS.kCGImageAlphaLast;
} else {
alphaInfo = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? OS.kCGImageAlphaNoneSkipFirst : OS.kCGImageAlphaNoneSkipLast;
}
- int /*long*/ provider = OS.CGDataProviderCreateWithData(0, data, bpr * (int)size.height, 0);
- int /*long*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
- int /*long*/ cgImage = OS.CGImageCreate((int)size.width, (int)size.height, rep.bitsPerSample(), rep.bitsPerPixel(), bpr, colorspace, alphaInfo, provider, 0, true, 0);
+ long /*int*/ provider = OS.CGDataProviderCreateWithData(0, data, bpr * (int)size.height, 0);
+ long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long /*int*/ cgImage = OS.CGImageCreate((int)size.width, (int)size.height, rep.bitsPerSample(), rep.bitsPerPixel(), bpr, colorspace, alphaInfo, provider, 0, true, 0);
OS.CGColorSpaceRelease(colorspace);
OS.CGDataProviderRelease(provider);
OS.CGContextScaleCTM (ctx, 1, -1);
@@ -207,17 +207,17 @@ void drawWidget (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
drawRect.origin.y = caret.y;
drawRect.size.width = caret.width != 0 ? caret.width : Caret.DEFAULT_WIDTH;
drawRect.size.height = caret.height;
- int /*long*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
OS.CGContextSetFillColorSpace(ctx, colorspace);
OS.CGColorSpaceRelease(colorspace);
- OS.CGContextSetFillColor(ctx, new float /*double*/ [] {1, 1, 1, 1});
+ OS.CGContextSetFillColor(ctx, new double /*float*/ [] {1, 1, 1, 1});
OS.CGContextFillRect(ctx, drawRect);
}
OS.CGContextRestoreGState(ctx);
}
}
-NSRect firstRectForCharacterRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+NSRect firstRectForCharacterRange (long /*int*/ id, long /*int*/ sel, long /*int*/ range) {
if (ime != null) return ime.firstRectForCharacterRange (id, sel, range);
return super.firstRectForCharacterRange (id, sel, range);
}
@@ -262,7 +262,7 @@ public IME getIME () {
return ime;
}
-boolean hasMarkedText (int /*long*/ id, int /*long*/ sel) {
+boolean hasMarkedText (long /*int*/ id, long /*int*/ sel) {
if (ime != null) return ime.hasMarkedText (id, sel);
return super.hasMarkedText (id, sel);
}
@@ -271,30 +271,30 @@ boolean imeInComposition () {
return ime != null && ime.isInlineEnabled () && ime.startOffset != -1;
}
-boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
+boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
if (ime != null) {
if (!ime.insertText (id, sel, string)) return false;
}
return super.insertText (id, sel, string);
}
-boolean isOpaque (int /*long*/ id, int /*long*/ sel) {
+boolean isOpaque (long /*int*/ id, long /*int*/ sel) {
if (glcontext != null) return true;
return super.isOpaque(id, sel);
}
-NSRange markedRange (int /*long*/ id, int /*long*/ sel) {
+NSRange markedRange (long /*int*/ id, long /*int*/ sel) {
if (ime != null) return ime.markedRange (id, sel);
return super.markedRange (id, sel);
}
-boolean readSelectionFromPasteboard(int /*long*/ id, int /*long*/ sel, int /*long*/ pasteboard) {
+boolean readSelectionFromPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ pasteboard) {
boolean result = false;
NSPasteboard pboard = new NSPasteboard(pasteboard);
NSArray availableTypes = pboard.types();
NSString type;
- for (int /*long*/ i = 0; i < supportedPboardTypes.count(); i++) {
+ for (long /*int*/ i = 0; i < supportedPboardTypes.count(); i++) {
if (result) break;
type = new NSString(supportedPboardTypes.objectAtIndex(i));
if (availableTypes.containsObject(type)) {
@@ -487,7 +487,7 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
if (isFocus) caret.setFocus ();
}
-NSRange selectedRange (int /*long*/ id, int /*long*/ sel) {
+NSRange selectedRange (long /*int*/ id, long /*int*/ sel) {
if (ime != null) return ime.selectedRange (id, sel);
return super.selectedRange (id, sel);
}
@@ -569,19 +569,19 @@ public void setIME (IME ime) {
this.ime = ime;
}
-boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ range) {
+boolean setMarkedText_selectedRange (long /*int*/ id, long /*int*/ sel, long /*int*/ string, long /*int*/ range) {
if (ime != null) {
if (!ime.setMarkedText_selectedRange (id, sel, string, range)) return false;
}
return super.setMarkedText_selectedRange (id, sel, string, range);
}
-int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) {
+long /*int*/ validAttributesForMarkedText (long /*int*/ id, long /*int*/ sel) {
if (ime != null) return ime.validAttributesForMarkedText (id, sel);
return super.validAttributesForMarkedText(id, sel);
}
-int /*long*/ validRequestorForSendType(int /*long*/ id, int /*long*/ sel, int /*long*/ sendType, int /*long*/ returnType) {
+long /*int*/ validRequestorForSendType(long /*int*/ id, long /*int*/ sel, long /*int*/ sendType, long /*int*/ returnType) {
if (id == view.id) {
Accessible acc = getAccessible();
if (acc != null) {
@@ -607,11 +607,11 @@ int /*long*/ validRequestorForSendType(int /*long*/ id, int /*long*/ sel, int /*
return super.validRequestorForSendType(id, sel, sendType, returnType);
}
-void updateOpenGLContext(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void updateOpenGLContext(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
if (glcontext != null) ((NSOpenGLContext)glcontext).update();
}
-void viewWillMoveToWindow(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void viewWillMoveToWindow(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
super.viewWillMoveToWindow(id, sel, arg0);
if (glcontext != null && id == view.id && arg0 != 0) {
Widget newShell = display.getWidget(new NSWindow(arg0).contentView());
@@ -625,21 +625,21 @@ void viewWillMoveToWindow(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0)
}
}
-boolean writeSelectionToPasteboard(int /*long*/ id, int /*long*/ sel, int /*long*/ pasteboardObj, int /*long*/ typesObj) {
+boolean writeSelectionToPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ pasteboardObj, long /*int*/ typesObj) {
boolean result = false;
NSPasteboard pboard = new NSPasteboard(pasteboardObj);
NSArray types = new NSArray(typesObj);
NSMutableArray typesToDeclare = NSMutableArray.arrayWithCapacity(2);
NSString type;
- for (int /*long*/ i = 0; i < supportedPboardTypes.count(); i++) {
+ for (long /*int*/ i = 0; i < supportedPboardTypes.count(); i++) {
type = new NSString(supportedPboardTypes.objectAtIndex(i));
if (types.containsObject(type)) typesToDeclare.addObject(type);
}
if (typesToDeclare.count() > 0) {
pboard.declareTypes(typesToDeclare, view);
- for (int /*long*/ i = 0; i < typesToDeclare.count(); i++) {
+ for (long /*int*/ i = 0; i < typesToDeclare.count(); i++) {
type = new NSString(typesToDeclare.objectAtIndex(i));
if (writeSelectionToPasteboard(pboard, type)) result = true;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java
index 7482cecba3..d67506821d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java
@@ -91,7 +91,7 @@ public ColorDialog(Shell parent, int style) {
checkSubclass ();
}
-void changeColor(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void changeColor(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
selected = true;
}
@@ -167,7 +167,7 @@ public RGB open() {
}
}
SWTPanelDelegate delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
- int /*long*/ jniRef = OS.NewGlobalRef(this);
+ long /*int*/ jniRef = OS.NewGlobalRef(this);
if (jniRef == 0) error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
panel.setDelegate(delegate);
@@ -183,7 +183,7 @@ public RGB open() {
if (selected) {
NSColor color = panel.color();
if (color != null) {
- float /*double*/ [] handle = display.getNSColorRGB(color);
+ double /*float*/ [] handle = display.getNSColorRGB(color);
rgb = new RGB((int)(handle[0] * 255), (int)(handle[1] * 255), (int)(handle[2] * 255));
}
}
@@ -192,7 +192,7 @@ public RGB open() {
rgbs = new RGB[length];
for (int i=0; i<length; i++) {
NSString key = new NSString(keys.objectAtIndex(i));
- float /*double*/ [] handle = display.getNSColorRGB(colorList.colorWithKey(key));
+ double /*float*/ [] handle = display.getNSColorRGB(colorList.colorWithKey(key));
rgbs[i] = new RGB((int)(handle[0] * 255), (int)(handle[1] * 255), (int)(handle[2] * 255));
}
colorList.release();
@@ -228,7 +228,7 @@ public void setRGBs(RGB[] rgbs) {
this.rgbs = rgbs;
}
-void windowWillClose(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void windowWillClose(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
NSApplication.sharedApplication().stop(null);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
index 3d0edac256..fb7606e78d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
@@ -136,7 +136,7 @@ public void add (String string) {
NSAttributedString str = createString(string);
if ((style & SWT.READ_ONLY) != 0) {
NSPopUpButton widget = (NSPopUpButton)view;
- int /*long*/ selection = widget.indexOfSelectedItem();
+ long /*int*/ selection = widget.indexOfSelectedItem();
NSMenu nsMenu = widget.menu();
NSMenuItem nsItem = (NSMenuItem)new NSMenuItem().alloc();
NSString empty = NSString.string();
@@ -181,7 +181,7 @@ public void add (String string, int index) {
NSAttributedString str = createString(string);
if ((style & SWT.READ_ONLY) != 0) {
NSPopUpButton widget = (NSPopUpButton)view;
- int /*long*/ selection = widget.indexOfSelectedItem();
+ long /*int*/ selection = widget.indexOfSelectedItem();
NSMenu nsMenu = widget.menu();
NSMenuItem nsItem = (NSMenuItem)new NSMenuItem().alloc();
NSString empty = NSString.string();
@@ -281,7 +281,7 @@ public void addVerifyListener (VerifyListener listener) {
addListener (SWT.Verify, typedListener);
}
-boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean becomeFirstResponder (long /*int*/ id, long /*int*/ sel) {
receivingFocus = true;
boolean result = super.becomeFirstResponder (id, sel);
receivingFocus = false;
@@ -346,13 +346,13 @@ public void clearSelection () {
}
}
-void setObjectValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void setObjectValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
super.setObjectValue(id, sel, ignoreSetObject ? arg0 : createString(text).id);
}
-void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void comboBoxSelectionDidChange(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
NSComboBox widget = (NSComboBox)view;
- int /*long*/ tableSelection = widget.indexOfSelectedItem();
+ long /*int*/ tableSelection = widget.indexOfSelectedItem();
widget.selectItemAtIndex(tableSelection);
NSAttributedString attStr = new NSAttributedString (widget.itemObjectValueAtIndex(tableSelection));
NSString nsString = attStr.string();
@@ -456,12 +456,12 @@ void createWidget() {
}
}
-void comboBoxWillDismiss(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void comboBoxWillDismiss(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
display.comboPoppedUp = false;
listVisible = false;
}
-void comboBoxWillPopUp(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void comboBoxWillPopUp(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
display.comboPoppedUp = true;
listVisible = true;
}
@@ -568,7 +568,7 @@ public void deselectAll () {
sendEvent (SWT.Modify);
} else {
NSComboBox widget = (NSComboBox)view;
- int /*long*/ index = widget.indexOfSelectedItem();
+ long /*int*/ index = widget.indexOfSelectedItem();
if (index != -1) widget.deselectItemAtIndex(index);
}
}
@@ -583,7 +583,7 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
NSPoint textViewMouse = new NSPoint();
textViewMouse.x = x;
textViewMouse.y = y;
- int /*long*/ charPosition = feAsTextView.characterIndexForInsertionAtPoint(textViewMouse);
+ long /*int*/ charPosition = feAsTextView.characterIndexForInsertionAtPoint(textViewMouse);
if (charPosition != OS.NSNotFound && charPosition >= selectedRange.location && charPosition < (selectedRange.location + selectedRange.length)) {
if (super.dragDetect(x, y, filter, consume)) {
if (consume != null) consume[0] = true;
@@ -646,8 +646,8 @@ public Point getCaretLocation() {
NSLayoutManager layoutManager = widget.layoutManager();
NSTextContainer container = widget.textContainer();
NSRange range = widget.selectedRange();
- int /*long*/ [] rectCount = new int /*long*/ [1];
- int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, container, rectCount);
+ long /*int*/ [] rectCount = new long /*int*/ [1];
+ long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, container, rectCount);
NSRect rect = new NSRect();
if (rectCount[0] > 0) OS.memmove(rect, pArray, NSRect.sizeof);
NSPoint pt = new NSPoint();
@@ -888,7 +888,7 @@ char [] getText (int start, int end) {
NSRange range = new NSRange ();
range.location = start;
if (end == -1) {
- int /*long*/ length = str.length();
+ long /*int*/ length = str.length();
range.length = length - start;
} else {
range.length = end - start;
@@ -1018,19 +1018,19 @@ public int indexOf (String string, int start) {
return -1;
}
-boolean isEventView (int /*long*/ id) {
+boolean isEventView (long /*int*/ id) {
return true;
}
-void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+void menuWillOpen(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
listVisible = true;
}
-void menuDidClose(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+void menuDidClose(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
listVisible = false;
}
-void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
// If this is a combo box with an editor field and the control is disposed
// while the view's cell editor is open we crash while tearing down the
// popup window. Fix is to retain the view before letting Cocoa track
@@ -1311,7 +1311,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
boolean result = super.sendKeyEvent (nsEvent, type);
if (!result) return result;
int stateMask = 0;
- int /*long*/ modifierFlags = nsEvent.modifierFlags();
+ long /*int*/ modifierFlags = nsEvent.modifierFlags();
if ((modifierFlags & OS.NSAlternateKeyMask) != 0) stateMask |= SWT.ALT;
if ((modifierFlags & OS.NSShiftKeyMask) != 0) stateMask |= SWT.SHIFT;
if ((modifierFlags & OS.NSControlKeyMask) != 0) stateMask |= SWT.CONTROL;
@@ -1377,7 +1377,7 @@ void setFont (NSFont font) {
updateItems();
}
-void setForeground (float /*double*/ [] color) {
+void setForeground (double /*float*/ [] color) {
super.setForeground(color);
updateItems();
if ((style & SWT.READ_ONLY) == 0) {
@@ -1664,14 +1664,14 @@ public void setVisibleItemCount (int count) {
}
}
-boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/ sel, int /*long*/ affectedCharRange, int /*long*/ replacementString) {
+boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/ sel, long /*int*/ affectedCharRange, long /*int*/ replacementString) {
NSRange range = new NSRange();
OS.memmove(range, affectedCharRange, NSRange.sizeof);
boolean result = callSuperBoolean(id, sel, range, replacementString);
if (hooks (SWT.Verify)) {
String string = new NSString(replacementString).getString();
NSEvent currentEvent = display.application.currentEvent();
- int /*long*/ type = currentEvent.type();
+ long /*int*/ type = currentEvent.type();
if (type != OS.NSKeyDown && type != OS.NSKeyUp) currentEvent = null;
String newText = verifyText(string, (int)/*64*/range.location, (int)/*64*/(range.location+range.length), currentEvent);
if (newText == null) return false;
@@ -1705,18 +1705,18 @@ boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/
return result;
}
-void textViewDidChangeSelection(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textViewDidChangeSelection(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
NSNotification notification = new NSNotification(aNotification);
NSText editor = new NSText(notification.object().id);
selectionRange = editor.selectedRange();
}
-void textDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
super.textDidChange (id, sel, aNotification);
postEvent (SWT.Modify);
}
-NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) {
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(long /*int*/ id, long /*int*/ sel, long /*int*/ aTextView, long /*int*/ oldSelectedCharRange, long /*int*/ newSelectedCharRange) {
/*
* If the selection is changing as a result of the receiver getting focus
* then return the receiver's last selection range, otherwise the full
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
index e2622c6878..f9c3e8e9a0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
@@ -127,14 +127,14 @@ Control [] _getTabList () {
return tabList;
}
-boolean acceptsFirstMouse (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+boolean acceptsFirstMouse (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if ((state & CANVAS) != 0) {
return true;
}
return super.acceptsFirstMouse (id, sel, theEvent);
}
-boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
if ((state & CANVAS) != 0) {
if ((style & SWT.NO_FOCUS) == 0 && hooksKeys ()) {
if (contentView().subviews().count() == 0) return true;
@@ -144,9 +144,9 @@ boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
return super.acceptsFirstResponder (id, sel);
}
-int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
NSString nsAttributeName = new NSString(arg0);
- int /*long*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
+ long /*int*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
if ((state & CANVAS) != 0) {
// If this Composite has an Accessible that defined a role, return that, unless the
@@ -177,7 +177,7 @@ int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int
}
-boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
if (id == accessibleHandle()) {
// If a Composite or subclass has an Accessible it should not be ignored.
if (accessible != null) return accessible.internal_accessibilityIsIgnored(ACC.CHILDID_SELF);
@@ -357,7 +357,7 @@ public void drawBackground(GC gc, int x, int y, int width, int height, int offse
}
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
if ((state & CANVAS) != 0) {
if ((style & SWT.NO_BACKGROUND) == 0) {
@@ -570,7 +570,7 @@ public boolean isLayoutDeferred () {
return findDeferredControl () != null;
}
-boolean isOpaque (int /*long*/ id, int /*long*/ sel) {
+boolean isOpaque (long /*int*/ id, long /*int*/ sel) {
if ((state & CANVAS) != 0) {
if (id == view.id) {
return region == null && background != null && background[3] == 1 && !isObscured ();
@@ -584,7 +584,7 @@ boolean isTabGroup () {
return super.isTabGroup ();
}
-void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (hasFocus()) {
if ((state & CANVAS) != 0) {
Shell s = this.getShell();
@@ -882,22 +882,22 @@ Point minimumSize (int wHint, int Hint, boolean changed) {
return new Point (width, height);
}
-boolean mouseEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent, int type) {
+boolean mouseEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent, int type) {
boolean result = super.mouseEvent (id, sel, theEvent, type);
return (state & CANVAS) == 0 ? result : new NSEvent (theEvent).type () != OS.NSLeftMouseDown;
}
-void pageDown(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void pageDown(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
if ((state & CANVAS) != 0) return;
super.pageDown(id, sel, sender);
}
-void pageUp(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void pageUp(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
if ((state & CANVAS) != 0) return;
super.pageUp(id, sel, sender);
}
-void reflectScrolledClipView (int /*long*/ id, int /*long*/ sel, int /*long*/ aClipView) {
+void reflectScrolledClipView (long /*int*/ id, long /*int*/ sel, long /*int*/ aClipView) {
if ((state & CANVAS) != 0) return;
super.reflectScrolledClipView (id, sel, aClipView);
}
@@ -941,15 +941,15 @@ void resized () {
}
}
-void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void scrollWheel (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if ((state & CANVAS) != 0) {
NSView view = scrollView != null ? scrollView : this.view;
if (id == view.id) {
getShell().deferFlushing();
NSEvent nsEvent = new NSEvent(theEvent);
boolean handled = false;
- float /*double*/ deltaY = nsEvent.deltaY();
- float /*double*/ deltaX = nsEvent.deltaX ();
+ double /*float*/ deltaY = nsEvent.deltaY();
+ double /*float*/ deltaX = nsEvent.deltaX ();
if ((hooks(SWT.Gesture) || filters (SWT.Gesture))) {
if (deltaX != 0 || deltaY != 0) {
if (!gestureEvent(id, theEvent, SWT.GESTURE_PAN)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
index c5f471ed11..dded880d88 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
@@ -60,13 +60,13 @@ public abstract class Control extends Widget implements Drawable {
Object layoutData;
int drawCount;
Menu menu;
- float /*double*/ [] foreground, background;
+ double /*float*/ [] foreground, background;
Image backgroundImage;
Font font;
Cursor cursor;
Region region;
NSBezierPath regionPath;
- int /*long*/ visibleRgn;
+ long /*int*/ visibleRgn;
Accessible accessible;
boolean touchEnabled;
@@ -118,14 +118,14 @@ public Control (Composite parent, int style) {
createWidget ();
}
-boolean acceptsFirstMouse (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+boolean acceptsFirstMouse (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
Shell shell = getShell ();
if ((shell.style & SWT.ON_TOP) != 0) return true;
return super.acceptsFirstMouse (id, sel, theEvent);
}
-int /*long*/ accessibleHandle() {
- int /*long*/ returnValue = view.id;
+long /*int*/ accessibleHandle() {
+ long /*int*/ returnValue = view.id;
if (view instanceof NSControl) {
if (((NSControl) view).cell() != null) {
@@ -136,7 +136,7 @@ int /*long*/ accessibleHandle() {
return returnValue;
}
-int /*long*/ accessibilityActionDescription(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+long /*int*/ accessibilityActionDescription(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
if (id == accessibleHandle() && accessible != null) {
NSString actionName = new NSString(arg0);
id returnValue = accessible.internal_accessibilityActionDescription(actionName, ACC.CHILDID_SELF);
@@ -145,8 +145,8 @@ int /*long*/ accessibilityActionDescription(int /*long*/ id, int /*long*/ sel, i
return super.accessibilityActionDescription(id, sel, arg0);
}
-int /*long*/ accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
- int /*long*/ returnValue = super.accessibilityActionNames(id, sel);
+long /*int*/ accessibilityActionNames(long /*int*/ id, long /*int*/ sel) {
+ long /*int*/ returnValue = super.accessibilityActionNames(id, sel);
if (handleIsAccessible(id)) {
if (accessible != null) {
NSArray baseArray = accessible.internal_accessibilityActionNames(ACC.CHILDID_SELF);
@@ -163,9 +163,9 @@ int /*long*/ accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
return returnValue;
}
-int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
- int /*long*/ returnValue = 0;
+ long /*int*/ returnValue = 0;
if (handleIsAccessible(id) && accessible != null) {
// See if the accessible is defining the attribute set for the control.
@@ -191,11 +191,11 @@ int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
* or overridden by the SWT Accessible. false if the Cocoa defaults for the control should
* be used.
*/
-boolean handleIsAccessible(int /*long*/ id) {
+boolean handleIsAccessible(long /*int*/ id) {
return id == accessibleHandle();
}
-int /*long*/ accessibilityParameterizedAttributeNames(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ accessibilityParameterizedAttributeNames(long /*int*/ id, long /*int*/ sel) {
if (handleIsAccessible(id) && accessible != null) {
NSArray returnValue = accessible.internal_accessibilityParameterizedAttributeNames(ACC.CHILDID_SELF);
@@ -205,7 +205,7 @@ int /*long*/ accessibilityParameterizedAttributeNames(int /*long*/ id, int /*lon
return super.accessibilityParameterizedAttributeNames(id, sel);
}
-void accessibilityPerformAction(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void accessibilityPerformAction(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
if (handleIsAccessible(id) && accessible != null) {
NSString action = new NSString(arg0);
if (accessible.internal_accessibilityPerformAction(action, ACC.CHILDID_SELF)) return;
@@ -213,7 +213,7 @@ void accessibilityPerformAction(int /*long*/ id, int /*long*/ sel, int /*long*/
super.accessibilityPerformAction(id, sel, arg0);
}
-int /*long*/ accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ accessibilityFocusedUIElement(long /*int*/ id, long /*int*/ sel) {
id returnValue = null;
if (handleIsAccessible(id) && accessible != null) {
@@ -228,7 +228,7 @@ int /*long*/ accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
return returnValue.id;
}
-int /*long*/ accessibilityHitTest(int /*long*/ id, int /*long*/ sel, NSPoint point) {
+long /*int*/ accessibilityHitTest(long /*int*/ id, long /*int*/ sel, NSPoint point) {
id returnValue = null;
if (handleIsAccessible(id) && accessible != null) {
@@ -243,9 +243,9 @@ int /*long*/ accessibilityHitTest(int /*long*/ id, int /*long*/ sel, NSPoint poi
return returnValue.id;
}
-int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
NSString attribute = new NSString(arg0);
- int /*long*/ returnValue = 0;
+ long /*int*/ returnValue = 0;
id returnObject = null;
if (handleIsAccessible(id) && accessible != null) {
@@ -272,7 +272,7 @@ int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int
return returnValue;
}
-int /*long*/ accessibilityAttributeValue_forParameter(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+long /*int*/ accessibilityAttributeValue_forParameter(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
NSString attribute = new NSString(arg0);
id returnValue = null;
@@ -290,7 +290,7 @@ int /*long*/ accessibilityAttributeValue_forParameter(int /*long*/ id, int /*lon
return returnValue.id;
}
-boolean accessibilityIsAttributeSettable(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+boolean accessibilityIsAttributeSettable(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
boolean returnValue = false;
if (handleIsAccessible(id) && accessible != null) {
NSString attribute = new NSString (arg0);
@@ -302,7 +302,7 @@ boolean accessibilityIsAttributeSettable(int /*long*/ id, int /*long*/ sel, int
return returnValue;
}
-void accessibilitySetValue_forAttribute(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+void accessibilitySetValue_forAttribute(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
if (handleIsAccessible(id) && accessible != null) {
id value = new id(arg0);
NSString attribute = new NSString(arg1);
@@ -732,25 +732,25 @@ public void addTraverseListener (TraverseListener listener) {
addListener (SWT.Traverse,typedListener);
}
-boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean becomeFirstResponder (long /*int*/ id, long /*int*/ sel) {
if ((state & DISABLED) != 0) return false;
return super.becomeFirstResponder (id, sel);
}
-void beginGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void beginGestureWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
if (!gestureEvent(id, event, SWT.GESTURE_BEGIN)) return;
super.beginGestureWithEvent(id, sel, event);
}
-void endGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void endGestureWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
if (!gestureEvent(id, event, SWT.GESTURE_END)) return;
super.endGestureWithEvent(id, sel, event);
}
-void calculateVisibleRegion (NSView view, int /*long*/ visibleRgn, boolean clipChildren) {
- int /*long*/ tempRgn = OS.NewRgn ();
+void calculateVisibleRegion (NSView view, long /*int*/ visibleRgn, boolean clipChildren) {
+ long /*int*/ tempRgn = OS.NewRgn ();
if (!view.isHiddenOrHasHiddenAncestor() && isDrawing()) {
- int /*long*/ childRgn = OS.NewRgn ();
+ long /*int*/ childRgn = OS.NewRgn ();
NSWindow window = view.window ();
NSView contentView = window.contentView();
NSView frameView = contentView.superview();
@@ -769,7 +769,7 @@ void calculateVisibleRegion (NSView view, int /*long*/ visibleRgn, boolean clipC
if (OS.EmptyRgn (visibleRgn)) break;
if (clipChildren || tempView.id != view.id) {
NSArray subviews = tempView.subviews();
- int /*long*/ count = subviews.count();
+ long /*int*/ count = subviews.count();
for (int i = 0; i < count; i++) {
NSView child = new NSView (subviews.objectAtIndex(count - i - 1));
if (lastControl != null && child.id == lastControl.id) break;
@@ -792,7 +792,7 @@ void calculateVisibleRegion (NSView view, int /*long*/ visibleRgn, boolean clipC
OS.DisposeRgn (tempRgn);
}
-void cancelOperation(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void cancelOperation(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
// Cmd-. and escape arrive here. Forward the current event as a key event.
if (hasKeyboardFocus(id)) {
NSEvent nsEvent = NSApplication.sharedApplication().currentEvent();
@@ -952,7 +952,7 @@ NSView contentView () {
return view;
}
-NSAttributedString createString (String string, Font font, float /*double*/ [] foreground, int alignment, boolean wrap, boolean enabled, boolean mnemonics) {
+NSAttributedString createString (String string, Font font, double /*float*/ [] foreground, int alignment, boolean wrap, boolean enabled, boolean mnemonics) {
NSMutableDictionary dict = ((NSMutableDictionary)new NSMutableDictionary().alloc()).initWithCapacity(5);
if (font == null) font = this.font != null ? this.font : defaultFont();
dict.setObject (font.handle, OS.NSFontAttributeName);
@@ -1037,7 +1037,7 @@ void destroyWidget () {
releaseHandle ();
}
-void doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ selector) {
+void doCommandBySelector (long /*int*/ id, long /*int*/ sel, long /*int*/ selector) {
if (hasKeyboardFocus(id)) {
if (imeInComposition ()) return;
Shell s = this.getShell();
@@ -1051,7 +1051,7 @@ void doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ select
* during this keystroke. This rule does not apply if the command key
* is down, because we likely triggered the current key sequence via flagsChanged.
*/
- int /*long*/ modifiers = nsEvent.modifierFlags();
+ long /*int*/ modifiers = nsEvent.modifierFlags();
if (s.keyInputHappened == false || (modifiers & OS.NSCommandKeyMask) != 0) {
s.keyInputHappened = true;
boolean [] consume = new boolean [1];
@@ -1165,9 +1165,9 @@ boolean dragDetect (int x, int y, boolean filter, boolean [] consume) {
*/
NSApplication application = NSApplication.sharedApplication();
boolean dragging = false;
- int /*long*/ eventType = OS.NSLeftMouseDown;
- float /*double*/ dragX = x;
- float /*double*/ dragY = y;
+ long /*int*/ eventType = OS.NSLeftMouseDown;
+ double /*float*/ dragX = x;
+ double /*float*/ dragY = y;
/**
* To check for an actual drag we need to pull off mouse moved and mouse up events
@@ -1227,7 +1227,7 @@ boolean drawsBackground() {
return true;
}
-void drawWidget (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id != paintView().id) return;
if (!hooks (SWT.Paint) && !filters (SWT.Paint)) return;
@@ -1253,7 +1253,7 @@ void enableWidget (boolean enabled) {
updateCursorRects (isEnabled ());
}
-boolean equals(float /*double*/ [] color1, float /*double*/ [] color2) {
+boolean equals(double /*float*/ [] color1, double /*float*/ [] color2) {
if (color1 == color2) return true;
if (color1 == null) return color2 == null;
if (color2 == null) return color1 == null;
@@ -1305,8 +1305,8 @@ void fillBackground (NSView view, NSGraphicsContext context, NSRect rect, int im
return;
}
- float /*double*/ [] background = control.background;
- float /*double*/ alpha;
+ double /*float*/ [] background = control.background;
+ double /*float*/ alpha;
if (background == null) {
if (isTransparent()) return;
background = control.defaultBackground ().handle;
@@ -1358,14 +1358,14 @@ void fixFocus (Control focusControl) {
}
}
-void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void flagsChanged (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (hasKeyboardFocus(id)) {
if ((state & WEBKIT_EVENTS_FIX) == 0) {
Shell s = this.getShell();
s.keyInputHappened = false;
int mask = 0;
NSEvent nsEvent = new NSEvent (theEvent);
- int /*long*/ modifiers = nsEvent.modifierFlags ();
+ long /*int*/ modifiers = nsEvent.modifierFlags ();
int keyCode = Display.translateKey (nsEvent.keyCode ());
switch (keyCode) {
case SWT.ALT: mask = OS.NSAlternateKeyMask; break;
@@ -1445,7 +1445,7 @@ boolean forceFocus (NSView focusView) {
return window.makeFirstResponder (focusView);
}
-boolean gestureEvent(int /*long*/ id, int /*long*/ eventPtr, int detail) {
+boolean gestureEvent(long /*int*/ id, long /*int*/ eventPtr, int detail) {
if (!display.sendEvent) return true;
display.sendEvent = false;
// For cross-platform compatibility, touch events and gestures are mutually exclusive.
@@ -1864,7 +1864,7 @@ NSBezierPath getPath(Region region) {
return getPath(region.handle);
}
-NSBezierPath getPath(int /*long*/ region) {
+NSBezierPath getPath(long /*int*/ region) {
Callback callback = new Callback(this, "regionToRects", 4);
if (callback.getAddress() == 0) error(SWT.ERROR_NO_MORE_CALLBACKS);
NSBezierPath path = NSBezierPath.bezierPath();
@@ -1999,12 +1999,12 @@ public boolean getVisible () {
return (state & HIDDEN) == 0;
}
-int /*long*/ getVisibleRegion () {
+long /*int*/ getVisibleRegion () {
if (visibleRgn == 0) {
visibleRgn = OS.NewRgn ();
calculateVisibleRegion (view, visibleRgn, true);
}
- int /*long*/ result = OS.NewRgn ();
+ long /*int*/ result = OS.NewRgn ();
OS.CopyRgn (visibleRgn, result);
return result;
}
@@ -2021,7 +2021,7 @@ boolean hasRegion () {
return region != null || parent.hasRegion ();
}
-int /*long*/ hitTest (int /*long*/ id, int /*long*/ sel, NSPoint point) {
+long /*int*/ hitTest (long /*int*/ id, long /*int*/ sel, NSPoint point) {
if ((state & DISABLED) != 0) return 0;
if (!isActive ()) return 0;
if (regionPath != null) {
@@ -2037,7 +2037,7 @@ boolean imeInComposition () {
return false;
}
-boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
+boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
// sendKeyEvent may do something to run the event loop. That would cause
// 'string' to be released before any superclass could use it, so save it
// until this method finishes.
@@ -2048,7 +2048,7 @@ boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
Shell s = this.getShell();
NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent ();
if (nsEvent != null) {
- int /*long*/ type = nsEvent.type ();
+ long /*int*/ type = nsEvent.type ();
if (type == OS.NSKeyDown || type == OS.NSSystemDefined) {
NSString str = new NSString (string);
if (str.isKindOfClass (OS.class_NSAttributedString)) {
@@ -2090,10 +2090,10 @@ boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
*
* @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();
NSView view = paintView();
- int /*long*/ context = 0;
+ long /*int*/ context = 0;
if (data != null && data.paintRect != null) {
NSGraphicsContext graphicsContext = NSGraphicsContext.currentContext();
context = graphicsContext.id;
@@ -2105,7 +2105,7 @@ public int /*long*/ internal_new_GC (GCData data) {
* to create a GC on a deferred NSWindow.
*/
if (window.windowNumber() <= 0) {
- float /*double*/ alpha = window.alphaValue();
+ double /*float*/ alpha = window.alphaValue();
window.setAlphaValue(0);
window.orderBack(null);
window.orderOut(null);
@@ -2156,9 +2156,9 @@ 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) {
+public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
checkWidget ();
- int /*long*/ context = hDC;
+ long /*int*/ context = hDC;
NSGraphicsContext graphicsContext = new NSGraphicsContext (context);
display.removeContext (data);
if (data != null) {
@@ -2257,7 +2257,7 @@ public boolean isFocusControl () {
}
boolean isObscured () {
- int /*long*/ visibleRgn = getVisibleRegion(), boundsRgn = OS.NewRgn();
+ long /*int*/ visibleRgn = getVisibleRegion(), boundsRgn = OS.NewRgn();
short[] rect = new short[4];
NSRect bounds = view.visibleRect();
OS.SetRect(rect, (short)bounds.x, (short)bounds.y, (short)(bounds.x + bounds.width), (short)(bounds.y + bounds.height));
@@ -2357,7 +2357,7 @@ public boolean isVisible () {
return getVisible () && parent.isVisible ();
}
-void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (hasKeyboardFocus(id)) {
Shell s = this.getShell();
s.keyInputHappened = false;
@@ -2391,11 +2391,11 @@ void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
super.keyDown (id, sel, theEvent);
}
-boolean hasKeyboardFocus(int /*long*/ inId) {
+boolean hasKeyboardFocus(long /*int*/ inId) {
return view.window().firstResponder().id == inId;
}
-void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyUp (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (hasKeyboardFocus(id)) {
NSEvent nsEvent = new NSEvent (theEvent);
if (!sendKeyEvent (nsEvent, SWT.KeyUp)) return;
@@ -2403,7 +2403,7 @@ void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
super.keyUp (id, sel, theEvent);
}
-void magnifyWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void magnifyWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
if (!gestureEvent(id, event, SWT.GESTURE_MAGNIFY)) return;
super.magnifyWithEvent(id, sel, event);
}
@@ -2412,7 +2412,7 @@ void markLayout (boolean changed, boolean all) {
/* Do nothing */
}
-int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+long /*int*/ menuForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!isEnabled ()) return 0;
NSPoint pt = NSEvent.mouseLocation();
@@ -2443,7 +2443,7 @@ Decorations menuShell () {
return parent.menuShell ();
}
-void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void scrollWheel (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
boolean handled = false;
if (id == view.id) {
NSEvent nsEvent = new NSEvent(theEvent);
@@ -2474,11 +2474,11 @@ void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
if (!handled) super.scrollWheel(id, sel, theEvent);
}
-boolean isEventView (int /*long*/ id) {
+boolean isEventView (long /*int*/ id) {
return true;
}
-boolean mouseEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent, int type) {
+boolean mouseEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent, int type) {
if (!display.sendEvent) return true;
display.sendEvent = false;
if (!isEventView (id)) return true;
@@ -2530,7 +2530,7 @@ boolean mouseEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent, in
return true;
}
-void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseDown)) return;
boolean tracking = isEventView (id);
Display display = this.display;
@@ -2539,42 +2539,42 @@ void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
if (tracking) display.trackingControl = null;
}
-void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseUp)) return;
super.mouseUp(id, sel, theEvent);
}
-void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseMove)) return;
super.mouseDragged(id, sel, theEvent);
}
-void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseDown)) return;
super.rightMouseDown(id, sel, theEvent);
}
-void rightMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseUp)) return;
super.rightMouseUp(id, sel, theEvent);
}
-void rightMouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseMove)) return;
super.rightMouseDragged(id, sel, theEvent);
}
-void otherMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseDown)) return;
super.otherMouseDown(id, sel, theEvent);
}
-void otherMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseUp)) return;
super.otherMouseUp(id, sel, theEvent);
}
-void otherMouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseMove)) return;
super.otherMouseDragged(id, sel, theEvent);
}
@@ -2794,7 +2794,7 @@ public void redraw (int x, int y, int width, int height, boolean all) {
view.setNeedsDisplayInRect(rect);
}
-int /*long*/ regionToRects(int /*long*/ message, int /*long*/ rgn, int /*long*/ r, int /*long*/ path) {
+long /*int*/ regionToRects(long /*int*/ message, long /*int*/ rgn, long /*int*/ r, long /*int*/ path) {
NSPoint pt = new NSPoint();
short[] rect = new short[4];
if (message == OS.kQDRegionToRectsMsgParse) {
@@ -3252,7 +3252,7 @@ void resetVisibleRegion () {
}
GCData[] gcs = display.contexts;
if (gcs != null) {
- int /*long*/ visibleRgn = 0;
+ long /*int*/ visibleRgn = 0;
for (int i=0; i<gcs.length; i++) {
GCData data = gcs [i];
if (data != null) {
@@ -3271,7 +3271,7 @@ void resized () {
sendEvent (SWT.Resize);
}
-void rotateWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void rotateWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
if (!gestureEvent(id, event, SWT.GESTURE_ROTATE)) return;
super.rotateWithEvent(id, sel, event);
}
@@ -3338,12 +3338,12 @@ boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
break;
case SWT.MouseWheel: {
event.detail = SWT.SCROLL_LINE;
- float /*double*/ delta = nsEvent.deltaY();
+ double /*float*/ delta = nsEvent.deltaY();
event.count = delta > 0 ? Math.max (1, (int)delta) : Math.min (-1, (int)delta);
break;
}
case SWT.MouseHorizontalWheel: {
- float /*double*/ delta = nsEvent.deltaX();
+ double /*float*/ delta = nsEvent.deltaX();
event.count = delta > 0 ? Math.max (1, (int)delta) : Math.min (-1, (int)delta);
break;
}
@@ -3376,7 +3376,7 @@ boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
Touch touchStateFromNSTouch(NSTouch touch) {
TouchSource source = display.findTouchSource(touch);
- int /*long*/ osPhase = touch.phase();
+ long /*int*/ osPhase = touch.phase();
long identity = OS.objc_msgSend(touch.id, OS.sel_identity);
int state = 0;
@@ -3408,8 +3408,8 @@ Touch touchStateFromNSTouch(NSTouch touch) {
}
NSTouch findTouchWithId(NSArray touches, NSObject identity) {
- int /*long*/ count = touches.count();
- for (int /*long*/ i = 0; i < count; i++) {
+ long /*int*/ count = touches.count();
+ for (long /*int*/ i = 0; i < count; i++) {
NSTouch aTouch = new NSTouch(touches.objectAtIndex(i).id);
NSObject currIdentity = new NSObject(OS.objc_msgSend(aTouch.id, OS.sel_identity));
if (currIdentity.isEqual(identity)) return aTouch;
@@ -3424,7 +3424,7 @@ void setBackground () {
if (control.backgroundImage != null) {
setBackgroundImage (control.backgroundImage.handle);
} else {
- float /*double*/ [] color = control.background != null ? control.background : control.defaultBackground().handle;
+ double /*float*/ [] color = control.background != null ? control.background : control.defaultBackground().handle;
NSColor nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], color[3]);
setBackgroundColor (nsColor);
}
@@ -3453,7 +3453,7 @@ public void setBackground (Color color) {
if (color != null) {
if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
}
- float /*double*/ [] background = color != null ? color.handle : null;
+ double /*float*/ [] background = color != null ? color.handle : null;
if (equals (background, this.background)) return;
this.background = background;
updateBackgroundColor ();
@@ -3766,17 +3766,17 @@ public void setForeground (Color color) {
if (color != null) {
if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
}
- float /*double*/ [] foreground = color != null ? color.handle : null;
+ double /*float*/ [] foreground = color != null ? color.handle : null;
if (equals (foreground, this.foreground)) return;
this.foreground = foreground;
setForeground (foreground);
redrawWidget (view, false);
}
-void setForeground (float /*double*/ [] color) {
+void setForeground (double /*float*/ [] color) {
}
-void setFrameOrigin (int /*long*/ id, int /*long*/ sel, NSPoint point) {
+void setFrameOrigin (long /*int*/ id, long /*int*/ sel, NSPoint point) {
NSView topView = topView ();
if (topView.id != id) {
super.setFrameOrigin(id, sel, point);
@@ -3790,7 +3790,7 @@ void setFrameOrigin (int /*long*/ id, int /*long*/ sel, NSPoint point) {
}
}
-void setFrameSize (int /*long*/ id, int /*long*/ sel, NSSize size) {
+void setFrameSize (long /*int*/ id, long /*int*/ sel, NSSize size) {
NSView topView = topView ();
if (topView.id != id) {
super.setFrameSize(id, sel, size);
@@ -4219,7 +4219,7 @@ void setZOrder () {
parent.contentView().addSubview(topView, OS.NSWindowBelow, null);
}
-boolean shouldDelayWindowOrderingForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+boolean shouldDelayWindowOrderingForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
Shell shell = getShell ();
if ((shell.style & SWT.ON_TOP) != 0) return false;
return super.shouldDelayWindowOrderingForEvent (id, sel, theEvent);
@@ -4312,7 +4312,7 @@ void sort (int [] items) {
}
}
-void swipeWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void swipeWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
if (!gestureEvent(id, event, SWT.GESTURE_SWIPE)) return;
super.swipeWithEvent(id, sel, event);
}
@@ -4418,7 +4418,7 @@ NSView topView () {
return view;
}
-boolean touchEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ eventPtr) {
+boolean touchEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ eventPtr) {
if (!display.sendEvent) return true;
display.sendEvent = false;
if (!(hooks(SWT.Touch) || filters(SWT.Touch))) return true;
@@ -4435,7 +4435,7 @@ boolean touchEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ eventPtr) {
event.y = (int) location.y;
setInputState (event, nsEvent, SWT.Touch);
NSSet allTouchesSet = nsEvent.touchesMatchingPhase(OS.NSTouchPhaseAny, null);
- int /*long*/ touchCount = allTouchesSet.count();
+ long /*int*/ touchCount = allTouchesSet.count();
Touch touches[] = new Touch[(int)/*64*/touchCount];
int currTouchIndex = 0;
@@ -4469,7 +4469,7 @@ boolean touchEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ eventPtr) {
* if a 4-finger gesture occurs and the application switcher appears. Workaround is to generate a TOUCHSTATE_UP for the
* orphaned touch.
*/
- for (int /*long*/ j = currentTouches.count() - 1; j >= 0 ; j--) {
+ for (long /*int*/ j = currentTouches.count() - 1; j >= 0 ; j--) {
NSTouch touch = new NSTouch(currentTouches.objectAtIndex(j).id);
NSObject identity = new NSObject(OS.objc_msgSend(touch.id, OS.sel_identity));
NSTouch activeTouch = findTouchWithId(activeTouches, identity);
@@ -4494,22 +4494,22 @@ boolean touchEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ eventPtr) {
return true;
}
-void touchesBeganWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void touchesBeganWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
if (!touchEvent(id, sel, event)) return;
super.touchesBeganWithEvent(id, sel, event);
}
-void touchesCancelledWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void touchesCancelledWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
if (!touchEvent(id, sel, event)) return;
super.touchesCancelledWithEvent(id, sel, event);
}
-void touchesEndedWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void touchesEndedWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
if (!touchEvent(id, sel, event)) return;
super.touchesEndedWithEvent(id, sel, event);
}
-void touchesMovedWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void touchesMovedWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
if (!touchEvent(id, sel, event)) return;
super.touchesMovedWithEvent(id, sel, event);
}
@@ -4531,7 +4531,7 @@ boolean translateTraversal (int key, NSEvent theEvent, boolean [] consume) {
break;
}
case 48: /* Tab */ {
- int /*long*/ modifiers = theEvent.modifierFlags ();
+ long /*int*/ modifiers = theEvent.modifierFlags ();
boolean next = (modifiers & OS.NSShiftKeyMask) == 0;
detail = next ? SWT.TRAVERSE_TAB_NEXT : SWT.TRAVERSE_TAB_PREVIOUS;
break;
@@ -4547,7 +4547,7 @@ boolean translateTraversal (int key, NSEvent theEvent, boolean [] consume) {
case 116: /* Page up */
case 121: /* Page down */ {
all = true;
- int /*long*/ modifiers = theEvent.modifierFlags ();
+ long /*int*/ modifiers = theEvent.modifierFlags ();
if ((modifiers & OS.NSControlKeyMask) == 0) return false;
detail = key == 121 /* Page down */ ? SWT.TRAVERSE_PAGE_NEXT : SWT.TRAVERSE_PAGE_PREVIOUS;
break;
@@ -4913,7 +4913,7 @@ void update (boolean all) {
void updateBackgroundColor () {
Control control = findBackgroundControl ();
if (control == null) control = this;
- float /*double*/ [] color = control.background != null ? control.background : control.defaultBackground().handle;
+ double /*float*/ [] color = control.background != null ? control.background : control.defaultBackground().handle;
NSColor nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], color[3]);
setBackgroundColor (nsColor);
}
@@ -4932,11 +4932,11 @@ void updateBackgroundMode () {
}
}
-void resetCursorRects (int /*long*/ id, int /*long*/ sel) {
+void resetCursorRects (long /*int*/ id, long /*int*/ sel) {
if (isEnabled ()) callSuper (id, sel);
}
-void updateTrackingAreas (int /*long*/ id, int /*long*/ sel) {
+void updateTrackingAreas (long /*int*/ id, long /*int*/ sel) {
if (isEnabled ()) callSuper (id, sel);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java
index 7f2801f906..61076d20d7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java
@@ -279,7 +279,7 @@ void disposePopupShell() {
popupCalendar = null;
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
fillBackground (view, context, rect, -1);
}
@@ -457,16 +457,16 @@ boolean isDropped () {
return popupShell.getVisible ();
}
-boolean isEventView (int /*long*/ id) {
+boolean isEventView (long /*int*/ id) {
return true;
}
-boolean isFlipped (int /*long*/ id, int /*long*/ sel) {
+boolean isFlipped (long /*int*/ id, long /*int*/ sel) {
if ((style & SWT.CALENDAR) != 0) return super.isFlipped (id, sel);
return true;
}
-void keyDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if ((style & SWT.DROP_DOWN) != 0) {
NSEvent nsEvent = new NSEvent (theEvent);
int keyCode = Display.translateKey (nsEvent.keyCode ());
@@ -651,7 +651,7 @@ public void setDay (int day) {
}
}
-void setForeground (float /*double*/ [] color) {
+void setForeground (double /*float*/ [] color) {
NSColor nsColor;
if (color == null) {
if ((style & SWT.CALENDAR) != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java
index edeaa3d34e..5a044d5ce3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -138,7 +138,7 @@ public String open () {
}
display.setModalDialog(this);
NSString dir = (filterPath != null && filterPath.length() > 0) ? NSString.stringWith(filterPath) : null;
- int /*long*/ response = panel.runModalForDirectory(dir, null);
+ long /*int*/ response = panel.runModalForDirectory(dir, null);
if (parent != null && (style & SWT.SHEET) != 0) {
application.endSheet(panel, 0);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index cdc8ba5b94..428e197c7d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
@@ -151,7 +151,7 @@ public class Display extends Device {
Menu[] menus, popups;
NSApplication application;
- int /*long*/ applicationClass;
+ long /*int*/ applicationClass;
NSImage dockImage;
boolean isEmbedded;
static boolean launched = false;
@@ -169,11 +169,11 @@ public class Display extends Device {
int[] screenID = new int[32];
NSPoint[] screenCascade = new NSPoint[32];
- int /*long*/ runLoopObserver;
+ long /*int*/ runLoopObserver;
Callback observerCallback;
boolean lockCursor = true;
- int /*long*/ oldCursorSetProc;
+ long /*int*/ oldCursorSetProc;
Callback cursorSetCallback;
boolean comboPoppedUp = false;
@@ -208,9 +208,9 @@ public class Display extends Device {
Cursor [] cursors = new Cursor [SWT.CURSOR_HAND + 1];
/* System Colors */
- float /*double*/ [][] colors;
- float /*double*/ [] alternateSelectedControlTextColor, selectedControlTextColor;
- float /*double*/ [] alternateSelectedControlColor, secondarySelectedControlColor;
+ double /*float*/ [][] colors;
+ double /*float*/ [] alternateSelectedControlTextColor, selectedControlTextColor;
+ double /*float*/ [] alternateSelectedControlColor, secondarySelectedControlColor;
/* Key Mappings. */
static int [] [] KeyTable = {
@@ -547,7 +547,7 @@ void addSkinnableWidget (Widget widget) {
void addWidget (NSObject view, Widget widget) {
if (view == null) return;
- int /*long*/ ivar = OS.object_setInstanceVariable (view.id, SWT_OBJECT, widget.jniRef);
+ long /*int*/ ivar = OS.object_setInstanceVariable (view.id, SWT_OBJECT, widget.jniRef);
if (ivar == 0) {
if (dynamicObjectMap == null) {
@@ -716,7 +716,7 @@ static void checkDisplay (Thread thread, boolean multiple) {
}
static NSRect convertRect(NSScreen screen, NSRect frame) {
- float /*double*/ scaleFactor = screen.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = screen.userSpaceScaleFactor();
frame.x /= scaleFactor;
frame.y /= scaleFactor;
frame.width /= scaleFactor;
@@ -854,7 +854,7 @@ void createDisplay (DeviceData data) {
int [] psn = new int [2];
if (OS.GetCurrentProcess (psn) == OS.noErr) {
int pid = OS.getpid ();
- int /*long*/ ptr = getApplicationName().UTF8String();
+ long /*int*/ ptr = getApplicationName().UTF8String();
if (ptr != 0) OS.CPSSetProcessName (psn, ptr);
if (!isBundled ()) {
OS.TransformProcessType (psn, OS.kProcessTransformToForegroundApplication);
@@ -871,20 +871,20 @@ void createDisplay (DeviceData data) {
}
String className = "SWTApplication";
- int /*long*/ cls;
+ long /*int*/ cls;
if ((cls = OS.objc_lookUpClass (className)) == 0) {
Class clazz = getClass();
applicationCallback2 = new Callback(clazz, "applicationProc", 2);
- int /*long*/ proc2 = applicationCallback2.getAddress();
+ long /*int*/ proc2 = applicationCallback2.getAddress();
if (proc2 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
applicationCallback3 = new Callback(clazz, "applicationProc", 3);
- int /*long*/ proc3 = applicationCallback3.getAddress();
+ long /*int*/ proc3 = applicationCallback3.getAddress();
if (proc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
applicationCallback4 = new Callback(clazz, "applicationProc", 4);
- int /*long*/ proc4 = applicationCallback4.getAddress();
+ long /*int*/ proc4 = applicationCallback4.getAddress();
if (proc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
applicationCallback6 = new Callback(clazz, "applicationProc", 6);
- int /*long*/ proc6 = applicationCallback6.getAddress();
+ long /*int*/ proc6 = applicationCallback6.getAddress();
if (proc6 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
cls = OS.objc_allocateClassPair(OS.object_getClass(application.id), className, 0);
OS.class_addMethod(cls, OS.sel_sendEvent_, proc3, "@:@");
@@ -897,10 +897,10 @@ void createDisplay (DeviceData data) {
className = "SWTApplicationDelegate";
if (OS.objc_lookUpClass (className) == 0) {
- int /*long*/ appProc3 = applicationCallback3.getAddress();
+ long /*int*/ appProc3 = applicationCallback3.getAddress();
if (appProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
- int /*long*/ appProc4 = applicationCallback4.getAddress();
+ long /*int*/ appProc4 = applicationCallback4.getAddress();
if (appProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
OS.class_addMethod(cls, OS.sel_applicationWillFinishLaunching_, appProc3, "@:@");
@@ -1002,7 +1002,7 @@ NSMutableArray currentTouches() {
return currentTouches;
}
-int /*long*/ cursorSetProc (int /*long*/ id, int /*long*/ sel) {
+long /*int*/ cursorSetProc (long /*int*/ id, long /*int*/ sel) {
if (lockCursor) {
if (currentControl != null) {
Cursor cursor = currentControl.findCursor ();
@@ -1103,7 +1103,7 @@ boolean filters (int eventType) {
*
* @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);
}
@@ -1132,7 +1132,7 @@ public Widget findWidget (int /*long*/ handle) {
*
* @since 3.1
*/
-public Widget findWidget (int /*long*/ handle, int id) {
+public Widget findWidget (long /*int*/ handle, int id) {
checkDevice ();
return getWidget (handle);
}
@@ -1267,14 +1267,14 @@ public Rectangle getBounds () {
Rectangle getBounds (NSArray screens) {
NSScreen screen = new NSScreen(screens.objectAtIndex(0));
NSRect primaryFrame = convertRect(screen, screen.frame());
- float /*double*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE;
- float /*double*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE;
- int /*long*/ count = screens.count();
+ double /*float*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE;
+ double /*float*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE;
+ long /*int*/ count = screens.count();
for (int i = 0; i < count; i++) {
screen = new NSScreen(screens.objectAtIndex(i));
NSRect frame = convertRect(screen, screen.frame());
- float /*double*/ x1 = frame.x, x2 = frame.x + frame.width;
- float /*double*/ y1 = primaryFrame.height - frame.y, y2 = primaryFrame.height - (frame.y + frame.height);
+ double /*float*/ x1 = frame.x, x2 = frame.x + frame.width;
+ double /*float*/ y1 = primaryFrame.height - frame.y, y2 = primaryFrame.height - (frame.y + frame.height);
if (x1 < minX) minX = x1;
if (x2 < minX) minX = x2;
if (x1 > maxX) maxX = x1;
@@ -1323,7 +1323,7 @@ public Rectangle getClientArea () {
NSScreen screen = new NSScreen(screens.objectAtIndex(0));
NSRect frame = convertRect(screen, screen.frame());;
NSRect visibleFrame = convertRect(screen, screen.visibleFrame());
- float /*double*/ y = frame.height - (visibleFrame.y + visibleFrame.height);
+ double /*float*/ y = frame.height - (visibleFrame.y + visibleFrame.height);
return new Rectangle((int)visibleFrame.x, (int)y, (int)visibleFrame.width, (int)visibleFrame.height);
}
@@ -1802,11 +1802,11 @@ Color getWidgetColor (int id) {
return null;
}
-float /*double*/ [] getWidgetColorRGB (int id) {
+double /*float*/ [] getWidgetColorRGB (int id) {
NSColor color = null;
switch (id) {
case SWT.COLOR_INFO_FOREGROUND: color = NSColor.blackColor (); break;
- case SWT.COLOR_INFO_BACKGROUND: return new float /*double*/ [] {.984f, .988f, 0.773f, 1};
+ case SWT.COLOR_INFO_BACKGROUND: return new double /*float*/ [] {.984f, .988f, 0.773f, 1};
case SWT.COLOR_TITLE_FOREGROUND: color = NSColor.windowFrameTextColor(); break;
case SWT.COLOR_TITLE_BACKGROUND: color = NSColor.alternateSelectedControlColor(); break;
case SWT.COLOR_TITLE_BACKGROUND_GRADIENT: color = NSColor.selectedControlColor(); break;
@@ -1828,16 +1828,16 @@ float /*double*/ [] getWidgetColorRGB (int id) {
return getNSColorRGB (color);
}
-float /*double*/ [] getNSColorRGB (NSColor color) {
+double /*float*/ [] getNSColorRGB (NSColor color) {
if (color == null) return null;
NSColorSpace colorSpace = color.colorSpace();
if (colorSpace == null || colorSpace.colorSpaceModel() != OS.NSRGBColorSpaceModel) {
color = color.colorUsingColorSpaceName(OS.NSDeviceRGBColorSpace);
}
if (color == null) return null;
- float /*double*/[] components = new float /*double*/[(int)/*64*/color.numberOfComponents()];
+ double /*float*/[] components = new double /*float*/[(int)/*64*/color.numberOfComponents()];
color.getComponents(components);
- return new float /*double*/ []{components[0], components[1], components[2], components[3]};
+ return new double /*float*/ []{components[0], components[1], components[2], components[3]};
}
/**
@@ -1892,7 +1892,7 @@ public Cursor getSystemCursor (int id) {
}
NSImage getSystemImageForID(int osType) {
- int /*long*/ iconRef[] = new int /*long*/ [1];
+ long /*int*/ iconRef[] = new long /*int*/ [1];
OS.GetIconRefFromTypeInfo(OS.kSystemIconsCreator, osType, 0, 0, 0, iconRef);
NSImage nsImage = (NSImage)new NSImage().alloc();
nsImage = nsImage.initWithIconRef(iconRef[0]);
@@ -1998,7 +1998,7 @@ public Menu getSystemMenu () {
appMenu = new Menu(this, nsAppMenu);
// Create menu items that correspond to the NSMenuItems.
- int /*long*/ nsCount = nsAppMenu.numberOfItems();
+ long /*int*/ nsCount = nsAppMenu.numberOfItems();
for (int j = 0; j < nsCount; j++) {
NSMenuItem currMenuItem = nsAppMenu.itemAtIndex(j);
new MenuItem(appMenu, currMenuItem);
@@ -2085,14 +2085,14 @@ int getToolTipTime () {
return 560;
}
-Widget getWidget (int /*long*/ id) {
+Widget getWidget (long /*int*/ id) {
return GetWidget (id);
}
-static Widget GetWidget (int /*long*/ id) {
+static Widget GetWidget (long /*int*/ id) {
if (id == 0) return null;
- int /*long*/ [] jniRef = new int /*long*/ [1];
- int /*long*/ iVar = OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
+ long /*int*/ [] jniRef = new long /*int*/ [1];
+ long /*int*/ iVar = OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (iVar == 0) {
if (dynamicObjectMap != null) {
NSObject key = new NSObject(id);
@@ -2112,7 +2112,7 @@ Widget getWidget (NSView view) {
boolean hasDefaultButton () {
NSArray windows = application.windows();
- int /*long*/ count = windows.count();
+ long /*int*/ count = windows.count();
for (int i = 0; i < count; i++) {
NSWindow window = new NSWindow(windows.objectAtIndex(i));
if (window.defaultButtonCell() != null) {
@@ -2146,7 +2146,7 @@ protected void init () {
if (currAppDelegate == null) {
if (OS.class_JRSAppKitAWT != 0) {
- int /*long*/ currDelegatePtr = OS.objc_msgSend(OS.class_JRSAppKitAWT, OS.sel_awtAppDelegate);
+ long /*int*/ currDelegatePtr = OS.objc_msgSend(OS.class_JRSAppKitAWT, OS.sel_awtAppDelegate);
if (currDelegatePtr != 0) {
currAppDelegate = new NSObject(currDelegatePtr);
currAppDelegate.retain();
@@ -2190,7 +2190,7 @@ protected void init () {
if (prefsItem != null) prefsItem.setTag(SWT.ID_PREFERENCES);
observerCallback = new Callback (this, "observerProc", 3); //$NON-NLS-1$
- int /*long*/ observerProc = observerCallback.getAddress ();
+ long /*int*/ observerProc = observerCallback.getAddress ();
if (observerProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
int activities = OS.kCFRunLoopBeforeWaiting;
runLoopObserver = OS.CFRunLoopObserverCreate (0, activities, true, 0, observerProc, 0);
@@ -2198,18 +2198,18 @@ protected void init () {
OS.CFRunLoopAddObserver (OS.CFRunLoopGetCurrent (), runLoopObserver, OS.kCFRunLoopCommonModes ());
// Add AWT Runloop mode for SWT/AWT.
- int /*long*/ cls = OS.objc_lookUpClass("JNFRunLoop"); //$NON-NLS-1$
+ long /*int*/ cls = OS.objc_lookUpClass("JNFRunLoop"); //$NON-NLS-1$
if (cls != 0) {
- int /*long*/ mode = OS.objc_msgSend(cls, OS.sel_javaRunLoopMode);
+ long /*int*/ mode = OS.objc_msgSend(cls, OS.sel_javaRunLoopMode);
if (mode != 0) {
OS.CFRunLoopAddObserver (OS.CFRunLoopGetCurrent (), runLoopObserver, mode);
}
}
cursorSetCallback = new Callback(this, "cursorSetProc", 2);
- int /*long*/ cursorSetProc = cursorSetCallback.getAddress();
+ long /*int*/ cursorSetProc = cursorSetCallback.getAddress();
if (cursorSetProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- int /*long*/ method = OS.class_getInstanceMethod(OS.class_NSCursor, OS.sel_set);
+ long /*int*/ method = OS.class_getInstanceMethod(OS.class_NSCursor, OS.sel_set);
if (method != 0) oldCursorSetProc = OS.method_setImplementation(method, cursorSetProc);
timerDelegate = (SWTWindowDelegate)new SWTWindowDelegate().alloc().init();
@@ -2233,7 +2233,7 @@ protected void init () {
isPainting = isPainting.initWithCapacity(12);
}
-void addEventMethods (int /*long*/ cls, int /*long*/ proc2, int /*long*/ proc3, int /*long*/ drawRectProc, int /*long*/ hitTestProc, int /*long*/ needsDisplayInRectProc) {
+void addEventMethods (long /*int*/ cls, long /*int*/ proc2, long /*int*/ proc3, long /*int*/ drawRectProc, long /*int*/ hitTestProc, long /*int*/ needsDisplayInRectProc) {
if (proc3 != 0) {
OS.class_addMethod(cls, OS.sel_mouseDown_, proc3, "@:@");
OS.class_addMethod(cls, OS.sel_mouseUp_, proc3, "@:@");
@@ -2288,12 +2288,12 @@ void addEventMethods (int /*long*/ cls, int /*long*/ proc2, int /*long*/ proc3,
}
}
-void addFrameMethods(int /*long*/ cls, int /*long*/ setFrameOriginProc, int /*long*/ setFrameSizeProc) {
+void addFrameMethods(long /*int*/ cls, long /*int*/ setFrameOriginProc, long /*int*/ setFrameSizeProc) {
OS.class_addMethod(cls, OS.sel_setFrameOrigin_, setFrameOriginProc, "@:{NSPoint}");
OS.class_addMethod(cls, OS.sel_setFrameSize_, setFrameSizeProc, "@:{NSSize}");
}
-void addAccessibilityMethods(int /*long*/ cls, int /*long*/ proc2, int /*long*/ proc3, int /*long*/ proc4, int /*long*/ accessibilityHitTestProc) {
+void addAccessibilityMethods(long /*int*/ cls, long /*int*/ proc2, long /*int*/ proc3, long /*int*/ proc4, long /*int*/ accessibilityHitTestProc) {
OS.class_addMethod(cls, OS.sel_accessibilityActionNames, proc2, "@:");
OS.class_addMethod(cls, OS.sel_accessibilityAttributeNames, proc2, "@:");
OS.class_addMethod(cls, OS.sel_accessibilityParameterizedAttributeNames, proc2, "@:");
@@ -2309,24 +2309,24 @@ void addAccessibilityMethods(int /*long*/ cls, int /*long*/ proc2, int /*long*/
OS.class_addMethod(cls, OS.sel_accessibleHandle, proc2, "@:");
}
-int /*long*/ registerCellSubclass(int /*long*/ cellClass, int size, int align, byte[] types) {
+long /*int*/ registerCellSubclass(long /*int*/ cellClass, int size, int align, byte[] types) {
String cellClassName = OS.class_getName(cellClass);
- int /*long*/ cls = OS.objc_allocateClassPair(cellClass, "SWTAccessible" + cellClassName, 0);
+ long /*int*/ cls = OS.objc_allocateClassPair(cellClass, "SWTAccessible" + cellClassName, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.objc_registerClassPair(cls);
return cls;
}
-int /*long*/ createWindowSubclass(int /*long*/ baseClass, String newClass, boolean isDynamic) {
- int /*long*/ cls = OS.objc_lookUpClass(newClass);
+long /*int*/ createWindowSubclass(long /*int*/ baseClass, String newClass, boolean isDynamic) {
+ long /*int*/ cls = OS.objc_lookUpClass(newClass);
if (cls != 0) return cls;
cls = OS.objc_allocateClassPair(baseClass, newClass, 0);
- int /*long*/ proc3 = windowCallback3.getAddress();
- int /*long*/ proc2 = windowCallback2.getAddress();
- int /*long*/ proc4 = windowCallback4.getAddress();
- int /*long*/ proc6 = windowCallback6.getAddress();
- int /*long*/ view_stringForToolTip_point_userDataProc = OS.CALLBACK_view_stringForToolTip_point_userData_(proc6);
- int /*long*/ accessibilityHitTestProc = OS.CALLBACK_accessibilityHitTest_(proc3);
+ long /*int*/ proc3 = windowCallback3.getAddress();
+ long /*int*/ proc2 = windowCallback2.getAddress();
+ long /*int*/ proc4 = windowCallback4.getAddress();
+ long /*int*/ proc6 = windowCallback6.getAddress();
+ long /*int*/ view_stringForToolTip_point_userDataProc = OS.CALLBACK_view_stringForToolTip_point_userData_(proc6);
+ long /*int*/ accessibilityHitTestProc = OS.CALLBACK_accessibilityHitTest_(proc3);
if (!isDynamic) OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.class_addMethod(cls, OS.sel_sendEvent_, proc3, "@:@");
@@ -2341,12 +2341,12 @@ int /*long*/ createWindowSubclass(int /*long*/ baseClass, String newClass, boole
return cls;
}
-int /*long*/ createMenuSubclass(int /*long*/ baseClass, String newClass, boolean isDynamic) {
- int /*long*/ cls = OS.objc_lookUpClass(newClass);
+long /*int*/ createMenuSubclass(long /*int*/ baseClass, String newClass, boolean isDynamic) {
+ long /*int*/ cls = OS.objc_lookUpClass(newClass);
if (cls != 0) return cls;
cls = OS.objc_allocateClassPair(baseClass, newClass, 0);
- int /*long*/ proc3 = windowCallback3.getAddress();
- int /*long*/ proc4 = windowCallback4.getAddress();
+ long /*int*/ proc3 = windowCallback3.getAddress();
+ long /*int*/ proc4 = windowCallback4.getAddress();
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.class_addMethod(cls, OS.sel_menuWillOpen_, proc3, "@:@");
OS.class_addMethod(cls, OS.sel_menuDidClose_, proc3, "@:@");
@@ -2356,11 +2356,11 @@ int /*long*/ createMenuSubclass(int /*long*/ baseClass, String newClass, boolean
return cls;
}
-int /*long*/ createMenuItemSubclass(int /*long*/ baseClass, String newClass, boolean isDynamic) {
- int /*long*/ cls = OS.objc_lookUpClass(newClass);
+long /*int*/ createMenuItemSubclass(long /*int*/ baseClass, String newClass, boolean isDynamic) {
+ long /*int*/ cls = OS.objc_lookUpClass(newClass);
if (cls != 0) return cls;
cls = OS.objc_allocateClassPair(baseClass, newClass, 0);
- int /*long*/ proc2 = windowCallback2.getAddress();
+ long /*int*/ proc2 = windowCallback2.getAddress();
if (!isDynamic) OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
OS.objc_registerClassPair(cls);
@@ -2372,68 +2372,68 @@ void initClasses () {
Class clazz = getClass ();
dialogCallback3 = new Callback(clazz, "dialogProc", 3);
- int /*long*/ dialogProc3 = dialogCallback3.getAddress();
+ long /*int*/ dialogProc3 = dialogCallback3.getAddress();
if (dialogProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
dialogCallback4 = new Callback(clazz, "dialogProc", 4);
- int /*long*/ dialogProc4 = dialogCallback4.getAddress();
+ long /*int*/ dialogProc4 = dialogCallback4.getAddress();
if (dialogProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
dialogCallback5 = new Callback(clazz, "dialogProc", 5);
- int /*long*/ dialogProc5 = dialogCallback5.getAddress();
+ long /*int*/ dialogProc5 = dialogCallback5.getAddress();
if (dialogProc5 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
windowCallback3 = new Callback(clazz, "windowProc", 3);
- int /*long*/ proc3 = windowCallback3.getAddress();
+ long /*int*/ proc3 = windowCallback3.getAddress();
if (proc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
windowCallback2 = new Callback(clazz, "windowProc", 2);
- int /*long*/ proc2 = windowCallback2.getAddress();
+ long /*int*/ proc2 = windowCallback2.getAddress();
if (proc2 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
windowCallback4 = new Callback(clazz, "windowProc", 4);
- int /*long*/ proc4 = windowCallback4.getAddress();
+ long /*int*/ proc4 = windowCallback4.getAddress();
if (proc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
windowCallback5 = new Callback(clazz, "windowProc", 5);
- int /*long*/ proc5 = windowCallback5.getAddress();
+ long /*int*/ proc5 = windowCallback5.getAddress();
if (proc5 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
windowCallback6 = new Callback(clazz, "windowProc", 6);
- int /*long*/ proc6 = windowCallback6.getAddress();
+ long /*int*/ proc6 = windowCallback6.getAddress();
if (proc6 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- int /*long*/ isFlippedProc = OS.isFlipped_CALLBACK();
- int /*long*/ drawRectProc = OS.CALLBACK_drawRect_(proc3);
- int /*long*/ drawInteriorWithFrameInViewProc = OS.CALLBACK_drawInteriorWithFrame_inView_ (proc4);
- int /*long*/ drawWithExpansionFrameProc = OS.CALLBACK_drawWithExpansionFrame_inView_ (proc4);
- int /*long*/ imageRectForBoundsProc = OS.CALLBACK_imageRectForBounds_ (proc3);
- int /*long*/ titleRectForBoundsProc = OS.CALLBACK_titleRectForBounds_ (proc3);
- int /*long*/ cellSizeForBoundsProc = OS.CALLBACK_cellSizeForBounds_ (proc3);
- int /*long*/ hitTestForEvent_inRect_ofViewProc = OS.CALLBACK_hitTestForEvent_inRect_ofView_ (proc5);
- int /*long*/ cellSizeProc = OS.CALLBACK_cellSize (proc2);
- int /*long*/ drawImageWithFrameInViewProc = OS.CALLBACK_drawImage_withFrame_inView_ (proc5);
- int /*long*/ drawTitleWithFrameInViewProc = OS.CALLBACK_drawTitle_withFrame_inView_ (proc5);
- int /*long*/ setFrameOriginProc = OS.CALLBACK_setFrameOrigin_(proc3);
- int /*long*/ setFrameSizeProc = OS.CALLBACK_setFrameSize_(proc3);
- int /*long*/ hitTestProc = OS.CALLBACK_hitTest_(proc3);
- int /*long*/ markedRangeProc = OS.CALLBACK_markedRange (proc2);
- int /*long*/ selectedRangeProc = OS.CALLBACK_selectedRange (proc2);
- int /*long*/ highlightSelectionInClipRectProc = OS.CALLBACK_highlightSelectionInClipRect_ (proc3);
- int /*long*/ setMarkedText_selectedRangeProc = OS.CALLBACK_setMarkedText_selectedRange_(proc4);
- int /*long*/ attributedSubstringFromRangeProc = OS.CALLBACK_attributedSubstringFromRange_(proc3);
- int /*long*/ characterIndexForPointProc = OS.CALLBACK_characterIndexForPoint_(proc3);
- int /*long*/ firstRectForCharacterRangeProc = OS.CALLBACK_firstRectForCharacterRange_(proc3);
- int /*long*/ textWillChangeSelectionProc = OS.CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(proc5);
- int /*long*/ accessibilityHitTestProc = OS.CALLBACK_accessibilityHitTest_(proc3);
- int /*long*/ shouldChangeTextInRange_replacementString_Proc = OS.CALLBACK_shouldChangeTextInRange_replacementString_(proc4);
- int /*long*/ view_stringForToolTip_point_userDataProc = OS.CALLBACK_view_stringForToolTip_point_userData_(proc6);
- int /*long*/ canDragRowsWithIndexes_atPoint_Proc = OS.CALLBACK_canDragRowsWithIndexes_atPoint_(proc4);
- int /*long*/ setNeedsDisplayInRectProc = OS.CALLBACK_setNeedsDisplayInRect_(proc3);
- int /*long*/ expansionFrameWithFrameProc = OS.CALLBACK_expansionFrameWithFrame_inView_ (proc4);
- int /*long*/ sizeOfLabelProc = OS.CALLBACK_sizeOfLabel_ (proc3);
- int /*long*/ drawLabelInRectProc = OS.CALLBACK_drawLabel_inRect_ (proc4);
- int /*long*/ drawViewBackgroundInRectProc = OS.CALLBACK_drawViewBackgroundInRect_(proc3);
- int /*long*/ drawBackgroundInClipRectProc = OS.CALLBACK_drawBackgroundInClipRect_(proc3);
- int /*long*/ scrollClipView_ToPointProc = OS.CALLBACK_scrollClipView_toPoint_(proc4);
- int /*long*/ headerRectOfColumnProc = OS.CALLBACK_headerRectOfColumn_(proc3);
- int /*long*/ columnAtPointProc = OS.CALLBACK_columnAtPoint_(proc3);
+ long /*int*/ isFlippedProc = OS.isFlipped_CALLBACK();
+ long /*int*/ drawRectProc = OS.CALLBACK_drawRect_(proc3);
+ long /*int*/ drawInteriorWithFrameInViewProc = OS.CALLBACK_drawInteriorWithFrame_inView_ (proc4);
+ long /*int*/ drawWithExpansionFrameProc = OS.CALLBACK_drawWithExpansionFrame_inView_ (proc4);
+ long /*int*/ imageRectForBoundsProc = OS.CALLBACK_imageRectForBounds_ (proc3);
+ long /*int*/ titleRectForBoundsProc = OS.CALLBACK_titleRectForBounds_ (proc3);
+ long /*int*/ cellSizeForBoundsProc = OS.CALLBACK_cellSizeForBounds_ (proc3);
+ long /*int*/ hitTestForEvent_inRect_ofViewProc = OS.CALLBACK_hitTestForEvent_inRect_ofView_ (proc5);
+ long /*int*/ cellSizeProc = OS.CALLBACK_cellSize (proc2);
+ long /*int*/ drawImageWithFrameInViewProc = OS.CALLBACK_drawImage_withFrame_inView_ (proc5);
+ long /*int*/ drawTitleWithFrameInViewProc = OS.CALLBACK_drawTitle_withFrame_inView_ (proc5);
+ long /*int*/ setFrameOriginProc = OS.CALLBACK_setFrameOrigin_(proc3);
+ long /*int*/ setFrameSizeProc = OS.CALLBACK_setFrameSize_(proc3);
+ long /*int*/ hitTestProc = OS.CALLBACK_hitTest_(proc3);
+ long /*int*/ markedRangeProc = OS.CALLBACK_markedRange (proc2);
+ long /*int*/ selectedRangeProc = OS.CALLBACK_selectedRange (proc2);
+ long /*int*/ highlightSelectionInClipRectProc = OS.CALLBACK_highlightSelectionInClipRect_ (proc3);
+ long /*int*/ setMarkedText_selectedRangeProc = OS.CALLBACK_setMarkedText_selectedRange_(proc4);
+ long /*int*/ attributedSubstringFromRangeProc = OS.CALLBACK_attributedSubstringFromRange_(proc3);
+ long /*int*/ characterIndexForPointProc = OS.CALLBACK_characterIndexForPoint_(proc3);
+ long /*int*/ firstRectForCharacterRangeProc = OS.CALLBACK_firstRectForCharacterRange_(proc3);
+ long /*int*/ textWillChangeSelectionProc = OS.CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(proc5);
+ long /*int*/ accessibilityHitTestProc = OS.CALLBACK_accessibilityHitTest_(proc3);
+ long /*int*/ shouldChangeTextInRange_replacementString_Proc = OS.CALLBACK_shouldChangeTextInRange_replacementString_(proc4);
+ long /*int*/ view_stringForToolTip_point_userDataProc = OS.CALLBACK_view_stringForToolTip_point_userData_(proc6);
+ long /*int*/ canDragRowsWithIndexes_atPoint_Proc = OS.CALLBACK_canDragRowsWithIndexes_atPoint_(proc4);
+ long /*int*/ setNeedsDisplayInRectProc = OS.CALLBACK_setNeedsDisplayInRect_(proc3);
+ long /*int*/ expansionFrameWithFrameProc = OS.CALLBACK_expansionFrameWithFrame_inView_ (proc4);
+ long /*int*/ sizeOfLabelProc = OS.CALLBACK_sizeOfLabel_ (proc3);
+ long /*int*/ drawLabelInRectProc = OS.CALLBACK_drawLabel_inRect_ (proc4);
+ long /*int*/ drawViewBackgroundInRectProc = OS.CALLBACK_drawViewBackgroundInRect_(proc3);
+ long /*int*/ drawBackgroundInClipRectProc = OS.CALLBACK_drawBackgroundInClipRect_(proc3);
+ long /*int*/ scrollClipView_ToPointProc = OS.CALLBACK_scrollClipView_toPoint_(proc4);
+ long /*int*/ headerRectOfColumnProc = OS.CALLBACK_headerRectOfColumn_(proc3);
+ long /*int*/ columnAtPointProc = OS.CALLBACK_columnAtPoint_(proc3);
String className;
- int /*long*/ cls;
+ long /*int*/ cls;
className = "SWTBox";
cls = OS.objc_allocateClassPair(OS.class_NSBox, className, 0);
@@ -2657,7 +2657,7 @@ void initClasses () {
OS.objc_registerClassPair(cls);
if (OS.VERSION >= 0x1070) {
/* Note that isFlippedProc is used for performance and convenience */
- int /*long*/ metaClass = OS.objc_getMetaClass(className);
+ long /*int*/ metaClass = OS.objc_getMetaClass(className);
OS.class_addMethod(metaClass, OS.sel_isCompatibleWithOverlayScrollers, isFlippedProc, "@:");
}
@@ -2704,7 +2704,7 @@ void initClasses () {
OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
OS.objc_registerClassPair(cls);
- int /*long*/ nsSecureTextViewClass = OS.objc_lookUpClass("NSSecureTextView");
+ long /*int*/ nsSecureTextViewClass = OS.objc_lookUpClass("NSSecureTextView");
if (nsSecureTextViewClass != 0) {
className = "SWTSecureEditorView";
cls = OS.objc_allocateClassPair(nsSecureTextViewClass, className, 0);
@@ -2910,9 +2910,9 @@ void initClasses () {
OS.objc_registerClassPair(cls);
}
-NSFont getFont (int /*long*/ cls, int /*long*/ sel) {
- int /*long*/ widget = OS.objc_msgSend (OS.objc_msgSend (cls, OS.sel_alloc), OS.sel_initWithFrame_, new NSRect());
- int /*long*/ font = 0;
+NSFont getFont (long /*int*/ cls, long /*int*/ sel) {
+ long /*int*/ widget = OS.objc_msgSend (OS.objc_msgSend (cls, OS.sel_alloc), OS.sel_initWithFrame_, new NSRect());
+ long /*int*/ font = 0;
if (OS.objc_msgSend_bool (widget, OS.sel_respondsToSelector_, sel)) {
font = OS.objc_msgSend (widget, sel);
}
@@ -2928,7 +2928,7 @@ NSFont getFont (int /*long*/ cls, int /*long*/ sel) {
}
void initColors () {
- colors = new float /*double*/ [SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT + 1][];
+ colors = new double /*float*/ [SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT + 1][];
colors[SWT.COLOR_INFO_FOREGROUND] = getWidgetColorRGB(SWT.COLOR_INFO_FOREGROUND);
colors[SWT.COLOR_INFO_BACKGROUND] = getWidgetColorRGB(SWT.COLOR_INFO_BACKGROUND);
colors[SWT.COLOR_TITLE_FOREGROUND] = getWidgetColorRGB(SWT.COLOR_TITLE_FOREGROUND);
@@ -2996,7 +2996,7 @@ void initFonts () {
*
* @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);
if (screenWindow == null) {
NSWindow window = (NSWindow) new NSWindow ().alloc ();
@@ -3039,7 +3039,7 @@ 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) {
+public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
if (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED);
}
@@ -3128,8 +3128,8 @@ public boolean post(Event event) {
synchronized (Device.class) {
if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
- int /*long*/ eventRef = 0;
- int /*long*/ eventSource = OS.CGEventSourceCreate(OS.kCGEventSourceStateHIDSystemState);
+ long /*int*/ eventRef = 0;
+ long /*int*/ eventSource = OS.CGEventSourceCreate(OS.kCGEventSourceStateHIDSystemState);
if (eventSource == 0) return false;
boolean returnValue = false;
int deadKeyState[] = new int[1];
@@ -3139,9 +3139,9 @@ public boolean post(Event event) {
case SWT.KeyUp: {
short vKey = (short)Display.untranslateKey (event.keyCode);
if (vKey == 0) {
- int /*long*/ uchrPtr = 0;
- int /*long*/ currentKbd = OS.TISCopyCurrentKeyboardInputSource();
- int /*long*/ uchrCFData = OS.TISGetInputSourceProperty(currentKbd, OS.kTISPropertyUnicodeKeyLayoutData());
+ long /*int*/ uchrPtr = 0;
+ long /*int*/ currentKbd = OS.TISCopyCurrentKeyboardInputSource();
+ long /*int*/ uchrCFData = OS.TISGetInputSourceProperty(currentKbd, OS.kTISPropertyUnicodeKeyLayoutData());
if (uchrCFData == 0) return false;
uchrPtr = OS.CFDataGetBytePtr(uchrCFData);
@@ -3385,13 +3385,13 @@ public Point map (Control from, Control to, int x, int y) {
pt = view.convertPoint_toView_(pt, null);
pt = fromWindow.convertBaseToScreen(pt);
pt.y = primaryFrame.height - pt.y;
- float /*double*/ scaleFactor = fromWindow.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = fromWindow.userSpaceScaleFactor();
pt.x /= scaleFactor;
pt.y /= scaleFactor;
}
if (to != null) {
NSView view = to.eventView ();
- float /*double*/ scaleFactor = toWindow.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = toWindow.userSpaceScaleFactor();
pt.x *= scaleFactor;
pt.y = primaryFrame.height - (pt.y * scaleFactor);
pt = toWindow.convertScreenToBase(pt);
@@ -3515,13 +3515,13 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei
pt = view.convertPoint_toView_(pt, null);
pt = fromWindow.convertBaseToScreen(pt);
pt.y = primaryFrame.height - pt.y;
- float /*double*/ scaleFactor = fromWindow.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = fromWindow.userSpaceScaleFactor();
pt.x /= scaleFactor;
pt.y /= scaleFactor;
}
if (to != null) {
NSView view = to.eventView ();
- float /*double*/ scaleFactor = toWindow.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = toWindow.userSpaceScaleFactor();
pt.x *= scaleFactor;
pt.y = primaryFrame.height - (pt.y * scaleFactor);
pt = toWindow.convertScreenToBase(pt);
@@ -3536,7 +3536,7 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei
return rectangle;
}
-int /*long*/ observerProc (int /*long*/ observer, int /*long*/ activity, int /*long*/ info) {
+long /*int*/ observerProc (long /*int*/ observer, long /*int*/ activity, long /*int*/ info) {
switch ((int)/*64*/activity) {
case OS.kCFRunLoopBeforeWaiting:
if (runAsyncMessages) {
@@ -3551,8 +3551,8 @@ boolean performKeyEquivalent(NSWindow window, NSEvent nsEvent) {
if (modalDialog == null) return false;
if (nsEvent.type() != OS.NSKeyDown) return false;
int stateMask = 0;
- int /*long*/ selector = 0;
- int /*long*/ modifierFlags = nsEvent.modifierFlags();
+ long /*int*/ selector = 0;
+ long /*int*/ modifierFlags = nsEvent.modifierFlags();
if ((modifierFlags & OS.NSAlternateKeyMask) != 0) stateMask |= SWT.ALT;
if ((modifierFlags & OS.NSShiftKeyMask) != 0) stateMask |= SWT.SHIFT;
if ((modifierFlags & OS.NSControlKeyMask) != 0) stateMask |= SWT.CONTROL;
@@ -3780,7 +3780,7 @@ void releaseDisplay () {
markedAttributes = null;
if (oldCursorSetProc != 0) {
- int /*long*/ method = OS.class_getInstanceMethod(OS.class_NSCursor, OS.sel_set);
+ long /*int*/ method = OS.class_getInstanceMethod(OS.class_NSCursor, OS.sel_set);
OS.method_setImplementation(method, oldCursorSetProc);
}
if (cursorSetCallback != null) cursorSetCallback.dispose();
@@ -3796,7 +3796,7 @@ void releaseDisplay () {
if (!isEmbedded) {
//remove all existing menu items except the application menu
NSMenu menubar = application.mainMenu();
- int /*long*/ count = menubar.numberOfItems();
+ long /*int*/ count = menubar.numberOfItems();
while (count > 1) {
menubar.removeItemAtIndex(count - 1);
count--;
@@ -3902,8 +3902,8 @@ public void removeListener (int eventType, Listener listener) {
Widget removeWidget (NSObject view) {
if (view == null) return null;
- int /*long*/ [] jniRef = new int /*long*/ [1];
- int /*long*/ iVar = OS.object_getInstanceVariable(view.id, SWT_OBJECT, jniRef);
+ long /*int*/ [] jniRef = new long /*int*/ [1];
+ long /*int*/ iVar = OS.object_getInstanceVariable(view.id, SWT_OBJECT, jniRef);
if (iVar == 0) {
if (dynamicObjectMap != null) {
@@ -4034,7 +4034,7 @@ NSArray runLoopModes() {
boolean runPaint () {
if (needsDisplay == null && needsDisplayInRect == null) return false;
if (needsDisplay != null) {
- int /*long*/ count = needsDisplay.count();
+ long /*int*/ count = needsDisplay.count();
for (int i = 0; i < count; i++) {
OS.objc_msgSend(needsDisplay.objectAtIndex(i).id, OS.sel_setNeedsDisplay_, true);
}
@@ -4042,7 +4042,7 @@ boolean runPaint () {
needsDisplay = null;
}
if (needsDisplayInRect != null) {
- int /*long*/ count = needsDisplayInRect.count();
+ long /*int*/ count = needsDisplayInRect.count();
for (int i = 0; i < count; i+=2) {
NSValue value = new NSValue(needsDisplayInRect.objectAtIndex(i+1));
OS.objc_msgSend(needsDisplayInRect.objectAtIndex(i).id, OS.sel_setNeedsDisplayInRect_, value.rectValue());
@@ -4150,7 +4150,7 @@ void sendEvent (EventTable table, Event event) {
static NSString getApplicationName() {
NSString name = null;
int pid = OS.getpid ();
- int /*long*/ ptr = OS.getenv (ascii ("APP_NAME_" + pid));
+ long /*int*/ ptr = OS.getenv (ascii ("APP_NAME_" + pid));
if (ptr != 0) name = NSString.stringWithUTF8String(ptr);
if (name == null && APP_NAME != null) name = NSString.stringWith(APP_NAME);
if (name == null) {
@@ -4446,7 +4446,7 @@ void setMenuBar (Menu menu) {
*/
// menubar.cancelTracking();
OS.CancelMenuTracking (OS.AcquireRootMenu (), true, 0);
- int /*long*/ count = menubar.numberOfItems();
+ long /*int*/ count = menubar.numberOfItems();
while (count > 1) {
menubar.removeItemAtIndex(count - 1);
count--;
@@ -4693,7 +4693,7 @@ public void timerExec (int milliseconds, Runnable runnable) {
}
}
-int /*long*/ timerProc (int /*long*/ id, int /*long*/ sel, int /*long*/ timerID) {
+long /*int*/ timerProc (long /*int*/ id, long /*int*/ sel, long /*int*/ timerID) {
NSTimer timer = new NSTimer (timerID);
try {
NSNumber number = new NSNumber(timer.userInfo());
@@ -4761,7 +4761,7 @@ void updateQuitMenu () {
NSMenu sm = appitem.submenu();
// Normally this would be sel_terminate_ but we changed it so terminate: doesn't kill the app.
- int /*long*/ quitIndex = sm.indexOfItemWithTarget(applicationDelegate, OS.sel_applicationShouldTerminate_);
+ long /*int*/ quitIndex = sm.indexOfItemWithTarget(applicationDelegate, OS.sel_applicationShouldTerminate_);
if (quitIndex != -1) {
NSMenuItem quitItem = sm.itemAtIndex(quitIndex);
@@ -4803,12 +4803,12 @@ Control findControl (boolean checkTrim) {
Control findControl (boolean checkTrim, NSView[] hitView) {
NSView view = null;
NSPoint screenLocation = NSEvent.mouseLocation();
- int /*long*/ hitWindowNumber = 0;
+ long /*int*/ hitWindowNumber = 0;
if (OS.VERSION >= 0x1060) {
hitWindowNumber = NSWindow.windowNumberAtPoint(screenLocation, 0);
} else {
- int /*long*/ outWindow[] = new int /*long*/ [1];
- OS.FindWindow ((int /*long*/)screenLocation.x, (int /*long*/)(getPrimaryFrame().height - screenLocation.y), outWindow);
+ long /*int*/ outWindow[] = new long /*int*/ [1];
+ OS.FindWindow ((long /*int*/)screenLocation.x, (long /*int*/)(getPrimaryFrame().height - screenLocation.y), outWindow);
if (outWindow[0] != 0) {
hitWindowNumber = OS.HIWindowGetCGWindowID(outWindow[0]);
@@ -4846,7 +4846,7 @@ Control findControl (boolean checkTrim, NSView[] hitView) {
return control;
}
-void finishLaunching (int /*long*/ id, int /*long*/ sel) {
+void finishLaunching (long /*int*/ id, long /*int*/ sel) {
/*
* [NSApplication finishLaunching] cannot run multiple times otherwise
* multiple main menus are added.
@@ -4859,7 +4859,7 @@ void finishLaunching (int /*long*/ id, int /*long*/ sel) {
OS.objc_msgSendSuper(super_struct, sel);
}
-void applicationDidBecomeActive (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void applicationDidBecomeActive (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
NSWindow keyWindow = application.keyWindow();
if (keyWindow != null) {
keyWindow.orderFrontRegardless();
@@ -4870,17 +4870,17 @@ void applicationDidBecomeActive (int /*long*/ id, int /*long*/ sel, int /*long*/
checkEnterExit(findControl(true), null, false);
}
-void applicationDidResignActive (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void applicationDidResignActive (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
checkFocus();
checkEnterExit(null, null, false);
}
-int /*long*/ applicationNextEventMatchingMask (int /*long*/ id, int /*long*/ sel, int /*long*/ mask, int /*long*/ expiration, int /*long*/ mode, int /*long*/ dequeue) {
+long /*int*/ applicationNextEventMatchingMask (long /*int*/ id, long /*int*/ sel, long /*int*/ mask, long /*int*/ expiration, long /*int*/ mode, long /*int*/ dequeue) {
if (dequeue != 0 && trackingControl != null && !trackingControl.isDisposed()) runDeferredEvents();
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
- int /*long*/ result = OS.objc_msgSendSuper(super_struct, sel, mask, expiration, mode, dequeue != 0);
+ long /*int*/ result = OS.objc_msgSendSuper(super_struct, sel, mask, expiration, mode, dequeue != 0);
if (result != 0) {
/*
* Feature of Cocoa. When an NSComboBox's items list is visible it runs an event
@@ -4944,7 +4944,7 @@ void applicationSendTrackingEvent (NSEvent nsEvent, Control trackingControl) {
}
}
-void applicationSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void applicationSendEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
NSEvent nsEvent = new NSEvent(event);
NSWindow window = nsEvent.window ();
@@ -5014,7 +5014,7 @@ void applicationSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event
if (type != OS.NSAppKitDefined) sendEvent = false;
}
-void applicationWillFinishLaunching (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void applicationWillFinishLaunching (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
boolean loaded = false;
/*
@@ -5027,7 +5027,7 @@ void applicationWillFinishLaunching (int /*long*/ id, int /*long*/ sel, int /*lo
* return a non-zero value indicating failure, which we ignore.
*/
if (isEmbedded) {
- int /*long*/ outMenu [] = new int /*long*/ [1];
+ long /*int*/ outMenu [] = new long /*int*/ [1];
short outIndex[] = new short[1];
int status = OS.GetIndMenuItemWithCommandID(0, OS.kHICommandHide, 1, outMenu, outIndex);
if (status == 0) OS.DeleteMenuItem(outMenu[0], outIndex[0]);
@@ -5090,7 +5090,7 @@ void applicationWillFinishLaunching (int /*long*/ id, int /*long*/ sel, int /*lo
NSMenuItem ni = new NSMenuItem(ia.objectAtIndex(i));
NSString title = ni.title().stringByReplacingOccurrencesOfString(match, name);
ni.setTitle(title);
- int /*long*/ newTag = 0;
+ long /*int*/ newTag = 0;
switch(i) {
case 0:
newTag = SWT.ID_ABOUT;
@@ -5114,7 +5114,7 @@ void applicationWillFinishLaunching (int /*long*/ id, int /*long*/ sel, int /*lo
if (newTag != 0) ni.setTag(newTag);
}
- int /*long*/ quitIndex = sm.indexOfItemWithTarget(applicationDelegate, OS.sel_terminate_);
+ long /*int*/ quitIndex = sm.indexOfItemWithTarget(applicationDelegate, OS.sel_terminate_);
if (quitIndex != -1) {
NSMenuItem quitItem = sm.itemAtIndex(quitIndex);
@@ -5123,7 +5123,7 @@ void applicationWillFinishLaunching (int /*long*/ id, int /*long*/ sel, int /*lo
}
}
-static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel) {
+static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel) {
//TODO optimize getting the display
Display display = getCurrent ();
if (display == null) {
@@ -5142,7 +5142,7 @@ static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel) {
return 0;
}
-static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
//TODO optimize getting the display
Display display = getCurrent ();
if (display == null && id != applicationDelegate.id) {
@@ -5199,7 +5199,7 @@ static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*lon
return 0;
}
-static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
Display display = getCurrent();
if (display == null && id != applicationDelegate.id) {
@@ -5222,7 +5222,7 @@ static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*lon
return 1;
} else if (sel == OS.sel_application_openFiles_) {
NSArray files = new NSArray(arg1);
- int /*long*/ count = files.count();
+ long /*int*/ count = files.count();
for (int i=0; i<count; i++) {
String file = new NSString(files.objectAtIndex(i)).getString();
Event event = new Event();
@@ -5236,7 +5236,7 @@ static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*lon
return 0;
}
-static int /*long*/ applicationProc(int /*long*/ id, int /*long*/sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
+static long /*int*/ applicationProc(long /*int*/ id, long /*int*/sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3) {
//TODO optimize getting the display
Display display = getCurrent ();
if (display == null && id != applicationDelegate.id) {
@@ -5251,8 +5251,8 @@ static int /*long*/ applicationProc(int /*long*/ id, int /*long*/sel, int /*long
return 0;
}
-static int /*long*/ dialogProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
- int /*long*/ [] jniRef = new int /*long*/ [1];
+static long /*int*/ dialogProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+ long /*int*/ [] jniRef = new long /*int*/ [1];
OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (jniRef[0] == 0) return 0;
if (sel == OS.sel_changeColor_) {
@@ -5282,8 +5282,8 @@ static int /*long*/ dialogProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
return 0;
}
-static int /*long*/ dialogProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
- int /*long*/ [] jniRef = new int /*long*/ [1];
+static long /*int*/ dialogProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+ long /*int*/ [] jniRef = new long /*int*/ [1];
OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (jniRef[0] == 0) return 0;
if (sel == OS.sel_panel_shouldShowFilename_) {
@@ -5300,8 +5300,8 @@ static int /*long*/ dialogProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
return 0;
}
-static int /*long*/ dialogProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
- int /*long*/ [] jniRef = new int /*long*/ [1];
+static long /*int*/ dialogProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
+ long /*int*/ [] jniRef = new long /*int*/ [1];
OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (jniRef[0] == 0) return 0;
if (sel == OS.sel_panelDidEnd_returnCode_contextInfo_) {
@@ -5312,7 +5312,7 @@ static int /*long*/ dialogProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
return 0;
}
-static Widget LookupWidget (int /*long*/ id, int /*long*/ sel) {
+static Widget LookupWidget (long /*int*/ id, long /*int*/ sel) {
Widget widget = GetWidget(id);
if (widget == null) {
NSView view = new NSView (id);
@@ -5325,10 +5325,10 @@ static Widget LookupWidget (int /*long*/ id, int /*long*/ sel) {
return widget;
}
-static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel) {
+static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel) {
if (sel == OS.sel_cellClass) {
- int /*long*/ superCls = OS.objc_msgSend(OS.class_getSuperclass(id), sel);
- int /*long*/ cls = OS.objc_lookUpClass("SWTAccessible" + OS.class_getName(superCls));
+ long /*int*/ superCls = OS.objc_msgSend(OS.class_getSuperclass(id), sel);
+ long /*int*/ cls = OS.objc_lookUpClass("SWTAccessible" + OS.class_getName(superCls));
return cls != 0 ? cls : superCls;
}
/*
@@ -5382,19 +5382,19 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel) {
} else if (sel == OS.sel_markedRange) {
NSRange range = widget.markedRange (id, sel);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSRange.sizeof);
+ long /*int*/ result = OS.malloc (NSRange.sizeof);
OS.memmove (result, range, NSRange.sizeof);
return result;
} else if (sel == OS.sel_selectedRange) {
NSRange range = widget.selectedRange (id, sel);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSRange.sizeof);
+ long /*int*/ result = OS.malloc (NSRange.sizeof);
OS.memmove (result, range, NSRange.sizeof);
return result;
} else if (sel == OS.sel_cellSize) {
NSSize size = widget.cellSize (id, sel);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSSize.sizeof);
+ long /*int*/ result = OS.malloc (NSSize.sizeof);
OS.memmove (result, size, NSSize.sizeof);
return result;
} else if (sel == OS.sel_hasMarkedText) {
@@ -5435,7 +5435,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel) {
return 0;
}
-static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
/*
* Feature in Cocoa. In Cocoa, the default button animation is done
* in a separate thread that calls drawRect() and isOpaque() from
@@ -5588,7 +5588,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
} else if (sel == OS.sel_firstRectForCharacterRange_) {
NSRect rect = widget.firstRectForCharacterRange (id, sel, arg0);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSRect.sizeof);
+ long /*int*/ result = OS.malloc (NSRect.sizeof);
OS.memmove (result, rect, NSRect.sizeof);
return result;
} else if (sel == OS.sel_insertText_) {
@@ -5630,7 +5630,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
} else if (sel == OS.sel_headerRectOfColumn_) {
NSRect rect = widget.headerRectOfColumn(id, sel, arg0);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSRect.sizeof);
+ long /*int*/ result = OS.malloc (NSRect.sizeof);
OS.memmove (result, rect, NSRect.sizeof);
return result;
} else if (sel == OS.sel_imageRectForBounds_) {
@@ -5638,7 +5638,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
OS.memmove(rect, arg0, NSRect.sizeof);
rect = widget.imageRectForBounds(id, sel, rect);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSRect.sizeof);
+ long /*int*/ result = OS.malloc (NSRect.sizeof);
OS.memmove (result, rect, NSRect.sizeof);
return result;
} else if (sel == OS.sel_titleRectForBounds_) {
@@ -5646,7 +5646,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
OS.memmove(rect, arg0, NSRect.sizeof);
rect = widget.titleRectForBounds(id, sel, rect);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSRect.sizeof);
+ long /*int*/ result = OS.malloc (NSRect.sizeof);
OS.memmove (result, rect, NSRect.sizeof);
return result;
} else if (sel == OS.sel_cellSizeForBounds_) {
@@ -5654,7 +5654,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
OS.memmove(rect, arg0, NSRect.sizeof);
NSSize size = widget.cellSizeForBounds(id, sel, rect);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSSize.sizeof);
+ long /*int*/ result = OS.malloc (NSSize.sizeof);
OS.memmove (result, size, NSSize.sizeof);
return result;
} else if (sel == OS.sel_setObjectValue_) {
@@ -5664,7 +5664,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
} else if (sel == OS.sel_sizeOfLabel_) {
NSSize size = widget.sizeOfLabel(id, sel, arg0 != 0);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc(NSSize.sizeof);
+ long /*int*/ result = OS.malloc(NSSize.sizeof);
OS.memmove(result, size, NSSize.sizeof);
return result;
} else if (sel == OS.sel_comboBoxSelectionDidChange_) {
@@ -5729,7 +5729,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
return 0;
}
-static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
Widget widget = LookupWidget(id, sel);
if (widget == null) return 0;
if (sel == OS.sel_tabView_willSelectTabViewItem_) {
@@ -5773,7 +5773,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
OS.memmove(rect, arg0, NSRect.sizeof);
rect = widget.expansionFrameWithFrame_inView(id, sel, rect, arg1);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSRect.sizeof);
+ long /*int*/ result = OS.malloc (NSRect.sizeof);
OS.memmove (result, rect, NSRect.sizeof);
return result;
} else if (sel == OS.sel_drawLabel_inRect_) {
@@ -5798,7 +5798,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
return 0;
}
-static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
+static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
Widget widget = LookupWidget(id, sel);
if (widget == null) return 0;
if (sel == OS.sel_tableView_objectValueForTableColumn_row_) {
@@ -5820,7 +5820,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
} else if (sel == OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_) {
NSRange range = widget.textView_willChangeSelectionFromCharacterRange_toCharacterRange(id, sel, arg0, arg1, arg2);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSRange.sizeof);
+ long /*int*/ result = OS.malloc (NSRange.sizeof);
OS.memmove (result, range, NSRange.sizeof);
return result;
} else if (sel == OS.sel_dragSelectionWithEvent_offset_slideBack_) {
@@ -5836,7 +5836,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
OS.memmove (rect, arg1, NSRect.sizeof);
rect = widget.drawTitleWithFrameInView (id, sel, arg0, rect, arg2);
/* NOTE that this is freed in C */
- int /*long*/ result = OS.malloc (NSRect.sizeof);
+ long /*int*/ result = OS.malloc (NSRect.sizeof);
OS.memmove (result, rect, NSRect.sizeof);
return result;
} else if (sel == OS.sel_hitTestForEvent_inRect_ofView_) {
@@ -5853,7 +5853,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
return 0;
}
-static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
+static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3) {
Widget widget = LookupWidget(id, sel);
if (widget == null) return 0;
if (sel == OS.sel_tableView_willDisplayCell_forTableColumn_row_) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java
index e0be23abc7..427034f135 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java
@@ -201,15 +201,15 @@ public boolean getOverwrite () {
public String open () {
String fullPath = null;
fileNames = new String [0];
- int /*long*/ method = 0;
- int /*long*/ methodImpl = 0;
+ long /*int*/ method = 0;
+ long /*int*/ methodImpl = 0;
Callback callback = null;
if ((style & SWT.SAVE) != 0) {
NSSavePanel savePanel = NSSavePanel.savePanel();
panel = savePanel;
if (!overwrite) {
callback = new Callback(this, "_overwriteExistingFileCheck", 3);
- int /*long*/ proc = callback.getAddress();
+ long /*int*/ proc = callback.getAddress();
if (proc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
method = OS.class_getInstanceMethod(OS.class_NSSavePanel, OS.sel_overwriteExistingFileCheck);
if (method != 0) methodImpl = OS.method_setImplementation(method, proc);
@@ -223,7 +223,7 @@ public String open () {
Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
panel.setCanCreateDirectories(true);
OS.objc_msgSend(panel.id, OS.sel_setShowsHiddenFiles_, true);
- int /*long*/ jniRef = 0;
+ long /*int*/ jniRef = 0;
SWTPanelDelegate delegate = null;
if (filterExtensions != null && filterExtensions.length != 0) {
delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
@@ -260,7 +260,7 @@ public String open () {
display.setModalDialog(this);
NSString dir = (filterPath != null && filterPath.length() > 0) ? NSString.stringWith(filterPath) : null;
NSString file = (fileName != null && fileName.length() > 0) ? NSString.stringWith(fileName) : null;
- int /*long*/ response = panel.runModalForDirectory(dir, file);
+ long /*int*/ response = panel.runModalForDirectory(dir, file);
if (parent != null && (style & SWT.SHEET) != 0) {
application.endSheet(panel, 0);
}
@@ -339,15 +339,15 @@ public String open () {
return fullPath;
}
-int /*long*/ _overwriteExistingFileCheck (int /*long*/ id, int /*long*/ sel, int /*long*/ str) {
+long /*int*/ _overwriteExistingFileCheck (long /*int*/ id, long /*int*/ sel, long /*int*/ str) {
return 1;
}
-int /*long*/ panel_shouldShowFilename (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+long /*int*/ panel_shouldShowFilename (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
NSString path = new NSString(arg1);
if (filterExtensions != null && filterExtensions.length != 0) {
NSFileManager manager = NSFileManager.defaultManager();
- int /*long*/ ptr = OS.malloc(1);
+ long /*int*/ ptr = OS.malloc(1);
boolean found = manager.fileExistsAtPath(path, ptr);
byte[] isDirectory = new byte[1];
OS.memmove(isDirectory, ptr, 1);
@@ -376,7 +376,7 @@ int /*long*/ panel_shouldShowFilename (int /*long*/ id, int /*long*/ sel, int /*
return 1;
}
-void sendSelection (int /*long*/ id, int /*long*/ sel, int /*long*/ arg) {
+void sendSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ arg) {
panel.validateVisibleColumns();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java
index b1ec63df48..b180df08d3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java
@@ -85,7 +85,7 @@ public FontDialog (Shell parent, int style) {
checkSubclass ();
}
-void changeFont(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void changeFont(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
selected = true;
}
@@ -165,7 +165,7 @@ public FontData open () {
Font font = create ? new Font(display, fontData) : display.getSystemFont();
panel.setPanelFont(font.handle, false);
SWTPanelDelegate delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
- int /*long*/ jniRef = OS.NewGlobalRef(this);
+ long /*int*/ jniRef = OS.NewGlobalRef(this);
if (jniRef == 0) error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
panel.setDelegate(delegate);
@@ -188,12 +188,12 @@ public FontData open () {
return fontData;
}
-void setColor_forAttribute(int /*long*/ id, int /*long*/ sel, int /*long*/ colorArg, int /*long*/ attribute) {
+void setColor_forAttribute(long /*int*/ id, long /*int*/ sel, long /*int*/ colorArg, long /*int*/ attribute) {
if (attribute != 0 && NSString.stringWith("NSColor").isEqualToString(new NSString(attribute))) { //$NON-NLS-1$
if (colorArg != 0) {
NSColor color = new NSColor(colorArg);
Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
- float /*double*/ [] handle = display.getNSColorRGB(color);
+ double /*float*/ [] handle = display.getNSColorRGB(color);
rgb = new RGB((int)(handle[0] * 255), (int)(handle[1] * 255), (int)(handle[2] * 255));
} else {
rgb = null;
@@ -264,11 +264,11 @@ public void setRGB (RGB rgb) {
this.rgb = rgb;
}
-int validModesForFontPanel(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+int validModesForFontPanel(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
return effectsVisible ? OS.NSFontPanelAllModesMask : OS.NSFontPanelAllModesMask & ~OS.NSFontPanelAllEffectsModeMask;
}
-void windowWillClose(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void windowWillClose(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
NSApplication.sharedApplication().stop(null);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java
index 9e21ba4c92..02f2a8b812 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java
@@ -151,7 +151,7 @@ void deregister () {
display.removeWidget (box.titleCell());
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
fillBackground (view, context, rect, -1);
}
@@ -217,7 +217,7 @@ void setFont(NSFont font) {
((NSBox) view).setTitleFont(font);
}
-void setForeground (float /*double*/ [] color) {
+void setForeground (double /*float*/ [] color) {
NSColor nsColor;
if (color == null) {
nsColor = NSColor.textColor ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
index 2a8d81d805..6e04f8b9d0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
@@ -85,7 +85,7 @@ public IME (Canvas parent, int style) {
createWidget ();
}
-int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ rangePtr) {
+long /*int*/ attributedSubstringFromRange (long /*int*/ id, long /*int*/ sel, long /*int*/ rangePtr) {
Event event = new Event ();
event.detail = SWT.COMPOSITION_SELECTION;
sendEvent (SWT.ImeComposition, event);
@@ -104,7 +104,7 @@ int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, in
return 0;
}
-int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ point) {
+long /*int*/ characterIndexForPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ point) {
if (!isInlineEnabled ()) return OS.NSNotFound;
NSPoint pt = new NSPoint ();
OS.memmove (pt, point, NSPoint.sizeof);
@@ -128,7 +128,7 @@ void createWidget () {
}
}
-NSRect firstRectForCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+NSRect firstRectForCharacterRange(long /*int*/ id, long /*int*/ sel, long /*int*/ range) {
NSRect rect = new NSRect ();
Caret caret = parent.caret;
if (caret != null) {
@@ -256,7 +256,7 @@ public TextStyle [] getStyles () {
TextStyle getStyle (NSDictionary attribs) {
NSArray keys = attribs.allKeys ();
- int /*long*/ count = keys.count ();
+ long /*int*/ count = keys.count ();
TextStyle style = new TextStyle ();
for (int j = 0; j < count; j++) {
NSString key = new NSString (keys.objectAtIndex (j));
@@ -330,11 +330,11 @@ public boolean getWideCaret() {
return false;
}
-boolean hasMarkedText (int /*long*/ id, int /*long*/ sel) {
+boolean hasMarkedText (long /*int*/ id, long /*int*/ sel) {
return text.length () != 0;
}
-boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
+boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
if (startOffset == -1) return true;
NSString str = new NSString (string);
if (str.isKindOfClass (OS.class_NSAttributedString)) {
@@ -360,7 +360,7 @@ boolean isInlineEnabled () {
return hooks (SWT.ImeComposition);
}
-NSRange markedRange (int /*long*/ id, int /*long*/ sel) {
+NSRange markedRange (long /*int*/ id, long /*int*/ sel) {
NSRange range = new NSRange ();
if (startOffset != -1) {
range.location = startOffset;
@@ -395,7 +395,7 @@ void releaseWidget () {
resetStyles ();
}
-NSRange selectedRange (int /*long*/ id, int /*long*/ sel) {
+NSRange selectedRange (long /*int*/ id, long /*int*/ sel) {
Event event = new Event ();
event.detail = SWT.COMPOSITION_SELECTION;
sendEvent (SWT.ImeComposition, event);
@@ -429,7 +429,7 @@ public void setCompositionOffset (int offset) {
}
}
-boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ selRange) {
+boolean setMarkedText_selectedRange (long /*int*/ id, long /*int*/ sel, long /*int*/ string, long /*int*/ selRange) {
if (!isInlineEnabled ()) return true;
resetStyles ();
caretOffset = commitCount = 0;
@@ -451,7 +451,7 @@ boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*lo
NSRange rangeLimit = new NSRange (), effectiveRange = new NSRange ();
rangeLimit.length = length;
int rangeCount = 0;
- int /*long*/ ptr = OS.malloc (NSRange.sizeof);
+ long /*int*/ ptr = OS.malloc (NSRange.sizeof);
for (int i = 0; i < length;) {
NSDictionary attribs = attribStr.attributesAtIndex(i, ptr, rangeLimit);
OS.memmove (effectiveRange, ptr, NSRange.sizeof);
@@ -494,7 +494,7 @@ boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*lo
return true;
}
-int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) {
+long /*int*/ validAttributesForMarkedText (long /*int*/ id, long /*int*/ sel) {
NSMutableArray attribs = NSMutableArray.arrayWithCapacity (6);
attribs.addObject (new NSString (OS.NSForegroundColorAttributeName ()));
attribs.addObject (new NSString (OS.NSBackgroundColorAttributeName ()));
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java
index db3b4b135b..81ee8adb89 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java
@@ -95,11 +95,11 @@ public Label (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ accessibleHandle() {
+long /*int*/ accessibleHandle() {
return eventView().id;
}
-boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
if (id == view.id) return true;
return super.accessibilityIsIgnored(id, sel);
}
@@ -135,7 +135,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
int width = DEFAULT_WIDTH;
int height = DEFAULT_HEIGHT;
if ((style & SWT.SEPARATOR) != 0) {
- float /*double*/ lineWidth = ((NSBox)view).borderWidth ();
+ double /*float*/ lineWidth = ((NSBox)view).borderWidth ();
if ((style & SWT.HORIZONTAL) != 0) {
height = (int)Math.ceil (lineWidth * 2);
} else {
@@ -197,7 +197,7 @@ void createHandle () {
widget.setBoxType (OS.NSBoxCustom);
widget.setContentViewMargins (new NSSize());
- float /*double*/ lineWidth = widget.borderWidth ();
+ double /*float*/ lineWidth = widget.borderWidth ();
if ((style & SWT.HORIZONTAL) != 0) {
rect.height = (int)Math.ceil (lineWidth * 2);
rect.y = (DEFAULT_HEIGHT / 2) - (rect.height / 2);
@@ -281,12 +281,12 @@ void deregister () {
if (separator != null) display.removeWidget(separator);
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
fillBackground(view, context, rect, -1);
}
-int /*long*/ imageView() {
+long /*int*/ imageView() {
return imageView.id;
};
@@ -436,7 +436,7 @@ void setFont(NSFont font) {
}
}
-void setForeground (float /*double*/ [] color) {
+void setForeground (double /*float*/ [] color) {
if ((style & SWT.SEPARATOR) != 0) return;
NSCell cell = new NSCell(textView.cell());
cell.setAttributedStringValue(createString());
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java
index 8b875fa648..3ae4bdac22 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java
@@ -110,7 +110,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection, typedListener);
}
-boolean textView_clickOnLink_atIndex(int /*long*/ id, int /*long*/ sel, int /*long*/ textView, int /*long*/ link, int /*long*/ charIndex) {
+boolean textView_clickOnLink_atIndex(long /*int*/ id, long /*int*/ sel, long /*int*/ textView, long /*int*/ link, long /*int*/ charIndex) {
NSString str = new NSString (link);
Event event = new Event ();
event.text = str.getString();
@@ -237,7 +237,7 @@ void deregister () {
if (scrollView != null) display.removeWidget (scrollView);
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rectangle) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rectangle) {
fillBackground (view, context, rectangle, -1);
if (!hasFocus() || focusIndex == -1) return;
int [] outMetric = new int [1];
@@ -308,13 +308,13 @@ NSRect[] getRectangles(int linkIndex) {
range.length = offsets[linkIndex].y - offsets[linkIndex].x + 1;
NSRange glyphRange = layoutManager.glyphRangeForCharacterRange(range, 0);
- int /*long*/ rangePtr = OS.malloc(NSRange.sizeof);
+ long /*int*/ rangePtr = OS.malloc(NSRange.sizeof);
NSRange lineRange = new NSRange();
/* compute number of lines in the link */
int numberOfLines = 0;
- int /*long*/ index = glyphRange.location;
- int /*long*/ glyphEndIndex = glyphRange.location + glyphRange.length;
+ long /*int*/ index = glyphRange.location;
+ long /*int*/ glyphEndIndex = glyphRange.location + glyphRange.length;
while (index < glyphEndIndex) {
numberOfLines++;
layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
@@ -364,7 +364,7 @@ public String getText () {
return text;
}
-void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
/*
* Feature in Cocoa: Link click notices are sent on mouseDown, but for some reason, Cocoa
* re-sends the mouseUp that follows the click on a link. Fix is to ignore the next mouseUp
@@ -377,7 +377,7 @@ void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
super.mouseUp(id, sel, theEvent);
}
-boolean shouldDrawInsertionPoint(int /*long*/ id, int /*long*/ sel) {
+boolean shouldDrawInsertionPoint(long /*int*/ id, long /*int*/ sel) {
return false;
}
@@ -638,7 +638,7 @@ void setFont(NSFont font) {
((NSTextView) view).setFont(font);
}
-void setForeground (float /*double*/ [] color) {
+void setForeground (double /*float*/ [] color) {
if (!getEnabled ()) return;
NSColor nsColor;
if (color == null) {
@@ -724,7 +724,7 @@ int traversalCode (int key, NSEvent theEvent) {
if (offsets.length == 0) return 0;
int bits = super.traversalCode (key, theEvent);
if (key == 48 /* Tab */ && theEvent != null) {
- int /*long*/ modifierFlags = theEvent.modifierFlags();
+ long /*int*/ modifierFlags = theEvent.modifierFlags();
boolean next = (modifierFlags & OS.NSShiftKeyMask) == 0;
if (next && focusIndex < offsets.length - 1) {
return bits & ~ SWT.TRAVERSE_TAB_NEXT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
index 72cd7a9bd4..dffd19de3b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
@@ -81,7 +81,7 @@ public List (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
// if (attributeName.isEqualToString(OS.NSAccessibilityHeaderAttribute)) {
// /*
// * Bug in the Macintosh. Even when the header is not visible,
@@ -96,7 +96,7 @@ int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int
return super.accessibilityAttributeValue(id, sel, arg0);
}
-boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
return true;
}
@@ -387,7 +387,7 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
NSPoint pt = new NSPoint();
pt.x = x;
pt.y = y;
- int /*long*/ row = widget.rowAtPoint(pt);
+ long /*int*/ row = widget.rowAtPoint(pt);
if (row == -1) return false;
boolean dragging = super.dragDetect(x, y, filter, consume);
if (dragging) {
@@ -403,7 +403,7 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
return dragging;
}
-void drawBackgroundInClipRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+void drawBackgroundInClipRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
super.drawViewBackgroundInRect(id, sel, rect);
if (id != view.id) return;
fillBackground (view, NSGraphicsContext.currentContext(), rect, -1);
@@ -544,7 +544,7 @@ public String [] getSelection () {
}
NSIndexSet selection = widget.selectedRowIndexes();
int count = (int)/*64*/selection.count();
- int /*long*/ [] indexBuffer = new int /*long*/ [count];
+ long /*int*/ [] indexBuffer = new long /*int*/ [count];
selection.getIndexes(indexBuffer, count, 0);
String [] result = new String [count];
for (int i=0; i<count; i++) {
@@ -587,7 +587,7 @@ public int getSelectionIndex () {
}
NSIndexSet selection = widget.selectedRowIndexes();
int count = (int)/*64*/selection.count();
- int /*long*/ [] result = new int /*long*/ [count];
+ long /*int*/ [] result = new long /*int*/ [count];
selection.getIndexes(result, count, 0);
return (int)/*64*/result [0];
}
@@ -616,7 +616,7 @@ public int [] getSelectionIndices () {
}
NSIndexSet selection = widget.selectedRowIndexes();
int count = (int)/*64*/selection.count();
- int /*long*/ [] indices = new int /*long*/ [count];
+ long /*int*/ [] indices = new long /*int*/ [count];
selection.getIndexes(indices, count, 0);
int [] result = new int [count];
for (int i = 0; i < result.length; i++) {
@@ -729,7 +729,7 @@ public boolean isSelected (int index) {
* right-clicks or control-clicks on an NSTableView or its subclasses. Fix is to select the
* clicked-on row ourselves.
*/
-int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
NSEvent event = new NSEvent(theEvent);
NSTableView table = (NSTableView)view;
@@ -738,7 +738,7 @@ int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEve
// select the row that was clicked before showing the menu for the event
NSPoint mousePoint = view.convertPoint_fromView_(event.locationInWindow(), null);
- int /*long*/ row = table.rowAtPoint(mousePoint);
+ long /*int*/ row = table.rowAtPoint(mousePoint);
// figure out if the row that was just clicked on is currently selected
if (selectedRowIndexes.containsIndex(row) == false) {
@@ -752,7 +752,7 @@ int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEve
return super.menuForEvent(id, sel, theEvent);
}
-void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
ignoreSelect = false;
NSTableView widget = (NSTableView)view;
NSEvent nsEvent = new NSEvent(theEvent);
@@ -770,11 +770,11 @@ void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
didSelect = false;
}
-boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) {
+boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
return false;
}
-int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) {
+long /*int*/ numberOfRowsInTableView(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView) {
return itemCount;
}
@@ -1136,8 +1136,8 @@ void setBackgroundColor(NSColor nsColor) {
void setFont (NSFont font) {
super.setFont (font);
- float /*double*/ ascent = font.ascender ();
- float /*double*/ descent = -font.descender () + font.leading ();
+ double /*float*/ ascent = font.ascender ();
+ double /*float*/ descent = -font.descender () + font.leading ();
((NSTableView)view).setRowHeight ((int)Math.ceil (ascent + descent) + 1);
setScrollWidth();
}
@@ -1203,7 +1203,7 @@ boolean setScrollWidth (String item) {
cell.setFont (font.handle);
cell.setTitle (NSString.stringWith (item));
NSSize size = cell.cellSize ();
- float /*double*/ oldWidth = column.width ();
+ double /*float*/ oldWidth = column.width ();
if (oldWidth < size.width) {
column.setWidth (size.width);
return true;
@@ -1217,7 +1217,7 @@ boolean setScrollWidth () {
NSCell cell = column.dataCell ();
Font font = this.font != null ? this.font : defaultFont ();
cell.setFont (font.handle);
- float /*double*/ width = 0;
+ double /*float*/ width = 0;
for (int i = 0; i < itemCount; i++) {
cell.setTitle (NSString.stringWith (items[i]));
NSSize size = cell.cellSize ();
@@ -1444,24 +1444,24 @@ public void showSelection () {
if (index >= 0) showIndex (index);
}
-void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewSelectionDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
if (didSelect) return;
sendSelection();
}
-void tableViewSelectionIsChanging (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewSelectionIsChanging (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
didSelect = true;
sendSelection();
}
-int /*long*/ tableView_objectValueForTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
- float /*double*/ [] fg = ((NSTableView)view).isRowSelected(rowIndex) ? null : foreground;
+long /*int*/ tableView_objectValueForTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
+ double /*float*/ [] fg = ((NSTableView)view).isRowSelected(rowIndex) ? null : foreground;
NSAttributedString attribStr = createString(items[(int)/*64*/rowIndex], null, fg, SWT.LEFT, false, getEnabled(), false);
attribStr.autorelease();
return attribStr.id;
}
-int /*long*/ tableView_selectionIndexesForProposedSelection (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ indexSet) {
+long /*int*/ tableView_selectionIndexesForProposedSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ indexSet) {
if ((style & SWT.SINGLE) != 0) {
/*
* Feature in Cocoa. Calling setAllowsEmptySelection will automatically select the first row of the list.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
index d82395f36f..f06d34199e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
@@ -264,7 +264,7 @@ void _setVisible (boolean visible) {
NSView topView = window.contentView();
Point shellCoord = display.map(null, shell, new Point(x,y));
location = new NSPoint ();
- float /*double*/ scaleFactor = window.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = window.userSpaceScaleFactor();
location.x = shellCoord.x * scaleFactor;
location.y = (topView.frame().height - shellCoord.y) * scaleFactor;
} else {
@@ -345,8 +345,8 @@ void createHandle () {
nsMenu = widget;
} else {
nsMenu.retain();
- int /*long*/ cls = OS.object_getClass(nsMenu.id);
- int /*long*/ dynNSMenu_class = display.createMenuSubclass(cls, "SWTSystemMenu", true);
+ long /*int*/ cls = OS.object_getClass(nsMenu.id);
+ long /*int*/ dynNSMenu_class = display.createMenuSubclass(cls, "SWTSystemMenu", true);
if (cls != dynNSMenu_class) {
OS.object_setClass(nsMenu.id, dynNSMenu_class);
}
@@ -371,8 +371,8 @@ void createItem (MenuItem item, int index) {
}
item.nsItem = nsItem;
} else {
- int /*long*/ cls = OS.object_getClass(nsItem.id);
- int /*long*/ dynNSMenuItem_class = display.createMenuItemSubclass(cls, "SWTSystemMenuItem", true);
+ long /*int*/ cls = OS.object_getClass(nsItem.id);
+ long /*int*/ dynNSMenuItem_class = display.createMenuItemSubclass(cls, "SWTSystemMenuItem", true);
if (cls != dynNSMenuItem_class) {
OS.object_setClass(nsItem.id, dynNSMenuItem_class);
}
@@ -394,9 +394,9 @@ void createItem (MenuItem item, int index) {
// Sync native key equivalent to MenuItem's accelerator.
// The system menu on OS X only uses command and option, so it's
// safe to just check for those two key masks.
- int /*long*/ keyMask = nsItem.keyEquivalentModifierMask();
+ long /*int*/ keyMask = nsItem.keyEquivalentModifierMask();
NSString keyEquivString = nsItem.keyEquivalent();
- int /*long*/ keyEquiv = 0;
+ long /*int*/ keyEquiv = 0;
if (keyEquivString != null) {
keyEquiv = keyEquivString.characterAtIndex(0);
if ((keyMask & OS.NSCommandKeyMask) != 0) keyEquiv |= SWT.COMMAND;
@@ -788,7 +788,7 @@ public boolean isVisible () {
return getVisible ();
}
-void menu_willHighlightItem(int /*long*/ id, int /*long*/ sel, int /*long*/ menu, int /*long*/ itemID) {
+void menu_willHighlightItem(long /*int*/ id, long /*int*/ sel, long /*int*/ menu, long /*int*/ itemID) {
Widget widget = display.getWidget(itemID);
if (widget instanceof MenuItem) {
MenuItem item = (MenuItem)widget;
@@ -796,23 +796,23 @@ void menu_willHighlightItem(int /*long*/ id, int /*long*/ sel, int /*long*/ menu
}
}
-void menuNeedsUpdate(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+void menuNeedsUpdate(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
//This code is intentionally commented
//sendEvent (SWT.Show);
}
-void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+void menuWillOpen(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
visible = true;
sendEvent (SWT.Show);
if (isDisposed()) return;
- float /*double*/ width = 0;
+ double /*float*/ width = 0;
NSAttributedString[] strs = new NSAttributedString[itemCount];
for (int i=0; i<itemCount; i++) {
MenuItem item = items [i];
NSMenuItem nsItem = item.nsItem;
strs[i] = nsItem.attributedTitle();
NSImage nsImage = nsItem.image();
- float /*double*/ w = GAP;
+ double /*float*/ w = GAP;
if (strs[i] != null) {
w += strs[i].size().width;
}
@@ -832,7 +832,7 @@ void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
if (length > 1) {
NSMenuItem nsItem = item.nsItem;
NSImage nsImage = nsItem.image();
- float /*double*/ tab = width;
+ double /*float*/ tab = width;
if (nsImage != null) {
tab -= (nsImage.size().width + GAP);
}
@@ -868,7 +868,7 @@ void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
}
}
-void menuDidClose(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+void menuDidClose(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
sendEvent (SWT.Hide);
if (isDisposed()) return;
visible = false;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
index ce62d49578..cebf941129 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
@@ -40,7 +40,7 @@ public class MenuItem extends Item {
NSMenuItem nsItem;
Menu parent, menu;
int accelerator;
- int /*long*/ nsItemAction;
+ long /*int*/ nsItemAction;
id nsItemTarget;
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java
index 2707036037..8212b725dc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java
@@ -206,7 +206,7 @@ public int open () {
NSString message = NSString.stringWith(this.message != null ? this.message : "");
alert.setMessageText(message);
int response = 0;
- int /*long*/ jniRef = 0;
+ long /*int*/ jniRef = 0;
SWTPanelDelegate delegate = null;
Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
if ((style & SWT.SHEET) != 0) {
@@ -307,7 +307,7 @@ public int open () {
return SWT.CANCEL;
}
-void panelDidEnd_returnCode_contextInfo(int /*long*/ id, int /*long*/ sel, int /*long*/ alert, int /*long*/ returnCode, int /*long*/ contextInfo) {
+void panelDidEnd_returnCode_contextInfo(long /*int*/ id, long /*int*/ sel, long /*int*/ alert, long /*int*/ returnCode, long /*int*/ contextInfo) {
this.returnCode = (int)/*64*/returnCode;
NSApplication application = NSApplication.sharedApplication();
application.endSheet(new NSAlert(alert).window(), returnCode);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java
index 68acfb6dfd..af3f758116 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java
@@ -110,7 +110,7 @@ NSFont defaultNSFont () {
return display.progressIndicatorFont;
}
-void _drawThemeProgressArea (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void _drawThemeProgressArea (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
/*
* Bug in Cocoa. When the threaded animation is turned off by calling
* setUsesThreadedAnimation(), _drawThemeProgressArea() attempts to
@@ -128,7 +128,7 @@ void _drawThemeProgressArea (int /*long*/ id, int /*long*/ sel, int /*long*/ arg
* region of the progress bar before calling super.
*/
if (visiblePath == null) {
- int /*long*/ visibleRegion = getVisibleRegion();
+ long /*int*/ visibleRegion = getVisibleRegion();
visiblePath = getPath(visibleRegion);
OS.DisposeRgn(visibleRegion);
}
@@ -319,7 +319,7 @@ void resetVisibleRegion () {
visiblePath = null;
}
-void viewDidMoveToWindow(int /*long*/ id, int /*long*/ sel) {
+void viewDidMoveToWindow(long /*int*/ id, long /*int*/ sel) {
/*
* Bug in Cocoa. An indeterminate progress indicator doesn't start animating until it is in
* a visible window. Workaround is to catch when the bar has been added to a window and start
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java
index b9eb76f0a4..68a37e41f6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java
@@ -81,7 +81,7 @@ public Sash (Composite parent, int style) {
sizeCursor = new Cursor (display, cursorStyle);
}
-int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
if (accessibilityAttributes == null) {
NSMutableArray ourAttributes = NSMutableArray.arrayWithCapacity(10);
ourAttributes.addObject(OS.NSAccessibilityRoleAttribute);
@@ -124,8 +124,8 @@ int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
return accessibilityAttributes.id;
}
-int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
- int /*long*/ returnValue = 0;
+long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+ long /*int*/ returnValue = 0;
NSString attributeName = new NSString(arg0);
if (accessible != null) {
@@ -155,7 +155,7 @@ int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int
return NSNumber.numberWithInt(value).id;
} else if (attributeName.isEqualToString (OS.NSAccessibilityMaxValueAttribute)) {
NSRect parentFrame = parent.topView().frame();
- float /*double*/ maxValue = (style & SWT.VERTICAL) != 0 ?
+ double /*float*/ maxValue = (style & SWT.VERTICAL) != 0 ?
parentFrame.width :
parentFrame.height;
return NSNumber.numberWithDouble(maxValue).id;
@@ -198,7 +198,7 @@ int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int
return super.accessibilityAttributeValue(id, sel, arg0);
}
-boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
return false;
}
@@ -243,7 +243,7 @@ static int checkStyle (int style) {
return checkBits (style, SWT.HORIZONTAL, SWT.VERTICAL, 0, 0, 0, 0);
}
-boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean becomeFirstResponder (long /*int*/ id, long /*int*/ sel) {
boolean result = super.becomeFirstResponder(id, sel);
NSRect frame = view.frame();
lastX = (int)frame.x;
@@ -271,7 +271,7 @@ void createHandle () {
view = widget;
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
fillBackground (view, context, rect, -1);
}
@@ -296,7 +296,7 @@ boolean sendKeyEvent(NSEvent nsEvent, int type) {
case 124: /* Right arrow */ {
int xChange = 0, yChange = 0;
int stepSize = PAGE_INCREMENT;
- int /*long*/ modifiers = nsEvent.modifierFlags();
+ long /*int*/ modifiers = nsEvent.modifierFlags();
if ((modifiers & OS.NSControlKeyMask) != 0) stepSize = INCREMENT;
if ((style & SWT.VERTICAL) != 0) {
if (keyCode == 126 || keyCode == 125) break;
@@ -346,7 +346,7 @@ boolean sendKeyEvent(NSEvent nsEvent, int type) {
return true;
}
-void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
//TODO use sendMouseEvent
super.mouseDown(id, sel, theEvent);
if (isDisposed()) return;
@@ -372,12 +372,12 @@ void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
}
}
-boolean mouseEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent, int type) {
+boolean mouseEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent, int type) {
super.mouseEvent (id, sel, theEvent, type);
return new NSEvent (theEvent).type () != OS.NSLeftMouseDown;
}
-void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
//TODO use sendMouseEvent
super.mouseDragged(id, sel, theEvent);
if (isDisposed()) return;
@@ -408,7 +408,7 @@ void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
}
}
-void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
//TODO use sendMouseEvent
super.mouseUp(id, sel, theEvent);
if (isDisposed()) return;
@@ -464,10 +464,10 @@ public void removeSelectionListener(SelectionListener listener) {
eventTable.unhook(SWT.DefaultSelection,listener);
}
-void superKeyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void superKeyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
-void superKeyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void superKeyUp (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
int traversalCode (int key, NSEvent theEvent) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
index 1f382541d6..830d3c23ec 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
@@ -114,7 +114,7 @@ static int checkStyle (int style) {
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
NSSlider widget = (NSSlider)view;
- float /*double*/ thickness = widget.knobThickness();
+ double /*float*/ thickness = widget.knobThickness();
int width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT;
if ((style & SWT.HORIZONTAL) != 0) {
height = (int)Math.ceil(thickness);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
index 615e6b72f6..97b812f494 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
@@ -89,7 +89,7 @@ public class ScrollBar extends Widget {
int increment = 1;
int pageIncrement = 10;
id target;
- int /*long*/ actionSelector;
+ long /*int*/ actionSelector;
ScrollBar () {
/* Do nothing */
@@ -730,7 +730,7 @@ void updateBar (int selection, int minimum, int maximum, int thumb) {
float fraction = range <= 0 ? 1 : (float) (selection - minimum) / range;
float knob = range <= 0 ? 1 : (float) thumb / (maximum - minimum);
double oldFraction = widget.doubleValue();
- float /*double*/ oldKnob = widget.knobProportion();
+ double /*float*/ oldKnob = widget.knobProportion();
widget.setDoubleValue(fraction);
widget.setKnobProportion(knob);
widget.setEnabled (range > 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
index 321b05ce86..b9a772f9dc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
@@ -134,7 +134,7 @@ ScrollBar createScrollBar (int style) {
bar.style = style;
bar.display = display;
NSScroller scroller;
- int /*long*/ actionSelector;
+ long /*int*/ actionSelector;
NSRect rect = new NSRect();
if ((style & SWT.H_SCROLL) != 0) {
rect.width = 1;
@@ -271,7 +271,7 @@ boolean hooksKeys () {
return hooks (SWT.KeyDown) || hooks (SWT.KeyUp) || hooks (SWT.Traverse);
}
-boolean isEventView (int /*long*/ id) {
+boolean isEventView (long /*int*/ id) {
return id == eventView ().id;
}
@@ -331,7 +331,7 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-void scrollClipViewToPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ clipView, NSPoint point) {
+void scrollClipViewToPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ clipView, NSPoint point) {
if ((state & CANVAS) == 0 && scrollView != null) {
NSClipView clip = new NSClipView (clipView);
boolean oldCopies = clip.copiesOnScroll (), copies = oldCopies;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
index ef4b26e7cb..b89d822113 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
@@ -120,9 +120,9 @@ import org.eclipse.swt.internal.cocoa.*;
public class Shell extends Decorations {
NSWindow window;
SWTWindowDelegate windowDelegate;
- int /*long*/ hostWindowClass;
+ long /*int*/ hostWindowClass;
NSWindow hostWindow;
- int /*long*/ tooltipOwner, tooltipTag, tooltipUserData;
+ long /*int*/ tooltipOwner, tooltipTag, tooltipUserData;
int glContextCount;
boolean opened, moved, resized, fullScreen, center, deferFlushing, scrolling, isPopup;
Control lastActive;
@@ -264,7 +264,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 ();
@@ -390,7 +390,7 @@ public Shell (Shell parent, int style) {
*
* @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);
}
@@ -414,7 +414,7 @@ public static Shell internal_new (Display display, int /*long*/ handle) {
*
* @since 3.5
*/
-public static Shell cocoa_new (Display display, int /*long*/ handle) {
+public static Shell cocoa_new (Display display, long /*int*/ handle) {
return new Shell (display, null, SWT.NO_TRIM, handle, true);
}
@@ -444,7 +444,7 @@ static int checkStyle (Shell parent, int style) {
return bits;
}
-boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
// The content view of a shell is always ignored.
if (id == view.id) return true;
return super.accessibilityIsIgnored(id, sel);
@@ -482,12 +482,12 @@ public void addShellListener(ShellListener listener) {
void attachObserversToWindow(NSWindow newWindow) {
if (newWindow == null || newWindow.id == 0) return;
- int /*long*/ newHostWindowClass = OS.object_getClass(newWindow.id);
- int /*long*/ sendEventImpl = OS.class_getMethodImplementation(newHostWindowClass, OS.sel_sendEvent_);
+ long /*int*/ newHostWindowClass = OS.object_getClass(newWindow.id);
+ long /*int*/ sendEventImpl = OS.class_getMethodImplementation(newHostWindowClass, OS.sel_sendEvent_);
if (sendEventImpl == Display.windowCallback3.getAddress()) return;
hostWindow = newWindow;
hostWindow.retain();
- int /*long*/ embeddedSubclass = display.createWindowSubclass(newHostWindowClass, "SWTAWTWindow", true);
+ long /*int*/ embeddedSubclass = display.createWindowSubclass(newHostWindowClass, "SWTAWTWindow", true);
OS.object_setClass(hostWindow.id, embeddedSubclass);
display.addWidget (hostWindow, this);
hostWindowClass = newHostWindowClass;
@@ -512,7 +512,7 @@ void attachObserversToWindow(NSWindow newWindow) {
defaultCenter.addObserver(windowDelegate, OS.sel_windowWillClose_, OS.NSWindowWillCloseNotification, hostWindow);
}
-void becomeKeyWindow (int /*long*/ id, int /*long*/ sel) {
+void becomeKeyWindow (long /*int*/ id, long /*int*/ sel) {
Shell modal = getModalShell();
if (modal != null && modal.window != null) {
modal.window.makeKeyAndOrderFront(null);
@@ -534,7 +534,7 @@ void bringToTop (boolean force) {
}
}
-boolean canBecomeKeyWindow (int /*long*/ id, int /*long*/ sel) {
+boolean canBecomeKeyWindow (long /*int*/ id, long /*int*/ sel) {
if (isPopup) return false;
// Only answer if SWT created the window.
if (window != null) {
@@ -548,7 +548,7 @@ boolean canBecomeKeyWindow (int /*long*/ id, int /*long*/ sel) {
}
}
}
- int /*long*/ styleMask = window.styleMask();
+ long /*int*/ styleMask = window.styleMask();
if (styleMask == OS.NSBorderlessWindowMask || (styleMask & (OS.NSNonactivatingPanelMask | OS.NSDocModalWindowMask | OS.NSResizableWindowMask)) != 0) return true;
}
return super.canBecomeKeyWindow (id, sel);
@@ -578,7 +578,7 @@ void center () {
setLocation (x, y);
}
-void clearDeferFlushing (int /*long*/ id, int /*long*/ sel) {
+void clearDeferFlushing (long /*int*/ id, long /*int*/ sel) {
deferFlushing = false;
scrolling = false;
if (window != null) window.flushWindowIfNeeded();
@@ -632,7 +632,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
rect.height = trim.height;
if (window != null) {
if (!_getFullScreen() && !fixResize()) {
- float /*double*/ h = rect.height;
+ double /*float*/ h = rect.height;
rect = window.frameRectForContentRect(rect);
rect.y += h-rect.height;
}
@@ -692,7 +692,7 @@ void createHandle () {
}
display.cascadeWindow(window, screen);
NSRect screenFrame = screen.frame();
- float /*double*/ width = screenFrame.width * 5 / 8, height = screenFrame.height * 5 / 8;;
+ double /*float*/ width = screenFrame.width * 5 / 8, height = screenFrame.height * 5 / 8;;
NSRect frame = window.frame();
NSRect primaryFrame = primaryScreen.frame();
frame.y = primaryFrame.height - ((primaryFrame.height - (frame.y + frame.height)) + height);
@@ -806,7 +806,7 @@ void destroyWidget () {
}
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
if (regionPath != null && background == null) {
context.saveGraphicsState();
@@ -905,9 +905,9 @@ public Rectangle getBounds () {
checkWidget();
if (window != null) {
NSRect frame = window.frame();
- float /*double*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
+ double /*float*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
Rectangle rectangle = new Rectangle ((int)frame.x, (int)y, (int)frame.width, (int)frame.height);
- float /*double*/ scaleFactor = view.window().userSpaceScaleFactor();
+ double /*float*/ scaleFactor = view.window().userSpaceScaleFactor();
rectangle.x /= scaleFactor;
rectangle.y /= scaleFactor;
rectangle.width /= scaleFactor;
@@ -935,7 +935,7 @@ public Rectangle getClientArea () {
if (!fixResize ()) {
rect = window.contentView().frame();
} else {
- float /*double*/ scaleFactor = window.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = window.userSpaceScaleFactor();
rect = window.frame();
rect.width /= scaleFactor;
rect.height /= scaleFactor;
@@ -1008,9 +1008,9 @@ public Point getLocation () {
if (window != null) {
NSRect frame = window.frame();
- float /*double*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
+ double /*float*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
Point point = new Point ((int)frame.x, (int)y);
- float /*double*/ scaleFactor = view.window().userSpaceScaleFactor();
+ double /*float*/ scaleFactor = view.window().userSpaceScaleFactor();
point.x /= scaleFactor;
point.y /= scaleFactor;
return point;
@@ -1024,7 +1024,7 @@ public Point getLocation () {
pt = view.convertPoint_toView_(pt, null);
pt = view.window().convertBaseToScreen(pt);
pt.y = primaryFrame.height - pt.y;
- float /*double*/ scaleFactor = view.window().userSpaceScaleFactor();
+ double /*float*/ scaleFactor = view.window().userSpaceScaleFactor();
pt.x /= scaleFactor;
pt.y /= scaleFactor;
return new Point((int)pt.x, (int)pt.y);
@@ -1176,7 +1176,7 @@ public Point getSize () {
checkWidget();
NSRect frame = (window != null ? window.frame() : view.frame());
Point point = new Point ((int) frame.width, (int) frame.height);
- float /*double*/ scaleFactor = view.window().userSpaceScaleFactor();
+ double /*float*/ scaleFactor = view.window().userSpaceScaleFactor();
point.x /= scaleFactor;
point.y /= scaleFactor;
return point;
@@ -1218,7 +1218,7 @@ boolean hasRegion () {
return region != null;
}
-void helpRequested(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void helpRequested(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
Control control = display.getFocusControl();
while (control != null) {
if (control.hooks (SWT.Help)) {
@@ -1261,7 +1261,7 @@ public boolean isVisible () {
return getVisible ();
}
-boolean makeFirstResponder (int /*long*/ id, int /*long*/ sel, int /*long*/ responder) {
+boolean makeFirstResponder (long /*int*/ id, long /*int*/ sel, long /*int*/ responder) {
Display display = this.display;
boolean result = super.makeFirstResponder(id, sel, responder);
if (!display.isDisposed()) display.checkFocus();
@@ -1285,7 +1285,7 @@ void makeKeyAndOrderFront() {
window.makeKeyAndOrderFront (null);
}
-void mouseMoved(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseMoved(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
super.mouseMoved(id, sel, theEvent);
/**
@@ -1300,7 +1300,7 @@ void mouseMoved(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
}
}
-void noResponderFor(int /*long*/ id, int /*long*/ sel, int /*long*/ selector) {
+void noResponderFor(long /*int*/ id, long /*int*/ sel, long /*int*/ selector) {
/**
* Feature in Cocoa. If the selector is keyDown and nothing has handled the event
* a system beep is generated. There's no need to beep, as many keystrokes in the SWT
@@ -1490,7 +1490,7 @@ void sendToolTipEvent (boolean enter) {
if (userInfo != null) {
tooltipUserData = userInfo.id;
} else {
- int /*long*/ [] value = new int /*long*/ [1];
+ long /*int*/ [] value = new long /*int*/ [1];
OS.object_getInstanceVariable(tooltipTag, new byte[]{'_','u', 's', 'e', 'r', 'I', 'n', 'f', 'o'}, value);
tooltipUserData = value[0];
}
@@ -1607,7 +1607,7 @@ void setBounds (int x, int y, int width, int height, boolean move, boolean resiz
boolean sheet = window.isSheet();
if (sheet && move && !resize) return;
int screenHeight = (int) display.getPrimaryFrame().height;
- float /*double*/ scaleFactor = window.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = window.userSpaceScaleFactor();
x *= scaleFactor;
y *= scaleFactor;
width *= scaleFactor;
@@ -1709,7 +1709,7 @@ public void setFullScreen (boolean fullScreen) {
fullScreenFrame = NSScreen.mainScreen().frame();
if (getMonitor().equals(display.getPrimaryMonitor ())) {
if (menuBar != null) {
- float /*double*/ menuBarHt = NSStatusBar.systemStatusBar().thickness();
+ double /*float*/ menuBarHt = NSStatusBar.systemStatusBar().thickness();
fullScreenFrame.height -= menuBarHt;
OS.SetSystemUIMode(OS.kUIModeContentHidden, 0);
}
@@ -2023,7 +2023,7 @@ void setZOrder () {
if (fixResize ()) {
NSRect rect = window.frame();
rect.x = rect.y = 0;
- float /*double*/ scaleFactor = window.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = window.userSpaceScaleFactor();
rect.width /= scaleFactor;
rect.height /= scaleFactor;
window.contentView().setFrame(rect);
@@ -2112,7 +2112,7 @@ void updateSystemUIMode () {
if (fullScreen) window.setFrame(fullScreenFrame, true);
}
-int /*long*/ view_stringForToolTip_point_userData (int /*long*/ id, int /*long*/ sel, int /*long*/ view, int /*long*/ tag, int /*long*/ point, int /*long*/ userData) {
+long /*int*/ view_stringForToolTip_point_userData (long /*int*/ id, long /*int*/ sel, long /*int*/ view, long /*int*/ tag, long /*int*/ point, long /*int*/ userData) {
NSPoint pt = new NSPoint();
OS.memmove (pt, point, NSPoint.sizeof);
Control control = display.findControl (false);
@@ -2126,9 +2126,9 @@ int /*long*/ view_stringForToolTip_point_userData (int /*long*/ id, int /*long*/
return NSString.stringWithCharacters (chars, length).id;
}
-void viewWillMoveToWindow(int /*long*/ id, int /*long*/ sel, int /*long*/ newWindow) {
+void viewWillMoveToWindow(long /*int*/ id, long /*int*/ sel, long /*int*/ newWindow) {
if (window == null) {
- int /*long*/ currentWindow = hostWindow != null ? hostWindow.id : 0;
+ long /*int*/ currentWindow = hostWindow != null ? hostWindow.id : 0;
if (currentWindow != 0) {
removeObserversFromWindow();
}
@@ -2138,7 +2138,7 @@ void viewWillMoveToWindow(int /*long*/ id, int /*long*/ sel, int /*long*/ newWin
}
}
-void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidBecomeKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
if (window != null) {
Display display = this.display;
display.setMenuBar (menuBar);
@@ -2163,22 +2163,22 @@ void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notifica
}
}
-void windowDidDeminiturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidDeminiturize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
minimized = false;
sendEvent(SWT.Deiconify);
}
-void windowDidMiniturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidMiniturize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
minimized = true;
sendEvent(SWT.Iconify);
}
-void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidMove(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
moved = true;
sendEvent(SWT.Move);
}
-void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidResize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
if (((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) == 0) && fullScreen) {
window.setFrame(fullScreenFrame, true);
NSRect contentViewFrame = new NSRect();
@@ -2189,7 +2189,7 @@ void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notificatio
if (fixResize ()) {
NSRect rect = window.frame ();
rect.x = rect.y = 0;
- float /*double*/ scaleFactor = window.userSpaceScaleFactor();
+ double /*float*/ scaleFactor = window.userSpaceScaleFactor();
rect.width /= scaleFactor;
rect.height /= scaleFactor;
window.contentView ().setFrame (rect);
@@ -2203,7 +2203,7 @@ void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notificatio
}
}
-void windowDidResignKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidResignKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
if (display.isDisposed()) return;
sendEvent (SWT.Deactivate);
if (isDisposed ()) return;
@@ -2212,7 +2212,7 @@ void windowDidResignKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notifica
saveFocus();
}
-void windowSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void windowSendEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
NSEvent nsEvent = new NSEvent (event);
int type = (int)/*64*/nsEvent.type ();
switch (type) {
@@ -2307,12 +2307,12 @@ void windowSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
super.windowSendEvent (id, sel, event);
}
-boolean windowShouldClose(int /*long*/ id, int /*long*/ sel, int /*long*/ window) {
+boolean windowShouldClose(long /*int*/ id, long /*int*/ sel, long /*int*/ window) {
if (isEnabled()) closeWidget (false);
return false;
}
-void windowWillClose(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowWillClose(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
closeWidget(true);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
index 260b8dcb90..e2c0710c72 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
@@ -99,12 +99,12 @@ public Spinner (Composite parent, int style) {
super (parent, checkStyle (style));
}
-boolean acceptsFirstResponder(int /*long*/ id, int /*long*/ sel) {
+boolean acceptsFirstResponder(long /*int*/ id, long /*int*/ sel) {
if (id == view.id) return false;
return super.acceptsFirstResponder (id, sel);
}
-boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
if (id == view.id) return true;
return super.accessibilityIsIgnored(id, sel);
}
@@ -210,7 +210,7 @@ protected void checkSubclass () {
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
- float /*double*/ width = 0, height = 0;
+ double /*float*/ width = 0, height = 0;
String string = Double.toString (buttonView.maxValue ());
Font font = Font.cocoa_new(display, textView.font ());
NSAttributedString str = parent.createString(string, font, null, 0, false, true, false);
@@ -335,7 +335,7 @@ void deregister () {
}
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (backgroundImage == null) return;
if (new NSView(id).isKindOfClass(OS.class_NSText)) {
NSText text = new NSText(id);
@@ -538,13 +538,13 @@ public int getTextLimit () {
return textLimit;
}
-boolean handleIsAccessible(int /*long*/ id) {
+boolean handleIsAccessible(long /*int*/ id) {
// All subviews of a Spinner can have their accessible properties overridden.
// The top-level NSView is already ignored, so we don't need to test for that.
return true;
}
-boolean isEventView (int /*long*/ id) {
+boolean isEventView (long /*int*/ id) {
return true;
}
@@ -784,7 +784,7 @@ void setFont(NSFont font) {
textView.setFont(font);
}
-void setForeground (float /*double*/ [] color) {
+void setForeground (double /*float*/ [] color) {
NSColor nsColor;
if (color == null) {
nsColor = NSColor.textColor ();
@@ -1010,14 +1010,14 @@ public void setValues (int selection, int minimum, int maximum, int digits, int
setSelection (selection, true, true, false);
}
-boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/ sel, int /*long*/ affectedCharRange, int /*long*/ replacementString) {
+boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/ sel, long /*int*/ affectedCharRange, long /*int*/ replacementString) {
NSRange range = new NSRange();
OS.memmove(range, affectedCharRange, NSRange.sizeof);
boolean result = callSuperBoolean(id, sel, range, replacementString);
if (hooks (SWT.Verify)) {
String text = new NSString(replacementString).getString();
NSEvent currentEvent = display.application.currentEvent();
- int /*long*/ type = currentEvent.type();
+ long /*int*/ type = currentEvent.type();
if (type != OS.NSKeyDown && type != OS.NSKeyUp) currentEvent = null;
String newText = verifyText(text, (int)/*64*/range.location, (int)/*64*/(range.location+range.length), currentEvent);
if (newText == null) return false;
@@ -1027,7 +1027,7 @@ boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/
if (fieldEditor != null) {
NSRange selectedRange = fieldEditor.selectedRange();
if (textLimit != LIMIT) {
- int /*long*/ charCount = fieldEditor.string().length();
+ long /*int*/ charCount = fieldEditor.string().length();
if (charCount - selectedRange.length + length > textLimit) {
length = (int)/*64*/(textLimit - charCount + selectedRange.length);
}
@@ -1044,7 +1044,7 @@ boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/
return result;
}
-void textDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
super.textDidChange (id, sel, aNotification);
boolean [] parseFail = new boolean [1];
int value = getSelectionText (parseFail);
@@ -1057,14 +1057,14 @@ void textDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotificatio
postEvent (SWT.Modify);
}
-NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) {
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (long /*int*/ id, long /*int*/ sel, long /*int*/ aTextView, long /*int*/ oldSelectedCharRange, long /*int*/ newSelectedCharRange) {
/* allow the selection change to proceed */
NSRange result = new NSRange ();
OS.memmove(result, newSelectedCharRange, NSRange.sizeof);
return result;
}
-void textDidEndEditing(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textDidEndEditing(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
boolean [] parseFail = new boolean [1];
int value = getSelectionText (parseFail);
if (parseFail [0]) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java
index a8f0efd89b..e32466a985 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java
@@ -211,7 +211,7 @@ void destroyItem (TabItem item) {
((NSTabView)view).removeTabViewItem(item.nsItem);
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
fillBackground (view, context, rect, -1);
}
@@ -502,7 +502,7 @@ void setFont (NSFont font) {
}
}
-void setForeground (float /*double*/ [] color) {
+void setForeground (double /*float*/ [] color) {
super.setForeground(color);
int index = getSelectionIndex();
for (int i = 0; i < itemCount; i++) {
@@ -632,7 +632,7 @@ boolean traversePage (boolean next) {
return index == getSelectionIndex ();
}
-void tabView_willSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) {
+void tabView_willSelectTabViewItem(long /*int*/ id, long /*int*/ sel, long /*int*/ tabView, long /*int*/ tabViewItem) {
if (tabViewItem == 0) return;
for (int i = 0; i < itemCount; i++) {
TabItem item = items [i];
@@ -658,7 +658,7 @@ void tabView_willSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long
}
}
-void tabView_didSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) {
+void tabView_didSelectTabViewItem(long /*int*/ id, long /*int*/ sel, long /*int*/ tabView, long /*int*/ tabViewItem) {
if (tabViewItem == 0) return;
for (int i = 0; i < itemCount; i++) {
TabItem item = items [i];
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java
index 50ede9aa3c..eecc929492 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java
@@ -114,7 +114,7 @@ public TabItem (TabFolder parent, int style, int index) {
parent.createItem (this, index);
}
-int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
if (id == nsItem.id) {
NSString nsAttributeName = new NSString(arg0);
@@ -147,7 +147,7 @@ void destroyWidget () {
releaseHandle ();
}
-void drawLabelInRect(int /*long*/ id, int /*long*/ sel, boolean shouldTruncateLabel, NSRect rect) {
+void drawLabelInRect(long /*int*/ id, long /*int*/ sel, boolean shouldTruncateLabel, NSRect rect) {
if (image != null && !image.isDisposed()) {
NSSize imageSize = image.handle.size();
NSRect destRect = new NSRect();
@@ -188,8 +188,8 @@ public Rectangle getBounds() {
checkWidget();
Rectangle result = new Rectangle (0, 0, 0, 0);
if (nsItem.respondsToSelector (OS.sel_accessibilityAttributeValue_)) {
- int /*long*/ posValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilityPositionAttribute ());
- int /*long*/ sizeValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilitySizeAttribute ());
+ long /*int*/ posValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilityPositionAttribute ());
+ long /*int*/ sizeValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilitySizeAttribute ());
NSValue val = new NSValue (posValue);
NSPoint pt = val.pointValue ();
NSWindow window = parent.view.window ();
@@ -416,7 +416,7 @@ public void setToolTipText (String string) {
parent.checkToolTip (this);
}
-NSSize sizeOfLabel(int /*long*/ id, int /*long*/ sel, boolean shouldTruncateLabel) {
+NSSize sizeOfLabel(long /*int*/ id, long /*int*/ sel, boolean shouldTruncateLabel) {
NSSize size = super.sizeOfLabel(id, sel, shouldTruncateLabel);
if (image != null && !image.isDisposed()) {
NSSize imageSize = image.handle.size();
@@ -442,7 +442,7 @@ void updateText (boolean selected) {
if (attriStr != null) {
attriStr.release();
}
- float /*double*/ [] foreground = parent.foreground;
+ double /*float*/ [] foreground = parent.foreground;
if (foreground == null && selected && OS.VERSION >= 0x1070) {
foreground = display.getNSColorRGB(NSColor.alternateSelectedControlTextColor());
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
index 8b9832b9c9..7c4fc136c6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
@@ -126,19 +126,19 @@ public Table (Composite parent, int style) {
super (parent, checkStyle (style));
}
-boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
return true;
}
-int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
- int /*long*/ returnValue = 0;
+long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+ long /*int*/ returnValue = 0;
NSString attributeName = new NSString(arg0);
// If the check column is visible, don't report it back as a column for accessibility purposes.
// The check column is meant to appear as a part of the first column.
if (attributeName.isEqualToString (OS.NSAccessibilityColumnsAttribute) || attributeName.isEqualToString(OS.NSAccessibilityVisibleColumnsAttribute)) {
if ((style & SWT.CHECK) != 0) {
- int /*long*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
+ long /*int*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
if (superValue != 0) {
NSArray columns = new NSArray(superValue);
NSMutableArray columnsWithoutCheck = NSMutableArray.arrayWithCapacity(columns.count() - 1);
@@ -213,18 +213,18 @@ int calculateWidth (TableItem[] items, int index, GC gc) {
return width;
}
-NSSize cellSize (int /*long*/ id, int /*long*/ sel) {
+NSSize cellSize (long /*int*/ id, long /*int*/ sel) {
NSSize size = super.cellSize(id, sel);
NSCell cell = new NSCell(id);
NSImage image = cell.image();
if (image != null) size.width += imageBounds.width + IMAGE_GAP;
if (hooks(SWT.MeasureItem)) {
- int /*long*/ [] outValue = new int /*long*/ [1];
+ long /*int*/ [] outValue = new long /*int*/ [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
- int /*long*/ rowIndex = outValue [0];
+ long /*int*/ rowIndex = outValue [0];
TableItem item = _getItem((int)/*64*/rowIndex);
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
- int /*long*/ tableColumn = outValue[0];
+ long /*int*/ tableColumn = outValue[0];
int columnIndex = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -237,13 +237,13 @@ NSSize cellSize (int /*long*/ id, int /*long*/ sel) {
return size;
}
-boolean canDragRowsWithIndexes_atPoint(int /*long*/ id, int /*long*/ sel, int /*long*/ rowIndexes, NSPoint mouseDownPoint) {
+boolean canDragRowsWithIndexes_atPoint(long /*int*/ id, long /*int*/ sel, long /*int*/ rowIndexes, NSPoint mouseDownPoint) {
if (!super.canDragRowsWithIndexes_atPoint(id, sel, rowIndexes, mouseDownPoint)) return false;
// If the current row is not selected and the user is not attempting to modify the selection, select the row first.
NSTableView widget = (NSTableView)view;
- int /*long*/ row = widget.rowAtPoint(mouseDownPoint);
- int /*long*/ modifiers = NSApplication.sharedApplication().currentEvent().modifierFlags();
+ long /*int*/ row = widget.rowAtPoint(mouseDownPoint);
+ long /*int*/ modifiers = NSApplication.sharedApplication().currentEvent().modifierFlags();
boolean drag = (state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect);
if (drag) {
@@ -442,7 +442,7 @@ void clearCachedWidth (TableItem[] items) {
}
}
-int /*long*/ columnAtPoint(int /*long*/ id, int /*long*/ sel, NSPoint point) {
+long /*int*/ columnAtPoint(long /*int*/ id, long /*int*/ sel, NSPoint point) {
if ((style & SWT.CHECK) != 0) {
if (point.x <= getCheckColumnWidth() && point.y < headerView.frame().height) return 1;
}
@@ -554,7 +554,7 @@ void createHandle () {
widget.addTableColumn (checkColumn);
checkColumn.setResizingMask(OS.NSTableColumnNoResizing);
checkColumn.setEditable(false);
- int /*long*/ cls = NSButton.cellClass (); /* use our custom cell class */
+ long /*int*/ cls = NSButton.cellClass (); /* use our custom cell class */
buttonCell = new NSButtonCell (OS.class_createInstance (cls, 0));
buttonCell.init ();
checkColumn.setDataCell (buttonCell);
@@ -675,7 +675,7 @@ void deregister () {
if (buttonCell != null) display.removeWidget (buttonCell);
}
-void deselectAll(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void deselectAll(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
if ( ((NSTableView)view).selectedRow() != -1) return;
@@ -683,7 +683,7 @@ void deselectAll(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
super.deselectAll (id, sel, sender);
}
-void deselectRow (int /*long*/ id, int /*long*/ sel, int /*long*/ index) {
+void deselectRow (long /*int*/ id, long /*int*/ sel, long /*int*/ index) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
if ( ((NSTableView)view).selectedRow() == index) return;
@@ -878,7 +878,7 @@ void destroyItem (TableColumn column) {
NSArray array = ((NSTableView)view).tableColumns ();
int arraySize = (int)/*64*/array.count ();
for (int i = oldIndex; i < arraySize; i++) {
- int /*long*/ columnId = array.objectAtIndex (i).id;
+ long /*int*/ columnId = array.objectAtIndex (i).id;
for (int j = 0; j < columnCount; j++) {
if (columns[j].nsColumn.id == columnId) {
columns [j].sendEvent (SWT.Move);
@@ -906,13 +906,13 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
return false;
}
-void drawBackgroundInClipRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+void drawBackgroundInClipRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
super.drawViewBackgroundInRect(id, sel, rect);
if (id != view.id) return;
fillBackground (view, NSGraphicsContext.currentContext(), rect, -1);
}
-void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rect, int /*long*/ view) {
+void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rect, long /*int*/ view) {
boolean hooksErase = hooks (SWT.EraseItem);
boolean hooksPaint = hooks (SWT.PaintItem);
boolean hooksMeasure = hooks (SWT.MeasureItem);
@@ -920,13 +920,13 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
NSTextFieldCell cell = new NSTextFieldCell (id);
NSTableView widget = (NSTableView)this.view;
- int /*long*/ [] outValue = new int /*long*/ [1];
+ long /*int*/ [] outValue = new long /*int*/ [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
- int /*long*/ rowIndex = outValue [0];
+ long /*int*/ rowIndex = outValue [0];
TableItem item = _getItem((int)/*64*/rowIndex);
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
- int /*long*/ tableColumn = outValue[0];
- int /*long*/ nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));
+ long /*int*/ tableColumn = outValue[0];
+ long /*int*/ nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));
int columnIndex = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -963,7 +963,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
NSRect rowRect = widget.rectOfRow (rowIndex);
cellRect.width = rowRect.width;
}
- float /*double*/ offsetX = 0, offsetY = 0;
+ double /*float*/ offsetX = 0, offsetY = 0;
if (hooksPaint || hooksErase) {
NSRect frameCell = widget.frameOfCellAtColumn(nsColumnIndex, rowIndex);
offsetX = rect.x - frameCell.x;
@@ -1044,7 +1044,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
if (drawBackground && !drawSelection) {
context.saveGraphicsState ();
- float /*double*/ [] colorRGB = background.handle;
+ double /*float*/ [] colorRGB = background.handle;
NSColor color = NSColor.colorWithDeviceRed (colorRGB[0], colorRGB[1], colorRGB[2], 1f);
color.setFill ();
NSBezierPath.fillRect (cellRect);
@@ -1078,7 +1078,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
* foreground color to black when the cell is highlighted. The text
* still draws white. The fix is to draw the text and not call super.
*/
- float /*double*/ [] color = userForeground.handle;
+ double /*float*/ [] color = userForeground.handle;
if (color[0] == 0 && color[1] == 0 && color[2] == 0 && color[3] == 1) {
NSMutableAttributedString newStr = new NSMutableAttributedString(cell.attributedStringValue().mutableCopy());
NSRange range = new NSRange();
@@ -1161,7 +1161,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
}
}
-void drawWithExpansionFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cellFrame, int /*long*/ view) {
+void drawWithExpansionFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
drawExpansion = true;
super.drawWithExpansionFrame_inView(id, sel, cellFrame, view);
drawExpansion = false;
@@ -1177,7 +1177,7 @@ void drawRect(int id, int sel, NSRect rect) {
}
}
-NSRect expansionFrameWithFrame_inView(int /*long*/ id, int /*long*/ sel, NSRect cellRect, int /*long*/ view) {
+NSRect expansionFrameWithFrame_inView(long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
if (toolTipText == null) {
NSRect rect = super.expansionFrameWithFrame_inView(id, sel, cellRect, view);
NSCell cell = new NSCell(id);
@@ -1225,7 +1225,7 @@ Widget findTooltip (NSPoint pt) {
NSTableHeaderView headerView = widget.headerView();
if (headerView != null) {
pt = headerView.convertPoint_fromView_ (pt, null);
- int /*long*/ index = headerView.columnAtPoint (pt);
+ long /*int*/ index = headerView.columnAtPoint (pt);
if (index != -1) {
NSArray nsColumns = widget.tableColumns ();
id nsColumn = nsColumns.objectAtIndex (index);
@@ -1631,7 +1631,7 @@ public TableItem [] getSelection () {
}
NSIndexSet selection = widget.selectedRowIndexes();
int count = (int)/*64*/selection.count();
- int /*long*/ [] indexBuffer = new int /*long*/ [count];
+ long /*int*/ [] indexBuffer = new long /*int*/ [count];
selection.getIndexes(indexBuffer, count, 0);
TableItem [] result = new TableItem [count];
for (int i=0; i<count; i++) {
@@ -1674,7 +1674,7 @@ public int getSelectionIndex () {
}
NSIndexSet selection = widget.selectedRowIndexes();
int count = (int)/*64*/selection.count();
- int /*long*/ [] result = new int /*long*/ [count];
+ long /*int*/ [] result = new long /*int*/ [count];
selection.getIndexes(result, count, 0);
return (int)/*64*/result [0];
}
@@ -1703,7 +1703,7 @@ public int [] getSelectionIndices () {
}
NSIndexSet selection = widget.selectedRowIndexes();
int count = (int)/*64*/selection.count();
- int /*long*/ [] indices = new int /*long*/ [count];
+ long /*int*/ [] indices = new long /*int*/ [count];
selection.getIndexes(indices, count, 0);
int [] result = new int [count];
for (int i = 0; i < indices.length; i++) {
@@ -1779,7 +1779,7 @@ public int getTopIndex () {
return rowAtPoint;
}
-NSRect headerRectOfColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ column) {
+NSRect headerRectOfColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ column) {
if ((style & SWT.CHECK) == 0) return callSuperRect(id, sel, column);
if (column == 0) {
@@ -1797,7 +1797,7 @@ NSRect headerRectOfColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ colum
return callSuperRect(id, sel, column);
}
-void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*/ rect) {
+void highlightSelectionInClipRect(long /*int*/ id, long /*int*/ sel, long /*int*/ rect) {
if (hooks (SWT.EraseItem)) return;
if ((style & SWT.HIDE_SELECTION) != 0 && !hasFocus()) return;
NSRect clipRect = new NSRect ();
@@ -1805,7 +1805,7 @@ void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*
callSuper (id, sel, clipRect);
}
-int /*long*/ hitTestForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event, NSRect rect, int /*long*/ controlView) {
+long /*int*/ hitTestForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event, NSRect rect, long /*int*/ controlView) {
/*
* For some reason, the cell class needs to implement hitTestForEvent:inRect:ofView:,
* otherwise the double action selector is not called properly.
@@ -1813,13 +1813,13 @@ int /*long*/ hitTestForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ ev
return callSuper(id, sel, event, rect, controlView);
}
-int /*long*/ image (int /*long*/ id, int /*long*/ sel) {
- int /*long*/ [] image = new int /*long*/ [1];
+long /*int*/ image (long /*int*/ id, long /*int*/ sel) {
+ long /*int*/ [] image = new long /*int*/ [1];
OS.object_getInstanceVariable(id, Display.SWT_IMAGE, image);
return image[0];
}
-NSRect imageRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSRect imageRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
NSImage image = new NSCell(id).image();
if (image != null) {
cellFrame.x += IMAGE_GAP;
@@ -1919,7 +1919,7 @@ boolean isTransparent() {
return true;
}
-void keyDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
ignoreSelect = preventSelect = false;
super.keyDown(id, sel, theEvent);
}
@@ -1929,7 +1929,7 @@ boolean isTrim (NSView view) {
return view.id == headerView.id;
}
-int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (id != headerView.id) {
/*
* Feature in Cocoa: Table views do not change the selection when the user
@@ -1944,7 +1944,7 @@ int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEve
// select the row that was clicked before showing the menu for the event
NSPoint mousePoint = view.convertPoint_fromView_(event.locationInWindow(), null);
- int /*long*/ row = table.rowAtPoint(mousePoint);
+ long /*int*/ row = table.rowAtPoint(mousePoint);
// figure out if the row that was just clicked on is currently selected
if (selectedRowIndexes.containsIndex(row) == false) {
@@ -1958,7 +1958,7 @@ int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEve
return super.menuForEvent(id, sel, theEvent);
}
-void mouseDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (id == view.id) {
// Bug/feature in Cocoa: If the table has a context menu we just set it visible instead of returning
// it from menuForEvent:. This has the side effect, however, of sending control-click to the NSTableView,
@@ -1970,7 +1970,7 @@ void mouseDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
super.mouseDown(id, sel, theEvent);
}
-void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
ignoreSelect = preventSelect = false;
boolean check = false;
NSEvent nsEvent = new NSEvent(theEvent);
@@ -1999,7 +1999,7 @@ void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
didSelect = false;
}
-boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) {
+boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
return false;
}
@@ -2009,7 +2009,7 @@ boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) {
* to momentarily appear while clicking on the checkbox. To avoid this,
* override [NSCell nextState] to go directly to the desired state.
*/
-int /*long*/ nextState (int /*long*/ id, int /*long*/ sel) {
+long /*int*/ nextState (long /*int*/ id, long /*int*/ sel) {
NSTableView tableView = (NSTableView)view;
int index = (int)/*64*/tableView.clickedRow();
if (index == -1) index = (int)/*64*/tableView.selectedRow ();
@@ -2020,7 +2020,7 @@ int /*long*/ nextState (int /*long*/ id, int /*long*/ sel) {
return item.checked ? OS.NSOffState : OS.NSOnState;
}
-int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) {
+long /*int*/ numberOfRowsInTableView(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView) {
return itemCount;
}
@@ -2266,7 +2266,7 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-void scrollClipViewToPoint(int /*long*/ id, int /*long*/ sel, int /*long*/ clipView, NSPoint point) {
+void scrollClipViewToPoint(long /*int*/ id, long /*int*/ sel, long /*int*/ clipView, NSPoint point) {
if (shouldScroll) {
super.scrollClipViewToPoint(id, sel, clipView, point);
if ((style & SWT.CHECK) != 0 && columnCount > 0 && ((NSTableView)view).headerView() != null) {
@@ -2533,7 +2533,7 @@ public void setHeaderVisible (boolean show) {
scrollView.tile();
}
-void setImage (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void setImage (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
OS.object_setInstanceVariable(id, Display.SWT_IMAGE, arg0);
}
@@ -2591,8 +2591,8 @@ public void setItemCount (int count) {
void setItemHeight (Image image, NSFont font, boolean set) {
if (font == null) font = getFont ().handle;
- float /*double*/ ascent = font.ascender ();
- float /*double*/ descent = -font.descender () + font.leading ();
+ double /*float*/ ascent = font.ascender ();
+ double /*float*/ descent = -font.descender () + font.leading ();
int height = (int)Math.ceil (ascent + descent) + 1;
Rectangle bounds = image != null ? image.getBounds () : imageBounds;
if (bounds != null) {
@@ -2859,7 +2859,7 @@ public void setSelection (TableItem [] items) {
}
}
-void setShouldScrollClipView(int /*long*/ id, int /*long*/ sel, boolean shouldScroll) {
+void setShouldScrollClipView(long /*int*/ id, long /*int*/ sel, boolean shouldScroll) {
this.shouldScroll = shouldScroll;
}
@@ -3035,7 +3035,7 @@ public void showSelection () {
}
}
-void selectRowIndexes_byExtendingSelection (int /*long*/ id, int /*long*/ sel, int /*long*/ indexes, boolean extend) {
+void selectRowIndexes_byExtendingSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ indexes, boolean extend) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
NSIndexSet set = new NSIndexSet(indexes);
@@ -3113,7 +3113,7 @@ void sendMeasureItem (TableItem item, int columnIndex, NSSize size, boolean isSe
}
}
-void tableViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSDictionary userInfo = notification.userInfo ();
NSString nsstring = (NSString) new NSString().alloc();
@@ -3141,7 +3141,7 @@ void tableViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNo
headerView.setNeedsDisplay(true);
}
-void tableViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSDictionary userInfo = notification.userInfo ();
NSString nsstring = (NSString) new NSString().alloc();
@@ -3185,23 +3185,23 @@ void sendSelection () {
}
}
-void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewSelectionDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
if (didSelect) return;
sendSelection();
}
-void tableViewSelectionIsChanging (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewSelectionIsChanging (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
didSelect = true;
sendSelection();
}
-void tableView_didClickTableColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ tableView, int /*long*/ tableColumn) {
+void tableView_didClickTableColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ tableView, long /*int*/ tableColumn) {
TableColumn column = getColumn (new id (tableColumn));
if (column == null) return; /* either CHECK column or firstColumn in 0-column Table */
column.sendSelectionEvent (SWT.Selection);
}
-int /*long*/ tableView_objectValueForTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
+long /*int*/ tableView_objectValueForTableColumn_row (long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
int index = (int)/*64*/rowIndex;
TableItem item = _getItem (index);
checkData (item, index);
@@ -3222,7 +3222,7 @@ int /*long*/ tableView_objectValueForTableColumn_row (int /*long*/ id, int /*lon
return item.createString (0).id;
}
-boolean tableView_shouldReorderColumn_toColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ currentColIndex, int /*long*/ newColIndex) {
+boolean tableView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ currentColIndex, long /*int*/ newColIndex) {
// Check column should never move and no column can be dragged to the left of it, if present.
if ((style & SWT.CHECK) != 0) {
if (currentColIndex == 0) return false;
@@ -3240,7 +3240,7 @@ boolean tableView_shouldReorderColumn_toColumn(int /*long*/ id, int /*long*/ sel
return true;
}
-boolean tableView_shouldTrackCell_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ table, int /*long*/ cell, /*long*/ int /*long*/ tableColumn, int /*long*/ rowIndex) {
+boolean tableView_shouldTrackCell_forTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ table, long /*int*/ cell, /*long*/ long /*int*/ tableColumn, long /*int*/ rowIndex) {
if ((style & SWT.CHECK) != 0) {
if (new NSCell(cell).isKindOfClass(OS.class_NSButtonCell)) return true;
}
@@ -3248,7 +3248,7 @@ boolean tableView_shouldTrackCell_forTableColumn_row(int /*long*/ id, int /*long
return widget.isRowSelected(rowIndex);
}
-void tableView_setObjectValue_forTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ anObject, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
+void tableView_setObjectValue_forTableColumn_row (long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ anObject, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
if (checkColumn != null && aTableColumn == checkColumn.id) {
TableItem item = items [(int)/*64*/rowIndex];
item.checked = !item.checked;
@@ -3261,7 +3261,7 @@ void tableView_setObjectValue_forTableColumn_row (int /*long*/ id, int /*long*/
}
}
-void tableView_willDisplayCell_forTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ rowIndex) {
+void tableView_willDisplayCell_forTableColumn_row (long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ rowIndex) {
if (checkColumn != null && tableColumn == checkColumn.id) return;
TableItem item = items [(int)/*64*/rowIndex];
int index = 0;
@@ -3326,7 +3326,7 @@ void tableView_willDisplayCell_forTableColumn_row (int /*long*/ id, int /*long*/
}
}
-boolean tableView_writeRowsWithIndexes_toPasteboard(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
+boolean tableView_writeRowsWithIndexes_toPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
return sendMouseEvent(NSApplication.sharedApplication().currentEvent(), SWT.DragDetect, true);
}
@@ -3338,7 +3338,7 @@ boolean sendMouseEvent(NSEvent nsEvent, int type, boolean send) {
NSTableView widget = (NSTableView)view;
NSIndexSet selectedRows = widget.selectedRowIndexes ();
int count = (int)/*64*/selectedRows.count();
- int /*long*/ [] indexBuffer = new int /*long*/ [count];
+ long /*int*/ [] indexBuffer = new long /*int*/ [count];
selectedRows.getIndexes(indexBuffer, count, 0);
for (int i = 0; i < count; i++) {
if (indexBuffer[i] == selectedRowIndex) continue;
@@ -3358,7 +3358,7 @@ boolean sendMouseEvent(NSEvent nsEvent, int type, boolean send) {
return super.sendMouseEvent (nsEvent, type, send);
}
-NSRect titleRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSRect titleRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
NSImage image = new NSCell(id).image();
if (image != null) {
int imageWidth = imageBounds.width + IMAGE_GAP;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
index a4332b1964..118528dc6f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
@@ -201,7 +201,7 @@ void destroyWidget () {
releaseHandle ();
}
-void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cellRect, int /*long*/ view) {
+void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
/*
* Feature in Cocoa. When the last column in a table does not reach the
* rightmost edge of the table view, the cell that draws the rightmost-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
index ad5506dd13..41bf9eea28 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
@@ -61,7 +61,7 @@ public class Text extends Scrollable {
String message;
NSRange selectionRange;
id targetSearch, targetCancel;
- int /*long*/ actionSearch, actionCancel;
+ long /*int*/ actionSearch, actionCancel;
/**
* The maximum number of characters that can be entered
@@ -337,7 +337,7 @@ public void append (String string) {
if (string.length () != 0) sendEvent (SWT.Modify);
}
-boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean becomeFirstResponder (long /*int*/ id, long /*int*/ sel) {
receivingFocus = true;
boolean result = super.becomeFirstResponder (id, sel);
receivingFocus = false;
@@ -575,9 +575,9 @@ void createWidget () {
super.createWidget ();
if ((style & SWT.PASSWORD) != 0) {
NSText fieldEditor = view.window().fieldEditor(true, view);
- int /*long*/ nsSecureTextViewClass = OS.objc_lookUpClass("NSSecureTextView");
+ long /*int*/ nsSecureTextViewClass = OS.objc_lookUpClass("NSSecureTextView");
if (fieldEditor != null && nsSecureTextViewClass != 0 && fieldEditor.isKindOfClass(nsSecureTextViewClass)) {
- int /*long*/ editorClass = OS.objc_getClass("SWTSecureEditorView");
+ long /*int*/ editorClass = OS.objc_getClass("SWTSecureEditorView");
OS.object_setClass(fieldEditor.id, editorClass);
}
}
@@ -657,7 +657,7 @@ void deregister() {
}
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if ((style & SWT.SINGLE) != 0) {
if (backgroundImage == null) return;
if (new NSView(id).isKindOfClass(OS.class_NSText)) {
@@ -684,7 +684,7 @@ void drawInteriorWithFrame_inView(int id, int sel, NSRect cellFrame, int viewid)
boolean dragDetect (int x, int y, boolean filter, boolean [] consume) {
Point selection = getSelection ();
if (selection.x != selection.y) {
- int /*long*/ position = getPosition (x, y);
+ long /*int*/ position = getPosition (x, y);
if (selection.x <= position && position < selection.y) {
if (super.dragDetect (x, y, filter, consume)) {
if (consume != null) consume [0] = true;
@@ -727,7 +727,7 @@ public int getCaretLineNumber () {
return (getTopPixel () + getCaretLocation ().y) / getLineHeight ();
}
-boolean acceptsFirstResponder(int /*long*/ id, int /*long*/ sel) {
+boolean acceptsFirstResponder(long /*int*/ id, long /*int*/ sel) {
if ((style & SWT.READ_ONLY) != 0) return true;
return super.acceptsFirstResponder(id, sel);
}
@@ -757,8 +757,8 @@ public Point getCaretLocation () {
NSLayoutManager layoutManager = widget.layoutManager();
NSTextContainer container = widget.textContainer();
NSRange range = widget.selectedRange();
- int /*long*/ [] rectCount = new int /*long*/ [1];
- int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, container, rectCount);
+ long /*int*/ [] rectCount = new long /*int*/ [1];
+ long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, container, rectCount);
NSRect rect = new NSRect();
if (rectCount[0] > 0) OS.memmove(rect, pArray, NSRect.sizeof);
return new Point((int)rect.x, (int)rect.y);
@@ -939,7 +939,7 @@ public int getLineCount () {
NSTextStorage storage = ((NSTextView) view).textStorage ();
int count = (int)/*64*/storage.paragraphs ().count ();
NSString string = storage.string();
- int /*long*/ length = string.length(), c;
+ long /*int*/ length = string.length(), c;
if (length == 0 || (c = string.characterAtIndex(length - 1)) == '\n' || c == '\r') {
count++;
}
@@ -1028,7 +1028,7 @@ public String getMessage () {
return message;
}
-int /*long*/ getPosition (int /*long*/ x, int /*long*/ y) {
+long /*int*/ getPosition (long /*int*/ x, long /*int*/ y) {
// checkWidget ();
if ((style & SWT.MULTI) != 0) {
NSTextView widget = (NSTextView) view;
@@ -1374,7 +1374,7 @@ void insertEditText (String string) {
}
}
-boolean isEventView (int /*long*/ id) {
+boolean isEventView (long /*int*/ id) {
if ((style & SWT.MULTI) != 0) return super.isEventView (id);
return true;
}
@@ -1595,7 +1595,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
boolean result = super.sendKeyEvent (nsEvent, type);
if (!result) return result;
if (type != SWT.KeyDown) return result;
- int /*long*/ modifierFlags = nsEvent.modifierFlags();
+ long /*int*/ modifierFlags = nsEvent.modifierFlags();
if ((modifierFlags & OS.NSCommandKeyMask) != 0) {
short keyCode = nsEvent.keyCode ();
switch (keyCode) {
@@ -1792,7 +1792,7 @@ void setEditText (char[] text) {
selectionRange = null;
}
-void setFrameSize(int /*long*/ id, int /*long*/ sel, NSSize size) {
+void setFrameSize(long /*int*/ id, long /*int*/ sel, NSSize size) {
super.setFrameSize (id, sel, size);
/*
* Bug in Cocoa. When a search field is resized while having
@@ -1820,13 +1820,13 @@ void setFont(NSFont font) {
super.setFont (font);
}
-void setForeground (float /*double*/ [] color) {
+void setForeground (double /*float*/ [] color) {
NSColor nsColor;
if (color == null) {
nsColor = NSColor.textColor ();
if ((style & SWT.MULTI) != 0 && !isEnabled()) nsColor = NSColor.disabledControlTextColor();
} else {
- float /*double*/ alpha = 1;
+ double /*float*/ alpha = 1;
if ((style & SWT.MULTI) != 0 && !isEnabled()) alpha = 0.5f;
nsColor = NSColor.colorWithDeviceRed (color [0], color [1], color [2], alpha);
}
@@ -2036,7 +2036,7 @@ public void setTabs (int tabs) {
if (this.tabs == tabs) return;
this.tabs = tabs;
if ((style & SWT.SINGLE) != 0) return;
- float /*double*/ size = textExtent("s").width * tabs;
+ double /*float*/ size = textExtent("s").width * tabs;
NSTextView widget = (NSTextView)view;
NSParagraphStyle defaultStyle = widget.defaultParagraphStyle();
NSMutableParagraphStyle paragraphStyle = new NSMutableParagraphStyle(defaultStyle.mutableCopy());
@@ -2189,7 +2189,7 @@ public void setTopIndex (int index) {
view.scrollPoint(pt);
}
-boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/ sel, int /*long*/ affectedCharRange, int /*long*/ replacementString) {
+boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/ sel, long /*int*/ affectedCharRange, long /*int*/ replacementString) {
NSRange range = new NSRange();
OS.memmove(range, affectedCharRange, NSRange.sizeof);
boolean result = callSuperBoolean(id, sel, range, replacementString);
@@ -2204,7 +2204,7 @@ boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/
String newText = text;
if (hooks (SWT.Verify)) {
NSEvent currentEvent = display.application.currentEvent();
- int /*long*/ type = currentEvent.type();
+ long /*int*/ type = currentEvent.type();
if (type != OS.NSKeyDown && type != OS.NSKeyUp) currentEvent = null;
newText = verifyText(text, (int)/*64*/range.location, (int)/*64*/(range.location+range.length), currentEvent);
}
@@ -2256,18 +2256,18 @@ public void showSelection () {
}
}
-void textViewDidChangeSelection(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textViewDidChangeSelection(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSText editor = new NSText (notification.object ().id);
selectionRange = editor.selectedRange ();
}
-void textDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
if ((style & SWT.SINGLE) != 0) super.textDidChange (id, sel, aNotification);
postEvent (SWT.Modify);
}
-NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) {
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (long /*int*/ id, long /*int*/ sel, long /*int*/ aTextView, long /*int*/ oldSelectedCharRange, long /*int*/ newSelectedCharRange) {
/*
* If the selection is changing as a result of the receiver getting focus
* then return the receiver's last selection range, otherwise the full
@@ -2287,7 +2287,7 @@ int traversalCode (int key, NSEvent theEvent) {
if ((style & SWT.MULTI) != 0) {
bits &= ~SWT.TRAVERSE_RETURN;
if (key == 48 /* Tab */ && theEvent != null) {
- int /*long*/ modifiers = theEvent.modifierFlags ();
+ long /*int*/ modifiers = theEvent.modifierFlags ();
boolean next = (modifiers & OS.NSShiftKeyMask) == 0;
if (next && (modifiers & OS.NSControlKeyMask) == 0) {
bits &= ~(SWT.TRAVERSE_TAB_NEXT | SWT.TRAVERSE_TAB_PREVIOUS);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
index 4de8091353..f8c9306125 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
@@ -107,7 +107,7 @@ ToolBar(Composite parent, int style, boolean internal) {
}
}
-int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
NSString nsAttributeName = new NSString(arg0);
if (id == accessibleHandle() && accessible != null) {
@@ -121,7 +121,7 @@ int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int
if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute))
return role.id;
else {
- int /*long*/ roleDescription = OS.NSAccessibilityRoleDescription(role.id, 0);
+ long /*int*/ roleDescription = OS.NSAccessibilityRoleDescription(role.id, 0);
return roleDescription;
}
} else if (nsAttributeName.isEqualToString(OS.NSAccessibilityChildrenAttribute)) {
@@ -141,7 +141,7 @@ int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int
return super.accessibilityAttributeValue(id, sel, arg0);
}
-boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
// Toolbars aren't ignored.
if (id == view.id) return false;
return super.accessibilityIsIgnored(id, sel);
@@ -313,7 +313,7 @@ void destroyItem (ToolItem item) {
relayout ();
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
if (background != null) {
fillBackground (view, context, rect, -1);
@@ -742,7 +742,7 @@ public void setVisible(boolean visible) {
super.setVisible(visible);
}
-int /*long*/ toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar, int /*long*/ itemIdentifier, boolean flag) {
+long /*int*/ toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar, long /*int*/ itemIdentifier, boolean flag) {
NSString itemID = new NSString(itemIdentifier);
for (int j = 0; j < itemCount; j++) {
ToolItem item = items[j];
@@ -757,7 +757,7 @@ int /*long*/ toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(int /*long*
* Returns an array of all toolbar item IDs allowed to be in the toolbar. Since the ToolBar created all of the ToolItems
* return all of the item IDs.
*/
-int /*long*/ toolbarAllowedItemIdentifiers(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar) {
+long /*int*/ toolbarAllowedItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
NSMutableArray array = NSMutableArray.arrayWithCapacity(itemCount);
for (int i = 0; i < itemCount; i++) {
array.addObject(items[i].nsItem.itemIdentifier());
@@ -768,7 +768,7 @@ int /*long*/ toolbarAllowedItemIdentifiers(int /*long*/ id, int /*long*/ sel, in
/*
* This delegate method isn't really needed because ToolBars aren't customizable, but it's required according to the documentation.
*/
-int /*long*/ toolbarDefaultItemIdentifiers(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar) {
+long /*int*/ toolbarDefaultItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
return toolbarAllowedItemIdentifiers(id, sel, toolbar);
}
@@ -776,7 +776,7 @@ int /*long*/ toolbarDefaultItemIdentifiers(int /*long*/ id, int /*long*/ sel, in
* toolbarSelectableItemIdentifiers returns an array of all items that can be the selected item, as determined
* by setSelectedItemIdentifier.
*/
-int /*long*/ toolbarSelectableItemIdentifiers(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar) {
+long /*int*/ toolbarSelectableItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
NSMutableArray array = NSMutableArray.arrayWithCapacity(itemCount);
for (int i = 0; i < itemCount; i++) {
if ((items[i].style & SWT.RADIO) != 0) array.addObject(items[i].nsItem.itemIdentifier());
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
index ad7d0f29ea..03ece4e218 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
@@ -137,15 +137,15 @@ public ToolItem (ToolBar parent, int style, int index) {
parent.createItem (this, index);
}
-int /*long*/ accessibleHandle() {
+long /*int*/ accessibleHandle() {
if (button != null && button.cell() != null) return button.cell().id;
if (view != null) return view.id;
return 0;
}
-int /*long*/ accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ accessibilityActionNames(long /*int*/ id, long /*int*/ sel) {
- int /*long*/ returnValue = super.accessibilityActionNames(id, sel);
+ long /*int*/ returnValue = super.accessibilityActionNames(id, sel);
if (id == accessibleHandle()) {
if ((style & SWT.DROP_DOWN) != 0) {
@@ -161,9 +161,9 @@ int /*long*/ accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
return returnValue;
}
-int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
- int /*long*/ returnValue = super.accessibilityAttributeNames(id, sel);
+ long /*int*/ returnValue = super.accessibilityAttributeNames(id, sel);
if (id == accessibleHandle()) {
if ((style & (SWT.CHECK|SWT.RADIO)) !=0) {
@@ -185,7 +185,7 @@ int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
return returnValue;
}
-int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
NSString nsAttributeName = new NSString(arg0);
if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) {
@@ -198,7 +198,7 @@ int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int
if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute)) {
return roleText.id;
} else { // NSAccessibilityRoleDescriptionAttribute
- int /*long*/ description = OS.NSAccessibilityRoleDescription (roleText.id, 0);
+ long /*int*/ description = OS.NSAccessibilityRoleDescription (roleText.id, 0);
return description;
}
}
@@ -234,7 +234,7 @@ int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int
return super.accessibilityAttributeValue(id, sel, arg0);
}
-boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
// The interesting part of a ToolItem is its button, if it has one.
if (id == accessibleHandle()) return false;
return super.accessibilityIsIgnored(id, sel);
@@ -412,7 +412,7 @@ void destroyWidget() {
super.destroyWidget();
}
-void drawImageWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ image, NSRect rect, int /*long*/ view) {
+void drawImageWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ image, NSRect rect, long /*int*/ view) {
if (text.length () > 0) {
if ((parent.style & SWT.RIGHT) != 0) {
rect.x += 3;
@@ -420,7 +420,7 @@ void drawImageWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ i
rect.y += 3;
}
}
- int /*long*/ cgContext = NSGraphicsContext.currentContext().graphicsPort();
+ long /*int*/ cgContext = NSGraphicsContext.currentContext().graphicsPort();
NSCell cell = new NSCell(id);
boolean drawSelected = (parent.nsToolbar != null) && getSelection() && ((style & SWT.CHECK) != 0) && !cell.isHighlighted();
@@ -444,7 +444,7 @@ void drawImageWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ i
}
}
-NSRect drawTitleWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ title, NSRect titleRect, int /*long*/ view) {
+NSRect drawTitleWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ title, NSRect titleRect, long /*int*/ view) {
boolean hiliteShadow = new NSButtonCell(id).isHighlighted() && text.length() > 0 && image == null;
// An unbordered cell doesn't draw any highlighting when pushed or selected, so we have to do it here.
@@ -462,7 +462,7 @@ NSRect drawTitleWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/
return super.drawTitleWithFrameInView(id, sel, title, titleRect, view);
}
-void drawWidget (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
if (id == view.id) {
boolean drawSelected = getSelection() && (parent.nsToolbar == null);
if (drawSelected) {
@@ -732,11 +732,11 @@ boolean isDrawing () {
return getDrawing() && parent.isDrawing ();
}
-int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+long /*int*/ menuForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
return parent.menuForEvent (id, sel, theEvent);
}
-void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseDown)) return;
Display display = this.display;
display.trackingControl = parent;
@@ -752,47 +752,47 @@ void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
}
}
-boolean mouseDownCanMoveWindow(int /*long*/ id, int /*long*/ sel) {
+boolean mouseDownCanMoveWindow(long /*int*/ id, long /*int*/ sel) {
if (id == view.id) return false;
return super.mouseDownCanMoveWindow(id, sel);
}
-void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseUp)) return;
super.mouseUp(id, sel, theEvent);
}
-void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseMove)) return;
super.mouseDragged(id, sel, theEvent);
}
-void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseDown)) return;
super.rightMouseDown(id, sel, theEvent);
}
-void rightMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseUp)) return;
super.rightMouseUp(id, sel, theEvent);
}
-void rightMouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseMove)) return;
super.rightMouseDragged(id, sel, theEvent);
}
-void otherMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseDown)) return;
super.otherMouseDown(id, sel, theEvent);
}
-void otherMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseUp)) return;
super.otherMouseUp(id, sel, theEvent);
}
-void otherMouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseMove)) return;
super.otherMouseDragged(id, sel, theEvent);
}
@@ -1263,7 +1263,7 @@ void updateImage (boolean layout) {
parent.relayout();
}
-boolean validateMenuItem(int /*long*/ id, int /*long*/ sel, int /*long*/ menuItem) {
+boolean validateMenuItem(long /*int*/ id, long /*int*/ sel, long /*int*/ menuItem) {
return isEnabled();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
index 6a2d14c908..127ce11cf0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
@@ -365,7 +365,7 @@ void drawRectangles (NSWindow window, Rectangle [] rects, boolean erase) {
context.setCompositingOperation(erase ? OS.NSCompositeClear : OS.NSCompositeSourceOver);
NSRect rectFrame = new NSRect();
NSPoint globalPoint = new NSPoint();
- float /*double*/ screenHeight = display.getPrimaryFrame().height;
+ double /*float*/ screenHeight = display.getPrimaryFrame().height;
for (int i=0; i<rects.length; i++) {
Rectangle rect = rects [i];
rectFrame.x = rect.x + parentOrigin.x;
@@ -551,7 +551,7 @@ void mouse (NSEvent nsEvent) {
void key (NSEvent nsEvent) {
int nsType = (int)/*64*/nsEvent.type();
- int /*long*/ modifierFlags = nsEvent.modifierFlags();
+ long /*int*/ modifierFlags = nsEvent.modifierFlags();
int nsKeyCode = nsEvent.keyCode();
int keyCode = Display.translateKey (nsKeyCode);
@@ -755,14 +755,14 @@ public boolean open () {
tracking = true;
window = (NSWindow)new NSWindow().alloc();
NSArray screens = NSScreen.screens();
- float /*double*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE;
- float /*double*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE;
+ double /*float*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE;
+ double /*float*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE;
int count = (int)/*64*/screens.count();
for (int i = 0; i < count; i++) {
NSScreen screen = new NSScreen(screens.objectAtIndex(i));
NSRect frame = screen.frame();
- float /*double*/ x1 = frame.x, x2 = frame.x + frame.width;
- float /*double*/ y1 = frame.y, y2 = frame.y + frame.height;
+ double /*float*/ x1 = frame.x, x2 = frame.x + frame.width;
+ double /*float*/ y1 = frame.y, y2 = frame.y + frame.height;
if (x1 < minX) minX = x1;
if (x2 < minX) minX = x2;
if (x1 > maxX) maxX = x1;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java
index 78f7dff12a..5193ef1026 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java
@@ -513,7 +513,7 @@ boolean shouldShowMenu (NSEvent event) {
return false;
}
-void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
NSEvent nsEvent = new NSEvent(theEvent);
highlight = true;
updateImage();
@@ -524,7 +524,7 @@ void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
}
}
-void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
NSEvent nsEvent = new NSEvent(theEvent);
NSRect frame = view.frame();
boolean oldHighlight = highlight;
@@ -539,7 +539,7 @@ void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
}
}
-void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (highlight) {
NSEvent nsEvent = new NSEvent(theEvent);
if (nsEvent.type() == OS.NSLeftMouseUp) {
@@ -551,25 +551,25 @@ void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
view.setNeedsDisplay(true);
}
-void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
mouseDown(id, sel, theEvent);
}
-void rightMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
mouseUp(id, sel, theEvent);
}
-void rightMouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
mouseDragged(id, sel, theEvent);
}
-void drawRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+void drawRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
item.drawStatusBarBackgroundInRect(rect, highlight);
super.drawRect(id, sel, rect);
}
void updateImage () {
- float /*double*/ width = 0;
+ double /*float*/ width = 0;
Image image = this.image;
if (highlight && highlightImage != null) image = highlightImage;
if (image == null) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
index ccfa08c883..871d7c2716 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
@@ -159,19 +159,19 @@ TreeItem _getItem (TreeItem parentItem, int index, boolean create) {
return item;
}
-boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
return true;
}
-int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
- int /*long*/ returnValue = 0;
+long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+ long /*int*/ returnValue = 0;
NSString attributeName = new NSString(arg0);
// If the check column is visible, don't report it back as a column for accessibility purposes.
// The check column is meant to appear as a part of the first column.
if (attributeName.isEqualToString (OS.NSAccessibilityColumnsAttribute) || attributeName.isEqualToString(OS.NSAccessibilityVisibleColumnsAttribute)) {
if ((style & SWT.CHECK) != 0) {
- int /*long*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
+ long /*int*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
if (superValue != 0) {
NSArray columns = new NSArray(superValue);
NSMutableArray columnsWithoutCheck = NSMutableArray.arrayWithCapacity(columns.count() - 1);
@@ -267,17 +267,17 @@ int calculateWidth (TreeItem[] items, int index, GC gc, boolean recurse) {
return width;
}
-NSSize cellSize (int /*long*/ id, int /*long*/ sel) {
+NSSize cellSize (long /*int*/ id, long /*int*/ sel) {
NSSize size = super.cellSize(id, sel);
NSCell cell = new NSCell(id);
NSImage image = cell.image();
if (image != null) size.width += imageBounds.width + IMAGE_GAP;
if (hooks(SWT.MeasureItem)) {
- int /*long*/ [] outValue = new int /*long*/ [1];
+ long /*int*/ [] outValue = new long /*int*/ [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
TreeItem item = (TreeItem) display.getWidget (outValue [0]);
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
- int /*long*/ tableColumn = outValue[0];
+ long /*int*/ tableColumn = outValue[0];
int columnIndex = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -290,13 +290,13 @@ NSSize cellSize (int /*long*/ id, int /*long*/ sel) {
return size;
}
-boolean canDragRowsWithIndexes_atPoint(int /*long*/ id, int /*long*/ sel, int /*long*/ rowIndexes, NSPoint mouseDownPoint) {
+boolean canDragRowsWithIndexes_atPoint(long /*int*/ id, long /*int*/ sel, long /*int*/ rowIndexes, NSPoint mouseDownPoint) {
if (!super.canDragRowsWithIndexes_atPoint(id, sel, rowIndexes, mouseDownPoint)) return false;
// If the current row is not selected and the user is not attempting to modify the selection, select the row first.
NSTableView widget = (NSTableView)view;
- int /*long*/ row = widget.rowAtPoint(mouseDownPoint);
- int /*long*/ modifiers = NSApplication.sharedApplication().currentEvent().modifierFlags();
+ long /*int*/ row = widget.rowAtPoint(mouseDownPoint);
+ long /*int*/ modifiers = NSApplication.sharedApplication().currentEvent().modifierFlags();
boolean drag = (state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect);
if (drag) {
@@ -454,7 +454,7 @@ void clearCachedWidth (TreeItem[] items) {
}
}
-void collapseItem_collapseChildren (int /*long*/ id, int /*long*/ sel, int /*long*/ itemID, boolean children) {
+void collapseItem_collapseChildren (long /*int*/ id, long /*int*/ sel, long /*int*/ itemID, boolean children) {
TreeItem item = (TreeItem)display.getWidget(itemID);
if (item == null) return;
if (!ignoreExpand) item.sendExpand (false, children);
@@ -465,7 +465,7 @@ void collapseItem_collapseChildren (int /*long*/ id, int /*long*/ sel, int /*lon
setScrollWidth ();
}
-int /*long*/ columnAtPoint(int /*long*/ id, int /*long*/ sel, NSPoint point) {
+long /*int*/ columnAtPoint(long /*int*/ id, long /*int*/ sel, NSPoint point) {
if ((style & SWT.CHECK) != 0) {
if (point.x <= getCheckColumnWidth() && point.y < headerView.frame().height) return 1;
}
@@ -589,7 +589,7 @@ void createHandle () {
widget.setOutlineTableColumn (checkColumn);
checkColumn.setResizingMask (OS.NSTableColumnNoResizing);
checkColumn.setEditable (false);
- int /*long*/ cls = NSButton.cellClass (); /* use our custom cell class */
+ long /*int*/ cls = NSButton.cellClass (); /* use our custom cell class */
buttonCell = new NSButtonCell (OS.class_createInstance (cls, 0));
buttonCell.init ();
checkColumn.setDataCell (buttonCell);
@@ -753,7 +753,7 @@ Color defaultForeground () {
return display.getWidgetColor (SWT.COLOR_LIST_FOREGROUND);
}
-void deselectAll(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void deselectAll(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
if ( ((NSTableView)view).selectedRow() != -1) return;
@@ -761,7 +761,7 @@ void deselectAll(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
super.deselectAll (id, sel, sender);
}
-void deselectRow (int /*long*/ id, int /*long*/ sel, int /*long*/ index) {
+void deselectRow (long /*int*/ id, long /*int*/ sel, long /*int*/ index) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
if ( ((NSTableView)view).selectedRow() == index) return;
@@ -814,7 +814,7 @@ public void deselect (TreeItem item) {
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
NSOutlineView widget = (NSOutlineView)view;
- int /*long*/ row = widget.rowForItem(item.handle);
+ long /*int*/ row = widget.rowForItem(item.handle);
ignoreSelect = true;
widget.deselectRow (row);
ignoreSelect = false;
@@ -911,7 +911,7 @@ void destroyItem (TreeColumn column) {
NSArray array = ((NSOutlineView)view).tableColumns ();
int arraySize = (int)/*64*/array.count ();
for (int i = oldIndex; i < arraySize; i++) {
- int /*long*/ columnId = array.objectAtIndex (i).id;
+ long /*int*/ columnId = array.objectAtIndex (i).id;
for (int j = 0; j < columnCount; j++) {
if (columns[j].nsColumn.id == columnId) {
columns [j].sendEvent (SWT.Move);
@@ -964,13 +964,13 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
return false;
}
-void drawBackgroundInClipRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+void drawBackgroundInClipRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
super.drawViewBackgroundInRect(id, sel, rect);
if (id != view.id) return;
fillBackground (view, NSGraphicsContext.currentContext(), rect, -1);
}
-void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rect, int /*long*/ view) {
+void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rect, long /*int*/ view) {
boolean hooksErase = hooks (SWT.EraseItem);
boolean hooksPaint = hooks (SWT.PaintItem);
boolean hooksMeasure = hooks (SWT.MeasureItem);
@@ -978,14 +978,14 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
NSTextFieldCell cell = new NSTextFieldCell (id);
NSOutlineView widget = (NSOutlineView)this.view;
- int /*long*/ [] outValue = new int /*long*/ [1];
+ long /*int*/ [] outValue = new long /*int*/ [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
TreeItem item = (TreeItem) display.getWidget (outValue [0]);
if (item == null) return;
- int /*long*/ rowIndex = widget.rowForItem(item.handle);
+ long /*int*/ rowIndex = widget.rowForItem(item.handle);
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
- int /*long*/ tableColumn = outValue[0];
- int /*long*/ nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));
+ long /*int*/ tableColumn = outValue[0];
+ long /*int*/ nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));
int columnIndex = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -1022,7 +1022,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
NSRect rowRect = widget.rectOfRow (rowIndex);
cellRect.width = rowRect.width;
}
- float /*double*/ offsetX = 0, offsetY = 0;
+ double /*float*/ offsetX = 0, offsetY = 0;
if (hooksPaint || hooksErase) {
NSRect frameCell = widget.frameOfCellAtColumn(nsColumnIndex, rowIndex);
offsetX = rect.x - frameCell.x;
@@ -1104,7 +1104,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
if (drawBackground && !drawSelection) {
context.saveGraphicsState ();
- float /*double*/ [] colorRGB = background.handle;
+ double /*float*/ [] colorRGB = background.handle;
NSColor color = NSColor.colorWithDeviceRed (colorRGB[0], colorRGB[1], colorRGB[2], 1f);
color.setFill ();
NSBezierPath.fillRect (cellRect);
@@ -1158,7 +1158,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
* foreground color to black when the cell is highlighted. The text
* still draws white. The fix is to draw the text and not call super.
*/
- float /*double*/ [] color = userForeground.handle;
+ double /*float*/ [] color = userForeground.handle;
if (color[0] == 0 && color[1] == 0 && color[2] == 0 && color[3] == 1) {
NSMutableAttributedString newStr = new NSMutableAttributedString(cell.attributedStringValue().mutableCopy());
NSRange range = new NSRange();
@@ -1241,13 +1241,13 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
}
}
-void drawWithExpansionFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cellFrame, int /*long*/ view) {
+void drawWithExpansionFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
drawExpansion = true;
super.drawWithExpansionFrame_inView(id, sel, cellFrame, view);
drawExpansion = false;
}
-void expandItem_expandChildren (int /*long*/ id, int /*long*/ sel, int /*long*/ itemID, boolean children) {
+void expandItem_expandChildren (long /*int*/ id, long /*int*/ sel, long /*int*/ itemID, boolean children) {
TreeItem item = (TreeItem)display.getWidget(itemID);
if (item == null) return;
if (!ignoreExpand) item.sendExpand (true, children);
@@ -1266,7 +1266,7 @@ void expandItem_expandChildren (int /*long*/ id, int /*long*/ sel, int /*long*/
setScrollWidth (false, item.items, true);
}
-NSRect expansionFrameWithFrame_inView(int /*long*/ id, int /*long*/ sel, NSRect cellRect, int /*long*/ view) {
+NSRect expansionFrameWithFrame_inView(long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
if (toolTipText == null) {
NSRect rect = super.expansionFrameWithFrame_inView(id, sel, cellRect, view);
NSCell cell = new NSCell(id);
@@ -1314,7 +1314,7 @@ Widget findTooltip (NSPoint pt) {
NSTableHeaderView headerView = widget.headerView();
if (headerView != null) {
pt = headerView.convertPoint_fromView_ (pt, null);
- int /*long*/ index = headerView.columnAtPoint (pt);
+ long /*int*/ index = headerView.columnAtPoint (pt);
if (index != -1) {
NSArray nsColumns = widget.tableColumns ();
id nsColumn = nsColumns.objectAtIndex (index);
@@ -1745,7 +1745,7 @@ public TreeItem [] getSelection () {
}
NSIndexSet selection = widget.selectedRowIndexes ();
int count = (int)/*64*/selection.count ();
- int /*long*/ [] indexBuffer = new int /*long*/ [count];
+ long /*int*/ [] indexBuffer = new long /*int*/ [count];
selection.getIndexes (indexBuffer, count, 0);
TreeItem [] result = new TreeItem [count];
for (int i=0; i<count; i++) {
@@ -1837,13 +1837,13 @@ public TreeItem getTopItem () {
point.x = rect.x;
point.y = rect.y;
NSOutlineView outlineView = (NSOutlineView)view;
- int /*long*/ index = outlineView.rowAtPoint (point);
+ long /*int*/ index = outlineView.rowAtPoint (point);
if (index == -1) return null; /* empty */
id item = outlineView.itemAtRow (index);
return (TreeItem)display.getWidget (item.id);
}
-NSRect headerRectOfColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ column) {
+NSRect headerRectOfColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ column) {
if ((style & SWT.CHECK) == 0) return callSuperRect(id, sel, column);
if (column == 0) {
@@ -1861,7 +1861,7 @@ NSRect headerRectOfColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ colum
return callSuperRect(id, sel, column);
}
-void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*/ rect) {
+void highlightSelectionInClipRect(long /*int*/ id, long /*int*/ sel, long /*int*/ rect) {
if (hooks (SWT.EraseItem)) return;
if ((style & SWT.HIDE_SELECTION) != 0 && !hasFocus()) return;
NSRect clipRect = new NSRect ();
@@ -1869,7 +1869,7 @@ void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*
callSuper (id, sel, clipRect);
}
-int /*long*/ hitTestForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event, NSRect rect, int /*long*/ controlView) {
+long /*int*/ hitTestForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event, NSRect rect, long /*int*/ controlView) {
/*
* For some reason, the cell class needs to implement hitTestForEvent:inRect:ofView:,
* otherwise the double action selector is not called properly.
@@ -1877,13 +1877,13 @@ int /*long*/ hitTestForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ ev
return callSuper(id, sel, event, rect, controlView);
}
-int /*long*/ image (int /*long*/ id, int /*long*/ sel) {
- int /*long*/ [] image = new int /*long*/ [1];
+long /*int*/ image (long /*int*/ id, long /*int*/ sel) {
+ long /*int*/ [] image = new long /*int*/ [1];
OS.object_getInstanceVariable(id, Display.SWT_IMAGE, image);
return image[0];
}
-NSRect imageRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSRect imageRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
NSImage image = new NSCell(id).image();
if (image != null) {
cellFrame.x += IMAGE_GAP;
@@ -1966,12 +1966,12 @@ boolean isTrim (NSView view) {
return view.id == headerView.id;
}
-void keyDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
ignoreSelect = preventSelect = false;
super.keyDown(id, sel, theEvent);
}
-int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (id != headerView.id) {
/*
* Feature in Cocoa: Table views do not change the selection when the user
@@ -1986,7 +1986,7 @@ int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEve
// select the row that was clicked before showing the menu for the event
NSPoint mousePoint = view.convertPoint_fromView_(event.locationInWindow(), null);
- int /*long*/ row = tree.rowAtPoint(mousePoint);
+ long /*int*/ row = tree.rowAtPoint(mousePoint);
// figure out if the row that was just clicked on is currently selected
if (selectedRowIndexes.containsIndex(row) == false) {
@@ -2001,7 +2001,7 @@ int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEve
return super.menuForEvent(id, sel, theEvent);
}
-void mouseDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (id == view.id) {
// Bug/feature in Cocoa: If the tree has a context menu we just set it visible instead of returning
// it from menuForEvent:. This has the side effect, however, of sending control-click to the NSTableView,
@@ -2012,7 +2012,7 @@ void mouseDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
super.mouseDown(id, sel, theEvent);
}
-void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
ignoreSelect = preventSelect = false;
boolean check = false;
NSEvent nsEvent = new NSEvent(theEvent);
@@ -2049,7 +2049,7 @@ void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
didSelect = false;
}
-boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) {
+boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
return false;
}
@@ -2059,7 +2059,7 @@ boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) {
* to momentarily appear while clicking on the checkbox. To avoid this,
* override [NSCell nextState] to go directly to the desired state.
*/
-int /*long*/ nextState (int /*long*/ id, int /*long*/ sel) {
+long /*int*/ nextState (long /*int*/ id, long /*int*/ sel) {
NSOutlineView outlineView = (NSOutlineView)view;
int index = (int)/*64*/outlineView.clickedRow();
if (index == -1) index = (int)/*64*/outlineView.selectedRow ();
@@ -2070,19 +2070,19 @@ int /*long*/ nextState (int /*long*/ id, int /*long*/ sel) {
return item.checked ? OS.NSOffState : OS.NSOnState;
}
-int /*long*/ outlineView_child_ofItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ index, int /*long*/ itemID) {
+long /*int*/ outlineView_child_ofItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ index, long /*int*/ itemID) {
TreeItem parent = (TreeItem) display.getWidget (itemID);
TreeItem item = _getItem (parent, (int)/*64*/index, true);
return item.handle.id;
}
-void outlineView_didClickTableColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn) {
+void outlineView_didClickTableColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ tableColumn) {
TreeColumn column = getColumn (new id (tableColumn));
if (column == null) return; /* either CHECK column or firstColumn in 0-column Tree */
column.sendSelectionEvent (SWT.Selection);
}
-int /*long*/ outlineView_objectValueForTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn, int /*long*/ itemID) {
+long /*int*/ outlineView_objectValueForTableColumn_byItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ tableColumn, long /*int*/ itemID) {
TreeItem item = (TreeItem) display.getWidget (itemID);
checkData (item);
if (checkColumn != null && tableColumn == checkColumn.id) {
@@ -2102,21 +2102,21 @@ int /*long*/ outlineView_objectValueForTableColumn_byItem (int /*long*/ id, int
return item.createString (0).id;
}
-boolean outlineView_isItemExpandable (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+boolean outlineView_isItemExpandable (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
if (item == 0) return true;
return ((TreeItem) display.getWidget (item)).itemCount != 0;
}
-int /*long*/ outlineView_numberOfChildrenOfItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+long /*int*/ outlineView_numberOfChildrenOfItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
if (item == 0) return itemCount;
return ((TreeItem) display.getWidget (item)).itemCount;
}
-boolean outlineView_shouldExpandItem_item (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+boolean outlineView_shouldExpandItem_item (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
return shouldExpand;
}
-boolean outlineView_shouldReorderColumn_toColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ currentColIndex, int /*long*/ newColIndex) {
+boolean outlineView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ currentColIndex, long /*int*/ newColIndex) {
// Check column should never move and no column can be dragged to the left of it, if present.
if ((style & SWT.CHECK) != 0) {
if (currentColIndex == 0) return false;
@@ -2134,16 +2134,16 @@ boolean outlineView_shouldReorderColumn_toColumn(int /*long*/ id, int /*long*/ s
return true;
}
-boolean outlineView_shouldTrackCell_forTableColumn_item(int /*long*/ id, int /*long*/ sel, int /*long*/ table, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ item) {
+boolean outlineView_shouldTrackCell_forTableColumn_item(long /*int*/ id, long /*int*/ sel, long /*int*/ table, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ item) {
if ((style & SWT.CHECK) != 0) {
if (new NSCell(cell).isKindOfClass(OS.class_NSButtonCell)) return true;
}
NSOutlineView widget = (NSOutlineView)view;
- int /*long*/ rowIndex = widget.rowForItem(new id(item));
+ long /*int*/ rowIndex = widget.rowForItem(new id(item));
return widget.isRowSelected(rowIndex);
}
-void outlineView_willDisplayCell_forTableColumn_item (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ itemID) {
+void outlineView_willDisplayCell_forTableColumn_item (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ itemID) {
if (checkColumn != null && tableColumn == checkColumn.id) return;
TreeItem item = (TreeItem) display.getWidget(itemID);
int index = 0;
@@ -2208,7 +2208,7 @@ void outlineView_willDisplayCell_forTableColumn_item (int /*long*/ id, int /*lon
}
}
-void outlineViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void outlineViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSDictionary userInfo = notification.userInfo ();
NSString nsstring = (NSString) new NSString().alloc();
@@ -2236,7 +2236,7 @@ void outlineViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ a
headerView.setNeedsDisplay(true);
}
-void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void outlineViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSDictionary userInfo = notification.userInfo ();
NSString nsstring = (NSString) new NSString().alloc();
@@ -2265,7 +2265,7 @@ void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/
}
}
-void scrollClipViewToPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ clipView, NSPoint point) {
+void scrollClipViewToPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ clipView, NSPoint point) {
if (shouldScroll) {
super.scrollClipViewToPoint(id, sel, clipView, point);
if ((style & SWT.CHECK) != 0 && columnCount > 0 && ((NSOutlineView) view).headerView () != null) {
@@ -2296,17 +2296,17 @@ void sendSelection () {
}
}
-void outlineViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void outlineViewSelectionDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
if (didSelect) return;
sendSelection ();
}
-void outlineViewSelectionIsChanging (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void outlineViewSelectionIsChanging (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
didSelect = true;
sendSelection ();
}
-void outlineView_setObjectValue_forTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ object, int /*long*/ tableColumn, int /*long*/ itemID) {
+void outlineView_setObjectValue_forTableColumn_byItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ object, long /*int*/ tableColumn, long /*int*/ itemID) {
if (checkColumn != null && tableColumn == checkColumn.id) {
TreeItem item = (TreeItem) display.getWidget (itemID);
item.checked = !item.checked;
@@ -2318,7 +2318,7 @@ void outlineView_setObjectValue_forTableColumn_byItem (int /*long*/ id, int /*lo
}
}
-boolean outlineView_writeItems_toPasteboard(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
+boolean outlineView_writeItems_toPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
return sendMouseEvent(NSApplication.sharedApplication().currentEvent(), SWT.DragDetect, true);
}
@@ -2463,7 +2463,7 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-void setImage (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void setImage (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
OS.object_setInstanceVariable(id, Display.SWT_IMAGE, arg0);
}
@@ -2539,7 +2539,7 @@ public void select (TreeItem item) {
checkItems ();
showItem (item);
NSOutlineView outlineView = (NSOutlineView) view;
- int /*long*/ row = outlineView.rowForItem (item.handle);
+ long /*int*/ row = outlineView.rowForItem (item.handle);
NSIndexSet set = (NSIndexSet)new NSIndexSet().alloc();
set = set.initWithIndex(row);
ignoreSelect = true;
@@ -2548,7 +2548,7 @@ public void select (TreeItem item) {
set.release();
}
-void selectRowIndexes_byExtendingSelection (int /*long*/ id, int /*long*/ sel, int /*long*/ indexes, boolean extend) {
+void selectRowIndexes_byExtendingSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ indexes, boolean extend) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
NSIndexSet set = new NSIndexSet(indexes);
@@ -2636,7 +2636,7 @@ boolean sendMouseEvent(NSEvent nsEvent, int type, boolean send) {
NSTableView widget = (NSTableView)view;
NSIndexSet selectedRows = widget.selectedRowIndexes ();
int count = (int)/*64*/selectedRows.count();
- int /*long*/ [] indexBuffer = new int /*long*/ [count];
+ long /*int*/ [] indexBuffer = new long /*int*/ [count];
selectedRows.getIndexes(indexBuffer, count, 0);
for (int i = 0; i < count; i++) {
if (indexBuffer[i] == selectedRowIndex) continue;
@@ -2677,7 +2677,7 @@ void selectItems (TreeItem[] items, boolean ignoreDisposed) {
set.release();
}
-NSRect titleRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSRect titleRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
NSImage image = new NSCell(id).image();
if (image != null) {
int imageWidth = imageBounds.width + IMAGE_GAP;
@@ -2892,8 +2892,8 @@ void setItemCount (TreeItem parentItem, int count) {
void setItemHeight (Image image, NSFont font, boolean set) {
if (font == null) font = getFont ().handle;
- float /*double*/ ascent = font.ascender ();
- float /*double*/ descent = -font.descender () + font.leading ();
+ double /*float*/ ascent = font.ascender ();
+ double /*float*/ descent = -font.descender () + font.leading ();
int height = (int)Math.ceil (ascent + descent) + 1;
Rectangle bounds = image != null ? image.getBounds () : imageBounds;
if (bounds != null) {
@@ -2977,11 +2977,11 @@ boolean setScrollWidth (TreeItem item) {
return false;
}
-void setShouldExpandItem (int /*long*/ id, int /*long*/ sel, boolean shouldExpand) {
+void setShouldExpandItem (long /*int*/ id, long /*int*/ sel, boolean shouldExpand) {
this.shouldExpand = shouldExpand;
}
-void setShouldScrollClipView (int /*long*/ id, int /*long*/ sel, boolean shouldScroll) {
+void setShouldScrollClipView (long /*int*/ id, long /*int*/ sel, boolean shouldScroll) {
this.shouldScroll = shouldScroll;
}
@@ -3143,7 +3143,7 @@ public void setTopItem (TreeItem item) {
checkItems ();
showItem (item, false);
NSOutlineView widget = (NSOutlineView) view;
- int /*long*/ row = widget.rowForItem (item.handle);
+ long /*int*/ row = widget.rowForItem (item.handle);
if (row == -1) return;
NSPoint pt = new NSPoint();
pt.x = scrollView.contentView().bounds().x;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java
index 0a0f469257..28e09a02e5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java
@@ -203,7 +203,7 @@ void destroyWidget () {
releaseHandle ();
}
-void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cellRect, int /*long*/ view) {
+void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
/*
* Feature in Cocoa. When the last column in a tree does not reach the
* rightmost edge of the tree view, the cell that draws the rightmost-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
index d3f6668a63..5a24c9a716 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
@@ -48,7 +48,7 @@ public abstract class Widget {
EventTable eventTable;
Object data;
- int /*long*/ jniRef;
+ long /*int*/ jniRef;
/* Global state flags */
static final int DISPOSED = 1 << 0;
@@ -135,61 +135,61 @@ public Widget (Widget parent, int style) {
reskinWidget ();
}
-int /*long*/ accessibleHandle() {
+long /*int*/ accessibleHandle() {
return 0;
}
-int /*long*/ accessibilityActionDescription(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+long /*int*/ accessibilityActionDescription(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
return callSuperObject(id, sel, arg0);
}
-int /*long*/ accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ accessibilityActionNames(long /*int*/ id, long /*int*/ sel) {
return callSuperObject(id, sel);
}
-int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
return callSuperObject(id, sel);
}
-int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
return callSuperObject(id, sel, arg0);
}
-int /*long*/ accessibilityAttributeValue_forParameter(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+long /*int*/ accessibilityAttributeValue_forParameter(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
}
-int /*long*/ accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ accessibilityFocusedUIElement(long /*int*/ id, long /*int*/ sel) {
return callSuperObject(id, sel);
}
-int /*long*/ accessibilityHitTest(int /*long*/ id, int /*long*/ sel, NSPoint point) {
+long /*int*/ accessibilityHitTest(long /*int*/ id, long /*int*/ sel, NSPoint point) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, point);
}
-boolean accessibilityIsAttributeSettable(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+boolean accessibilityIsAttributeSettable(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
return callSuperBoolean(id, sel, arg0);
}
-boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
return callSuperBoolean(id, sel);
}
-int /*long*/ accessibilityParameterizedAttributeNames(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ accessibilityParameterizedAttributeNames(long /*int*/ id, long /*int*/ sel) {
return callSuperObject(id, sel);
}
-void accessibilityPerformAction(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void accessibilityPerformAction(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
callSuper(id, sel, arg0);
}
-void accessibilitySetValue_forAttribute(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+void accessibilitySetValue_forAttribute(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
callSuper(id, sel, arg0, arg1);
}
@@ -203,71 +203,71 @@ String getClipboardText () {
void setClipRegion (NSView view) {
}
-int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+long /*int*/ attributedSubstringFromRange (long /*int*/ id, long /*int*/ sel, long /*int*/ range) {
return 0;
}
-void callSuper(int /*long*/ id, int /*long*/ sel) {
+void callSuper(long /*int*/ id, long /*int*/ sel) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel);
}
-void callSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void callSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0);
}
-void callSuper(int /*long*/ id, int /*long*/ sel, NSRect arg0) {
+void callSuper(long /*int*/ id, long /*int*/ sel, NSRect arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0);
}
-void callSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+void callSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
}
-void callSuper(int /*long*/ id, int /*long*/ sel, NSRect arg0, int /*long*/ arg1) {
+void callSuper(long /*int*/ id, long /*int*/ sel, NSRect arg0, long /*int*/ arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
}
-int /*long*/ callSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, NSRect arg1, int /*long*/ arg2) {
+long /*int*/ callSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSRect arg1, long /*int*/ arg2) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, arg0, arg1, arg2);
}
-boolean callSuperBoolean(int /*long*/ id, int /*long*/ sel) {
+boolean callSuperBoolean(long /*int*/ id, long /*int*/ sel) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel) != 0;
}
-boolean canBecomeKeyWindow (int /*long*/ id, int /*long*/ sel) {
+boolean canBecomeKeyWindow (long /*int*/ id, long /*int*/ sel) {
return callSuperBoolean (id, sel);
}
-boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) {
+boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
return callSuperBoolean (id, sel);
}
-void cancelOperation(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void cancelOperation(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
}
-NSSize cellSize (int /*long*/ id, int /*long*/ sel) {
+NSSize cellSize (long /*int*/ id, long /*int*/ sel) {
NSSize result = new NSSize();
objc_super super_struct = new objc_super();
super_struct.receiver = id;
@@ -276,7 +276,7 @@ NSSize cellSize (int /*long*/ id, int /*long*/ sel) {
return result;
}
-NSSize cellSizeForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSSize cellSizeForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -285,42 +285,42 @@ NSSize cellSizeForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
return result;
}
-boolean callSuperBoolean(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+boolean callSuperBoolean(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, arg0) != 0;
}
-boolean callSuperBoolean(int /*long*/ id, int /*long*/ sel, NSRange range, int /*long*/ arg1) {
+boolean callSuperBoolean(long /*int*/ id, long /*int*/ sel, NSRange range, long /*int*/ arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper_bool(super_struct, sel, range, arg1);
}
-int /*long*/ callSuperObject(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ callSuperObject(long /*int*/ id, long /*int*/ sel) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel);
}
-int /*long*/ callSuperObject(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+long /*int*/ callSuperObject(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, arg0);
}
-int /*long*/ callSuperObject(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+long /*int*/ callSuperObject(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
}
-NSRect callSuperRect(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+NSRect callSuperRect(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -329,40 +329,40 @@ NSRect callSuperRect(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
return result;
}
-boolean canDragRowsWithIndexes_atPoint(int /*long*/ id, int /*long*/ sel, int /*long*/ rowIndexes, NSPoint mouseDownPoint) {
+boolean canDragRowsWithIndexes_atPoint(long /*int*/ id, long /*int*/ sel, long /*int*/ rowIndexes, NSPoint mouseDownPoint) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper_bool(super_struct, sel, rowIndexes, mouseDownPoint);
}
-int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ point) {
+long /*int*/ characterIndexForPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ point) {
return OS.NSNotFound;
}
-int /*long*/ columnAtPoint(int /*long*/ id, int /*long*/ sel, NSPoint point) {
+long /*int*/ columnAtPoint(long /*int*/ id, long /*int*/ sel, NSPoint point) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, point);
}
-boolean acceptsFirstMouse (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+boolean acceptsFirstMouse (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, theEvent) != 0;
}
-boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
return callSuperBoolean(id, sel);
}
-boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean becomeFirstResponder (long /*int*/ id, long /*int*/ sel) {
return callSuperBoolean(id, sel);
}
-void becomeKeyWindow (int /*long*/ id, int /*long*/ sel) {
+void becomeKeyWindow (long /*int*/ id, long /*int*/ sel) {
callSuper(id, sel);
}
@@ -410,7 +410,7 @@ void reskinWidget() {
}
}
-boolean resignFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean resignFirstResponder (long /*int*/ id, long /*int*/ sel) {
return callSuperBoolean(id, sel);
}
@@ -475,7 +475,7 @@ public void addDisposeListener (DisposeListener listener) {
addListener (SWT.Dispose, typedListener);
}
-boolean canBecomeKeyView(int /*long*/ id, int /*long*/ sel) {
+boolean canBecomeKeyView(long /*int*/ id, long /*int*/ sel) {
return true;
}
@@ -575,14 +575,14 @@ protected void checkWidget () {
if ((state & DISPOSED) != 0) error (SWT.ERROR_WIDGET_DISPOSED);
}
-void clearDeferFlushing (int /*long*/ id, int /*long*/ sel) {
+void clearDeferFlushing (long /*int*/ id, long /*int*/ sel) {
}
-boolean textView_clickOnLink_atIndex(int /*long*/ id, int /*long*/ sel, int /*long*/ textView, int /*long*/ link, int /*long*/ charIndex) {
+boolean textView_clickOnLink_atIndex(long /*int*/ id, long /*int*/ sel, long /*int*/ textView, long /*int*/ link, long /*int*/ charIndex) {
return true;
}
-void collapseItem_collapseChildren (int /*long*/ id, int /*long*/ sel, int /*long*/ item, boolean children) {
+void collapseItem_collapseChildren (long /*int*/ id, long /*int*/ sel, long /*int*/ item, boolean children) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -612,13 +612,13 @@ void createWidget () {
register ();
}
-void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void comboBoxSelectionDidChange(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-void comboBoxWillDismiss(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void comboBoxWillDismiss(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-void comboBoxWillPopUp(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void comboBoxWillPopUp(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
void deregister () {
@@ -667,35 +667,35 @@ public void dispose () {
release (true);
}
-void deselectAll(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void deselectAll(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
callSuper(id, sel, sender);
}
-void deselectRow(int /*long*/ id, int /*long*/ sel, int /*long*/ index) {
+void deselectRow(long /*int*/ id, long /*int*/ sel, long /*int*/ index) {
callSuper(id, sel, index);
}
-void doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ aSelector) {
+void doCommandBySelector (long /*int*/ id, long /*int*/ sel, long /*int*/ aSelector) {
callSuper (id, sel, aSelector);
}
-boolean dragSelectionWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
+boolean dragSelectionWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
return false;
}
-void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
/* Do nothing */
}
-void drawBackgroundInClipRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+void drawBackgroundInClipRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
callSuper(id, sel, rect);
}
-void drawImageWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ image, NSRect rect, int /*long*/ view) {
+void drawImageWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ image, NSRect rect, long /*int*/ view) {
callSuper(id, sel, image, rect, view);
}
-NSRect drawTitleWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ title, NSRect rect, int /*long*/ view) {
+NSRect drawTitleWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ title, NSRect rect, long /*int*/ view) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -704,26 +704,26 @@ NSRect drawTitleWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/
return result;
}
-void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cellFrame, int /*long*/ view) {
+void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
callSuper(id, sel, cellFrame, view);
}
-void drawLabelInRect(int /*long*/ id, int /*long*/ sel, boolean shouldTruncateLabel, NSRect rect) {
+void drawLabelInRect(long /*int*/ id, long /*int*/ sel, boolean shouldTruncateLabel, NSRect rect) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, shouldTruncateLabel, rect);
}
-void drawViewBackgroundInRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+void drawViewBackgroundInRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
callSuper(id, sel, rect);
}
-void drawWithExpansionFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cellFrame, int /*long*/ view) {
+void drawWithExpansionFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
callSuper(id, sel, cellFrame, view);
}
-void drawRect (int /*long*/ id, int /*long*/ sel, NSRect rect) {
+void drawRect (long /*int*/ id, long /*int*/ sel, NSRect rect) {
if (!isDrawing()) return;
Display display = this.display;
NSView view = new NSView(id);
@@ -748,17 +748,17 @@ void drawRect (int /*long*/ id, int /*long*/ sel, NSRect rect) {
display.isPainting.removeObjectIdenticalTo(view);
}
-void _drawThemeProgressArea (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void _drawThemeProgressArea (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0);
}
-void drawWidget (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
}
-int /*long*/ imageView () {
+long /*int*/ imageView () {
return 0;
}
@@ -766,7 +766,7 @@ void redrawWidget (NSView view, boolean children) {
view.setNeedsDisplay(true);
}
-void redrawWidget (NSView view, int /*long*/ x, int /*long*/ y, int /*long*/ width, int /*long*/ height, boolean children) {
+void redrawWidget (NSView view, long /*int*/ x, long /*int*/ y, long /*int*/ width, long /*int*/ height, boolean children) {
NSRect rect = new NSRect();
rect.x = x;
rect.y = y;
@@ -779,14 +779,14 @@ void error (int code) {
SWT.error(code);
}
-void expandItem_expandChildren (int /*long*/ id, int /*long*/ sel, int /*long*/ item, boolean children) {
+void expandItem_expandChildren (long /*int*/ id, long /*int*/ sel, long /*int*/ item, boolean children) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, item, children);
}
-NSRect expansionFrameWithFrame_inView(int /*long*/ id, int /*long*/ sel, NSRect cellRect, int /*long*/ view) {
+NSRect expansionFrameWithFrame_inView(long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -799,7 +799,7 @@ boolean filters (int eventType) {
return display.filters (eventType);
}
-NSRect firstRectForCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+NSRect firstRectForCharacterRange(long /*int*/ id, long /*int*/ sel, long /*int*/ range) {
return new NSRect ();
}
@@ -967,28 +967,28 @@ public int getStyle () {
return style;
}
-boolean hasMarkedText (int /*long*/ id, int /*long*/ sel) {
+boolean hasMarkedText (long /*int*/ id, long /*int*/ sel) {
return false;
}
-NSRect headerRectOfColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ column) {
+NSRect headerRectOfColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ column) {
return callSuperRect(id, sel, column);
}
-void helpRequested(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void helpRequested(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
-void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*/ rect) {
+void highlightSelectionInClipRect(long /*int*/ id, long /*int*/ sel, long /*int*/ rect) {
}
-int /*long*/ hitTest (int /*long*/ id, int /*long*/ sel, NSPoint point) {
+long /*int*/ hitTest (long /*int*/ id, long /*int*/ sel, NSPoint point) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, point);
}
-int /*long*/ hitTestForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event, NSRect rect, int /*long*/ controlView) {
+long /*int*/ hitTestForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event, NSRect rect, long /*int*/ controlView) {
return 0;
}
@@ -997,15 +997,15 @@ boolean hooks (int eventType) {
return eventTable.hooks (eventType);
}
-int /*long*/ image (int /*long*/ id, int /*long*/ sel) {
+long /*int*/ image (long /*int*/ id, long /*int*/ sel) {
return 0;
}
-NSRect imageRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSRect imageRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
return new NSRect();
}
-boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
+boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
callSuper (id, sel, string);
return true;
}
@@ -1033,7 +1033,7 @@ boolean isDrawing () {
return true;
}
-boolean isFlipped(int /*long*/ id, int /*long*/ sel) {
+boolean isFlipped(long /*int*/ id, long /*int*/ sel) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -1061,7 +1061,7 @@ public boolean isListening (int eventType) {
return hooks (eventType);
}
-boolean isOpaque(int /*long*/ id, int /*long*/ sel) {
+boolean isOpaque(long /*int*/ id, long /*int*/ sel) {
return false;
}
@@ -1073,178 +1073,178 @@ boolean isValidThread () {
return getDisplay ().isValidThread ();
}
-void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void flagsChanged (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper (id, sel, theEvent);
}
-void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
superKeyDown(id, sel, theEvent);
}
-void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyUp (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
superKeyUp(id, sel, theEvent);
}
-void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
mouseDownSuper(id, sel, theEvent);
}
-boolean mouseDownCanMoveWindow(int /*long*/ id, int /*long*/ sel) {
+boolean mouseDownCanMoveWindow(long /*int*/ id, long /*int*/ sel) {
return callSuperBoolean(id, sel);
}
-void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void mouseMoved(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseMoved(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void mouseEntered(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseEntered(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void mouseExited(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseExited(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void cursorUpdate(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void cursorUpdate(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void rightMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void rightMouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void otherMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void otherMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-void otherMouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-boolean shouldDelayWindowOrderingForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+boolean shouldDelayWindowOrderingForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, theEvent) != 0;
}
-boolean menuHasKeyEquivalent_forEvent_target_action(int /*long*/ id, int /*long*/ sel, int /*long*/ menu, int /*long*/ event, int /*long*/ target, int /*long*/ action) {
+boolean menuHasKeyEquivalent_forEvent_target_action(long /*int*/ id, long /*int*/ sel, long /*int*/ menu, long /*int*/ event, long /*int*/ target, long /*int*/ action) {
return true;
}
-int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+long /*int*/ menuForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, theEvent);
}
-void menuNeedsUpdate(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+void menuNeedsUpdate(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
}
-boolean makeFirstResponder(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+boolean makeFirstResponder(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
return callSuperBoolean(id, sel, notification);
}
-NSRange markedRange (int /*long*/ id, int /*long*/ sel) {
+NSRange markedRange (long /*int*/ id, long /*int*/ sel) {
return new NSRange ();
}
-void menu_willHighlightItem(int /*long*/ id, int /*long*/ sel, int /*long*/ menu, int /*long*/ item) {
+void menu_willHighlightItem(long /*int*/ id, long /*int*/ sel, long /*int*/ menu, long /*int*/ item) {
}
-void menuDidClose(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+void menuDidClose(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
}
-void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+void menuWillOpen(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
}
-void noResponderFor(int /*long*/ id, int /*long*/ sel, int /*long*/ selector) {
+void noResponderFor(long /*int*/ id, long /*int*/ sel, long /*int*/ selector) {
callSuper(id, sel, selector);
}
-int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) {
+long /*int*/ numberOfRowsInTableView(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView) {
return 0;
}
-int /*long*/ outlineView_child_ofItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ index, int /*long*/ item) {
+long /*int*/ outlineView_child_ofItem(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ index, long /*int*/ item) {
return 0;
}
-void outlineView_didClickTableColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn) {
+void outlineView_didClickTableColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ tableColumn) {
}
-int /*long*/ outlineView_objectValueForTableColumn_byItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn, int /*long*/ item) {
+long /*int*/ outlineView_objectValueForTableColumn_byItem(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ tableColumn, long /*int*/ item) {
return 0;
}
-boolean outlineView_isItemExpandable(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+boolean outlineView_isItemExpandable(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
return false;
}
-int /*long*/ outlineView_numberOfChildrenOfItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+long /*int*/ outlineView_numberOfChildrenOfItem(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
return 0;
}
-boolean outlineView_shouldExpandItem_item(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+boolean outlineView_shouldExpandItem_item(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
return true;
}
-boolean outlineView_shouldReorderColumn_toColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ columnIndex, int /*long*/ newColumnIndex) {
+boolean outlineView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ columnIndex, long /*int*/ newColumnIndex) {
return true;
}
-boolean outlineView_shouldEditTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ item) {
+boolean outlineView_shouldEditTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aTableColumn, long /*int*/ item) {
return false;
}
-boolean outlineView_shouldTrackCell_forTableColumn_item(int /*long*/ id, int /*long*/ sel, int /*long*/ table, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ item) {
+boolean outlineView_shouldTrackCell_forTableColumn_item(long /*int*/ id, long /*int*/ sel, long /*int*/ table, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ item) {
return true;
}
-void outlineView_willDisplayCell_forTableColumn_item(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ item) {
+void outlineView_willDisplayCell_forTableColumn_item(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ item) {
}
-void outlineViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void outlineViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
}
-void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void outlineViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
}
-void outlineViewSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void outlineViewSelectionDidChange(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-void outlineViewSelectionIsChanging(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void outlineViewSelectionIsChanging(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-void outlineView_setObjectValue_forTableColumn_byItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ object, int /*long*/ tableColumn, int /*long*/ item) {
+void outlineView_setObjectValue_forTableColumn_byItem(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ object, long /*int*/ tableColumn, long /*int*/ item) {
}
-boolean outlineView_writeItems_toPasteboard(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
+boolean outlineView_writeItems_toPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
return false;
}
@@ -1275,11 +1275,11 @@ public void notifyListeners (int eventType, Event event) {
sendEvent (eventType, event);
}
-void pageDown (int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void pageDown (long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
callSuper(id, sel, sender);
}
-void pageUp (int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void pageUp (long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
callSuper(id, sel, sender);
}
@@ -1291,7 +1291,7 @@ void postEvent (int eventType, Event event) {
sendEvent (eventType, event, false);
}
-void reflectScrolledClipView (int /*long*/ id, int /*long*/ sel, int /*long*/ aClipView) {
+void reflectScrolledClipView (long /*int*/ id, long /*int*/ sel, long /*int*/ aClipView) {
callSuper (id, sel, aClipView);
}
@@ -1425,33 +1425,33 @@ public void removeDisposeListener (DisposeListener listener) {
eventTable.unhook (SWT.Dispose, listener);
}
-void scrollClipViewToPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ clipView, NSPoint point) {
+void scrollClipViewToPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ clipView, NSPoint point) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, clipView, point);
}
-void selectRowIndexes_byExtendingSelection (int /*long*/ id, int /*long*/ sel, int /*long*/ indexes, boolean extend) {
+void selectRowIndexes_byExtendingSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ indexes, boolean extend) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, indexes, extend);
}
-void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void scrollWheel (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper(id, sel, theEvent);
}
-NSRange selectedRange (int /*long*/ id, int /*long*/ sel) {
+NSRange selectedRange (long /*int*/ id, long /*int*/ sel) {
return new NSRange ();
}
-int /*long*/ nextValidKeyView (int /*long*/ id, int /*long*/ sel) {
+long /*int*/ nextValidKeyView (long /*int*/ id, long /*int*/ sel) {
return callSuperObject(id, sel);
}
-int /*long*/ previousValidKeyView (int /*long*/ id, int /*long*/ sel) {
+long /*int*/ previousValidKeyView (long /*int*/ id, long /*int*/ sel) {
return callSuperObject(id, sel);
}
@@ -1653,21 +1653,21 @@ void setOpenGLContext(Object value) {
void setOrientation () {
}
-void setFrameOrigin (int /*long*/ id, int /*long*/ sel, NSPoint point) {
+void setFrameOrigin (long /*int*/ id, long /*int*/ sel, NSPoint point) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, point);
}
-void setFrameSize (int /*long*/ id, int /*long*/ sel, NSSize size) {
+void setFrameSize (long /*int*/ id, long /*int*/ sel, NSSize size) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, size);
}
-void setImage (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void setImage (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
}
boolean setInputState (Event event, NSEvent nsEvent, int type) {
@@ -1675,7 +1675,7 @@ boolean setInputState (Event event, NSEvent nsEvent, int type) {
nsEvent = NSApplication.sharedApplication().currentEvent();
if (nsEvent == null) return true;
}
- int /*long*/ modifierFlags = nsEvent.modifierFlags();
+ long /*int*/ modifierFlags = nsEvent.modifierFlags();
if ((modifierFlags & OS.NSAlternateKeyMask) != 0) event.stateMask |= SWT.ALT;
if ((modifierFlags & OS.NSShiftKeyMask) != 0) event.stateMask |= SWT.SHIFT;
if ((modifierFlags & OS.NSControlKeyMask) != 0) event.stateMask |= SWT.CONTROL;
@@ -1748,15 +1748,15 @@ boolean setKeyState (Event event, int type, NSEvent nsEvent) {
if (chars != null && chars.length() > 0) event.character = (char)chars.characterAtIndex (0);
}
if (event.keyCode == 0) {
- int /*long*/ uchrPtr = 0;
- int /*long*/ currentKbd = OS.TISCopyCurrentKeyboardInputSource();
- int /*long*/ uchrCFData = OS.TISGetInputSourceProperty(currentKbd, OS.kTISPropertyUnicodeKeyLayoutData());
+ long /*int*/ uchrPtr = 0;
+ long /*int*/ currentKbd = OS.TISCopyCurrentKeyboardInputSource();
+ long /*int*/ uchrCFData = OS.TISGetInputSourceProperty(currentKbd, OS.kTISPropertyUnicodeKeyLayoutData());
if (uchrCFData != 0) {
uchrPtr = OS.CFDataGetBytePtr(uchrCFData);
if (uchrPtr != 0 && OS.CFDataGetLength(uchrCFData) > 0) {
- int /*long*/ cgEvent = nsEvent.CGEvent();
+ long /*int*/ cgEvent = nsEvent.CGEvent();
long keyboardType = OS.CGEventGetIntegerValueField(cgEvent, OS.kCGKeyboardEventKeyboardType);
int maxStringLength = 256;
@@ -1825,11 +1825,11 @@ void setLocationMask (Event event, NSEvent nsEvent) {
}
}
-boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ range) {
+boolean setMarkedText_selectedRange (long /*int*/ id, long /*int*/ sel, long /*int*/ string, long /*int*/ range) {
return true;
}
-void setNeedsDisplay (int /*long*/ id, int /*long*/ sel, boolean flag) {
+void setNeedsDisplay (long /*int*/ id, long /*int*/ sel, boolean flag) {
if (flag && !isDrawing()) return;
NSView view = new NSView(id);
if (flag && display.isPainting.containsObject(view)) {
@@ -1847,7 +1847,7 @@ void setNeedsDisplay (int /*long*/ id, int /*long*/ sel, boolean flag) {
OS.objc_msgSendSuper(super_struct, sel, flag);
}
-void setNeedsDisplayInRect (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void setNeedsDisplayInRect (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
if (!isDrawing()) return;
NSRect rect = new NSRect();
OS.memmove(rect, arg0, NSRect.sizeof);
@@ -1868,14 +1868,14 @@ void setNeedsDisplayInRect (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0
OS.objc_msgSendSuper(super_struct, sel, rect);
}
-void setObjectValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void setObjectValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
callSuper(id, sel, arg0);
}
-void setShouldExpandItem(int /*long*/ id, int /*long*/ sel, boolean shouldExpand) {
+void setShouldExpandItem(long /*int*/ id, long /*int*/ sel, boolean shouldExpand) {
}
-void setShouldScrollClipView(int /*long*/ id, int /*long*/ sel, boolean shouldScroll) {
+void setShouldScrollClipView(long /*int*/ id, long /*int*/ sel, boolean shouldScroll) {
}
boolean setTabGroupFocus () {
@@ -1886,11 +1886,11 @@ boolean setTabItemFocus () {
return false;
}
-boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
return true;
}
-NSSize sizeOfLabel(int /*long*/ id, int /*long*/ sel, boolean shouldTruncateLabel) {
+NSSize sizeOfLabel(long /*int*/ id, long /*int*/ sel, boolean shouldTruncateLabel) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -1899,71 +1899,71 @@ NSSize sizeOfLabel(int /*long*/ id, int /*long*/ sel, boolean shouldTruncateLabe
return result;
}
-void superKeyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void superKeyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper (id, sel, theEvent);
}
-void superKeyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void superKeyUp (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
callSuper (id, sel, theEvent);
}
-void tableViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
}
-void tableViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
}
-void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewSelectionDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
}
-void tableViewSelectionIsChanging (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewSelectionIsChanging (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
}
-void tableView_didClickTableColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ tableView, int /*long*/ tableColumn) {
+void tableView_didClickTableColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ tableView, long /*int*/ tableColumn) {
}
-int /*long*/ tableView_objectValueForTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
+long /*int*/ tableView_objectValueForTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
return 0;
}
-boolean tableView_shouldSelectRow(int /*long*/ id, int /*long*/ sel, int /*long*/ tableView, int /*long*/ index) {
+boolean tableView_shouldSelectRow(long /*int*/ id, long /*int*/ sel, long /*int*/ tableView, long /*int*/ index) {
return true;
}
-void tableView_setObjectValue_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ anObject, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
+void tableView_setObjectValue_forTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ anObject, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
}
-boolean tableView_shouldReorderColumn_toColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ columnIndex, int /*long*/ newColumnIndex) {
+boolean tableView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ columnIndex, long /*int*/ newColumnIndex) {
return true;
}
-boolean tableView_shouldEditTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
+boolean tableView_shouldEditTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
return false;
}
-boolean tableView_shouldTrackCell_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ table, int /*long*/ cell, /*long*/ int /*long*/ tableColumn, int /*long*/ rowIndex) {
+boolean tableView_shouldTrackCell_forTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ table, long /*int*/ cell, /*long*/ long /*int*/ tableColumn, long /*int*/ rowIndex) {
return true;
}
-void tableView_willDisplayCell_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aCell, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
+void tableView_willDisplayCell_forTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aCell, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
}
-void textViewDidChangeSelection(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textViewDidChangeSelection(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
}
-void textDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textDidChange(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
callSuper (id, sel, aNotification);
}
-void textDidEndEditing(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textDidEndEditing(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
callSuper(id, sel, aNotification);
}
-NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) {
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(long /*int*/ id, long /*int*/ sel, long /*int*/ aTextView, long /*int*/ oldSelectedCharRange, long /*int*/ newSelectedCharRange) {
return new NSRange();
}
-NSRect titleRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSRect titleRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -1972,19 +1972,19 @@ NSRect titleRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame)
return result;
}
-int /*long*/ toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar, int /*long*/ itemID, boolean flag) {
+long /*int*/ toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar, long /*int*/ itemID, boolean flag) {
return 0;
}
-int /*long*/ toolbarAllowedItemIdentifiers(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar) {
+long /*int*/ toolbarAllowedItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
return 0;
}
-int /*long*/ toolbarDefaultItemIdentifiers(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar) {
+long /*int*/ toolbarDefaultItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
return 0;
}
-int /*long*/ toolbarSelectableItemIdentifiers(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar) {
+long /*int*/ toolbarSelectableItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
return 0;
}
String tooltipText () {
@@ -2006,127 +2006,127 @@ public String toString () {
return getName () + " {" + string + "}";
}
-void touchesBeganWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void touchesBeganWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
callSuper(id, sel, event);
}
-void touchesCancelledWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void touchesCancelledWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
callSuper(id, sel, event);
}
-void touchesEndedWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void touchesEndedWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
callSuper(id, sel, event);
}
-void touchesMovedWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void touchesMovedWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
callSuper(id, sel, event);
}
-void beginGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void beginGestureWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
callSuper(id, sel, event);
}
-void endGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void endGestureWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
callSuper(id, sel, event);
}
-void magnifyWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void magnifyWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
callSuper(id, sel, event);
}
-void rotateWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void rotateWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
callSuper(id, sel, event);
}
-void swipeWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void swipeWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
callSuper(id, sel, event);
}
-void resetCursorRects (int /*long*/ id, int /*long*/ sel) {
+void resetCursorRects (long /*int*/ id, long /*int*/ sel) {
callSuper (id, sel);
}
-void updateTrackingAreas (int /*long*/ id, int /*long*/ sel) {
+void updateTrackingAreas (long /*int*/ id, long /*int*/ sel) {
callSuper (id, sel);
}
-int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) {
+long /*int*/ validAttributesForMarkedText (long /*int*/ id, long /*int*/ sel) {
return 0;
}
-void tabView_didSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) {
+void tabView_didSelectTabViewItem(long /*int*/ id, long /*int*/ sel, long /*int*/ tabView, long /*int*/ tabViewItem) {
}
-void tabView_willSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) {
+void tabView_willSelectTabViewItem(long /*int*/ id, long /*int*/ sel, long /*int*/ tabView, long /*int*/ tabViewItem) {
}
-boolean tableView_writeRowsWithIndexes_toPasteboard(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
+boolean tableView_writeRowsWithIndexes_toPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
return false;
}
-boolean validateMenuItem(int /*long*/ id, int /*long*/ sel, int /*long*/ menuItem) {
+boolean validateMenuItem(long /*int*/ id, long /*int*/ sel, long /*int*/ menuItem) {
return true;
}
-int /*long*/ view_stringForToolTip_point_userData (int /*long*/ id, int /*long*/ sel, int /*long*/ view, int /*long*/ tag, int /*long*/ point, int /*long*/ userData) {
+long /*int*/ view_stringForToolTip_point_userData (long /*int*/ id, long /*int*/ sel, long /*int*/ view, long /*int*/ tag, long /*int*/ point, long /*int*/ userData) {
return 0;
}
-void viewDidMoveToWindow(int /*long*/ id, int /*long*/ sel) {
+void viewDidMoveToWindow(long /*int*/ id, long /*int*/ sel) {
}
-void viewWillMoveToWindow(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void viewWillMoveToWindow(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
}
-void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidMove(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidResize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-void windowDidResignKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidResignKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidBecomeKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-void windowDidMiniturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidMiniturize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-void windowDidDeminiturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidDeminiturize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-void windowSendEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void windowSendEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
callSuper(id, sel, event);
}
-boolean windowShouldClose(int /*long*/ id, int /*long*/ sel, int /*long*/ window) {
+boolean windowShouldClose(long /*int*/ id, long /*int*/ sel, long /*int*/ window) {
return false;
}
-void windowWillClose(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowWillClose(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-int /*long*/ nextState(int /*long*/ id, int /*long*/ sel) {
+long /*int*/ nextState(long /*int*/ id, long /*int*/ sel) {
return callSuperObject(id, sel);
}
-void updateOpenGLContext(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void updateOpenGLContext(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
}
-boolean shouldDrawInsertionPoint(int /*long*/ id, int /*long*/ sel) {
+boolean shouldDrawInsertionPoint(long /*int*/ id, long /*int*/ sel) {
return callSuperBoolean(id, sel);
}
-boolean readSelectionFromPasteboard(int /*long*/ id, int /*long*/ sel, int /*long*/ pasteboard) {
+boolean readSelectionFromPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ pasteboard) {
return false;
}
-int /*long*/ validRequestorForSendType(int /*long*/ id, int /*long*/ sel, int /*long*/ sendType, int /*long*/ returnType) {
+long /*int*/ validRequestorForSendType(long /*int*/ id, long /*int*/ sel, long /*int*/ sendType, long /*int*/ returnType) {
return callSuperObject(id, sel, sendType, returnType);
}
-boolean writeSelectionToPasteboard(int /*long*/ id, int /*long*/ sel, int /*long*/ pasteboard, int /*long*/ types) {
+boolean writeSelectionToPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ pasteboard, long /*int*/ types) {
return false;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Drawable.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Drawable.java
index 141268b017..3bb7650ffa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Drawable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Drawable.java
@@ -45,7 +45,7 @@ public interface Drawable {
* @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);
/**
* Invokes platform specific functionality to dispose a GC handle.
@@ -62,6 +62,6 @@ 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*/ handle, GCData data);
+public void internal_dispose_GC (long /*int*/ handle, GCData data);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Callback.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Callback.java
index ce73d17e0e..086bf2e8bd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Callback.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Callback.java
@@ -28,7 +28,7 @@ public class Callback {
Object object;
String method, signature;
int argCount;
- int /*long*/ address, errorResult;
+ long /*int*/ address, errorResult;
boolean isStatic, isArrayBased;
static final String PTR_SIGNATURE = C.PTR_SIZEOF == 4 ? "I" : "J"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -88,7 +88,7 @@ public Callback (Object object, String method, int argCount, boolean isArrayBase
* @param isArrayBased <code>true</code> if the arguments should be passed in an array and false otherwise
* @param errorResult the return value if the java code throws an exception
*/
-public Callback (Object object, String method, int argCount, boolean isArrayBased, int /*long*/ errorResult) {
+public Callback (Object object, String method, int argCount, boolean isArrayBased, long /*int*/ errorResult) {
/* Set the callback fields */
this.object = object;
@@ -131,7 +131,7 @@ public Callback (Object object, String method, int argCount, boolean isArrayBase
* @param isArrayBased whether the callback's method is array based
* @param errorResult the callback's error result
*/
-static native synchronized int /*long*/ bind (Callback callback, Object object, String method, String signature, int argCount, boolean isStatic, boolean isArrayBased, int /*long*/ errorResult);
+static native synchronized long /*int*/ bind (Callback callback, Object object, String method, String signature, int argCount, boolean isStatic, boolean isArrayBased, long /*int*/ errorResult);
/**
* Releases the native level resources associated with the callback,
@@ -152,7 +152,7 @@ public void dispose () {
*
* @return the callback address
*/
-public int /*long*/ getAddress () {
+public long /*int*/ getAddress () {
return address;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java
index f22948a087..1ea2c09e07 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java
@@ -22,7 +22,7 @@ import org.eclipse.swt.graphics.*;
* @since 3.0
*/
public final class Monitor {
- int /*long*/ handle;
+ long /*int*/ handle;
int x, y, width, height;
int clientX, clientY, clientWidth, clientHeight;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TouchSource.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TouchSource.java
index 7caf92ab4f..101ba27a63 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TouchSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TouchSource.java
@@ -38,7 +38,7 @@ import org.eclipse.swt.graphics.*;
* @since 3.7
*/
public final class TouchSource {
- int /*long*/ handle;
+ long /*int*/ handle;
boolean direct;
Rectangle bounds;
@@ -49,7 +49,7 @@ public final class TouchSource {
* @param height height of the source in pixels.
* @param width width of the source in pixels.
*/
-TouchSource (int /*long*/ handle, boolean direct, Rectangle bounds) {
+TouchSource (long /*int*/ handle, boolean direct, Rectangle bounds) {
this.handle = handle;
this.direct = direct;
this.bounds = bounds;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/bidi/org/eclipse/swt/internal/BidiUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/bidi/org/eclipse/swt/internal/BidiUtil.java
index b46c26361d..d39ac6c505 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/bidi/org/eclipse/swt/internal/BidiUtil.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/bidi/org/eclipse/swt/internal/BidiUtil.java
@@ -42,7 +42,7 @@ public class BidiUtil {
/*
* Not implemented.
*/
-public static void addLanguageListener(int /*long*/ hwnd, Runnable runnable) {
+public static void addLanguageListener(long /*int*/ hwnd, Runnable runnable) {
}
public static void addLanguageListener (Control control, Runnable runnable) {
}
@@ -93,7 +93,7 @@ public static int getKeyboardLanguage() {
/*
* Not implemented.
*/
-public static void removeLanguageListener(int /*long*/ hwnd) {
+public static void removeLanguageListener(long /*int*/ hwnd) {
}
public static void removeLanguageListener (Control control) {
}
@@ -105,7 +105,7 @@ public static void setKeyboardLanguage(int language) {
/*
* Not implemented.
*/
-public static boolean setOrientation(int /*long*/ hwnd, int orientation) {
+public static boolean setOrientation(long /*int*/ hwnd, int orientation) {
return false;
}
public static boolean setOrientation (Control control, int orientation) {
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);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java
index 83924037e1..0c33809ff6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java
@@ -205,7 +205,7 @@ void checkCairo() {
try {
/* Check if cairo is available on the system */
byte[] buffer = Converter.wcsToMbcs(null, "libcairo.so.2", true);
- int /*long*/ libcairo = OS.dlopen(buffer, OS.RTLD_LAZY);
+ long /*int*/ libcairo = OS.dlopen(buffer, OS.RTLD_LAZY);
if (libcairo != 0) {
OS.dlclose(libcairo);
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
index a49e46975d..772a4fe91f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
@@ -183,7 +183,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) {
XColor color;
@@ -346,7 +346,7 @@ void checkGC (int mask) {
}
}
int convertRgn(int rgn, double[] matrix) {
- int /*long*/ newRgn = OS.XCreateRegion();
+ long /*int*/ newRgn = OS.XCreateRegion();
//TODO - get rectangles from region instead of clip box
XRectangle rect = new XRectangle();
OS.XClipBox(rgn, rect);
@@ -372,7 +372,7 @@ int convertRgn(int rgn, double[] matrix) {
Cairo.cairo_matrix_transform_point(matrix, x, y);
pointArray[6] = (short)x[0];
pointArray[7] = (short)Math.round(y[0]);
- int /*long*/ polyRgn = OS.XPolygonRegion(pointArray, pointArray.length / 2, OS.EvenOddRule);
+ long /*int*/ polyRgn = OS.XPolygonRegion(pointArray, pointArray.length / 2, OS.EvenOddRule);
OS.XUnionRegion(newRgn, polyRgn, newRgn);
OS.XDestroyRegion(polyRgn);
return newRgn;
@@ -475,7 +475,7 @@ public void copyArea(Image image, int x, int y) {
OS.XFreeGC(xDisplay, xGC);
}
void destroy() {
- int /*long*/ cairo = data.cairo;
+ long /*int*/ cairo = data.cairo;
if (cairo != 0) Cairo.cairo_destroy(cairo);
data.cairo = 0;
@@ -550,7 +550,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) {
@@ -722,7 +722,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();
@@ -740,7 +740,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) {
/*
@@ -759,8 +759,8 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
* the image that was created or the edges are still faded.
*/
if (Cairo.cairo_version () >= Cairo.CAIRO_VERSION_ENCODE(1, 4, 2)) {
- 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);
@@ -783,7 +783,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);
@@ -1151,7 +1151,7 @@ static int scalePixmap(int display, int pixmap, int srcX, int srcY, int srcWidth
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);
@@ -1193,7 +1193,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) {
@@ -1239,11 +1239,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);
@@ -1270,7 +1270,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);
@@ -1299,7 +1299,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);
@@ -1365,7 +1365,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);
@@ -1377,7 +1377,7 @@ public void drawPolyline(int[] pointArray) {
}
OS.XDrawLines(data.display,data.drawable,handle,xPoints,xPoints.length / 2, OS.CoordModeOrigin);
}
-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;
@@ -1413,7 +1413,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);
@@ -1482,7 +1482,7 @@ public void drawRoundRectangle (int x, int y, int width, int height, int arcWidt
}
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) {
@@ -1582,7 +1582,7 @@ public void drawString (String string, int x, int y, boolean isTransparent) {
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) {
//TODO - honor isTransparent
checkGC(FOREGROUND | FONT);
@@ -1735,7 +1735,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) {
//TODO - honor flags
checkGC(FOREGROUND | FONT);
@@ -1824,7 +1824,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) {
@@ -1916,9 +1916,9 @@ public void fillGradientRectangle(int x, int y, int width, int height, boolean v
// this is not always the case.
//final boolean directColor = (visual.c_class == OS.TrueColor) || (visual.c_class == OS.DirectColor);
- 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 {
@@ -1990,7 +1990,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);
@@ -2035,8 +2035,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);
@@ -2065,7 +2065,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);
@@ -2103,7 +2103,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);
@@ -2166,7 +2166,7 @@ public void fillRoundRectangle (int x, int y, int width, int height, int arcWidt
}
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);
@@ -2742,7 +2742,7 @@ public void getClipping(Region region) {
if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
int clipping = region.handle;
OS.XSubtractRegion (clipping, clipping, clipping);
- int /*long*/ cairo = data.cairo;
+ long /*int*/ cairo = data.cairo;
int clipRgn = data.clipRgn;
if (clipRgn == 0) {
int[] width = new int[1], height = new int[1], unused = new int[1];
@@ -3276,7 +3276,7 @@ public int getStyle () {
public int getTextAntialias() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (data.cairo == 0) return SWT.DEFAULT;
- int /*long*/ options = Cairo.cairo_font_options_create();
+ long /*int*/ options = Cairo.cairo_font_options_create();
Cairo.cairo_get_font_options(data.cairo, options);
int antialias = Cairo.cairo_font_options_get_antialias(options);
Cairo.cairo_font_options_destroy(options);
@@ -3310,7 +3310,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);
} else {
@@ -3374,14 +3374,14 @@ void init(Drawable drawable, GCData data, int xGC) {
}
void initCairo() {
data.device.checkCairo();
- int /*long*/ cairo = data.cairo;
+ long /*int*/ cairo = data.cairo;
if (cairo != 0) return;
int xDisplay = data.display;
int xDrawable = data.drawable;
int xVisual = OS.XDefaultVisual(xDisplay, OS.XDefaultScreen(xDisplay));
int[] width = new int[1], height = new int[1], unused = new int[1];
OS.XGetGeometry(xDisplay, xDrawable, unused, unused, unused, width, height, unused, unused);
- int /*long*/ surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width[0], height[0]);
+ long /*int*/ surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width[0], height[0]);
if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
data.cairo = cairo = Cairo.cairo_create(surface);
Cairo.cairo_surface_destroy(surface);
@@ -3475,7 +3475,7 @@ public void setAdvanced(boolean advanced) {
initCairo();
} catch (SWTException e) {}
} else {
- int /*long*/ cairo = data.cairo;
+ long /*int*/ cairo = data.cairo;
if (cairo != 0) Cairo.cairo_destroy(cairo);
data.cairo = 0;
data.interpolation = SWT.DEFAULT;
@@ -3552,7 +3552,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);
}
/**
@@ -3659,7 +3659,7 @@ public void setBackgroundPattern(Pattern pattern) {
data.backgroundPattern = pattern;
data.state &= ~BACKGROUND;
}
-static void setCairoFont(int /*long*/ cairo, Font font) {
+static void setCairoFont(long /*int*/ cairo, Font font) {
//TODO - use X font instead of loading new one???
FontData[] fds = font.getFontData();
FontData fd = fds[0];
@@ -3675,13 +3675,13 @@ static void setCairoFont(int /*long*/ cairo, Font font) {
Cairo.cairo_select_font_face(cairo, buffer, slant, weight);
Cairo.cairo_set_font_size(cairo, fd.getHeight());
}
-static void setCairoRegion(int /*long*/ cairo, int /*long*/ rgn) {
+static void setCairoRegion(long /*int*/ cairo, long /*int*/ rgn) {
//TODO - get rectangles from region instead of clip box
XRectangle rect = new XRectangle();
OS.XClipBox(rgn, rect);
Cairo.cairo_rectangle(cairo, rect.x, rect.y, rect.width, rect.height);
}
-static void setCairoPatternColor(int /*long*/ pattern, int offset, Color c, int alpha) {
+static void setCairoPatternColor(long /*int*/ pattern, int offset, Color c, int alpha) {
XColor color = c.handle;
double aa = (alpha & 0xFF) / (double)0xFF;
double red = ((color.red & 0xFFFF) / (double)0xFFFF);
@@ -3689,8 +3689,8 @@ static void setCairoPatternColor(int /*long*/ pattern, int offset, Color c, int
double blue = ((color.blue & 0xFFFF) / (double)0xFFFF);
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;
Cairo.cairo_reset_clip(cairo);
if (damageRgn != 0) {
double[] matrix = new double[6];
@@ -3706,7 +3706,7 @@ void setCairoClip(int /*long*/ damageRgn, int /*long*/ clipRgn) {
}
}
void setClipping(int clipRgn) {
- int /*long*/ cairo = data.cairo;
+ long /*int*/ cairo = data.cairo;
if (clipRgn == 0) {
if (data.clipRgn != 0) {
OS.XDestroyRegion (data.clipRgn);
@@ -3808,8 +3808,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);
@@ -3887,7 +3887,7 @@ public void setFillRule(int rule) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
OS.XSetFillRule(data.display, handle, mode);
- int /*long*/ cairo = data.cairo;
+ long /*int*/ cairo = data.cairo;
if (cairo != 0) {
Cairo.cairo_set_fill_rule(cairo, cairo_mode);
}
@@ -4364,7 +4364,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);
Cairo.cairo_set_font_options(data.cairo, options);
Cairo.cairo_font_options_destroy(options);
@@ -4400,7 +4400,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;
if (transform != null) {
Cairo.cairo_set_matrix(cairo, transform.handle);
} else {
@@ -4455,7 +4455,7 @@ public void setXORMode(boolean xor) {
public Point stringExtent(String string) {
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) {
checkGC(FONT);
byte[] buffer = Converter.wcsToMbcs(null, string, true);
@@ -4536,7 +4536,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) {
//TODO - honor flags
checkGC(FONT);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GCData.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GCData.java
index 8d6836cd9a..6785780cc7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GCData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GCData.java
@@ -52,7 +52,7 @@ public final class GCData {
public Image image;
public int display;
public int drawable;
- public int /*long*/ cairo;
+ public long /*int*/ cairo;
public double cairoXoffset, cairoYoffset;
public double[] clippingTransform;
public String string;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java
index 340d524787..231f5bb4c1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java
@@ -109,7 +109,7 @@ public final class Image extends Resource implements Drawable {
*/
public int mask;
- int /*long*/ surface;
+ long /*int*/ surface;
/**
* specifies the transparent pixel
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
index 71d6ef020e..03575a4497 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
@@ -337,7 +337,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) {
@@ -354,9 +354,9 @@ public void drawBackground (GC gc, int x, int y, int width, int height, int offs
int xDrawable = control.backgroundImage.pixmap;
int [] unused = new int [1]; int [] w = new int [1]; int [] h = new int [1];
OS.XGetGeometry (xDisplay, xDrawable, unused, unused, unused, w, h, unused, unused);
- int /*long*/ surface = Cairo.cairo_xlib_surface_create (xDisplay, xDrawable, xVisual, w [0], h [0]);
+ long /*int*/ surface = Cairo.cairo_xlib_surface_create (xDisplay, xDrawable, xVisual, w [0], h [0]);
if (surface == 0) error (SWT.ERROR_NO_HANDLES);
- 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);
Cairo.cairo_set_source (cairo, pattern);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java
index d1c6a09805..25bf06620b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java
@@ -121,7 +121,7 @@ void destroy() {
* If the reference count reaches 0, the slot may
* be reused when another color is allocated.
*/
- int /*long*/ hPal = device.hPalette;
+ long /*int*/ hPal = device.hPalette;
if (hPal != 0) {
int index = OS.GetNearestPaletteIndex(hPal, handle);
int[] colorRefCount = device.colorRefCount;
@@ -241,7 +241,7 @@ void init(int red, int green, int blue) {
handle = (red & 0xFF) | ((green & 0xFF) << 8) | ((blue & 0xFF) << 16);
/* If this is not a palette-based device, return */
- int /*long*/ hPal = device.hPalette;
+ long /*int*/ hPal = device.hPalette;
if (hPal == 0) return;
int[] colorRefCount = device.colorRefCount;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
index 2f064a3e22..062a9f39d1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
@@ -56,7 +56,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;
boolean isIcon;
@@ -192,7 +192,7 @@ Cursor(Device device) {
*/
public Cursor(Device device, int style) {
super(device);
- int /*long*/ lpCursorName = 0;
+ long /*int*/ lpCursorName = 0;
switch (style) {
case SWT.CURSOR_HAND: lpCursorName = OS.IDC_HAND; break;
case SWT.CURSOR_ARROW: lpCursorName = OS.IDC_ARROW; break;
@@ -228,7 +228,7 @@ public Cursor(Device device, int style) {
int width = OS.GetSystemMetrics(OS.SM_CXCURSOR);
int height = OS.GetSystemMetrics(OS.SM_CYCURSOR);
if (width == 32 && height == 32) {
- int /*long*/ hInst = OS.GetModuleHandle(null);
+ long /*int*/ hInst = OS.GetModuleHandle(null);
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
handle = OS.CreateCursor(hInst, 5, 0, 32, 32, HAND_SOURCE, HAND_MASK);
@@ -296,7 +296,7 @@ public Cursor(Device device, ImageData source, ImageData mask, int hotspotX, int
byte[] maskData = ImageData.convertPad(mask.data, mask.width, mask.height, mask.depth, mask.scanlinePad, 2);
/* Create the cursor */
- int /*long*/ hInst = OS.GetModuleHandle(null);
+ long /*int*/ hInst = OS.GetModuleHandle(null);
if (OS.IsWinCE) SWT.error (SWT.ERROR_NOT_IMPLEMENTED);
handle = OS.CreateCursor(hInst, hotspotX, hotspotY, source.width, source.height, sourceData, maskData);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -338,8 +338,8 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
hotspotY >= source.height || hotspotY < 0) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- int /*long*/ hBitmap = 0;
- int /*long*/ hMask = 0;
+ long /*int*/ hBitmap = 0;
+ long /*int*/ hMask = 0;
if (source.maskData == null && source.transparentPixel == -1 && (source.alpha != -1 || source.alphaData != null)) {
PaletteData palette = source.palette;
PaletteData newPalette = new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
@@ -388,7 +388,7 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
if (hMask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
} else {
ImageData mask = source.getTransparencyMask();
- int /*long*/ [] result = Image.init(this.device, null, source, mask);
+ long /*int*/ [] result = Image.init(this.device, null, source, mask);
hBitmap = result[0];
hMask = result[1];
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
index a885a9d07c..f8df00e229 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
@@ -46,7 +46,7 @@ public abstract class Device implements Drawable {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ hPalette = 0;
+ public long /*int*/ hPalette = 0;
int [] colorRefCount;
/* System Font */
@@ -59,11 +59,11 @@ public abstract class Device implements Drawable {
int[] pixels;
/* Scripts */
- int /*long*/ [] scripts;
+ long /*int*/ [] scripts;
/* Advanced Graphics */
- int /*long*/ [] gdipToken;
- int /*long*/ fontCollection;
+ long /*int*/ [] gdipToken;
+ long /*int*/ fontCollection;
String[] loadedFonts;
boolean disposed;
@@ -186,7 +186,7 @@ void checkGDIP() {
int oldErrorMode = 0;
if (!OS.IsWinCE) oldErrorMode = OS.SetErrorMode (OS.SEM_FAILCRITICALERRORS);
try {
- int /*long*/ [] token = new int /*long*/ [1];
+ long /*int*/ [] token = new long /*int*/ [1];
GdiplusStartupInput input = new GdiplusStartupInput ();
input.GdiplusVersion = 1;
if (Gdip.GdiplusStartup (token, input, 0) == 0) {
@@ -231,14 +231,14 @@ protected void create (DeviceData data) {
}
int computePixels(float height) {
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
int pixels = -(int)(0.5f + (height * OS.GetDeviceCaps(hDC, OS.LOGPIXELSY) / 72f));
internal_dispose_GC (hDC, null);
return pixels;
}
-float computePoints(LOGFONT logFont, int /*long*/ hFont) {
- int /*long*/ hDC = internal_new_GC (null);
+float computePoints(LOGFONT logFont, long /*int*/ hFont) {
+ long /*int*/ hDC = internal_new_GC (null);
int logPixelsY = OS.GetDeviceCaps(hDC, OS.LOGPIXELSY);
int pixels = 0;
if (logFont.lfHeight > 0) {
@@ -249,7 +249,7 @@ float computePoints(LOGFONT logFont, int /*long*/ hFont) {
* height of a font in points does not include the internal leading,
* we must subtract the internal leading, which requires a TEXTMETRIC.
*/
- int /*long*/ oldFont = OS.SelectObject(hDC, hFont);
+ long /*int*/ oldFont = OS.SelectObject(hDC, hFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
OS.GetTextMetrics(hDC, lptm);
OS.SelectObject(hDC, oldFont);
@@ -318,7 +318,7 @@ void dispose_Object (Object object) {
}
}
-int /*long*/ EnumFontFamProc (int /*long*/ lpelfe, int /*long*/ lpntme, int /*long*/ FontType, int /*long*/ lParam) {
+long /*int*/ EnumFontFamProc (long /*int*/ lpelfe, long /*int*/ lpntme, long /*int*/ FontType, long /*int*/ lParam) {
boolean isScalable = ((int)/*64*/FontType & OS.RASTER_FONTTYPE) == 0;
boolean scalable = lParam == 1;
if (isScalable == scalable) {
@@ -365,7 +365,7 @@ int /*long*/ EnumFontFamProc (int /*long*/ lpelfe, int /*long*/ lpntme, int /*lo
*/
public Rectangle getBounds () {
checkDevice ();
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
int width = OS.GetDeviceCaps (hDC, OS.HORZRES);
int height = OS.GetDeviceCaps (hDC, OS.VERTRES);
internal_dispose_GC (hDC, null);
@@ -444,7 +444,7 @@ public Rectangle getClientArea () {
*/
public int getDepth () {
checkDevice ();
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
internal_dispose_GC (hDC, null);
@@ -464,7 +464,7 @@ public int getDepth () {
*/
public Point getDPI () {
checkDevice ();
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
int dpiX = OS.GetDeviceCaps (hDC, OS.LOGPIXELSX);
int dpiY = OS.GetDeviceCaps (hDC, OS.LOGPIXELSY);
internal_dispose_GC (hDC, null);
@@ -489,7 +489,7 @@ public FontData [] getFontList (String faceName, boolean scalable) {
/* Create the callback */
Callback callback = new Callback (this, "EnumFontFamProc", 4); //$NON-NLS-1$
- int /*long*/ lpEnumFontFamProc = callback.getAddress ();
+ long /*int*/ lpEnumFontFamProc = callback.getAddress ();
if (lpEnumFontFamProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
/* Initialize the instance variables */
@@ -503,7 +503,7 @@ public FontData [] getFontList (String faceName, boolean scalable) {
/* Enumerate */
int offset = 0;
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
if (faceName == null) {
/* The user did not specify a face name, so they want all versions of all available face names */
OS.EnumFontFamilies (hDC, null, lpEnumFontFamProc, scalable ? 1 : 0);
@@ -574,7 +574,7 @@ String getLastError () {
String getLastErrorText () {
int error = OS.GetLastError();
if (error == 0) return ""; //$NON-NLS-1$
- int /*long*/ [] buffer = new int /*long*/ [1];
+ long /*int*/ [] buffer = new long /*int*/ [1];
int dwFlags = OS.FORMAT_MESSAGE_ALLOCATE_BUFFER | OS.FORMAT_MESSAGE_FROM_SYSTEM | OS.FORMAT_MESSAGE_IGNORE_INSERTS;
int length = OS.FormatMessage(dwFlags, 0, error, OS.LANG_USER_DEFAULT, buffer, 0, 0);
if (length == 0) return " [GetLastError=0x" + Integer.toHexString(error) + "]"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -648,7 +648,7 @@ public Color getSystemColor (int id) {
*/
public Font getSystemFont () {
checkDevice ();
- int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
return Font.win32_new (this, hFont);
}
@@ -690,10 +690,10 @@ protected void init () {
/* Initialize scripts list */
if (!OS.IsWinCE) {
- int /*long*/ [] ppSp = new int /*long*/ [1];
+ long /*int*/ [] ppSp = new long /*int*/ [1];
int [] piNumScripts = new int [1];
OS.ScriptGetProperties (ppSp, piNumScripts);
- scripts = new int /*long*/ [piNumScripts [0]];
+ scripts = new long /*int*/ [piNumScripts [0]];
OS.MoveMemory (scripts, ppSp [0], scripts.length * OS.PTR_SIZEOF);
}
@@ -701,7 +701,7 @@ protected void init () {
* If we're not on a device which supports palettes,
* don't create one.
*/
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
int rc = OS.GetDeviceCaps (hDC, OS.RASTERCAPS);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
@@ -775,7 +775,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.
@@ -792,7 +792,7 @@ public abstract int /*long*/ internal_new_GC (GCData data);
*
* @noreference This method is not intended to be referenced by clients.
*/
-public abstract void /*long*/ internal_dispose_GC (int /*long*/ hDC, GCData data);
+public abstract void /*long*/ internal_dispose_GC (long /*int*/ hDC, GCData data);
/**
* Returns <code>true</code> if the device has been disposed,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
index b21356c1d0..816c8df78b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
@@ -45,7 +45,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;
/**
* Prevents uninitialized instances from being created outside the package.
@@ -253,7 +253,7 @@ public String toString () {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Font win32_new(Device device, int /*long*/ handle) {
+public static Font win32_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/win32/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
index 31c12847b7..a39509ee91 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
@@ -321,7 +321,7 @@ public boolean equals (Object object) {
getName().equals(fd.getName());
}
-int /*long*/ EnumLocalesProc(int /*long*/ lpLocaleString) {
+long /*int*/ EnumLocalesProc(long /*int*/ lpLocaleString) {
/* Get the locale ID */
int length = 8;
@@ -531,7 +531,7 @@ public void setLocale(String locale) {
data.lfCharSet = (byte)OS.DEFAULT_CHARSET;
} else {
Callback callback = new Callback (this, "EnumLocalesProc", 1); //$NON-NLS-1$
- int /*long*/ lpEnumLocalesProc = callback.getAddress ();
+ long /*int*/ lpEnumLocalesProc = callback.getAddress ();
if (lpEnumLocalesProc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumSystemLocales(lpEnumLocalesProc, OS.LCID_SUPPORTED);
callback.dispose ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
index 2a80067e29..b91cf6c166 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
@@ -71,7 +71,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;
@@ -163,7 +163,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*/ hDC = drawable.internal_new_GC(data);
+ long /*int*/ hDC = drawable.internal_new_GC(data);
Device device = data.device;
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
@@ -182,14 +182,14 @@ void checkGC(int mask) {
if ((state & mask) == mask) return;
state = (state ^ mask) & mask;
data.state |= mask;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- int /*long*/ pen = data.gdipPen;
+ long /*int*/ pen = data.gdipPen;
float width = data.lineWidth;
if ((state & FOREGROUND) != 0 || (pen == 0 && (state & (LINE_WIDTH | LINE_STYLE | LINE_MITERLIMIT | LINE_JOIN | LINE_CAP)) != 0)) {
if (data.gdipFgBrush != 0) Gdip.SolidBrush_delete(data.gdipFgBrush);
data.gdipFgBrush = 0;
- int /*long*/ brush;
+ long /*int*/ brush;
Pattern pattern = data.foregroundPattern;
if (pattern != null) {
brush = pattern.handle;
@@ -205,7 +205,7 @@ void checkGC(int mask) {
} else {
int foreground = data.foreground;
int rgb = ((foreground >> 16) & 0xFF) | (foreground & 0xFF00) | ((foreground & 0xFF) << 16);
- int /*long*/ color = Gdip.Color_new(data.alpha << 24 | rgb);
+ long /*int*/ color = Gdip.Color_new(data.alpha << 24 | rgb);
if (color == 0) SWT.error(SWT.ERROR_NO_HANDLES);
brush = Gdip.SolidBrush_new(color);
if (brush == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -285,7 +285,7 @@ void checkGC(int mask) {
if ((data.style & SWT.MIRRORED) != 0) {
switch (Gdip.Brush_GetType(data.gdipBrush)) {
case Gdip.BrushTypeTextureFill:
- int /*long*/ brush = Gdip.Brush_Clone(data.gdipBrush);
+ long /*int*/ brush = Gdip.Brush_Clone(data.gdipBrush);
if (brush == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.TextureBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
data.gdipBrush = data.gdipBgBrush = brush;
@@ -294,9 +294,9 @@ void checkGC(int mask) {
} else {
int background = data.background;
int rgb = ((background >> 16) & 0xFF) | (background & 0xFF00) | ((background & 0xFF) << 16);
- int /*long*/ color = Gdip.Color_new(data.alpha << 24 | rgb);
+ long /*int*/ color = Gdip.Color_new(data.alpha << 24 | rgb);
if (color == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ brush = Gdip.SolidBrush_new(color);
+ long /*int*/ brush = Gdip.SolidBrush_new(color);
if (brush == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Color_delete(color);
data.gdipBrush = data.gdipBgBrush = brush;
@@ -305,8 +305,8 @@ void checkGC(int mask) {
if ((state & FONT) != 0) {
Font font = data.font;
OS.SelectObject(handle, font.handle);
- int /*long*/[] hFont = new int /*long*/[1];
- int /*long*/ gdipFont = createGdipFont(handle, font.handle, gdipGraphics, device.fontCollection, null, hFont);
+ long /*int*/[] hFont = new long /*int*/[1];
+ long /*int*/ gdipFont = createGdipFont(handle, font.handle, gdipGraphics, device.fontCollection, null, hFont);
if (hFont[0] != 0) OS.SelectObject(handle, hFont[0]);
if (data.hGDIFont != 0) OS.DeleteObject(data.hGDIFont);
data.hGDIFont = hFont[0];
@@ -315,7 +315,7 @@ void checkGC(int mask) {
}
if ((state & DRAW_OFFSET) != 0) {
data.gdipXOffset = data.gdipYOffset = 0;
- int /*long*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
PointF point = new PointF();
point.X = point.Y = 1;
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
@@ -379,7 +379,7 @@ void checkGC(int mask) {
* PS_SOLID for pens wider than 1 pixel created with CreatePen(). The fix
* is to use ExtCreatePen() instead.
*/
- int /*long*/ newPen;
+ long /*int*/ newPen;
if (OS.IsWinCE || (width == 0 && lineStyle != OS.PS_USERSTYLE) || style == 0) {
newPen = OS.CreatePen(style & OS.PS_STYLE_MASK, width, color);
} else {
@@ -402,7 +402,7 @@ void checkGC(int mask) {
data.state &= ~PEN;
}
if ((state & BACKGROUND) != 0) {
- int /*long*/ newBrush = OS.CreateSolidBrush(data.background);
+ long /*int*/ newBrush = OS.CreateSolidBrush(data.background);
OS.SelectObject(handle, newBrush);
data.state |= BRUSH;
data.state &= ~NULL_BRUSH;
@@ -450,8 +450,8 @@ public void copyArea(Image image, int x, int y) {
/* Copy the bitmap area */
Rectangle rect = image.getBounds();
- int /*long*/ memHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ hOldBitmap = OS.SelectObject(memHdc, image.handle);
+ long /*int*/ memHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ hOldBitmap = OS.SelectObject(memHdc, image.handle);
OS.BitBlt(memHdc, 0, 0, rect.width, rect.height, handle, x, y, OS.SRCCOPY);
OS.SelectObject(memHdc, hOldBitmap);
OS.DeleteDC(memHdc);
@@ -501,12 +501,12 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
* Feature in WinCE. The function WindowFromDC is not part of the
* WinCE SDK. The fix is to remember the HWND.
*/
- int /*long*/ hwnd = data.hwnd;
+ long /*int*/ hwnd = data.hwnd;
if (hwnd == 0) {
OS.BitBlt(handle, destX, destY, width, height, handle, srcX, srcY, OS.SRCCOPY);
} else {
RECT lprcClip = null;
- int /*long*/ hrgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ hrgn = OS.CreateRectRgn(0, 0, 0, 0);
if (OS.GetClipRgn(handle, hrgn) == 1) {
lprcClip = new RECT();
OS.GetRgnBox(hrgn, lprcClip);
@@ -547,10 +547,10 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
}
}
}
-static int /*long*/ createGdipFont(int /*long*/ hDC, int /*long*/ hFont, int /*long*/ graphics, int /*long*/ fontCollection, int /*long*/ [] outFamily, int /*long*/[] outFont) {
- int /*long*/ font = Gdip.Font_new(hDC, hFont);
+static long /*int*/ createGdipFont(long /*int*/ hDC, long /*int*/ hFont, long /*int*/ graphics, long /*int*/ fontCollection, long /*int*/ [] outFamily, long /*int*/[] outFont) {
+ long /*int*/ font = Gdip.Font_new(hDC, hFont);
if (font == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ family = 0;
+ long /*int*/ family = 0;
if (!Gdip.Font_IsAvailable(font)) {
Gdip.Font_delete(font);
LOGFONT logFont = OS.IsUnicode ? (LOGFONT)new LOGFONTW() : new LOGFONTA();
@@ -595,8 +595,8 @@ static int /*long*/ createGdipFont(int /*long*/ hDC, int /*long*/ hFont, int /*l
font = Gdip.Font_new(buffer, size, style, Gdip.UnitPixel, 0);
}
if (outFont != null && font != 0) {
- int /*long*/ hHeap = OS.GetProcessHeap();
- int /*long*/ pLogFont = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, LOGFONTW.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ pLogFont = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, LOGFONTW.sizeof);
Gdip.Font_GetLogFontW(font, graphics, pLogFont);
outFont[0] = OS.CreateFontIndirectW(pLogFont);
OS.HeapFree(hHeap, 0, pLogFont);
@@ -615,7 +615,7 @@ static int /*long*/ createGdipFont(int /*long*/ hDC, int /*long*/ hFont, int /*l
return font;
}
-static void destroyGdipBrush(int /*long*/ brush) {
+static void destroyGdipBrush(long /*int*/ brush) {
int type = Gdip.Brush_GetType(brush);
switch (type) {
case Gdip.BrushTypeSolidColor:
@@ -666,7 +666,7 @@ void destroy() {
* This will ensure that we have not left a bitmap
* selected in it when we delete the HDC.
*/
- int /*long*/ hNullBitmap = data.hNullBitmap;
+ long /*int*/ hNullBitmap = data.hNullBitmap;
if (hNullBitmap != 0) {
OS.SelectObject(handle, hNullBitmap);
data.hNullBitmap = 0;
@@ -737,15 +737,15 @@ public void drawArc (int x, int y, int width, int height, int startAngle, int ar
height = -height;
}
if (width == 0 || height == 0 || arcAngle == 0) return;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
if (width == height) {
Gdip.Graphics_DrawArc(gdipGraphics, data.gdipPen, x, y, width, height, -startAngle, -arcAngle);
} else {
- int /*long*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
+ long /*int*/ matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.GraphicsPath_AddArc(path, 0, 0, 1, 1, -startAngle, -arcAngle);
Gdip.GraphicsPath_Transform(path, matrix);
@@ -827,13 +827,13 @@ public void drawFocus (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if ((data.uiState & OS.UISF_HIDEFOCUS) != 0) return;
data.focusDrawn = true;
- int /*long*/ hdc = handle;
+ long /*int*/ hdc = handle;
int state = 0;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- int /*long*/ clipRgn = 0;
+ long /*int*/ clipRgn = 0;
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeNone);
- int /*long*/ rgn = Gdip.Region_new();
+ long /*int*/ rgn = Gdip.Region_new();
if (rgn == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetClip(gdipGraphics, rgn);
if (!Gdip.Region_IsInfinite(rgn, gdipGraphics)) {
@@ -842,7 +842,7 @@ public void drawFocus (int x, int y, int width, int height) {
Gdip.Region_delete(rgn);
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
float[] lpXform = null;
- int /*long*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
if (!Gdip.Matrix_IsIdentity(matrix)) {
@@ -946,8 +946,8 @@ public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeig
void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple) {
if (data.gdipGraphics != 0) {
//TODO - cache bitmap
- int /*long*/ [] gdipImage = srcImage.createGdipImage();
- int /*long*/ img = gdipImage[0];
+ long /*int*/ [] gdipImage = srcImage.createGdipImage();
+ long /*int*/ img = gdipImage[0];
int imgWidth = Gdip.Image_GetWidth(img);
int imgHeight = Gdip.Image_GetHeight(img);
if (simple) {
@@ -970,7 +970,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
* Note that if the wrap mode is not WrapModeTileFlipXY, the scaled image
* is translucent around the borders.
*/
- int /*long*/ attrib = Gdip.ImageAttributes_new();
+ long /*int*/ attrib = Gdip.ImageAttributes_new();
Gdip.ImageAttributes_SetWrapMode(attrib, Gdip.WrapModeTileFlipXY);
if (data.alpha != 0xFF) {
float[] matrix = new float[]{
@@ -995,7 +995,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
Gdip.ImageAttributes_delete(attrib);
Gdip.Bitmap_delete(img);
if (gdipImage[1] != 0) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree(hHeap, 0, gdipImage[1]);
}
return;
@@ -1053,7 +1053,7 @@ void drawIcon(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, i
}
/* Get the icon width and height */
- int /*long*/ hBitmap = srcIconInfo.hbmColor;
+ long /*int*/ hBitmap = srcIconInfo.hbmColor;
if (hBitmap == 0) hBitmap = srcIconInfo.hbmMask;
BITMAP bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
@@ -1082,20 +1082,20 @@ void drawIcon(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, i
/* Create the icon info and HDC's */
ICONINFO newIconInfo = new ICONINFO();
newIconInfo.fIcon = true;
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ dstHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ dstHdc = OS.CreateCompatibleDC(handle);
/* Blt the color bitmap */
int srcColorY = srcY;
- int /*long*/ srcColor = srcIconInfo.hbmColor;
+ long /*int*/ srcColor = srcIconInfo.hbmColor;
if (srcColor == 0) {
srcColor = srcIconInfo.hbmMask;
srcColorY += iconHeight;
}
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
newIconInfo.hbmColor = OS.CreateCompatibleBitmap(srcHdc, destWidth, destHeight);
if (newIconInfo.hbmColor == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ oldDestBitmap = OS.SelectObject(dstHdc, newIconInfo.hbmColor);
+ long /*int*/ oldDestBitmap = OS.SelectObject(dstHdc, newIconInfo.hbmColor);
boolean stretch = !simple && (srcWidth != destWidth || srcHeight != destHeight);
if (stretch) {
if (!OS.IsWinCE) OS.SetStretchBltMode(dstHdc, OS.COLORONCOLOR);
@@ -1124,7 +1124,7 @@ void drawIcon(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, i
} else {
OS.SelectObject(srcHdc, oldSrcBitmap);
OS.SelectObject(dstHdc, oldDestBitmap);
- int /*long*/ hIcon = OS.CreateIconIndirect(newIconInfo);
+ long /*int*/ hIcon = OS.CreateIconIndirect(newIconInfo);
if (hIcon == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (offsetX != 0 || offsetY != 0) OS.SetWindowOrgEx(handle, 0, 0, null);
OS.DrawIconEx(handle, destX - offsetX, destY - offsetY, hIcon, destWidth, destHeight, 0, 0, flags);
@@ -1184,7 +1184,7 @@ void drawBitmap(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
drawBitmap(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, bm, imgWidth, imgHeight);
}
if (mustRestore) {
- int /*long*/ hOldBitmap = OS.SelectObject(memGC.handle, srcImage.handle);
+ long /*int*/ hOldBitmap = OS.SelectObject(memGC.handle, srcImage.handle);
memGC.data.hNullBitmap = hOldBitmap;
}
}
@@ -1212,16 +1212,16 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
if (alphaBlendSupport) {
BLENDFUNCTION blend = new BLENDFUNCTION();
blend.BlendOp = OS.AC_SRC_OVER;
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
if (srcImage.alpha != -1) {
blend.SourceConstantAlpha = (byte)srcImage.alpha;
OS.AlphaBlend(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, srcWidth, srcHeight, blend);
} else {
- int /*long*/ memDib = Image.createDIB(srcWidth, srcHeight, 32);
+ long /*int*/ memDib = Image.createDIB(srcWidth, srcHeight, 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ memHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long /*int*/ memHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
OS.BitBlt(memHdc, 0, 0, srcWidth, srcHeight, srcHdc, srcX, srcY, OS.SRCCOPY);
@@ -1283,12 +1283,12 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
srcHeight = Math.max(1, sy2 - sy1);
/* Create resources */
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
- int /*long*/ memHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ memDib = Image.createDIB(Math.max(srcWidth, destWidth), Math.max(srcHeight, destHeight), 32);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
+ long /*int*/ memHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ memDib = Image.createDIB(Math.max(srcWidth, destWidth), Math.max(srcHeight, destHeight), 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
@@ -1334,10 +1334,10 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
* Note that this also fails when drawing to a printer.
*/
if ((OS.IsWinCE && (destWidth > srcWidth || destHeight > srcHeight)) || (!OS.IsWinNT && !OS.IsWinCE) || isPrinter) {
- int /*long*/ tempHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ tempDib = Image.createDIB(destWidth, destHeight, 32);
+ long /*int*/ tempHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ tempDib = Image.createDIB(destWidth, destHeight, 32);
if (tempDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ oldTempBitmap = OS.SelectObject(tempHdc, tempDib);
+ long /*int*/ oldTempBitmap = OS.SelectObject(tempHdc, tempDib);
if (!simple && (srcWidth != destWidth || srcHeight != destHeight)) {
if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR);
OS.StretchBlt(tempHdc, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
@@ -1384,13 +1384,13 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
OS.DeleteDC(srcHdc);
}
-void drawBitmapTransparentByClipping(int /*long*/ srcHdc, int /*long*/ maskHdc, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight) {
+void drawBitmapTransparentByClipping(long /*int*/ srcHdc, long /*int*/ maskHdc, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight) {
/* Create a clipping region from the mask */
- int /*long*/ rgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ rgn = OS.CreateRectRgn(0, 0, 0, 0);
for (int y=0; y<imgHeight; y++) {
for (int x=0; x<imgWidth; x++) {
if (OS.GetPixel(maskHdc, x, y) == 0) {
- int /*long*/ tempRgn = OS.CreateRectRgn(x, y, x+1, y+1);
+ long /*int*/ tempRgn = OS.CreateRectRgn(x, y, x+1, y+1);
OS.CombineRgn(rgn, rgn, tempRgn, OS.RGN_OR);
OS.DeleteObject(tempRgn);
}
@@ -1402,12 +1402,12 @@ void drawBitmapTransparentByClipping(int /*long*/ srcHdc, int /*long*/ maskHdc,
int[] lpRgnData = new int[nBytes / 4];
OS.GetRegionData (rgn, nBytes, lpRgnData);
float[] lpXform = new float[] {(float)destWidth/srcWidth, 0, 0, (float)destHeight/srcHeight, 0, 0};
- int /*long*/ tmpRgn = OS.ExtCreateRegion(lpXform, nBytes, lpRgnData);
+ long /*int*/ tmpRgn = OS.ExtCreateRegion(lpXform, nBytes, lpRgnData);
OS.DeleteObject(rgn);
rgn = tmpRgn;
}
OS.OffsetRgn(rgn, destX, destY);
- int /*long*/ clip = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ clip = OS.CreateRectRgn(0, 0, 0, 0);
int result = OS.GetClipRgn(handle, clip);
if (result == 1) OS.CombineRgn(rgn, rgn, clip, OS.RGN_AND);
OS.SelectClipRgn(handle, rgn);
@@ -1432,17 +1432,17 @@ void drawBitmapTransparentByClipping(int /*long*/ srcHdc, int /*long*/ maskHdc,
OS.DeleteObject(rgn);
}
-void drawBitmapMask(Image srcImage, int /*long*/ srcColor, int /*long*/ srcMask, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight, boolean offscreen) {
+void drawBitmapMask(Image srcImage, long /*int*/ srcColor, long /*int*/ srcMask, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight, boolean offscreen) {
int srcColorY = srcY;
if (srcColor == 0) {
srcColor = srcMask;
srcColorY += imgHeight;
}
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
- int /*long*/ destHdc = handle;
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
+ long /*int*/ destHdc = handle;
int x = destX, y = destY;
- int /*long*/ tempHdc = 0, tempBitmap = 0, oldTempBitmap = 0;
+ long /*int*/ tempHdc = 0, tempBitmap = 0, oldTempBitmap = 0;
int oldBkColor = 0, oldTextColor = 0;
if (offscreen) {
tempHdc = OS.CreateCompatibleDC(handle);
@@ -1489,9 +1489,9 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
/* Find the RGB values for the transparent pixel. */
boolean isDib = bm.bmBits != 0;
- int /*long*/ hBitmap = srcImage.handle;
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
+ long /*int*/ hBitmap = srcImage.handle;
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
byte[] originalColors = null;
int transparentColor = srcImage.transparentColor;
if (transparentColor == -1) {
@@ -1595,9 +1595,9 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
OS.SetStretchBltMode(handle, mode);
} else {
/* Create the mask for the source image */
- int /*long*/ maskHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ maskBitmap = OS.CreateBitmap(imgWidth, imgHeight, 1, 1, null);
- int /*long*/ oldMaskBitmap = OS.SelectObject(maskHdc, maskBitmap);
+ long /*int*/ maskHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ maskBitmap = OS.CreateBitmap(imgWidth, imgHeight, 1, 1, null);
+ long /*int*/ oldMaskBitmap = OS.SelectObject(maskHdc, maskBitmap);
OS.SetBkColor(srcHdc, transparentColor);
OS.BitBlt(maskHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
if (originalColors != null) OS.SetDIBColorTable(srcHdc, 0, 1 << bm.bmBitsPixel, originalColors);
@@ -1607,9 +1607,9 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
drawBitmapTransparentByClipping(srcHdc, maskHdc, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, imgWidth, imgHeight);
} else {
/* Draw the source bitmap transparently using invert/and mask/invert */
- int /*long*/ tempHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ tempBitmap = OS.CreateCompatibleBitmap(handle, destWidth, destHeight);
- int /*long*/ oldTempBitmap = OS.SelectObject(tempHdc, tempBitmap);
+ long /*int*/ tempHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ tempBitmap = OS.CreateCompatibleBitmap(handle, destWidth, destHeight);
+ long /*int*/ oldTempBitmap = OS.SelectObject(tempHdc, tempBitmap);
OS.BitBlt(tempHdc, 0, 0, destWidth, destHeight, handle, destX, destY, OS.SRCCOPY);
if (!simple && (srcWidth != destWidth || srcHeight != destHeight)) {
if (!OS.IsWinCE) OS.SetStretchBltMode(tempHdc, OS.COLORONCOLOR);
@@ -1636,8 +1636,8 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
}
void drawBitmap(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, BITMAP bm, int imgWidth, int imgHeight) {
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
int rop2 = 0;
if (!OS.IsWinCE) {
rop2 = OS.GetROP2(handle);
@@ -1674,7 +1674,7 @@ void drawBitmap(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
public void drawLine (int x1, int y1, int x2, int y2) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(DRAW);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawLine(gdipGraphics, data.gdipPen, x1, y1, x2, y2);
@@ -1723,7 +1723,7 @@ public void drawLine (int x1, int y1, int x2, int y2) {
public void drawOval (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(DRAW);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawEllipse(gdipGraphics, data.gdipPen, x, y, width, height);
@@ -1765,7 +1765,7 @@ public void drawPath (Path path) {
if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
initGdip();
checkGC(DRAW);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawPath(gdipGraphics, data.gdipPen, path.handle);
Gdip.Graphics_TranslateTransform(gdipGraphics, -data.gdipXOffset, -data.gdipYOffset, Gdip.MatrixOrderPrepend);
@@ -1819,7 +1819,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*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawPolygon(gdipGraphics, data.gdipPen, pointArray, pointArray.length / 2);
@@ -1864,7 +1864,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*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawLines(gdipGraphics, data.gdipPen, pointArray, pointArray.length / 2);
@@ -1912,7 +1912,7 @@ public void drawPolyline(int[] pointArray) {
public void drawRectangle (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(DRAW);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
if (width < 0) {
x = x + width;
@@ -2038,7 +2038,7 @@ public void drawRoundRectangle (int x, int y, int width, int height, int arcWidt
}
}
-void drawRoundRectangleGdip (int /*long*/ gdipGraphics, int /*long*/ pen, int x, int y, int width, int height, int arcWidth, int arcHeight) {
+void drawRoundRectangleGdip (long /*int*/ gdipGraphics, long /*int*/ pen, int x, int y, int width, int height, int arcWidth, int arcHeight) {
int nx = x;
int ny = y;
int nw = width;
@@ -2063,7 +2063,7 @@ void drawRoundRectangleGdip (int /*long*/ gdipGraphics, int /*long*/ pen, int x,
if (naw == 0 || nah == 0) {
Gdip.Graphics_DrawRectangle(gdipGraphics, data.gdipPen, x, y, width, height);
} else {
- int /*long*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (nw > naw) {
if (nh > nah) {
@@ -2140,7 +2140,7 @@ public void drawString (String string, int x, int y, boolean isTransparent) {
if (length == 0) return;
char[] buffer = new char [length];
string.getChars(0, length, buffer, 0);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
checkGC(FONT | FOREGROUND | (isTransparent ? 0 : BACKGROUND));
drawText(gdipGraphics, string, x, y, isTransparent ? SWT.DRAW_TRANSPARENT : 0, null);
@@ -2181,10 +2181,10 @@ public void drawString (String string, int x, int y, boolean isTransparent) {
OS.GetTextExtentPoint32W(handle, buffer, length, size);
}
int width = size.cx, height = size.cy;
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ memDC = OS.CreateCompatibleDC(handle);
- int /*long*/ hOldBitmap = OS.SelectObject(memDC, hBitmap);
+ long /*int*/ memDC = OS.CreateCompatibleDC(handle);
+ long /*int*/ hOldBitmap = OS.SelectObject(memDC, hBitmap);
OS.PatBlt(memDC, 0, 0, width, height, OS.BLACKNESS);
OS.SetBkMode(memDC, OS.TRANSPARENT);
OS.SetTextColor(memDC, foreground);
@@ -2290,7 +2290,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*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
checkGC(FONT | FOREGROUND | ((flags & SWT.DRAW_TRANSPARENT) != 0 ? 0 : BACKGROUND));
drawText(gdipGraphics, string, x, y, flags, null);
@@ -2336,10 +2336,10 @@ public void drawText (String string, int x, int y, int flags) {
OS.DrawText(handle, buffer, buffer.length(), rect, uFormat | OS.DT_CALCRECT);
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ memDC = OS.CreateCompatibleDC(handle);
- int /*long*/ hOldBitmap = OS.SelectObject(memDC, hBitmap);
+ long /*int*/ memDC = OS.CreateCompatibleDC(handle);
+ long /*int*/ hOldBitmap = OS.SelectObject(memDC, hBitmap);
OS.PatBlt(memDC, 0, 0, width, height, OS.BLACKNESS);
OS.SetBkMode(memDC, OS.TRANSPARENT);
OS.SetTextColor(memDC, foreground);
@@ -2360,7 +2360,7 @@ public void drawText (String string, int x, int y, int flags) {
OS.SetBkMode(handle, oldBkMode);
}
-boolean useGDIP (int /*long*/ hdc, char[] buffer) {
+boolean useGDIP (long /*int*/ hdc, char[] buffer) {
if (OS.IsWinCE || !OS.IsUnicode) return false;
short[] glyphs = new short[buffer.length];
OS.GetGlyphIndicesW(hdc, buffer, buffer.length, glyphs, OS.GGI_MARK_NONEXISTING_GLYPHS);
@@ -2379,14 +2379,14 @@ boolean useGDIP (int /*long*/ hdc, char[] buffer) {
return false;
}
-void drawText(int /*long*/ gdipGraphics, String string, int x, int y, int flags, Point size) {
+void drawText(long /*int*/ gdipGraphics, String string, int x, int y, int flags, Point size) {
int length = string.length();
char[] chars = new char [length];
string.getChars(0, length, chars, 0);
- int /*long*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
- int /*long*/ hFont = data.hGDIFont;
+ long /*int*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
+ long /*int*/ hFont = data.hGDIFont;
if (hFont == 0 && data.font != null) hFont = data.font.handle;
- int /*long*/ oldFont = 0;
+ long /*int*/ oldFont = 0;
if (hFont != 0) oldFont = OS.SelectObject(hdc, hFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
OS.GetTextMetrics(hdc, lptm);
@@ -2450,7 +2450,7 @@ void drawText(int /*long*/ gdipGraphics, String string, int x, int y, int flags,
}
}
-RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length, int x, int y, int flags, int mnemonicIndex, TEXTMETRIC lptm, boolean draw) {
+RectF drawText(long /*int*/ gdipGraphics, char[] buffer, int start, int length, int x, int y, int flags, int mnemonicIndex, TEXTMETRIC lptm, boolean draw) {
boolean drawMnemonic = draw && mnemonicIndex != -1 && (data.uiState & OS.UISF_HIDEACCEL) == 0;
boolean needsBounds = !draw || drawMnemonic || (flags & SWT.DRAW_TRANSPARENT) == 0 || (data.style & SWT.MIRRORED) != 0 || (flags & SWT.DRAW_DELIMITER) != 0;
if (length <= 0) {
@@ -2465,18 +2465,18 @@ RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length,
GCP_RESULTS result = new GCP_RESULTS();
result.lStructSize = GCP_RESULTS.sizeof;
result.nGlyphs = nGlyphs;
- int /*long*/ hHeap = OS.GetProcessHeap();
- int /*long*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
- int /*long*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 2);
- int /*long*/ lpOrder = 0;
+ long /*int*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
+ long /*int*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 2);
+ long /*int*/ lpOrder = 0;
int dwFlags = OS.GCP_GLYPHSHAPE | OS.GCP_REORDER | OS.GCP_LIGATE;
if (drawMnemonic) {
lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
}
- int /*long*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
- int /*long*/ hFont = data.hGDIFont;
+ long /*int*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
+ long /*int*/ hFont = data.hGDIFont;
if (hFont == 0 && data.font != null) hFont = data.font.handle;
- int /*long*/ oldFont = 0;
+ long /*int*/ oldFont = 0;
if (hFont != 0) oldFont = OS.SelectObject(hdc, hFont);
if (start != 0) {
char[] temp = new char[length];
@@ -2508,7 +2508,7 @@ RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length,
Gdip.Graphics_FillRectangle(gdipGraphics, data.gdipBrush, x, y, (int)Math.ceil(bounds.Width), (int)Math.ceil(bounds.Height));
}
int gstate = 0;
- int /*long*/ brush = getFgBrush();
+ long /*int*/ brush = getFgBrush();
if ((data.style & SWT.MIRRORED) != 0) {
switch (Gdip.Brush_GetType(brush)) {
case Gdip.BrushTypeLinearGradient:
@@ -2537,7 +2537,7 @@ RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length,
Gdip.Graphics_Restore(gdipGraphics, gstate);
}
if (drawMnemonic) {
- int /*long*/ pen = Gdip.Pen_new(brush, 1);
+ long /*int*/ pen = Gdip.Pen_new(brush, 1);
if (pen != 0) {
int[] order = new int[1];
OS.MoveMemory(order, result.lpOrder + mnemonicIndex * 4, 4);
@@ -2564,7 +2564,7 @@ RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length,
return bounds;
}
-void drawTextGDIP(int /*long*/ gdipGraphics, String string, int x, int y, int flags, boolean draw, Point size) {
+void drawTextGDIP(long /*int*/ gdipGraphics, String string, int x, int y, int flags, boolean draw, Point size) {
boolean needsBounds = !draw || (flags & SWT.DRAW_TRANSPARENT) == 0;
char[] buffer;
int length = string.length();
@@ -2576,7 +2576,7 @@ void drawTextGDIP(int /*long*/ gdipGraphics, String string, int x, int y, int fl
buffer = new char[]{' '};
}
PointF pt = new PointF();
- int /*long*/ format = Gdip.StringFormat_Clone(Gdip.StringFormat_GenericTypographic());
+ long /*int*/ format = Gdip.StringFormat_Clone(Gdip.StringFormat_GenericTypographic());
int formatFlags = Gdip.StringFormat_GetFormatFlags(format) | Gdip.StringFormatFlagsMeasureTrailingSpaces;
if ((data.style & SWT.MIRRORED) != 0) formatFlags |= Gdip.StringFormatFlagsDirectionRightToLeft;
Gdip.StringFormat_SetFormatFlags(format, formatFlags);
@@ -2595,7 +2595,7 @@ void drawTextGDIP(int /*long*/ gdipGraphics, String string, int x, int y, int fl
Gdip.Graphics_FillRectangle(gdipGraphics, data.gdipBrush, x, y, (int)Math.ceil(bounds.Width), (int)Math.ceil(bounds.Height));
}
int gstate = 0;
- int /*long*/ brush = getFgBrush();
+ long /*int*/ brush = getFgBrush();
if ((data.style & SWT.MIRRORED) != 0) {
switch (Gdip.Brush_GetType(brush)) {
case Gdip.BrushTypeLinearGradient:
@@ -2692,7 +2692,7 @@ public void fillArc (int x, int y, int width, int height, int startAngle, int ar
height = -height;
}
if (width == 0 || height == 0 || arcAngle == 0) return;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
if (width == height) {
Gdip.Graphics_FillPie(gdipGraphics, data.gdipBrush, x, y, width, height, -startAngle, -arcAngle);
@@ -2823,12 +2823,12 @@ public void fillGradientRectangle(int x, int y, int width, int height, boolean v
p2.Y = p1.Y;
}
int rgb = ((fromRGB.red & 0xFF) << 16) | ((fromRGB.green & 0xFF) << 8) | (fromRGB.blue & 0xFF);
- int /*long*/ fromGpColor = Gdip.Color_new(data.alpha << 24 | rgb);
+ long /*int*/ fromGpColor = Gdip.Color_new(data.alpha << 24 | rgb);
if (fromGpColor == 0) SWT.error(SWT.ERROR_NO_HANDLES);
rgb = ((toRGB.red & 0xFF) << 16) | ((toRGB.green & 0xFF) << 8) | (toRGB.blue & 0xFF);
- int /*long*/ toGpColor = Gdip.Color_new(data.alpha << 24 | rgb);
+ long /*int*/ toGpColor = Gdip.Color_new(data.alpha << 24 | rgb);
if (toGpColor == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ brush = Gdip.LinearGradientBrush_new(p1, p2, fromGpColor, toGpColor);
+ long /*int*/ brush = Gdip.LinearGradientBrush_new(p1, p2, fromGpColor, toGpColor);
Gdip.Graphics_FillRectangle(data.gdipGraphics, brush, x, y, width, height);
Gdip.LinearGradientBrush_delete(brush);
Gdip.Color_delete(fromGpColor);
@@ -2852,10 +2852,10 @@ public void fillGradientRectangle(int x, int y, int width, int height, boolean v
rop2 = OS.GetROP2(handle);
}
if (OS.IsWinNT && rop2 != OS.R2_XORPEN && OS.GetDeviceCaps(handle, OS.TECHNOLOGY) != OS.DT_RASPRINTER) {
- final int /*long*/ hHeap = OS.GetProcessHeap();
- final int /*long*/ pMesh = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, GRADIENT_RECT.sizeof + TRIVERTEX.sizeof * 2);
+ final long /*int*/ hHeap = OS.GetProcessHeap();
+ final long /*int*/ pMesh = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, GRADIENT_RECT.sizeof + TRIVERTEX.sizeof * 2);
if (pMesh == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- final int /*long*/ pVertex = pMesh + GRADIENT_RECT.sizeof;
+ final long /*int*/ pVertex = pMesh + GRADIENT_RECT.sizeof;
GRADIENT_RECT gradientRect = new GRADIENT_RECT();
gradientRect.UpperLeft = 0;
@@ -3082,7 +3082,7 @@ public void fillRoundRectangle (int x, int y, int width, int height, int arcWidt
OS.RoundRect(handle, x,y,x+width+1,y+height+1,arcWidth, arcHeight);
}
-void fillRoundRectangleGdip (int /*long*/ gdipGraphics, int /*long*/ brush, int x, int y, int width, int height, int arcWidth, int arcHeight) {
+void fillRoundRectangleGdip (long /*int*/ gdipGraphics, long /*int*/ brush, int x, int y, int width, int height, int arcWidth, int arcHeight) {
int nx = x;
int ny = y;
int nw = width;
@@ -3106,7 +3106,7 @@ void fillRoundRectangleGdip (int /*long*/ gdipGraphics, int /*long*/ brush, int
if (naw == 0 || nah == 0) {
Gdip.Graphics_FillRectangle(data.gdipGraphics, data.gdipBrush, x, y, width, height);
} else {
- int /*long*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (nw > naw) {
if (nh > nah) {
@@ -3140,7 +3140,7 @@ void flush () {
* underline HDC. This is done by calling GetHDC()
* followed by ReleaseHDC().
*/
- int /*long*/ hdc = Gdip.Graphics_GetHDC(data.gdipGraphics);
+ long /*int*/ hdc = Gdip.Graphics_GetHDC(data.gdipGraphics);
Gdip.Graphics_ReleaseHDC(data.gdipGraphics, hdc);
}
}
@@ -3344,7 +3344,7 @@ public int getCharWidth(char ch) {
*/
public Rectangle getClipping() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Rect rect = new Rect();
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeNone);
@@ -3375,9 +3375,9 @@ 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*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- int /*long*/ rgn = Gdip.Region_new();
+ long /*int*/ rgn = Gdip.Region_new();
Gdip.Graphics_GetClip(data.gdipGraphics, rgn);
if (Gdip.Region_IsInfinite(rgn, gdipGraphics)) {
Rect rect = new Rect();
@@ -3386,11 +3386,11 @@ public void getClipping (Region region) {
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
OS.SetRectRgn(region.handle, rect.X, rect.Y, rect.X + rect.Width, rect.Y + rect.Height);
} else {
- int /*long*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
- int /*long*/ identity = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ identity = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
Gdip.Graphics_SetTransform(gdipGraphics, identity);
- int /*long*/ hRgn = Gdip.Region_GetHRGN(rgn, data.gdipGraphics);
+ long /*int*/ hRgn = Gdip.Region_GetHRGN(rgn, data.gdipGraphics);
Gdip.Graphics_SetTransform(gdipGraphics, matrix);
Gdip.Matrix_delete(identity);
Gdip.Matrix_delete(matrix);
@@ -3416,22 +3416,22 @@ public void getClipping (Region region) {
OS.OffsetRgn (region.handle, pt.x, pt.y);
}
if (!OS.IsWinCE) {
- int /*long*/ metaRgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ metaRgn = OS.CreateRectRgn (0, 0, 0, 0);
if (OS.GetMetaRgn (handle, metaRgn) != 0) {
OS.OffsetRgn (metaRgn, pt.x, pt.y);
OS.CombineRgn (region.handle, metaRgn, region.handle, OS.RGN_AND);
}
OS.DeleteObject(metaRgn);
- int /*long*/ hwnd = data.hwnd;
+ long /*int*/ hwnd = data.hwnd;
if (hwnd != 0 && data.ps != null) {
- int /*long*/ sysRgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ sysRgn = OS.CreateRectRgn (0, 0, 0, 0);
if (OS.GetRandomRgn (handle, sysRgn, OS.SYSRGN) == 1) {
if (OS.WIN32_VERSION >= OS.VERSION(4, 10)) {
if ((OS.GetLayout(handle) & OS.LAYOUT_RTL) != 0) {
int nBytes = OS.GetRegionData (sysRgn, 0, null);
int [] lpRgnData = new int [nBytes / 4];
OS.GetRegionData (sysRgn, nBytes, lpRgnData);
- int /*long*/ newSysRgn = OS.ExtCreateRegion(new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
+ long /*int*/ newSysRgn = OS.ExtCreateRegion(new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
OS.DeleteObject(sysRgn);
sysRgn = newSysRgn;
}
@@ -3455,7 +3455,7 @@ int getCodePage () {
return lpCs[1];
}
-int /*long*/ getFgBrush() {
+long /*int*/ getFgBrush() {
return data.foregroundPattern != null ? data.foregroundPattern.handle : data.gdipFgBrush;
}
@@ -3790,10 +3790,10 @@ 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*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_GetTransform(gdipGraphics, transform.handle);
- int /*long*/ identity = identity();
+ long /*int*/ identity = identity();
Gdip.Matrix_Invert(identity);
Gdip.Matrix_Multiply(transform.handle, identity, Gdip.MatrixOrderAppend);
Gdip.Matrix_delete(identity);
@@ -3830,7 +3830,7 @@ public boolean getXORMode() {
void initGdip() {
data.device.checkGDIP();
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) return;
/*
* Feature in GDI+. The GDI+ clipping set with Graphics->SetClip()
@@ -3839,7 +3839,7 @@ void initGdip() {
* cannot be reset. The fix is to clear the clipping before
* the GDI+ graphics is created and reset it afterwards.
*/
- int /*long*/ hRgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ hRgn = OS.CreateRectRgn(0, 0, 0, 0);
int result = OS.GetClipRgn(handle, hRgn);
if (!OS.IsWinCE) {
POINT pt = new POINT ();
@@ -3864,7 +3864,7 @@ void initGdip() {
Gdip.Graphics_SetPageUnit(gdipGraphics, Gdip.UnitPixel);
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
if ((data.style & SWT.MIRRORED) != 0) {
- int /*long*/ matrix = identity();
+ long /*int*/ matrix = identity();
Gdip.Graphics_SetTransform(gdipGraphics, matrix);
Gdip.Matrix_delete(matrix);
}
@@ -3883,7 +3883,7 @@ void initGdip() {
}
}
-int /*long*/ identity() {
+long /*int*/ identity() {
if ((data.style & SWT.MIRRORED) != 0) {
int width = 0;
int technology = OS.GetDeviceCaps(handle, OS.TECHNOLOGY);
@@ -3896,13 +3896,13 @@ int /*long*/ identity() {
OS.GetObject(image.handle, BITMAP.sizeof, bm);
width = bm.bmWidth;
} else {
- int /*long*/ hwnd = OS.IsWinCE ? data.hwnd : OS.WindowFromDC(handle);
+ long /*int*/ hwnd = OS.IsWinCE ? data.hwnd : OS.WindowFromDC(handle);
if (hwnd != 0) {
RECT rect = new RECT();
OS.GetClientRect(hwnd, rect);
width = rect.right - rect.left;
} else {
- int /*long*/ hBitmap = OS.GetCurrentObject(handle, OS.OBJ_BITMAP);
+ long /*int*/ hBitmap = OS.GetCurrentObject(handle, OS.OBJ_BITMAP);
BITMAP bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
width = bm.bmWidth;
@@ -3916,7 +3916,7 @@ int /*long*/ identity() {
return Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
}
-void init(Drawable drawable, GCData data, int /*long*/ hDC) {
+void init(Drawable drawable, GCData data, long /*int*/ hDC) {
int foreground = data.foreground;
if (foreground != -1) {
data.state &= ~(FOREGROUND | FOREGROUND_TEXT | PEN);
@@ -3936,7 +3936,7 @@ void init(Drawable drawable, GCData data, int /*long*/ hDC) {
} else {
data.font = Font.win32_new(device, OS.GetCurrentObject(hDC, OS.OBJ_FONT));
}
- int /*long*/ hPalette = data.device.hPalette;
+ long /*int*/ hPalette = data.device.hPalette;
if (hPalette != 0) {
OS.SelectPalette(hDC, hPalette, true);
OS.RealizePalette(hDC);
@@ -3996,15 +3996,15 @@ public int hashCode () {
*/
public boolean isClipped() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- int /*long*/ rgn = Gdip.Region_new();
+ long /*int*/ rgn = Gdip.Region_new();
Gdip.Graphics_GetClip(data.gdipGraphics, rgn);
boolean isInfinite = Gdip.Region_IsInfinite(rgn, gdipGraphics);
Gdip.Region_delete(rgn);
return !isInfinite;
}
- int /*long*/ region = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ region = OS.CreateRectRgn(0, 0, 0, 0);
int result = OS.GetClipRgn(handle, region);
OS.DeleteObject(region);
return result > 0;
@@ -4024,7 +4024,7 @@ public boolean isDisposed() {
return handle == 0;
}
-float measureSpace(int /*long*/ font, int /*long*/ format) {
+float measureSpace(long /*int*/ font, long /*int*/ format) {
PointF pt = new PointF();
RectF bounds = new RectF();
Gdip.Graphics_MeasureString(data.gdipGraphics, new char[]{' '}, 1, font, pt, format, bounds);
@@ -4228,12 +4228,12 @@ public void setBackgroundPattern (Pattern pattern) {
data.state &= ~BACKGROUND;
}
-void setClipping(int /*long*/ clipRgn) {
- int /*long*/ hRgn = clipRgn;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+void setClipping(long /*int*/ clipRgn) {
+ long /*int*/ hRgn = clipRgn;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
if (hRgn != 0) {
- int /*long*/ region = Gdip.Region_new(hRgn);
+ long /*int*/ region = Gdip.Region_new(hRgn);
Gdip.Graphics_SetClip(gdipGraphics, region, Gdip.CombineModeReplace);
Gdip.Region_delete(region);
} else {
@@ -4269,7 +4269,7 @@ void setClipping(int /*long*/ clipRgn) {
*/
public void setClipping (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- int /*long*/ hRgn = OS.CreateRectRgn(x, y, x + width, y + height);
+ long /*int*/ hRgn = OS.CreateRectRgn(x, y, x + width, y + height);
setClipping(hRgn);
OS.DeleteObject(hRgn);
}
@@ -4898,7 +4898,7 @@ public void setTransform(Transform transform) {
if (transform != null && transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (data.gdipGraphics == 0 && transform == null) return;
initGdip();
- int /*long*/ identity = identity();
+ long /*int*/ identity = identity();
if (transform != null) {
Gdip.Matrix_Multiply(identity, transform.handle, Gdip.MatrixOrderPrepend);
}
@@ -4931,7 +4931,7 @@ public Point stringExtent(String string) {
if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
checkGC(FONT);
int length = string.length();
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Point size = new Point(0, 0);
drawText(gdipGraphics, string, 0, 0, 0, size);
@@ -5009,7 +5009,7 @@ 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);
checkGC(FONT);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Point size = new Point(0, 0);
drawText(gdipGraphics, string, 0, 0, flags, size);
@@ -5061,7 +5061,7 @@ public String toString () {
*/
public static GC win32_new(Drawable drawable, GCData data) {
GC gc = new GC();
- int /*long*/ hDC = drawable.internal_new_GC(data);
+ long /*int*/ hDC = drawable.internal_new_GC(data);
gc.device = data.device;
gc.init(drawable, data, hDC);
return gc;
@@ -5084,7 +5084,7 @@ public static GC win32_new(Drawable drawable, GCData data) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static GC win32_new(int /*long*/ hDC, GCData data) {
+public static GC win32_new(long /*int*/ hDC, GCData data) {
GC gc = new GC();
gc.device = data.device;
data.style |= SWT.LEFT_TO_RIGHT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java
index 8ccb803401..fa4c631e4f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java
@@ -45,19 +45,19 @@ public final class GCData {
public int alpha = 0xFF;
public Image image;
- public int /*long*/ hPen, hOldPen;
- public int /*long*/ hBrush, hOldBrush;
- public int /*long*/ hNullBitmap;
- public int /*long*/ hwnd;
+ public long /*int*/ hPen, hOldPen;
+ public long /*int*/ hBrush, hOldBrush;
+ public long /*int*/ hNullBitmap;
+ public long /*int*/ hwnd;
public PAINTSTRUCT ps;
public int layout = -1;
- public int /*long*/ gdipGraphics;
- public int /*long*/ gdipPen;
- public int /*long*/ gdipBrush;
- public int /*long*/ gdipFgBrush;
- public int /*long*/ gdipBgBrush;
- public int /*long*/ gdipFont;
- public int /*long*/ hGDIFont;
+ public long /*int*/ gdipGraphics;
+ public long /*int*/ gdipPen;
+ public long /*int*/ gdipBrush;
+ public long /*int*/ gdipFgBrush;
+ public long /*int*/ gdipBgBrush;
+ public long /*int*/ gdipFont;
+ public long /*int*/ hGDIFont;
public float gdipXOffset, gdipYOffset;
public int uiState = 0;
public boolean focusDrawn;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
index 25997c9183..dca9e8a368 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/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*/ handle;
+ public long /*int*/ handle;
/**
* specifies the transparent pixel
@@ -225,17 +225,17 @@ public Image(Device device, Image srcImage, int flag) {
switch (type) {
case SWT.BITMAP:
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/* Copy the bitmap */
- int /*long*/ hdcSource = OS.CreateCompatibleDC(hDC);
- int /*long*/ hdcDest = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldSrc = OS.SelectObject(hdcSource, srcImage.handle);
+ long /*int*/ hdcSource = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hdcDest = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldSrc = OS.SelectObject(hdcSource, srcImage.handle);
BITMAP bm = new BITMAP();
OS.GetObject(srcImage.handle, BITMAP.sizeof, bm);
handle = OS.CreateCompatibleBitmap(hdcSource, rect.width, bm.bmBits != 0 ? -rect.height : rect.height);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ hOldDest = OS.SelectObject(hdcDest, handle);
+ long /*int*/ hOldDest = OS.SelectObject(hdcDest, handle);
OS.BitBlt(hdcDest, 0, 0, rect.width, rect.height, hdcSource, 0, 0, OS.SRCCOPY);
OS.SelectObject(hdcSource, hOldSrc);
OS.SelectObject(hdcDest, hOldDest);
@@ -604,14 +604,14 @@ void initNative(String filename) {
int length = filename.length();
char[] chars = new char[length+1];
filename.getChars(0, length, chars, 0);
- int /*long*/ bitmap = Gdip.Bitmap_new(chars, false);
+ long /*int*/ bitmap = Gdip.Bitmap_new(chars, false);
if (bitmap != 0) {
int error = SWT.ERROR_NO_HANDLES;
int status = Gdip.Image_GetLastStatus(bitmap);
if (status == 0) {
if (filename.toLowerCase().endsWith(".ico")) {
this.type = SWT.ICON;
- int /*long*/[] hicon = new int /*long*/[1];
+ long /*int*/[] hicon = new long /*int*/[1];
status = Gdip.Bitmap_GetHICON(bitmap, hicon);
this.handle = hicon[0];
} else {
@@ -643,10 +643,10 @@ void initNative(String filename) {
* This performs better than getting the bits with Bitmap.LockBits(),
* but it cannot be used when there is transparency.
*/
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ srcHDC = OS.CreateCompatibleDC(hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHDC, this.handle);
- int /*long*/ graphics = Gdip.Graphics_new(srcHDC);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ srcHDC = OS.CreateCompatibleDC(hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHDC, this.handle);
+ long /*int*/ graphics = Gdip.Graphics_new(srcHDC);
if (graphics != 0) {
Rect rect = new Rect();
rect.Width = width;
@@ -663,14 +663,14 @@ void initNative(String filename) {
OS.DeleteDC(srcHDC);
device.internal_dispose_GC(hDC, null);
} else {
- int /*long*/ lockedBitmapData = Gdip.BitmapData_new();
+ long /*int*/ lockedBitmapData = Gdip.BitmapData_new();
if (lockedBitmapData != 0) {
status = Gdip.Bitmap_LockBits(bitmap, 0, 0, pixelFormat, lockedBitmapData);
if (status == 0) {
BitmapData bitmapData = new BitmapData();
Gdip.MoveMemory(bitmapData, lockedBitmapData);
int stride = bitmapData.Stride;
- int /*long*/ pixels = bitmapData.Scan0;
+ long /*int*/ pixels = bitmapData.Scan0;
int depth = 0, scanlinePad = 4, transparentPixel = -1;
switch (bitmapData.PixelFormat) {
case Gdip.PixelFormat1bppIndexed: depth = 1; break;
@@ -690,8 +690,8 @@ void initNative(String filename) {
case Gdip.PixelFormat4bppIndexed:
case Gdip.PixelFormat8bppIndexed:
int paletteSize = Gdip.Image_GetPaletteSize(bitmap);
- int /*long*/ hHeap = OS.GetProcessHeap();
- int /*long*/ palette = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, paletteSize);
+ long /*int*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ palette = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, paletteSize);
if (palette == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Image_GetPalette(bitmap, palette, paletteSize);
ColorPalette colorPalette = new ColorPalette();
@@ -757,7 +757,7 @@ void initNative(String filename) {
* Create a DIB from a DDB without using GetDIBits. Note that
* the DDB should not be selected into a HDC.
*/
-int /*long*/ createDIBFromDDB(int /*long*/ hDC, int /*long*/ hBitmap, int width, int height) {
+long /*int*/ createDIBFromDDB(long /*int*/ hDC, long /*int*/ hBitmap, int width, int height) {
/* Determine the DDB depth */
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
@@ -848,15 +848,15 @@ int /*long*/ createDIBFromDDB(int /*long*/ hDC, int /*long*/ hBitmap, int width,
offset += 4;
}
}
- int /*long*/[] pBits = new int /*long*/[1];
- int /*long*/ hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/[] pBits = new long /*int*/[1];
+ long /*int*/ hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (hDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
/* Bitblt DDB into DIB */
- int /*long*/ hdcSource = OS.CreateCompatibleDC(hDC);
- int /*long*/ hdcDest = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldSrc = OS.SelectObject(hdcSource, hBitmap);
- int /*long*/ hOldDest = OS.SelectObject(hdcDest, hDib);
+ long /*int*/ hdcSource = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hdcDest = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldSrc = OS.SelectObject(hdcSource, hBitmap);
+ long /*int*/ hOldDest = OS.SelectObject(hdcDest, hDib);
OS.BitBlt(hdcDest, 0, 0, width, height, hdcSource, 0, 0, OS.SRCCOPY);
OS.SelectObject(hdcSource, hOldSrc);
OS.SelectObject(hdcDest, hOldDest);
@@ -866,7 +866,7 @@ int /*long*/ createDIBFromDDB(int /*long*/ hDC, int /*long*/ hBitmap, int width,
return hDib;
}
-int /*long*/ [] createGdipImage() {
+long /*int*/ [] createGdipImage() {
switch (type) {
case SWT.BITMAP: {
if (alpha != -1 || alphaData != null || transparentPixel != -1) {
@@ -874,13 +874,13 @@ int /*long*/ [] createGdipImage() {
OS.GetObject(handle, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = bm.bmHeight;
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ srcHdc = OS.CreateCompatibleDC(hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, handle);
- int /*long*/ memHdc = OS.CreateCompatibleDC(hDC);
- int /*long*/ memDib = createDIB(imgWidth, imgHeight, 32);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, handle);
+ long /*int*/ memHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ memDib = createDIB(imgWidth, imgHeight, 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
@@ -956,13 +956,13 @@ int /*long*/ [] createGdipImage() {
}
}
}
- int /*long*/ hHeap = OS.GetProcessHeap();
- int /*long*/ pixels = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, srcData.length);
+ long /*int*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ pixels = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, srcData.length);
if (pixels == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.MoveMemory(pixels, srcData, sizeInBytes);
- return new int /*long*/ []{Gdip.Bitmap_new(imgWidth, imgHeight, dibBM.bmWidthBytes, Gdip.PixelFormat32bppARGB, pixels), pixels};
+ return new long /*int*/ []{Gdip.Bitmap_new(imgWidth, imgHeight, dibBM.bmWidthBytes, Gdip.PixelFormat32bppARGB, pixels), pixels};
}
- return new int /*long*/ []{Gdip.Bitmap_new(handle, 0), 0};
+ return new long /*int*/ []{Gdip.Bitmap_new(handle, 0), 0};
}
case SWT.ICON: {
/*
@@ -976,13 +976,13 @@ int /*long*/ [] createGdipImage() {
} else {
OS.GetIconInfo(handle, iconInfo);
}
- int /*long*/ hBitmap = iconInfo.hbmColor;
+ long /*int*/ hBitmap = iconInfo.hbmColor;
if (hBitmap == 0) hBitmap = iconInfo.hbmMask;
BITMAP bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = hBitmap == iconInfo.hbmMask ? bm.bmHeight / 2 : bm.bmHeight;
- int /*long*/ img = 0, pixels = 0;
+ long /*int*/ img = 0, pixels = 0;
/*
* Bug in GDI+. Bitmap_new() segments fault if the image width
* is greater than the image height.
@@ -991,13 +991,13 @@ int /*long*/ [] createGdipImage() {
* channel when the icon depth is 32.
*/
if (imgWidth > imgHeight || bm.bmBitsPixel == 32) {
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ srcHdc = OS.CreateCompatibleDC(hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
- int /*long*/ memHdc = OS.CreateCompatibleDC(hDC);
- int /*long*/ memDib = createDIB(imgWidth, imgHeight, 32);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
+ long /*int*/ memHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ memDib = createDIB(imgWidth, imgHeight, 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
OS.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, hBitmap == iconInfo.hbmMask ? imgHeight : 0, OS.SRCCOPY);
@@ -1022,7 +1022,7 @@ int /*long*/ [] createGdipImage() {
OS.SelectObject(srcHdc, oldSrcBitmap);
OS.DeleteObject(srcHdc);
device.internal_dispose_GC(hDC, null);
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
pixels = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, srcData.length);
if (pixels == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.MoveMemory(pixels, srcData, srcData.length);
@@ -1032,7 +1032,7 @@ int /*long*/ [] createGdipImage() {
}
if (iconInfo.hbmColor != 0) OS.DeleteObject(iconInfo.hbmColor);
if (iconInfo.hbmMask != 0) OS.DeleteObject(iconInfo.hbmMask);
- return new int /*long*/ []{img, pixels};
+ return new long /*int*/ []{img, pixels};
}
default: SWT.error(SWT.ERROR_INVALID_IMAGE);
}
@@ -1091,13 +1091,13 @@ public Color getBackground() {
if (transparentPixel == -1) return null;
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/* Compute the background color */
BITMAP bm = new BITMAP();
OS.GetObject(handle, BITMAP.sizeof, bm);
- int /*long*/ hdcMem = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldObject = OS.SelectObject(hdcMem, handle);
+ long /*int*/ hdcMem = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldObject = OS.SelectObject(hdcMem, handle);
int red = 0, green = 0, blue = 0;
if (bm.bmBitsPixel <= 8) {
if (OS.IsWinCE) {
@@ -1177,7 +1177,7 @@ public Rectangle getBounds() {
} else {
ICONINFO info = new ICONINFO();
OS.GetIconInfo(handle, info);
- int /*long*/ hBitmap = info.hbmColor;
+ long /*int*/ hBitmap = info.hbmColor;
if (hBitmap == 0) hBitmap = info.hbmMask;
bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
@@ -1217,7 +1217,7 @@ public ImageData getImageData() {
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
OS.GetIconInfo(handle, info);
/* Get the basic BITMAP information */
- int /*long*/ hBitmap = info.hbmColor;
+ long /*int*/ hBitmap = info.hbmColor;
if (hBitmap == 0) hBitmap = info.hbmMask;
bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
@@ -1239,15 +1239,15 @@ public ImageData getImageData() {
OS.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/* Create the DC and select the bitmap */
- int /*long*/ hBitmapDC = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldBitmap = OS.SelectObject(hBitmapDC, hBitmap);
+ long /*int*/ hBitmapDC = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldBitmap = OS.SelectObject(hBitmapDC, hBitmap);
/* Select the palette if necessary */
- int /*long*/ oldPalette = 0;
+ long /*int*/ oldPalette = 0;
if (depth <= 8) {
- int /*long*/ hPalette = device.hPalette;
+ long /*int*/ hPalette = device.hPalette;
if (hPalette != 0) {
oldPalette = OS.SelectPalette(hBitmapDC, hPalette, false);
OS.RealizePalette(hBitmapDC);
@@ -1359,14 +1359,14 @@ public ImageData getImageData() {
/* Find out whether this is a DIB or a DDB. */
boolean isDib = (bm.bmBits != 0);
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/*
* Feature in WinCE. GetDIBits is not available in WinCE. The
* workaround is to create a temporary DIB from the DDB and use
* the bmBits field of DIBSECTION to retrieve the image data.
*/
- int /*long*/ handle = this.handle;
+ long /*int*/ handle = this.handle;
if (OS.IsWinCE) {
if (!isDib) {
boolean mustRestore = false;
@@ -1381,7 +1381,7 @@ public ImageData getImageData() {
}
handle = createDIBFromDDB(hDC, this.handle, width, height);
if (mustRestore) {
- int /*long*/ hOldBitmap = OS.SelectObject(memGC.handle, this.handle);
+ long /*int*/ hOldBitmap = OS.SelectObject(memGC.handle, this.handle);
memGC.data.hNullBitmap = hOldBitmap;
}
isDib = true;
@@ -1417,12 +1417,12 @@ public ImageData getImageData() {
}
/* Create the DC and select the bitmap */
- int /*long*/ hBitmapDC = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldBitmap = OS.SelectObject(hBitmapDC, handle);
+ long /*int*/ hBitmapDC = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldBitmap = OS.SelectObject(hBitmapDC, handle);
/* Select the palette if necessary */
- int /*long*/ oldPalette = 0;
+ long /*int*/ oldPalette = 0;
if (!isDib && depth <= 8) {
- int /*long*/ hPalette = device.hPalette;
+ long /*int*/ hPalette = device.hPalette;
if (hPalette != 0) {
oldPalette = OS.SelectPalette(hBitmapDC, hPalette, false);
OS.RealizePalette(hBitmapDC);
@@ -1558,7 +1558,7 @@ void init(int width, int height) {
SWT.error (SWT.ERROR_INVALID_ARGUMENT);
}
type = SWT.BITMAP;
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
handle = OS.CreateCompatibleBitmap(hDC, width, height);
/*
* Feature in Windows. CreateCompatibleBitmap() may fail
@@ -1573,8 +1573,8 @@ void init(int width, int height) {
handle = createDIB(width, height, depth);
}
if (handle != 0) {
- int /*long*/ memDC = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldBitmap = OS.SelectObject(memDC, handle);
+ long /*int*/ memDC = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldBitmap = OS.SelectObject(memDC, handle);
OS.PatBlt(memDC, 0, 0, width, height, OS.PATCOPY);
OS.SelectObject(memDC, hOldBitmap);
OS.DeleteDC(memDC);
@@ -1585,7 +1585,7 @@ void init(int width, int height) {
}
}
-static int /*long*/ createDIB(int width, int height, int depth) {
+static long /*int*/ createDIB(int width, int height, int depth) {
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = width;
@@ -1617,7 +1617,7 @@ static int /*long*/ createDIB(int width, int height, int depth) {
bmi[offset + 11] = (byte)((blueMask & 0xFF) >> 0);
}
- int /*long*/[] pBits = new int /*long*/[1];
+ long /*int*/[] pBits = new long /*int*/[1];
return OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
}
@@ -1633,12 +1633,12 @@ static int /*long*/ createDIB(int width, int height, int depth) {
* if the regular GetIconInfo had been used.
*/
static void GetIconInfo(Image image, ICONINFO info) {
- int /*long*/ [] result = init(image.device, null, image.data);
+ long /*int*/ [] result = init(image.device, null, image.data);
info.hbmColor = result[0];
info.hbmMask = result[1];
}
-static int /*long*/ [] init(Device device, Image image, ImageData i) {
+static long /*int*/ [] init(Device device, Image image, ImageData i) {
/*
* BUG in Windows 98:
* A monochrome DIBSection will display as solid black
@@ -1794,8 +1794,8 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
offset += 4;
}
}
- int /*long*/[] pBits = new int /*long*/[1];
- int /*long*/ hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/[] pBits = new long /*int*/[1];
+ long /*int*/ hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (hDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
/* In case of a scanline pad other than 4, do the work to convert it */
byte[] data = i.data;
@@ -1804,17 +1804,17 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
}
OS.MoveMemory(pBits[0], data, data.length);
- int /*long*/ [] result = null;
+ long /*int*/ [] result = null;
if (i.getTransparencyType() == SWT.TRANSPARENCY_MASK) {
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/* Create the color bitmap */
- int /*long*/ hdcSrc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hdcSrc = OS.CreateCompatibleDC(hDC);
OS.SelectObject(hdcSrc, hDib);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap(hDC, i.width, i.height);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap(hDC, i.width, i.height);
if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ hdcDest = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hdcDest = OS.CreateCompatibleDC(hDC);
OS.SelectObject(hdcDest, hBitmap);
OS.BitBlt(hdcDest, 0, 0, i.width, i.height, hdcSrc, 0, 0, OS.SRCCOPY);
@@ -1823,7 +1823,7 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
/* Create the mask. Windows requires icon masks to have a scanline pad of 2. */
byte[] maskData = ImageData.convertPad(i.maskData, i.width, i.height, 1, i.maskPad, 2);
- int /*long*/ hMask = OS.CreateBitmap(i.width, i.height, 1, 1, maskData);
+ long /*int*/ hMask = OS.CreateBitmap(i.width, i.height, 1, 1, maskData);
if (hMask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.SelectObject(hdcSrc, hMask);
OS.PatBlt(hdcSrc, 0, 0, i.width, i.height, OS.DSTINVERT);
@@ -1832,14 +1832,14 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
OS.DeleteObject(hDib);
if (image == null) {
- result = new int /*long*/ []{hBitmap, hMask};
+ result = new long /*int*/ []{hBitmap, hMask};
} else {
/* Create the icon */
ICONINFO info = new ICONINFO();
info.fIcon = true;
info.hbmColor = hBitmap;
info.hbmMask = hMask;
- int /*long*/ hIcon = OS.CreateIconIndirect(info);
+ long /*int*/ hIcon = OS.CreateIconIndirect(info);
if (hIcon == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.DeleteObject(hBitmap);
OS.DeleteObject(hMask);
@@ -1849,7 +1849,7 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
}
} else {
if (image == null) {
- result = new int /*long*/ []{hDib};
+ result = new long /*int*/ []{hDib};
} else {
image.handle = hDib;
image.type = SWT.BITMAP;
@@ -1867,7 +1867,7 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
return result;
}
-static int /*long*/ [] init(Device device, Image image, ImageData source, ImageData mask) {
+static long /*int*/ [] init(Device device, Image image, ImageData source, ImageData mask) {
/* Create a temporary image and locate the black pixel */
ImageData imageData;
int blackIndex = 0;
@@ -1960,7 +1960,7 @@ void init(ImageData i) {
*
* @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 (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
/*
* Create a new GC that can draw into the image.
@@ -1971,8 +1971,8 @@ public int /*long*/ internal_new_GC (GCData data) {
}
/* Create a compatible HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ imageDC = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ imageDC = OS.CreateCompatibleDC(hDC);
device.internal_dispose_GC(hDC, null);
if (imageDC == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -2006,7 +2006,7 @@ 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) {
+public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
OS.DeleteDC(hDC);
}
@@ -2070,12 +2070,12 @@ public void setBackground(Color color) {
transparentColor = -1;
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/* Change the background color in the image */
BITMAP bm = new BITMAP();
OS.GetObject(handle, BITMAP.sizeof, bm);
- int /*long*/ hdcMem = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hdcMem = OS.CreateCompatibleDC(hDC);
OS.SelectObject(hdcMem, handle);
int maxColors = 1 << bm.bmBitsPixel;
byte[] colors = new byte[maxColors * 4];
@@ -2121,7 +2121,7 @@ public String toString () {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Image win32_new(Device device, int type, int /*long*/ handle) {
+public static Image win32_new(Device device, int type, long /*int*/ handle) {
Image image = new Image(device);
image.type = type;
image.handle = handle;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
index 44c6bbb375..496a995d9b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
@@ -49,7 +49,7 @@ public class Path extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
PointF currentPoint = new PointF(), startPoint = new PointF();
@@ -199,9 +199,9 @@ public void addArc(float x, float y, float width, float height, float startAngle
if (width == height) {
Gdip.GraphicsPath_AddArc(handle, x, y, width, height, -startAngle, -arcAngle);
} else {
- int /*long*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
+ long /*int*/ matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.GraphicsPath_AddArc(path, 0, 0, 1, 1, -startAngle, -arcAngle);
Gdip.GraphicsPath_Transform(path, matrix);
@@ -283,9 +283,9 @@ public void addString(String string, float x, float y, Font font) {
int length = string.length();
char[] buffer = new char[length];
string.getChars(0, length, buffer, 0);
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ [] family = new int /*long*/ [1];
- int /*long*/ gdipFont = GC.createGdipFont(hDC, font.handle, 0, device.fontCollection, family, null);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ [] family = new long /*int*/ [1];
+ long /*int*/ gdipFont = GC.createGdipFont(hDC, font.handle, 0, device.fontCollection, family, null);
PointF point = new PointF();
point.X = x - (Gdip.Font_GetSize(gdipFont) / 6);
point.Y = y;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java
index 8c094dda81..f1178eeecd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java
@@ -47,7 +47,7 @@ public class Pattern extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
/**
* Constructs a new Pattern given an image. Drawing with the resulting
@@ -79,14 +79,14 @@ public Pattern(Device device, Image image) {
if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
this.device.checkGDIP();
- int /*long*/[] gdipImage = image.createGdipImage();
- int /*long*/ img = gdipImage[0];
+ long /*int*/[] gdipImage = image.createGdipImage();
+ long /*int*/ img = gdipImage[0];
int width = Gdip.Image_GetWidth(img);
int height = Gdip.Image_GetHeight(img);
handle = Gdip.TextureBrush_new(img, Gdip.WrapModeTile, 0, 0, width, height);
Gdip.Bitmap_delete(img);
if (gdipImage[1] != 0) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree(hHeap, 0, gdipImage[1]);
}
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -174,14 +174,14 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo
this.device.checkGDIP();
int colorRef1 = color1.handle;
int rgb = ((colorRef1 >> 16) & 0xFF) | (colorRef1 & 0xFF00) | ((colorRef1 & 0xFF) << 16);
- int /*long*/ foreColor = Gdip.Color_new((alpha1 & 0xFF) << 24 | rgb);
+ long /*int*/ foreColor = Gdip.Color_new((alpha1 & 0xFF) << 24 | rgb);
if (x1 == x2 && y1 == y2) {
handle = Gdip.SolidBrush_new(foreColor);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
} else {
int colorRef2 = color2.handle;
rgb = ((colorRef2 >> 16) & 0xFF) | (colorRef2 & 0xFF00) | ((colorRef2 & 0xFF) << 16);
- int /*long*/ backColor = Gdip.Color_new((alpha2 & 0xFF) << 24 | rgb);
+ long /*int*/ backColor = Gdip.Color_new((alpha2 & 0xFF) << 24 | rgb);
PointF p1 = new PointF();
p1.X = x1;
p1.Y = y1;
@@ -195,8 +195,8 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo
int r = (int)(((colorRef1 & 0xFF) >> 0) * 0.5f + ((colorRef2 & 0xFF) >> 0) * 0.5f);
int g = (int)(((colorRef1 & 0xFF00) >> 8) * 0.5f + ((colorRef2 & 0xFF00) >> 8) * 0.5f);
int b = (int)(((colorRef1 & 0xFF0000) >> 16) * 0.5f + ((colorRef2 & 0xFF0000) >> 16) * 0.5f);
- int /*long*/ midColor = Gdip.Color_new(a << 24 | r << 16 | g << 8 | b);
- Gdip.LinearGradientBrush_SetInterpolationColors(handle, new int /*long*/ []{foreColor, midColor, backColor}, new float[]{0, 0.5f, 1}, 3);
+ long /*int*/ midColor = Gdip.Color_new(a << 24 | r << 16 | g << 8 | b);
+ Gdip.LinearGradientBrush_SetInterpolationColors(handle, new long /*int*/ []{foreColor, midColor, backColor}, new float[]{0, 0.5f, 1}, 3);
Gdip.Color_delete(midColor);
}
Gdip.Color_delete(backColor);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
index f1d7800e8a..4382821950 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
@@ -42,7 +42,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.
@@ -112,7 +112,7 @@ public void add (int[] pointArray) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
- int /*long*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
+ long /*int*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
OS.CombineRgn (handle, handle, polyRgn, OS.RGN_OR);
OS.DeleteObject (polyRgn);
}
@@ -158,7 +158,7 @@ public void add (Rectangle rect) {
public void add (int x, int y, int width, int height) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
+ long /*int*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
OS.CombineRgn (handle, handle, rectRgn, OS.RGN_OR);
OS.DeleteObject (rectRgn);
}
@@ -323,7 +323,7 @@ public void intersect (Rectangle rect) {
public void intersect (int x, int y, int width, int height) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
+ long /*int*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
OS.CombineRgn (handle, handle, rectRgn, OS.RGN_AND);
OS.DeleteObject (rectRgn);
}
@@ -451,7 +451,7 @@ public void subtract (int[] pointArray) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
- int /*long*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
+ long /*int*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
OS.CombineRgn (handle, handle, polyRgn, OS.RGN_DIFF);
OS.DeleteObject (polyRgn);
}
@@ -499,7 +499,7 @@ public void subtract (Rectangle rect) {
public void subtract (int x, int y, int width, int height) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
+ long /*int*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
OS.CombineRgn (handle, handle, rectRgn, OS.RGN_DIFF);
OS.DeleteObject (rectRgn);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
index 3816b1273a..0896598a92 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
@@ -54,7 +54,7 @@ public final class TextLayout extends Resource {
StyleItem[] allRuns;
StyleItem[][] runs;
int[] lineOffset, lineY, lineWidth;
- int /*long*/ mLangFontLink2;
+ long /*int*/ mLangFontLink2;
static final char LTR_MARK = '\u200E', RTL_MARK = '\u200F';
static final int SCRIPT_VISATTR_SIZEOF = 2;
@@ -81,17 +81,17 @@ public final class TextLayout extends Resource {
/*Script cache and analysis */
SCRIPT_ANALYSIS analysis;
- int /*long*/ psc = 0;
+ long /*int*/ psc = 0;
/*Shape info (malloc when the run is shaped) */
- int /*long*/ glyphs;
+ long /*int*/ glyphs;
int glyphCount;
- int /*long*/ clusters;
- int /*long*/ visAttrs;
+ long /*int*/ clusters;
+ long /*int*/ visAttrs;
/*Place info (malloc when the run is placed) */
- int /*long*/ advances;
- int /*long*/ goffsets;
+ long /*int*/ advances;
+ long /*int*/ goffsets;
int width;
int ascent;
int descent;
@@ -101,15 +101,15 @@ public final class TextLayout extends Resource {
int strikeoutPos, strikeoutThickness;
/* Justify info (malloc during computeRuns) */
- int /*long*/ justify;
+ long /*int*/ justify;
/* ScriptBreak */
- int /*long*/ psla;
+ long /*int*/ psla;
- int /*long*/ fallbackFont;
+ long /*int*/ fallbackFont;
void free() {
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
if (psc != 0) {
OS.ScriptFreeCache (psc);
OS.HeapFree(hHeap, 0, psc);
@@ -180,7 +180,7 @@ public TextLayout (Device device) {
styles[1] = new StyleItem();
stylesCount = 2;
text = ""; //$NON-NLS-1$
- int /*long*/[] ppv = new int /*long*/[1];
+ long /*int*/[] ppv = new long /*int*/[1];
OS.OleInitialize(0);
if (OS.CoCreateInstance(CLSID_CMultiLanguage, 0, OS.CLSCTX_INPROC_SERVER, IID_IMLangFontLink2, ppv) == OS.S_OK) {
mLangFontLink2 = ppv[0];
@@ -217,7 +217,7 @@ void breakRun(StyleItem run) {
if (run.psla != 0) return;
char[] chars = new char[run.length];
segmentsText.getChars(run.start, run.start + run.length, chars, 0);
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
run.psla = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, SCRIPT_LOGATTR.sizeof * chars.length);
if (run.psla == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.ScriptBreak(chars, chars.length, run.analysis, run.psla);
@@ -233,8 +233,8 @@ void checkLayout () {
*/
void computeRuns (GC gc) {
if (runs != null) return;
- int /*long*/ hDC = gc != null ? gc.handle : device.internal_new_GC(null);
- int /*long*/ srcHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hDC = gc != null ? gc.handle : device.internal_new_GC(null);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
allRuns = itemize();
for (int i=0; i<allRuns.length - 1; i++) {
StyleItem run = allRuns[i];
@@ -419,7 +419,7 @@ void computeRuns (GC gc) {
}
}
lineWidth += lineIndent;
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
int newLineWidth = 0;
for (int j = 0; j < runs[line].length; j++) {
StyleItem item = runs[line][j];
@@ -530,15 +530,15 @@ int[] computePolyline(int left, int top, int right, int bottom) {
return coordinates;
}
-int /*long*/ createGdipBrush(int pixel, int alpha) {
+long /*int*/ createGdipBrush(int pixel, int alpha) {
int argb = ((alpha & 0xFF) << 24) | ((pixel >> 16) & 0xFF) | (pixel & 0xFF00) | ((pixel & 0xFF) << 16);
- int /*long*/ gdiColor = Gdip.Color_new(argb);
- int /*long*/ brush = Gdip.SolidBrush_new(gdiColor);
+ long /*int*/ gdiColor = Gdip.Color_new(argb);
+ long /*int*/ brush = Gdip.SolidBrush_new(gdiColor);
Gdip.Color_delete(gdiColor);
return brush;
}
-int /*long*/ createGdipBrush(Color color, int alpha) {
+long /*int*/ createGdipBrush(Color color, int alpha) {
return createGdipBrush(color.handle, alpha);
}
@@ -620,16 +620,16 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
if (selectionBackground != null && selectionBackground.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
int length = text.length();
if (length == 0 && flags == 0) return;
- int /*long*/ hdc = gc.handle;
+ long /*int*/ hdc = gc.handle;
Rectangle clip = gc.getClipping();
GCData data = gc.data;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
int foreground = data.foreground;
int linkColor = OS.GetSysColor (OS.COLOR_HOTLIGHT);
int alpha = data.alpha;
boolean gdip = gdipGraphics != 0;
- int /*long*/ gdipForeground = 0;
- int /*long*/ gdipLinkColor = 0;
+ long /*int*/ gdipForeground = 0;
+ long /*int*/ gdipLinkColor = 0;
int state = 0;
if (gdip) {
gc.checkGC(GC.FOREGROUND);
@@ -641,8 +641,8 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
}
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
- int /*long*/ gdipSelBackground = 0, gdipSelForeground = 0, gdipFont = 0, lastHFont = 0;
- int /*long*/ selBackground = 0;
+ long /*int*/ gdipSelBackground = 0, gdipSelForeground = 0, gdipFont = 0, lastHFont = 0;
+ long /*int*/ selBackground = 0;
int selForeground = 0;
if (hasSelection || ((flags & SWT.LAST_LINE_SELECTION) != 0 && (flags & (SWT.FULL_SELECTION | SWT.DELIMITER_SELECTION)) != 0)) {
int fgSel = selectionForeground != null ? selectionForeground.handle : OS.GetSysColor (OS.COLOR_HIGHLIGHTTEXT);
@@ -740,11 +740,11 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
if (!skipTab && (!run.lineBreak || run.softBreak) && !(style != null && style.metrics != null)) {
OS.SetRect(rect, drawX, drawY, drawX + run.width, drawY + lineHeight);
if (gdip) {
- int /*long*/ hFont = getItemFont(run);
+ long /*int*/ hFont = getItemFont(run);
if (hFont != lastHFont) {
lastHFont = hFont;
if (gdipFont != 0) Gdip.Font_delete(gdipFont);
- int /*long*/ oldFont = OS.SelectObject(hdc, hFont);
+ long /*int*/ oldFont = OS.SelectObject(hdc, hFont);
gdipFont = Gdip.Font_new(hdc, hFont);
OS.SelectObject(hdc, oldFont);
if (gdipFont == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -753,7 +753,7 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
gdipFont = 0;
}
}
- int /*long*/ gdipFg = gdipForeground;
+ long /*int*/ gdipFg = gdipForeground;
if (style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK) {
if (gdipLinkColor == 0) gdipLinkColor = createGdipBrush(linkColor, alpha);
gdipFg = gdipLinkColor;
@@ -787,7 +787,7 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
if (selBackground != 0) OS.DeleteObject (selBackground);
}
-RECT drawBorder(int /*long*/ hdc, int x, int y, int lineHeight, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
+RECT drawBorder(long /*int*/ hdc, int x, int y, int lineHeight, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -834,12 +834,12 @@ RECT drawBorder(int /*long*/ hdc, int x, int y, int lineHeight, StyleItem[] line
break;
}
}
- int /*long*/ oldBrush = OS.SelectObject(hdc, OS.GetStockObject(OS.NULL_BRUSH));
+ long /*int*/ oldBrush = OS.SelectObject(hdc, OS.GetStockObject(OS.NULL_BRUSH));
LOGBRUSH logBrush = new LOGBRUSH();
logBrush.lbStyle = OS.BS_SOLID;
logBrush.lbColor = /*64*/(int)color;
- int /*long*/ newPen = OS.ExtCreatePen(lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
- int /*long*/ oldPen = OS.SelectObject(hdc, newPen);
+ long /*int*/ newPen = OS.ExtCreatePen(lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
+ long /*int*/ oldPen = OS.SelectObject(hdc, newPen);
RECT drawRect = new RECT();
OS.SetRect(drawRect, x + left, y, x + run.x + run.width, y + lineHeight);
if (drawClip != null) {
@@ -861,7 +861,7 @@ RECT drawBorder(int /*long*/ hdc, int x, int y, int lineHeight, StyleItem[] line
if (clipRect.right == -1) clipRect.right = 0x7ffff;
OS.IntersectClipRect(hdc, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
logBrush.lbColor = /*64*/(int)selectionColor;
- int /*long*/ selPen = OS.ExtCreatePen (lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
+ long /*int*/ selPen = OS.ExtCreatePen (lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
oldPen = OS.SelectObject(hdc, selPen);
OS.Rectangle(hdc, drawRect.left, drawRect.top, drawRect.right, drawRect.bottom);
OS.RestoreDC(hdc, state);
@@ -874,7 +874,7 @@ RECT drawBorder(int /*long*/ hdc, int x, int y, int lineHeight, StyleItem[] line
return clipRect;
}
-RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleItem[] line, int index, int /*long*/ color, int /*long*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
+RECT drawBorderGDIP(long /*int*/ graphics, int x, int y, int lineHeight, StyleItem[] line, int index, long /*int*/ color, long /*int*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -892,7 +892,7 @@ RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleIt
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= start && end <= selectionEnd;
- int /*long*/ brush = color;
+ long /*int*/ brush = color;
if (style.borderColor != null) {
brush = createGdipBrush(style.borderColor, alpha);
clipRect = null;
@@ -913,7 +913,7 @@ RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleIt
case SWT.BORDER_DASH: lineStyle = Gdip.DashStyleDash; break;
case SWT.BORDER_DOT: lineStyle = Gdip.DashStyleDot; break;
}
- int /*long*/ pen = Gdip.Pen_new(brush, lineWidth);
+ long /*int*/ pen = Gdip.Pen_new(brush, lineWidth);
Gdip.Pen_SetDashStyle(pen, lineStyle);
Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeNone);
int smoothingMode = Gdip.Graphics_GetSmoothingMode(graphics);
@@ -932,7 +932,7 @@ RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleIt
Gdip.Graphics_Restore(graphics, gstate);
gstate = Gdip.Graphics_Save(graphics);
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeIntersect);
- int /*long*/ selPen = Gdip.Pen_new(selectionColor, lineWidth);
+ long /*int*/ selPen = Gdip.Pen_new(selectionColor, lineWidth);
Gdip.Pen_SetDashStyle(selPen, lineStyle);
Gdip.Graphics_DrawRectangle(graphics, selPen, x + left, y, run.x + run.width - left - 1, lineHeight - 1);
Gdip.Pen_delete(selPen);
@@ -949,7 +949,7 @@ RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleIt
return clipRect;
}
-void drawRunBackground(StyleItem run, int /*long*/ hdc, RECT rect, int selectionStart, int selectionEnd, int /*long*/ selBrush, boolean hasSelection) {
+void drawRunBackground(StyleItem run, long /*int*/ hdc, RECT rect, int selectionStart, int selectionEnd, long /*int*/ selBrush, boolean hasSelection) {
int end = run.start + run.length - 1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
if (fullSelection) {
@@ -958,8 +958,8 @@ void drawRunBackground(StyleItem run, int /*long*/ hdc, RECT rect, int selection
} else {
if (run.style != null && run.style.background != null) {
int bg = run.style.background.handle;
- int /*long*/ hBrush = OS.CreateSolidBrush (bg);
- int /*long*/ oldBrush = OS.SelectObject(hdc, hBrush);
+ long /*int*/ hBrush = OS.CreateSolidBrush (bg);
+ long /*int*/ oldBrush = OS.SelectObject(hdc, hBrush);
OS.PatBlt(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject(hdc, oldBrush);
OS.DeleteObject(hBrush);
@@ -973,14 +973,14 @@ void drawRunBackground(StyleItem run, int /*long*/ hdc, RECT rect, int selection
}
}
-void drawRunBackgroundGDIP(StyleItem run, int /*long*/ graphics, RECT rect, int selectionStart, int selectionEnd, int alpha, int /*long*/ selBrush, boolean hasSelection) {
+void drawRunBackgroundGDIP(StyleItem run, long /*int*/ graphics, RECT rect, int selectionStart, int selectionEnd, int alpha, long /*int*/ selBrush, boolean hasSelection) {
int end = run.start + run.length - 1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
if (fullSelection) {
Gdip.Graphics_FillRectangle(graphics, selBrush, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
} else {
if (run.style != null && run.style.background != null) {
- int /*long*/ brush = createGdipBrush(run.style.background, alpha);
+ long /*int*/ brush = createGdipBrush(run.style.background, alpha);
Gdip.Graphics_FillRectangle(graphics, brush, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
Gdip.SolidBrush_delete(brush);
}
@@ -997,7 +997,7 @@ void drawRunBackgroundGDIP(StyleItem run, int /*long*/ graphics, RECT rect, int
}
}
-RECT drawRunText(int /*long*/ hdc, StyleItem run, RECT rect, int baseline, int color, int selectionColor, int selectionStart, int selectionEnd) {
+RECT drawRunText(long /*int*/ hdc, StyleItem run, RECT rect, int baseline, int color, int selectionColor, int selectionStart, int selectionEnd) {
int end = run.start + run.length - 1;
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
@@ -1005,7 +1005,7 @@ RECT drawRunText(int /*long*/ hdc, StyleItem run, RECT rect, int baseline, int c
int offset = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? -1 : 0;
int x = rect.left + offset;
int y = rect.top + (baseline - run.ascent);
- int /*long*/ hFont = getItemFont(run);
+ long /*int*/ hFont = getItemFont(run);
OS.SelectObject(hdc, hFont);
if (fullSelection) {
color = selectionColor;
@@ -1024,7 +1024,7 @@ RECT drawRunText(int /*long*/ hdc, StyleItem run, RECT rect, int baseline, int c
return fullSelection || partialSelection ? rect : null;
}
-RECT drawRunTextGDIP(int /*long*/ graphics, StyleItem run, RECT rect, int /*long*/ gdipFont, int baseline, int /*long*/ color, int /*long*/ selectionColor, int selectionStart, int selectionEnd, int alpha) {
+RECT drawRunTextGDIP(long /*int*/ graphics, StyleItem run, RECT rect, long /*int*/ gdipFont, int baseline, long /*int*/ color, long /*int*/ selectionColor, int selectionStart, int selectionEnd, int alpha) {
int end = run.start + run.length - 1;
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
@@ -1032,7 +1032,7 @@ RECT drawRunTextGDIP(int /*long*/ graphics, StyleItem run, RECT rect, int /*long
int drawY = rect.top + baseline;
if (run.style != null && run.style.rise != 0) drawY -= run.style.rise;
int drawX = rect.left;
- int /*long*/ brush = color;
+ long /*int*/ brush = color;
if (fullSelection) {
brush = selectionColor;
} else {
@@ -1109,10 +1109,10 @@ RECT drawRunTextGDIP(int /*long*/ graphics, StyleItem run, RECT rect, int /*long
return fullSelection || partialSelection ? rect : null;
}
-RECT drawRunTextGDIPRaster(int /*long*/ graphics, StyleItem run, RECT rect, int baseline, int color, int selectionColor, int selectionStart, int selectionEnd) {
- int /*long*/ clipRgn = 0;
+RECT drawRunTextGDIPRaster(long /*int*/ graphics, StyleItem run, RECT rect, int baseline, int color, int selectionColor, int selectionStart, int selectionEnd) {
+ long /*int*/ clipRgn = 0;
Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeNone);
- int /*long*/ rgn = Gdip.Region_new();
+ long /*int*/ rgn = Gdip.Region_new();
if (rgn == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetClip(graphics, rgn);
if (!Gdip.Region_IsInfinite(rgn, graphics)) {
@@ -1121,7 +1121,7 @@ RECT drawRunTextGDIPRaster(int /*long*/ graphics, StyleItem run, RECT rect, int
Gdip.Region_delete(rgn);
Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeHalf);
float[] lpXform = null;
- int /*long*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetTransform(graphics, matrix);
if (!Gdip.Matrix_IsIdentity(matrix)) {
@@ -1129,7 +1129,7 @@ RECT drawRunTextGDIPRaster(int /*long*/ graphics, StyleItem run, RECT rect, int
Gdip.Matrix_GetElements(matrix, lpXform);
}
Gdip.Matrix_delete(matrix);
- int /*long*/ hdc = Gdip.Graphics_GetHDC(graphics);
+ long /*int*/ hdc = Gdip.Graphics_GetHDC(graphics);
int state = OS.SaveDC(hdc);
if (lpXform != null) {
OS.SetGraphicsMode(hdc, OS.GM_ADVANCED);
@@ -1149,7 +1149,7 @@ RECT drawRunTextGDIPRaster(int /*long*/ graphics, StyleItem run, RECT rect, int
return pRect;
}
-RECT drawStrikeout(int /*long*/ hdc, int x, int baseline, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
+RECT drawStrikeout(long /*int*/ hdc, int x, int baseline, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -1182,11 +1182,11 @@ RECT drawStrikeout(int /*long*/ hdc, int x, int baseline, StyleItem[] line, int
}
RECT rect = new RECT();
OS.SetRect(rect, x + left, baseline - run.strikeoutPos - style.rise, x + run.x + run.width, baseline - run.strikeoutPos + run.strikeoutThickness - style.rise);
- int /*long*/ brush = OS.CreateSolidBrush(color);
+ long /*int*/ brush = OS.CreateSolidBrush(color);
OS.FillRect(hdc, rect, brush);
OS.DeleteObject(brush);
if (clipRect != null) {
- int /*long*/ selBrush = OS.CreateSolidBrush(selectionColor);
+ long /*int*/ selBrush = OS.CreateSolidBrush(selectionColor);
if (clipRect.left == -1) clipRect.left = 0;
if (clipRect.right == -1) clipRect.right = 0x7ffff;
OS.SetRect(clipRect, Math.max(rect.left, clipRect.left), rect.top, Math.min(rect.right, clipRect.right), rect.bottom);
@@ -1198,7 +1198,7 @@ RECT drawStrikeout(int /*long*/ hdc, int x, int baseline, StyleItem[] line, int
return clipRect;
}
-RECT drawStrikeoutGDIP(int /*long*/ graphics, int x, int baseline, StyleItem[] line, int index, int /*long*/ color, int /*long*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
+RECT drawStrikeoutGDIP(long /*int*/ graphics, int x, int baseline, StyleItem[] line, int index, long /*int*/ color, long /*int*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -1216,7 +1216,7 @@ RECT drawStrikeoutGDIP(int /*long*/ graphics, int x, int baseline, StyleItem[] l
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= start && end <= selectionEnd;
- int /*long*/ brush = color;
+ long /*int*/ brush = color;
if (style.strikeoutColor != null) {
brush = createGdipBrush(style.strikeoutColor, alpha);
clipRect = null;
@@ -1255,7 +1255,7 @@ RECT drawStrikeoutGDIP(int /*long*/ graphics, int x, int baseline, StyleItem[] l
return clipRect;
}
-RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
+RECT drawUnderline(long /*int*/ hdc, int x, int baseline, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -1300,8 +1300,8 @@ RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos,
int squigglyHeight = 2 * squigglyThickness;
int squigglyY = Math.min(rect.top - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
int[] points = computePolyline(rect.left, squigglyY, rect.right, squigglyY + squigglyHeight);
- int /*long*/ pen = OS.CreatePen(OS.PS_SOLID, squigglyThickness, color);
- int /*long*/ oldPen = OS.SelectObject(hdc, pen);
+ long /*int*/ pen = OS.CreatePen(OS.PS_SOLID, squigglyThickness, color);
+ long /*int*/ oldPen = OS.SelectObject(hdc, pen);
int state = OS.SaveDC(hdc);
OS.IntersectClipRect(hdc, rect.left, squigglyY, rect.right + 1, squigglyY + squigglyHeight + 1);
OS.Polyline(hdc, points, points.length / 2);
@@ -1340,7 +1340,7 @@ RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos,
OS.OffsetRect(rect, 0, lineBottom - bottom);
if (clipRect != null) OS.OffsetRect(clipRect, 0, lineBottom - bottom);
}
- int /*long*/ brush = OS.CreateSolidBrush(color);
+ long /*int*/ brush = OS.CreateSolidBrush(color);
OS.FillRect(hdc, rect, brush);
if (style.underlineStyle == SWT.UNDERLINE_DOUBLE) {
OS.SetRect(rect, rect.left, rect.top + run.underlineThickness * 2, rect.right, rect.bottom + run.underlineThickness * 2);
@@ -1348,7 +1348,7 @@ RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos,
}
OS.DeleteObject(brush);
if (clipRect != null) {
- int /*long*/ selBrush = OS.CreateSolidBrush(selectionColor);
+ long /*int*/ selBrush = OS.CreateSolidBrush(selectionColor);
OS.FillRect(hdc, clipRect, selBrush);
if (style.underlineStyle == SWT.UNDERLINE_DOUBLE) {
OS.SetRect(clipRect, clipRect.left, rect.top, clipRect.right, rect.bottom);
@@ -1360,8 +1360,8 @@ RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos,
case UNDERLINE_IME_DASH:
case UNDERLINE_IME_DOT: {
int penStyle = style.underlineStyle == UNDERLINE_IME_DASH ? OS.PS_DASH : OS.PS_DOT;
- int /*long*/ pen = OS.CreatePen(penStyle, 1, color);
- int /*long*/ oldPen = OS.SelectObject(hdc, pen);
+ long /*int*/ pen = OS.CreatePen(penStyle, 1, color);
+ long /*int*/ oldPen = OS.SelectObject(hdc, pen);
OS.SetRect(rect, rect.left, baseline + run.descent, rect.right, baseline + run.descent + run.underlineThickness);
OS.MoveToEx(hdc, rect.left, rect.top, 0);
OS.LineTo(hdc, rect.right, rect.top);
@@ -1384,7 +1384,7 @@ RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos,
return clipRect;
}
-RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, int /*long*/ color, int /*long*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
+RECT drawUnderlineGDIP (long /*int*/ graphics, int x, int baseline, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, long /*int*/ color, long /*int*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -1402,7 +1402,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= start && end <= selectionEnd;
- int /*long*/ brush = color;
+ long /*int*/ brush = color;
if (style.underlineColor != null) {
brush = createGdipBrush(style.underlineColor, alpha);
clipRect = null;
@@ -1440,7 +1440,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
int squigglyHeight = 2 * squigglyThickness;
int squigglyY = Math.min(rect.top - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
int[] points = computePolyline(rect.left, squigglyY, rect.right, squigglyY + squigglyHeight);
- int /*long*/ pen = Gdip.Pen_new(brush, squigglyThickness);
+ long /*int*/ pen = Gdip.Pen_new(brush, squigglyThickness);
gstate = Gdip.Graphics_Save(graphics);
if (gdipRect != null) {
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeExclude);
@@ -1454,7 +1454,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
}
Gdip.Graphics_DrawLines(graphics, pen, points, points.length / 2);
if (gdipRect != null) {
- int /*long*/ selPen = Gdip.Pen_new(selectionColor, squigglyThickness);
+ long /*int*/ selPen = Gdip.Pen_new(selectionColor, squigglyThickness);
Gdip.Graphics_Restore(graphics, gstate);
gstate = Gdip.Graphics_Save(graphics);
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeIntersect);
@@ -1505,7 +1505,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
break;
case UNDERLINE_IME_DOT:
case UNDERLINE_IME_DASH: {
- int /*long*/ pen = Gdip.Pen_new(brush, 1);
+ long /*int*/ pen = Gdip.Pen_new(brush, 1);
int dashStyle = style.underlineStyle == UNDERLINE_IME_DOT ? Gdip.DashStyleDot : Gdip.DashStyleDash;
Gdip.Pen_SetDashStyle(pen, dashStyle);
if (gdipRect != null) {
@@ -1517,7 +1517,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
Gdip.Graphics_Restore(graphics, gstate);
gstate = Gdip.Graphics_Save(graphics);
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeIntersect);
- int /*long*/ selPen = Gdip.Pen_new(brush, 1);
+ long /*int*/ selPen = Gdip.Pen_new(brush, 1);
Gdip.Pen_SetDashStyle(selPen, dashStyle);
Gdip.Graphics_DrawLine(graphics, selPen, rect.left, baseline + run.descent, run.width - run.length, baseline + run.descent);
Gdip.Graphics_Restore(graphics, gstate);
@@ -1670,7 +1670,7 @@ public Rectangle getBounds (int start, int end) {
cx = metrics.width * (start - run.start);
} else if (!run.tab) {
int[] piX = new int[1];
- int /*long*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptCPtoX(start - run.start, false, run.length, run.glyphCount, run.clusters, run.visAttrs, advances, run.analysis, piX);
cx = isRTL ? run.width - piX[0] : piX[0];
}
@@ -1687,7 +1687,7 @@ public Rectangle getBounds (int start, int end) {
cx = metrics.width * (end - run.start + 1);
} else if (!run.tab) {
int[] piX = new int[1];
- int /*long*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptCPtoX(end - run.start, true, run.length, run.glyphCount, run.clusters, run.visAttrs, advances, run.analysis, piX);
cx = isRTL ? run.width - piX[0] : piX[0];
}
@@ -1775,7 +1775,7 @@ public boolean getJustify () {
return justify;
}
-int /*long*/ getItemFont (StyleItem item) {
+long /*int*/ getItemFont (StyleItem item) {
if (item.fallbackFont != 0) return item.fallbackFont;
if (item.style != null && item.style.font != null) {
return item.style.font.handle;
@@ -1929,8 +1929,8 @@ public FontMetrics getLineMetrics (int lineIndex) {
checkLayout();
computeRuns(null);
if (!(0 <= lineIndex && lineIndex < runs.length)) SWT.error(SWT.ERROR_INVALID_RANGE);
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ srcHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
OS.SelectObject(srcHdc, font != null ? font.handle : device.systemFont.handle);
OS.GetTextMetrics(srcHdc, lptm);
@@ -2053,7 +2053,7 @@ public Point getLocation (int offset, boolean trailing) {
int cChars = run.length;
int gGlyphs = run.glyphCount;
int[] piX = new int[1];
- int /*long*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptCPtoX(runOffset, trailing, cChars, gGlyphs, run.clusters, run.visAttrs, advances, run.analysis, piX);
width = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? run.width - piX[0] : piX[0];
}
@@ -2263,7 +2263,7 @@ public int getOffset (int x, int y, int[] trailing) {
if ((orientation & SWT.RIGHT_TO_LEFT) != 0) {
xRun = run.width - xRun;
}
- int /*long*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptXtoCP(xRun, cChars, cGlyphs, run.clusters, run.visAttrs, advances, run.analysis, piCP, piTrailing);
int offset = run.start + piCP[0];
int length = segmentsText.length();
@@ -2319,7 +2319,7 @@ void getPartialSelection(StyleItem run, int selectionStart, int selectionEnd, RE
int gGlyphs = run.glyphCount;
int[] piX = new int[1];
int x = rect.left;
- int /*long*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptCPtoX(selStart, false, cChars, gGlyphs, run.clusters, run.visAttrs, advances, run.analysis, piX);
int runX = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? run.width - piX[0] : piX[0];
rect.left = x + runX;
@@ -2621,8 +2621,8 @@ StyleItem[] itemize () {
OS.ScriptApplyDigitSubstitution(null, scriptControl, scriptState);
- int /*long*/ hHeap = OS.GetProcessHeap();
- int /*long*/ pItems = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, MAX_ITEM * SCRIPT_ITEM.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ pItems = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, MAX_ITEM * SCRIPT_ITEM.sizeof);
if (pItems == 0) SWT.error(SWT.ERROR_NO_HANDLES);
int[] pcItems = new int[1];
char[] chars = new char[length];
@@ -2638,7 +2638,7 @@ StyleItem[] itemize () {
/*
* Merge styles ranges and script items
*/
-StyleItem[] merge (int /*long*/ items, int itemCount) {
+StyleItem[] merge (long /*int*/ items, int itemCount) {
if (styles.length > stylesCount) {
StyleItem[] newStyles = new StyleItem[stylesCount];
System.arraycopy(styles, 0, newStyles, 0, stylesCount);
@@ -3233,7 +3233,7 @@ public void setWrapIndent (int wrapIndent) {
this.wrapIndent = wrapIndent;
}
-boolean shape (int /*long*/ hdc, StyleItem run, char[] chars, int[] glyphCount, int maxGlyphs, SCRIPT_PROPERTIES sp) {
+boolean shape (long /*int*/ hdc, StyleItem run, char[] chars, int[] glyphCount, int maxGlyphs, SCRIPT_PROPERTIES sp) {
boolean useCMAPcheck = !sp.fComplex && !run.analysis.fNoGlyphIndex;
if (useCMAPcheck) {
short[] glyphs = new short[chars.length];
@@ -3241,7 +3241,7 @@ boolean shape (int /*long*/ hdc, StyleItem run, char[] chars, int[] glyphCount,
if (run.psc != 0) {
OS.ScriptFreeCache(run.psc);
glyphCount[0] = 0;
- OS.MoveMemory(run.psc, new int /*long*/ [1], OS.PTR_SIZEOF);
+ OS.MoveMemory(run.psc, new long /*int*/ [1], OS.PTR_SIZEOF);
}
return false;
}
@@ -3266,7 +3266,7 @@ boolean shape (int /*long*/ hdc, StyleItem run, char[] chars, int[] glyphCount,
if (run.psc != 0) {
OS.ScriptFreeCache(run.psc);
glyphCount[0] = 0;
- OS.MoveMemory(run.psc, new int /*long*/ [1], OS.PTR_SIZEOF);
+ OS.MoveMemory(run.psc, new long /*int*/ [1], OS.PTR_SIZEOF);
}
run.glyphCount = 0;
return false;
@@ -3275,7 +3275,7 @@ boolean shape (int /*long*/ hdc, StyleItem run, char[] chars, int[] glyphCount,
/*
* Generate glyphs for one Run.
*/
-void shape (final int /*long*/ hdc, final StyleItem run) {
+void shape (final long /*int*/ hdc, final StyleItem run) {
if (run.tab || run.lineBreak) return;
if (run.glyphs != 0) return;
final int[] buffer = new int[1];
@@ -3283,7 +3283,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
segmentsText.getChars(run.start, run.start + run.length, chars, 0);
final int maxGlyphs = (chars.length * 3 / 2) + 16;
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
run.glyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, maxGlyphs * 2);
if (run.glyphs == 0) SWT.error(SWT.ERROR_NO_HANDLES);
run.clusters = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, maxGlyphs * 2);
@@ -3303,8 +3303,8 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
}
}
if (!shapeSucceed) {
- int /*long*/ hFont = OS.GetCurrentObject(hdc, OS.OBJ_FONT);
- int /*long*/ newFont = 0;
+ long /*int*/ hFont = OS.GetCurrentObject(hdc, OS.OBJ_FONT);
+ long /*int*/ newFont = 0;
/*
* Bug in Uniscribe. In some version of Uniscribe, ScriptStringAnalyse crashes
* when the character array is too long. The fix is to limit the size of character
@@ -3323,9 +3323,9 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
}
}
if (count > 0) {
- int /*long*/ ssa = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, OS.SCRIPT_STRING_ANALYSIS_sizeof());
- int /*long*/ metaFileDc = OS.CreateEnhMetaFile(hdc, null, null, null);
- int /*long*/ oldMetaFont = OS.SelectObject(metaFileDc, hFont);
+ long /*int*/ ssa = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, OS.SCRIPT_STRING_ANALYSIS_sizeof());
+ long /*int*/ metaFileDc = OS.CreateEnhMetaFile(hdc, null, null, null);
+ long /*int*/ oldMetaFont = OS.SelectObject(metaFileDc, hFont);
int flags = OS.SSA_METAFILE | OS.SSA_FALLBACK | OS.SSA_GLYPHS | OS.SSA_LINK;
if (OS.ScriptStringAnalyse(metaFileDc, sampleChars, count, 0, -1, flags, 0, null, null, 0, 0, 0, ssa) == OS.S_OK) {
OS.ScriptStringOut(ssa, 0, 0, 0, null, 0, 0, false);
@@ -3333,10 +3333,10 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
}
OS.HeapFree(hHeap, 0, ssa);
OS.SelectObject(metaFileDc, oldMetaFont);
- int /*long*/ metaFile = OS.CloseEnhMetaFile(metaFileDc);
+ long /*int*/ metaFile = OS.CloseEnhMetaFile(metaFileDc);
final EMREXTCREATEFONTINDIRECTW emr = new EMREXTCREATEFONTINDIRECTW();
class MetaFileEnumProc {
- int /*long*/ metaFileEnumProc (int /*long*/ hDC, int /*long*/ table, int /*long*/ record, int /*long*/ nObj, int /*long*/ lpData) {
+ long /*int*/ metaFileEnumProc (long /*int*/ hDC, long /*int*/ table, long /*int*/ record, long /*int*/ nObj, long /*int*/ lpData) {
OS.MoveMemory(emr.emr, record, EMR.sizeof);
switch (emr.emr.iType) {
case OS.EMR_EXTCREATEFONTINDIRECTW:
@@ -3353,7 +3353,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
boolean compilerWarningWorkaround = false;
if (compilerWarningWorkaround) object.metaFileEnumProc(0, 0, 0, 0, 0);
Callback callback = new Callback(object, "metaFileEnumProc", 5);
- int /*long*/ address = callback.getAddress();
+ long /*int*/ address = callback.getAddress();
if (address == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumEnhMetaFile(0, metaFile, address, 0, null);
OS.DeleteEnhMetaFile(metaFile);
@@ -3372,7 +3372,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
if (index > 0) {
StyleItem pRun = allRuns[index - 1];
if (pRun.analysis.eScript == run.analysis.eScript) {
- int /*long*/ pFont = getItemFont(pRun);
+ long /*int*/ pFont = getItemFont(pRun);
LOGFONT logFont = OS.IsUnicode ? (LOGFONT)new LOGFONTW() : new LOGFONTA();
OS.GetObject(pFont, LOGFONT.sizeof, logFont);
newFont = OS.CreateFontIndirect(logFont);
@@ -3384,7 +3384,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
if (nRun.analysis.eScript == run.analysis.eScript) {
OS.SelectObject(hdc, getItemFont(nRun));
shape(hdc, nRun);
- int /*long*/ nFont = getItemFont(nRun);
+ long /*int*/ nFont = getItemFont(nRun);
LOGFONT logFont = OS.IsUnicode ? (LOGFONT)new LOGFONTW() : new LOGFONTA();
OS.GetObject(nFont, LOGFONT.sizeof, logFont);
newFont = OS.CreateFontIndirect(logFont);
@@ -3414,7 +3414,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
}
if (!shapeSucceed) {
if (mLangFontLink2 != 0) {
- int /*long*/[] hNewFont = new int /*long*/[1];
+ long /*int*/[] hNewFont = new long /*int*/[1];
int[] dwCodePages = new int[1], cchCodePages = new int[1];
/* GetStrCodePages() */
OS.VtblCall(4, mLangFontLink2, chars, chars.length, 0, dwCodePages, cchCodePages);
@@ -3424,8 +3424,8 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
OS.GetObject(hNewFont[0], LOGFONT.sizeof, logFont);
/* ReleaseFont() */
OS.VtblCall(8, mLangFontLink2, hNewFont[0]);
- int /*long*/ mLangFont = OS.CreateFontIndirect(logFont);
- int /*long*/ oldFont = OS.SelectObject(hdc, mLangFont);
+ long /*int*/ mLangFont = OS.CreateFontIndirect(logFont);
+ long /*int*/ oldFont = OS.SelectObject(hdc, mLangFont);
if (shapeSucceed = shape(hdc, run, chars, buffer, maxGlyphs, sp)) {
run.fallbackFont = mLangFont;
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java
index 41fa940be6..7e3b953985 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java
@@ -45,7 +45,7 @@ public class Transform extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
/**
* Constructs a new identity Transform.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java
index 54cba35304..b2b09bd730 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java
@@ -106,7 +106,7 @@ public class BidiUtil {
* @param runnable the code that should be executed when a keyboard language change
* occurs
*/
-public static void addLanguageListener (int /*long*/ hwnd, Runnable runnable) {
+public static void addLanguageListener (long /*int*/ hwnd, Runnable runnable) {
languageMap.put(new LONG(hwnd), runnable);
subclass(hwnd);
}
@@ -116,7 +116,7 @@ public static void addLanguageListener (Control control, Runnable runnable) {
/**
* Proc used for OS.EnumSystemLanguageGroups call during isBidiPlatform test.
*/
-static int /*long*/ EnumSystemLanguageGroupsProc(int /*long*/ lpLangGrpId, int /*long*/ lpLangGrpIdString, int /*long*/ lpLangGrpName, int /*long*/ options, int /*long*/ lParam) {
+static long /*int*/ EnumSystemLanguageGroupsProc(long /*int*/ lpLangGrpId, long /*int*/ lpLangGrpIdString, long /*int*/ lpLangGrpName, long /*int*/ options, long /*int*/ lParam) {
if ((int)/*64*/lpLangGrpId == OS.LGRPID_HEBREW) {
isBidiPlatform = 1;
return 0;
@@ -172,7 +172,7 @@ public static void drawGlyphs(GC gc, char[] renderBuffer, int[] renderDx, int x,
*/
public static char[] getRenderInfo(GC gc, String text, int[] order, byte[] classBuffer, int[] dx, int flags, int [] offsets) {
int fontLanguageInfo = OS.GetFontLanguageInfo(gc.handle);
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
int[] lpCs = new int[8];
int cs = OS.GetTextCharset(gc.handle);
boolean isRightOriented = false;
@@ -188,10 +188,10 @@ public static char[] getRenderInfo(GC gc, String text, int[] order, byte[] class
GCP_RESULTS result = new GCP_RESULTS();
result.lStructSize = GCP_RESULTS.sizeof;
result.nGlyphs = byteCount;
- int /*long*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
- int /*long*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
- int /*long*/ lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
- int /*long*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 2);
+ long /*int*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
+ long /*int*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
+ long /*int*/ lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 2);
// set required dwFlags
int dwFlags = 0;
@@ -305,7 +305,7 @@ public static char[] getRenderInfo(GC gc, String text, int[] order, byte[] class
*/
public static void getOrderInfo(GC gc, String text, int[] order, byte[] classBuffer, int flags, int [] offsets) {
int fontLanguageInfo = OS.GetFontLanguageInfo(gc.handle);
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
int[] lpCs = new int[8];
int cs = OS.GetTextCharset(gc.handle);
OS.TranslateCharsetInfo(cs, lpCs, OS.TCI_SRCCHARSET);
@@ -319,8 +319,8 @@ public static void getOrderInfo(GC gc, String text, int[] order, byte[] classBuf
GCP_RESULTS result = new GCP_RESULTS();
result.lStructSize = GCP_RESULTS.sizeof;
result.nGlyphs = byteCount;
- int /*long*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
- int /*long*/ lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
+ long /*int*/ lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
// set required dwFlags, these values will affect how the text gets rendered and
// ordered
@@ -407,7 +407,7 @@ public static int getFontBidiAttributes(GC gc) {
* KEYBOARD_NON_BIDI)
*/
public static int getKeyboardLanguage() {
- int /*long*/ layout = OS.GetKeyboardLayout(0);
+ long /*int*/ layout = OS.GetKeyboardLayout(0);
return isBidiLang(layout) ? KEYBOARD_BIDI : KEYBOARD_NON_BIDI;
}
/**
@@ -416,15 +416,15 @@ public static int getKeyboardLanguage() {
*
* @return integer array with an entry for each installed language
*/
-static int /*long*/[] getKeyboardLanguageList() {
+static long /*int*/[] getKeyboardLanguageList() {
int maxSize = 10;
- int /*long*/[] tempList = new int /*long*/[maxSize];
+ long /*int*/[] tempList = new long /*int*/[maxSize];
int size = OS.GetKeyboardLayoutList(maxSize, tempList);
- int /*long*/[] list = new int /*long*/[size];
+ long /*int*/[] list = new long /*int*/[size];
System.arraycopy(tempList, 0, list, 0, size);
return list;
}
-static boolean isBidiLang(int /*long*/ lang) {
+static boolean isBidiLang(long /*int*/ lang) {
int id = OS.PRIMARYLANGID(OS.LOWORD(lang));
return id == LANG_ARABIC || id == LANG_HEBREW || id == LANG_FARSI;
}
@@ -455,7 +455,7 @@ public static boolean isBidiPlatform() {
Callback callback = null;
try {
callback = new Callback (Class.forName (CLASS_NAME), "EnumSystemLanguageGroupsProc", 5); //$NON-NLS-1$
- int /*long*/ lpEnumSystemLanguageGroupsProc = callback.getAddress ();
+ long /*int*/ lpEnumSystemLanguageGroupsProc = callback.getAddress ();
if (lpEnumSystemLanguageGroupsProc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumSystemLanguageGroups(lpEnumSystemLanguageGroupsProc, OS.LGRPID_INSTALLED, 0);
callback.dispose ();
@@ -479,7 +479,7 @@ public static boolean isBidiPlatform() {
* @return true if bidi is supported, false otherwise.
*/
public static boolean isKeyboardBidi() {
- int /*long*/[] list = getKeyboardLanguageList();
+ long /*int*/[] list = getKeyboardLanguageList();
for (int i=0; i<list.length; i++) {
if (isBidiLang(list[i])) {
return true;
@@ -493,7 +493,7 @@ public static boolean isKeyboardBidi() {
*
* @param hwnd the handle of the Control that is listening for keyboard language changes
*/
-public static void removeLanguageListener (int /*long*/ hwnd) {
+public static void removeLanguageListener (long /*int*/ hwnd) {
languageMap.remove(new LONG(hwnd));
unsubclass(hwnd);
}
@@ -512,7 +512,7 @@ public static void removeLanguageListener (Control control) {
public static void setKeyboardLanguage(int language) {
if (language == getKeyboardLanguage()) return;
boolean bidi = language == KEYBOARD_BIDI;
- int /*long*/[] list = getKeyboardLanguageList();
+ long /*int*/[] list = getKeyboardLanguageList();
for (int i=0; i<list.length; i++) {
if (bidi == isBidiLang(list[i])) {
OS.ActivateKeyboardLayout(list[i], 0);
@@ -530,7 +530,7 @@ public static void setKeyboardLanguage(int language) {
* @return true if the orientation was changed, false if the orientation
* could not be changed
*/
-public static boolean setOrientation (int /*long*/ hwnd, int orientation) {
+public static boolean setOrientation (long /*int*/ hwnd, int orientation) {
if (OS.IsWinCE) return false;
if (OS.WIN32_VERSION < OS.VERSION(4, 10)) return false;
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
@@ -550,10 +550,10 @@ public static boolean setOrientation (Control control, int orientation) {
*
* @param hwnd control to override the window proc of
*/
-static void subclass(int /*long*/ hwnd) {
+static void subclass(long /*int*/ hwnd) {
LONG key = new LONG(hwnd);
if (oldProcMap.get(key) == null) {
- int /*long*/ oldProc = OS.GetWindowLongPtr(hwnd, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr(hwnd, OS.GWLP_WNDPROC);
oldProcMap.put(key, new LONG(oldProc));
OS.SetWindowLongPtr(hwnd, OS.GWLP_WNDPROC, callback.getAddress());
}
@@ -610,7 +610,7 @@ static void translateOrder(int[] orderArray, int glyphCount, boolean isRightOrie
*
* @param hwnd control to remove the window proc override for
*/
-static void unsubclass(int /*long*/ hwnd) {
+static void unsubclass(long /*int*/ hwnd) {
LONG key = new LONG(hwnd);
if (languageMap.get(key) == null && keyMap.get(key) == null) {
LONG proc = (LONG) oldProcMap.remove(key);
@@ -627,7 +627,7 @@ static void unsubclass(int /*long*/ hwnd) {
* change event
* @param msg window message
*/
-static int /*long*/ windowProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+static long /*int*/ windowProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
LONG key = new LONG (hwnd);
switch ((int)/*64*/msg) {
case OS.WM_INPUTLANGCHANGE:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
index 3f66cf741d..674137b967 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
@@ -16,7 +16,7 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
public class ImageList {
- int /*long*/ handle;
+ long /*int*/ handle;
int style, refCount;
Image [] images;
@@ -33,7 +33,7 @@ public ImageList (int style, int width, int height) {
if (OS.COMCTL32_MAJOR >= 6) {
flags |= OS.ILC_COLOR32;
} else {
- int /*long*/ hDC = OS.GetDC (0);
+ long /*int*/ hDC = OS.GetDC (0);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
OS.ReleaseDC (0, hDC);
@@ -81,13 +81,13 @@ public int addRef() {
return ++refCount;
}
-int /*long*/ copyBitmap (int /*long*/ hImage, int width, int height) {
+long /*int*/ copyBitmap (long /*int*/ hImage, int width, int height) {
BITMAP bm = new BITMAP ();
OS.GetObject (hImage, BITMAP.sizeof, bm);
- int /*long*/ hDC = OS.GetDC (0);
- int /*long*/ hdc1 = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hDC = OS.GetDC (0);
+ long /*int*/ hdc1 = OS.CreateCompatibleDC (hDC);
OS.SelectObject (hdc1, hImage);
- int /*long*/ hdc2 = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hdc2 = OS.CreateCompatibleDC (hDC);
/*
* Feature in Windows. If a bitmap has a 32-bit depth and any
* pixel has an alpha value different than zero, common controls
@@ -98,7 +98,7 @@ int /*long*/ copyBitmap (int /*long*/ hImage, int width, int height) {
* remove the alpha channel of opaque images by down sampling
* it to 24-bit depth.
*/
- int /*long*/ hBitmap;
+ long /*int*/ hBitmap;
if (bm.bmBitsPixel == 32 && OS.COMCTL32_MAJOR >= 6) {
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
@@ -130,7 +130,7 @@ int /*long*/ copyBitmap (int /*long*/ hImage, int width, int height) {
bmi[offset + 10] = (byte)((blueMask & 0xFF00) >> 8);
bmi[offset + 11] = (byte)((blueMask & 0xFF) >> 0);
}
- int /*long*/[] pBits = new int /*long*/[1];
+ long /*int*/[] pBits = new long /*int*/[1];
hBitmap = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
} else {
hBitmap = OS.CreateCompatibleBitmap (hDC, width, height);
@@ -148,23 +148,23 @@ int /*long*/ copyBitmap (int /*long*/ hImage, int width, int height) {
return hBitmap;
}
-int /*long*/ copyIcon (int /*long*/ hImage, int width, int height) {
+long /*int*/ copyIcon (long /*int*/ hImage, int width, int height) {
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
- int /*long*/ hIcon = OS.CopyImage (hImage, OS.IMAGE_ICON, width, height, 0);
+ long /*int*/ hIcon = OS.CopyImage (hImage, OS.IMAGE_ICON, width, height, 0);
return hIcon != 0 ? hIcon : hImage;
}
-int /*long*/ copyWithAlpha (int /*long*/ hBitmap, int background, byte[] alphaData, int destWidth, int destHeight) {
+long /*int*/ copyWithAlpha (long /*int*/ hBitmap, int background, byte[] alphaData, int destWidth, int destHeight) {
BITMAP bm = new BITMAP ();
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int srcWidth = bm.bmWidth;
int srcHeight = bm.bmHeight;
/* Create resources */
- int /*long*/ hdc = OS.GetDC (0);
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hdc);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (0);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = srcWidth;
@@ -174,10 +174,10 @@ int /*long*/ copyWithAlpha (int /*long*/ hBitmap, int background, byte[] alphaDa
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
@@ -226,10 +226,10 @@ int /*long*/ copyWithAlpha (int /*long*/ hBitmap, int background, byte[] alphaDa
bmiHeader2.biCompression = OS.BI_RGB;
byte [] bmi2 = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi2, bmiHeader2, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits2 = new int /*long*/ [1];
- int /*long*/ memDib2 = OS.CreateDIBSection (0, bmi2, OS.DIB_RGB_COLORS, pBits2, 0, 0);
- int /*long*/ memHdc2 = OS.CreateCompatibleDC (hdc);
- int /*long*/ oldMemBitmap2 = OS.SelectObject (memHdc2, memDib2);
+ long /*int*/ [] pBits2 = new long /*int*/ [1];
+ long /*int*/ memDib2 = OS.CreateDIBSection (0, bmi2, OS.DIB_RGB_COLORS, pBits2, 0, 0);
+ long /*int*/ memHdc2 = OS.CreateCompatibleDC (hdc);
+ long /*int*/ oldMemBitmap2 = OS.SelectObject (memHdc2, memDib2);
if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc2, OS.COLORONCOLOR);
OS.StretchBlt (memHdc2, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
OS.SelectObject (memHdc2, oldMemBitmap2);
@@ -248,7 +248,7 @@ int /*long*/ copyWithAlpha (int /*long*/ hBitmap, int background, byte[] alphaDa
return memDib;
}
-int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
+long /*int*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
int srcWidth = data.width;
int srcHeight = data.height;
ImageData mask = ImageData.internal_new (srcWidth, srcHeight, 1,
@@ -260,13 +260,13 @@ int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight)
mask.setPixel (x, y, (data.alphaData [ap++] & 0xff) <= 127 ? 1 : 0);
}
}
- int /*long*/ hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
+ long /*int*/ hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
if (srcWidth != destWidth || srcHeight != destHeight) {
- int /*long*/ hdc = OS.GetDC (0);
- int /*long*/ hdc1 = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (0);
+ long /*int*/ hdc1 = OS.CreateCompatibleDC (hdc);
OS.SelectObject (hdc1, hMask);
- int /*long*/ hdc2 = OS.CreateCompatibleDC (hdc);
- int /*long*/ hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
+ long /*int*/ hdc2 = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
OS.SelectObject (hdc2, hMask2);
if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR);
OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
@@ -279,14 +279,14 @@ int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight)
return hMask;
}
-int /*long*/ createMask (int /*long*/ hBitmap, int destWidth, int destHeight, int background, int transparentPixel) {
+long /*int*/ createMask (long /*int*/ hBitmap, int destWidth, int destHeight, int background, int transparentPixel) {
BITMAP bm = new BITMAP ();
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int srcWidth = bm.bmWidth;
int srcHeight = bm.bmHeight;
- int /*long*/ hMask = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
- int /*long*/ hDC = OS.GetDC (0);
- int /*long*/ hdc1 = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hMask = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
+ long /*int*/ hDC = OS.GetDC (0);
+ long /*int*/ hdc1 = OS.CreateCompatibleDC (hDC);
if (background != -1) {
OS.SelectObject (hdc1, hBitmap);
@@ -316,7 +316,7 @@ int /*long*/ createMask (int /*long*/ hBitmap, int destWidth, int destHeight, in
OS.SetBkColor (hdc1, background);
}
- int /*long*/ hdc2 = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hdc2 = OS.CreateCompatibleDC (hDC);
OS.SelectObject (hdc2, hMask);
if (destWidth != srcWidth || destHeight != srcHeight) {
if (!OS.IsWinCE) OS.SetStretchBltMode (hdc2, OS.COLORONCOLOR);
@@ -329,7 +329,7 @@ int /*long*/ createMask (int /*long*/ hBitmap, int destWidth, int destHeight, in
/* Put back the original palette */
if (originalColors != null) OS.SetDIBColorTable(hdc1, 0, 1 << bm.bmBitsPixel, originalColors);
} else {
- int /*long*/ hOldBitmap = OS.SelectObject (hdc1, hMask);
+ long /*int*/ hOldBitmap = OS.SelectObject (hdc1, hMask);
OS.PatBlt (hdc1, 0, 0, destWidth, destHeight, OS.BLACKNESS);
OS.SelectObject (hdc1, hOldBitmap);
}
@@ -352,7 +352,7 @@ public int getStyle () {
return style;
}
-public int /*long*/ getHandle () {
+public long /*int*/ getHandle () {
return handle;
}
@@ -393,7 +393,7 @@ public int removeRef() {
}
void set (int index, Image image, int count) {
- int /*long*/ hImage = image.handle;
+ long /*int*/ hImage = image.handle;
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (handle, cx, cy);
switch (image.type) {
@@ -401,7 +401,7 @@ void set (int index, Image image, int count) {
/*
* Note that the image size has to match the image list icon size.
*/
- int /*long*/ hBitmap = 0, hMask = 0;
+ long /*int*/ hBitmap = 0, hMask = 0;
ImageData data = image.getImageData ();
switch (data.getTransparencyType ()) {
case SWT.TRANSPARENCY_ALPHA:
@@ -439,7 +439,7 @@ void set (int index, Image image, int count) {
if (OS.IsWinCE) {
OS.ImageList_ReplaceIcon (handle, index == count ? -1 : index, hImage);
} else {
- int /*long*/ hIcon = copyIcon (hImage, cx [0], cy [0]);
+ long /*int*/ hIcon = copyIcon (hImage, cx [0], cy [0]);
OS.ImageList_ReplaceIcon (handle, index == count ? -1 : index, hIcon);
OS.DestroyIcon (hIcon);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
index 4b44a64e42..04b29fb7e6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
@@ -54,10 +54,10 @@ public class Button extends Control {
static final int CHECK_WIDTH, CHECK_HEIGHT;
static final int ICON_WIDTH = 128, ICON_HEIGHT = 128;
static /*final*/ boolean COMMAND_LINK = false;
- static final int /*long*/ ButtonProc;
+ static final long /*int*/ ButtonProc;
static final TCHAR ButtonClass = new TCHAR (0, "BUTTON", true);
static {
- int /*long*/ hBitmap = OS.LoadBitmap (0, OS.OBM_CHECKBOXES);
+ long /*int*/ hBitmap = OS.LoadBitmap (0, OS.OBM_CHECKBOXES);
if (hBitmap == 0) {
CHECK_WIDTH = OS.GetSystemMetrics (OS.IsWinCE ? OS.SM_CXSMICON : OS.SM_CXVSCROLL);
CHECK_HEIGHT = OS.GetSystemMetrics (OS.IsWinCE ? OS.SM_CYSMICON : OS.SM_CYVSCROLL);
@@ -164,7 +164,7 @@ void _setImage (Image image) {
} else {
if (image2 != null) image2.dispose ();
image2 = null;
- int /*long*/ hImage = 0;
+ long /*int*/ hImage = 0;
int imageBits = 0, fImageType = 0;
if (image != null) {
switch (image.type) {
@@ -215,14 +215,14 @@ void _setImage (Image image) {
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (4, 10)) {
Rectangle rect = image.getBounds ();
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ dstHdc = OS.CreateCompatibleDC (hDC);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap (hDC, rect.width, rect.height);
- int /*long*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ dstHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap (hDC, rect.width, rect.height);
+ long /*int*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
OS.SetLayout (dstHdc, OS.LAYOUT_RTL);
if (fImageType == OS.IMAGE_BITMAP) {
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
OS.SetLayout (dstHdc, 0);
OS.BitBlt (dstHdc, 0, 0, rect.width, rect.height, srcHdc, 0, 0, OS.SRCCOPY);
OS.SelectObject (srcHdc, oldSrcBitmap);
@@ -230,8 +230,8 @@ void _setImage (Image image) {
} else {
Control control = findBackgroundControl ();
if (control == null) control = this;
- int /*long*/ newBrush = OS.CreateSolidBrush (control.getBackgroundPixel ());
- int /*long*/ oldBrush = OS.SelectObject (dstHdc, newBrush);
+ long /*int*/ newBrush = OS.CreateSolidBrush (control.getBackgroundPixel ());
+ long /*int*/ oldBrush = OS.SelectObject (dstHdc, newBrush);
OS.PatBlt (dstHdc, 0, 0, rect.width, rect.height, OS.PATCOPY);
OS.DrawIconEx (dstHdc, 0, 0, hImage, 0, 0, 0, 0, OS.DI_NORMAL);
OS.SelectObject (dstHdc, oldBrush);
@@ -338,7 +338,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ButtonProc, hwnd, msg, wParam, lParam);
}
@@ -377,9 +377,9 @@ int computeLeftMargin () {
if (image != null && text.length () != 0) {
Rectangle bounds = image.getBounds ();
margin += bounds.width + MARGIN * 2;
- int /*long*/ oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TCHAR buffer = new TCHAR (getCodePage (), text, true);
RECT rect = new RECT ();
@@ -446,9 +446,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
}
}
if (hasText) {
- int /*long*/ oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
OS.GetTextMetrics (hDC, lptm);
@@ -720,7 +720,7 @@ String getNameText () {
public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false;
- int /*long*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
+ long /*int*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
return flags != OS.BST_UNCHECKED;
}
@@ -886,7 +886,7 @@ public void setAlignment (int alignment) {
void setDefault (boolean value) {
if ((style & SWT.PUSH) == 0) return;
- int /*long*/ hwndShell = menuShell ().handle;
+ long /*int*/ hwndShell = menuShell ().handle;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if (value) {
bits |= OS.BS_DEFPUSHBUTTON;
@@ -961,7 +961,7 @@ public void setGrayed (boolean grayed) {
checkWidget ();
if ((style & SWT.CHECK) == 0) return;
this.grayed = grayed;
- int /*long*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
+ long /*int*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
if (grayed) {
if (flags == OS.BST_CHECKED) updateSelection (OS.BST_INDETERMINATE);
} else {
@@ -1179,12 +1179,12 @@ TCHAR windowClass () {
return ButtonClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ButtonProc;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
/*
@@ -1206,7 +1206,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
if ((style & SWT.ARROW) != 0) {
@@ -1215,7 +1215,7 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for radio button position in group
@@ -1227,7 +1227,7 @@ LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if ((style & SWT.PUSH) != 0 && getDefault ()) {
menuShell ().setDefaultButton (null, false);
@@ -1235,17 +1235,17 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONUP (wParam, lParam);
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When Windows sets focus to
* a radio button, it sets the WS_TABSTOP style.
@@ -1266,7 +1266,7 @@ LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (result != null) return result;
if (OS.COMCTL32_MAJOR >= 6) {
@@ -1284,14 +1284,14 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
if (image2 != null) _setImage (image);
return result;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -1318,7 +1318,7 @@ LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- int /*long*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ long /*int*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
}
@@ -1336,7 +1336,7 @@ LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.BN_CLICKED:
@@ -1357,7 +1357,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. For some reason, the HBRUSH that
* is returned from WM_CTRLCOLOR is misaligned when
@@ -1378,7 +1378,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.ARROW) == 0) return super.wmDrawChild (wParam, lParam);
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
index 6e50f11203..5391eaccbd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
@@ -84,7 +84,7 @@ void clearArea (int x, int y, int width, int height) {
if (OS.IsWindowVisible (handle)) {
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
- int /*long*/ hDC = OS.GetDCEx (handle, 0, OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS);
+ long /*int*/ hDC = OS.GetDCEx (handle, 0, OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS);
drawBackground (hDC, rect);
OS.ReleaseDC (handle, hDC);
}
@@ -328,7 +328,7 @@ TCHAR windowClass () {
return super.windowClass ();
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (msg == Display.SWT_RESTORECARET) {
if ((state & CANVAS) != 0) {
if (caret != null) {
@@ -341,7 +341,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
if (caret != null) {
@@ -363,7 +363,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
if (ime != null) {
LRESULT result = ime.WM_IME_COMPOSITION (wParam, lParam);
if (result != null) return result;
@@ -389,7 +389,7 @@ LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
lpCompForm.dwStyle = OS.CFS_POINT;
lpCompForm.x = ptCurrentPos.x;
lpCompForm.y = ptCurrentPos.y;
- int /*long*/ hIMC = OS.ImmGetContext (handle);
+ long /*int*/ hIMC = OS.ImmGetContext (handle);
OS.ImmSetCompositionWindow (hIMC, lpCompForm);
OS.ImmReleaseContext (handle, hIMC);
}
@@ -400,7 +400,7 @@ LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_IME_COMPOSITION (wParam, lParam);
}
-LRESULT WM_IME_COMPOSITION_START (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION_START (long /*int*/ wParam, long /*int*/ lParam) {
if (ime != null) {
LRESULT result = ime.WM_IME_COMPOSITION_START (wParam, lParam);
if (result != null) return result;
@@ -408,7 +408,7 @@ LRESULT WM_IME_COMPOSITION_START (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_IME_COMPOSITION_START (wParam, lParam);
}
-LRESULT WM_IME_ENDCOMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_ENDCOMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
if (ime != null) {
LRESULT result = ime.WM_IME_ENDCOMPOSITION (wParam, lParam);
if (result != null) return result;
@@ -416,7 +416,7 @@ LRESULT WM_IME_ENDCOMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_IME_ENDCOMPOSITION (wParam, lParam);
}
-LRESULT WM_INPUTLANGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_INPUTLANGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_INPUTLANGCHANGE (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) {
caret.setIMEFont ();
@@ -425,7 +425,7 @@ LRESULT WM_INPUTLANGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
if (ime != null) {
LRESULT result = ime.WM_KILLFOCUS (wParam, lParam);
if (result != null) return result;
@@ -436,7 +436,7 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (ime != null) {
LRESULT result = ime.WM_LBUTTONDOWN (wParam, lParam);
if (result != null) return result;
@@ -444,19 +444,19 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) caret.setFocus ();
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) caret.resizeIME ();
return result;
}
-LRESULT WM_WINDOWPOSCHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGED (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGED (wParam, lParam);
//if (result != null) return result;
/*
@@ -471,7 +471,7 @@ LRESULT WM_WINDOWPOSCHANGED (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
/*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
index 890eee4bc1..60f497a1d3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
@@ -84,10 +84,10 @@ void createWidget () {
}
}
-int /*long*/ defaultFont () {
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hwndIME = OS.ImmGetDefaultIMEWnd (hwnd);
- int /*long*/ hFont = 0;
+long /*int*/ defaultFont () {
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hwndIME = OS.ImmGetDefaultIMEWnd (hwnd);
+ long /*int*/ hFont = 0;
if (hwndIME != 0) {
hFont = OS.SendMessage (hwndIME, OS.WM_GETFONT, 0, 0);
}
@@ -138,7 +138,7 @@ public Rectangle getBounds () {
public Font getFont () {
checkWidget();
if (font == null) {
- int /*long*/ hFont = defaultFont ();
+ long /*int*/ hFont = defaultFont ();
return Font.win32_new (display, hFont);
}
return font;
@@ -280,8 +280,8 @@ void resizeIME () {
if (!OS.IsDBLocale) return;
POINT ptCurrentPos = new POINT ();
if (!OS.GetCaretPos (ptCurrentPos)) return;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
IME ime = parent.getIME ();
if (ime != null && ime.isInlineEnabled ()) {
Point size = getSize ();
@@ -322,9 +322,9 @@ void releaseWidget () {
void resize () {
resized = false;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
OS.DestroyCaret ();
- int /*long*/ hBitmap = image != null ? image.handle : 0;
+ long /*int*/ hBitmap = image != null ? image.handle : 0;
int width = this.width;
if (!OS.IsWinCE && image == null && width == 0) {
int [] buffer = new int [1];
@@ -341,8 +341,8 @@ void resize () {
void restoreIMEFont () {
if (!OS.IsDBLocale) return;
if (oldFont == null) return;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
OS.ImmSetCompositionFont (hIMC, oldFont);
OS.ImmReleaseContext (hwnd, hIMC);
oldFont = null;
@@ -401,8 +401,8 @@ public void setBounds (Rectangle rect) {
}
void setFocus () {
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hBitmap = 0;
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hBitmap = 0;
if (image != null) hBitmap = image.handle;
int width = this.width;
if (!OS.IsWinCE && image == null && width == 0) {
@@ -467,11 +467,11 @@ public void setImage (Image image) {
void setIMEFont () {
if (!OS.IsDBLocale) return;
- int /*long*/ hFont = 0;
+ long /*int*/ hFont = 0;
if (font != null) hFont = font.handle;
if (hFont == 0) hFont = defaultFont ();
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
/* Save the current IME font */
if (oldFont == null) {
oldFont = OS.IsUnicode ? (LOGFONT) new LOGFONTW () : new LOGFONTA ();
@@ -582,7 +582,7 @@ public void setVisible (boolean visible) {
checkWidget();
if (visible == isVisible) return;
isVisible = visible;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (OS.GetFocus () != hwnd) return;
if (!isVisible) {
OS.HideCaret (hwnd);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
index 42b641ab22..f98d0c32d6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
@@ -96,7 +96,7 @@ public ColorDialog (Shell parent, int style) {
checkSubclass ();
}
-int /*long*/ CCHookProc (int /*long*/ hdlg, int /*long*/ uiMsg, int /*long*/ lParam, int /*long*/ lpData) {
+long /*int*/ CCHookProc (long /*int*/ hdlg, long /*int*/ uiMsg, long /*int*/ lParam, long /*int*/ lpData) {
switch ((int)/*64*/uiMsg) {
case OS.WM_INITDIALOG: {
RECT rect = new RECT ();
@@ -168,8 +168,8 @@ public RGB[] getRGBs() {
public RGB open () {
/* Get the owner HWND for the dialog */
- int /*long*/ hwndOwner = parent.handle;
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndOwner = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
/*
* Feature in Windows. There is no API to set the orientation of a
@@ -201,13 +201,13 @@ public RGB open () {
/* Create the CCHookProc */
Callback callback = new Callback (this, "CCHookProc", 4); //$NON-NLS-1$
- int /*long*/ lpfnHook = callback.getAddress ();
+ long /*int*/ lpfnHook = callback.getAddress ();
if (lpfnHook == 0) error(SWT.ERROR_NO_MORE_CALLBACKS);
/* Allocate the Custom Colors and initialize to white */
display = parent.display;
if (display.lpCustColors == 0) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
display.lpCustColors = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, CUSTOM_COLOR_COUNT * 4);
for (int i=0; i < CUSTOM_COLOR_COUNT; i++) {
colors[i] = 0x00FFFFFF;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
index 151a99a213..b4260ccfd1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
@@ -60,7 +60,7 @@ import org.eclipse.swt.events.*;
public class Combo extends Composite {
boolean noSelection, ignoreDefaultSelection, ignoreCharacter, ignoreModify, ignoreResize, lockText;
int scrollWidth, visibleCount;
- int /*long*/ cbtHook;
+ long /*int*/ cbtHook;
static final int VISIBLE_COUNT = 5;
@@ -87,9 +87,9 @@ public class Combo extends Composite {
*/
static final int CBID_LIST = 1000;
static final int CBID_EDIT = 1001;
- static /*final*/ int /*long*/ EditProc, ListProc;
+ static /*final*/ long /*int*/ EditProc, ListProc;
- static final int /*long*/ ComboProc;
+ static final long /*int*/ ComboProc;
static final TCHAR ComboClass = new TCHAR (0, "COMBOBOX", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -283,7 +283,7 @@ public void addVerifyListener (VerifyListener listener) {
addListener (SWT.Verify, typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd == handle) {
switch (msg) {
@@ -291,7 +291,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
ignoreResize = true;
boolean oldLockText = lockText;
if ((style & SWT.READ_ONLY) == 0) lockText = true;
- int /*long*/ result = OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
+ long /*int*/ result = OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
if ((style & SWT.READ_ONLY) == 0) lockText = oldLockText;
ignoreResize = false;
return result;
@@ -299,30 +299,30 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
}
return OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
}
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwnd == hwndText) {
if (lockText && msg == OS.WM_SETTEXT) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int length = OS.GetWindowTextLength (handle);
TCHAR buffer = new TCHAR (getCodePage (), length + 1);
OS.GetWindowText (handle, buffer, length + 1);
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int /*long*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ long /*int*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return code;
}
return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
}
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwnd == hwndList) {
return OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam);
}
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
-int /*long*/ CBTProc (int /*long*/ nCode, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ CBTProc (long /*int*/ nCode, long /*int*/ wParam, long /*int*/ lParam) {
if ((int)/*64*/nCode == OS.HCBT_CREATEWND) {
TCHAR buffer = new TCHAR (0, 128);
OS.GetClassName (wParam, buffer, buffer.length ());
@@ -335,7 +335,7 @@ int /*long*/ CBTProc (int /*long*/ nCode, int /*long*/ wParam, int /*long*/ lPar
return OS.CallNextHookEx (cbtHook, (int)/*64*/nCode, wParam, lParam);
}
-boolean checkHandle (int /*long*/ hwnd) {
+boolean checkHandle (long /*int*/ hwnd) {
return hwnd == handle || hwnd == OS.GetDlgItem (handle, CBID_EDIT) || hwnd == OS.GetDlgItem (handle, CBID_LIST);
}
@@ -397,8 +397,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
if (wHint == SWT.DEFAULT) {
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
@@ -443,9 +443,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
if ((style & SWT.READ_ONLY) != 0) {
width += 8;
} else {
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
- int /*long*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
int marginWidth = OS.LOWORD (margins) + OS.HIWORD (margins);
width += marginWidth + 3;
}
@@ -505,7 +505,7 @@ void createHandle () {
} else {
int threadId = OS.GetCurrentThreadId ();
Callback cbtCallback = new Callback (this, "CBTProc", 3); //$NON-NLS-1$
- int /*long*/ cbtProc = cbtCallback.getAddress ();
+ long /*int*/ cbtProc = cbtCallback.getAddress ();
if (cbtProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
cbtHook = OS.SetWindowsHookEx (OS.WH_CBT, cbtProc, 0, threadId);
super.createHandle ();
@@ -516,11 +516,11 @@ void createHandle () {
state &= ~(CANVAS | THEME_BACKGROUND);
/* Get the text and list window procs */
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0 && EditProc == 0) {
EditProc = OS.GetWindowLongPtr (hwndText, OS.GWLP_WNDPROC);
}
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0 && ListProc == 0) {
ListProc = OS.GetWindowLongPtr (hwndList, OS.GWLP_WNDPROC);
}
@@ -550,7 +550,7 @@ void createWidget() {
OS.SystemParametersInfo (OS.SPI_GETWORKAREA, 0, rect, 0);
maxHeight = (rect.bottom - rect.top) / 3;
} else {
- int /*long*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ long /*int*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -587,9 +587,9 @@ int defaultBackground () {
void deregister () {
super.deregister ();
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) display.removeControl (hwndText);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) display.removeControl (hwndList);
}
@@ -635,14 +635,14 @@ public void deselectAll () {
// widget could be disposed at this point
}
-boolean dragDetect (int /*long*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (long /*int*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
if (filter && (style & SWT.READ_ONLY) == 0) {
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
int [] start = new int [1], end = new int [1];
OS.SendMessage (handle, OS.CB_GETEDITSEL, start, end);
if (start [0] != end [0]) {
- int /*long*/ lParam = OS.MAKELPARAM (x, y);
+ long /*int*/ lParam = OS.MAKELPARAM (x, y);
int position = OS.LOWORD (OS.SendMessage (hwndText, OS.EM_CHARFROMPOS, 0, lParam));
if (start [0] <= position && position < end [0]) {
if (super.dragDetect (hwnd, x, y, filter, detect, consume)) {
@@ -684,8 +684,8 @@ public Point getCaretLocation () {
* pixel coordinates (0,0).
*/
int position = getCaretPosition ();
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- int /*long*/ caretPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, position, 0);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ caretPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, position, 0);
if (caretPos == -1) {
caretPos = 0;
if (position >= OS.GetWindowTextLength (hwndText)) {
@@ -739,7 +739,7 @@ public Point getCaretLocation () {
public int getCaretPosition () {
checkWidget ();
int [] start = new int [1], end = new int [1];
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
OS.SendMessage (hwndText, OS.EM_GETSEL, start, end);
/*
* In Windows, there is no API to get the position of the caret
@@ -761,9 +761,9 @@ public int getCaretPosition () {
if (lpgui.hwndCaret == hwndText || lpgui.hwndCaret == 0) {
POINT ptCurrentPos = new POINT ();
if (OS.GetCaretPos (ptCurrentPos)) {
- int /*long*/ endPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, end [0], 0);
+ long /*int*/ endPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, end [0], 0);
if (endPos == -1) {
- int /*long*/ startPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, start [0], 0);
+ long /*int*/ startPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, start [0], 0);
int startX = OS.GET_X_LPARAM (startPos);
if (ptCurrentPos.x > startX) caret = end [0];
} else {
@@ -1050,7 +1050,7 @@ public int getTextHeight () {
*/
public int getTextLimit () {
checkWidget ();
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return LIMIT;
return (int)/*64*/OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
}
@@ -1078,12 +1078,12 @@ public int getVisibleItemCount () {
}
boolean hasFocus () {
- int /*long*/ hwndFocus = OS.GetFocus ();
+ long /*int*/ hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) return true;
if (hwndFocus == 0) return false;
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndFocus == hwndText) return true;
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndFocus == hwndList) return true;
return false;
}
@@ -1161,7 +1161,7 @@ public int indexOf (String string, int start) {
int mbcsToWcsPos (int mbcsPos) {
if (mbcsPos <= 0) return 0;
if (OS.IsUnicode) return mbcsPos;
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return mbcsPos;
int mbcsSize = OS.GetWindowTextLengthA (hwndText);
if (mbcsSize == 0) return 0;
@@ -1193,9 +1193,9 @@ public void paste () {
void register () {
super.register ();
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) display.addControl (hwndText, this);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) display.addControl (hwndList, this);
}
@@ -1285,7 +1285,7 @@ public void remove (int start, int end) {
}
int textLength = OS.GetWindowTextLength (handle);
RECT rect = null;
- int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -1449,7 +1449,7 @@ public void removeVerifyListener (VerifyListener listener) {
eventTable.unhook (SWT.Verify, listener);
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -1490,7 +1490,7 @@ boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lPara
/* Verify the character */
String oldText = "";
int [] start = new int [1], end = new int [1];
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return true;
OS.SendMessage (hwndText, OS.EM_GETSEL, start, end);
switch (key) {
@@ -1562,19 +1562,19 @@ public void select (int index) {
}
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
super.setBackgroundImage (hBitmap);
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
void setBackgroundPixel (int pixel) {
super.setBackgroundPixel (pixel);
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
@@ -1647,9 +1647,9 @@ public void setFont (Font font) {
void setForegroundPixel (int pixel) {
super.setForegroundPixel (pixel);
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
@@ -1700,7 +1700,7 @@ public void setItems (String [] items) {
if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT);
}
RECT rect = null;
- int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -1753,8 +1753,8 @@ public void setOrientation (int orientation) {
void setScrollWidth () {
int newWidth = 0;
RECT rect = new RECT ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int cp = getCodePage ();
@@ -1791,7 +1791,7 @@ void setScrollWidth (int scrollWidth) {
OS.SystemParametersInfo (OS.SPI_GETWORKAREA, 0, rect, 0);
maxWidth = (rect.right - rect.left) / 4;
} else {
- int /*long*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ long /*int*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -1823,8 +1823,8 @@ void setScrollWidth (int scrollWidth) {
void setScrollWidth (TCHAR buffer, boolean grow) {
RECT rect = new RECT ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -1868,7 +1868,7 @@ public void setSelection (Point selection) {
start = wcsToMbcsPos (start);
end = wcsToMbcsPos (end);
}
- int /*long*/ bits = OS.MAKELPARAM (start, end);
+ long /*int*/ bits = OS.MAKELPARAM (start, end);
OS.SendMessage (handle, OS.CB_SETEDITSEL, 0, bits);
}
@@ -1906,7 +1906,7 @@ public void setText (String string) {
return;
}
int limit = LIMIT;
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
limit = (int)/*64*/OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
}
@@ -1945,8 +1945,8 @@ public void setTextLimit (int limit) {
}
void setToolTipText (Shell shell, String string) {
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndText != 0) shell.setToolTipText (hwndText, string);
if (hwndList != 0) shell.setToolTipText (hwndList, string);
shell.setToolTipText (handle, string);
@@ -1978,12 +1978,12 @@ public void setVisibleItemCount (int count) {
void subclass () {
super.subclass ();
- int /*long*/ newProc = display.windowProc;
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ newProc = display.windowProc;
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, newProc);
}
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) {
OS.SetWindowLongPtr (hwndList, OS.GWLP_WNDPROC, newProc);
}
@@ -2029,11 +2029,11 @@ boolean traverseReturn () {
void unsubclass () {
super.unsubclass ();
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0 && EditProc != 0) {
OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, EditProc);
}
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0 && ListProc != 0) {
OS.SetWindowLongPtr (hwndList, OS.GWLP_WNDPROC, ListProc);
}
@@ -2068,7 +2068,7 @@ void updateOrientation () {
bits &= ~OS.WS_EX_LAYOUTRTL;
}
OS.SetWindowLong (handle, OS.GWL_EXSTYLE, bits);
- int /*long*/ hwndText = 0, hwndList = 0;
+ long /*int*/ hwndText = 0, hwndList = 0;
COMBOBOXINFO pcbi = new COMBOBOXINFO ();
pcbi.cbSize = COMBOBOXINFO.sizeof;
if (OS.GetComboBoxInfo (handle, pcbi)) {
@@ -2145,7 +2145,7 @@ String verifyText (String string, int start, int end, Event keyEvent) {
int wcsToMbcsPos (int wcsPos) {
if (wcsPos <= 0) return 0;
if (OS.IsUnicode) return wcsPos;
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return wcsPos;
int mbcsSize = OS.GetWindowTextLengthA (hwndText);
if (mbcsSize == 0) return 0;
@@ -2175,15 +2175,15 @@ TCHAR windowClass () {
return ComboClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ComboProc;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd != handle) {
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if ((hwndText != 0 && hwnd == hwndText) || (hwndList != 0 && hwnd == hwndList)) {
LRESULT result = null;
switch (msg) {
@@ -2266,16 +2266,16 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CTLCOLOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CTLCOLOR (long /*int*/ wParam, long /*int*/ lParam) {
return wmColorChild (wParam, lParam);
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
return new LRESULT (code | OS.DLGC_WANTARROWS);
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When a combo box that is read only
* is disposed in CBN_KILLFOCUS, Windows segment faults.
@@ -2295,7 +2295,7 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When an editable combo box is dropped
* down and the text in the entry field partially matches an
@@ -2318,7 +2318,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Return NULL - Focus notification is
* done by WM_COMMAND with CBN_SETFOCUS.
@@ -2326,7 +2326,7 @@ LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When a combo box is resized,
* the size of the drop down rectangle is specified
@@ -2347,9 +2347,9 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (OS.IsWindowVisible (handle)) {
if (OS.IsWinCE) {
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
} else {
int uFlags = OS.RDW_ERASE | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN;
@@ -2381,14 +2381,14 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
OS.InvalidateRect (handle, null, true);
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
/*
@@ -2417,15 +2417,15 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
if (width != 0 && height != 0) {
- int /*long*/ hwndParent = parent.handle;
- int /*long*/ hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
+ long /*int*/ hwndParent = parent.handle;
+ long /*int*/ hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
OS.MapWindowPoints (0, hwndParent, rect, 2);
- int /*long*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long /*int*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
while (hwndChild != 0) {
if (hwndChild != handle) {
OS.GetWindowRect (hwndChild, rect);
OS.MapWindowPoints (0, hwndParent, rect, 2);
- int /*long*/ rgn2 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long /*int*/ rgn2 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
OS.CombineRgn (rgn1, rgn1, rgn2, OS.RGN_DIFF);
OS.DeleteObject (rgn2);
}
@@ -2440,7 +2440,7 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmChar (hwnd, wParam, lParam);
if (result != null) return result;
@@ -2470,7 +2470,7 @@ LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -2529,11 +2529,11 @@ LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*
}
TCHAR buffer = new TCHAR (getCodePage (), newText, true);
if (msg == OS.WM_SETTEXT) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int /*long*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ long /*int*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return new LRESULT (code);
} else {
@@ -2545,7 +2545,7 @@ LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*
return null;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.CBN_EDITCHANGE:
@@ -2616,7 +2616,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
event.doit = true;
sendEvent (SWT.OrientationChange, event);
if (!event.doit) {
- int /*long*/ hwnd = lParam;
+ long /*int*/ hwnd = lParam;
int bits1 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
int bits2 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
if (code == OS.EN_ALIGN_LTR_EC) {
@@ -2634,7 +2634,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmIMEChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/* Process a DBCS character */
Display display = this.display;
@@ -2653,7 +2653,7 @@ LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
* them to the application.
*/
ignoreCharacter = true;
- int /*long*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
+ long /*int*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
MSG msg = new MSG ();
int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
while (OS.PeekMessage (msg, hwnd, OS.WM_CHAR, OS.WM_CHAR, flags)) {
@@ -2668,7 +2668,7 @@ LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return new LRESULT (result);
}
-LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
@@ -2683,7 +2683,7 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return result;
}
-LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When an editable combo box is dropped
* down using Alt+Down and the text in the entry field partially
@@ -2696,7 +2696,7 @@ LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
if (result != null) return result;
if ((style & SWT.READ_ONLY) == 0) {
if (wParam == OS.VK_DOWN) {
- int /*long*/ code = callWindowProc (hwnd, OS.WM_SYSKEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (hwnd, OS.WM_SYSKEYDOWN, wParam, lParam);
int newSelection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (oldSelection != newSelection) {
sendEvent (SWT.Modify);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index 746b0ab655..1f91f9e7f2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -97,7 +97,7 @@ public Composite (Composite parent, int style) {
Control [] _getChildren () {
int count = 0;
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
if (hwndChild == 0) return new Control [0];
while (hwndChild != 0) {
count++;
@@ -193,7 +193,7 @@ void checkBuffered () {
void checkComposited () {
if ((state & CANVAS) != 0) {
if ((style & SWT.TRANSPARENT) != 0) {
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
int bits = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
bits |= OS.WS_EX_COMPOSITED;
OS.SetWindowLong (hwndParent, OS.GWL_EXSTYLE, bits);
@@ -273,13 +273,13 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
//#define PW_CLIENTONLY 0x00000001
//DCOrg() wrong
//topHandle wrong for Tree?
- int /*long*/ hDC = gc.handle;
+ long /*int*/ hDC = gc.handle;
int nSavedDC = OS.SaveDC (hDC);
OS.IntersectClipRect (hDC, 0, 0, width, height);
//WRONG PARENT
POINT lpPoint = new POINT ();
- int /*long*/ hwndParent = OS.GetParent (handle);
+ long /*int*/ hwndParent = OS.GetParent (handle);
OS.MapWindowPoints (handle, hwndParent, lpPoint, 1);
RECT rect = new RECT ();
OS.GetWindowRect (handle, rect);
@@ -347,7 +347,7 @@ public void drawBackground(GC gc, int x, int y, int width, int height, int offse
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
- int /*long*/ hDC = gc.handle;
+ long /*int*/ hDC = gc.handle;
int pixel = background == -1 ? gc.getBackground ().handle : -1;
drawBackground (hDC, rect, pixel, offsetX, offsetY);
}
@@ -457,7 +457,7 @@ int getChildrenCount () {
* non-registered children.
*/
int count = 0;
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
count++;
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -849,8 +849,8 @@ void releaseParent () {
super.releaseParent ();
if ((state & CANVAS) != 0) {
if ((style & SWT.TRANSPARENT) != 0) {
- int /*long*/ hwndParent = parent.handle;
- int /*long*/ hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
+ long /*int*/ hwndParent = parent.handle;
+ long /*int*/ hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
while (hwndChild != 0) {
if (hwndChild != handle) {
int bits = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
@@ -879,7 +879,7 @@ void releaseChildren (boolean destroy) {
void releaseWidget () {
super.releaseWidget ();
if ((state & CANVAS) != 0 && (style & SWT.EMBEDDED) != 0) {
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
if (hwndChild != 0) {
int threadId = OS.GetWindowThreadProcessId (hwndChild, null);
if (threadId != OS.GetCurrentThreadId ()) {
@@ -920,7 +920,7 @@ void resizeChildren () {
boolean resizeChildren (boolean defer, WINDOWPOS [] pwp) {
if (pwp == null) return true;
- int /*long*/ hdwp = 0;
+ long /*int*/ hdwp = 0;
if (defer) {
hdwp = OS.BeginDeferWindowPos (pwp.length);
if (hdwp == 0) return false;
@@ -950,7 +950,7 @@ boolean resizeChildren (boolean defer, WINDOWPOS [] pwp) {
return true;
}
-void resizeEmbeddedHandle(int /*long*/ embeddedHandle, int width, int height) {
+void resizeEmbeddedHandle(long /*int*/ embeddedHandle, int width, int height) {
if (embeddedHandle == 0) return;
int [] processID = new int [1];
int threadId = OS.GetWindowThreadProcessId (embeddedHandle, processID);
@@ -1294,7 +1294,7 @@ void updateOrientation () {
}
void updateUIState () {
- int /*long*/ hwndShell = getShell ().handle;
+ long /*int*/ hwndShell = getShell ().handle;
int uiState = /*64*/(int)OS.SendMessage (hwndShell, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) != 0) {
OS.SendMessage (hwndShell, OS.WM_CHANGEUISTATE, OS.MAKEWPARAM (OS.UIS_CLEAR, OS.UISF_HIDEFOCUS), 0);
@@ -1306,7 +1306,7 @@ int widgetStyle () {
return super.widgetStyle () | OS.WS_CLIPCHILDREN;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1318,7 +1318,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1333,15 +1333,15 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETFONT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETFONT (wParam, lParam);
if (result != null) return result;
- int /*long*/ code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
if (code != 0) return new LRESULT (code);
return new LRESULT (font != null ? font.handle : defaultFont ());
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
@@ -1354,7 +1354,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -1371,7 +1371,7 @@ LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (!OS.IsWinCE && OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
if ((state & CANVAS)!= 0) {
- int /*long*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (code == OS.HTCLIENT) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -1390,7 +1390,7 @@ LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
if ((state & CANVAS) != 0 && (style & SWT.EMBEDDED) != 0) {
if (OS.LOWORD (wParam) == OS.WM_CREATE) {
RECT rect = new RECT ();
@@ -1401,7 +1401,7 @@ LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_PARENTNOTIFY (wParam, lParam);
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
if ((state & CANVAS) == 0 || (state & FOREIGN_HANDLE) != 0) {
return super.WM_PAINT (wParam, lParam);
}
@@ -1428,15 +1428,15 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
}
}
if (bufferedPaint) {
- int /*long*/ hDC = OS.BeginPaint (handle, ps);
+ long /*int*/ hDC = OS.BeginPaint (handle, ps);
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int /*long*/ [] phdc = new int /*long*/ [1];
+ long /*int*/ [] phdc = new long /*int*/ [1];
int flags = OS.BPBF_COMPATIBLEBITMAP;
RECT prcTarget = new RECT ();
OS.SetRect (prcTarget, ps.left, ps.top, ps.right, ps.bottom);
- int /*long*/ hBufferedPaint = OS.BeginBufferedPaint (hDC, prcTarget, flags, null, phdc);
+ long /*int*/ hBufferedPaint = OS.BeginBufferedPaint (hDC, prcTarget, flags, null, phdc);
GCData data = new GCData ();
data.device = display;
data.foreground = getForegroundPixel ();
@@ -1475,7 +1475,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
GC gc = GC.win32_new (this, data);
/* Get the system region for the paint HDC */
- int /*long*/ sysRgn = 0;
+ long /*int*/ sysRgn = 0;
if ((style & (SWT.DOUBLE_BUFFERED | SWT.TRANSPARENT)) != 0 || (style & SWT.NO_MERGE_PAINTS) != 0) {
sysRgn = OS.CreateRectRgn (0, 0, 0, 0);
if (OS.GetRandomRgn (gc.handle, sysRgn, OS.SYSRGN) == 1) {
@@ -1484,7 +1484,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
int nBytes = OS.GetRegionData (sysRgn, 0, null);
int [] lpRgnData = new int [nBytes / 4];
OS.GetRegionData (sysRgn, nBytes, lpRgnData);
- int /*long*/ newSysRgn = OS.ExtCreateRegion (new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
+ long /*int*/ newSysRgn = OS.ExtCreateRegion (new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
OS.DeleteObject (sysRgn);
sysRgn = newSysRgn;
}
@@ -1583,7 +1583,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
gc.dispose ();
}
} else {
- int /*long*/ hDC = OS.BeginPaint (handle, ps);
+ long /*int*/ hDC = OS.BeginPaint (handle, ps);
if ((style & (SWT.NO_BACKGROUND | SWT.TRANSPARENT)) == 0) {
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
@@ -1609,7 +1609,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1645,12 +1645,12 @@ LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
if (lParam != 0) OS.InvalidateRect (handle, null, true);
return super.WM_SETFONT (wParam, lParam);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
if ((state & RESIZE_DEFERRED) != 0) {
result = super.WM_SIZE (wParam, lParam);
@@ -1698,10 +1698,10 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
OS.SendMessage (hwndChild, OS.WM_SYSCOLORCHANGE, 0, 0);
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -1709,7 +1709,7 @@ LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
@@ -1735,7 +1735,7 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
case OS.SC_VSCROLL:
boolean showHBar = horizontalBar != null && horizontalBar.getVisible ();
boolean showVBar = verticalBar != null && verticalBar.getVisible ();
- int /*long*/ code = callWindowProc (handle, OS.WM_SYSCOMMAND, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_SYSCOMMAND, wParam, lParam);
if ((showHBar != (horizontalBar != null && horizontalBar.getVisible ())) ||
(showVBar != (verticalBar != null && verticalBar.getVisible ()))) {
int flags = OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_UPDATENOW;
@@ -1749,7 +1749,7 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0 && hooks (SWT.Paint)) {
@@ -1758,20 +1758,20 @@ LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNCPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmNCPaint (hwnd, wParam, lParam);
if (result != null) return result;
- int /*long*/ borderHandle = borderHandle ();
+ long /*int*/ borderHandle = borderHandle ();
if ((state & CANVAS) != 0 || (hwnd == borderHandle && handle != borderHandle)) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int bits1 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
if ((bits1 & OS.WS_EX_CLIENTEDGE) != 0) {
- int /*long*/ code = 0;
+ long /*int*/ code = 0;
int bits2 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
if ((bits2 & (OS.WS_HSCROLL | OS.WS_VSCROLL)) != 0) {
code = callWindowProc (hwnd, OS.WM_NCPAINT, wParam, lParam);
}
- int /*long*/ hDC = OS.GetWindowDC (hwnd);
+ long /*int*/ hDC = OS.GetWindowDC (hwnd);
RECT rect = new RECT ();
OS.GetWindowRect (hwnd, rect);
rect.right -= rect.left;
@@ -1788,7 +1788,7 @@ LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return result;
}
-LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (!OS.IsWinCE) {
switch (hdr.code) {
/*
@@ -1814,7 +1814,7 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
* check if the parent is already on top and neither set or clear
* the topmost status of the tool tip.
*/
- int /*long*/ hwndParent = hdr.hwndFrom;
+ long /*int*/ hwndParent = hdr.hwndFrom;
do {
hwndParent = OS.GetParent (hwndParent);
if (hwndParent == 0) break;
@@ -1824,7 +1824,7 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
if (hwndParent != 0) break;
display.lockActiveWindow = true;
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOSIZE;
- int /*long*/ hwndInsertAfter = hdr.code == OS.TTN_SHOW ? OS.HWND_TOPMOST : OS.HWND_NOTOPMOST;
+ long /*int*/ hwndInsertAfter = hdr.code == OS.TTN_SHOW ? OS.HWND_TOPMOST : OS.HWND_NOTOPMOST;
SetWindowPos (hdr.hwndFrom, hwndInsertAfter, 0, 0, 0, 0, flags);
display.lockActiveWindow = false;
break;
@@ -1862,7 +1862,7 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
* the orientation of the control.
*/
Widget widget = null;
- int /*long*/ hwnd = hdr.idFrom;
+ long /*int*/ hwnd = hdr.idFrom;
if ((lpnmtdi.uFlags & OS.TTF_IDISHWND) != 0) {
widget = display.getControl (hwnd);
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index 7f7ad8410e..92056be90c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
@@ -58,7 +58,7 @@ public abstract class Control extends Widget implements Drawable {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
Composite parent;
Cursor cursor;
Menu menu;
@@ -531,7 +531,7 @@ int binarySearch (int [] indices, int start, int end, int index) {
return -low - 1;
}
-int /*long*/ borderHandle () {
+long /*int*/ borderHandle () {
return handle;
}
@@ -572,7 +572,7 @@ void checkComposited () {
/* Do nothing */
}
-boolean checkHandle (int /*long*/ hwnd) {
+boolean checkHandle (long /*int*/ hwnd) {
return hwnd == handle;
}
@@ -690,7 +690,7 @@ Widget [] computeTabList () {
}
void createHandle () {
- int /*long*/ hwndParent = widgetParent ();
+ long /*int*/ hwndParent = widgetParent ();
handle = OS.CreateWindowEx (
widgetExtStyle (),
windowClass (),
@@ -707,7 +707,7 @@ void createHandle () {
OS.SetWindowLongPtr (handle, OS.GWLP_ID, handle);
}
if (OS.IsDBLocale && hwndParent != 0) {
- int /*long*/ hIMC = OS.ImmGetContext (hwndParent);
+ long /*int*/ hIMC = OS.ImmGetContext (hwndParent);
OS.ImmAssociateContext (handle, hIMC);
OS.ImmReleaseContext (hwndParent, hIMC);
}
@@ -722,8 +722,8 @@ void checkGesture () {
* Feature in Windows 7: All gestures are enabled by default except GID_ROTATE.
* Enable it explicitly by calling SetGestureConfig.
*/
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pConfigs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, GESTURECONFIG.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pConfigs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, GESTURECONFIG.sizeof);
if (pConfigs != 0) {
GESTURECONFIG config = new GESTURECONFIG();
config.dwID = OS.GID_ROTATE;
@@ -761,7 +761,7 @@ int defaultBackground () {
return OS.GetSysColor (OS.COLOR_BTNFACE);
}
-int /*long*/ defaultFont () {
+long /*int*/ defaultFont () {
return display.getSystemFont ().handle;
}
@@ -774,7 +774,7 @@ void deregister () {
}
void destroyWidget () {
- int /*long*/ hwnd = topHandle ();
+ long /*int*/ hwnd = topHandle ();
releaseHandle ();
if (hwnd != 0) {
OS.DestroyWindow (hwnd);
@@ -902,7 +902,7 @@ boolean dragDetect (int button, int count, int stateMask, int x, int y) {
if ((stateMask & SWT.BUTTON3) != 0) wParam |= OS.MK_RBUTTON;
if ((stateMask & SWT.BUTTON4) != 0) wParam |= OS.MK_XBUTTON1;
if ((stateMask & SWT.BUTTON5) != 0) wParam |= OS.MK_XBUTTON2;
- int /*long*/ lParam = OS.MAKELPARAM (x, y);
+ long /*int*/ lParam = OS.MAKELPARAM (x, y);
OS.SendMessage (handle, OS.WM_LBUTTONUP, wParam, lParam);
}
return false;
@@ -910,17 +910,17 @@ boolean dragDetect (int button, int count, int stateMask, int x, int y) {
return sendDragEvent (button, stateMask, x, y);
}
-void drawBackground (int /*long*/ hDC) {
+void drawBackground (long /*int*/ hDC) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
drawBackground (hDC, rect);
}
-void drawBackground (int /*long*/ hDC, RECT rect) {
+void drawBackground (long /*int*/ hDC, RECT rect) {
drawBackground (hDC, rect, -1, 0, 0);
}
-void drawBackground (int /*long*/ hDC, RECT rect, int pixel, int tx, int ty) {
+void drawBackground (long /*int*/ hDC, RECT rect, int pixel, int tx, int ty) {
Control control = findBackgroundControl ();
if (control != null) {
if (control.backgroundImage != null) {
@@ -944,21 +944,21 @@ void drawBackground (int /*long*/ hDC, RECT rect, int pixel, int tx, int ty) {
fillBackground (hDC, pixel, rect);
}
-void drawImageBackground (int /*long*/ hDC, int /*long*/ hwnd, int /*long*/ hBitmap, RECT rect, int tx, int ty) {
+void drawImageBackground (long /*int*/ hDC, long /*int*/ hwnd, long /*int*/ hBitmap, RECT rect, int tx, int ty) {
RECT rect2 = new RECT ();
OS.GetClientRect (hwnd, rect2);
OS.MapWindowPoints (hwnd, handle, rect2, 2);
- int /*long*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
+ long /*int*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
POINT lpPoint = new POINT ();
OS.GetWindowOrgEx (hDC, lpPoint);
OS.SetBrushOrgEx (hDC, -rect2.left - lpPoint.x - tx, -rect2.top - lpPoint.y - ty, lpPoint);
- int /*long*/ hOldBrush = OS.SelectObject (hDC, hBrush);
+ long /*int*/ hOldBrush = OS.SelectObject (hDC, hBrush);
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SetBrushOrgEx (hDC, lpPoint.x, lpPoint.y, null);
OS.SelectObject (hDC, hOldBrush);
}
-void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
+void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
/* Do nothing */
}
@@ -970,9 +970,9 @@ void enableWidget (boolean enabled) {
OS.EnableWindow (handle, enabled);
}
-void fillBackground (int /*long*/ hDC, int pixel, RECT rect) {
+void fillBackground (long /*int*/ hDC, int pixel, RECT rect) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
- int /*long*/ hPalette = display.hPalette;
+ long /*int*/ hPalette = display.hPalette;
if (hPalette != 0) {
OS.SelectPalette (hDC, hPalette, false);
OS.RealizePalette (hDC);
@@ -980,7 +980,7 @@ void fillBackground (int /*long*/ hDC, int pixel, RECT rect) {
OS.FillRect (hDC, rect, findBrush (pixel, OS.BS_SOLID));
}
-void fillImageBackground (int /*long*/ hDC, Control control, RECT rect, int tx, int ty) {
+void fillImageBackground (long /*int*/ hDC, Control control, RECT rect, int tx, int ty) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
if (control != null) {
Image image = control.backgroundImage;
@@ -990,7 +990,7 @@ void fillImageBackground (int /*long*/ hDC, Control control, RECT rect, int tx,
}
}
-void fillThemeBackground (int /*long*/ hDC, Control control, RECT rect) {
+void fillThemeBackground (long /*int*/ hDC, Control control, RECT rect) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
if (control != null) {
control.drawThemeBackground (hDC, handle, rect);
@@ -1002,7 +1002,7 @@ Control findBackgroundControl () {
return (state & PARENT_BACKGROUND) != 0 ? parent.findBackgroundControl () : null;
}
-int /*long*/ findBrush (int /*long*/ value, int lbStyle) {
+long /*int*/ findBrush (long /*int*/ value, int lbStyle) {
return parent.findBrush (value, lbStyle);
}
@@ -1207,7 +1207,7 @@ int getBackgroundPixel () {
*/
public int getBorderWidth () {
checkWidget ();
- int /*long*/ borderHandle = borderHandle ();
+ long /*int*/ borderHandle = borderHandle ();
int bits1 = OS.GetWindowLong (borderHandle, OS.GWL_EXSTYLE);
if ((bits1 & OS.WS_EX_CLIENTEDGE) != 0) return OS.GetSystemMetrics (OS.SM_CXEDGE);
if ((bits1 & OS.WS_EX_STATICEDGE) != 0) return OS.GetSystemMetrics (OS.SM_CXBORDER);
@@ -1234,7 +1234,7 @@ public Rectangle getBounds () {
forceResize ();
RECT rect = new RECT ();
OS.GetWindowRect (topHandle (), rect);
- int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
+ long /*int*/ hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
@@ -1243,7 +1243,7 @@ public Rectangle getBounds () {
int getCodePage () {
if (OS.IsUnicode) return OS.CP_ACP;
- int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
LOGFONT logFont = OS.IsUnicode ? (LOGFONT) new LOGFONTW () : new LOGFONTA ();
OS.GetObject (hFont, LOGFONT.sizeof, logFont);
int cs = logFont.lfCharSet & 0xFF;
@@ -1257,11 +1257,11 @@ int getCodePage () {
String getClipboardText () {
String string = "";
if (OS.OpenClipboard (0)) {
- int /*long*/ hMem = OS.GetClipboardData (OS.IsUnicode ? OS.CF_UNICODETEXT : OS.CF_TEXT);
+ long /*int*/ hMem = OS.GetClipboardData (OS.IsUnicode ? OS.CF_UNICODETEXT : OS.CF_TEXT);
if (hMem != 0) {
/* Ensure byteCount is a multiple of 2 bytes on UNICODE platforms */
int byteCount = OS.GlobalSize (hMem) / TCHAR.sizeof * TCHAR.sizeof;
- int /*long*/ ptr = OS.GlobalLock (hMem);
+ long /*int*/ ptr = OS.GlobalLock (hMem);
if (ptr != 0) {
/* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR (0, byteCount / TCHAR.sizeof);
@@ -1351,7 +1351,7 @@ public boolean getEnabled () {
public Font getFont () {
checkWidget ();
if (font != null) return font;
- int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (hFont == 0) hFont = defaultFont ();
return Font.win32_new (display, hFont);
}
@@ -1408,7 +1408,7 @@ public Point getLocation () {
forceResize ();
RECT rect = new RECT ();
OS.GetWindowRect (topHandle (), rect);
- int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
+ long /*int*/ hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
return new Point (rect.left, rect.top);
}
@@ -1450,7 +1450,7 @@ public Monitor getMonitor () {
if (OS.IsWinCE || OS.WIN32_VERSION < OS.VERSION (4, 10)) {
return display.getPrimaryMonitor ();
}
- int /*long*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ long /*int*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -1659,7 +1659,7 @@ boolean hasFocus () {
* then this control is considered to have focus
* even though it does not have focus in Windows.
*/
- int /*long*/ hwndFocus = OS.GetFocus ();
+ long /*int*/ hwndFocus = OS.GetFocus ();
while (hwndFocus != 0) {
if (hwndFocus == handle) return true;
if (display.getControl (hwndFocus) != null) {
@@ -1685,12 +1685,12 @@ boolean hasFocus () {
*
* @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*/ hwnd = handle;
+ long /*int*/ hwnd = handle;
if (data != null && data.hwnd != 0) hwnd = data.hwnd;
if (data != null) data.hwnd = hwnd;
- int /*long*/ hDC = 0;
+ long /*int*/ hDC = 0;
if (data == null || data.ps == null) {
hDC = OS.GetDC (hwnd);
} else {
@@ -1741,9 +1741,9 @@ 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) {
+public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
checkWidget ();
- int /*long*/ hwnd = handle;
+ long /*int*/ hwnd = handle;
if (data != null && data.hwnd != 0) {
hwnd = data.hwnd;
}
@@ -1874,7 +1874,7 @@ boolean isShowing () {
*/
// if (!OS.IsWindowVisible (handle)) return false;
// int flags = OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS;
-// int /*long*/ hDC = OS.GetDCEx (handle, 0, flags);
+// long /*int*/ hDC = OS.GetDCEx (handle, 0, flags);
// int result = OS.GetClipBox (hDC, new RECT ());
// OS.ReleaseDC (handle, hDC);
// return result != OS.NULLREGION;
@@ -1900,7 +1900,7 @@ boolean isTabItem () {
}
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.WS_TABSTOP) != 0) return false;
- int /*long*/ code = OS.SendMessage (handle, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_STATIC) != 0) return false;
if ((code & OS.DLGC_WANTALLKEYS) != 0) return false;
if ((code & OS.DLGC_WANTARROWS) != 0) return false;
@@ -1928,7 +1928,7 @@ public boolean isVisible () {
return getVisible () && parent.isVisible ();
}
-void mapEvent (int /*long*/ hwnd, Event event) {
+void mapEvent (long /*int*/ hwnd, Event event) {
if (hwnd != handle) {
POINT point = new POINT ();
point.x = event.x;
@@ -1977,11 +1977,11 @@ boolean mnemonicMatch (char key) {
*/
public void moveAbove (Control control) {
checkWidget ();
- int /*long*/ topHandle = topHandle (), hwndAbove = OS.HWND_TOP;
+ long /*int*/ topHandle = topHandle (), hwndAbove = OS.HWND_TOP;
if (control != null) {
if (control.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
if (parent != control.parent) return;
- int /*long*/ hwnd = control.topHandle ();
+ long /*int*/ hwnd = control.topHandle ();
if (hwnd == 0 || hwnd == topHandle) return;
hwndAbove = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
/*
@@ -2021,7 +2021,7 @@ public void moveAbove (Control control) {
*/
public void moveBelow (Control control) {
checkWidget ();
- int /*long*/ topHandle = topHandle (), hwndAbove = OS.HWND_BOTTOM;
+ long /*int*/ topHandle = topHandle (), hwndAbove = OS.HWND_BOTTOM;
if (control != null) {
if (control.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
if (parent != control.parent) return;
@@ -2045,7 +2045,7 @@ public void moveBelow (Control control) {
* this case and do nothing because the control is already
* at the bottom.
*/
- int /*long*/ hwndParent = parent.handle, hwnd = hwndParent;
+ long /*int*/ hwndParent = parent.handle, hwnd = hwndParent;
hwndAbove = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
while (hwndAbove != 0 && hwndAbove != hwnd) {
if (OS.GetWindow (hwndAbove, OS.GW_OWNER) == hwndParent) break;
@@ -2132,14 +2132,14 @@ public boolean print (GC gc) {
if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (5, 1)) {
- int /*long*/ topHandle = topHandle ();
- int /*long*/ hdc = gc.handle;
+ long /*int*/ topHandle = topHandle ();
+ long /*int*/ hdc = gc.handle;
int state = 0;
- int /*long*/ gdipGraphics = gc.getGCData().gdipGraphics;
+ long /*int*/ gdipGraphics = gc.getGCData().gdipGraphics;
if (gdipGraphics != 0) {
- int /*long*/ clipRgn = 0;
+ long /*int*/ clipRgn = 0;
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeNone);
- int /*long*/ rgn = Gdip.Region_new();
+ long /*int*/ rgn = Gdip.Region_new();
if (rgn == 0) error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetClip(gdipGraphics, rgn);
if (!Gdip.Region_IsInfinite(rgn, gdipGraphics)) {
@@ -2148,7 +2148,7 @@ public boolean print (GC gc) {
Gdip.Region_delete(rgn);
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
float[] lpXform = null;
- int /*long*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
if (matrix == 0) error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
if (!Gdip.Matrix_IsIdentity(matrix)) {
@@ -2183,7 +2183,7 @@ public boolean print (GC gc) {
return false;
}
-void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
+void printWidget (long /*int*/ hwnd, long /*int*/ hdc, GC gc) {
/*
* Bug in Windows. For some reason, PrintWindow()
* returns success but does nothing when it is called
@@ -2198,8 +2198,8 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
* The fix is temporarily reparent the window to the desktop,
* call PrintWindow() then reparent the window back.
*/
- int /*long*/ hwndParent = OS.GetParent (hwnd);
- int /*long*/ hwndShell = hwndParent;
+ long /*int*/ hwndParent = OS.GetParent (hwnd);
+ long /*int*/ hwndShell = hwndParent;
while (OS.GetParent (hwndShell) != 0) {
if (OS.GetWindow (hwndShell, OS.GW_OWNER) != 0) break;
hwndShell = OS.GetParent (hwndShell);
@@ -2221,8 +2221,8 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
* back.
*/
if (!fixPrintWindow) {
- int /*long*/ rgn = OS.CreateRectRgn(0, 0, 0, 0);
- int /*long*/ parent = OS.GetParent(hwnd);
+ long /*int*/ rgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ parent = OS.GetParent(hwnd);
while (parent != hwndShell && !fixPrintWindow) {
if (OS.GetWindowRgn(parent, rgn) != 0) {
fixPrintWindow = true;
@@ -2233,7 +2233,7 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
}
int bits1 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
int bits2 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
- int /*long*/ hwndInsertAfter = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
+ long /*int*/ hwndInsertAfter = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
/*
* Bug in Windows. For some reason, when GetWindow ()
* with GW_HWNDPREV is used to query the previous window
@@ -2798,7 +2798,7 @@ public void removeTraverseListener(TraverseListener listener) {
}
void showWidget (boolean visible) {
- int /*long*/ topHandle = topHandle ();
+ long /*int*/ topHandle = topHandle ();
OS.ShowWindow (topHandle, visible ? OS.SW_SHOW : OS.SW_HIDE);
if (handle != topHandle) OS.ShowWindow (handle, visible ? OS.SW_SHOW : OS.SW_HIDE);
}
@@ -3034,7 +3034,7 @@ public void setBackgroundImage (Image image) {
updateBackgroundImage ();
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
if (OS.IsWinCE) {
OS.InvalidateRect (handle, null, true);
} else {
@@ -3095,7 +3095,7 @@ void setBounds (int x, int y, int width, int height, int flags, boolean defer) {
}
}
}
- int /*long*/ topHandle = topHandle ();
+ long /*int*/ topHandle = topHandle ();
if (defer && parent != null) {
forceResize ();
if (parent.lpwp != null) {
@@ -3173,7 +3173,7 @@ public void setCapture (boolean capture) {
}
void setCursor () {
- int /*long*/ lParam = OS.MAKELPARAM (OS.HTCLIENT, OS.WM_MOUSEMOVE);
+ long /*int*/ lParam = OS.MAKELPARAM (OS.HTCLIENT, OS.WM_MOUSEMOVE);
OS.SendMessage (handle, OS.WM_SETCURSOR, handle, lParam);
}
@@ -3201,15 +3201,15 @@ public void setCursor (Cursor cursor) {
if (cursor != null && cursor.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
this.cursor = cursor;
if (OS.IsWinCE) {
- int /*long*/ hCursor = cursor != null ? cursor.handle : 0;
+ long /*int*/ hCursor = cursor != null ? cursor.handle : 0;
OS.SetCursor (hCursor);
return;
}
- int /*long*/ hwndCursor = OS.GetCapture ();
+ long /*int*/ hwndCursor = OS.GetCapture ();
if (hwndCursor == 0) {
POINT pt = new POINT ();
if (!OS.GetCursorPos (pt)) return;
- int /*long*/ hwnd = hwndCursor = OS.WindowFromPoint (pt);
+ long /*int*/ hwnd = hwndCursor = OS.WindowFromPoint (pt);
while (hwnd != 0 && hwnd != handle) {
hwnd = OS.GetParent (hwnd);
}
@@ -3221,7 +3221,7 @@ public void setCursor (Cursor cursor) {
}
void setDefaultFont () {
- int /*long*/ hFont = display.getSystemFont ().handle;
+ long /*int*/ hFont = display.getSystemFont ().handle;
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
}
@@ -3320,7 +3320,7 @@ public boolean setFocus () {
*/
public void setFont (Font font) {
checkWidget ();
- int /*long*/ hFont = 0;
+ long /*int*/ hFont = 0;
if (font != null) {
if (font.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
hFont = font.handle;
@@ -3540,7 +3540,7 @@ public void setRedraw (boolean redraw) {
}
if (redraw) {
if (--drawCount == 0) {
- int /*long*/ topHandle = topHandle ();
+ long /*int*/ topHandle = topHandle ();
OS.SendMessage (topHandle, OS.WM_SETREDRAW, 1, 0);
if (handle != topHandle) OS.SendMessage (handle, OS.WM_SETREDRAW, 1, 0);
if ((state & HIDDEN) != 0) {
@@ -3559,7 +3559,7 @@ public void setRedraw (boolean redraw) {
}
} else {
if (drawCount++ == 0) {
- int /*long*/ topHandle = topHandle ();
+ long /*int*/ topHandle = topHandle ();
OS.SendMessage (topHandle, OS.WM_SETREDRAW, 0, 0);
if (handle != topHandle) OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
}
@@ -3586,7 +3586,7 @@ public void setRedraw (boolean redraw) {
public void setRegion (Region region) {
checkWidget ();
if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ hRegion = 0;
+ long /*int*/ hRegion = 0;
if (region != null) {
hRegion = OS.CreateRectRgn (0, 0, 0, 0);
OS.CombineRgn (hRegion, region.handle, hRegion, OS.RGN_OR);
@@ -3779,8 +3779,8 @@ void sort (int [] items) {
}
void subclass () {
- int /*long*/ oldProc = windowProc ();
- int /*long*/ newProc = display.windowProc;
+ long /*int*/ oldProc = windowProc ();
+ long /*int*/ newProc = display.windowProc;
if (oldProc == newProc) return;
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, newProc);
}
@@ -3877,7 +3877,7 @@ public Point toDisplay (Point point) {
return toDisplay (point.x, point.y);
}
-int /*long*/ topHandle () {
+long /*int*/ topHandle () {
return handle;
}
@@ -3894,9 +3894,9 @@ boolean translateMnemonic (Event event, Control control) {
boolean translateMnemonic (MSG msg) {
if (msg.wParam < 0x20) return false;
- int /*long*/ hwnd = msg.hwnd;
+ long /*int*/ hwnd = msg.hwnd;
if (OS.GetKeyState (OS.VK_MENU) >= 0) {
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) return false;
if ((code & OS.DLGC_BUTTON) == 0) return false;
}
@@ -3914,7 +3914,7 @@ boolean translateMnemonic (MSG msg) {
}
boolean translateTraversal (MSG msg) {
- int /*long*/ hwnd = msg.hwnd;
+ long /*int*/ hwnd = msg.hwnd;
int key = (int)/*64*/msg.wParam;
if (key == OS.VK_MENU) {
if ((msg.lParam & 0x40000000) == 0) {
@@ -3930,7 +3930,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_ESCAPE: {
all = true;
lastAscii = 27;
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) {
/*
* Use DLGC_HASSETSEL to determine that the control
@@ -3947,7 +3947,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_RETURN: {
all = true;
lastAscii = '\r';
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) doit = false;
detail = SWT.TRAVERSE_RETURN;
break;
@@ -3955,7 +3955,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_TAB: {
lastAscii = '\t';
boolean next = OS.GetKeyState (OS.VK_SHIFT) >= 0;
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & (OS.DLGC_WANTTAB | OS.DLGC_WANTALLKEYS)) != 0) {
/*
* Use DLGC_HASSETSEL to determine that the control is a
@@ -3989,7 +3989,7 @@ boolean translateTraversal (MSG msg) {
if (key == OS.VK_LEFT || key == OS.VK_RIGHT) return false;
}
lastVirtual = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & (OS.DLGC_WANTARROWS /*| OS.DLGC_WANTALLKEYS*/)) != 0) doit = false;
boolean next = key == OS.VK_DOWN || key == OS.VK_RIGHT;
if (parent != null && (parent.style & SWT.MIRRORED) != 0) {
@@ -4003,7 +4003,7 @@ boolean translateTraversal (MSG msg) {
all = true;
lastVirtual = true;
if (OS.GetKeyState (OS.VK_CONTROL) >= 0) return false;
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) {
/*
* Use DLGC_HASSETSEL to determine that the control is a
@@ -4340,8 +4340,8 @@ boolean traverseReturn () {
}
void unsubclass () {
- int /*long*/ newProc = windowProc ();
- int /*long*/ oldProc = display.windowProc;
+ long /*int*/ newProc = windowProc ();
+ long /*int*/ oldProc = display.windowProc;
if (oldProc == newProc) return;
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, newProc);
}
@@ -4449,7 +4449,7 @@ int widgetExtStyle () {
return bits;
}
-int /*long*/ widgetParent () {
+long /*int*/ widgetParent () {
return parent.handle;
}
@@ -4506,7 +4506,7 @@ public boolean setParent (Composite parent) {
Menu [] menus = oldShell.findMenus (this);
fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
}
- int /*long*/ topHandle = topHandle ();
+ long /*int*/ topHandle = topHandle ();
if (OS.SetParent (topHandle, parent.handle) == 0) return false;
this.parent = parent;
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
@@ -4517,9 +4517,9 @@ public boolean setParent (Composite parent) {
abstract TCHAR windowClass ();
-abstract int /*long*/ windowProc ();
+abstract long /*int*/ windowProc ();
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
switch (msg) {
case OS.WM_ACTIVATE: result = WM_ACTIVATE (wParam, lParam); break;
@@ -4623,32 +4623,32 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return callWindowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_CAPTURECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CAPTURECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
return wmCaptureChanged (handle, wParam, lParam);
}
-LRESULT WM_CHANGEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHANGEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
if ((state & IGNORE_WM_CHANGEUISTATE) != 0) return LRESULT.ZERO;
return null;
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
return wmChar (handle, wParam, lParam);
}
-LRESULT WM_CLEAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CLEAR (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_CLOSE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CLOSE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
/*
* When the WM_COMMAND message is sent from a
* menu, the HWND parameter in LPARAM is zero.
@@ -4669,12 +4669,12 @@ LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return control.wmCommandChild (wParam, lParam);
}
-LRESULT WM_CONTEXTMENU (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CONTEXTMENU (long /*int*/ wParam, long /*int*/ lParam) {
return wmContextMenu (handle, wParam, lParam);
}
-LRESULT WM_CTLCOLOR (int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ hPalette = display.hPalette;
+LRESULT WM_CTLCOLOR (long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ hPalette = display.hPalette;
if (hPalette != 0) {
OS.SelectPalette (wParam, hPalette, false);
OS.RealizePalette (wParam);
@@ -4684,15 +4684,15 @@ LRESULT WM_CTLCOLOR (int /*long*/ wParam, int /*long*/ lParam) {
return control.wmColorChild (wParam, lParam);
}
-LRESULT WM_CUT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CUT (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_DESTROY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_DESTROY (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_DRAWITEM (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_DRAWITEM (long /*int*/ wParam, long /*int*/ lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
if (struct.CtlType == OS.ODT_MENU) {
@@ -4705,15 +4705,15 @@ LRESULT WM_DRAWITEM (int /*long*/ wParam, int /*long*/ lParam) {
return control.wmDrawChild (wParam, lParam);
}
-LRESULT WM_ENDSESSION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ENDSESSION (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_ENTERIDLE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ENTERIDLE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
if ((state & DRAW_BACKGROUND) != 0) {
if (findImageControl () != null) return LRESULT.ONE;
}
@@ -4725,7 +4725,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_GESTURE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GESTURE (long /*int*/ wParam, long /*int*/ lParam) {
if (hooks (SWT.Gesture) || filters (SWT.Gesture)) {
GESTUREINFO gi = new GESTUREINFO ();
gi.cbSize = GESTUREINFO.sizeof;
@@ -4739,31 +4739,31 @@ LRESULT WM_GESTURE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_GETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETFONT (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
if (accessible != null) {
- int /*long*/ result = accessible.internal_WM_GETOBJECT (wParam, lParam);
+ long /*int*/ result = accessible.internal_WM_GETOBJECT (wParam, lParam);
if (result != 0) return new LRESULT (result);
}
return null;
}
-LRESULT WM_GETMINMAXINFO (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETMINMAXINFO (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_HOTKEY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HOTKEY (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_HELP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HELP (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsWinCE) return null;
HELPINFO lphi = new HELPINFO ();
OS.MoveMemory (lphi, lParam, HELPINFO.sizeof);
@@ -4780,7 +4780,7 @@ LRESULT WM_HELP (int /*long*/ wParam, int /*long*/ lParam) {
if (menu.hooks (SWT.Help)) widget = menu;
}
if (widget != null) {
- int /*long*/ hwndShell = shell.handle;
+ long /*int*/ hwndShell = shell.handle;
OS.SendMessage (hwndShell, OS.WM_CANCELMODE, 0, 0);
widget.postEvent (SWT.Help);
return LRESULT.ONE;
@@ -4795,29 +4795,29 @@ LRESULT WM_HELP (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
Control control = display.getControl (lParam);
if (control == null) return null;
return control.wmScrollChild (wParam, lParam);
}
-LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
return wmIMEChar (handle, wParam, lParam);
}
-LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_IME_COMPOSITION_START (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION_START (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_IME_ENDCOMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_ENDCOMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_UNINITMENUPOPUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UNINITMENUPOPUP (long /*int*/ wParam, long /*int*/ lParam) {
Menu hiddenMenu = menuShell ().findMenu (wParam);
if (hiddenMenu != null) {
Shell shell = getShell ();
@@ -4827,7 +4827,7 @@ LRESULT WM_UNINITMENUPOPUP (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_INITMENUPOPUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_INITMENUPOPUP (long /*int*/ wParam, long /*int*/ lParam) {
/* Ignore WM_INITMENUPOPUP for an accelerator */
if (display.accelKeyHit) return null;
@@ -4884,47 +4884,47 @@ LRESULT WM_INITMENUPOPUP (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_INPUTLANGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_INPUTLANGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmKeyDown (handle, wParam, lParam);
}
-LRESULT WM_KEYUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmKeyUp (handle, wParam, lParam);
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
return wmKillFocus (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
return wmLButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmLButtonDown (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmLButtonUp (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
return wmMButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmMButtonDown (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmMButtonUp (handle, wParam, lParam);
}
-LRESULT WM_MEASUREITEM (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MEASUREITEM (long /*int*/ wParam, long /*int*/ lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
if (struct.CtlType == OS.ODT_MENU) {
@@ -4932,13 +4932,13 @@ LRESULT WM_MEASUREITEM (int /*long*/ wParam, int /*long*/ lParam) {
if (item == null) return null;
return item.wmMeasureChild (wParam, lParam);
}
- int /*long*/ hwnd = OS.GetDlgItem (handle, struct.CtlID);
+ long /*int*/ hwnd = OS.GetDlgItem (handle, struct.CtlID);
Control control = display.getControl (hwnd);
if (control == null) return null;
return control.wmMeasureChild (wParam, lParam);
}
-LRESULT WM_MENUCHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MENUCHAR (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the user types Alt+<key>
* and <key> does not match a mnemonic in the System
@@ -4955,7 +4955,7 @@ LRESULT WM_MENUCHAR (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_MENUSELECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MENUSELECT (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
Shell shell = getShell ();
if (code == 0xFFFF && lParam == 0) {
@@ -5015,32 +5015,32 @@ LRESULT WM_MENUSELECT (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_MOUSEACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_MOUSEHOVER (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEHOVER (long /*int*/ wParam, long /*int*/ lParam) {
return wmMouseHover (handle, wParam, lParam);
}
-LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) getShell ().fixToolTip ();
return wmMouseLeave (handle, wParam, lParam);
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
return wmMouseMove (handle, wParam, lParam);
}
-LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
return wmMouseWheel (handle, wParam, lParam);
}
-LRESULT WM_MOUSEHWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEHWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
return wmMouseHWheel (handle, wParam, lParam);
}
-LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
state |= MOVE_OCCURRED;
if (findImageControl () != null) {
if (this != getShell ()) redrawChildren ();
@@ -5058,83 +5058,83 @@ LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_NCACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_NCCALCSIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCCALCSIZE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
if (!OS.IsWindowEnabled (handle)) return null;
if (!isActive ()) return new LRESULT (OS.HTTRANSPARENT);
return null;
}
-LRESULT WM_NCLBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCLBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_NCPAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCPAINT (long /*int*/ wParam, long /*int*/ lParam) {
return wmNCPaint (handle, wParam, lParam);
}
-LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
NMHDR hdr = new NMHDR ();
OS.MoveMemory (hdr, lParam, NMHDR.sizeof);
return wmNotify (hdr, wParam, lParam);
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
return wmPaint (handle, wParam, lParam);
}
-LRESULT WM_PALETTECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PALETTECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_PASTE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PASTE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_PRINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINT (long /*int*/ wParam, long /*int*/ lParam) {
return wmPrint (handle, wParam, lParam);
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_QUERYENDSESSION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_QUERYENDSESSION (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_QUERYNEWPALETTE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_QUERYNEWPALETTE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_QUERYOPEN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_QUERYOPEN (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_RBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
return wmRButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmRButtonDown (handle, wParam, lParam);
}
-LRESULT WM_RBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmRButtonUp (handle, wParam, lParam);
}
-LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
int hitTest = (short) OS.LOWORD (lParam);
if (hitTest == OS.HTCLIENT) {
Control control = display.getControl (wParam);
@@ -5148,42 +5148,42 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
return wmSetFocus (handle, wParam, lParam);
}
-LRESULT WM_SETTINGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETTINGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SHOWWINDOW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SHOWWINDOW (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
state |= RESIZE_OCCURRED;
if ((state & RESIZE_DEFERRED) == 0) sendEvent (SWT.Resize);
// widget could be disposed at this point
return null;
}
-LRESULT WM_SYSCHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCHAR (long /*int*/ wParam, long /*int*/ lParam) {
return wmSysChar (handle, wParam, lParam);
}
-LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Check to see if the command is a system command or
* a user menu item that was added to the System menu.
@@ -5205,7 +5205,7 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
int cmd = (int)/*64*/wParam & 0xFFF0;
switch (cmd) {
case OS.SC_CLOSE:
- int /*long*/ hwndShell = menuShell ().handle;
+ long /*int*/ hwndShell = menuShell ().handle;
int bits = OS.GetWindowLong (hwndShell, OS.GWL_STYLE);
if ((bits & OS.WS_SYSMENU) == 0) return LRESULT.ZERO;
break;
@@ -5298,19 +5298,19 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SYSKEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSKEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmSysKeyDown (handle, wParam, lParam);
}
-LRESULT WM_SYSKEYUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSKEYUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmSysKeyUp (handle, wParam, lParam);
}
-LRESULT WM_TABLET_FLICK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_TABLET_FLICK (long /*int*/ wParam, long /*int*/ lParam) {
if (!hooks (SWT.Gesture) && !filters (SWT.Gesture)) return null;
Event event = new Event ();
FLICK_DATA fData = new FLICK_DATA ();
- int /*long*/ [] source = new int /*long*/ [1];
+ long /*int*/ [] source = new long /*int*/ [1];
source[0] = wParam;
OS.MoveMemory (fData, source, OS.FLICK_DATA_sizeof ());
FLICK_POINT fPoint = new FLICK_POINT ();
@@ -5361,12 +5361,12 @@ LRESULT WM_TABLET_FLICK (int /*long*/ wParam, int /*long*/ lParam) {
return event.doit ? null : LRESULT.ONE;
}
-LRESULT WM_TOUCH (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_TOUCH (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
if (hooks (SWT.Touch) || filters (SWT.Touch)) {
int cInputs = OS.LOWORD (wParam);
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, cInputs * TOUCHINPUT.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, cInputs * TOUCHINPUT.sizeof);
if (pInputs != 0) {
if (OS.GetTouchInputInfo (lParam, cInputs, pInputs, TOUCHINPUT.sizeof)) {
TOUCHINPUT ti [] = new TOUCHINPUT [cInputs];
@@ -5384,35 +5384,35 @@ LRESULT WM_TOUCH (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_TIMER (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_UNDO (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UNDO (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
Control control = display.getControl (lParam);
if (control == null) return null;
return control.wmScrollChild (wParam, lParam);
}
-LRESULT WM_WINDOWPOSCHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGED (long /*int*/ wParam, long /*int*/ lParam) {
try {
display.resizeCount++;
- int /*long*/ code = callWindowProc (handle, OS.WM_WINDOWPOSCHANGED, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_WINDOWPOSCHANGED, wParam, lParam);
return code == 0 ? LRESULT.ZERO : new LRESULT (code);
} finally {
--display.resizeCount;
}
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When WM_SETREDRAW is used to turn off drawing
* for a control and the control is moved or resized, Windows does
@@ -5430,13 +5430,13 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
if (width != 0 && height != 0) {
- int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
+ long /*int*/ hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
if (OS.IsWinCE) {
OS.InvalidateRect (hwndParent, rect, true);
} else {
- int /*long*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
- int /*long*/ rgn2 = OS.CreateRectRgn (lpwp.x, lpwp.y, lpwp.x + lpwp.cx, lpwp.y + lpwp.cy);
+ long /*int*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long /*int*/ rgn2 = OS.CreateRectRgn (lpwp.x, lpwp.y, lpwp.x + lpwp.cx, lpwp.y + lpwp.cy);
OS.CombineRgn (rgn1, rgn1, rgn2, OS.RGN_DIFF);
int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN;
OS.RedrawWindow (hwndParent, null, rgn1, flags);
@@ -5450,19 +5450,19 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_XBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_XBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
return wmXButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_XBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_XBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmXButtonDown (handle, wParam, lParam);
}
-LRESULT WM_XBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_XBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmXButtonUp (handle, wParam, lParam);
}
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
Control control = findBackgroundControl ();
if (control == null) {
if ((state & THEME_BACKGROUND) != 0) {
@@ -5489,15 +5489,15 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
if (control.backgroundImage != null) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int /*long*/ hwnd = control.handle;
- int /*long*/ hBitmap = control.backgroundImage.handle;
+ long /*int*/ hwnd = control.handle;
+ long /*int*/ hBitmap = control.backgroundImage.handle;
OS.MapWindowPoints (handle, hwnd, rect, 2);
POINT lpPoint = new POINT ();
OS.GetWindowOrgEx (wParam, lpPoint);
OS.SetBrushOrgEx (wParam, -rect.left - lpPoint.x, -rect.top - lpPoint.y, lpPoint);
- int /*long*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
+ long /*int*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
if ((state & DRAW_BACKGROUND) != 0) {
- int /*long*/ hOldBrush = OS.SelectObject (wParam, hBrush);
+ long /*int*/ hOldBrush = OS.SelectObject (wParam, hBrush);
OS.MapWindowPoints (hwnd, handle, rect, 2);
OS.PatBlt (wParam, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (wParam, hOldBrush);
@@ -5505,40 +5505,40 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
OS.SetBkMode (wParam, OS.TRANSPARENT);
return new LRESULT (hBrush);
}
- int /*long*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
+ long /*int*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
if ((state & DRAW_BACKGROUND) != 0) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int /*long*/ hOldBrush = OS.SelectObject (wParam, hBrush);
+ long /*int*/ hOldBrush = OS.SelectObject (wParam, hBrush);
OS.PatBlt (wParam, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (wParam, hOldBrush);
}
return new LRESULT (hBrush);
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
Control control = display.getControl (hdr.hwndFrom);
if (control == null) return null;
return control.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java
index 94bc063e8f..0833b5f86d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java
@@ -49,7 +49,7 @@ public class CoolBar extends Composite {
CoolItem [] originalItems;
boolean locked;
boolean ignoreResize;
- static final int /*long*/ ReBarProc;
+ static final long /*int*/ ReBarProc;
static final TCHAR ReBarClass = new TCHAR (0, OS.REBARCLASSNAME, true);
static {
INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX ();
@@ -118,7 +118,7 @@ public CoolBar (Composite parent, int style) {
}
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ReBarProc, hwnd, msg, wParam, lParam);
}
@@ -224,7 +224,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
}
@@ -238,8 +238,8 @@ void createItem (CoolItem item, int index) {
System.arraycopy (items, 0, newItems, 0, items.length);
items = newItems;
}
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ lpText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ lpText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_TEXT | OS.RBBIM_STYLE | OS.RBBIM_ID;
@@ -368,7 +368,7 @@ void destroyItem (CoolItem item) {
originalItems = newOriginals;
}
-void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
+void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
if (background == -1 && (style & SWT.FLAT) != 0) {
Control control = findBackgroundControl ();
@@ -992,11 +992,11 @@ TCHAR windowClass () {
return ReBarClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ReBarProc;
}
-LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the coolbar window
* proc processes WM_COMMAND, it forwards this
@@ -1020,7 +1020,7 @@ LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
/*
* Feature in Windows. For some reason, Windows
@@ -1042,7 +1042,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the cool bar window
* proc processes WM_NOTIFY, it forwards this
@@ -1066,7 +1066,7 @@ LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -1090,7 +1090,7 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (OS.COMCTL32_MAJOR >= 6) return LRESULT.ZERO;
Rectangle rect = getBounds ();
- int /*long*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
if (!rect.equals (getBounds ())) {
parent.redraw (rect.x, rect.y, rect.width, rect.height, true);
@@ -1098,9 +1098,9 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (code);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreResize) {
- int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
if (code == 0) return LRESULT.ZERO;
return new LRESULT (code);
}
@@ -1113,7 +1113,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SIZE (wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.RBN_BEGINDRAG: {
int pos = OS.GetMessagePos ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java
index 3b21e1ab53..593309dc87 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java
@@ -218,7 +218,7 @@ public Rectangle getBounds () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Rectangle (0, 0, 0, 0);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);
if (OS.COMCTL32_MAJOR >= 6) {
@@ -242,7 +242,7 @@ Rectangle getClientArea () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Rectangle (0, 0, 0, 0);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
RECT insetRect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETBANDBORDERS, index, insetRect);
RECT rect = new RECT ();
@@ -330,8 +330,8 @@ public void setControl (Control control) {
this.control = null;
}
Control oldControl = this.control, newControl = control;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hwndChild = newControl != null ? control.topHandle () : 0;
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hwndChild = newControl != null ? control.topHandle () : 0;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILD;
@@ -344,7 +344,7 @@ public void setControl (Control control) {
* moves the new child to the top of the Z-order. The fix is
* to save and restore the visibility and Z-order.
*/
- int /*long*/ hwndAbove = 0;
+ long /*int*/ hwndAbove = 0;
if (newControl != null) {
hwndAbove = OS.GetWindow (hwndChild, OS.GW_HWNDPREV);
}
@@ -375,7 +375,7 @@ public Point getPreferredSize () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Point (0, 0);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE;
@@ -405,7 +405,7 @@ public void setPreferredSize (int width, int height) {
width = Math.max (0, width);
height = Math.max (0, height);
ideal = true;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int cxIdeal, cyMaxChild;
if ((parent.style & SWT.VERTICAL) != 0) {
cxIdeal = Math.max (0, height - parent.getMargin (index));
@@ -465,7 +465,7 @@ public Point getSize() {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) new Point (0, 0);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);
if (OS.COMCTL32_MAJOR >= 6) {
@@ -507,7 +507,7 @@ public void setSize (int width, int height) {
if (index == -1) return;
width = Math.max (0, width);
height = Math.max (0, height);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int cx, cyChild, cxIdeal;
if ((parent.style & SWT.VERTICAL) != 0) {
cx = height;
@@ -586,7 +586,7 @@ public Point getMinimumSize () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Point (0, 0);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILDSIZE;
@@ -618,7 +618,7 @@ public void setMinimumSize (int width, int height) {
width = Math.max (0, width);
height = Math.max (0, height);
minimum = true;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int cxMinChild, cyMinChild;
if ((parent.style & SWT.VERTICAL) != 0) {
cxMinChild = height;
@@ -664,7 +664,7 @@ public void setMinimumSize (Point size) {
boolean getWrap() {
int index = parent.indexOf (this);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_STYLE;
@@ -674,7 +674,7 @@ boolean getWrap() {
void setWrap(boolean wrap) {
int index = parent.indexOf (this);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_STYLE;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
index ba07146c54..b544d605b7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
@@ -51,9 +51,9 @@ public class DateTime extends Composite {
boolean doubleClick, ignoreSelection;
SYSTEMTIME lastSystemTime;
SYSTEMTIME time = new SYSTEMTIME (); // only used in calendar mode
- static final int /*long*/ DateTimeProc;
+ static final long /*int*/ DateTimeProc;
static final TCHAR DateTimeClass = new TCHAR (0, OS.DATETIMEPICK_CLASS, true);
- static final int /*long*/ CalendarProc;
+ static final long /*int*/ CalendarProc;
static final TCHAR CalendarClass = new TCHAR (0, OS.MONTHCAL_CLASS, true);
static {
INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX ();
@@ -82,13 +82,13 @@ public class DateTime extends Composite {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = DateTimeClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, DateTimeClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -115,13 +115,13 @@ public class DateTime extends Composite {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = CalendarClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, CalendarClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -222,7 +222,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection, typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (windowProc (), hwnd, msg, wParam, lParam);
}
@@ -263,8 +263,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
width = size.cx;
height = size.cy;
} else {
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
@@ -783,11 +783,11 @@ TCHAR windowClass () {
return (style & SWT.CALENDAR) != 0 ? CalendarClass : DateTimeClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return (style & SWT.CALENDAR) != 0 ? CalendarProc : DateTimeProc;
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.DTN_CLOSEUP: {
/*
@@ -822,7 +822,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
/*
@@ -841,7 +841,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDBLCLK (wParam, lParam);
if (isDisposed ()) return LRESULT.ZERO;
if ((style & SWT.CALENDAR) != 0) {
@@ -851,13 +851,13 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
pt.x = OS.GET_X_LPARAM (lParam);
pt.y = OS.GET_Y_LPARAM (lParam);
pMCHitTest.pt = pt;
- int /*long*/ code = OS.SendMessage (handle, OS.MCM_HITTEST, 0, pMCHitTest);
+ long /*int*/ code = OS.SendMessage (handle, OS.MCM_HITTEST, 0, pMCHitTest);
if ((code & OS.MCHT_CALENDARDATE) == OS.MCHT_CALENDARDATE) doubleClick = true;
}
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
doubleClick = false;
@@ -872,7 +872,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (isDisposed ()) return LRESULT.ZERO;
if (doubleClick) sendSelectionEvent (SWT.DefaultSelection);
@@ -880,7 +880,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_TIMER (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_TIMER (wParam, lParam);
if (result != null) return result;
/*
@@ -889,7 +889,7 @@ LRESULT WM_TIMER (int /*long*/ wParam, int /*long*/ lParam) {
* to ignore MCN_SELCHANGE during WM_TIMER.
*/
ignoreSelection = true;
- int /*long*/ code = callWindowProc(handle, OS.WM_TIMER, wParam, lParam);
+ long /*int*/ code = callWindowProc(handle, OS.WM_TIMER, wParam, lParam);
ignoreSelection = false;
return code == 0 ? LRESULT.ZERO : new LRESULT(code);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
index 27fd287fb4..14e1ac5626 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
@@ -103,7 +103,7 @@ public class Decorations extends Canvas {
Control savedFocus;
Button defaultButton, saveDefault;
int swFlags, nAccel;
- int /*long*/ hAccel;
+ long /*int*/ hAccel;
boolean moved, resized, opened;
int oldX = OS.CW_USEDEFAULT, oldY = OS.CW_USEDEFAULT;
int oldWidth = OS.CW_USEDEFAULT, oldHeight = OS.CW_USEDEFAULT;
@@ -171,7 +171,7 @@ void _setMaximized (boolean maximized) {
if (OS.IsPPC) {
/* Leave space for the menu bar */
if (menuBar != null) {
- int /*long*/ hwndCB = menuBar.hwndCB;
+ long /*int*/ hwndCB = menuBar.hwndCB;
RECT rectCB = new RECT ();
OS.GetWindowRect (hwndCB, rectCB);
height -= rectCB.bottom - rectCB.top;
@@ -299,7 +299,7 @@ protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.DefMDIChildProc (hwnd, msg, wParam, lParam);
}
@@ -448,7 +448,7 @@ public void dispose () {
super.dispose ();
}
-Menu findMenu (int /*long*/ hMenu) {
+Menu findMenu (long /*int*/ hMenu) {
if (menus == null) return null;
for (int i=0; i<menus.length; i++) {
Menu menu = menus [i];
@@ -509,7 +509,7 @@ public Rectangle getClientArea () {
if (OS.IsHPC) {
Rectangle rect = super.getClientArea ();
if (menuBar != null) {
- int /*long*/ hwndCB = menuBar.hwndCB;
+ long /*int*/ hwndCB = menuBar.hwndCB;
int height = OS.CommandBar_Height (hwndCB);
rect.y += height;
rect.height = Math.max (0, rect.height - height);
@@ -984,7 +984,7 @@ void setImages (Image image, Image [] images) {
if (smallImage != null) smallImage.dispose ();
if (largeImage != null) largeImage.dispose ();
smallImage = largeImage = null;
- int /*long*/ hSmallIcon = 0, hLargeIcon = 0;
+ long /*int*/ hSmallIcon = 0, hLargeIcon = 0;
Image smallIcon = null, largeIcon = null;
if (image != null) {
smallIcon = largeIcon = image;
@@ -1171,7 +1171,7 @@ public void setMenuBar (Menu menu) {
} else {
if (menu != null) display.removeBar (menu);
menuBar = menu;
- int /*long*/ hMenu = menuBar != null ? menuBar.handle: 0;
+ long /*int*/ hMenu = menuBar != null ? menuBar.handle: 0;
OS.SetMenu (handle, hMenu);
}
destroyAccelerators ();
@@ -1227,7 +1227,7 @@ void setParent () {
* undocumented and possibly dangerous Windows
* feature.
*/
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
display.lockActiveWindow = true;
OS.SetParent (handle, hwndParent);
if (!OS.IsWindowVisible (hwndParent)) {
@@ -1299,7 +1299,7 @@ void setSavedFocus (Control control) {
void setSystemMenu () {
if (OS.IsWinCE) return;
- int /*long*/ hMenu = OS.GetSystemMenu (handle, false);
+ long /*int*/ hMenu = OS.GetSystemMenu (handle, false);
if (hMenu == 0) return;
int oldCount = OS.GetMenuItemCount (hMenu);
if ((style & SWT.RESIZE) == 0) {
@@ -1358,9 +1358,9 @@ public void setText (String string) {
TCHAR buffer = new TCHAR (0, string, true);
/* Ensure that the title appears in the task bar.*/
if ((state & FOREIGN_HANDLE) != 0) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
OS.DefWindowProc (handle, OS.WM_SETTEXT, 0, pszText);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
@@ -1386,7 +1386,7 @@ public void setVisible (boolean visible) {
if (isDisposed ()) return;
if (OS.IsHPC) {
if (menuBar != null) {
- int /*long*/ hwndCB = menuBar.hwndCB;
+ long /*int*/ hwndCB = menuBar.hwndCB;
OS.CommandBar_DrawMenuBar (hwndCB, 0);
}
}
@@ -1492,7 +1492,7 @@ boolean translateMenuAccelerator (MSG msg) {
boolean translateMDIAccelerator (MSG msg) {
if (!(this instanceof Shell)) {
Shell shell = getShell ();
- int /*long*/ hwndMDIClient = shell.hwndMDIClient;
+ long /*int*/ hwndMDIClient = shell.hwndMDIClient;
if (hwndMDIClient != 0 && OS.TranslateMDISysAccel (hwndMDIClient, msg)) {
return true;
}
@@ -1570,7 +1570,7 @@ int widgetExtStyle () {
return bits;
}
-int /*long*/ widgetParent () {
+long /*int*/ widgetParent () {
Shell shell = getShell ();
return shell.hwndMDIClient ();
}
@@ -1617,7 +1617,7 @@ int widgetStyle () {
return bits;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
switch (msg) {
case Display.SWT_GETACCEL:
case Display.SWT_GETACCELCOUNT:
@@ -1627,7 +1627,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ACTIVATE (wParam, lParam);
if (result != null) return result;
/*
@@ -1688,14 +1688,14 @@ LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_CLOSE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CLOSE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CLOSE (wParam, lParam);
if (result != null) return result;
if (isEnabled () && isActive ()) closeWidget ();
return LRESULT.ZERO;
}
-LRESULT WM_HOTKEY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HOTKEY (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_HOTKEY (wParam, lParam);
if (result != null) return result;
if (OS.IsSP) {
@@ -1721,13 +1721,13 @@ LRESULT WM_HOTKEY (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
saveFocus ();
return result;
}
-LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
if (moved) {
Point location = getLocation ();
if (location.x == oldX && location.y == oldY) {
@@ -1739,7 +1739,7 @@ LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_MOVE (wParam, lParam);
}
-LRESULT WM_NCACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCACTIVATE (wParam, lParam);
if (result != null) return result;
if (wParam == 0) {
@@ -1759,13 +1759,13 @@ LRESULT WM_NCACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
}
}
if (!(this instanceof Shell)) {
- int /*long*/ hwndShell = getShell().handle;
+ long /*int*/ hwndShell = getShell().handle;
OS.SendMessage (hwndShell, OS.WM_NCACTIVATE, wParam, lParam);
}
return result;
}
-LRESULT WM_QUERYOPEN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_QUERYOPEN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_QUERYOPEN (wParam, lParam);
if (result != null) return result;
sendEvent (SWT.Deiconify);
@@ -1773,14 +1773,14 @@ LRESULT WM_QUERYOPEN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (isDisposed ()) return result;
if (savedFocus != this) restoreFocus ();
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
boolean changed = true;
if (resized) {
@@ -1815,7 +1815,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
if (!(this instanceof Shell)) {
@@ -1834,7 +1834,7 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (display.lockActiveWindow) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
index 610911b510..3d00a4c068 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -84,7 +84,7 @@ public DirectoryDialog (Shell parent, int style) {
checkSubclass ();
}
-int /*long*/ BrowseCallbackProc (int /*long*/ hwnd, int /*long*/ uMsg, int /*long*/ lParam, int /*long*/ lpData) {
+long /*int*/ BrowseCallbackProc (long /*int*/ hwnd, long /*int*/ uMsg, long /*int*/ lParam, long /*int*/ lpData) {
switch ((int)/*64*/uMsg) {
case OS.BFFM_INITIALIZED:
if (filterPath != null && filterPath.length () != 0) {
@@ -149,14 +149,14 @@ public String getMessage () {
public String open () {
if (OS.IsWinCE) error (SWT.ERROR_NOT_IMPLEMENTED);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
/* Get the owner HWND for the dialog */
- int /*long*/ hwndOwner = 0;
+ long /*int*/ hwndOwner = 0;
if (parent != null) hwndOwner = parent.handle;
/* Copy the message to OS memory */
- int /*long*/ lpszTitle = 0;
+ long /*int*/ lpszTitle = 0;
if (message.length () != 0) {
String string = message;
if (string.indexOf ('&') != -1) {
@@ -179,7 +179,7 @@ public String open () {
/* Create the BrowseCallbackProc */
Callback callback = new Callback (this, "BrowseCallbackProc", 4); //$NON-NLS-1$
- int /*long*/ lpfn = callback.getAddress ();
+ long /*int*/ lpfn = callback.getAddress ();
if (lpfn == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
/* Make the parent shell be temporary modal */
@@ -228,7 +228,7 @@ public String open () {
*/
boolean oldRunMessages = display.runMessages;
if (OS.COMCTL32_MAJOR < 6) display.runMessages = false;
- int /*long*/ lpItemIdList = OS.SHBrowseForFolder (lpbi);
+ long /*int*/ lpItemIdList = OS.SHBrowseForFolder (lpbi);
if (OS.COMCTL32_MAJOR < 6) display.runMessages = oldRunMessages;
OS.SetErrorMode (oldErrorMode);
@@ -254,7 +254,7 @@ public String open () {
if (lpszTitle != 0) OS.HeapFree (hHeap, 0, lpszTitle);
/* Free the pointer to the ITEMIDLIST */
- int /*long*/ [] ppMalloc = new int /*long*/ [1];
+ long /*int*/ [] ppMalloc = new long /*int*/ [1];
if (OS.SHGetMalloc (ppMalloc) == OS.S_OK) {
/* void Free (struct IMalloc *this, void *pv); */
OS.VtblCall (5, ppMalloc [0], lpItemIdList);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
index 230c484ca0..ccbeb0b84c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
@@ -117,7 +117,7 @@ public class Display extends Device {
/* Windows and Events */
Event [] eventQueue;
Callback windowCallback;
- int /*long*/ windowProc;
+ long /*int*/ windowProc;
int threadId;
TCHAR windowClass, windowShadowClass, windowOwnDCClass;
static int WindowClassCount;
@@ -131,7 +131,7 @@ public class Display extends Device {
int freeSlot;
int [] indexTable;
Control lastControl, lastGetControl;
- int /*long*/ lastHwnd, lastGetHwnd;
+ long /*int*/ lastHwnd, lastGetHwnd;
Control [] controlTable;
static final int GROW_SIZE = 1024;
static final int SWT_OBJECT_INDEX;
@@ -155,7 +155,7 @@ public class Display extends Device {
}
/* XP Themes */
- int /*long*/ hButtonTheme, hEditTheme, hExplorerBarTheme, hScrollBarTheme, hTabTheme;
+ long /*int*/ hButtonTheme, hEditTheme, hExplorerBarTheme, hScrollBarTheme, hTabTheme;
static final char [] BUTTON = new char [] {'B', 'U', 'T', 'T', 'O', 'N', 0};
static final char [] EDIT = new char [] {'E', 'D', 'I', 'T', 0};
static final char [] EXPLORER = new char [] {'E', 'X', 'P', 'L', 'O', 'R', 'E', 'R', 0};
@@ -185,18 +185,18 @@ public class Display extends Device {
/* Filter Hook */
Callback msgFilterCallback;
- int /*long*/ msgFilterProc, filterHook;
+ long /*int*/ msgFilterProc, filterHook;
MSG hookMsg = new MSG ();
boolean runDragDrop = true, dragCancelled = false;
/* Idle Hook */
Callback foregroundIdleCallback;
- int /*long*/ foregroundIdleProc, idleHook;
+ long /*int*/ foregroundIdleProc, idleHook;
/* Message Hook and Embedding */
boolean ignoreNextKey;
Callback getMsgCallback, embeddedCallback;
- int /*long*/ getMsgProc, msgHook, embeddedHwnd, embeddedProc;
+ long /*int*/ getMsgProc, msgHook, embeddedHwnd, embeddedProc;
static final String AWT_WINDOW_CLASS = "SunAwtWindow"; //$NON-NLS-1$
static final short [] ACCENTS = new short [] {'~', '`', '\'', '^', '"'};
@@ -226,19 +226,19 @@ public class Display extends Device {
static final String LAUNCHER_PREFIX = "--launcher.openFile "; //$NON-NLS-1$
/* Timers */
- int /*long*/ [] timerIds;
+ long /*int*/ [] timerIds;
Runnable [] timerList;
- int /*long*/ nextTimerId = SETTINGS_ID + 1;
+ long /*int*/ nextTimerId = SETTINGS_ID + 1;
/* Settings */
- static final int /*long*/ SETTINGS_ID = 100;
+ static final long /*int*/ SETTINGS_ID = 100;
static final int SETTINGS_DELAY = 2000;
boolean lastHighContrast, sendSettings;
/* Keyboard and Mouse */
RECT clickRect;
int clickCount, lastTime, lastButton;
- int /*long*/ lastClickHwnd;
+ long /*int*/ lastClickHwnd;
int scrollRemainder, scrollHRemainder;
int lastKey, lastMouse, lastAscii;
boolean lastVirtual, lastNull, lastDead;
@@ -264,7 +264,7 @@ public class Display extends Device {
/* Message Only Window */
Callback messageCallback;
- int /*long*/ hwndMessage, messageProc;
+ long /*int*/ hwndMessage, messageProc;
/* System Resources */
LOGFONT lfSystemFont;
@@ -278,7 +278,7 @@ public class Display extends Device {
ImageList[] imageList, toolImageList, toolHotImageList, toolDisabledImageList;
/* Custom Colors for ChooseColor */
- int /*long*/ lpCustColors;
+ long /*int*/ lpCustColors;
/* Sort Indicators */
Image upArrow, downArrow;
@@ -287,7 +287,7 @@ public class Display extends Device {
char [] tableBuffer;
NMHDR hdr = new NMHDR ();
NMLVDISPINFO plvfi = new NMLVDISPINFO ();
- int /*long*/ hwndParent;
+ long /*int*/ hwndParent;
int columnCount;
boolean [] columnVisible;
@@ -512,7 +512,7 @@ void addBar (Menu menu) {
bars [index] = menu;
}
-void addControl (int /*long*/ handle, Control control) {
+void addControl (long /*int*/ handle, Control control) {
if (handle == 0) return;
if (freeSlot == -1) {
int length = (freeSlot = indexTable.length) + GROW_SIZE;
@@ -843,9 +843,9 @@ protected void create (DeviceData data) {
void createDisplay (DeviceData data) {
}
-static int /*long*/ create32bitDIB (Image image) {
+static long /*int*/ create32bitDIB (Image image) {
int transparentPixel = -1, alpha = -1;
- int /*long*/ hMask = 0, hBitmap = 0;
+ long /*int*/ hMask = 0, hBitmap = 0;
byte[] alphaData = null;
switch (image.type) {
case SWT.ICON:
@@ -866,10 +866,10 @@ static int /*long*/ create32bitDIB (Image image) {
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = bm.bmHeight;
- int /*long*/ hDC = OS.GetDC (0);
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hDC = OS.GetDC (0);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hDC);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = imgWidth;
@@ -879,10 +879,10 @@ static int /*long*/ create32bitDIB (Image image) {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
@@ -991,15 +991,15 @@ static int /*long*/ create32bitDIB (Image image) {
if (hMask != 0) OS.DeleteObject (hMask);
return memDib;
}
-static int /*long*/ create32bitDIB (int /*long*/ hBitmap, int alpha, byte [] alphaData, int transparentPixel) {
+static long /*int*/ create32bitDIB (long /*int*/ hBitmap, int alpha, byte [] alphaData, int transparentPixel) {
BITMAP bm = new BITMAP ();
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = bm.bmHeight;
- int /*long*/ hDC = OS.GetDC (0);
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hDC = OS.GetDC (0);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hDC);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = imgWidth;
@@ -1009,10 +1009,10 @@ static int /*long*/ create32bitDIB (int /*long*/ hBitmap, int alpha, byte [] alp
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
@@ -1090,9 +1090,9 @@ static Image createIcon (Image image) {
return new Image (device, data, mask);
}
int width = data.width, height = data.height;
- int /*long*/ hMask, hBitmap;
- int /*long*/ hDC = device.internal_new_GC (null);
- int /*long*/ dstHdc = OS.CreateCompatibleDC (hDC), oldDstBitmap;
+ long /*int*/ hMask, hBitmap;
+ long /*int*/ hDC = device.internal_new_GC (null);
+ long /*int*/ dstHdc = OS.CreateCompatibleDC (hDC), oldDstBitmap;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (5, 1)) {
hBitmap = Display.create32bitDIB (image.handle, data.alpha, data.alphaData, data.transparentPixel);
hMask = OS.CreateBitmap (width, height, 1, 1, null);
@@ -1103,8 +1103,8 @@ static Image createIcon (Image image) {
/* Icons need black pixels where the mask is transparent */
hBitmap = OS.CreateCompatibleBitmap (hDC, width, height);
oldDstBitmap = OS.SelectObject (dstHdc, hBitmap);
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, image.handle);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, image.handle);
OS.PatBlt (dstHdc, 0, 0, width, height, OS.BLACKNESS);
OS.BitBlt (dstHdc, 0, 0, width, height, srcHdc, 0, 0, OS.SRCINVERT);
OS.SelectObject (srcHdc, hMask);
@@ -1121,14 +1121,14 @@ static Image createIcon (Image image) {
info.fIcon = true;
info.hbmColor = hBitmap;
info.hbmMask = hMask;
- int /*long*/ hIcon = OS.CreateIconIndirect (info);
+ long /*int*/ hIcon = OS.CreateIconIndirect (info);
if (hIcon == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.DeleteObject (hBitmap);
OS.DeleteObject (hMask);
return Image.win32_new (device, SWT.ICON, hIcon);
}
-static int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
+static long /*int*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
int srcWidth = data.width;
int srcHeight = data.height;
ImageData mask = ImageData.internal_new (srcWidth, srcHeight, 1,
@@ -1140,13 +1140,13 @@ static int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int dest
mask.setPixel (x, y, (data.alphaData [ap++] & 0xff) <= 127 ? 1 : 0);
}
}
- int /*long*/ hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
+ long /*int*/ hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
if (srcWidth != destWidth || srcHeight != destHeight) {
- int /*long*/ hdc = OS.GetDC (0);
- int /*long*/ hdc1 = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (0);
+ long /*int*/ hdc1 = OS.CreateCompatibleDC (hdc);
OS.SelectObject (hdc1, hMask);
- int /*long*/ hdc2 = OS.CreateCompatibleDC (hdc);
- int /*long*/ hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
+ long /*int*/ hdc2 = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
OS.SelectObject (hdc2, hMask2);
if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR);
OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
@@ -1223,14 +1223,14 @@ void drawMenuBars () {
bars = null;
}
-int /*long*/ embeddedProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ embeddedProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
switch ((int)/*64*/msg) {
case SWT_KEYMSG: {
MSG keyMsg = new MSG ();
OS.MoveMemory (keyMsg, lParam, MSG.sizeof);
OS.TranslateMessage (keyMsg);
OS.DispatchMessage (keyMsg);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lParam);
break;
}
@@ -1283,9 +1283,9 @@ boolean filterMessage (MSG msg) {
return false;
}
-Control findControl (int /*long*/ handle) {
+Control findControl (long /*int*/ handle) {
if (handle == 0) return null;
- int /*long*/ hwndOwner = 0;
+ long /*int*/ hwndOwner = 0;
do {
Control control = getControl (handle);
if (control != null) return control;
@@ -1315,7 +1315,7 @@ Control findControl (int /*long*/ handle) {
*
* @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 getControl (handle);
}
@@ -1344,7 +1344,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 ();
//TODO - should ids be long
Control control = getControl (handle);
@@ -1368,7 +1368,7 @@ 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 ();
//TODO - should ids be long
if (widget instanceof Control) {
@@ -1377,7 +1377,7 @@ public Widget findWidget (Widget widget, int /*long*/ id) {
return null;
}
-int /*long*/ foregroundIdleProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ foregroundIdleProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lParam) {
if (code >= 0) {
if (runMessages && getMessageCount () != 0) {
if (runMessagesInIdle) {
@@ -1430,7 +1430,7 @@ public static Display findDisplay (Thread thread) {
}
}
-TouchSource findTouchSource (int /*long*/ touchDevice, Monitor monitor) {
+TouchSource findTouchSource (long /*int*/ touchDevice, Monitor monitor) {
if (touchSources == null) touchSources = new TouchSource [4];
int length = touchSources.length;
for (int i=0; i<length; i++) {
@@ -1522,7 +1522,7 @@ public static Display getCurrent () {
return findDisplay (Thread.currentThread ());
}
-int getClickCount (int type, int button, int /*long*/ hwnd, int /*long*/ lParam) {
+int getClickCount (int type, int button, long /*int*/ hwnd, long /*int*/ lParam) {
switch (type) {
case SWT.MouseDown:
int doubleClick = OS.GetDoubleClickTime ();
@@ -1580,7 +1580,7 @@ public Rectangle getClientArea () {
return new Rectangle (x, y, width, height);
}
-Control getControl (int /*long*/ handle) {
+Control getControl (long /*int*/ handle) {
if (handle == 0) return null;
if (lastControl != null && lastHwnd == handle) {
return lastControl;
@@ -1889,7 +1889,7 @@ public int getIconDepth () {
/* Use the character encoding for the default locale */
TCHAR buffer1 = new TCHAR (0, "Control Panel\\Desktop\\WindowMetrics", true); //$NON-NLS-1$
- int /*long*/ [] phkResult = new int /*long*/ [1];
+ long /*int*/ [] phkResult = new long /*int*/ [1];
int result = OS.RegOpenKeyEx (OS.HKEY_CURRENT_USER, buffer1, 0, OS.KEY_READ, phkResult);
if (result != 0) return 4;
int depth = 4;
@@ -2097,7 +2097,7 @@ public Monitor [] getMonitors () {
}
monitors = new Monitor [4];
Callback callback = new Callback (this, "monitorEnumProc", 4); //$NON-NLS-1$
- int /*long*/ lpfnEnum = callback.getAddress ();
+ long /*int*/ lpfnEnum = callback.getAddress ();
if (lpfnEnum == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumDisplayMonitors (0, null, lpfnEnum, 0);
callback.dispose ();
@@ -2108,9 +2108,9 @@ public Monitor [] getMonitors () {
return result;
}
-int /*long*/ getMsgProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ getMsgProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lParam) {
if (embeddedHwnd == 0) {
- int /*long*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
embeddedHwnd = OS.CreateWindowEx (0,
windowClass,
null,
@@ -2135,8 +2135,8 @@ int /*long*/ getMsgProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lP
case OS.WM_SYSKEYUP: {
Control control = findControl (msg.hwnd);
if (control != null) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ keyMsg = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, MSG.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ keyMsg = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, MSG.sizeof);
OS.MoveMemory (keyMsg, msg, MSG.sizeof);
OS.PostMessage (hwndMessage, SWT_KEYMSG, wParam, keyMsg);
switch ((int)/*64*/msg.wParam) {
@@ -2183,7 +2183,7 @@ public Monitor getPrimaryMonitor () {
}
monitors = new Monitor [4];
Callback callback = new Callback (this, "monitorEnumProc", 4); //$NON-NLS-1$
- int /*long*/ lpfnEnum = callback.getAddress ();
+ long /*int*/ lpfnEnum = callback.getAddress ();
if (lpfnEnum == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumDisplayMonitors (0, null, lpfnEnum, 0);
callback.dispose ();
@@ -2458,7 +2458,7 @@ public Cursor getSystemCursor (int id) {
public Font getSystemFont () {
checkDevice ();
if (systemFont != null) return systemFont;
- int /*long*/ hFont = 0;
+ long /*int*/ hFont = 0;
if (!OS.IsWinCE) {
NONCLIENTMETRICS info = OS.IsUnicode ? (NONCLIENTMETRICS) new NONCLIENTMETRICSW () : new NONCLIENTMETRICSA ();
info.cbSize = NONCLIENTMETRICS.sizeof;
@@ -2504,23 +2504,23 @@ public Image getSystemImage (int id) {
switch (id) {
case SWT.ICON_ERROR: {
if (errorImage != null) return errorImage;
- int /*long*/ hIcon = OS.LoadImage (0, OS.OIC_HAND, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_HAND, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return errorImage = Image.win32_new (this, SWT.ICON, hIcon);
}
case SWT.ICON_WORKING:
case SWT.ICON_INFORMATION: {
if (infoImage != null) return infoImage;
- int /*long*/ hIcon = OS.LoadImage (0, OS.OIC_INFORMATION, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_INFORMATION, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return infoImage = Image.win32_new (this, SWT.ICON, hIcon);
}
case SWT.ICON_QUESTION: {
if (questionImage != null) return questionImage;
- int /*long*/ hIcon = OS.LoadImage (0, OS.OIC_QUES, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_QUES, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return questionImage = Image.win32_new (this, SWT.ICON, hIcon);
}
case SWT.ICON_WARNING: {
if (warningIcon != null) return warningIcon;
- int /*long*/ hIcon = OS.LoadImage (0, OS.OIC_BANG, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_BANG, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return warningIcon = Image.win32_new (this, SWT.ICON, hIcon);
}
}
@@ -2620,27 +2620,27 @@ public boolean getTouchEnabled () {
return (value & (OS.NID_READY | OS.NID_MULTI_INPUT)) == (OS.NID_READY | OS.NID_MULTI_INPUT);
}
-int /*long*/ hButtonTheme () {
+long /*int*/ hButtonTheme () {
if (hButtonTheme != 0) return hButtonTheme;
return hButtonTheme = OS.OpenThemeData (hwndMessage, BUTTON);
}
-int /*long*/ hEditTheme () {
+long /*int*/ hEditTheme () {
if (hEditTheme != 0) return hEditTheme;
return hEditTheme = OS.OpenThemeData (hwndMessage, EDIT);
}
-int /*long*/ hExplorerBarTheme () {
+long /*int*/ hExplorerBarTheme () {
if (hExplorerBarTheme != 0) return hExplorerBarTheme;
return hExplorerBarTheme = OS.OpenThemeData (hwndMessage, EXPLORERBAR);
}
-int /*long*/ hScrollBarTheme () {
+long /*int*/ hScrollBarTheme () {
if (hScrollBarTheme != 0) return hScrollBarTheme;
return hScrollBarTheme = OS.OpenThemeData (hwndMessage, SCROLLBAR);
}
-int /*long*/ hTabTheme () {
+long /*int*/ hTabTheme () {
if (hTabTheme != 0) return hTabTheme;
return hTabTheme = OS.OpenThemeData (hwndMessage, TAB);
}
@@ -2667,9 +2667,9 @@ int /*long*/ hTabTheme () {
*
* @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*/ hDC = OS.GetDC (0);
+ long /*int*/ hDC = OS.GetDC (0);
if (hDC == 0) error (SWT.ERROR_NO_HANDLES);
if (data != null) {
int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
@@ -2703,7 +2703,7 @@ protected void init () {
int length = APP_NAME.length ();
appName = new char [length + 1];
APP_NAME.getChars (0, length, appName, 0);
- int /*long*/ [] appID = new int /*long*/ [1];
+ long /*int*/ [] appID = new long /*int*/ [1];
if (OS.GetCurrentProcessExplicitAppUserModelID(appID) != 0) {
OS.SetCurrentProcessExplicitAppUserModelID (appName);
}
@@ -2726,8 +2726,8 @@ protected void init () {
WindowClassCount++;
/* Register the SWT window class */
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
WNDCLASS lpWndClass = new WNDCLASS ();
lpWndClass.hInstance = hInstance;
lpWndClass.lpfnWndProc = windowProc;
@@ -2822,7 +2822,7 @@ protected void init () {
if (appName != null) {
/* Delete any old jump list set for the ID */
- int /*long*/ [] ppv = new int /*long*/ [1];
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.CoCreateInstance (TaskBar.CLSID_DestinationList, 0, OS.CLSCTX_INPROC_SERVER, TaskBar.IID_ICustomDestinationList, ppv);
if (hr == OS.S_OK) {
/*ICustomDestinationList::DeleteList*/
@@ -2862,7 +2862,7 @@ protected void init () {
*
* @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) {
OS.ReleaseDC (0, hDC);
}
@@ -2872,7 +2872,7 @@ boolean isXMouseActive () {
*/
boolean xMouseActive = false;
TCHAR key = new TCHAR (0, "Control Panel\\Desktop", true); //$NON-NLS-1$
- int /*long*/ [] phKey = new int /*long*/ [1];
+ long /*int*/ [] phKey = new long /*int*/ [1];
int result = OS.RegOpenKeyEx (OS.HKEY_CURRENT_USER, key, 0, OS.KEY_READ, phKey);
if (result == 0) {
TCHAR lpValueName = new TCHAR (0, "UserPreferencesMask", true); //$NON-NLS-1$
@@ -2971,8 +2971,8 @@ public Point map (Control from, Control to, int x, int y) {
if (from != null && from.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (to != null && to.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (from == to) return new Point (x, y);
- int /*long*/ hwndFrom = from != null ? from.handle : 0;
- int /*long*/ hwndTo = to != null ? to.handle : 0;
+ long /*int*/ hwndFrom = from != null ? from.handle : 0;
+ long /*int*/ hwndTo = to != null ? to.handle : 0;
POINT point = new POINT ();
point.x = x;
point.y = y;
@@ -3065,8 +3065,8 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei
if (from != null && from.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (to != null && to.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (from == to) return new Rectangle (x, y, width, height);
- int /*long*/ hwndFrom = from != null ? from.handle : 0;
- int /*long*/ hwndTo = to != null ? to.handle : 0;
+ long /*int*/ hwndFrom = from != null ? from.handle : 0;
+ long /*int*/ hwndTo = to != null ? to.handle : 0;
RECT rect = new RECT ();
rect.left = x;
rect.top = y;
@@ -3117,7 +3117,7 @@ static char mbcsToWcs (int ch, int codePage) {
return unicode [0];
}
-int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
switch ((int)/*64*/msg) {
case SWT_RUNASYNC: {
if (runMessagesInIdle) runAsyncMessages (false);
@@ -3221,7 +3221,7 @@ int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wPar
consumed = true;
}
if (consumed) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lParam);
} else {
OS.PostMessage (embeddedHwnd, SWT_KEYMSG, wParam, lParam);
@@ -3262,16 +3262,16 @@ int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wPar
*/
if (wParam != 0) {
if (!isXMouseActive ()) {
- int /*long*/ hwndActive = OS.GetActiveWindow ();
+ long /*int*/ hwndActive = OS.GetActiveWindow ();
if (hwndActive != 0 && OS.IsWindowEnabled (hwndActive)) break;
Shell modal = modalDialog != null ? modalDialog.parent : getModalShell ();
if (modal != null && !modal.isDisposed ()) {
- int /*long*/ hwndModal = modal.handle;
+ long /*int*/ hwndModal = modal.handle;
if (OS.IsWindowEnabled (hwndModal)) {
modal.bringToTop ();
if (modal.isDisposed ()) break;
}
- int /*long*/ hwndPopup = OS.GetLastActivePopup (hwndModal);
+ long /*int*/ hwndPopup = OS.GetLastActivePopup (hwndModal);
if (hwndPopup != 0 && hwndPopup != modal.handle) {
if (getControl (hwndPopup) == null) {
if (OS.IsWindowEnabled (hwndPopup)) {
@@ -3393,17 +3393,17 @@ int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wPar
String getSharedData(int pid, int handle) {
if (OS.IsWinCE) return null;
- int /*long*/ [] mapHandle = new int /*long*/ [1];
+ long /*int*/ [] mapHandle = new long /*int*/ [1];
if (pid == OS.GetCurrentProcessId()) {
mapHandle[0] = handle;
} else {
- int /*long*/ processHandle = OS.OpenProcess(OS.PROCESS_VM_READ|OS.PROCESS_DUP_HANDLE, false, pid);
+ long /*int*/ processHandle = OS.OpenProcess(OS.PROCESS_VM_READ|OS.PROCESS_DUP_HANDLE, false, pid);
if (processHandle == 0) return null;
OS.DuplicateHandle(processHandle, handle, OS.GetCurrentProcess(), mapHandle, OS.DUPLICATE_SAME_ACCESS, false, OS.DUPLICATE_SAME_ACCESS);
OS.CloseHandle(processHandle);
}
- int /*long*/ sharedData = OS.MapViewOfFile(mapHandle[0], OS.FILE_MAP_READ, 0, 0, 0);
+ long /*int*/ sharedData = OS.MapViewOfFile(mapHandle[0], OS.FILE_MAP_READ, 0, 0, 0);
if (sharedData == 0) return null;
int length = OS.IsUnicode ? OS.wcslen (sharedData) : OS.strlen (sharedData);
TCHAR buffer = new TCHAR (0, length);
@@ -3417,7 +3417,7 @@ String getSharedData(int pid, int handle) {
return result;
}
-int /*long*/ monitorEnumProc (int /*long*/ hmonitor, int /*long*/ hdc, int /*long*/ lprcMonitor, int /*long*/ dwData) {
+long /*int*/ monitorEnumProc (long /*int*/ hmonitor, long /*int*/ hdc, long /*int*/ lprcMonitor, long /*int*/ dwData) {
if (monitorCount >= monitors.length) {
Monitor[] newMonitors = new Monitor [monitors.length + 4];
System.arraycopy (monitors, 0, newMonitors, 0, monitors.length);
@@ -3440,7 +3440,7 @@ int /*long*/ monitorEnumProc (int /*long*/ hmonitor, int /*long*/ hdc, int /*lon
return 1;
}
-int /*long*/ msgFilterProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ msgFilterProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lParam) {
switch ((int)/*64*/code) {
case OS.MSGF_COMMCTRL_BEGINDRAG: {
if (!runDragDrop && !dragCancelled) {
@@ -3618,8 +3618,8 @@ public boolean post (Event event) {
case OS.VK_DIVIDE:
inputs.dwFlags |= OS.KEYEVENTF_EXTENDEDKEY;
}
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
OS.MoveMemory(pInputs, new int[] {OS.INPUT_KEYBOARD}, 4);
//TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit
OS.MoveMemory (pInputs + OS.PTR_SIZEOF, inputs, KEYBDINPUT.sizeof);
@@ -3683,8 +3683,8 @@ public boolean post (Event event) {
}
}
}
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
OS.MoveMemory(pInputs, new int[] {OS.INPUT_MOUSE}, 4);
//TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit
OS.MoveMemory (pInputs + OS.PTR_SIZEOF, inputs, MOUSEINPUT.sizeof);
@@ -3874,8 +3874,8 @@ void releaseDisplay () {
messageProc = 0;
/* Unregister the SWT window class */
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
OS.UnregisterClass (windowClass, hInstance);
/* Unregister the SWT drop shadow and CS_OWNDC window class */
@@ -4105,7 +4105,7 @@ void removeBar (Menu menu) {
}
}
-Control removeControl (int /*long*/ handle) {
+Control removeControl (long /*int*/ handle) {
if (handle == 0) return null;
lastControl = lastGetControl = null;
Control control = null;
@@ -4258,7 +4258,7 @@ boolean runSkin () {
return false;
}
-boolean runTimer (int /*long*/ id) {
+boolean runTimer (long /*int*/ id) {
if (timerList != null && timerIds != null) {
int index = 0;
while (index <timerIds.length) {
@@ -4716,13 +4716,13 @@ public void timerExec (int milliseconds, Runnable runnable) {
checkDevice ();
if (runnable == null) error (SWT.ERROR_NULL_ARGUMENT);
if (timerList == null) timerList = new Runnable [4];
- if (timerIds == null) timerIds = new int /*long*/ [4];
+ if (timerIds == null) timerIds = new long /*int*/ [4];
int index = 0;
while (index < timerList.length) {
if (timerList [index] == runnable) break;
index++;
}
- int /*long*/ timerId = 0;
+ long /*int*/ timerId = 0;
if (index != timerList.length) {
timerId = timerIds [index];
if (milliseconds < 0) {
@@ -4743,12 +4743,12 @@ public void timerExec (int milliseconds, Runnable runnable) {
Runnable [] newTimerList = new Runnable [timerList.length + 4];
System.arraycopy (timerList, 0, newTimerList, 0, timerList.length);
timerList = newTimerList;
- int /*long*/ [] newTimerIds = new int /*long*/ [timerIds.length + 4];
+ long /*int*/ [] newTimerIds = new long /*int*/ [timerIds.length + 4];
System.arraycopy (timerIds, 0, newTimerIds, 0, timerIds.length);
timerIds = newTimerIds;
}
}
- int /*long*/ newTimerID = OS.SetTimer (hwndMessage, timerId, milliseconds, 0);
+ long /*int*/ newTimerID = OS.SetTimer (hwndMessage, timerId, milliseconds, 0);
if (newTimerID != 0) {
timerList [index] = runnable;
timerIds [index] = newTimerID;
@@ -4918,7 +4918,7 @@ static int wcsToMbcs (char ch) {
return wcsToMbcs (ch, 0);
}
-int /*long*/ windowProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. On Vista only, it is faster to
* compute and answer the data for the visible columns
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
index 6ee27b8509..676518bb05 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
@@ -49,7 +49,7 @@ public class ExpandBar extends Composite {
ExpandItem focusItem;
int spacing = 4;
int yCurrentScroll;
- int /*long*/ hFont;
+ long /*int*/ hFont;
/**
@@ -111,7 +111,7 @@ public void addExpandListener (ExpandListener listener) {
addListener (SWT.Collapse, typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -130,12 +130,12 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
int height = 0, width = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
if (itemCount > 0) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ hTheme = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ hTheme = 0;
if (isAppThemed ()) {
hTheme = display.hExplorerBarTheme ();
}
- int /*long*/ hCurrentFont = 0, oldFont = 0;
+ long /*int*/ hCurrentFont = 0, oldFont = 0;
if (hTheme == 0) {
if (hFont != 0) {
hCurrentFont = hFont;
@@ -237,7 +237,7 @@ void destroyItem (ExpandItem item) {
layoutItems (index, true);
}
-void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
+void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
RECT rect2 = new RECT ();
OS.GetClientRect (handle, rect2);
OS.MapWindowPoints (handle, hwnd, rect2, 2);
@@ -245,7 +245,7 @@ void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
}
void drawWidget (GC gc, RECT clipRect) {
- int /*long*/ hTheme = 0;
+ long /*int*/ hTheme = 0;
if (isAppThemed ()) {
hTheme = display.hExplorerBarTheme ();
}
@@ -261,7 +261,7 @@ void drawWidget (GC gc, RECT clipRect) {
int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
drawFocus = (uiState & OS.UISF_HIDEFOCUS) == 0;
}
- int /*long*/ hCurrentFont = 0, oldFont = 0;
+ long /*int*/ hCurrentFont = 0, oldFont = 0;
if (hTheme == 0) {
if (hFont != 0) {
hCurrentFont = hFont;
@@ -306,8 +306,8 @@ Control findThemeControl () {
int getBandHeight () {
if (hFont == 0) return ExpandItem.CHEVRON_SIZE;
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldHFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldHFont = OS.SelectObject (hDC, hFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
OS.GetTextMetrics (hDC, lptm);
OS.SelectObject (hDC, oldHFont);
@@ -617,11 +617,11 @@ TCHAR windowClass () {
return display.windowClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return display.windowProc;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if (focusItem == null) return result;
@@ -660,13 +660,13 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if (focusItem != null) focusItem.redraw (true);
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
int x = OS.GET_X_LPARAM (lParam);
@@ -685,7 +685,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if (focusItem == null) return result;
@@ -702,7 +702,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
for (int i = 0; i < itemCount; i++) {
@@ -716,7 +716,7 @@ LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result == LRESULT.ZERO) return result;
int x = OS.GET_X_LPARAM (lParam);
@@ -732,11 +732,11 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
return wmScrollWheel (true, wParam, lParam);
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
PAINTSTRUCT ps = new PAINTSTRUCT ();
GCData data = new GCData ();
data.ps = ps;
@@ -765,7 +765,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -778,7 +778,7 @@ LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
int hitTest = (short) OS.LOWORD (lParam);
@@ -786,7 +786,7 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
for (int i = 0; i < itemCount; i++) {
ExpandItem item = items [i];
if (item.hover) {
- int /*long*/ hCursor = OS.LoadCursor (0, OS.IDC_HAND);
+ long /*int*/ hCursor = OS.LoadCursor (0, OS.IDC_HAND);
OS.SetCursor (hCursor);
return LRESULT.ONE;
}
@@ -795,13 +795,13 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (focusItem != null) focusItem.redraw (true);
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -815,7 +815,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmScroll (ScrollBar bar, boolean update, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScroll (ScrollBar bar, boolean update, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmScroll (bar, true, hwnd, msg, wParam, lParam);
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
index 51ba1ea3f9..3ef2b02572 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
@@ -116,16 +116,16 @@ static ExpandBar checkNull (ExpandBar control) {
return control;
}
-private void drawChevron (int /*long*/ hDC, RECT rect) {
- int /*long*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
+private void drawChevron (long /*int*/ hDC, RECT rect) {
+ long /*int*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
rect.left += 4;
rect.top += 4;
rect.right -= 4;
rect.bottom -= 4;
- int /*long*/ hPen = OS.CreatePen (OS.PS_SOLID, 1, parent.getForegroundPixel ());
- int /*long*/ oldPen = OS.SelectObject (hDC, hPen);
+ long /*int*/ hPen = OS.CreatePen (OS.PS_SOLID, 1, parent.getForegroundPixel ());
+ long /*int*/ oldPen = OS.SelectObject (hDC, hPen);
int [] polyline1, polyline2;
if (expanded) {
int px = rect.left + 5;
@@ -151,8 +151,8 @@ private void drawChevron (int /*long*/ hDC, RECT rect) {
OS.Polyline (hDC, polyline1, polyline1.length / 2);
OS.Polyline (hDC, polyline2, polyline2.length / 2);
if (hover) {
- int /*long*/ whitePen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DHILIGHT));
- int /*long*/ darkGrayPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DSHADOW));
+ long /*int*/ whitePen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DHILIGHT));
+ long /*int*/ darkGrayPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DSHADOW));
OS.SelectObject (hDC, whitePen);
int [] points1 = {
rect.left, rect.bottom,
@@ -174,15 +174,15 @@ private void drawChevron (int /*long*/ hDC, RECT rect) {
OS.DeleteObject (hPen);
}
-void drawItem (GC gc, int /*long*/ hTheme, RECT clipRect, boolean drawFocus) {
- int /*long*/ hDC = gc.handle;
+void drawItem (GC gc, long /*int*/ hTheme, RECT clipRect, boolean drawFocus) {
+ long /*int*/ hDC = gc.handle;
int headerHeight = parent.getBandHeight ();
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + headerHeight);
if (hTheme != 0) {
OS.DrawThemeBackground (hTheme, hDC, OS.EBP_NORMALGROUPHEAD, 0, rect, clipRect);
} else {
- int /*long*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
+ long /*int*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
}
@@ -223,8 +223,8 @@ void drawItem (GC gc, int /*long*/ hTheme, RECT clipRect, boolean drawFocus) {
}
if (expanded) {
if (!parent.isAppThemed ()) {
- int /*long*/ pen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_BTNFACE));
- int /*long*/ oldPen = OS.SelectObject (hDC, pen);
+ long /*int*/ pen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_BTNFACE));
+ long /*int*/ oldPen = OS.SelectObject (hDC, pen);
int [] points = {
x, y + headerHeight,
x, y + headerHeight + height,
@@ -319,7 +319,7 @@ public ExpandBar getParent () {
return parent;
}
-int getPreferredWidth (int /*long*/ hTheme, int /*long*/ hDC) {
+int getPreferredWidth (long /*int*/ hTheme, long /*int*/ hDC) {
int width = ExpandItem.TEXT_INSET * 2 + ExpandItem.CHEVRON_SIZE;
if (image != null) {
width += ExpandItem.TEXT_INSET + imageWidth;
@@ -343,7 +343,7 @@ boolean isHover (int x, int y) {
}
void redraw (boolean all) {
- int /*long*/ parentHandle = parent.handle;
+ long /*int*/ parentHandle = parent.handle;
int headerHeight = parent.getBandHeight ();
RECT rect = new RECT ();
int left = all ? x : x + width - headerHeight;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
index 212fcbecf2..079fcd48c7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
@@ -196,7 +196,7 @@ public boolean getOverwrite () {
return overwrite;
}
-int /*long*/ OFNHookProc (int /*long*/ hdlg, int /*long*/ uiMsg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ OFNHookProc (long /*int*/ hdlg, long /*int*/ uiMsg, long /*int*/ wParam, long /*int*/ lParam) {
switch ((int)/*64*/uiMsg) {
case OS.WM_NOTIFY:
OFNOTIFY ofn = new OFNOTIFY ();
@@ -208,8 +208,8 @@ int /*long*/ OFNHookProc (int /*long*/ hdlg, int /*long*/ uiMsg, int /*long*/ wP
OPENFILENAME lpofn = new OPENFILENAME ();
OS.MoveMemory (lpofn, ofn.lpOFN, OPENFILENAME.sizeof);
if (lpofn.nMaxFile < lResult) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, lResult * TCHAR.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, lResult * TCHAR.sizeof);
if (lpstrFile != 0) {
if (lpofn.lpstrFile != 0) OS.HeapFree (hHeap, 0, lpofn.lpstrFile);
lpofn.lpstrFile = lpstrFile;
@@ -237,11 +237,11 @@ int /*long*/ OFNHookProc (int /*long*/ hdlg, int /*long*/ uiMsg, int /*long*/ wP
* </ul>
*/
public String open () {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
/* Get the owner HWND for the dialog */
- int /*long*/ hwndOwner = parent.handle;
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndOwner = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
/*
* Feature in Windows. There is no API to set the orientation of a
@@ -276,7 +276,7 @@ public String open () {
/* Use the character encoding for the default locale */
TCHAR buffer3 = new TCHAR (0, title, true);
int byteCount3 = buffer3.length () * TCHAR.sizeof;
- int /*long*/ lpstrTitle = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount3);
+ long /*int*/ lpstrTitle = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount3);
OS.MoveMemory (lpstrTitle, buffer3, byteCount3);
/* Compute filters and copy into lpstrFilter */
@@ -294,7 +294,7 @@ public String open () {
/* Use the character encoding for the default locale */
TCHAR buffer4 = new TCHAR (0, strFilter, true);
int byteCount4 = buffer4.length () * TCHAR.sizeof;
- int /*long*/ lpstrFilter = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount4);
+ long /*int*/ lpstrFilter = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount4);
OS.MoveMemory (lpstrFilter, buffer4, byteCount4);
/* Convert the fileName and filterName to C strings */
@@ -309,7 +309,7 @@ public String open () {
int nMaxFile = OS.MAX_PATH;
if ((style & SWT.MULTI) != 0) nMaxFile = Math.max (nMaxFile, BUFFER_SIZE);
int byteCount = nMaxFile * TCHAR.sizeof;
- int /*long*/ lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
int byteCountFile = Math.min (name.length () * TCHAR.sizeof, byteCount - TCHAR.sizeof);
OS.MoveMemory (lpstrFile, name, byteCountFile);
@@ -321,7 +321,7 @@ public String open () {
/* Use the character encoding for the default locale */
TCHAR path = new TCHAR (0, filterPath.replace ('/', '\\'), true);
int byteCount5 = OS.MAX_PATH * TCHAR.sizeof;
- int /*long*/ lpstrInitialDir = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount5);
+ long /*int*/ lpstrInitialDir = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount5);
int byteCountDir = Math.min (path.length () * TCHAR.sizeof, byteCount5 - TCHAR.sizeof);
OS.MoveMemory (lpstrInitialDir, path, byteCountDir);
@@ -336,7 +336,7 @@ public String open () {
struct.Flags |= OS.OFN_ALLOWMULTISELECT | OS.OFN_EXPLORER | OS.OFN_ENABLESIZING;
if (!OS.IsWinCE && USE_HOOK) {
callback = new Callback (this, "OFNHookProc", 4); //$NON-NLS-1$
- int /*long*/ lpfnHook = callback.getAddress ();
+ long /*int*/ lpfnHook = callback.getAddress ();
if (lpfnHook == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
struct.lpfnHook = lpfnHook;
struct.Flags |= OS.OFN_ENABLEHOOK;
@@ -356,7 +356,7 @@ public String open () {
* empty, Windows uses the current value of the filter
* extension at the time that the dialog is closed.
*/
- int /*long*/ lpstrDefExt = 0;
+ long /*int*/ lpstrDefExt = 0;
if (save) {
lpstrDefExt = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
struct.lpstrDefExt = lpstrDefExt;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
index 855c758791..27582d5b95 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
@@ -155,8 +155,8 @@ public FontData open () {
if (OS.IsWinCE) error (SWT.ERROR_NOT_IMPLEMENTED);
/* Get the owner HWND for the dialog */
- int /*long*/ hwndOwner = parent.handle;
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndOwner = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
/*
* Feature in Windows. There is no API to set the orientation of a
@@ -187,7 +187,7 @@ public FontData open () {
}
/* Open the dialog */
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
CHOOSEFONT lpcf = new CHOOSEFONT ();
lpcf.lStructSize = CHOOSEFONT.sizeof;
lpcf.hwndOwner = hwndOwner;
@@ -196,11 +196,11 @@ public FontData open () {
lpcf.Flags |= OS.CF_EFFECTS;
}
- int /*long*/ lpLogFont = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, LOGFONT.sizeof);
+ long /*int*/ lpLogFont = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, LOGFONT.sizeof);
if (fontData != null && fontData.data != null) {
LOGFONT logFont = fontData.data;
int lfHeight = logFont.lfHeight;
- int /*long*/ hDC = OS.GetDC (0);
+ long /*int*/ hDC = OS.GetDC (0);
int pixels = -(int)(0.5f + (fontData.height * OS.GetDeviceCaps(hDC, OS.LOGPIXELSY) / 72));
OS.ReleaseDC (0, hDC);
logFont.lfHeight = pixels;
@@ -242,7 +242,7 @@ public FontData open () {
* This will not work on multiple screens or
* for printing. Should use DC for the proper device.
*/
- int /*long*/ hDC = OS.GetDC(0);
+ long /*int*/ hDC = OS.GetDC(0);
int logPixelsY = OS.GetDeviceCaps(hDC, OS.LOGPIXELSY);
int pixels = 0;
if (logFont.lfHeight > 0) {
@@ -254,8 +254,8 @@ public FontData open () {
* we must subtract the internal leading, which requires a TEXTMETRIC,
* which in turn requires font creation.
*/
- int /*long*/ hFont = OS.CreateFontIndirect(logFont);
- int /*long*/ oldFont = OS.SelectObject(hDC, hFont);
+ long /*int*/ hFont = OS.CreateFontIndirect(logFont);
+ long /*int*/ oldFont = OS.SelectObject(hDC, hFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
OS.GetTextMetrics(hDC, lptm);
OS.SelectObject(hDC, oldFont);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
index 8d00eef630..bded168bba 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
@@ -43,7 +43,7 @@ import org.eclipse.swt.graphics.*;
public class Group extends Composite {
String text = "";
static final int CLIENT_INSET = 3;
- static final int /*long*/ GroupProc;
+ static final long /*int*/ GroupProc;
static final TCHAR GroupClass = new TCHAR (0, OS.IsWinCE ? "BUTTON" : "SWT_GROUP", true);
static {
/*
@@ -67,13 +67,13 @@ public class Group extends Composite {
TCHAR WC_BUTTON = new TCHAR (0, "BUTTON", true);
OS.GetClassInfo (0, WC_BUTTON, lpWndClass);
GroupProc = lpWndClass.lpfnWndProc;
- int /*long*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
if (!OS.GetClassInfo (hInstance, GroupClass, lpWndClass)) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~(OS.CS_HREDRAW | OS.CS_VREDRAW);
int byteCount = GroupClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, GroupClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -118,7 +118,7 @@ public Group (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows. When the user clicks on the group
@@ -172,8 +172,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
* client area, pad the width so the text is not clipped.
*/
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
@@ -190,8 +190,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
Rectangle trim = super.computeTrim (x, y, width, height);
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -244,8 +244,8 @@ public Rectangle getClientArea () {
forceResize ();
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -290,7 +290,7 @@ boolean mnemonicMatch (char key) {
return Character.toUpperCase (key) == Character.toUpperCase (mnemonic);
}
-void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
+void printWidget (long /*int*/ hwnd, long /*int*/ hdc, GC gc) {
/*
* Bug in Windows. For some reason, PrintWindow()
* returns success but does nothing when it is called
@@ -339,7 +339,7 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
} else {
OS.SetWindowOrgEx (hdc, -location.x, -location.y, null);
}
- int /*long*/ topHandle = children [i].topHandle();
+ long /*int*/ topHandle = children [i].topHandle();
int bits = OS.GetWindowLong (topHandle, OS.GWL_STYLE);
if ((bits & OS.WS_VISIBLE) != 0) {
children [i].printWidget (topHandle, hdc, gc);
@@ -429,11 +429,11 @@ TCHAR windowClass () {
return GroupClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return GroupProc;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
/*
@@ -445,7 +445,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ONE;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -457,12 +457,12 @@ LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
* allow children, answer HTCLIENT to allow mouse messages
* to be delivered to the children.
*/
- int /*long*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (code == OS.HTTRANSPARENT) code = OS.HTCLIENT;
return new LRESULT (code);
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
/*
@@ -474,7 +474,7 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
/*
@@ -489,14 +489,14 @@ LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int nSavedDC = OS.SaveDC (wParam);
- int /*long*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
OS.RestoreDC (wParam, nSavedDC);
return new LRESULT (code);
}
return result;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -518,13 +518,13 @@ LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- int /*long*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ long /*int*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
/*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
index 3d09962e20..f3b1e26977 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
@@ -165,7 +165,7 @@ public int getCompositionOffset () {
}
TF_DISPLAYATTRIBUTE getDisplayAttribute (short langid, int attInfo) {
- int /*long*/ [] pProfiles = new int /*long*/ [1];
+ long /*int*/ [] pProfiles = new long /*int*/ [1];
int hr = OS.CoCreateInstance (CLSID_TF_InputProcessorProfiles, 0, OS.CLSCTX_INPROC_SERVER, IID_ITfInputProcessorProfiles, pProfiles);
TF_DISPLAYATTRIBUTE pda = null;
if (hr == OS.S_OK) {
@@ -174,14 +174,14 @@ TF_DISPLAYATTRIBUTE getDisplayAttribute (short langid, int attInfo) {
/* pProfiles.GetDefaultLanguageProfile () */
hr = OS.VtblCall (8, pProfiles [0], langid, GUID_TFCAT_TIP_KEYBOARD, pclsid, pguidProfile);
if (hr == OS.S_OK) {
- int /*long*/ [] pProvider = new int /*long*/ [1];
+ long /*int*/ [] pProvider = new long /*int*/ [1];
hr = OS.CoCreateInstance (pclsid, 0, OS.CLSCTX_INPROC_SERVER, IID_ITfDisplayAttributeProvider, pProvider);
if (hr == OS.S_OK) {
- int /*long*/ [] pEnum = new int /*long*/ [1];
+ long /*int*/ [] pEnum = new long /*int*/ [1];
/* pProvider.EnumDisplayAttributeInfo () */
hr = OS.VtblCall (3, pProvider [0], pEnum);
if (hr == OS.S_OK) {
- int /*long*/ [] pDispInfo = new int /*long*/ [1];
+ long /*int*/ [] pDispInfo = new long /*int*/ [1];
TF_DISPLAYATTRIBUTE tempPda = new TF_DISPLAYATTRIBUTE ();
/* pEnum.Next () */
while ((hr = OS.VtblCall (4, pEnum [0], 1, pDispInfo, (int[])null)) == OS.S_OK) {
@@ -310,7 +310,7 @@ public String getText () {
*/
public boolean getWideCaret() {
checkWidget ();
- int /*long*/ layout = OS.GetKeyboardLayout (0);
+ long /*int*/ layout = OS.GetKeyboardLayout (0);
short langID = (short)OS.LOWORD (layout);
return OS.PRIMARYLANGID (langID) == OS.LANG_KOREAN;
}
@@ -357,13 +357,13 @@ public void setCompositionOffset (int offset) {
}
}
-LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
if (!isInlineEnabled ()) return null;
ranges = null;
styles = null;
caretOffset = commitCount = 0;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
int codePage = parent.getCodePage ();
if (hIMC != 0) {
TCHAR buffer = null;
@@ -430,7 +430,7 @@ LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
length = clauses.length - 1;
ranges = new int [length * 2];
styles = new TextStyle [length];
- int /*long*/ layout = OS.GetKeyboardLayout (0);
+ long /*int*/ layout = OS.GetKeyboardLayout (0);
short langID = (short)OS.LOWORD (layout);
TF_DISPLAYATTRIBUTE attr = null;
TextStyle style = null;
@@ -512,18 +512,18 @@ LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ONE;
}
-LRESULT WM_IME_COMPOSITION_START (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION_START (long /*int*/ wParam, long /*int*/ lParam) {
return isInlineEnabled () ? LRESULT.ONE : null;
}
-LRESULT WM_IME_ENDCOMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_ENDCOMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
return isInlineEnabled () ? LRESULT.ONE : null;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
if (!isInlineEnabled ()) return null;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
if (hIMC != 0) {
if (OS.ImmGetOpenStatus (hIMC)) {
OS.ImmNotifyIME (hIMC, OS.NI_COMPOSITIONSTR, OS.CPS_COMPLETE, 0);
@@ -533,10 +533,10 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (!isInlineEnabled ()) return null;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
if (hIMC != 0) {
if (OS.ImmGetOpenStatus (hIMC)) {
if (OS.ImmGetCompositionString (hIMC, OS.GCS_COMPSTR, (TCHAR)null, 0) > 0) {
@@ -548,10 +548,10 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
int offset = event.index;
int length = text.length();
if (offset != -1 && startOffset != -1 && startOffset <= offset && offset < startOffset + length) {
- int /*long*/ imeWnd = OS.ImmGetDefaultIMEWnd (hwnd);
+ long /*int*/ imeWnd = OS.ImmGetDefaultIMEWnd (hwnd);
offset = event.index + event.count - startOffset;
int trailing = event.count > 0 ? 1 : 2;
- int /*long*/ param = OS.MAKEWPARAM (OS.MAKEWORD (OS.IMEMOUSE_LDOWN, trailing), offset);
+ long /*int*/ param = OS.MAKEWPARAM (OS.MAKEWORD (OS.IMEMOUSE_LDOWN, trailing), offset);
OS.SendMessage (imeWnd, WM_MSIME_MOUSE, param, hIMC);
} else {
OS.ImmNotifyIME (hIMC, OS.NI_COMPOSITIONSTR, OS.CPS_COMPLETE, 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
index f32a57b30d..e94602af60 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
@@ -52,7 +52,7 @@ public class Label extends Control {
Image image;
static final int MARGIN = 4;
static /*final*/ boolean IMAGE_AND_TEXT = false;
- static final int /*long*/ LabelProc;
+ static final long /*int*/ LabelProc;
static final TCHAR LabelClass = new TCHAR (0, "STATIC", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -101,7 +101,7 @@ public Label (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows 7. When the user double clicks
@@ -157,9 +157,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
}
}
if (drawText) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- int /*long*/ oldFont = OS.SelectObject (hDC, newFont);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ oldFont = OS.SelectObject (hDC, newFont);
int length = OS.GetWindowTextLength (handle);
if (length == 0) {
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -446,11 +446,11 @@ TCHAR windowClass () {
return LabelClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return LabelProc;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
@@ -474,7 +474,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (isDisposed ()) return result;
if ((style & SWT.SEPARATOR) != 0) {
@@ -500,7 +500,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -521,13 +521,13 @@ LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- int /*long*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ long /*int*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
return result;
}
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. For some reason, the HBRUSH that
* is returned from WM_CTRLCOLOR is misaligned when
@@ -549,7 +549,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsWinCE) {
boolean drawImage = image != null;
boolean drawSeparator = (style & SWT.SEPARATOR) != 0 && (style & SWT.SHADOW_NONE) == 0;
@@ -613,7 +613,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_PAINT(wParam, lParam);
}
-LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
drawBackground (struct.hDC);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
index 5f13a902f7..7181cab877 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
@@ -47,9 +47,9 @@ public class Link extends Control {
String [] ids;
int [] mnemonics;
int focusIndex, mouseDownIndex;
- int /*long*/ font;
+ long /*int*/ font;
static final RGB LINK_FOREGROUND = new RGB (0, 51, 153);
- static final int /*long*/ LinkProc;
+ static final long /*int*/ LinkProc;
static final TCHAR LinkClass = new TCHAR (0, OS.WC_LINK, true);
static {
if (OS.COMCTL32_MAJOR >= 6) {
@@ -73,13 +73,13 @@ public class Link extends Control {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = LinkClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, LinkClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -152,7 +152,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection, typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (LinkProc != 0) {
/*
@@ -180,9 +180,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
int width, height;
if (OS.COMCTL32_MAJOR >= 6) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- int /*long*/ oldFont = OS.SelectObject (hDC, newFont);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ oldFont = OS.SelectObject (hDC, newFont);
if (text.length () > 0) {
TCHAR buffer = new TCHAR (getCodePage (), parse (text), false);
RECT rect = new RECT ();
@@ -747,11 +747,11 @@ TCHAR windowClass () {
return OS.COMCTL32_MAJOR >= 6 ? LinkClass : display.windowClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return LinkProc != 0 ? LinkProc : display.windowProc;
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
if (OS.COMCTL32_MAJOR < 6) {
@@ -789,7 +789,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
* This allows the application to cancel an operation that is normally
* performed in WM_KEYDOWN from WM_CHAR.
*/
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
return new LRESULT (code);
}
@@ -797,11 +797,11 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
int index, count;
- int /*long*/ code = 0;
+ long /*int*/ code = 0;
if (OS.COMCTL32_MAJOR >= 6) {
LITEM item = new LITEM ();
item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE;
@@ -832,16 +832,16 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETFONT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETFONT (wParam, lParam);
if (result != null) return result;
- int /*long*/ code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
if (code != 0) return new LRESULT (code);
if (font == 0) font = defaultFont ();
return new LRESULT (font);
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if (OS.COMCTL32_MAJOR >= 6) {
@@ -861,13 +861,13 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) redraw ();
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if (OS.COMCTL32_MAJOR < 6) {
@@ -905,7 +905,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if (OS.COMCTL32_MAJOR < 6) {
@@ -927,7 +927,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
@@ -941,7 +941,7 @@ LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) {
int x = OS.GET_X_LPARAM (lParam);
@@ -976,7 +976,7 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
return super.WM_PAINT (wParam, lParam);
}
@@ -998,7 +998,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) {
RECT rect = new RECT ();
@@ -1013,13 +1013,13 @@ LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) redraw ();
return result;
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.COMCTL32_MAJOR < 6) {
layout.setFont (Font.win32_new (display, wParam));
}
@@ -1027,7 +1027,7 @@ LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SETFONT (font = wParam, lParam);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) {
RECT rect = new RECT ();
@@ -1038,7 +1038,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmColorChild (wParam, lParam);
/*
* Feature in Windows. When a SysLink is disabled, it does
@@ -1051,7 +1051,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
if (result == null) {
int backPixel = getBackgroundPixel ();
OS.SetBkColor (wParam, backPixel);
- int /*long*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
+ long /*int*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
return new LRESULT (hBrush);
}
}
@@ -1059,7 +1059,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
switch (hdr.code) {
case OS.NM_RETURN:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
index 26376aed54..d7f2f2dc42 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
@@ -41,7 +41,7 @@ import org.eclipse.swt.events.*;
public class List extends Scrollable {
static final int INSET = 3;
- static final int /*long*/ ListProc;
+ static final long /*int*/ ListProc;
static final TCHAR ListClass = new TCHAR (0, "LISTBOX", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -178,7 +178,7 @@ public void addSelectionListener(SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
boolean redraw = false;
switch (msg) {
@@ -189,7 +189,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
break;
}
}
- int /*long*/ code = OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam);
+ long /*int*/ code = OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam);
switch (msg) {
case OS.WM_HSCROLL:
case OS.WM_VSCROLL: {
@@ -216,8 +216,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
width -= INSET;
} else {
int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
@@ -741,7 +741,7 @@ public void remove (int [] indices) {
}
int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
RECT rect = null;
- int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -861,7 +861,7 @@ public void remove (int start, int end) {
}
int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
RECT rect = null;
- int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -1198,14 +1198,14 @@ public void setItems (String [] items) {
for (int i=0; i<items.length; i++) {
if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT);
}
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, ListProc);
boolean redraw = getDrawing () && OS.IsWindowVisible (handle);
if (redraw) {
OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
}
RECT rect = null;
- int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -1256,8 +1256,8 @@ public void setItems (String [] items) {
void setScrollWidth () {
int newWidth = 0;
RECT rect = new RECT ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int cp = getCodePage ();
@@ -1281,8 +1281,8 @@ void setScrollWidth () {
void setScrollWidth (TCHAR buffer, boolean grow) {
RECT rect = new RECT ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -1518,8 +1518,8 @@ void updateMenuLocation (Event event) {
int focusIndex = getFocusIndex();
if (focusIndex != -1) {
RECT rect = new RECT ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -1563,11 +1563,11 @@ TCHAR windowClass () {
return ListClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ListProc;
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
/*
@@ -1595,7 +1595,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
/*
@@ -1699,7 +1699,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -1712,7 +1712,7 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. If the top index is changed while the
* list is being resized, Windows does not redraw properly
@@ -1740,7 +1740,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.LBN_SELCHANGE:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
index bf8d404cfb..a44eff8633 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
@@ -53,10 +53,10 @@ public class Menu extends Widget {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
int x, y;
- int /*long*/ hBrush, hwndCB;
+ long /*int*/ hBrush, hwndCB;
int id0, id1;
int foreground = -1, background = -1;
Image backgroundImage;
@@ -201,7 +201,7 @@ public Menu (MenuItem parentItem) {
this (checkNull (parentItem).parent);
}
-Menu (Decorations parent, int style, int /*long*/ handle) {
+Menu (Decorations parent, int style, long /*int*/ handle) {
super (parent, checkStyle (style));
this.parent = parent;
this.handle = handle;
@@ -225,7 +225,7 @@ Menu (Decorations parent, int style, int /*long*/ handle) {
void _setVisible (boolean visible) {
if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
if (visible) {
int flags = OS.TPM_LEFTBUTTON;
if (OS.GetKeyState (OS.VK_LBUTTON) >= 0) flags |= OS.TPM_RIGHTBUTTON;
@@ -266,7 +266,7 @@ void _setVisible (boolean visible) {
* is not returned to the focus control. This causes confusion for AT users.
* The fix is to explicitly set the accessibility focus back to the focus control.
*/
- int /*long*/ hFocus = OS.GetFocus();
+ long /*int*/ hFocus = OS.GetFocus();
if (hFocus != 0) {
OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, hFocus, OS.OBJID_CLIENT, 0);
}
@@ -348,7 +348,7 @@ void createHandle () {
if (handle != 0) return;
if ((style & SWT.BAR) != 0) {
if (OS.IsPPC) {
- int /*long*/ hwndShell = parent.handle;
+ long /*int*/ hwndShell = parent.handle;
SHMENUBARINFO mbi = new SHMENUBARINFO ();
mbi.cbSize = SHMENUBARINFO.sizeof;
mbi.hwndParent = hwndShell;
@@ -405,7 +405,7 @@ void createHandle () {
/* Set first item */
if (nToolBarId == ID_SPMM || nToolBarId == ID_SPMB) {
- int /*long*/ hMenu = OS.SendMessage (hwndCB, OS.SHCMBM_GETSUBMENU, 0, ID_SPSOFTKEY0);
+ long /*int*/ hMenu = OS.SendMessage (hwndCB, OS.SHCMBM_GETSUBMENU, 0, ID_SPSOFTKEY0);
/* Remove the item from the resource file */
OS.RemoveMenu (hMenu, 0, OS.MF_BYPOSITION);
Menu menu = new Menu (parent, SWT.DROP_DOWN, hMenu);
@@ -418,7 +418,7 @@ void createHandle () {
/* Set second item */
if (nToolBarId == ID_SPMM || nToolBarId == ID_SPBM) {
- int /*long*/ hMenu = OS.SendMessage (hwndCB, OS.SHCMBM_GETSUBMENU, 0, ID_SPSOFTKEY1);
+ long /*int*/ hMenu = OS.SendMessage (hwndCB, OS.SHCMBM_GETSUBMENU, 0, ID_SPSOFTKEY1);
OS.RemoveMenu (hMenu, 0, OS.MF_BYPOSITION);
Menu menu = new Menu (parent, SWT.DROP_DOWN, hMenu);
item = new MenuItem (this, menu, SWT.CASCADE, 1);
@@ -434,14 +434,14 @@ void createHandle () {
* a result, Shell on WinCE SP must use the class Dialog.
*/
int dwMask = OS.SHMBOF_NODEFAULT | OS.SHMBOF_NOTIFY;
- int /*long*/ lParam = OS.MAKELPARAM (dwMask, dwMask);
+ long /*int*/ lParam = OS.MAKELPARAM (dwMask, dwMask);
OS.SendMessage (hwndCB, OS.SHCMBM_OVERRIDEKEY, OS.VK_ESCAPE, lParam);
return;
}
handle = OS.CreateMenu ();
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
if (OS.IsHPC) {
- int /*long*/ hwndShell = parent.handle;
+ long /*int*/ hwndShell = parent.handle;
hwndCB = OS.CommandBar_Create (OS.GetModuleHandle (null), hwndShell, 1);
if (hwndCB == 0) error (SWT.ERROR_NO_HANDLES);
OS.CommandBar_Show (hwndCB, false);
@@ -505,10 +505,10 @@ void createItem (MenuItem item, int index) {
* becomes unexpectedly disabled. The fix is to insert a
* space.
*/
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (0, " ", true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
@@ -605,7 +605,7 @@ void destroyItem (MenuItem item) {
void destroyWidget () {
MenuItem cascade = this.cascade;
- int /*long*/ hMenu = handle, hCB = hwndCB;
+ long /*int*/ hMenu = handle, hCB = hwndCB;
releaseHandle ();
if (OS.IsWinCE && hCB != 0) {
OS.CommandBar_Destroy (hCB);
@@ -689,7 +689,7 @@ void fixMenus (Decorations newParent) {
if (parent.menuBar != this) {
return new Rectangle (0, 0, 0, 0);
}
- int /*long*/ hwndShell = parent.handle;
+ long /*int*/ hwndShell = parent.handle;
MENUBARINFO info = new MENUBARINFO ();
info.cbSize = MENUBARINFO.sizeof;
if (OS.GetMenuBarInfo (hwndShell, OS.OBJID_MENU, 0, info)) {
@@ -797,7 +797,7 @@ public MenuItem getItem (int index) {
if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {
if (OS.IsPPC) {
TBBUTTON lpButton = new TBBUTTON ();
- int /*long*/ result = OS.SendMessage (hwndCB, OS.TB_GETBUTTON, index, lpButton);
+ long /*int*/ result = OS.SendMessage (hwndCB, OS.TB_GETBUTTON, index, lpButton);
if (result == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
id = lpButton.idCommand;
}
@@ -892,7 +892,7 @@ public MenuItem [] getItems () {
return result;
}
-int GetMenuItemCount (int /*long*/ handle) {
+int GetMenuItemCount (long /*int*/ handle) {
if (OS.IsWinCE) {
if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {
return OS.IsSP ? 2 : (int)/*64*/OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
@@ -1050,7 +1050,7 @@ int imageIndex (Image image) {
Rectangle bounds = image.getBounds ();
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = imageList.add (image);
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
OS.SendMessage (hwndCB, OS.TB_SETIMAGELIST, 0, hImageList);
return index;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
index 376d077bae..cfa8287700 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/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*/ hBitmap;
+ long /*int*/ hBitmap;
int id, accelerator, userId;
/*
* Feature in Windows. On Windows 98, it is necessary
@@ -335,7 +335,7 @@ public int getAccelerator () {
if (shell.menuBar != parent) {
return new Rectangle (0, 0, 0, 0);
}
- int /*long*/ hwndShell = shell.handle;
+ long /*int*/ hwndShell = shell.handle;
MENUBARINFO info1 = new MENUBARINFO ();
info1.cbSize = MENUBARINFO.sizeof;
if (!OS.GetMenuBarInfo (hwndShell, OS.OBJID_MENU, 1, info1)) {
@@ -352,7 +352,7 @@ public int getAccelerator () {
int height = info2.bottom - info2.top;
return new Rectangle (x, y, width, height);
} else {
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
RECT rect1 = new RECT ();
if (!OS.GetMenuItemRect (0, hMenu, 0, rect1)) {
return new Rectangle (0, 0, 0, 0);
@@ -387,7 +387,7 @@ public int getAccelerator () {
public boolean getEnabled () {
checkWidget ();
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
- int /*long*/ hwndCB = parent.hwndCB;
+ long /*int*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_STATE;
@@ -403,7 +403,7 @@ public boolean getEnabled () {
if ((style & SWT.SEPARATOR) != 0) {
return (state & DISABLED) == 0;
}
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_STATE;
@@ -493,7 +493,7 @@ public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) return false;
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_STATE;
@@ -681,7 +681,7 @@ public void setAccelerator (int accelerator) {
public void setEnabled (boolean enabled) {
checkWidget ();
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
- int /*long*/ hwndCB = parent.hwndCB;
+ long /*int*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_STATE;
@@ -703,7 +703,7 @@ public void setEnabled (boolean enabled) {
state |= DISABLED;
}
}
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
if (OS.IsWinCE) {
int index = parent.indexOf (this);
if (index == -1) return;
@@ -792,7 +792,7 @@ public void setImage (Image image) {
super.setImage (image);
if (OS.IsWinCE) {
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
- int /*long*/ hwndCB = parent.hwndCB;
+ long /*int*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE;
@@ -815,7 +815,7 @@ public void setImage (Image image) {
info.hbmpItem = image != null ? OS.HBMMENU_CALLBACK : 0;
}
}
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
OS.SetMenuItemInfo (hMenu, id, false, info);
parent.redraw ();
}
@@ -875,13 +875,13 @@ void setMenu (Menu menu, boolean dispose) {
/* Assign the new menu in the OS */
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
if (OS.IsPPC) {
- int /*long*/ hwndCB = parent.hwndCB;
- int /*long*/ hMenu = menu == null ? 0 : menu.handle;
+ long /*int*/ hwndCB = parent.hwndCB;
+ long /*int*/ hMenu = menu == null ? 0 : menu.handle;
OS.SendMessage (hwndCB, OS.SHCMBM_SETSUBMENU, id, hMenu);
}
if (OS.IsSP) error (SWT.ERROR_CANNOT_SET_MENU);
} else {
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_DATA;
@@ -892,9 +892,9 @@ void setMenu (Menu menu, boolean dispose) {
}
if (info.dwItemData != id) return;
int cch = 128;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = cch * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
info.fMask = OS.MIIM_STATE | OS.MIIM_ID | OS.MIIM_DATA;
/*
* Bug in Windows. When GetMenuItemInfo() is used to get the text,
@@ -925,7 +925,7 @@ void setMenu (Menu menu, boolean dispose) {
* the item, SetMenuItemInfo() to set the string and EnableMenuItem()
* and CheckMenuItem() to set the state.
*/
- int /*long*/ uIDNewItem = id;
+ long /*int*/ uIDNewItem = id;
int uFlags = OS.MF_BYPOSITION;
if (menu != null) {
uFlags |= OS.MF_POPUP;
@@ -978,7 +978,7 @@ boolean setRadioSelection (boolean value) {
}
void setOrientation (int orientation) {
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_FTYPE;
@@ -1004,7 +1004,7 @@ public void setSelection (boolean selected) {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) return;
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
if (OS.IsWinCE) {
int index = parent.indexOf (this);
if (index == -1) return;
@@ -1082,8 +1082,8 @@ public void setText (String string) {
if ((style & SWT.SEPARATOR) != 0) return;
if (text.equals (string)) return;
super.setText (string);
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pszText = 0;
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pszText = 0;
boolean success = false;
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
/*
@@ -1107,7 +1107,7 @@ public void setText (String string) {
int byteCount = buffer.length () * TCHAR.sizeof;
pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int /*long*/ hwndCB = parent.hwndCB;
+ long /*int*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info2 = new TBBUTTONINFO ();
info2.cbSize = TBBUTTONINFO.sizeof;
info2.dwMask = OS.TBIF_TEXT;
@@ -1116,7 +1116,7 @@ public void setText (String string) {
} else {
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
/* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR (0, string, true);
@@ -1162,7 +1162,7 @@ int widgetStyle () {
return bits | OS.MFT_STRING;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.CHECK) != 0) {
setSelection (!getSelection ());
} else {
@@ -1178,7 +1178,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
if (image != null) {
@@ -1201,7 +1201,7 @@ LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
int width = 0, height = 0;
@@ -1223,7 +1223,7 @@ LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
MENUINFO lpcmi = new MENUINFO ();
lpcmi.cbSize = MENUINFO.sizeof;
lpcmi.fMask = OS.MIM_STYLE;
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
OS.GetMenuInfo (hMenu, lpcmi);
if ((lpcmi.dwStyle & OS.MNS_CHECKORBMP) == 0) {
MenuItem [] items = parent.getItems ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java
index 8694a26c2d..04ec9096a8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java
@@ -190,7 +190,7 @@ public int open () {
* anyway and not rely on MB_MODAL to work by making the
* parent be temporarily modal.
*/
- int /*long*/ hwndOwner = parent != null ? parent.handle : 0;
+ long /*int*/ hwndOwner = parent != null ? parent.handle : 0;
Dialog oldModal = null;
Display display = null;
if ((bits & OS.MB_TASKMODAL) != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java
index 1083d0f62b..4d3214c9db 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java
@@ -40,7 +40,7 @@ public class ProgressBar extends Control {
static final int DELAY = 100;
static final int TIMER_ID = 100;
static final int MINIMUM_WIDTH = 100;
- static final int /*long*/ ProgressBarProc;
+ static final long /*int*/ ProgressBarProc;
static final TCHAR ProgressBarClass = new TCHAR (0, OS.PROGRESS_CLASS, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -63,13 +63,13 @@ public class ProgressBar extends Control {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = ProgressBarClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, ProgressBarClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -111,7 +111,7 @@ public ProgressBar (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ProgressBarProc, hwnd, msg, wParam, lParam);
}
@@ -323,7 +323,7 @@ public void setSelection (int value) {
* a second time.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int /*long*/ state = OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0);
+ long /*int*/ state = OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0);
if (state != OS.PBST_NORMAL) {
OS.SendMessage (handle, OS.PBM_SETPOS, value, 0);
}
@@ -380,11 +380,11 @@ TCHAR windowClass () {
return ProgressBarClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ProgressBarProc;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
/*
@@ -399,7 +399,7 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (OS.DLGC_STATIC);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (result != null) return result;
/*
@@ -435,7 +435,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_TIMER (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_TIMER (wParam, lParam);
if (result != null) return result;
if ((style & SWT.INDETERMINATE) != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
index e87b67adda..b834ad02fc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
@@ -110,7 +110,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -140,12 +140,12 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
void drawBand (int x, int y, int width, int height) {
if ((style & SWT.SMOOTH) != 0) return;
- int /*long*/ hwndTrack = parent.handle;
+ long /*int*/ hwndTrack = parent.handle;
byte [] bits = {-86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0};
- int /*long*/ stippleBitmap = OS.CreateBitmap (8, 8, 1, 1, bits);
- int /*long*/ stippleBrush = OS.CreatePatternBrush (stippleBitmap);
- int /*long*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
- int /*long*/ oldBrush = OS.SelectObject (hDC, stippleBrush);
+ long /*int*/ stippleBitmap = OS.CreateBitmap (8, 8, 1, 1, bits);
+ long /*int*/ stippleBrush = OS.CreatePatternBrush (stippleBitmap);
+ long /*int*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
+ long /*int*/ oldBrush = OS.SelectObject (hDC, stippleBrush);
OS.PatBlt (hDC, x, y, width, height, OS.PATINVERT);
OS.SelectObject (hDC, oldBrush);
OS.ReleaseDC (hwndTrack, hDC);
@@ -182,17 +182,17 @@ TCHAR windowClass () {
return display.windowClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return display.windowProc;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
super.WM_ERASEBKGND (wParam, lParam);
drawBackground (wParam);
return LRESULT.ONE;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -216,7 +216,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
OS.GetWindowRect (handle, rect);
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
- int /*long*/ hwndTrack = parent.handle;
+ long /*int*/ hwndTrack = parent.handle;
RECT clientRect = new RECT ();
OS.GetClientRect (hwndTrack, clientRect);
int clientWidth = clientRect.right - clientRect.left;
@@ -254,16 +254,16 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
return new LRESULT (OS.DLGC_STATIC);
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
/* Compute the banding rectangle */
- int /*long*/ hwndTrack = parent.handle;
+ long /*int*/ hwndTrack = parent.handle;
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, lParam);
RECT rect = new RECT ();
@@ -311,7 +311,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
@@ -341,7 +341,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
if (!dragging || (wParam & OS.MK_LBUTTON) == 0) return result;
@@ -349,7 +349,7 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
/* Compute the banding rectangle */
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, lParam);
- int /*long*/ hwndTrack = parent.handle;
+ long /*int*/ hwndTrack = parent.handle;
OS.MapWindowPoints (handle, hwndTrack, pt, 1);
RECT rect = new RECT (), clientRect = new RECT ();
OS.GetWindowRect (handle, rect);
@@ -396,12 +396,12 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
int hitTest = (short) OS.LOWORD (lParam);
if (hitTest == OS.HTCLIENT) {
- int /*long*/ hCursor = 0;
+ long /*int*/ hCursor = 0;
if ((style & SWT.HORIZONTAL) != 0) {
hCursor = OS.LoadCursor (0, OS.IDC_SIZENS);
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
index e02cf81d49..5b76a9cd47 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
@@ -41,7 +41,7 @@ import org.eclipse.swt.events.*;
public class Scale extends Control {
boolean ignoreResize, ignoreSelection;
- static final int /*long*/ TrackBarProc;
+ static final long /*int*/ TrackBarProc;
static final TCHAR TrackBarClass = new TCHAR (0, OS.TRACKBAR_CLASS, true);
boolean createdAsRTL;
static {
@@ -65,13 +65,13 @@ public class Scale extends Control {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = TrackBarClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, TrackBarClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -142,7 +142,7 @@ public void addSelectionListener(SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (TrackBarProc, hwnd, msg, wParam, lParam);
}
@@ -288,7 +288,7 @@ public void removeSelectionListener(SelectionListener listener) {
eventTable.unhook (SWT.DefaultSelection,listener);
}
-void setBackgroundImage (int /*long*/ hImage) {
+void setBackgroundImage (long /*int*/ hImage) {
super.setBackgroundImage (hImage);
/*
* Bug in Windows. Changing the background color of the Scale
@@ -454,11 +454,11 @@ TCHAR windowClass () {
return TrackBarClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return TrackBarProc;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -473,7 +473,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
*/
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
if (isRTL != createdAsRTL) {
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
return new LRESULT (code);
}
break;
@@ -481,7 +481,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
if (result != null) return result;
/*
@@ -494,7 +494,7 @@ LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
*/
int oldPosition = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
ignoreSelection = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
ignoreSelection = false;
int newPosition = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
if (oldPosition != newPosition) {
@@ -509,7 +509,7 @@ LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (code);
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. For some reason, when WM_CTLCOLORSTATIC
* is used to implement transparency and returns a NULL brush,
@@ -541,12 +541,12 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_PAINT (wParam, lParam);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreResize) return null;
return super.WM_SIZE (wParam, lParam);
}
-LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
/* Do nothing when scrolling is ending */
int code = OS.LOWORD (wParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
index cf21cc258d..60f692a04b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
@@ -182,7 +182,7 @@ void createWidget () {
}
void destroyWidget () {
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
if (OS.IsWinCE) {
SCROLLINFO info = new SCROLLINFO ();
@@ -271,7 +271,7 @@ public int getMaximum () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_RANGE;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nMax;
@@ -292,7 +292,7 @@ public int getMinimum () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_RANGE;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nMin;
@@ -345,7 +345,7 @@ public int getSelection () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_POS;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nPos;
@@ -397,7 +397,7 @@ public int getThumb () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_PAGE;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
if (info.nPage != 0) --info.nPage;
@@ -530,7 +530,7 @@ public boolean getVisible () {
return (state & HIDDEN) == 0;
}
-int /*long*/ hwndScrollBar () {
+long /*int*/ hwndScrollBar () {
return parent.scrolledHandle ();
}
@@ -634,7 +634,7 @@ public void setEnabled (boolean enabled) {
*/
// if (OS.IsWinCE) error (SWT.ERROR_NOT_IMPLEMENTED);
if (!OS.IsWinCE) {
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
int flags = enabled ? OS.ESB_ENABLE_BOTH : OS.ESB_DISABLE_BOTH;
OS.EnableScrollBar (hwnd, type, flags);
@@ -683,7 +683,7 @@ public void setMaximum (int value) {
if (value < 0) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
@@ -710,7 +710,7 @@ public void setMinimum (int value) {
if (value < 0) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
@@ -738,7 +738,7 @@ public void setPageIncrement (int value) {
pageIncrement = value;
}
-boolean SetScrollInfo (int /*long*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
+boolean SetScrollInfo (long /*int*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
/*
* Bug in Windows. For some reason, when SetScrollInfo()
* is used with SIF_POS and the scroll bar is hidden,
@@ -844,7 +844,7 @@ public void setSelection (int selection) {
checkWidget();
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_POS;
info.nPos = selection;
@@ -873,7 +873,7 @@ public void setThumb (int value) {
if (value < 1) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_PAGE | OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
@@ -920,7 +920,7 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i
info.nMax = maximum;
info.nPage = thumb;
if (info.nPage != 0) info.nPage++;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
SetScrollInfo (hwnd, type, info, true);
}
@@ -953,7 +953,7 @@ public void setVisible (boolean visible) {
if (OS.IsWinCE) {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_PAGE;
if (visible) info.fMask |= OS.SIF_DISABLENOSCROLL;
@@ -990,7 +990,7 @@ public void setVisible (boolean visible) {
* of the scroll bar will get the correct value.
*/
state = visible ? state & ~HIDDEN : state | HIDDEN;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
if (OS.ShowScrollBar (hwnd, type, visible)) {
/*
@@ -1020,7 +1020,7 @@ public void setVisible (boolean visible) {
}
}
-LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
/* Do nothing when scrolling is ending */
int code = OS.LOWORD (wParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
index 0b2e0add0d..af1bcc82ee 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
@@ -75,7 +75,7 @@ public Scrollable (Composite parent, int style) {
super (parent, style);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -109,7 +109,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
*/
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
- int /*long*/ scrolledHandle = scrolledHandle ();
+ long /*int*/ scrolledHandle = scrolledHandle ();
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
int bits1 = OS.GetWindowLong (scrolledHandle, OS.GWL_STYLE);
@@ -137,7 +137,7 @@ void createWidget () {
}
void destroyScrollBar (int type) {
- int /*long*/ hwnd = scrolledHandle ();
+ long /*int*/ hwnd = scrolledHandle ();
int bits = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
if ((type & SWT.HORIZONTAL) != 0) {
style &= ~SWT.H_SCROLL;
@@ -168,7 +168,7 @@ public Rectangle getClientArea () {
checkWidget ();
forceResize ();
RECT rect = new RECT ();
- int /*long*/ scrolledHandle = scrolledHandle ();
+ long /*int*/ scrolledHandle = scrolledHandle ();
OS.GetClientRect (scrolledHandle, rect);
int x = rect.left, y = rect.top;
int width = rect.right - rect.left;
@@ -258,7 +258,7 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-int /*long*/ scrolledHandle () {
+long /*int*/ scrolledHandle () {
return handle;
}
@@ -287,11 +287,11 @@ TCHAR windowClass () {
return display.windowClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return display.windowProc;
}
-LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_HSCROLL (wParam, lParam);
if (result != null) return result;
@@ -308,19 +308,19 @@ LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
return wmScrollWheel ((state & CANVAS) != 0, wParam, lParam);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
super.WM_SIZE (wParam, lParam);
// widget may be disposed at this point
if (code == 0) return LRESULT.ZERO;
return new LRESULT (code);
}
-LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_VSCROLL (wParam, lParam);
if (result != null) return result;
/*
@@ -336,7 +336,7 @@ LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNCPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmNCPaint (hwnd, wParam, lParam);
if (result != null) return result;
/*
@@ -374,11 +374,11 @@ LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
cornerRect.left = cornerRect.right - (hVisible ? OS.GetSystemMetrics (OS.SM_CXVSCROLL) : 0);
}
if (cornerRect.left != cornerRect.right && cornerRect.top != cornerRect.bottom) {
- int /*long*/ hDC = OS.GetWindowDC (hwnd);
+ long /*int*/ hDC = OS.GetWindowDC (hwnd);
OS.FillRect (hDC, cornerRect, OS.COLOR_BTNFACE + 1);
Decorations shell = menuShell ();
if ((shell.style & SWT.RESIZE) != 0) {
- int /*long*/ hwndScroll = shell.scrolledHandle ();
+ long /*int*/ hwndScroll = shell.scrolledHandle ();
boolean drawGripper = hwnd == hwndScroll;
if (!drawGripper) {
RECT shellRect = new RECT ();
@@ -398,7 +398,7 @@ LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return result;
}
-LRESULT wmScrollWheel (boolean update, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollWheel (boolean update, long /*int*/ wParam, long /*int*/ lParam) {
int scrollRemainder = display.scrollRemainder;
LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
if (result != null) return result;
@@ -457,7 +457,7 @@ LRESULT wmScrollWheel (boolean update, int /*long*/ wParam, int /*long*/ lParam)
*/
int vPosition = verticalBar == null ? 0 : verticalBar.getSelection ();
int hPosition = horizontalBar == null ? 0 : horizontalBar.getSelection ();
- int /*long*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
if (verticalBar != null) {
int position = verticalBar.getSelection ();
if (position != vPosition) {
@@ -477,7 +477,7 @@ LRESULT wmScrollWheel (boolean update, int /*long*/ wParam, int /*long*/ lParam)
return new LRESULT (code);
}
-LRESULT wmScroll (ScrollBar bar, boolean update, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScroll (ScrollBar bar, boolean update, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
if (update) {
int type = msg == OS.WM_HSCROLL ? OS.SB_HORZ : OS.SB_VERT;
@@ -522,7 +522,7 @@ LRESULT wmScroll (ScrollBar bar, boolean update, int /*long*/ hwnd, int msg, int
}
OS.SetScrollInfo (hwnd, type, info, true);
} else {
- int /*long*/ code = callWindowProc (hwnd, msg, wParam, lParam);
+ long /*int*/ code = callWindowProc (hwnd, msg, wParam, lParam);
result = code == 0 ? LRESULT.ZERO : new LRESULT (code);
}
bar.wmScrollChild (wParam, lParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
index eb6a6aca64..bff0bfaf6d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
@@ -119,17 +119,17 @@ import org.eclipse.swt.events.*;
public class Shell extends Decorations {
Menu activeMenu;
ToolTip [] toolTips;
- int /*long*/ hIMC, hwndMDIClient, lpstrTip, toolTipHandle, balloonTipHandle;
+ long /*int*/ hIMC, hwndMDIClient, lpstrTip, toolTipHandle, balloonTipHandle;
int minWidth = SWT.DEFAULT, minHeight = SWT.DEFAULT;
- int /*long*/ [] brushes;
+ long /*int*/ [] brushes;
boolean showWithParent, fullScreen, wasMaximized, modified, center;
String toolTitle, balloonTitle;
- int /*long*/ toolIcon, balloonIcon;
- int /*long*/ windowProc;
+ long /*int*/ toolIcon, balloonIcon;
+ long /*int*/ windowProc;
Control lastActive;
SHACTIVATEINFO psai;
- static /*final*/ int /*long*/ ToolTipProc;
- static final int /*long*/ DialogProc;
+ static /*final*/ long /*int*/ ToolTipProc;
+ static final long /*int*/ DialogProc;
static final TCHAR DialogClass = new TCHAR (0, OS.IsWinCE ? "Dialog" : "#32770", true);
final static int [] SYSTEM_COLORS = {
OS.COLOR_BTNFACE,
@@ -274,7 +274,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 ();
@@ -392,7 +392,7 @@ public Shell (Shell parent, int style) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Shell win32_new (Display display, int /*long*/ handle) {
+public static Shell win32_new (Display display, long /*int*/ handle) {
return new Shell (display, null, SWT.NO_TRIM, handle, true);
}
@@ -415,7 +415,7 @@ public static Shell win32_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);
}
@@ -467,12 +467,12 @@ public void addShellListener (ShellListener listener) {
addListener (SWT.Deactivate, typedListener);
}
-int /*long*/ balloonTipHandle () {
+long /*int*/ balloonTipHandle () {
if (balloonTipHandle == 0) createBalloonTipHandle ();
return balloonTipHandle;
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd == toolTipHandle || hwnd == balloonTipHandle) {
return OS.CallWindowProc (ToolTipProc, hwnd, msg, wParam, lParam);
@@ -730,7 +730,7 @@ void enableWidget (boolean enabled) {
}
}
-int /*long*/ findBrush (int /*long*/ value, int lbStyle) {
+long /*int*/ findBrush (long /*int*/ value, int lbStyle) {
if (lbStyle == OS.BS_SOLID) {
for (int i=0; i<SYSTEM_COLORS.length; i++) {
if (value == OS.GetSysColor (SYSTEM_COLORS [i])) {
@@ -738,10 +738,10 @@ int /*long*/ findBrush (int /*long*/ value, int lbStyle) {
}
}
}
- if (brushes == null) brushes = new int /*long*/ [BRUSHES_SIZE];
+ if (brushes == null) brushes = new long /*int*/ [BRUSHES_SIZE];
LOGBRUSH logBrush = new LOGBRUSH ();
for (int i=0; i<brushes.length; i++) {
- int /*long*/ hBrush = brushes [i];
+ long /*int*/ hBrush = brushes [i];
if (hBrush == 0) break;
OS.GetObject (hBrush, LOGBRUSH.sizeof, logBrush);
switch (logBrush.lbStyle) {
@@ -758,7 +758,7 @@ int /*long*/ findBrush (int /*long*/ value, int lbStyle) {
}
}
int length = brushes.length;
- int /*long*/ hBrush = brushes [--length];
+ long /*int*/ hBrush = brushes [--length];
if (hBrush != 0) OS.DeleteObject (hBrush);
System.arraycopy (brushes, 0, brushes, 1, length);
switch (lbStyle) {
@@ -800,7 +800,7 @@ void fixActiveShell () {
* application). The fix is to activate the disabled parent
* shell before disposing or hiding the active shell.
*/
- int /*long*/ hwndParent = OS.GetParent (handle);
+ long /*int*/ hwndParent = OS.GetParent (handle);
if (hwndParent != 0 && handle == OS.GetActiveWindow ()) {
if (!OS.IsWindowEnabled (hwndParent) && OS.IsWindowVisible (hwndParent)) {
OS.SetActiveWindow (hwndParent);
@@ -922,7 +922,7 @@ ToolTip getCurrentToolTip () {
return null;
}
-ToolTip getCurrentToolTip (int /*long*/ hwndToolTip) {
+ToolTip getCurrentToolTip (long /*int*/ hwndToolTip) {
if (hwndToolTip == 0) return null;
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
@@ -978,7 +978,7 @@ public boolean getFullScreen () {
public int getImeInputMode () {
checkWidget ();
if (!OS.IsDBLocale) return 0;
- int /*long*/ hIMC = OS.ImmGetContext (handle);
+ long /*int*/ hIMC = OS.ImmGetContext (handle);
int [] lpfdwConversion = new int [1], lpfdwSentence = new int [1];
boolean open = OS.ImmGetOpenStatus (hIMC);
if (open) open = OS.ImmGetConversionStatus (hIMC, lpfdwConversion, lpfdwSentence);
@@ -1171,7 +1171,7 @@ public boolean isVisible () {
return getVisible ();
}
-int /*long*/ hwndMDIClient () {
+long /*int*/ hwndMDIClient () {
if (hwndMDIClient == 0) {
int widgetStyle = OS.MDIS_ALLCHILDSTYLES | OS.WS_CHILD | OS.WS_CLIPCHILDREN | OS.WS_CLIPSIBLINGS;
hwndMDIClient = OS.CreateWindowEx (
@@ -1305,7 +1305,7 @@ void releaseWidget () {
activeMenu = null;
display.clearModal (this);
if (lpstrTip != 0) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lpstrTip);
}
lpstrTip = 0;
@@ -1365,9 +1365,9 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-LRESULT selectPalette (int /*long*/ hPalette) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ hOld = OS.SelectPalette (hDC, hPalette, false);
+LRESULT selectPalette (long /*int*/ hPalette) {
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ hOld = OS.SelectPalette (hDC, hPalette, false);
int result = OS.RealizePalette (hDC);
if (result > 0) {
OS.InvalidateRect (handle, null, true);
@@ -1379,7 +1379,7 @@ LRESULT selectPalette (int /*long*/ hPalette) {
return (result > 0) ? LRESULT.ONE : LRESULT.ZERO;
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
if (!isEnabled () || !isActive ()) return false;
return super.sendKeyEvent (type, msg, wParam, lParam, event);
}
@@ -1578,7 +1578,7 @@ public void setImeInputMode (int mode) {
checkWidget ();
if (!OS.IsDBLocale) return;
boolean imeOn = mode != SWT.NONE;
- int /*long*/ hIMC = OS.ImmGetContext (handle);
+ long /*int*/ hIMC = OS.ImmGetContext (handle);
OS.ImmSetOpenStatus (hIMC, imeOn);
if (imeOn) {
int [] lpfdwConversion = new int [1], lpfdwSentence = new int [1];
@@ -1596,7 +1596,7 @@ public void setImeInputMode (int mode) {
}
boolean fullShape = (mode & SWT.DBCS) != 0;
if ((mode & SWT.NATIVE) != 0) {
- int /*long*/ hkl = OS.GetKeyboardLayout (0);
+ long /*int*/ hkl = OS.GetKeyboardLayout (0);
int langid = OS.PRIMARYLANGID (OS.LOWORD (hkl));
if (langid == OS.LANG_JAPANESE) {
fullShape = true;
@@ -1703,7 +1703,7 @@ public void setModified (boolean modified) {
}
void setItemEnabled (int cmd, boolean enabled) {
- int /*long*/ hMenu = OS.GetSystemMenu (handle, false);
+ long /*int*/ hMenu = OS.GetSystemMenu (handle, false);
if (hMenu == 0) return;
int flags = OS.MF_ENABLED;
if (!enabled) flags = OS.MF_DISABLED | OS.MF_GRAYED;
@@ -1740,13 +1740,13 @@ public void setRegion (Region region) {
super.setRegion (region);
}
-void setToolTipText (int /*long*/ hwnd, String text) {
+void setToolTipText (long /*int*/ hwnd, String text) {
if (OS.IsWinCE) return;
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
lpti.hwnd = handle;
lpti.uId = hwnd;
- int /*long*/ hwndToolTip = toolTipHandle ();
+ long /*int*/ hwndToolTip = toolTipHandle ();
if (text == null) {
OS.SendMessage (hwndToolTip, OS.TTM_DELTOOL, 0, lpti);
} else {
@@ -1768,7 +1768,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, byte [] buffer) {
* shell trimmings.
*/
if (!hasCursor ()) return;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
if (lpstrTip != 0) OS.HeapFree (hHeap, 0, lpstrTip);
int byteCount = buffer.length;
lpstrTip = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
@@ -1784,7 +1784,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, char [] buffer) {
* shell trimmings.
*/
if (!hasCursor ()) return;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
if (lpstrTip != 0) OS.HeapFree (hHeap, 0, lpstrTip);
int byteCount = buffer.length * 2;
lpstrTip = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
@@ -1792,7 +1792,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, char [] buffer) {
lpnmtdi.lpszText = lpstrTip;
}
-void setToolTipTitle (int /*long*/ hwndToolTip, String text, int icon) {
+void setToolTipTitle (long /*int*/ hwndToolTip, String text, int icon) {
/*
* Bug in Windows. For some reason, when TTM_SETTITLE
* is used to set the title of a tool tip, Windows leaks
@@ -1864,7 +1864,7 @@ public void setVisible (boolean visible) {
bringToTop ();
if (isDisposed ()) return;
}
- int /*long*/ hwndShell = OS.GetActiveWindow ();
+ long /*int*/ hwndShell = OS.GetActiveWindow ();
if (hwndShell == 0) {
if (parent != null) hwndShell = parent.handle;
}
@@ -1905,7 +1905,7 @@ public void setVisible (boolean visible) {
/* Make the foreign window parent appear in the task bar */
if (visible) {
if (parent != null && (parent.state & FOREIGN_HANDLE) != 0) {
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
int style = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
if ((style & OS.WS_EX_TOOLWINDOW) != 0) {
OS.SetWindowLong (hwndParent, OS.GWL_EXSTYLE, style & ~OS.WS_EX_TOOLWINDOW);
@@ -1924,7 +1924,7 @@ public void setVisible (boolean visible) {
void subclass () {
super.subclass ();
if (ToolTipProc != 0) {
- int /*long*/ newProc = display.windowProc;
+ long /*int*/ newProc = display.windowProc;
if (toolTipHandle != 0) {
OS.SetWindowLongPtr (toolTipHandle, OS.GWLP_WNDPROC, newProc);
}
@@ -1934,7 +1934,7 @@ void subclass () {
}
}
-int /*long*/ toolTipHandle () {
+long /*int*/ toolTipHandle () {
if (toolTipHandle == 0) createToolTipHandle ();
return toolTipHandle;
}
@@ -1976,7 +1976,7 @@ CREATESTRUCT widgetCreateStruct () {
return null;
}
-int /*long*/ widgetParent () {
+long /*int*/ widgetParent () {
if (handle != 0) return handle;
return parent != null ? parent.handle : 0;
}
@@ -2033,7 +2033,7 @@ TCHAR windowClass () {
return parent != null ? DialogClass : super.windowClass ();
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
if (windowProc != 0) return windowProc;
if (OS.IsSP) return DialogProc;
if ((style & SWT.TOOL) != 0) {
@@ -2043,7 +2043,7 @@ int /*long*/ windowProc () {
return parent != null ? DialogProc : super.windowProc ();
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd == toolTipHandle || hwnd == balloonTipHandle) {
switch (msg) {
@@ -2108,7 +2108,7 @@ int widgetStyle () {
return bits | OS.WS_OVERLAPPED | OS.WS_CAPTION;
}
-LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsPPC) {
/*
* Note: this does not work when we get WM_ACTIVATE prior
@@ -2116,7 +2116,7 @@ LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (hooks (SWT.HardKeyDown) || hooks (SWT.HardKeyUp)) {
int fActive = OS.LOWORD (wParam);
- int /*long*/ hwnd = fActive != 0 ? handle : 0;
+ long /*int*/ hwnd = fActive != 0 ? handle : 0;
for (int bVk=OS.VK_APP1; bVk<=OS.VK_APP6; bVk++) {
OS.SHSetAppKeyWndAssoc ((byte) bVk, hwnd);
}
@@ -2152,7 +2152,7 @@ LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
return parent != null ? LRESULT.ZERO : result;
}
-LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsPPC) {
/*
* Note in WinCE PPC: Close the Shell when the "Done Button" has
@@ -2177,12 +2177,12 @@ LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (OS.IsPPC || OS.IsSP) {
if (menuBar != null) {
- int /*long*/ hwndCB = menuBar.hwndCB;
+ long /*int*/ hwndCB = menuBar.hwndCB;
if (lParam != 0 && hwndCB != 0) {
if (lParam == hwndCB) {
return super.WM_COMMAND (wParam, 0);
} else {
- int /*long*/ hwndChild = OS.GetWindow (hwndCB, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (hwndCB, OS.GW_CHILD);
if (lParam == hwndChild) return super.WM_COMMAND (wParam, 0);
}
}
@@ -2191,7 +2191,7 @@ LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_COMMAND (wParam, lParam);
}
-LRESULT WM_DESTROY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_DESTROY (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_DESTROY (wParam, lParam);
/*
* When the shell is a WS_CHILD window of a non-SWT
@@ -2207,7 +2207,7 @@ LRESULT WM_DESTROY (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
/*
@@ -2225,7 +2225,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_ENTERIDLE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ENTERIDLE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ENTERIDLE (wParam, lParam);
if (result != null) return result;
Display display = this.display;
@@ -2235,7 +2235,7 @@ LRESULT WM_ENTERIDLE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETMINMAXINFO (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETMINMAXINFO (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETMINMAXINFO (wParam, lParam);
if (result != null) return result;
if (minWidth != SWT.DEFAULT || minHeight != SWT.DEFAULT) {
@@ -2249,7 +2249,7 @@ LRESULT WM_GETMINMAXINFO (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEACTIVATE (wParam, lParam);
if (result != null) return result;
@@ -2303,7 +2303,7 @@ LRESULT WM_MOUSEACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
int pos = OS.GetMessagePos ();
OS.POINTSTOPOINT (pt, pos);
}
- int /*long*/ hwnd = OS.WindowFromPoint (pt);
+ long /*int*/ hwnd = OS.WindowFromPoint (pt);
if (hwnd == 0) return null;
Control control = display.findControl (hwnd);
@@ -2324,12 +2324,12 @@ LRESULT WM_MOUSEACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
}
}
- int /*long*/ code = callWindowProc (handle, OS.WM_MOUSEACTIVATE, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_MOUSEACTIVATE, wParam, lParam);
setActiveControl (control);
return new LRESULT (code);
}
-LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOVE (wParam, lParam);
if (result != null) return result;
ToolTip tip = getCurrentToolTip ();
@@ -2337,23 +2337,23 @@ LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
if (!OS.IsWindowEnabled (handle)) return null;
if (!isEnabled () || !isActive ()) {
if (!Display.TrimEnabled) return new LRESULT (OS.HTNOWHERE);
- int /*long*/ hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long /*int*/ hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (hittest == OS.HTCLIENT || hittest == OS.HTMENU) hittest = OS.HTBORDER;
return new LRESULT (hittest);
}
if (menuBar != null && !menuBar.getEnabled ()) {
- int /*long*/ hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long /*int*/ hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (hittest == OS.HTMENU) hittest = OS.HTBORDER;
return new LRESULT (hittest);
}
return null;
}
-LRESULT WM_NCLBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCLBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCLBUTTONDOWN (wParam, lParam);
if (result != null) return result;
/*
@@ -2365,11 +2365,11 @@ LRESULT WM_NCLBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (!display.ignoreRestoreFocus) return result;
Display display = this.display;
- int /*long*/ hwndActive = 0;
+ long /*int*/ hwndActive = 0;
boolean fixActive = OS.IsWin95 && display.lastHittest == OS.HTCAPTION;
if (fixActive) hwndActive = OS.SetActiveWindow (handle);
display.lockActiveWindow = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_NCLBUTTONDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_NCLBUTTONDOWN, wParam, lParam);
display.lockActiveWindow = false;
if (fixActive) OS.SetActiveWindow (hwndActive);
Control focusControl = display.lastHittestControl;
@@ -2381,21 +2381,21 @@ LRESULT WM_NCLBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (code);
}
-LRESULT WM_PALETTECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PALETTECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
if (wParam != handle) {
- int /*long*/ hPalette = display.hPalette;
+ long /*int*/ hPalette = display.hPalette;
if (hPalette != 0) return selectPalette (hPalette);
}
return super.WM_PALETTECHANGED (wParam, lParam);
}
-LRESULT WM_QUERYNEWPALETTE (int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ hPalette = display.hPalette;
+LRESULT WM_QUERYNEWPALETTE (long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ hPalette = display.hPalette;
if (hPalette != 0) return selectPalette (hPalette);
return super.WM_QUERYNEWPALETTE (wParam, lParam);
}
-LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the shell is disabled
* by a Windows standard dialog (like a MessageBox
@@ -2409,7 +2409,7 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
if (!Display.TrimEnabled) {
Shell modalShell = display.getModalShell ();
if (modalShell != null && !isActive ()) {
- int /*long*/ hwndModal = modalShell.handle;
+ long /*int*/ hwndModal = modalShell.handle;
if (OS.IsWindowEnabled (hwndModal)) {
OS.SetActiveWindow (hwndModal);
}
@@ -2417,7 +2417,7 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
}
if (!OS.IsWindowEnabled (handle)) {
if (!OS.IsWinCE) {
- int /*long*/ hwndPopup = OS.GetLastActivePopup (handle);
+ long /*int*/ hwndPopup = OS.GetLastActivePopup (handle);
if (hwndPopup != 0 && hwndPopup != handle) {
if (display.getControl (hwndPopup) == null) {
if (OS.IsWindowEnabled (hwndPopup)) {
@@ -2467,7 +2467,7 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SETCURSOR (wParam, lParam);
}
-LRESULT WM_SETTINGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETTINGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETTINGCHANGE (wParam, lParam);
if (result != null) return result;
if (OS.IsPPC) {
@@ -2492,7 +2492,7 @@ LRESULT WM_SETTINGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SHOWWINDOW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SHOWWINDOW (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SHOWWINDOW (wParam, lParam);
if (result != null) return result;
/*
@@ -2514,7 +2514,7 @@ LRESULT WM_SHOWWINDOW (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
/*
@@ -2548,7 +2548,7 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam,lParam);
if (result != null) return result;
WINDOWPOS lpwp = new WINDOWPOS ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
index e20f00c890..6f1fa17fe8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
@@ -71,7 +71,7 @@ import org.eclipse.swt.events.*;
public class Slider extends Control {
int increment, pageIncrement;
boolean ignoreFocus;
- static final int /*long*/ ScrollBarProc;
+ static final long /*int*/ ScrollBarProc;
static final TCHAR ScrollBarClass = new TCHAR (0, "SCROLLBAR", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -152,7 +152,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows. Windows runs a modal message
@@ -473,7 +473,7 @@ public void setPageIncrement (int value) {
pageIncrement = value;
}
-boolean SetScrollInfo (int /*long*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
+boolean SetScrollInfo (long /*int*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
/*
* Feature in Windows. Using SIF_DISABLENOSCROLL,
* SetScrollInfo () can change enabled and disabled
@@ -625,11 +625,11 @@ TCHAR windowClass () {
return ScrollBarClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ScrollBarProc;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if ((style & SWT.VERTICAL) != 0) return result;
@@ -647,7 +647,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
case OS.VK_LEFT:
case OS.VK_RIGHT: {
int key = wParam == OS.VK_LEFT ? OS.VK_RIGHT : OS.VK_LEFT;
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, key, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, key, lParam);
return new LRESULT (code);
}
}
@@ -655,7 +655,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows uses the WS_TABSTOP
* style for the scroll bar to decide that focus
@@ -688,7 +688,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows uses the WS_TABSTOP
* style for the scroll bar to decide that focus
@@ -721,12 +721,12 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreFocus) return null;
return super.WM_SETFOCUS (wParam, lParam);
}
-LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
/* Do nothing when scrolling is ending */
int code = OS.LOWORD (wParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
index 82dd8c81da..fe4030ef0e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
@@ -42,12 +42,12 @@ import org.eclipse.swt.events.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class Spinner extends Composite {
- int /*long*/ hwndText, hwndUpDown;
+ long /*int*/ hwndText, hwndUpDown;
boolean ignoreModify, ignoreCharacter;
int pageIncrement, digits;
- static final int /*long*/ EditProc;
+ static final long /*int*/ EditProc;
static final TCHAR EditClass = new TCHAR (0, "EDIT", true);
- static final int /*long*/ UpDownProc;
+ static final long /*int*/ UpDownProc;
static final TCHAR UpDownClass = new TCHAR (0, OS.UPDOWN_CLASS, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -107,7 +107,7 @@ public Spinner (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd == hwndText) {
return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
@@ -129,7 +129,7 @@ static int checkStyle (int style) {
return style & ~(SWT.H_SCROLL | SWT.V_SCROLL);
}
-boolean checkHandle (int /*long*/ hwnd) {
+boolean checkHandle (long /*int*/ hwnd) {
return hwnd == handle || hwnd == hwndText || hwnd == hwndUpDown;
}
@@ -140,7 +140,7 @@ protected void checkSubclass () {
void createHandle () {
super.createHandle ();
state &= ~(CANVAS | THEME_BACKGROUND);
- int /*long*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
int textExStyle = (style & SWT.BORDER) != 0 ? OS.WS_EX_CLIENTEDGE : 0;
int textStyle = OS.WS_CHILD | OS.WS_VISIBLE | OS.ES_AUTOHSCROLL | OS.WS_CLIPSIBLINGS;
if ((style & SWT.READ_ONLY) != 0) textStyle |= OS.ES_READONLY;
@@ -183,7 +183,7 @@ void createHandle () {
SetWindowPos (hwndText, hwndUpDown, 0, 0, 0, 0, flags);
OS.SetWindowLongPtr (hwndUpDown, OS.GWLP_ID, hwndUpDown);
if (OS.IsDBLocale) {
- int /*long*/ hIMC = OS.ImmGetContext (handle);
+ long /*int*/ hIMC = OS.ImmGetContext (handle);
OS.ImmAssociateContext (hwndText, hIMC);
OS.ImmAssociateContext (hwndUpDown, hIMC);
OS.ImmReleaseContext (handle, hIMC);
@@ -280,7 +280,7 @@ void addVerifyListener (VerifyListener listener) {
addListener (SWT.Verify, typedListener);
}
-int /*long*/ borderHandle () {
+long /*int*/ borderHandle () {
return hwndText;
}
@@ -288,8 +288,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (hwndText);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (hwndText);
newFont = OS.SendMessage (hwndText, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -350,7 +350,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
* the single-line text widget in an editable combo
* box.
*/
- int /*long*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
x -= OS.LOWORD (margins);
width += OS.LOWORD (margins) + OS.HIWORD (margins);
if ((style & SWT.BORDER) != 0) {
@@ -414,7 +414,7 @@ void deregister () {
}
boolean hasFocus () {
- int /*long*/ hwndFocus = OS.GetFocus ();
+ long /*int*/ hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) return true;
if (hwndFocus == hwndText) return true;
if (hwndFocus == hwndUpDown) return true;
@@ -730,7 +730,7 @@ void removeVerifyListener (VerifyListener listener) {
eventTable.unhook (SWT.Verify, listener);
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -813,7 +813,7 @@ boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lPara
return false;
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
super.setBackgroundImage (hBitmap);
OS.InvalidateRect (hwndText, null, true);
}
@@ -877,14 +877,14 @@ void setForegroundPixel (int pixel) {
public void setIncrement (int value) {
checkWidget ();
if (value < 1) return;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int count = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, 0, (UDACCEL)null);
- int /*long*/ udaccels = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, UDACCEL.sizeof * count);
+ long /*int*/ udaccels = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, UDACCEL.sizeof * count);
OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, count, udaccels);
int first = -1;
UDACCEL udaccel = new UDACCEL ();
for (int i = 0; i < count; i++) {
- int /*long*/ offset = udaccels + (i * UDACCEL.sizeof);
+ long /*int*/ offset = udaccels + (i * UDACCEL.sizeof);
OS.MoveMemory (udaccel, offset, UDACCEL.sizeof);
if (first == -1) first = udaccel.nInc;
udaccel.nInc = udaccel.nInc / first * value;
@@ -1102,7 +1102,7 @@ public void setValues (int selection, int minimum, int maximum, int digits, int
void subclass () {
super.subclass ();
- int /*long*/ newProc = display.windowProc;
+ long /*int*/ newProc = display.windowProc;
OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, newProc);
OS.SetWindowLongPtr (hwndUpDown, OS.GWLP_WNDPROC, newProc);
}
@@ -1176,7 +1176,7 @@ int widgetExtStyle () {
return super.widgetExtStyle () & ~OS.WS_EX_CLIENTEDGE;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (hwnd == hwndText || hwnd == hwndUpDown) {
LRESULT result = null;
switch (msg) {
@@ -1236,30 +1236,30 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
super.WM_ERASEBKGND (wParam, lParam);
drawBackground (wParam);
return LRESULT.ONE;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
OS.SetFocus (hwndText);
OS.SendMessage (hwndText, OS.EM_SETSEL, 0, -1);
return null;
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
OS.SendMessage (hwndText, OS.WM_SETFONT, wParam, lParam);
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (isDisposed ()) return result;
int width = OS.LOWORD (lParam), height = OS.HIWORD (lParam);
@@ -1272,7 +1272,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmIMEChar(int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmIMEChar(long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/* Process a DBCS character */
Display display = this.display;
@@ -1291,7 +1291,7 @@ LRESULT wmIMEChar(int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
* them to the application.
*/
ignoreCharacter = true;
- int /*long*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
+ long /*int*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
MSG msg = new MSG ();
int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
while (OS.PeekMessage (msg, hwnd, OS.WM_CHAR, OS.WM_CHAR, flags)) {
@@ -1306,7 +1306,7 @@ LRESULT wmIMEChar(int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (result);
}
-LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmChar (hwnd, wParam, lParam);
if (result != null) return result;
@@ -1327,7 +1327,7 @@ LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
// if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -1377,11 +1377,11 @@ LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*
}
TCHAR buffer = new TCHAR (getCodePage (), newText, true);
if (msg == OS.WM_SETTEXT) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int /*long*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ long /*int*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return new LRESULT (code);
} else {
@@ -1393,7 +1393,7 @@ LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*
return null;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.EN_CHANGE:
@@ -1416,7 +1416,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
@@ -1461,7 +1461,7 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return result;
}
-LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKillFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
boolean [] parseFail = new boolean [1];
int value = getSelectionText (parseFail);
if (parseFail [0]) {
@@ -1475,7 +1475,7 @@ LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return super.wmKillFocus (hwnd, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.UDN_DELTAPOS:
NMUPDOWN lpnmud = new NMUPDOWN ();
@@ -1504,7 +1504,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.LOWORD (wParam);
switch (code) {
case OS.SB_THUMBPOSITION:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
index f469bcdd25..e1e8b9990a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
@@ -50,7 +50,7 @@ import org.eclipse.swt.events.*;
public class TabFolder extends Composite {
TabItem [] items;
ImageList imageList;
- static final int /*long*/ TabFolderProc;
+ static final long /*int*/ TabFolderProc;
static final TCHAR TabFolderClass = new TCHAR (0, OS.WC_TABCONTROL, true);
boolean createdAsRTL;
@@ -84,12 +84,12 @@ public class TabFolder extends Composite {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~(OS.CS_HREDRAW | OS.CS_VREDRAW | OS.CS_GLOBALCLASS);
int byteCount = TabFolderClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, TabFolderClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -162,7 +162,7 @@ public void addSelectionListener(SelectionListener listener) {
addListener(SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (TabFolderProc, hwnd, msg, wParam, lParam);
}
@@ -269,7 +269,7 @@ void createHandle () {
* is set. The fix is to set TTM_SETMAXTIPWIDTH to
* a large value.
*/
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
createdAsRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
@@ -307,7 +307,7 @@ void destroyItem (TabItem item) {
}
}
-void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
+void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
RECT rect2 = new RECT ();
OS.GetClientRect (handle, rect2);
OS.MapWindowPoints (handle, hwnd, rect2, 2);
@@ -467,7 +467,7 @@ int imageIndex (Image image) {
Rectangle bounds = image.getBounds ();
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = imageList.add (image);
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, hImageList);
return index;
}
@@ -750,7 +750,7 @@ String toolTipText (NMTTDISPINFO hdr) {
return null;
}
int index = (int)/*64*/hdr.idFrom;
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom) {
/*
* Bug in Windows. For some reason the reading order
@@ -793,7 +793,7 @@ boolean traversePage (boolean next) {
void updateOrientation () {
super.updateOrientation ();
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
TCHAR buffer = new TCHAR (0, 128);
OS.GetClassName (hwndChild, buffer, buffer.length ());
@@ -820,7 +820,7 @@ void updateOrientation () {
Point size = imageList.getImageSize ();
display.releaseImageList (imageList);
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, size.x, size.y);
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, hImageList);
TCITEM tcItem = new TCITEM ();
tcItem.mask = OS.TCIF_IMAGE;
@@ -854,11 +854,11 @@ TCHAR windowClass () {
return TabFolderClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return TabFolderProc;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
/*
* Return DLGC_BUTTON so that mnemonics will be
@@ -869,7 +869,7 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (OS.DLGC_BUTTON | OS.DLGC_WANTARROWS);
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for publishing the keyboard shortcut
@@ -879,7 +879,7 @@ LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -894,7 +894,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
*/
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
if (isRTL != createdAsRTL) {
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
return new LRESULT (code);
}
break;
@@ -902,7 +902,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
/*
@@ -919,7 +919,7 @@ LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, lpti) != 0) {
if ((lpti.uFlags & OS.TTF_IDISHWND) == 0) {
OS.SendMessage (hwndToolTip, OS.TTM_DELTOOL, 0, lpti);
@@ -930,7 +930,7 @@ LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -945,11 +945,11 @@ LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
* default window proc that returns HTCLIENT when
* the mouse is in the client area.
*/
- int /*long*/ hittest = OS.DefWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long /*int*/ hittest = OS.DefWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
return new LRESULT (hittest);
}
-LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the tab folder window
* proc processes WM_NOTIFY, it forwards this
@@ -973,7 +973,7 @@ LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PARENTNOTIFY (wParam, lParam);
if (result != null) return result;
/*
@@ -992,7 +992,7 @@ LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
switch (code) {
case OS.WM_CREATE: {
int id = OS.HIWORD (wParam);
- int /*long*/ hwnd = lParam;
+ long /*int*/ hwnd = lParam;
if (id == ID_UPDOWN) {
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
OS.SetWindowLong (hwnd, OS.GWL_EXSTYLE, bits | OS.WS_EX_LAYOUTRTL);
@@ -1004,7 +1004,7 @@ LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
/*
* It is possible (but unlikely), that application
@@ -1025,7 +1025,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (!OS.IsWindowVisible (handle)) return result;
@@ -1074,7 +1074,7 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
int code = hdr.code;
switch (code) {
case OS.TCN_SELCHANGE:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
index b3d441e71f..35f1845a52 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
@@ -132,11 +132,11 @@ void _setText (int index, String string) {
if (j < i) string = new String (text, 0, j);
}
}
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (parent.getCodePage (), string, true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
TCITEM tcItem = new TCITEM ();
tcItem.mask = OS.TCIF_TEXT;
@@ -302,7 +302,7 @@ public void setImage (Image image) {
if (OS.COMCTL32_MAJOR >= 6) {
if (text.indexOf ('&') != -1) _setText (index, text);
}
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TCITEM tcItem = new TCITEM ();
tcItem.mask = OS.TCIF_IMAGE;
tcItem.iImage = parent.imageIndex (image);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index 1f528b680b..751731cf82 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -79,12 +79,12 @@ public class Table extends Composite {
TableItem currentItem;
TableColumn sortColumn;
RECT focusRect;
- int /*long*/ headerToolTipHandle;
+ long /*int*/ headerToolTipHandle;
boolean ignoreCustomDraw, ignoreDrawForeground, ignoreDrawBackground, ignoreDrawFocus, ignoreDrawSelection, ignoreDrawHot;
boolean customDraw, dragStarted, explorerTheme, firstColumnImage, fixScrollWidth, tipRequested, wasSelected, wasResized, painted;
boolean ignoreActivate, ignoreSelect, ignoreShrink, ignoreResize, ignoreColumnMove, ignoreColumnResize, fullRowSelect;
int itemHeight, lastIndexOf, lastWidth, sortDirection, resizeCount, selectionForeground, hotIndex;
- static /*final*/ int /*long*/ HeaderProc;
+ static /*final*/ long /*int*/ HeaderProc;
static final int INSET = 4;
static final int GRID_WIDTH = 1;
static final int SORT_WIDTH = 10;
@@ -97,7 +97,7 @@ public class Table extends Composite {
static final int DRAG_IMAGE_SIZE = 301;
static final boolean EXPLORER_THEME = true;
static boolean COMPRESS_ITEMS = true;
- static final int /*long*/ TableProc;
+ static final long /*int*/ TableProc;
static final TCHAR TableClass = new TCHAR (0, OS.WC_LISTVIEW, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -426,11 +426,11 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
return callWindowProc (hwnd, msg, wParam, lParam, false);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam, boolean forceSelect) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam, boolean forceSelect) {
if (handle == 0) return 0;
if (handle != hwnd) {
return OS.CallWindowProc (HeaderProc, hwnd, msg, wParam, lParam);
@@ -520,7 +520,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
if (msg == OS.WM_PAINT) {
int bits0 = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits0 & OS.LVS_NOCOLUMNHEADER) == 0) {
- int /*long*/ hwndParent = OS.GetParent (handle), hwndOwner = 0;
+ long /*int*/ hwndParent = OS.GetParent (handle), hwndOwner = 0;
while (hwndParent != 0) {
int bits1 = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
if ((bits1 & OS.WS_EX_COMPOSITED) != 0) {
@@ -554,10 +554,10 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
}
}
}
- int /*long*/ code = 0;
+ long /*int*/ code = 0;
if (fixPaint) {
PAINTSTRUCT ps = new PAINTSTRUCT ();
- int /*long*/ hDC = OS.BeginPaint (hwnd, ps);
+ long /*int*/ hDC = OS.BeginPaint (hwnd, ps);
code = OS.CallWindowProc (TableProc, hwnd, OS.WM_PAINT, hDC, lParam);
OS.EndPaint (hwnd, ps);
} else {
@@ -600,7 +600,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
OS.InvalidateRect (handle, null, true);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.InvalidateRect (hwndHeader, null, true);
}
//FALL THROUGH
@@ -658,8 +658,8 @@ static int checkStyle (int style) {
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
-LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ hDC = nmcd.hdc;
+LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ hDC = nmcd.hdc;
if (explorerTheme && !ignoreCustomDraw) {
hotIndex = -1;
if (hooks (SWT.EraseItem) && nmcd.left != nmcd.right) {
@@ -694,7 +694,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
boolean oldIgnore = ignoreCustomDraw;
ignoreCustomDraw = true;
OS.SendMessage (handle, OS. LVM_GETITEMRECT, nmcd.dwItemSpec, rect);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
RECT itemRect = new RECT ();
if (index == 0) {
@@ -719,7 +719,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
return null;
}
-LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When the table has the extended style
* LVS_EX_FULLROWSELECT and LVM_SETBKCOLOR is used with
@@ -751,7 +751,7 @@ LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
hotIndex = (nmcd.uItemState & OS.CDIS_HOT) != 0 ? (int)/*64*/nmcd.dwItemSpec : -1;
if (hooks (SWT.EraseItem) && nmcd.left != nmcd.right) {
OS.SaveDC (nmcd.hdc);
- int /*long*/ hrgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ hrgn = OS.CreateRectRgn (0, 0, 0, 0);
OS.SelectClipRgn (nmcd.hdc, hrgn);
OS.DeleteObject (hrgn);
}
@@ -759,7 +759,7 @@ LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
return new LRESULT (OS.CDRF_NOTIFYSUBITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCustomDraw) return null;
/*
* Bug in Windows. When the table has the extended style
@@ -781,7 +781,7 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
* has a tooltip, the tooltip is hidden. The fix is to clear
* the tooltip before setting the bits and then reset it.
*/
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
if (OS.IsWinCE) {
RECT rect = new RECT ();
boolean damaged = OS.GetUpdateRect (handle, rect, true);
@@ -789,7 +789,7 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
OS.ValidateRect (handle, null);
if (damaged) OS.InvalidateRect (handle, rect, true);
} else {
- int /*long*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, bits, bits);
OS.ValidateRect (handle, null);
@@ -809,7 +809,7 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
return null;
}
-LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCustomDraw) {
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
@@ -833,7 +833,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
* has a tooltip, the tooltip is hidden. The fix is to clear
* the tooltip before setting the bits and then reset it.
*/
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
if (OS.IsWinCE) {
RECT rect = new RECT ();
boolean damaged = OS.GetUpdateRect (handle, rect, true);
@@ -841,7 +841,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
OS.ValidateRect (handle, null);
if (damaged) OS.InvalidateRect (handle, rect, true);
} else {
- int /*long*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, bits, 0);
OS.ValidateRect (handle, null);
@@ -867,7 +867,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
* The fix is to draw the background using custom draw.
*/
if (explorerTheme && columnCount == 0) {
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
RECT rect = new RECT ();
OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
if (OS.IsWindowEnabled (handle) || findImageControl () != null) {
@@ -898,7 +898,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
int clrSortBk = getSortColumnPixel ();
RECT columnRect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (handle, columnRect);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect) != 0) {
OS.MapWindowPoints (hwndHeader, handle, headerRect, 2);
columnRect.left = headerRect.left;
@@ -918,10 +918,10 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCustomDraw) return null;
if (nmcd.left == nmcd.right) return new LRESULT (OS.CDRF_DODEFAULT);
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
if (ignoreDrawForeground) OS.RestoreDC (hDC, -1);
if (OS.IsWindowVisible (handle)) {
/*
@@ -937,7 +937,7 @@ LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*l
if (oldColumn == -1) {
int newColumn = indexOf (sortColumn);
int result = 0;
- int /*long*/ rgn = 0;
+ long /*int*/ rgn = 0;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
rgn = OS.CreateRectRgn (0, 0, 0, 0);
result = OS.GetUpdateRgn (handle, rgn, true);
@@ -967,8 +967,8 @@ LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*l
return null;
}
-LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ hDC = nmcd.hdc;
+LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ hDC = nmcd.hdc;
if (explorerTheme && !ignoreCustomDraw && hooks (SWT.EraseItem) && (nmcd.left != nmcd.right)) {
OS.RestoreDC (hDC, -1);
}
@@ -984,7 +984,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo
*/
TableItem item = _getItem ((int)/*64*/nmcd.dwItemSpec);
if (item == null || item.isDisposed ()) return null;
- int /*long*/ hFont = item.fontHandle (nmcd.iSubItem);
+ long /*int*/ hFont = item.fontHandle (nmcd.iSubItem);
if (hFont != -1) OS.SelectObject (hDC, hFont);
if (ignoreCustomDraw || (nmcd.left == nmcd.right)) {
return new LRESULT (hFont == -1 ? OS.CDRF_DODEFAULT : OS.CDRF_NEWFONT);
@@ -1031,7 +1031,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
if ((result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0)) {
int clrSelection = -1;
if (nmcd.iSubItem == 0) {
@@ -1071,7 +1071,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo
boolean hasAttributes = true;
if (hFont == -1 && clrText == -1 && clrTextBk == -1) {
if (item.cellForeground == null && item.cellBackground == null && item.cellFont == null) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (count == 1) hasAttributes = false;
}
@@ -1111,7 +1111,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo
int oldColumn = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
if (oldColumn != -1 && oldColumn == nmcd.iSubItem) {
int result = 0;
- int /*long*/ rgn = 0;
+ long /*int*/ rgn = 0;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
rgn = OS.CreateRectRgn (0, 0, 0, 0);
result = OS.GetUpdateRgn (handle, rgn, true);
@@ -1176,7 +1176,7 @@ boolean checkData (TableItem item, int index, boolean redraw) {
return true;
}
-boolean checkHandle (int /*long*/ hwnd) {
+boolean checkHandle (long /*int*/ hwnd) {
if (hwnd == handle) return true;
return hwnd == OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
}
@@ -1469,7 +1469,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
// OS.ReleaseDC (handle, hDC);
// }
// }
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
int height = rect.bottom - rect.top;
@@ -1484,10 +1484,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
}
bits |= width & 0xFFFF;
}
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, -1, OS.MAKELPARAM (bits, 0xFFFF));
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, -1, OS.MAKELPARAM (bits, 0xFFFF));
int width = OS.LOWORD (result);
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
height += (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0) * itemHeight;
if (width == 0) width = DEFAULT_WIDTH;
@@ -1519,7 +1519,7 @@ void createHandle () {
/* Get the header window proc */
if (HeaderProc == 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
HeaderProc = OS.GetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC);
}
@@ -1549,8 +1549,8 @@ void createHandle () {
/* Set the checkbox image list */
if ((style & SWT.CHECK) != 0) {
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int width = OS.HIWORD (oneItem) - OS.HIWORD (empty), height = width;
setCheckboxImageList (width, height, false);
OS.SendMessage (handle, OS. LVM_SETCALLBACKMASK, OS.LVIS_STATEIMAGEMASK, 0);
@@ -1568,7 +1568,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
/*
@@ -1580,8 +1580,8 @@ void createHandle () {
*/
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_WIDTH;
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
lvColumn.pszText = pszText;
OS.SendMessage (handle, OS.LVM_INSERTCOLUMN, 0, lvColumn);
OS.HeapFree (hHeap, 0, pszText);
@@ -1604,10 +1604,10 @@ void createHandle () {
*/
if (OS.WIN32_VERSION >= OS.VERSION (4, 10)) {
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
int bits2 = OS.GetWindowLong (hwndHeader, OS.GWL_EXSTYLE);
OS.SetWindowLong (hwndHeader, OS.GWL_EXSTYLE, bits2 | OS.WS_EX_LAYOUTRTL);
- int /*long*/ hwndTooltop = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndTooltop = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
int bits3 = OS.GetWindowLong (hwndTooltop, OS.GWL_EXSTYLE);
OS.SetWindowLong (hwndTooltop, OS.GWL_EXSTYLE, bits3 | OS.WS_EX_LAYOUTRTL);
}
@@ -1734,9 +1734,9 @@ void createItem (TableColumn column, int index) {
OS.SendMessage (handle, OS.LVM_GETCOLUMN, 1, lvColumn);
int width = lvColumn.cx;
int cchTextMax = 1024;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = cchTextMax * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_IMAGE | OS.LVCF_WIDTH | OS.LVCF_FMT;
lvColumn.pszText = pszText;
lvColumn.cchTextMax = cchTextMax;
@@ -1789,7 +1789,7 @@ void createItem (TableColumn column, int index) {
/* Add the tool tip item for the header */
if (headerToolTipHandle != 0) {
RECT rect = new RECT ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, rect) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -1852,7 +1852,7 @@ int defaultBackground () {
void deregister () {
super.deregister ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) display.removeControl (hwndHeader);
}
@@ -2008,9 +2008,9 @@ void destroyItem (TableColumn column) {
if (columnCount > 1) {
index = 1;
int cchTextMax = 1024;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = cchTextMax * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_IMAGE | OS.LVCF_WIDTH | OS.LVCF_FMT;
lvColumn.pszText = pszText;
@@ -2021,8 +2021,8 @@ void destroyItem (TableColumn column) {
OS.SendMessage (handle, OS.LVM_SETCOLUMN, 0, lvColumn);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
} else {
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_IMAGE | OS.LVCF_WIDTH | OS.LVCF_FMT;
lvColumn.pszText = pszText;
@@ -2034,7 +2034,7 @@ void destroyItem (TableColumn column) {
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT;
hdItem.fmt = OS.HDF_LEFT;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
}
}
@@ -2198,7 +2198,7 @@ void destroyItem (TableItem item) {
if (index == count) return;
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
_removeItem (index, count);
@@ -2215,11 +2215,11 @@ void fixCheckboxImageList (boolean fixScroll) {
* the state image list to be the same size as the image list.
*/
if ((style & SWT.CHECK) == 0) return;
- int /*long*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hImageList == 0) return;
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hImageList, cx, cy);
- int /*long*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList == 0) return;
int [] stateCx = new int [1], stateCy = new int [1];
OS.ImageList_GetIconSize (hStateList, stateCx, stateCy);
@@ -2229,7 +2229,7 @@ void fixCheckboxImageList (boolean fixScroll) {
void fixCheckboxImageListColor (boolean fixScroll) {
if ((style & SWT.CHECK) == 0) return;
- int /*long*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList == 0) return;
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hStateList, cx, cy);
@@ -2268,18 +2268,18 @@ void fixItemHeight (boolean fixScroll) {
setRedraw (false);
setTopIndex (0);
}
- int /*long*/ hOldList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ hOldList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hOldList != 0) return;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
int height = rect.bottom - rect.top - 1;
- int /*long*/ hImageList = OS.ImageList_Create (1, height, 0, 0, 0);
+ long /*int*/ hImageList = OS.ImageList_Create (1, height, 0, 0, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
fixCheckboxImageList (false);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, 0);
if (headerImageList != null) {
- int /*long*/ hHeaderImageList = headerImageList.getHandle ();
+ long /*int*/ hHeaderImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
OS.ImageList_Destroy (hImageList);
@@ -2445,7 +2445,7 @@ public int getGridLineWidth () {
*/
public int getHeaderHeight () {
checkWidget ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader == 0) return 0;
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
@@ -2540,7 +2540,7 @@ public TableItem getItem (Point point) {
RECT rect = new RECT ();
rect.left = OS.LVIR_ICON;
ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
ignoreCustomDraw = false;
if (code != 0) {
pinfo.x = rect.left;
@@ -2575,7 +2575,7 @@ public TableItem getItem (Point point) {
if (pinfo.iItem == 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.LVS_NOCOLUMNHEADER) == 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) {
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
@@ -2621,8 +2621,8 @@ public int getItemCount () {
public int getItemHeight () {
checkWidget ();
if (!painted && hooks (SWT.MeasureItem)) hitTestSelection (0, 0, 0);
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
return OS.HIWORD (oneItem) - OS.HIWORD (empty);
}
@@ -2853,8 +2853,8 @@ public int getTopIndex () {
}
boolean hasChildren () {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
if (hwndChild != hwndHeader) return true;
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -2869,10 +2869,10 @@ boolean hitTestSelection (int index, int x, int y) {
boolean result = false;
if (0 <= index && index < count) {
TableItem item = _getItem (index);
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int /*long*/ hFont = item.fontHandle (0);
+ long /*int*/ hFont = item.fontHandle (0);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
Event event = sendMeasureItemEvent (item, index, 0, hDC);
if (event.getBounds ().contains (x, y)) result = true;
@@ -2896,7 +2896,7 @@ int imageIndex (Image image, int column) {
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = imageList.indexOf (image);
if (index == -1) index = imageList.add (image);
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
/*
* Bug in Windows. Making any change to an item that
* changes the item height of a table while the table
@@ -2913,8 +2913,8 @@ int imageIndex (Image image, int column) {
}
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
if (headerImageList != null) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int /*long*/ hHeaderImageList = headerImageList.getHandle ();
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hHeaderImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
fixCheckboxImageList (false);
@@ -2937,8 +2937,8 @@ int imageIndexHeader (Image image) {
headerImageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = headerImageList.indexOf (image);
if (index == -1) index = headerImageList.add (image);
- int /*long*/ hImageList = headerImageList.getHandle ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hImageList = headerImageList.getHandle ();
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageList);
return index;
}
@@ -3046,13 +3046,13 @@ public boolean isSelected (int index) {
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = index;
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
return (result != 0) && ((lvItem.state & OS.LVIS_SELECTED) != 0);
}
void register () {
super.register ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) display.addControl (hwndHeader, this);
}
@@ -3118,12 +3118,12 @@ void releaseWidget () {
display.releaseImageList (imageList);
}
if (headerImageList != null) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, 0);
display.releaseImageList (headerImageList);
}
imageList = headerImageList = null;
- int /*long*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList != 0) OS.ImageList_Destroy (hStateList);
if (headerToolTipHandle != 0) OS.DestroyWindow (headerToolTipHandle);
@@ -3165,7 +3165,7 @@ public void remove (int [] indices) {
TableItem item = _getItem (index, false);
if (item != null && !item.isDisposed ()) item.release (false);
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
_removeItem(index, count);
@@ -3199,7 +3199,7 @@ public void remove (int index) {
if (item != null && !item.isDisposed ()) item.release (false);
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
_removeItem (index, count);
@@ -3240,7 +3240,7 @@ public void remove (int start, int end) {
TableItem item = _getItem (index, false);
if (item != null && !item.isDisposed ()) item.release (false);
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, start, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, start, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
index++;
@@ -3293,7 +3293,7 @@ public void removeAll () {
int index = itemCount - 1;
while (index >= 0) {
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
--index;
@@ -3312,7 +3312,7 @@ public void removeAll () {
if (index != -1) error (SWT.ERROR_ITEM_NOT_REMOVED);
} else {
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEALLITEMS, 0, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEALLITEMS, 0, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
}
@@ -3504,8 +3504,8 @@ public void selectAll () {
ignoreSelect = false;
}
-void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lParam, Event measureEvent) {
- int /*long*/ hDC = nmcd.hdc;
+void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long /*int*/ lParam, Event measureEvent) {
+ long /*int*/ hDC = nmcd.hdc;
int clrText = item.cellForeground != null ? item.cellForeground [nmcd.iSubItem] : -1;
if (clrText == -1) clrText = item.foreground;
int clrTextBk = -1;
@@ -3529,7 +3529,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lPara
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
boolean selected = (result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0);
GCData data = new GCData ();
data.device = display;
@@ -3634,7 +3634,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lPara
OS.MoveMemory (lParam, nmcd, NMLVCUSTOMDRAW.sizeof);
}
}
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean firstColumn = nmcd.iSubItem == OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
if (ignoreDrawForeground && ignoreDrawHot && !drawDrophilited) {
if (!ignoreDrawBackground && drawBackground) {
@@ -3679,7 +3679,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lPara
rect.right += EXPLORER_EXTRA;
pClipRect.right += EXPLORER_EXTRA;
}
- int /*long*/ hTheme = OS.OpenThemeData (handle, Display.LISTVIEW);
+ long /*int*/ hTheme = OS.OpenThemeData (handle, Display.LISTVIEW);
int iStateId = selected ? OS.LISS_SELECTED : OS.LISS_HOT;
if (OS.GetFocus () != handle && selected && !drawHot) iStateId = OS.LISS_SELECTEDNOTFOCUS;
if (drawDrophilited) iStateId = OS.LISS_SELECTED;
@@ -3731,7 +3731,7 @@ Event sendEraseItemEvent (TableItem item, NMTTCUSTOMDRAW nmcd, int column, RECT
return event;
}
-Event sendMeasureItemEvent (TableItem item, int row, int column, int /*long*/ hDC) {
+Event sendMeasureItemEvent (TableItem item, int row, int column, long /*int*/ hDC) {
GCData data = new GCData ();
data.device = display;
data.font = item.getFont (column);
@@ -3752,7 +3752,7 @@ Event sendMeasureItemEvent (TableItem item, int row, int column, int /*long*/ hD
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = (int)/*64*/row;
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
boolean selected = (result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0);
if (selected && (column == 0 || (style & SWT.FULL_SELECTION) != 0)) {
if (OS.GetFocus () == handle || display.getHighContrast ()) {
@@ -3772,15 +3772,15 @@ Event sendMeasureItemEvent (TableItem item, int row, int column, int /*long*/ hD
int width = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
if (event.x + event.width > width) setScrollWidth (event.x + event.width);
}
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
if (event.height > itemHeight) setItemHeight (event.height);
}
return event;
}
-LRESULT sendMouseDownEvent (int type, int button, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT sendMouseDownEvent (int type, int button, int msg, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
display.captureChanged = false;
if (!sendMouseEvent (type, button, handle, msg, wParam, lParam)) {
@@ -3820,7 +3820,7 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, int /*long*/ wParam,
RECT rect = new RECT ();
rect.left = OS.LVIR_ICON;
ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
ignoreCustomDraw = false;
if (code != 0) {
pinfo.x = rect.left;
@@ -3931,7 +3931,7 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, int /*long*/ wParam,
dragStarted = false;
display.dragCancelled = false;
if (!dragDetect) display.runDragDrop = false;
- int /*long*/ code = callWindowProc (handle, msg, wParam, lParam, forceSelect);
+ long /*int*/ code = callWindowProc (handle, msg, wParam, lParam, forceSelect);
if (!dragDetect) display.runDragDrop = true;
if (fullRowSelect) {
fullRowSelect = false;
@@ -3957,7 +3957,7 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, int /*long*/ wParam,
}
void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
GCData data = new GCData ();
data.device = display;
data.font = item.getFont (nmcd.iSubItem);
@@ -3970,7 +3970,7 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
boolean selected = result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0;
boolean drawSelected = false, drawBackground = false, drawHot = false;
if (nmcd.iSubItem == 0 || (style & SWT.FULL_SELECTION) != 0) {
@@ -4086,7 +4086,7 @@ Event sendPaintItemEvent (TableItem item, NMTTCUSTOMDRAW nmcd, int column, RECT
return event;
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
super.setBackgroundImage (hBitmap);
if (hBitmap != 0) {
setBackgroundTransparent (true);
@@ -4249,7 +4249,7 @@ void setBounds (int x, int y, int width, int height, int flags, boolean defer) {
public void setColumnOrder (int [] order) {
checkWidget ();
if (order == null) error (SWT.ERROR_NULL_ARGUMENT);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (columnCount == 0) {
if (order.length != 0) error (SWT.ERROR_INVALID_ARGUMENT);
return;
@@ -4327,7 +4327,7 @@ void setDeferResize (boolean defer) {
OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
if (OS.IsWinCE) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.InvalidateRect (hwndHeader, null, true);
OS.InvalidateRect (handle, null, true);
} else {
@@ -4357,7 +4357,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
if (OS.IsWinCE) {
flags |= OS.ILC_COLOR;
} else {
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ hDC = OS.GetDC (handle);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
OS.ReleaseDC (handle, hDC);
@@ -4373,11 +4373,11 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
}
if ((style & SWT.RIGHT_TO_LEFT) != 0) flags |= OS.ILC_MIRROR;
if (OS.COMCTL32_MAJOR < 6 || !OS.IsAppThemed ()) flags |= OS.ILC_MASK;
- int /*long*/ hStateList = OS.ImageList_Create (width, height, flags, count, count);
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ memDC = OS.CreateCompatibleDC (hDC);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
- int /*long*/ hOldBitmap = OS.SelectObject (memDC, hBitmap);
+ long /*int*/ hStateList = OS.ImageList_Create (width, height, flags, count, count);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ memDC = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
+ long /*int*/ hOldBitmap = OS.SelectObject (memDC, hBitmap);
RECT rect = new RECT ();
OS.SetRect (rect, 0, 0, width * count, height);
int clrBackground;
@@ -4391,10 +4391,10 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
clrBackground = 0x0200FF00;
}
}
- int /*long*/ hBrush = OS.CreateSolidBrush (clrBackground);
+ long /*int*/ hBrush = OS.CreateSolidBrush (clrBackground);
OS.FillRect (memDC, rect, hBrush);
OS.DeleteObject (hBrush);
- int /*long*/ oldFont = OS.SelectObject (hDC, defaultFont ());
+ long /*int*/ oldFont = OS.SelectObject (hDC, defaultFont ());
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
OS.GetTextMetrics (hDC, tm);
OS.SelectObject (hDC, oldFont);
@@ -4403,7 +4403,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
int left = (width - itemWidth) / 2, top = (height - itemHeight) / 2 + 1;
OS.SetRect (rect, left, top, left + itemWidth, top + itemHeight);
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
- int /*long*/ hTheme = display.hButtonTheme ();
+ long /*int*/ hTheme = display.hButtonTheme ();
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_UNCHECKEDNORMAL, rect, null);
rect.left += width; rect.right += width;
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_CHECKEDNORMAL, rect, null);
@@ -4459,7 +4459,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
setRedraw (false);
setTopIndex (0);
}
- int /*long*/ hOldStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hOldStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_STATE, hStateList);
if (hOldStateList != 0) OS.ImageList_Destroy (hOldStateList);
/*
@@ -4469,7 +4469,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
* LVSIL_SMALL image list.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int /*long*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
}
if (fixScroll && topIndex != 0) {
@@ -4530,7 +4530,7 @@ public void setFont (Font font) {
* to be redrawn but not the column headers. The fix is
* to force a redraw of the column headers.
*/
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.InvalidateRect (hwndHeader, null, true);
}
@@ -4632,7 +4632,7 @@ public void setItemCount (int count) {
if (item != null && !item.isDisposed ()) item.release (false);
if (!isVirtual) {
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, count, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, count, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
}
@@ -4685,7 +4685,7 @@ void setItemHeight (boolean fixScroll) {
* WM_SETFONT which recomputes and assigns the default item
* height.
*/
- int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
} else {
/*
@@ -4806,7 +4806,7 @@ public void setRedraw (boolean redraw) {
*/
setDeferResize (true);
OS.SendMessage (handle, OS.WM_SETREDRAW, 1, 0);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.SendMessage (hwndHeader, OS.WM_SETREDRAW, 1, 0);
if ((state & HIDDEN) != 0) {
state &= ~HIDDEN;
@@ -4827,7 +4827,7 @@ public void setRedraw (boolean redraw) {
} else {
if (drawCount++ == 0) {
OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.SendMessage (hwndHeader, OS.WM_SETREDRAW, 0, 0);
/*
@@ -4867,7 +4867,7 @@ void setScrollWidth (int width) {
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
if (OS.IsWinCE) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.InvalidateRect (hwndHeader, null, true);
OS.InvalidateRect (handle, null, true);
} else {
@@ -4898,7 +4898,7 @@ boolean setScrollWidth (TableItem item, boolean force) {
int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
while (index < itemCount) {
String string = null;
- int /*long*/ hFont = -1;
+ long /*int*/ hFont = -1;
if (item != null) {
string = item.text;
imageIndent = Math.max (imageIndent, item.imageIndent);
@@ -4913,8 +4913,8 @@ boolean setScrollWidth (TableItem item, boolean force) {
}
if (string != null && string.length () != 0) {
if (hFont != -1) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldFont = OS.SelectObject (hDC, hFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
TCHAR buffer = new TCHAR (getCodePage (), string, false);
RECT rect = new RECT ();
@@ -4944,13 +4944,13 @@ boolean setScrollWidth (TableItem item, boolean force) {
TCHAR buffer = new TCHAR (getCodePage (), " ", true);
newWidth = Math.max (newWidth, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));
}
- int /*long*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hStateList, cx, cy);
newWidth += cx [0] + INSET;
}
- int /*long*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hImageList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hImageList, cx, cy);
@@ -5213,12 +5213,12 @@ void setTableEmpty () {
* Windows to reserve the smallest possible space when an image
* list is removed.
*/
- int /*long*/ hImageList = OS.ImageList_Create (1, 1, 0, 0, 0);
+ long /*int*/ hImageList = OS.ImageList_Create (1, 1, 0, 0, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, 0);
if (headerImageList != null) {
- int /*long*/ hHeaderImageList = headerImageList.getHandle ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hHeaderImageList = headerImageList.getHandle ();
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
OS.ImageList_Destroy (hImageList);
@@ -5504,7 +5504,7 @@ public void showSelection () {
void subclass () {
super.subclass ();
if (HeaderProc != 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, display.windowProc);
}
}
@@ -5523,7 +5523,7 @@ RECT toolTipRect (RECT rect) {
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
OS.SetRect (toolRect, rect.left - 1, rect.top - 1, rect.right + 1, rect.bottom + 1);
} else {
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
OS.SetRect (toolRect, rect.left, rect.top, rect.right, rect.bottom);
int dwStyle = OS.GetWindowLong (hwndToolTip, OS.GWL_STYLE);
int dwExStyle = OS.GetWindowLong (hwndToolTip, OS.GWL_EXSTYLE);
@@ -5533,7 +5533,7 @@ RECT toolTipRect (RECT rect) {
}
String toolTipText (NMTTDISPINFO hdr) {
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom && toolTipText != null) return ""; //$NON-NLS-1$
if (headerToolTipHandle == hdr.hwndFrom) {
for (int i=0; i<columnCount; i++) {
@@ -5547,7 +5547,7 @@ String toolTipText (NMTTDISPINFO hdr) {
void unsubclass () {
super.unsubclass ();
if (HeaderProc != 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
}
@@ -5565,8 +5565,8 @@ void update (boolean all) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
@@ -5581,7 +5581,7 @@ void update (boolean all) {
void updateHeaderToolTips () {
if (headerToolTipHandle == 0) return;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -5646,7 +5646,7 @@ void updateMoveable () {
void updateOrientation () {
super.updateOrientation ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) {
int bits = OS.GetWindowLong (hwndHeader, OS.GWL_EXSTYLE);
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
@@ -5678,7 +5678,7 @@ void updateOrientation () {
}
}
}
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
}
if (hwndHeader != 0) {
@@ -5719,7 +5719,7 @@ void updateOrientation () {
}
}
}
- int /*long*/ hHeaderImageList = headerImageList.getHandle ();
+ long /*int*/ hHeaderImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
}
@@ -5744,11 +5744,11 @@ TCHAR windowClass () {
return TableClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return TableProc;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd != handle) {
switch (msg) {
@@ -5773,7 +5773,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
*/
if (OS.COMCTL32_MAJOR < 6) {
if (lParam != 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (lParam != hwndHeader) OS.InvalidateRect (hwndHeader, null, true);
}
}
@@ -5814,7 +5814,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
OS.ScreenToClient (hwnd, pt);
pinfo.x = pt.x;
pinfo.y = pt.y;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_HITTEST, 0, pinfo);
if (0 <= index && index < columnCount && !columns [index].resizable) {
if ((pinfo.flags & (OS.HHT_ONDIVIDER | OS.HHT_ONDIVOPEN)) != 0) {
@@ -5860,12 +5860,12 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
rect.left = Math.max (clientRect.left, rect.right - width);
}
}
- int /*long*/ hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long /*int*/ hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
while ((selection = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, selection, OS.LVNI_SELECTED)) != -1) {
if (rect.bottom - rect.top > DRAG_IMAGE_SIZE) break;
if (rect.bottom > clientRect.bottom) break;
RECT itemRect = item.getBounds (selection, 0, true, true, true);
- int /*long*/ rectRgn = OS.CreateRectRgn (rect.left, itemRect.top, rect.right, itemRect.bottom);
+ long /*int*/ rectRgn = OS.CreateRectRgn (rect.left, itemRect.top, rect.right, itemRect.bottom);
OS.CombineRgn (hRgn, hRgn, rectRgn, OS.RGN_OR);
OS.DeleteObject (rectRgn);
rect.bottom = itemRect.bottom;
@@ -5873,8 +5873,8 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
OS.GetRgnBox (hRgn, rect);
/* Create resources */
- int /*long*/ hdc = OS.GetDC (handle);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (handle);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = rect.right - rect.left;
@@ -5884,10 +5884,10 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
int colorKey = 0x0000FD;
POINT pt = new POINT();
OS.SetWindowOrgEx (memHdc, rect.left, rect.top, pt);
@@ -5918,7 +5918,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -5939,7 +5939,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
* This allows the application to cancel an operation that is normally
* performed in WM_KEYDOWN from WM_CHAR.
*/
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
return new LRESULT (code);
case SWT.CR:
/*
@@ -5960,7 +5960,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_CONTEXTMENU (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CONTEXTMENU (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. For some reason, when the right
* mouse button is pressed over an item, Windows sends
@@ -5977,7 +5977,7 @@ LRESULT WM_CONTEXTMENU (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_CONTEXTMENU (wParam, lParam);
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (findImageControl () != null) return LRESULT.ONE;
if (!OS.IsWinCE && OS.COMCTL32_MAJOR < 6) {
@@ -5989,7 +5989,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for checked item accessibility is
@@ -6001,7 +6001,7 @@ LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -6047,14 +6047,14 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
oldHeaderProc = OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
result = code == 0 ? LRESULT.ZERO : new LRESULT (code);
if (fixSubclass) {
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldTableProc);
@@ -6069,7 +6069,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
/*
* Bug in Windows. When focus is lost, Windows does not
@@ -6083,7 +6083,7 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the user selects outside of
@@ -6131,7 +6131,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. For some reason, capturing
* the mouse after processing the mouse event for the
@@ -6167,7 +6167,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEHOVER (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEHOVER (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Despite the fact that hot
* tracking is not enabled, the hot tracking code
@@ -6182,7 +6182,7 @@ LRESULT WM_MOUSEHOVER (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
_checkShrink();
if (fixScrollWidth) setScrollWidth (null, true);
if (!OS.IsWinCE && OS.COMCTL32_MAJOR < 6) {
@@ -6190,7 +6190,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_DOUBLEBUFFER) == 0) {
GC gc = null;
- int /*long*/ paintDC = 0;
+ long /*int*/ paintDC = 0;
PAINTSTRUCT ps = new PAINTSTRUCT ();
boolean hooksPaint = hooks (SWT.Paint) || filters (SWT.Paint);
if (hooksPaint) {
@@ -6205,12 +6205,12 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int /*long*/ hDC = OS.CreateCompatibleDC (paintDC);
+ long /*int*/ hDC = OS.CreateCompatibleDC (paintDC);
POINT lpPoint1 = new POINT (), lpPoint2 = new POINT ();
OS.SetWindowOrgEx (hDC, ps.left, ps.top, lpPoint1);
OS.SetBrushOrgEx (hDC, ps.left, ps.top, lpPoint2);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
- int /*long*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
+ long /*int*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
@@ -6247,7 +6247,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_PAINT (wParam, lParam);
}
-LRESULT WM_RBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the user selects outside of
* a table item, Windows deselects all the items, even
@@ -6271,7 +6271,7 @@ LRESULT WM_RBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. For some reason, capturing
* the mouse after processing the mouse event for the
@@ -6282,7 +6282,7 @@ LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return sendMouseDownEvent (SWT.MouseDown, 3, OS.WM_RBUTTONDOWN, wParam, lParam);
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
/*
* Bug in Windows. When focus is gained after the
@@ -6317,7 +6317,7 @@ LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
@@ -6332,7 +6332,7 @@ LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
* the header so that all that is necessary here is to
* set the default first.
*/
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.WM_SETFONT, 0, lParam);
if (headerToolTipHandle != 0) {
@@ -6341,7 +6341,7 @@ LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -6364,7 +6364,7 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
* which stops all graphics output to the control.
*/
OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
- int /*long*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
if (wParam == 0) {
if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, 0xFFFFFF);
@@ -6373,7 +6373,7 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
return code == 0 ? LRESULT.ZERO : new LRESULT (code);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreResize) return null;
if (hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
OS.InvalidateRect (handle, null, true);
@@ -6385,7 +6385,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SIZE (wParam, lParam);
}
-LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
if (findBackgroundControl () == null) {
@@ -6401,7 +6401,7 @@ LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When a table that is drawing grid lines
* is slowly scrolled horizontally to the left, the table does
@@ -6430,8 +6430,8 @@ LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
@@ -6517,7 +6517,7 @@ LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
/*
* When there are many columns in a table, scrolling performance
* can be improved by temporarily unsubclassing the window proc
@@ -6529,8 +6529,8 @@ LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
@@ -6617,8 +6617,8 @@ LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
RECT clientRect = new RECT ();
OS.GetClientRect (handle, clientRect);
clientRect.top += headerHeight;
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
if (code == OS.SB_LINEDOWN) {
clientRect.top = clientRect.bottom - itemHeight - GRID_WIDTH;
@@ -6636,12 +6636,12 @@ LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
if (itemHeight == -1) {
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
struct.itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
} else {
struct.itemHeight = itemHeight;
@@ -6650,13 +6650,13 @@ LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
if (hdr.hwndFrom == hwndToolTip) {
LRESULT result = wmNotifyToolTip (hdr, wParam, lParam);
if (result != null) return result;
}
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hdr.hwndFrom == hwndHeader) {
LRESULT result = wmNotifyHeader (hdr, wParam, lParam);
if (result != null) return result;
@@ -6664,7 +6664,7 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotify (hdr, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.LVN_ODFINDITEMA:
case OS.LVN_ODFINDITEMW: {
@@ -6731,7 +6731,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
RECT rect = new RECT ();
rect.left = OS.LVIR_BOUNDS;
ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (handle, OS. LVM_GETITEMRECT, plvfi.iItem, rect);
+ long /*int*/ code = OS.SendMessage (handle, OS. LVM_GETITEMRECT, plvfi.iItem, rect);
ignoreCustomDraw = false;
if (code != 0) OS.InvalidateRect (handle, rect, true);
break;
@@ -6838,7 +6838,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
break;
}
case OS.NM_CUSTOMDRAW: {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hdr.hwndFrom == hwndHeader) break;
if (!customDraw && findImageControl () == null) {
/*
@@ -6931,7 +6931,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
}
}
if (hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (count != 0) {
forceResize ();
@@ -6988,7 +6988,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. On NT, the automatically created
* header control is created as a UNICODE window, not an
@@ -7169,7 +7169,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsWinCE) return null;
switch (hdr.code) {
case OS.NM_CUSTOMDRAW: {
@@ -7187,7 +7187,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.wmNotify (hdr, wParam, lParam);
if (result != null) return result;
if (hdr.code != OS.TTN_SHOW) tipRequested = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_NOTIFY, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_NOTIFY, wParam, lParam);
if (hdr.code != OS.TTN_SHOW) tipRequested = false;
if (toolTipText != null) break;
if (isCustomToolTip ()) {
@@ -7206,10 +7206,10 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
*/
if (OS.SendMessage (handle, OS.LVM_SUBITEMHITTEST, 0, pinfo) >= 0) {
TableItem item = _getItem (pinfo.iItem);
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int /*long*/ hFont = item.fontHandle (pinfo.iSubItem);
+ long /*int*/ hFont = item.fontHandle (pinfo.iSubItem);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
Event event = sendMeasureItemEvent (item, pinfo.iItem, pinfo.iSubItem, hDC);
if (!isDisposed () && !item.isDisposed ()) {
@@ -7218,7 +7218,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
if (hdr.code == OS.TTN_SHOW) {
RECT toolRect = toolTipRect (itemRect);
OS.MapWindowPoints (handle, 0, toolRect, 2);
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOZORDER;
int width = toolRect.right - toolRect.left, height = toolRect.bottom - toolRect.top;
SetWindowPos (hwndToolTip, 0, toolRect.left , toolRect.top, width, height, flags);
@@ -7280,7 +7280,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, int /*long*/ lParam) {
+LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long /*int*/ lParam) {
if (OS.IsWinCE) return null;
switch (nmcd.dwDrawStage) {
case OS.CDDS_PREPAINT: {
@@ -7308,10 +7308,10 @@ LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, int /*long*/ lParam) {
*/
if (OS.SendMessage (handle, OS.LVM_SUBITEMHITTEST, 0, pinfo) >= 0) {
TableItem item = _getItem (pinfo.iItem);
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ hFont = item.fontHandle (pinfo.iSubItem);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ hFont = item.fontHandle (pinfo.iSubItem);
if (hFont == -1) hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- int /*long*/ oldFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ oldFont = OS.SelectObject (hDC, hFont);
boolean drawForeground = true;
RECT cellRect = item.getBounds (pinfo.iItem, pinfo.iSubItem, true, true, false, false, hDC);
if (hooks (SWT.EraseItem)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
index f9ce520915..735d2d9aa3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
@@ -308,7 +308,7 @@ public int getWidth () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return 0;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
return (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
}
@@ -327,7 +327,7 @@ public void pack () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int oldWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
TCHAR buffer = new TCHAR (parent.getCodePage (), text, true);
int headerWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer) + Table.HEADER_MARGIN;
@@ -351,7 +351,7 @@ public void pack () {
}
int margin = 0;
if (OS.COMCTL32_VERSION >= OS.VERSION (5, 80)) {
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
margin = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETBITMAPMARGIN, 0, 0);
} else {
margin = OS.GetSystemMetrics (OS.SM_CXEDGE) * 3;
@@ -362,17 +362,17 @@ public void pack () {
int columnWidth = 0;
if (parent.hooks (SWT.MeasureItem)) {
RECT headerRect = new RECT ();
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
- int /*long*/ hDC = OS.GetDC (hwnd);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (hwnd);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int count = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TableItem item = parent._getItem (i, false);
if (item != null) {
- int /*long*/ hFont = item.fontHandle (index);
+ long /*int*/ hFont = item.fontHandle (index);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
Event event = parent.sendMeasureItemEvent (item, i, index, hDC);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
@@ -406,7 +406,7 @@ public void pack () {
*/
if (!OS.IsWinCE && OS.WIN32_VERSION < OS.VERSION (6, 0)) {
if (!parent.firstColumnImage) {
- int /*long*/ hImageList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ hImageList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hImageList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hImageList, cx, cy);
@@ -421,7 +421,7 @@ public void pack () {
* width by the width of the image list.
*/
if ((parent.style & SWT.CHECK) != 0) {
- int /*long*/ hStateList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hStateList, cx, cy);
@@ -565,7 +565,7 @@ public void setAlignment (int alignment) {
if (index == -1 || index == 0) return;
style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_FMT;
OS.SendMessage (hwnd, OS.LVM_GETCOLUMN, index, lvColumn);
@@ -586,7 +586,7 @@ public void setAlignment (int alignment) {
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
rect.left = headerRect.left;
@@ -609,9 +609,9 @@ public void setImage (Image image) {
void setImage (Image image, boolean sort, boolean right) {
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (OS.COMCTL32_MAJOR < 6) {
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT | OS.HDI_IMAGE | OS.HDI_BITMAP;
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem);
@@ -699,8 +699,8 @@ void setSortDirection (int direction) {
if (OS.COMCTL32_MAJOR >= 6) {
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT | OS.HDI_IMAGE;
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem);
@@ -792,7 +792,7 @@ public void setText (String string) {
* text does not draw. The fix is to query and then
* set the alignment.
*/
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_FMT;
OS.SendMessage (hwnd, OS.LVM_GETCOLUMN, index, lvColumn);
@@ -806,14 +806,14 @@ public void setText (String string) {
* with spaces.
*/
boolean replace = !OS.IsWinCE && OS.WIN32_VERSION <= OS.VERSION (4, 10);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (parent.getCodePage (), fixMnemonic (string, replace), true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
lvColumn.mask |= OS.LVCF_TEXT;
lvColumn.pszText = pszText;
- int /*long*/ result = OS.SendMessage (hwnd, OS.LVM_SETCOLUMN, index, lvColumn);
+ long /*int*/ result = OS.SendMessage (hwnd, OS.LVM_SETCOLUMN, index, lvColumn);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
if (result == 0) error (SWT.ERROR_CANNOT_SET_TEXT);
}
@@ -843,7 +843,7 @@ public void setText (String string) {
public void setToolTipText (String string) {
checkWidget();
toolTipText = string;
- int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip == 0) {
parent.createHeaderToolTips ();
parent.updateHeaderToolTips ();
@@ -865,17 +865,17 @@ public void setWidth (int width) {
if (width < 0) return;
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (width != (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0)) {
OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, width);
}
}
void updateToolTip (int index) {
- int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip != 0) {
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, rect) != 0) {
TOOLINFO lpti = new TOOLINFO ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
index 67884d2eee..55fcdd2dc3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
@@ -147,7 +147,7 @@ void destroyWidget () {
releaseHandle ();
}
-int /*long*/ fontHandle (int index) {
+long /*int*/ fontHandle (int index) {
if (cellFont != null && cellFont [index] != null) return cellFont [index].handle;
if (font != null) return font.handle;
return -1;
@@ -243,7 +243,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
return getBounds (row, column, getText, getImage, fullText, false, 0);
}
-RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean fullText, boolean fullImage, int /*long*/ hDC) {
+RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean fullText, boolean fullImage, long /*int*/ hDC) {
if (!getText && !getImage) return new RECT ();
int columnCount = parent.getColumnCount ();
if (!(0 <= column && column < Math.max (1, columnCount))) {
@@ -251,24 +251,24 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
}
if (parent.fixScrollWidth) parent.setScrollWidth (null, true);
RECT rect = new RECT ();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int bits = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if (column == 0 && (bits & OS.LVS_EX_FULLROWSELECT) == 0) {
if (parent.explorerTheme) {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS. LVM_GETITEMRECT, row, rect);
+ long /*int*/ code = OS.SendMessage (hwnd, OS. LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (getText) {
int width = 0;
- int /*long*/ hFont = fontHandle (column);
+ long /*int*/ hFont = fontHandle (column);
if (hFont == -1 && hDC == 0) {
TCHAR buffer = new TCHAR (parent.getCodePage (), text, true);
width = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer);
} else {
TCHAR buffer = new TCHAR (parent.getCodePage (), text, false);
- int /*long*/ textDC = hDC != 0 ? hDC : OS.GetDC (hwnd), oldFont = -1;
+ long /*int*/ textDC = hDC != 0 ? hDC : OS.GetDC (hwnd), oldFont = -1;
if (hDC == 0) {
if (hFont == -1) hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
oldFont = OS.SelectObject (textDC, hFont);
@@ -289,7 +289,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
if (getText) {
rect.left = OS.LVIR_SELECTBOUNDS;
parent.ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (!getImage) {
@@ -303,14 +303,14 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
} else {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
}
}
if (fullText || fullImage) {
RECT headerRect = new RECT ();
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, 0, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
if (getText && fullText) rect.right = headerRect.right;
@@ -334,7 +334,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
*/
rect.left = getText ? OS.LVIR_LABEL : OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
+ long /*int*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
/*
@@ -368,7 +368,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
}
if (column == 0 && fullImage) {
RECT headerRect = new RECT ();
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, 0, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
rect.left = headerRect.left;
@@ -376,7 +376,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
} else {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
+ long /*int*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (!hasImage) rect.right = rect.left;
@@ -682,7 +682,7 @@ public Rectangle getTextBounds (int index) {
void redraw () {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
int index = parent.indexOf (this);
if (index == -1) return;
@@ -691,7 +691,7 @@ void redraw () {
void redraw (int column, boolean drawText, boolean drawImage) {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
int index = parent.indexOf (this);
if (index == -1) return;
@@ -859,7 +859,7 @@ public void setFont (Font font){
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
@@ -923,7 +923,7 @@ public void setFont (int index, Font font) {
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
@@ -1132,7 +1132,7 @@ public void setImageIndent (int indent) {
} else {
int index = parent.indexOf (this);
if (index != -1) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_INDENT;
lvItem.iItem = index;
@@ -1213,7 +1213,7 @@ public void setText (int index, String string) {
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
index 3eb5d6bf60..958b08a534 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
@@ -36,7 +36,7 @@ import org.eclipse.swt.*;
public class TaskBar extends Widget {
int itemCount;
TaskItem [] items = new TaskItem [4];
- int /*long*/ mTaskbarList3;
+ long /*int*/ mTaskbarList3;
static final char [] EXE_PATH;
static final char [] ICO_DIR = {'i','c','o','_','d','i','r','\0'};
@@ -98,7 +98,7 @@ TaskBar (Display display, int style) {
}
void createHandle () {
- int /*long*/[] ppv = new int /*long*/ [1];
+ long /*int*/[] ppv = new long /*int*/ [1];
int hr = OS.CoCreateInstance (CLSID_TaskbarList, 0, OS.CLSCTX_INPROC_SERVER, IID_ITaskbarList3, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
mTaskbarList3 = ppv [0];
@@ -124,17 +124,17 @@ void createItems () {
getItem (null);
}
-int /*long*/ createShellLink (MenuItem item, String directory) {
+long /*int*/ createShellLink (MenuItem item, String directory) {
int style = item.getStyle ();
if ((style & SWT.CASCADE) != 0) return 0;
- int /*long*/ [] ppv = new int /*long*/ [1];
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.CoCreateInstance (CLSID_ShellLink, 0, OS.CLSCTX_INPROC_SERVER, IID_IShellLinkW, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ pLink = ppv [0];
+ long /*int*/ pLink = ppv [0];
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pv = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, OS.PROPVARIANT_sizeof());
- int /*long*/ titlePtr = 0;
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pv = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, OS.PROPVARIANT_sizeof());
+ long /*int*/ titlePtr = 0;
PROPERTYKEY key;
if ((style & SWT.SEPARATOR) != 0) {
OS.MoveMemory (pv, new short [] {OS.VT_BOOL}, 2);
@@ -148,7 +148,7 @@ int /*long*/ createShellLink (MenuItem item, String directory) {
titlePtr = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2);
OS.MoveMemory (titlePtr, buffer, buffer.length * 2);
OS.MoveMemory (pv, new short [] {OS.VT_LPWSTR}, 2);
- OS.MoveMemory (pv + 8, new int /*long*/ [] {titlePtr}, OS.PTR_SIZEOF);
+ OS.MoveMemory (pv + 8, new long /*int*/ [] {titlePtr}, OS.PTR_SIZEOF);
key = PKEY_Title;
/*IShellLink::SetPath*/
@@ -217,7 +217,7 @@ int /*long*/ createShellLink (MenuItem item, String directory) {
/*IUnknown::QueryInterface*/
hr = OS.VtblCall (0, pLink, IID_IPropertyStore, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ pPropStore = ppv [0];
+ long /*int*/ pPropStore = ppv [0];
/*IPropertyStore::SetValue*/
hr = OS.VtblCall (6, pPropStore, key, pv);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
@@ -231,15 +231,15 @@ int /*long*/ createShellLink (MenuItem item, String directory) {
return pLink;
}
-int /*long*/ createShellLinkArray (MenuItem [] items, String directory) {
+long /*int*/ createShellLinkArray (MenuItem [] items, String directory) {
if (items == null) return 0;
if (items.length == 0) return 0;
- int /*long*/ [] ppv = new int /*long*/ [1];
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.CoCreateInstance (CLSID_EnumerableObjectCollection, 0, OS.CLSCTX_INPROC_SERVER, IID_IObjectCollection, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ pObjColl = ppv [0];
+ long /*int*/ pObjColl = ppv [0];
for (int i = 0; i < items.length; i++) {
- int /*long*/ pLink = createShellLink (items[i], directory);
+ long /*int*/ pLink = createShellLink (items[i], directory);
if (pLink != 0) {
/*IObjectCollection::AddObject*/
hr = OS.VtblCall (5, pObjColl, pLink);
@@ -251,7 +251,7 @@ int /*long*/ createShellLinkArray (MenuItem [] items, String directory) {
/*IUnknown::QueryInterface*/
hr = OS.VtblCall (0, pObjColl, IID_IObjectArray, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ poa = ppv [0];
+ long /*int*/ poa = ppv [0];
/*IUnknown::Release*/
OS.VtblCall (2, pObjColl);
return poa;
@@ -289,24 +289,24 @@ String getDirectory (char[] appName) {
}
}
String result = null;
- int /*long*/ [] ppv = new int /*long*/ [1];
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.SHCreateItemInKnownFolder (FOLDERID_LocalAppData, 0, null, IID_IShellItem, ppv);
if (hr == OS.S_OK) {
- int /*long*/ psiRoot = ppv [0];
+ long /*int*/ psiRoot = ppv [0];
hr = OS.CoCreateInstance (CLSID_FileOperation, 0, OS.CLSCTX_INPROC_SERVER, IID_IFileOperation, ppv);
if (hr == OS.S_OK) {
- int /*long*/ pfo = ppv [0];
+ long /*int*/ pfo = ppv [0];
/*IFileOperation.SetOperationFlags*/
hr = OS.VtblCall (5, pfo, OS.FOF_NO_UI);
if (hr == OS.S_OK) {
- int /*long*/ psiAppDir = getDirectory (psiRoot, pfo, appDir, false);
+ long /*int*/ psiAppDir = getDirectory (psiRoot, pfo, appDir, false);
if (psiAppDir != 0) {
- int /*long*/ psiIcoDir = getDirectory (psiAppDir, pfo, ICO_DIR, true);
+ long /*int*/ psiIcoDir = getDirectory (psiAppDir, pfo, ICO_DIR, true);
if (psiIcoDir != 0) {
/*IShellItem::GetDisplayName*/
hr = OS.VtblCall (5, psiIcoDir, OS.SIGDN_FILESYSPATH, ppv);
if (hr == OS.S_OK) {
- int /*long*/ wstr = ppv [0];
+ long /*int*/ wstr = ppv [0];
int length = OS.wcslen (wstr);
char [] buffer = new char [length];
OS.MoveMemory (buffer, wstr, length * 2);
@@ -329,8 +329,8 @@ String getDirectory (char[] appName) {
return result;
}
-int /*long*/ getDirectory (int /*long*/ parent, int /*long*/ pfo, char [] name, boolean delete) {
- int /*long*/ [] ppv = new int /*long*/ [1];
+long /*int*/ getDirectory (long /*int*/ parent, long /*int*/ pfo, char [] name, boolean delete) {
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.SHCreateItemFromRelativeName (parent, name, 0, IID_IShellItem, ppv);
if (hr == OS.S_OK) {
if (delete) {
@@ -497,10 +497,10 @@ void reskinChildren (int flags) {
}
void setMenu (Menu menu) {
- int /*long*/ [] ppv = new int /*long*/ [1];
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.CoCreateInstance (CLSID_DestinationList, 0, OS.CLSCTX_INPROC_SERVER, IID_ICustomDestinationList, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ pDestList = ppv[0];
+ long /*int*/ pDestList = ppv[0];
String appName = Display.APP_NAME;
char [] buffer = {'S', 'W', 'T', '\0'};
if (appName != null && appName.length () > 0) {
@@ -519,7 +519,7 @@ void setMenu (Menu menu) {
break;
}
}
- int /*long*/ poa = createShellLinkArray (items, directory);
+ long /*int*/ poa = createShellLinkArray (items, directory);
if (poa != 0) {
/*ICustomDestinationList::SetAppID*/
@@ -530,7 +530,7 @@ void setMenu (Menu menu) {
int [] cMaxSlots = new int [1];
OS.VtblCall (4, pDestList, cMaxSlots, IID_IObjectArray, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ pRemovedItems = ppv [0];
+ long /*int*/ pRemovedItems = ppv [0];
int [] count = new int [1];
/*IObjectArray::GetCount*/
@@ -556,7 +556,7 @@ void setMenu (Menu menu) {
}
}
}
- int /*long*/ poa2 = createShellLinkArray (subItems, directory);
+ long /*int*/ poa2 = createShellLinkArray (subItems, directory);
if (poa2 != 0) {
/*IObjectArray::GetCount*/
OS.VtblCall (3, poa2, count);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
index 15331c5739..ce27010198 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
@@ -285,8 +285,8 @@ public void setOverlayImage (Image overlayImage) {
if (overlayText.length () != 0) {
updateText ();
} else {
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetOverlayIcon */
OS.VtblCall (18, mTaskbarList3, hwnd, 0, 0);
}
@@ -330,8 +330,8 @@ public void setOverlayText (String overlayText) {
if (overlayImage != null) {
updateImage ();
} else {
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetOverlayIcon */
OS.VtblCall (18, mTaskbarList3, hwnd, 0, 0);
}
@@ -428,7 +428,7 @@ void setShell (Shell shell) {
void updateImage () {
showingText = false;
Image image2 = null;
- int /*long*/ hIcon = 0;
+ long /*int*/ hIcon = 0;
switch (overlayImage.type) {
case SWT.BITMAP:
image2 = Display.createIcon (overlayImage);
@@ -438,8 +438,8 @@ void updateImage () {
hIcon = overlayImage.handle;
break;
}
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetOverlayIcon */
OS.VtblCall (18, mTaskbarList3, hwnd, hIcon, 0);
if (image2 != null) image2.dispose ();
@@ -448,8 +448,8 @@ void updateImage () {
void updateProgress () {
if (progressState == SWT.INDETERMINATE) return;
if (progressState == SWT.DEFAULT) return;
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetProgressValue */
OS.VtblCall (9, mTaskbarList3, hwnd, (long)progress, (long)PROGRESS_MAX);
}
@@ -462,8 +462,8 @@ void updateProgressState () {
case SWT.PAUSED: tbpFlags = OS.TBPF_PAUSED; break;
case SWT.INDETERMINATE: tbpFlags = OS.TBPF_INDETERMINATE; break;
}
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetProgressValue */
OS.VtblCall (9, mTaskbarList3, hwnd, (long)progress, (long)PROGRESS_MAX);
/* ITaskbarList3::SetProgressState */
@@ -474,7 +474,7 @@ void updateText () {
showingText = true;
/* Create resources */
int width = 16, height = 16;
- int /*long*/ hdc = OS.GetDC (0);
+ long /*int*/ hdc = OS.GetDC (0);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = width;
@@ -484,23 +484,23 @@ void updateText () {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ hBitmap = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ hBitmap = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (hBitmap == 0) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ dstHdc = OS.CreateCompatibleDC (hdc);
- int /*long*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
- int /*long*/ hMask = OS.CreateBitmap (width, height, 1, 1, null);
+ long /*int*/ dstHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
+ long /*int*/ hMask = OS.CreateBitmap (width, height, 1, 1, null);
if (hMask == 0) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ maskHdc = OS.CreateCompatibleDC (hdc);
- int /*long*/ oldMask = OS.SelectObject (maskHdc, hMask);
+ long /*int*/ maskHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ oldMask = OS.SelectObject (maskHdc, hMask);
/* Draw content */
OS.PatBlt (maskHdc, 0, 0, width, height, OS.WHITENESS);
- int /*long*/ oldBrush = OS.SelectObject (maskHdc, OS.GetStockObject (OS.BLACK_BRUSH));
+ long /*int*/ oldBrush = OS.SelectObject (maskHdc, OS.GetStockObject (OS.BLACK_BRUSH));
OS.RoundRect (maskHdc, 0, 0, width, height, 8, 8);
OS.SelectObject (maskHdc, oldBrush);
- int /*long*/ brush = OS.CreateSolidBrush (OS.GetSysColor (OS.COLOR_HIGHLIGHT));
+ long /*int*/ brush = OS.CreateSolidBrush (OS.GetSysColor (OS.COLOR_HIGHLIGHT));
oldBrush = OS.SelectObject (dstHdc, brush);
OS.RoundRect (dstHdc, 0, 0, width, height, 8, 8);
OS.SelectObject (dstHdc, oldBrush);
@@ -510,7 +510,7 @@ void updateText () {
RECT rect = new RECT ();
TCHAR buffer = new TCHAR (shell.getCodePage (), overlayText, false);
int length = buffer.length();
- int /*long*/ hFont = 0, oldHFont = 0;
+ long /*int*/ hFont = 0, oldHFont = 0;
NONCLIENTMETRICS info = OS.IsUnicode ? (NONCLIENTMETRICS) new NONCLIENTMETRICSW () : new NONCLIENTMETRICSA ();
info.cbSize = NONCLIENTMETRICS.sizeof;
if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, info, 0)) {
@@ -549,13 +549,13 @@ void updateText () {
iconInfo.fIcon = true;
iconInfo.hbmColor = hBitmap;
iconInfo.hbmMask = hMask;
- int /*long*/ hIcon = OS.CreateIconIndirect (iconInfo);
+ long /*int*/ hIcon = OS.CreateIconIndirect (iconInfo);
if (hIcon == 0) error (SWT.ERROR_NO_HANDLES);
OS.DeleteObject (hBitmap);
OS.DeleteObject (hMask);
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetOverlayIcon */
OS.VtblCall (18, mTaskbarList3, hwnd, hIcon, 0);
OS.DestroyIcon (hIcon);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 3df3919bff..b56f2343e7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -96,7 +96,7 @@ public class Text extends Scrollable {
DELIMITER = "\r\n";
}
- static final int /*long*/ EditProc;
+ static final long /*int*/ EditProc;
static final TCHAR EditClass = new TCHAR (0, "EDIT", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -105,7 +105,7 @@ public class Text extends Scrollable {
/*
* This code is intentionally commented.
*/
-// int /*long*/ hwndText = OS.CreateWindowEx (0,
+// long /*int*/ hwndText = OS.CreateWindowEx (0,
// EditClass,
// null,
// OS.WS_OVERLAPPED | OS.ES_PASSWORD,
@@ -161,7 +161,7 @@ public Text (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
boolean redraw = false;
switch (msg) {
@@ -184,13 +184,13 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
}
}
if (doubleBuffer || drawMessage) {
- int /*long*/ paintDC = 0;
+ long /*int*/ paintDC = 0;
PAINTSTRUCT ps = new PAINTSTRUCT ();
paintDC = OS.BeginPaint (handle, ps);
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int /*long*/ hDC = paintDC, hBitmap = 0, hOldBitmap = 0;
+ long /*int*/ hDC = paintDC, hBitmap = 0, hOldBitmap = 0;
POINT lpPoint1 = null, lpPoint2 = null;
if (doubleBuffer) {
hDC = OS.CreateCompatibleDC (paintDC);
@@ -215,7 +215,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
if (drawMessage) {
RECT rect = new RECT();
OS.GetClientRect(handle, rect);
- int /*long*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
rect.left += OS.LOWORD (margins);
rect.right -= OS.HIWORD (margins);
if ((style & SWT.BORDER) != 0) {
@@ -234,8 +234,8 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
case SWT.CENTER: uFormat |= OS.DT_CENTER;
case SWT.RIGHT: uFormat |= (rtl ? OS.DT_LEFT : OS.DT_RIGHT); break;
}
- int /*long*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
- int /*long*/ hOldFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hOldFont = OS.SelectObject (hDC, hFont);
OS.SetTextColor (hDC, OS.GetSysColor (OS.COLOR_GRAYTEXT));
OS.SetBkMode (hDC, OS.TRANSPARENT);
OS.DrawText (hDC, buffer, buffer.length (), rect, uFormat);
@@ -257,7 +257,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
break;
}
}
- int /*long*/ code = OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
+ long /*int*/ code = OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
switch (msg) {
case OS.WM_HSCROLL:
case OS.WM_VSCROLL: {
@@ -516,7 +516,7 @@ void applySegments () {
newChars [length] = 0;
buffer = new TCHAR (cp, newChars, false);
OS.SendMessage (handle, OS.EM_SETSEL, 0, -1);
- int /*long*/ undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
+ long /*int*/ undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
OS.SendMessage (handle, OS.EM_REPLACESEL, undo, buffer);
/* Restore selection */
start [0] = translateOffset (start [0]);
@@ -591,7 +591,7 @@ void clearSegments (boolean applyText) {
* menu. Sending OS.EM_REPLACESEL message instead.
*/
OS.SendMessage (handle, OS.EM_SETSEL, 0, -1);
- int /*long*/ undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
+ long /*int*/ undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
OS.SendMessage (handle, OS.EM_REPLACESEL, undo, buffer);
/* Restore selection */
if (!OS.IsUnicode && OS.IsDBLocale) {
@@ -634,8 +634,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int height = 0, width = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -686,7 +686,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
* the single-line text widget in an editable combo
* box.
*/
- int /*long*/ margins = OS.SendMessage(handle, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage(handle, OS.EM_GETMARGINS, 0, 0);
rect.x -= OS.LOWORD (margins);
rect.width += OS.LOWORD (margins) + OS.HIWORD (margins);
if ((style & SWT.H_SCROLL) != 0) rect.width++;
@@ -783,12 +783,12 @@ TCHAR deprocessText (TCHAR text, int start, int end, boolean terminate) {
return text;
}
-boolean dragDetect (int /*long*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (long /*int*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
if (filter) {
int [] start = new int [1], end = new int [1];
OS.SendMessage (handle, OS.EM_GETSEL, start, end);
if (start [0] != end [0]) {
- int /*long*/ lParam = OS.MAKELPARAM (x, y);
+ long /*int*/ lParam = OS.MAKELPARAM (x, y);
int position = OS.LOWORD (OS.SendMessage (handle, OS.EM_CHARFROMPOS, 0, lParam));
if (start [0] <= position && position < end [0]) {
if (super.dragDetect (hwnd, x, y, filter, detect, consume)) {
@@ -912,7 +912,7 @@ public Point getCaretLocation () {
* pixel coordinates (0,0).
*/
int position = translateOffset (getCaretPosition ());
- int /*long*/ caretPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, position, 0);
+ long /*int*/ caretPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, position, 0);
if (caretPos == -1) {
caretPos = 0;
if (position >= OS.GetWindowTextLength (handle)) {
@@ -984,9 +984,9 @@ public int getCaretPosition () {
if (lpgui.hwndCaret == handle || lpgui.hwndCaret == 0) {
POINT ptCurrentPos = new POINT ();
if (OS.GetCaretPos (ptCurrentPos)) {
- int /*long*/ endPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, end [0], 0);
+ long /*int*/ endPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, end [0], 0);
if (endPos == -1) {
- int /*long*/ startPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, start [0], 0);
+ long /*int*/ startPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, start [0], 0);
int startX = OS.GET_X_LPARAM (startPos);
if (ptCurrentPos.x > startX) caret = end [0];
} else {
@@ -1128,8 +1128,8 @@ public String getLineDelimiter () {
*/
public int getLineHeight () {
checkWidget ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -1198,7 +1198,7 @@ public String getMessage () {
/*public*/ int getPosition (Point point) {
checkWidget();
if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
- int /*long*/ lParam = OS.MAKELPARAM (point.x, point.y);
+ long /*int*/ lParam = OS.MAKELPARAM (point.x, point.y);
int position = OS.LOWORD (OS.SendMessage (handle, OS.EM_CHARFROMPOS, 0, lParam));
if (!OS.IsUnicode && OS.IsDBLocale) position = mbcsToWcsPos (position);
return untranslateOffset (position);
@@ -1296,10 +1296,10 @@ public int getTabs () {
}
int getTabWidth (int tabs) {
- int /*long*/ oldFont = 0;
+ long /*int*/ oldFont = 0;
RECT rect = new RECT ();
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
TCHAR SPACE = new TCHAR (getCodePage (), " ", false);
@@ -1471,7 +1471,7 @@ public int getTopPixel () {
* of Rich Edit return zero.
*/
int [] buffer = new int [2];
- int /*long*/ code = OS.SendMessage (handle, OS.EM_GETSCROLLPOS, 0, buffer);
+ long /*int*/ code = OS.SendMessage (handle, OS.EM_GETSCROLLPOS, 0, buffer);
if (code == 1) return buffer [1];
return getTopIndex () * getLineHeight ();
}
@@ -1700,7 +1700,7 @@ public void selectAll () {
OS.SendMessage (handle, OS.EM_SETSEL, 0, -1);
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -1833,7 +1833,7 @@ void setBounds (int x, int y, int width, int height, int flags) {
if ((flags & OS.SWP_NOSIZE) == 0 && width != 0) {
RECT rect = new RECT ();
OS.GetWindowRect (handle, rect);
- int /*long*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
int marginWidth = OS.LOWORD (margins) + OS.HIWORD (margins);
if (rect.right - rect.left <= marginWidth) {
int [] start = new int [1], end = new int [1];
@@ -1857,8 +1857,8 @@ void setBounds (int x, int y, int width, int height, int flags) {
if ((flags & OS.SWP_NOSIZE) == 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.ES_MULTILINE) != 0) {
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -1868,7 +1868,7 @@ void setBounds (int x, int y, int width, int height, int flags) {
RECT rect = new RECT();
OS.GetClientRect (handle, rect);
if ((rect.bottom - rect.top) < tm.tmHeight) {
- int /*long*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
rect.left += OS.LOWORD (margins);
rect.right -= OS.HIWORD (margins);
rect.top = 0;
@@ -2513,13 +2513,13 @@ TCHAR windowClass () {
return EditClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return EditProc;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
boolean processSegments = false, redraw = false;
- int /*long*/ code;
+ long /*int*/ code;
if (hooks (SWT.Segments) || filters (SWT.Segments)) {
switch (msg) {
case OS.EM_UNDO:
@@ -2579,7 +2579,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return code;
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
@@ -2617,19 +2617,19 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_CLEAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CLEAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CLEAR (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_CLEAR, wParam, lParam);
}
-LRESULT WM_CUT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CUT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CUT (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_CUT, wParam, lParam);
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if ((style & SWT.READ_ONLY) != 0) {
if ((style & (SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
@@ -2655,7 +2655,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
@@ -2681,14 +2681,14 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
* so DLGC_WANTARROWS should not be cleared.
*/
if ((style & SWT.READ_ONLY) != 0) {
- int /*long*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
code &= ~(OS.DLGC_WANTALLKEYS | OS.DLGC_WANTTAB);
return new LRESULT (code);
}
return null;
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for search text accessibility is
@@ -2700,7 +2700,7 @@ LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
/* Process a DBCS character */
Display display = this.display;
@@ -2719,7 +2719,7 @@ LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
* them to the application.
*/
ignoreCharacter = true;
- int /*long*/ result = callWindowProc (handle, OS.WM_IME_CHAR, wParam, lParam);
+ long /*int*/ result = callWindowProc (handle, OS.WM_IME_CHAR, wParam, lParam);
MSG msg = new MSG ();
int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
while (OS.PeekMessage (msg, handle, OS.WM_CHAR, OS.WM_CHAR, flags)) {
@@ -2734,7 +2734,7 @@ LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (result);
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Prevent Windows from processing WM_LBUTTONDBLCLK
* when double clicking behavior is disabled by not
@@ -2772,7 +2772,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsPPC) {
LRESULT result = null;
Display display = this.display;
@@ -2816,19 +2816,19 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_PASTE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PASTE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PASTE (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_PASTE, wParam, lParam);
}
-LRESULT WM_UNDO (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UNDO (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UNDO (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_UNDO, wParam, lParam);
}
-LRESULT wmClipboard (int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmClipboard (int msg, long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -2904,7 +2904,7 @@ LRESULT wmClipboard (int msg, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) {
if ((style & (SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
@@ -2929,7 +2929,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmColorChild (wParam, lParam);
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.EN_CHANGE:
@@ -2981,7 +2981,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
@@ -2991,7 +2991,7 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
case OS.VK_UP:
case OS.VK_RIGHT:
case OS.VK_DOWN:
- int /*long*/ code = 0;
+ long /*int*/ code = 0;
int [] start = new int [1], end = new int [1], newStart = new int [1], newEnd = new int [1];
OS.SendMessage (handle, OS.EM_GETSEL, start, end);
while (true) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
index 9cb33cf35d..485e7070f2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
@@ -50,7 +50,7 @@ public class ToolBar extends Composite {
ToolItem [] tabItemList;
boolean ignoreResize, ignoreMouse;
ImageList imageList, disabledImageList, hotImageList;
- static final int /*long*/ ToolBarProc;
+ static final long /*int*/ ToolBarProc;
static final TCHAR ToolBarClass = new TCHAR (0, OS.TOOLBARCLASSNAME, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -139,7 +139,7 @@ public ToolBar (Composite parent, int style) {
}
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
/*
* Bug in Windows. For some reason, during the processing
@@ -330,7 +330,7 @@ void createHandle () {
* bar currently sets this value to 300 so it is not
* necessary to set TTM_SETMAXTIPWIDTH.
*/
-// int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+// long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
// OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
/*
@@ -345,7 +345,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
/* Set the button struct, bitmap and button sizes */
@@ -510,7 +510,7 @@ public ToolItem getItem (int index) {
int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
TBBUTTON lpButton = new TBBUTTON ();
- int /*long*/ result = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ long /*int*/ result = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (result == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
return items [lpButton.idCommand];
}
@@ -693,7 +693,7 @@ void layoutItems () {
* the tool items. The fix is to use WM_SETFONT to force
* the tool bar to redraw and lay out.
*/
- int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
setDropDownItems (true);
}
@@ -715,7 +715,7 @@ void layoutItems () {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
- int /*long*/ size = OS.SendMessage (handle, OS.TB_GETBUTTONSIZE, 0, 0);
+ long /*int*/ size = OS.SendMessage (handle, OS.TB_GETBUTTONSIZE, 0, 0);
info.cx = (short) OS.LOWORD (size);
int index = 0;
while (index < items.length) {
@@ -724,7 +724,7 @@ void layoutItems () {
index++;
}
if (index < items.length) {
- int /*long*/ padding = OS.SendMessage (handle, OS.TB_GETPADDING, 0, 0);
+ long /*int*/ padding = OS.SendMessage (handle, OS.TB_GETPADDING, 0, 0);
info.cx += OS.LOWORD (padding) * 2;
}
for (int i=0; i<items.length; i++) {
@@ -849,7 +849,7 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
super.setBackgroundImage (hBitmap);
setBackgroundTransparent (hBitmap != 0);
}
@@ -953,7 +953,7 @@ void setDropDownItems (boolean set) {
void setDisabledImageList (ImageList imageList) {
if (disabledImageList == imageList) return;
- int /*long*/ hImageList = 0;
+ long /*int*/ hImageList = 0;
if ((disabledImageList = imageList) != null) {
hImageList = disabledImageList.getHandle ();
}
@@ -989,7 +989,7 @@ public void setFont (Font font) {
void setHotImageList (ImageList imageList) {
if (hotImageList == imageList) return;
- int /*long*/ hImageList = 0;
+ long /*int*/ hImageList = 0;
if ((hotImageList = imageList) != null) {
hImageList = hotImageList.getHandle ();
}
@@ -1000,7 +1000,7 @@ void setHotImageList (ImageList imageList) {
void setImageList (ImageList imageList) {
if (this.imageList == imageList) return;
- int /*long*/ hImageList = 0;
+ long /*int*/ hImageList = 0;
if ((this.imageList = imageList) != null) {
hImageList = imageList.getHandle ();
}
@@ -1012,7 +1012,7 @@ void setImageList (ImageList imageList) {
public boolean setParent (Composite parent) {
checkWidget ();
if (!super.setParent (parent)) return false;
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
OS.SendMessage (handle, OS.TB_SETPARENT, hwndParent, 0);
/*
* Bug in Windows. When a tool bar is reparented, the tooltip
@@ -1021,8 +1021,8 @@ public boolean setParent (Composite parent) {
* over using SetWindowLongPtr(). Note that for some reason,
* SetParent() does not work.
*/
- int /*long*/ hwndShell = parent.getShell ().handle;
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndShell = parent.getShell ().handle;
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
OS.SetWindowLongPtr (hwndToolTip, OS.GWLP_HWNDPARENT, hwndShell);
return true;
}
@@ -1111,7 +1111,7 @@ String toolTipText (NMTTDISPINFO hdr) {
*/
if (!hasCursor ()) return ""; //$NON-NLS-1$
int index = (int)/*64*/hdr.idFrom;
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom) {
/*
* Bug in Windows. For some reason the reading order
@@ -1215,11 +1215,11 @@ TCHAR windowClass () {
return ToolBarClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ToolBarProc;
}
-LRESULT WM_CAPTURECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CAPTURECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CAPTURECHANGED (wParam, lParam);
if (result != null) return result;
/*
@@ -1240,7 +1240,7 @@ LRESULT WM_CAPTURECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -1248,7 +1248,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
if (index != -1) {
TBBUTTON lpButton = new TBBUTTON ();
- int /*long*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ long /*int*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (code != 0) {
items [lpButton.idCommand].click (false);
return LRESULT.ZERO;
@@ -1258,7 +1258,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the toolbar window
* proc processes WM_COMMAND, it forwards this
@@ -1282,7 +1282,7 @@ LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
/*
* Bug in Windows. For some reason, NM_CUSTOMDRAW with
@@ -1299,7 +1299,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
/*
* Return DLGC_BUTTON so that mnemonics will be
@@ -1310,7 +1310,7 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (OS.DLGC_BUTTON | OS.DLGC_WANTARROWS);
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -1325,25 +1325,25 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
TBBUTTON lpButton = new TBBUTTON ();
- int /*long*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ long /*int*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (code != 0) lastFocusId = lpButton.idCommand;
return super.WM_KILLFOCUS (wParam, lParam);
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONUP (wParam, lParam);
}
-LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
/*
@@ -1360,7 +1360,7 @@ LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, lpti) != 0) {
if ((lpti.uFlags & OS.TTF_IDISHWND) == 0) {
OS.SendMessage (hwndToolTip, OS.TTM_DELTOOL, 0, lpti);
@@ -1371,12 +1371,12 @@ LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.GetMessagePos () != display.lastMouse) lastArrowId = -1;
return super.WM_MOUSEMOVE (wParam, lParam);
}
-LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the toolbar window
* proc processes WM_NOTIFY, it forwards this
@@ -1400,7 +1400,7 @@ LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (lastFocusId != -1 && handle == OS.GetFocus ()) {
int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lastFocusId, 0);
@@ -1409,9 +1409,9 @@ LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreResize) {
- int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
if (code == 0) return LRESULT.ZERO;
return new LRESULT (code);
}
@@ -1451,7 +1451,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (ignoreResize) return result;
@@ -1493,13 +1493,13 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
ToolItem child = items [OS.LOWORD (wParam)];
if (child == null) return null;
return child.wmCommandChild (wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.TBN_DROPDOWN:
NMTOOLBAR lpnmtb = new NMTOOLBAR ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
index c8caddbbe7..e536d9548f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
@@ -176,7 +176,7 @@ protected void checkSubclass () {
}
void click (boolean dropDown) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (OS.GetKeyState (OS.VK_LBUTTON) < 0) return;
int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
RECT rect = new RECT ();
@@ -191,7 +191,7 @@ void click (boolean dropDown) {
* properly.
*/
int y = rect.top + (rect.bottom - rect.top) / 2;
- int /*long*/ lParam = OS.MAKELPARAM (dropDown ? rect.right - 1 : rect.left, y);
+ long /*int*/ lParam = OS.MAKELPARAM (dropDown ? rect.right - 1 : rect.left, y);
parent.ignoreMouse = true;
OS.SendMessage (hwnd, OS.WM_LBUTTONDOWN, 0, lParam);
OS.SendMessage (hwnd, OS.WM_LBUTTONUP, 0, lParam);
@@ -233,7 +233,7 @@ void destroyWidget () {
*/
public Rectangle getBounds () {
checkWidget();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);
@@ -297,8 +297,8 @@ public boolean getEnabled () {
if ((style & SWT.SEPARATOR) != 0) {
return (state & DISABLED) == 0;
}
- int /*long*/ hwnd = parent.handle;
- int /*long*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
return (fsState & OS.TBSTATE_ENABLED) != 0;
}
@@ -356,8 +356,8 @@ public ToolBar getParent () {
public boolean getSelection () {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
return (fsState & OS.TBSTATE_CHECKED) != 0;
}
@@ -388,7 +388,7 @@ public String getToolTipText () {
*/
public int getWidth () {
checkWidget();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);
@@ -449,7 +449,7 @@ void releaseImages () {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE | OS.TBIF_STYLE;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
OS.SendMessage (hwnd, OS.TB_GETBUTTONINFO, id, info);
/*
* Feature in Windows. For some reason, a tool item that has
@@ -565,7 +565,7 @@ public void setControl (Control control) {
*/
if ((parent.style & (SWT.WRAP | SWT.VERTICAL)) != 0) {
boolean changed = false;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_STYLE | OS.TBIF_STATE;
@@ -628,7 +628,7 @@ public void setControl (Control control) {
*/
public void setEnabled (boolean enabled) {
checkWidget();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int fsState = (int)/*64*/OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
/*
* Feature in Windows. When TB_SETSTATE is used to set the
@@ -735,7 +735,7 @@ boolean setRadioSelection (boolean value) {
public void setSelection (boolean selected) {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int fsState = (int)/*64*/OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
/*
* Feature in Windows. When TB_SETSTATE is used to set the
@@ -770,7 +770,7 @@ public void setSelection (boolean selected) {
boolean setTabItemFocus () {
if (parent.setTabItemFocus ()) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
OS.SendMessage (hwnd, OS.TB_SETHOTITEM, index, 0);
return true;
@@ -809,12 +809,12 @@ public void setText (String string) {
if ((style & SWT.SEPARATOR) != 0) return;
if (string.equals (text)) return;
super.setText (string);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_TEXT | OS.TBIF_STYLE;
info.fsStyle = (byte) (widgetStyle () | OS.BTNS_AUTOSIZE);
- int /*long*/ hHeap = OS.GetProcessHeap (), pszText = 0;
+ long /*int*/ hHeap = OS.GetProcessHeap (), pszText = 0;
if (string.length () != 0) {
info.fsStyle |= OS.BTNS_SHOWTEXT;
TCHAR buffer = new TCHAR (parent.getCodePage (), string, true);
@@ -835,7 +835,7 @@ public void setText (String string) {
* the tool bar to redraw and layout.
*/
parent.setDropDownItems (false);
- int /*long*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
OS.SendMessage (hwnd, OS.WM_SETFONT, hFont, 0);
parent.setDropDownItems (true);
parent.layoutItems ();
@@ -887,7 +887,7 @@ public void setWidth (int width) {
checkWidget();
if ((style & SWT.SEPARATOR) == 0) return;
if (width < 0) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
@@ -898,7 +898,7 @@ public void setWidth (int width) {
void updateImages (boolean enabled) {
if ((style & SWT.SEPARATOR) != 0) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE;
@@ -988,7 +988,7 @@ void updateImages (boolean enabled) {
info.dwMask |= OS.TBIF_SIZE;
info.cx = 0;
OS.SendMessage (hwnd, OS.TB_SETBUTTONINFO, id, info);
- int /*long*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
OS.SendMessage (hwnd, OS.WM_SETFONT, hFont, 0);
parent.layoutItems ();
}
@@ -1008,7 +1008,7 @@ int widgetStyle () {
return OS.BTNS_BUTTON;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.RADIO) != 0) {
if ((parent.getStyle () & SWT.NO_RADIO_GROUP) == 0) {
selectRadio ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
index a28bba7e51..0da8f6f6fe 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
@@ -215,7 +215,7 @@ public boolean getVisible () {
checkWidget();
if (OS.IsWinCE) return false;
if (item != null) return visible;
- int /*long*/ hwndToolTip = hwndToolTip ();
+ long /*int*/ hwndToolTip = hwndToolTip ();
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -226,7 +226,7 @@ public boolean getVisible () {
return false;
}
-int /*long*/ hwndToolTip () {
+long /*int*/ hwndToolTip () {
return (style & SWT.BALLOON) != 0 ? parent.balloonTipHandle () : parent.toolTipHandle ();
}
@@ -261,7 +261,7 @@ void releaseWidget () {
super.releaseWidget ();
if (item == null) {
if (autoHide) {
- int /*long*/ hwndToolTip = hwndToolTip ();
+ long /*int*/ hwndToolTip = hwndToolTip ();
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -443,12 +443,12 @@ public void setVisible (boolean visible) {
if (OS.IsWinCE) return;
if (visible == getVisible ()) return;
if (item == null) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
lpti.uId = id;
lpti.hwnd = hwnd;
- int /*long*/ hwndToolTip = hwndToolTip ();
+ long /*int*/ hwndToolTip = hwndToolTip ();
Shell shell = parent.getShell ();
if (text.length () != 0) {
int icon = OS.TTI_NONE;
@@ -465,7 +465,7 @@ public void setVisible (boolean visible) {
OS.SystemParametersInfo (OS.SPI_GETWORKAREA, 0, rect, 0);
maxWidth = (rect.right - rect.left) / 4;
} else {
- int /*long*/ hmonitor = OS.MonitorFromWindow (hwnd, OS.MONITOR_DEFAULTTONEAREST);
+ long /*int*/ hmonitor = OS.MonitorFromWindow (hwnd, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -481,7 +481,7 @@ public void setVisible (boolean visible) {
nY = pt.y;
}
}
- int /*long*/ lParam = OS.MAKELPARAM (nX, nY);
+ long /*int*/ lParam = OS.MAKELPARAM (nX, nY);
OS.SendMessage (hwndToolTip, OS.TTM_TRACKPOSITION, 0, lParam);
/*
@@ -497,7 +497,7 @@ public void setVisible (boolean visible) {
OS.GetClientRect (hwnd, rect);
OS.MapWindowPoints (hwnd, 0, rect, 2);
if (!OS.PtInRect (rect, pt)) {
- int /*long*/ hCursor = OS.GetCursor ();
+ long /*int*/ hCursor = OS.GetCursor ();
OS.SetCursor (0);
OS.SetCursorPos (rect.left, rect.top);
OS.SendMessage (hwndToolTip, OS.TTM_TRACKACTIVATE, 1, lpti);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
index a181d6eb4f..8a95e01dae 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
@@ -45,11 +45,11 @@ public class Tracker extends Widget {
boolean tracking, cancelled, stippled;
Rectangle [] rectangles = new Rectangle [0], proportions = rectangles;
Rectangle bounds;
- int /*long*/ resizeCursor;
+ long /*int*/ resizeCursor;
Cursor clientCursor;
int cursorOrientation = SWT.NONE;
boolean inEvent = false;
- int /*long*/ hwndTransparent, hwndOpaque, oldTransparentProc, oldOpaqueProc;
+ long /*int*/ hwndTransparent, hwndOpaque, oldTransparentProc, oldOpaqueProc;
int oldX, oldY;
static boolean IsVista = !OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0);
@@ -248,7 +248,7 @@ Point adjustResizeCursor () {
* the appropriate resize cursor.
*/
if (clientCursor == null) {
- int /*long*/ newCursor = 0;
+ long /*int*/ newCursor = 0;
switch (cursorOrientation) {
case SWT.UP:
newCursor = OS.LoadCursor (0, OS.IDC_SIZENS);
@@ -371,9 +371,9 @@ void drawRectangles (Rectangle [] rects, boolean stippled) {
return;
}
int bandWidth = 1;
- int /*long*/ hwndTrack = parent == null ? OS.GetDesktopWindow () : parent.handle;
- int /*long*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
- int /*long*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
+ long /*int*/ hwndTrack = parent == null ? OS.GetDesktopWindow () : parent.handle;
+ long /*int*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
+ long /*int*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
if (stippled) {
bandWidth = 3;
byte [] bits = {-86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0};
@@ -513,7 +513,7 @@ public boolean open () {
null);
OS.SetLayeredWindowAttributes (hwndOpaque, 0xFFFFFF, (byte)0xFF, OS.LWA_COLORKEY | OS.LWA_ALPHA);
newProc = new Callback (this, "transparentProc", 4); //$NON-NLS-1$
- int /*long*/ newProcAddress = newProc.getAddress ();
+ long /*int*/ newProcAddress = newProc.getAddress ();
if (newProcAddress == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
oldTransparentProc = OS.GetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC, newProcAddress);
@@ -542,7 +542,7 @@ public boolean open () {
OS.GetModuleHandle (null),
null);
newProc = new Callback (this, "transparentProc", 4); //$NON-NLS-1$
- int /*long*/ newProcAddress = newProc.getAddress ();
+ long /*int*/ newProcAddress = newProc.getAddress ();
if (newProcAddress == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
oldTransparentProc = OS.GetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC, newProcAddress);
@@ -869,7 +869,7 @@ public void setStippled (boolean stippled) {
this.stippled = stippled;
}
-int /*long*/ transparentProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ transparentProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
switch ((int)/*64*/msg) {
/*
* We typically do not want to answer that the transparent window is
@@ -896,9 +896,9 @@ int /*long*/ transparentProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/
case OS.WM_PAINT:
if (hwndOpaque == hwnd) {
PAINTSTRUCT ps = new PAINTSTRUCT();
- int /*long*/ hDC = OS.BeginPaint (hwnd, ps);
- int /*long*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
- int /*long*/ transparentBrush = OS.CreateSolidBrush(0xFFFFFF);
+ long /*int*/ hDC = OS.BeginPaint (hwnd, ps);
+ long /*int*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
+ long /*int*/ transparentBrush = OS.CreateSolidBrush(0xFFFFFF);
oldBrush = OS.SelectObject (hDC, transparentBrush);
OS.PatBlt (hDC, ps.left, ps.top, ps.right - ps.left, ps.bottom - ps.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
@@ -953,7 +953,7 @@ void update () {
}
}
-LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
boolean isMirrored = parent != null && (parent.style & SWT.MIRRORED) != 0;
@@ -1087,7 +1087,7 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return result;
}
-LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmSysKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
cancelled = true;
@@ -1095,7 +1095,7 @@ LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
return result;
}
-LRESULT wmMouse (int message, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouse (int message, long /*int*/ wParam, long /*int*/ lParam) {
boolean isMirrored = parent != null && (parent.style & SWT.MIRRORED) != 0;
int newPos = OS.GetMessagePos ();
int newX = OS.GET_X_LPARAM (newPos);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java
index 969b2595b9..d0bc4c0134 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java
@@ -245,7 +245,7 @@ public boolean getVisible () {
return visible;
}
-int /*long*/ messageProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ messageProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the user clicks on the tray
* icon, another application may be the foreground window.
@@ -439,7 +439,7 @@ public void setImage (Image image) {
super.setImage (image);
if (image2 != null) image2.dispose ();
image2 = null;
- int /*long*/ hIcon = 0;
+ long /*int*/ hIcon = 0;
Image icon = image;
if (icon != null) {
switch (icon.type) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index 71b64db533..c2f1d48474 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -82,9 +82,9 @@ public class Tree extends Composite {
TreeItem currentItem;
TreeColumn sortColumn;
RECT focusRect;
- int /*long*/ hwndParent, hwndHeader, hAnchor, hInsert, hSelect;
+ long /*int*/ hwndParent, hwndHeader, hAnchor, hInsert, hSelect;
int lastID;
- int /*long*/ hFirstIndexOf, hLastIndexOf;
+ long /*int*/ hFirstIndexOf, hLastIndexOf;
int lastIndexOf, itemCount, sortDirection;
boolean dragStarted, gestureCompleted, insertAfter, shrink, ignoreShrink;
boolean ignoreSelect, ignoreExpand, ignoreDeselect, ignoreResize;
@@ -94,8 +94,8 @@ public class Tree extends Composite {
boolean ignoreDrawSelection, ignoreDrawHot, ignoreFullSelection, explorerTheme;
boolean createdAsRTL;
int scrollWidth, selectionForeground;
- int /*long*/ headerToolTipHandle, itemToolTipHandle;
- int /*long*/ lastTimerID = -1;
+ long /*int*/ headerToolTipHandle, itemToolTipHandle;
+ long /*int*/ lastTimerID = -1;
int lastTimerCount;
static final boolean ENABLE_TVS_EX_FADEINOUTEXPANDOS = System.getProperty("org.eclipse.swt.internal.win32.enableFadeInOutExpandos") != null;
static final int TIMER_MAX_COUNT = 8;
@@ -108,9 +108,9 @@ public class Tree extends Composite {
static final int EXPLORER_EXTRA = 2;
static final int DRAG_IMAGE_SIZE = 301;
static final boolean EXPLORER_THEME = true;
- static final int /*long*/ TreeProc;
+ static final long /*int*/ TreeProc;
static final TCHAR TreeClass = new TCHAR (0, OS.WC_TREEVIEW, true);
- static final int /*long*/ HeaderProc;
+ static final long /*int*/ HeaderProc;
static final TCHAR HeaderClass = new TCHAR (0, OS.WC_HEADER, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -240,7 +240,7 @@ void _addListener (int eventType, Listener listener) {
}
}
-TreeItem _getItem (int /*long*/ hItem) {
+TreeItem _getItem (long /*int*/ hItem) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
tvItem.hItem = hItem;
@@ -250,7 +250,7 @@ TreeItem _getItem (int /*long*/ hItem) {
return null;
}
-TreeItem _getItem (int /*long*/ hItem, int id) {
+TreeItem _getItem (long /*int*/ hItem, int id) {
if ((style & SWT.VIRTUAL) == 0) return items [id];
return id != -1 ? items [id] : new TreeItem (this, SWT.NONE, -1, -1, hItem);
}
@@ -355,14 +355,14 @@ public void addTreeListener(TreeListener listener) {
addListener (SWT.Collapse, typedListener);
}
-int /*long*/ borderHandle () {
+long /*int*/ borderHandle () {
return hwndParent != 0 ? hwndParent : handle;
}
-LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCustomDraw) return null;
if (nmcd.left == nmcd.right) return new LRESULT (OS.CDRF_DODEFAULT);
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
OS.RestoreDC (hDC, -1);
TreeItem item = getItem (nmcd);
@@ -477,7 +477,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
}
}
draw = false;
- int /*long*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ long /*int*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
int iStateId = selected ? OS.TREIS_SELECTED : OS.TREIS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.TREIS_SELECTEDNOTFOCUS;
OS.DrawThemeBackground (hTheme, hDC, OS.TVP_TREEITEM, iStateId, pRect, pClipRect);
@@ -547,7 +547,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
backgroundRect = rect;
}
int clrText = -1, clrTextBk = -1;
- int /*long*/ hFont = item.fontHandle (index);
+ long /*int*/ hFont = item.fontHandle (index);
if (selectionForeground != -1) clrText = selectionForeground;
if (OS.IsWindowEnabled (handle)) {
boolean drawForeground = false;
@@ -692,7 +692,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
backgroundRect = selectionRect;
}
}
- int /*long*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ long /*int*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
int iStateId = selected ? OS.TREIS_SELECTED : OS.TREIS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.TREIS_SELECTEDNOTFOCUS;
OS.DrawThemeBackground (hTheme, hDC, OS.TVP_TREEITEM, iStateId, pRect, backgroundRect);
@@ -885,7 +885,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
if (handle == OS.GetFocus ()) {
int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == item.handle) {
if (!ignoreDrawFocus && findImageControl () != null) {
if ((style & SWT.FULL_SELECTION) != 0) {
@@ -909,7 +909,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
return new LRESULT (OS.CDRF_DODEFAULT);
}
-LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Even when custom draw is being ignored, the font needs
* to be selected into the HDC so that the item bounds are
@@ -927,9 +927,9 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
* COMCTL32.DLL,
*/
if (item == null) return null;
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
int index = hwndHeader != 0 ? (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0) : 0;
- int /*long*/ hFont = item.fontHandle (index);
+ long /*int*/ hFont = item.fontHandle (index);
if (hFont != -1) OS.SelectObject (hDC, hFont);
if (ignoreCustomDraw || nmcd.left == nmcd.right) {
return new LRESULT (hFont == -1 ? OS.CDRF_DODEFAULT : OS.CDRF_NEWFONT);
@@ -1090,7 +1090,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
}
pRect.left -= EXPLORER_EXTRA;
pClipRect.left -= EXPLORER_EXTRA;
- int /*long*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ long /*int*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
int iStateId = selected ? OS.TREIS_SELECTED : OS.TREIS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.TREIS_SELECTEDNOTFOCUS;
OS.DrawThemeBackground (hTheme, hDC, OS.TVP_TREEITEM, iStateId, pRect, pClipRect);
@@ -1305,7 +1305,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
}
OS.SaveDC (hDC);
if (clipRect != null) {
- int /*long*/ hRgn = OS.CreateRectRgn (clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
+ long /*int*/ hRgn = OS.CreateRectRgn (clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
POINT lpPoint = new POINT ();
OS.GetWindowOrgEx (hDC, lpPoint);
OS.OffsetRgn (hRgn, -lpPoint.x, -lpPoint.y);
@@ -1315,7 +1315,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
return result;
}
-LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCustomDraw) return null;
if (OS.IsWindowVisible (handle)) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
@@ -1340,7 +1340,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
* NOTE: This problem only happens on Vista during
* WM_NOTIFY with NM_CUSTOMDRAW and CDDS_POSTPAINT.
*/
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
hItem = getBottomItem ();
} else {
@@ -1364,7 +1364,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
}
}
if (linesVisible) {
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
if (hwndHeader != 0) {
int x = 0;
RECT rect = new RECT ();
@@ -1396,7 +1396,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
* NOTE: This problem only happens on Vista during
* WM_NOTIFY with NM_CUSTOMDRAW and CDDS_POSTPAINT.
*/
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
hItem = getBottomItem ();
} else {
@@ -1425,7 +1425,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
return new LRESULT (OS.CDRF_DODEFAULT);
}
-LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (explorerTheme) {
if ((OS.IsWindowEnabled (handle) && hooks (SWT.EraseItem)) || findImageControl () != null) {
RECT rect = new RECT ();
@@ -1436,7 +1436,7 @@ LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwndParent != 0 && hwnd == hwndParent) {
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
@@ -1455,7 +1455,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
* only the focus is assigned.
*/
if ((style & SWT.SINGLE) != 0) break;
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem != 0) {
@@ -1476,7 +1476,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
break;
}
}
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
boolean redraw = false;
switch (msg) {
/* Keyboard messages */
@@ -1531,7 +1531,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
break;
}
}
- int /*long*/ code = OS.CallWindowProc (TreeProc, hwnd, msg, wParam, lParam);
+ long /*int*/ code = OS.CallWindowProc (TreeProc, hwnd, msg, wParam, lParam);
switch (msg) {
/* Keyboard messages */
case OS.WM_KEYDOWN:
@@ -1635,7 +1635,7 @@ boolean checkData (TreeItem item, int index, boolean redraw) {
* is to detect that the top item has changed and redraw
* the entire tree.
*/
- int /*long*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
sendEvent (SWT.SetData, event);
//widget could be disposed at this point
currentItem = oldItem;
@@ -1648,11 +1648,11 @@ boolean checkData (TreeItem item, int index, boolean redraw) {
return true;
}
-boolean checkHandle (int /*long*/ hwnd) {
+boolean checkHandle (long /*int*/ hwnd) {
return hwnd == handle || (hwndParent != 0 && hwnd == hwndParent) || (hwndHeader != 0 && hwnd == hwndHeader);
}
-boolean checkScroll (int /*long*/ hItem) {
+boolean checkScroll (long /*int*/ hItem) {
/*
* Feature in Windows. If redraw is turned off using WM_SETREDRAW
* and a tree item that is not a child of the first root is selected or
@@ -1665,8 +1665,8 @@ boolean checkScroll (int /*long*/ hItem) {
* callers of this method.
*/
if (getDrawing ()) return false;
- int /*long*/ hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- int /*long*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
+ long /*int*/ hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
while (hParent != hRoot && hParent != 0) {
hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hParent);
}
@@ -1702,7 +1702,7 @@ protected void checkSubclass () {
*/
public void clear (int index, boolean all) {
checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
hItem = findItem (hItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
@@ -1715,7 +1715,7 @@ public void clear (int index, boolean all) {
}
}
-void clear (int /*long*/ hItem, TVITEM tvItem) {
+void clear (long /*int*/ hItem, TVITEM tvItem) {
tvItem.hItem = hItem;
TreeItem item = null;
if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) != 0) {
@@ -1749,7 +1749,7 @@ void clear (int /*long*/ hItem, TVITEM tvItem) {
*/
public void clearAll (boolean all) {
checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return;
if (all) {
boolean redraw = false;
@@ -1768,18 +1768,18 @@ public void clearAll (boolean all) {
}
}
-void clearAll (int /*long*/ hItem, TVITEM tvItem, boolean all) {
+void clearAll (long /*int*/ hItem, TVITEM tvItem, boolean all) {
while (hItem != 0) {
clear (hItem, tvItem);
if (all) {
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
clearAll (hFirstItem, tvItem, all);
}
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
}
-int /*long*/ CompareFunc (int /*long*/ lParam1, int /*long*/ lParam2, int /*long*/ lParamSort) {
+long /*int*/ CompareFunc (long /*int*/ lParam1, long /*int*/ lParam2, long /*int*/ lParamSort) {
TreeItem item1 = items [(int)/*64*/lParam1], item2 = items [(int)/*64*/lParam2];
String text1 = item1.getText ((int)/*64*/lParamSort), text2 = item2.getText ((int)/*64*/lParamSort);
return sortDirection == SWT.UP ? text1.compareTo (text2) : text2.compareTo (text1);
@@ -1800,7 +1800,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
height += rect.bottom - rect.top;
}
RECT rect = new RECT ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
while (hItem != 0) {
if ((style & SWT.VIRTUAL) == 0 && !painted) {
TVITEM tvItem = new TVITEM ();
@@ -1890,7 +1890,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
createdAsRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
@@ -1997,8 +1997,8 @@ void createItem (TreeColumn column, int index) {
* if is not possible to set the text at a later time.
* The fix is to insert the item with an empty string.
*/
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_TEXT | OS.HDI_FORMAT;
hdItem.pszText = pszText;
@@ -2059,7 +2059,7 @@ void createItem (TreeColumn column, int index) {
}
}
-void createItem (TreeItem item, int /*long*/ hParent, int /*long*/ hInsertAfter, int /*long*/ hItem) {
+void createItem (TreeItem item, long /*int*/ hParent, long /*int*/ hInsertAfter, long /*int*/ hItem) {
int id = -1;
if (item != null) {
id = lastID < items.length ? lastID : 0;
@@ -2084,8 +2084,8 @@ void createItem (TreeItem item, int /*long*/ hParent, int /*long*/ hInsertAfter,
}
lastID = id + 1;
}
- int /*long*/ hNewItem = 0;
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
+ long /*int*/ hNewItem = 0;
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
boolean fixParent = hFirstItem == 0;
if (hItem == 0) {
TVINSERTSTRUCT tvInsert = new TVINSERTSTRUCT ();
@@ -2164,7 +2164,7 @@ void createItem (TreeItem item, int /*long*/ hParent, int /*long*/ hInsertAfter,
OS.OffsetRect (damageRect, 0, rect.bottom - rect.top);
OS.InvalidateRect (handle, damageRect, true);
} else {
- int /*long*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
if (result != OS.NULLREGION) {
OS.OffsetRgn (rgn, 0, rect.bottom - rect.top);
@@ -2264,7 +2264,7 @@ void createParent () {
if (hwndHeader == 0) error (SWT.ERROR_NO_HANDLES);
OS.SetWindowLongPtr (hwndHeader, OS.GWLP_ID, hwndHeader);
if (OS.IsDBLocale) {
- int /*long*/ hIMC = OS.ImmGetContext (handle);
+ long /*int*/ hIMC = OS.ImmGetContext (handle);
OS.ImmAssociateContext (hwndParent, hIMC);
OS.ImmAssociateContext (hwndHeader, hIMC);
OS.ImmReleaseContext (handle, hIMC);
@@ -2277,9 +2277,9 @@ void createParent () {
// OS.SetWindowLong (handle, OS.GWL_EXSTYLE, oldExStyle);
// }
// }
- int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (hFont != 0) OS.SendMessage (hwndHeader, OS.WM_SETFONT, hFont, 0);
- int /*long*/ hwndInsertAfter = OS.GetWindow (handle, OS.GW_HWNDPREV);
+ long /*int*/ hwndInsertAfter = OS.GetWindow (handle, OS.GW_HWNDPREV);
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
SetWindowPos (hwndParent, hwndInsertAfter, 0, 0, 0, 0, flags);
SCROLLINFO info = new SCROLLINFO ();
@@ -2296,7 +2296,7 @@ void createParent () {
if ((oldStyle & OS.WS_VISIBLE) != 0) {
OS.ShowWindow (hwndParent, OS.SW_SHOW);
}
- int /*long*/ hwndFocus = OS.GetFocus ();
+ long /*int*/ hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) OS.SetFocus (hwndParent);
OS.SetParent (handle, hwndParent);
if (hwndFocus == handle) OS.SetFocus (handle);
@@ -2321,13 +2321,13 @@ void deregister () {
if (hwndHeader != 0) display.removeControl (hwndHeader);
}
-void deselect (int /*long*/ hItem, TVITEM tvItem, int /*long*/ hIgnoreItem) {
+void deselect (long /*int*/ hItem, TVITEM tvItem, long /*int*/ hIgnoreItem) {
while (hItem != 0) {
if (hItem != hIgnoreItem) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
deselect (hFirstItem, tvItem, hIgnoreItem);
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -2375,16 +2375,16 @@ public void deselectAll () {
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
if ((style & SWT.SINGLE) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
} else {
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
deselect (hItem, tvItem, 0);
} else {
for (int i=0; i<items.length; i++) {
@@ -2537,7 +2537,7 @@ void destroyItem (TreeColumn column) {
}
}
-void destroyItem (TreeItem item, int /*long*/ hItem) {
+void destroyItem (TreeItem item, long /*int*/ hItem) {
hFirstIndexOf = hLastIndexOf = 0;
itemCount = -1;
/*
@@ -2555,7 +2555,7 @@ void destroyItem (TreeItem item, int /*long*/ hItem) {
* allowing application code to add or remove items during
* this remove operation.
*/
- int /*long*/ hParent = 0;
+ long /*int*/ hParent = 0;
boolean fixRedraw = false;
if ((style & SWT.DOUBLE_BUFFERED) == 0) {
if (getDrawing () && OS.IsWindowVisible (handle)) {
@@ -2587,7 +2587,7 @@ void destroyItem (TreeItem item, int /*long*/ hItem) {
* NOTE: This only happens on Vista.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip != 0) OS.SendMessage (hwndToolTip, OS.TTM_POP, 0 ,0);
}
@@ -2704,8 +2704,8 @@ boolean findCell (int x, int y, TreeItem [] item, int [] index, RECT [] cellRect
POINT pt = new POINT ();
pt.x = x;
pt.y = y;
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
if (hwndParent != 0) {
@@ -2720,7 +2720,7 @@ boolean findCell (int x, int y, TreeItem [] item, int [] index, RECT [] cellRect
index [0] = 0;
boolean quit = false;
while (index [0] < count && !quit) {
- int /*long*/ hFont = item [0].fontHandle (order [index [0]]);
+ long /*int*/ hFont = item [0].fontHandle (order [index [0]]);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
cellRect [0] = item [0].getBounds (order [index [0]], true, false, true, false, true, hDC);
if (cellRect [0].left > rect.right) {
@@ -2754,7 +2754,7 @@ boolean findCell (int x, int y, TreeItem [] item, int [] index, RECT [] cellRect
return found;
}
-int findIndex (int /*long*/ hFirstItem, int /*long*/ hItem) {
+int findIndex (long /*int*/ hFirstItem, long /*int*/ hItem) {
if (hFirstItem == 0) return -1;
if (hFirstItem == hFirstIndexOf) {
if (hFirstIndexOf == hItem) {
@@ -2762,12 +2762,12 @@ int findIndex (int /*long*/ hFirstItem, int /*long*/ hItem) {
return lastIndexOf = 0;
}
if (hLastIndexOf == hItem) return lastIndexOf;
- int /*long*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
+ long /*int*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
if (hPrevItem == hItem) {
hLastIndexOf = hPrevItem;
return --lastIndexOf;
}
- int /*long*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
+ long /*int*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
if (hNextItem == hItem) {
hLastIndexOf = hNextItem;
return ++lastIndexOf;
@@ -2793,7 +2793,7 @@ int findIndex (int /*long*/ hFirstItem, int /*long*/ hItem) {
return -1;
}
int index = 0;
- int /*long*/ hNextItem = hFirstItem;
+ long /*int*/ hNextItem = hFirstItem;
while (hNextItem != 0 && hNextItem != hItem) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
index++;
@@ -2807,11 +2807,11 @@ int findIndex (int /*long*/ hFirstItem, int /*long*/ hItem) {
return -1;
}
-Widget findItem (int /*long*/ hItem) {
+Widget findItem (long /*int*/ hItem) {
return _getItem (hItem);
}
-int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
+long /*int*/ findItem (long /*int*/ hFirstItem, int index) {
if (hFirstItem == 0) return 0;
if (hFirstItem == hFirstIndexOf) {
if (index == 0) {
@@ -2829,7 +2829,7 @@ int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
}
if (index < lastIndexOf) {
int previousIndex = lastIndexOf - 1;
- int /*long*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
+ long /*int*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
while (hPrevItem != 0 && index < previousIndex) {
hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hPrevItem);
--previousIndex;
@@ -2840,7 +2840,7 @@ int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
}
} else {
int nextIndex = lastIndexOf + 1;
- int /*long*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
+ long /*int*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
while (hNextItem != 0 && nextIndex < index) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
nextIndex++;
@@ -2853,7 +2853,7 @@ int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
return 0;
}
int nextIndex = 0;
- int /*long*/ hNextItem = hFirstItem;
+ long /*int*/ hNextItem = hFirstItem;
while (hNextItem != 0 && nextIndex < index) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
nextIndex++;
@@ -2869,7 +2869,7 @@ int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
TreeItem getFocusItem () {
// checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
return hItem != 0 ? _getItem (hItem) : null;
}
@@ -2941,12 +2941,12 @@ Point getImageSize () {
return new Point (0, getItemHeight ());
}
-int /*long*/ getBottomItem () {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+long /*int*/ getBottomItem () {
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == 0) return 0;
int index = 0, count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0);
while (index <= count) {
- int /*long*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hItem);
+ long /*int*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hItem);
if (hNextItem == 0) return hItem;
hItem = hNextItem;
index++;
@@ -3102,9 +3102,9 @@ public TreeColumn [] getColumns () {
public TreeItem getItem (int index) {
checkWidget ();
if (index < 0) error (SWT.ERROR_INVALID_RANGE);
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hFirstItem == 0) error (SWT.ERROR_INVALID_RANGE);
- int /*long*/ hItem = findItem (hFirstItem, index);
+ long /*int*/ hItem = findItem (hFirstItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
return _getItem (hItem);
}
@@ -3193,14 +3193,14 @@ public TreeItem getItem (Point point) {
*/
public int getItemCount () {
checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return 0;
return getItemCount (hItem);
}
-int getItemCount (int /*long*/ hItem) {
+int getItemCount (long /*int*/ hItem) {
int count = 0;
- int /*long*/ hFirstItem = hItem;
+ long /*int*/ hFirstItem = hItem;
if (hItem == hFirstIndexOf) {
if (itemCount != -1) return itemCount;
hFirstItem = hLastIndexOf;
@@ -3249,14 +3249,14 @@ public int getItemHeight () {
*/
public TreeItem [] getItems () {
checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return new TreeItem [0];
return getItems (hItem);
}
-TreeItem [] getItems (int /*long*/ hTreeItem) {
+TreeItem [] getItems (long /*int*/ hTreeItem) {
int count = 0;
- int /*long*/ hItem = hTreeItem;
+ long /*int*/ hItem = hTreeItem;
while (hItem != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
count++;
@@ -3312,7 +3312,7 @@ public boolean getLinesVisible () {
return linesVisible;
}
-int /*long*/ getNextSelection (int /*long*/ hItem, TVITEM tvItem) {
+long /*int*/ getNextSelection (long /*int*/ hItem, TVITEM tvItem) {
while (hItem != 0) {
int state = 0;
if (OS.IsWinCE) {
@@ -3323,8 +3323,8 @@ int /*long*/ getNextSelection (int /*long*/ hItem, TVITEM tvItem) {
state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
}
if ((state & OS.TVIS_SELECTED) != 0) return hItem;
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
- int /*long*/ hSelected = getNextSelection (hFirstItem, tvItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hSelected = getNextSelection (hFirstItem, tvItem);
if (hSelected != 0) return hSelected;
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -3348,7 +3348,7 @@ public TreeItem getParentItem () {
return null;
}
-int getSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection, int index, int count, boolean bigSelection, boolean all) {
+int getSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection, int index, int count, boolean bigSelection, boolean all) {
while (hItem != 0) {
if (OS.IsWinCE || bigSelection) {
tvItem.hItem = hItem;
@@ -3372,7 +3372,7 @@ int getSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection, int
}
if (index == count) break;
if (all) {
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
if ((index = getSelection (hFirstItem, tvItem, selection, index, count, bigSelection, all)) == count) {
break;
}
@@ -3403,7 +3403,7 @@ int getSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection, int
public TreeItem [] getSelection () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return new TreeItem [0];
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
@@ -3414,12 +3414,12 @@ public TreeItem [] getSelection () {
}
int count = 0;
TreeItem [] guess = new TreeItem [(style & SWT.VIRTUAL) != 0 ? 8 : 1];
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
count = getSelection (hItem, tvItem, guess, 0, -1, false, true);
} else {
TVITEM tvItem = null;
@@ -3430,7 +3430,7 @@ public TreeItem [] getSelection () {
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null) {
- int /*long*/ hItem = item.handle;
+ long /*int*/ hItem = item.handle;
int state = 0;
if (OS.IsWinCE) {
tvItem.hItem = hItem;
@@ -3457,7 +3457,7 @@ public TreeItem [] getSelection () {
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
boolean bigSelection = result.length > itemCount / 2;
if (count != getSelection (hItem, tvItem, result, 0, count, bigSelection, false)) {
@@ -3480,7 +3480,7 @@ public TreeItem [] getSelection () {
public int getSelectionCount () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return 0;
int state = 0;
if (OS.IsWinCE) {
@@ -3495,7 +3495,7 @@ public int getSelectionCount () {
return (state & OS.TVIS_SELECTED) == 0 ? 0 : 1;
}
int count = 0;
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
TVITEM tvItem = null;
if (OS.IsWinCE) {
tvItem = new TVITEM ();
@@ -3503,13 +3503,13 @@ public int getSelectionCount () {
}
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
count = getSelection (hItem, tvItem, null, 0, -1, false, true);
} else {
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null) {
- int /*long*/ hItem = item.handle;
+ long /*int*/ hItem = item.handle;
int state = 0;
if (OS.IsWinCE) {
tvItem.hItem = hItem;
@@ -3601,11 +3601,11 @@ public int getSortDirection () {
*/
public TreeItem getTopItem () {
checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
return hItem != 0 ? _getItem (hItem) : null;
}
-boolean hitTestSelection (int /*long*/ hItem, int x, int y) {
+boolean hitTestSelection (long /*int*/ hItem, int x, int y) {
if (hItem == 0) return false;
TreeItem item = _getItem (hItem);
if (item == null) return false;
@@ -3616,10 +3616,10 @@ boolean hitTestSelection (int /*long*/ hItem, int x, int y) {
//BUG? - check drag detect
int [] order = new int [1], index = new int [1];
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int /*long*/ hFont = item.fontHandle (order [index [0]]);
+ long /*int*/ hFont = item.fontHandle (order [index [0]]);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
int detail = (state & OS.TVIS_SELECTED) != 0 ? SWT.SELECTED : 0;
@@ -3645,8 +3645,8 @@ int imageIndex (Image image, int index) {
* times, Windows does work making this operation slow. The fix
* is to test for the same image list before setting the new one.
*/
- int /*long*/ hImageList = imageList.getHandle ();
- int /*long*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
+ long /*int*/ hImageList = imageList.getHandle ();
+ long /*int*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
if (hOldImageList != hImageList) {
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_NORMAL, hImageList);
updateScrollBar ();
@@ -3662,7 +3662,7 @@ int imageIndexHeader (Image image) {
headerImageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = headerImageList.indexOf (image);
if (index == -1) index = headerImageList.add (image);
- int /*long*/ hImageList = headerImageList.getHandle ();
+ long /*int*/ hImageList = headerImageList.getHandle ();
if (hwndHeader != 0) {
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageList);
}
@@ -3727,7 +3727,7 @@ public int indexOf (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
return hItem == 0 ? -1 : findIndex (hItem, item.handle);
}
@@ -3801,7 +3801,7 @@ boolean isItemSelected (NMTVCUSTOMDRAW nmcd) {
void redrawSelection () {
if ((style & SWT.SINGLE) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
RECT rect = new RECT ();
if (OS.TreeView_GetItemRect (handle, hItem, rect, false)) {
@@ -3809,7 +3809,7 @@ void redrawSelection () {
}
}
} else {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem != 0) {
TVITEM tvItem = null;
if (OS.IsWinCE) {
@@ -3845,7 +3845,7 @@ void register () {
if (hwndHeader != 0) display.addControl (hwndHeader, this);
}
-void releaseItem (int /*long*/ hItem, TVITEM tvItem, boolean release) {
+void releaseItem (long /*int*/ hItem, TVITEM tvItem, boolean release) {
if (hItem == hAnchor) hAnchor = 0;
if (hItem == hInsert) hInsert = 0;
tvItem.hItem = hItem;
@@ -3861,7 +3861,7 @@ void releaseItem (int /*long*/ hItem, TVITEM tvItem, boolean release) {
}
}
-void releaseItems (int /*long*/ hItem, TVITEM tvItem) {
+void releaseItems (long /*int*/ hItem, TVITEM tvItem) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
while (hItem != 0) {
releaseItems (hItem, tvItem);
@@ -3920,7 +3920,7 @@ void releaseWidget () {
display.releaseImageList (headerImageList);
}
imageList = headerImageList = null;
- int /*long*/ hStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_STATE, 0);
if (hStateList != 0) OS.ImageList_Destroy (hStateList);
if (itemToolTipHandle != 0) OS.DestroyWindow (itemToolTipHandle);
@@ -3950,7 +3950,7 @@ public void removeAll () {
boolean redraw = getDrawing () && OS.IsWindowVisible (handle);
if (redraw) OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
shrink = ignoreShrink = true;
- int /*long*/ result = OS.SendMessage (handle, OS.TVM_DELETEITEM, 0, OS.TVI_ROOT);
+ long /*int*/ result = OS.SendMessage (handle, OS.TVM_DELETEITEM, 0, OS.TVI_ROOT);
ignoreShrink = false;
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
@@ -4061,7 +4061,7 @@ void reskinChildren (int flags) {
*/
public void setInsertMark (TreeItem item, boolean before) {
checkWidget ();
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
if (item != null) {
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
hItem = item.handle;
@@ -4086,11 +4086,11 @@ public void setInsertMark (TreeItem item, boolean before) {
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
setItemCount (count, OS.TVGN_ROOT, hItem);
}
-void setItemCount (int count, int /*long*/ hParent, int /*long*/ hItem) {
+void setItemCount (int count, long /*int*/ hParent, long /*int*/ hItem) {
boolean redraw = false;
if (OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0) == 0) {
redraw = getDrawing () && OS.IsWindowVisible (handle);
@@ -4201,18 +4201,18 @@ public void setLinesVisible (boolean show) {
OS.InvalidateRect (handle, null, true);
}
-int /*long*/ scrolledHandle () {
+long /*int*/ scrolledHandle () {
if (hwndHeader == 0) return handle;
return columnCount == 0 && scrollWidth == 0 ? handle : hwndParent;
}
-void select (int /*long*/ hItem, TVITEM tvItem) {
+void select (long /*int*/ hItem, TVITEM tvItem) {
while (hItem != 0) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_EXPANDED);
if ((state & OS.TVIS_EXPANDED) != 0) {
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
select (hFirstItem, tvItem);
}
@@ -4242,7 +4242,7 @@ public void select (TreeItem item) {
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if ((style & SWT.SINGLE) != 0) {
- int /*long*/ hItem = item.handle;
+ long /*int*/ hItem = item.handle;
int state = 0;
if (OS.IsWinCE) {
TVITEM tvItem = new TVITEM ();
@@ -4283,7 +4283,7 @@ public void select (TreeItem item) {
}
setSelection (item);
if (hInfo != null) {
- int /*long*/ hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
+ long /*int*/ hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
OS.SendMessage (handle, OS.WM_HSCROLL, hThumb, 0);
}
/*
@@ -4298,7 +4298,7 @@ public void select (TreeItem item) {
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
OS.SetScrollInfo (handle, OS.SB_VERT, vInfo, true);
}
- int /*long*/ vThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, vInfo.nPos);
+ long /*int*/ vThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, vInfo.nPos);
OS.SendMessage (handle, OS.WM_VSCROLL, vThumb, 0);
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
@@ -4338,9 +4338,9 @@ public void selectAll () {
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.state = OS.TVIS_SELECTED;
tvItem.stateMask = OS.TVIS_SELECTED;
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
select (hItem, tvItem);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
}
@@ -4374,7 +4374,7 @@ Event sendEraseItemEvent (TreeItem item, NMTTCUSTOMDRAW nmcd, int column, RECT c
return event;
}
-Event sendMeasureItemEvent (TreeItem item, int index, int /*long*/ hDC, int detail) {
+Event sendMeasureItemEvent (TreeItem item, int index, long /*int*/ hDC, int detail) {
RECT itemRect = item.getBounds (index, true, true, false, false, false, hDC);
int nSavedDC = OS.SaveDC (hDC);
GCData data = new GCData ();
@@ -4434,7 +4434,7 @@ Event sendPaintItemEvent (TreeItem item, NMTTCUSTOMDRAW nmcd, int column, RECT i
return event;
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
super.setBackgroundImage (hBitmap);
if (hBitmap != 0) {
/*
@@ -4507,7 +4507,7 @@ void setCursor () {
* is IDC_ARROW.
*/
Cursor cursor = findCursor ();
- int /*long*/ hCursor = cursor == null ? OS.LoadCursor (0, OS.IDC_ARROW) : cursor.handle;
+ long /*int*/ hCursor = cursor == null ? OS.LoadCursor (0, OS.IDC_ARROW) : cursor.handle;
OS.SetCursor (hCursor);
}
@@ -4588,7 +4588,7 @@ void setCheckboxImageList () {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
flags |= OS.ILC_COLOR32;
} else {
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ hDC = OS.GetDC (handle);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
OS.ReleaseDC (handle, hDC);
@@ -4606,11 +4606,11 @@ void setCheckboxImageList () {
}
if ((style & SWT.RIGHT_TO_LEFT) != 0) flags |= OS.ILC_MIRROR;
int height = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0), width = height;
- int /*long*/ hStateList = OS.ImageList_Create (width, height, flags, count, count);
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ memDC = OS.CreateCompatibleDC (hDC);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
- int /*long*/ hOldBitmap = OS.SelectObject (memDC, hBitmap);
+ long /*int*/ hStateList = OS.ImageList_Create (width, height, flags, count, count);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ memDC = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
+ long /*int*/ hOldBitmap = OS.SelectObject (memDC, hBitmap);
RECT rect = new RECT ();
OS.SetRect (rect, 0, 0, width * count, height);
/*
@@ -4630,10 +4630,10 @@ void setCheckboxImageList () {
clrBackground = 0x0200FF00;
}
}
- int /*long*/ hBrush = OS.CreateSolidBrush (clrBackground);
+ long /*int*/ hBrush = OS.CreateSolidBrush (clrBackground);
OS.FillRect (memDC, rect, hBrush);
OS.DeleteObject (hBrush);
- int /*long*/ oldFont = OS.SelectObject (hDC, defaultFont ());
+ long /*int*/ oldFont = OS.SelectObject (hDC, defaultFont ());
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
OS.GetTextMetrics (hDC, tm);
OS.SelectObject (hDC, oldFont);
@@ -4642,7 +4642,7 @@ void setCheckboxImageList () {
int left = (width - itemWidth) / 2, top = (height - itemHeight) / 2 + 1;
OS.SetRect (rect, left + width, top, left + width + itemWidth, top + itemHeight);
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
- int /*long*/ hTheme = display.hButtonTheme ();
+ long /*int*/ hTheme = display.hButtonTheme ();
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_UNCHECKEDNORMAL, rect, null);
rect.left += width; rect.right += width;
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_CHECKEDNORMAL, rect, null);
@@ -4668,7 +4668,7 @@ void setCheckboxImageList () {
OS.ImageList_AddMasked (hStateList, hBitmap, clrBackground);
}
OS.DeleteObject (hBitmap);
- int /*long*/ hOldStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
+ long /*int*/ hOldStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_STATE, hStateList);
if (hOldStateList != 0) OS.ImageList_Destroy (hOldStateList);
}
@@ -4753,7 +4753,7 @@ public void setRedraw (boolean redraw) {
* when redraw is turned on and there are no items in
* the tree.
*/
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
if (redraw) {
if (drawCount == 1) {
int count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
@@ -4822,7 +4822,7 @@ void setScrollWidth (int width) {
horizontalBar.setPageIncrement (info.nPage);
}
OS.GetClientRect (hwndParent, rect);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
HDLAYOUT playout = new HDLAYOUT ();
playout.prc = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, RECT.sizeof);
playout.pwpos = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, WINDOWPOS.sizeof);
@@ -4843,7 +4843,7 @@ void setScrollWidth (int width) {
ignoreResize = oldIgnore;
}
-void setSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection) {
+void setSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection) {
while (hItem != 0) {
int index = 0;
while (index < selection.length) {
@@ -4864,7 +4864,7 @@ void setSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection) {
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
}
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
setSelection (hFirstItem, tvItem, selection);
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -4933,8 +4933,8 @@ public void setSelection (TreeItem [] items) {
TreeItem item = items [0];
if (item != null) {
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
- int /*long*/ hNewItem = hAnchor = item.handle;
+ long /*int*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hNewItem = hAnchor = item.handle;
/*
* Bug in Windows. When TVM_SELECTITEM is used to select and
@@ -4958,7 +4958,7 @@ public void setSelection (TreeItem [] items) {
ignoreSelect = false;
if (OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0) == 0) {
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, hNewItem);
- int /*long*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hNewItem);
+ long /*int*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hNewItem);
if (hParent == 0) OS.SendMessage (handle, OS.WM_HSCROLL, OS.SB_TOP, 0);
}
if (fixScroll) {
@@ -4989,10 +4989,10 @@ public void setSelection (TreeItem [] items) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
setSelection (hItem, tvItem, items);
} else {
for (int i=0; i<this.items.length; i++) {
@@ -5097,8 +5097,8 @@ public void setTopItem (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ hItem = item.handle;
- int /*long*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hItem = item.handle;
+ long /*int*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == hTopItem) return;
boolean fixScroll = checkScroll (hItem), redraw = false;
if (fixScroll) {
@@ -5110,7 +5110,7 @@ public void setTopItem (TreeItem item) {
}
SCROLLINFO hInfo = null;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- int /*long*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
+ long /*int*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
if (hParent != 0 && (bits & (OS.TVS_NOHSCROLL | OS.TVS_NOSCROLL)) == 0) {
hInfo = new SCROLLINFO ();
hInfo.cbSize = SCROLLINFO.sizeof;
@@ -5120,7 +5120,7 @@ public void setTopItem (TreeItem item) {
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, hItem);
if (hParent != 0) {
if (hInfo != null) {
- int /*long*/ hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
+ long /*int*/ hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
OS.SendMessage (handle, OS.WM_HSCROLL, hThumb, 0);
}
} else {
@@ -5138,7 +5138,7 @@ public void setTopItem (TreeItem item) {
updateScrollBar ();
}
-void showItem (int /*long*/ hItem) {
+void showItem (long /*int*/ hItem) {
/*
* Bug in Windows. When TVM_ENSUREVISIBLE is used to ensure
* that an item is visible and the client area of the tree is
@@ -5304,7 +5304,7 @@ public void showItem (TreeItem item) {
*/
public void showSelection () {
checkWidget ();
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
if ((style & SWT.SINGLE) != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return;
@@ -5320,7 +5320,7 @@ public void showSelection () {
}
if ((state & OS.TVIS_SELECTED) == 0) return;
} else {
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
TVITEM tvItem = null;
if (OS.IsWinCE) {
@@ -5328,7 +5328,7 @@ public void showSelection () {
tvItem.mask = OS.TVIF_STATE;
}
if ((style & SWT.VIRTUAL) != 0) {
- int /*long*/ hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
hItem = getNextSelection (hRoot, tvItem);
} else {
//FIXME - this code expands first selected item it finds
@@ -5363,7 +5363,7 @@ public void showSelection () {
sort (OS.TVI_ROOT, false);
}
-void sort (int /*long*/ hParent, boolean all) {
+void sort (long /*int*/ hParent, boolean all) {
int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (itemCount == 0 || itemCount == 1) return;
hFirstIndexOf = hLastIndexOf = 0;
@@ -5372,7 +5372,7 @@ void sort (int /*long*/ hParent, boolean all) {
OS.SendMessage (handle, OS.TVM_SORTCHILDREN, all ? 1 : 0, hParent);
} else {
Callback compareCallback = new Callback (this, "CompareFunc", 3);
- int /*long*/ lpfnCompare = compareCallback.getAddress ();
+ long /*int*/ lpfnCompare = compareCallback.getAddress ();
TVSORTCB psort = new TVSORTCB ();
psort.hParent = hParent;
psort.lpfnCompare = lpfnCompare;
@@ -5412,7 +5412,7 @@ RECT toolTipRect (RECT rect) {
}
String toolTipText (NMTTDISPINFO hdr) {
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom && toolTipText != null) return ""; //$NON-NLS-1$
if (headerToolTipHandle == hdr.hwndFrom) {
for (int i=0; i<columnCount; i++) {
@@ -5448,7 +5448,7 @@ String toolTipText (NMTTDISPINFO hdr) {
return super.toolTipText (hdr);
}
-int /*long*/ topHandle () {
+long /*int*/ topHandle () {
return hwndParent != 0 ? hwndParent : handle;
}
@@ -5517,8 +5517,8 @@ void updateImageList () {
* times, Windows does work making this operation slow. The fix
* is to test for the same image list before setting the new one.
*/
- int /*long*/ hImageList = i == items.length ? 0 : imageList.getHandle ();
- int /*long*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
+ long /*int*/ hImageList = i == items.length ? 0 : imageList.getHandle ();
+ long /*int*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
if (hImageList != hOldImageList) {
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_NORMAL, hImageList);
}
@@ -5602,7 +5602,7 @@ void updateOrientation () {
}
}
}
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_NORMAL, hImageList);
}
if (hwndHeader != 0) {
@@ -5630,7 +5630,7 @@ void updateOrientation () {
}
}
}
- int /*long*/ hImageListHeader = headerImageList.getHandle ();
+ long /*int*/ hImageListHeader = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageListHeader);
}
}
@@ -5701,11 +5701,11 @@ TCHAR windowClass () {
return TreeClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return TreeProc;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (hwndHeader != 0 && hwnd == hwndHeader) {
switch (msg) {
case OS.WM_CONTEXTMENU: {
@@ -5793,7 +5793,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
setScrollWidth ();
if (ignoreResize) return 0;
setResizeChildren (false);
- int /*long*/ code = callWindowProc (hwnd, OS.WM_SIZE, wParam, lParam);
+ long /*int*/ code = callWindowProc (hwnd, OS.WM_SIZE, wParam, lParam);
sendEvent (SWT.Resize);
if (isDisposed ()) return 0;
if (layout != null) {
@@ -5852,7 +5852,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
}
}
OS.SetScrollInfo (handle, OS.SB_VERT, info, true);
- int /*long*/ code = OS.SendMessage (handle, OS.WM_VSCROLL, wParam, lParam);
+ long /*int*/ code = OS.SendMessage (handle, OS.WM_VSCROLL, wParam, lParam);
OS.GetScrollInfo (handle, OS.SB_VERT, info);
OS.SetScrollInfo (hwndParent, OS.SB_VERT, info, true);
return code;
@@ -5869,7 +5869,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
* selected.
*/
if ((style & SWT.MULTI) != 0 || hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
TreeItem [] items = new TreeItem [10];
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
@@ -5894,7 +5894,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
rect.left = Math.max (rect.left, clientRect.left);
rect.right = Math.min (rect.right, clientRect.right);
}
- int /*long*/ hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long /*int*/ hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
for (int i = 1; i < count; i++) {
if (rect.bottom - rect.top > DRAG_IMAGE_SIZE) break;
if (rect.bottom > clientRect.bottom) break;
@@ -5906,7 +5906,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
itemRect.left = Math.max (itemRect.left, clientRect.left);
itemRect.right = Math.min (itemRect.right, clientRect.right);
}
- int /*long*/ rectRgn = OS.CreateRectRgn (itemRect.left, itemRect.top, itemRect.right, itemRect.bottom);
+ long /*int*/ rectRgn = OS.CreateRectRgn (itemRect.left, itemRect.top, itemRect.right, itemRect.bottom);
OS.CombineRgn (hRgn, hRgn, rectRgn, OS.RGN_OR);
OS.DeleteObject (rectRgn);
rect.bottom = itemRect.bottom;
@@ -5915,8 +5915,8 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
OS.GetRgnBox (hRgn, rect);
/* Create resources */
- int /*long*/ hdc = OS.GetDC (handle);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (handle);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = rect.right - rect.left;
@@ -5926,10 +5926,10 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
int colorKey = 0x0000FD;
POINT pt = new POINT ();
OS.SetWindowOrgEx (memHdc, rect.left, rect.top, pt);
@@ -5960,7 +5960,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
/*
@@ -5974,7 +5974,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
*/
switch ((int)/*64*/wParam) {
case ' ': {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
hAnchor = hItem;
OS.SendMessage (handle, OS.TVM_ENSUREVISIBLE, 0, hItem);
@@ -5993,7 +5993,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
if (!OS.IsWinCE) {
- int /*long*/ id = hItem;
+ long /*int*/ id = hItem;
if (OS.COMCTL32_MAJOR >= 6) {
id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, hItem, 0);
}
@@ -6035,7 +6035,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
* using NM_RETURN.
*/
Event event = new Event ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) event.item = _getItem (hItem);
sendSelectionEvent (SWT.DefaultSelection, event, false);
return LRESULT.ZERO;
@@ -6046,14 +6046,14 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if ((style & SWT.DOUBLE_BUFFERED) != 0) return LRESULT.ONE;
if (findImageControl () != null) return LRESULT.ONE;
return result;
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for checked item and tree column
@@ -6066,7 +6066,7 @@ LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
boolean fixScroll = false;
if ((style & SWT.DOUBLE_BUFFERED) != 0) {
fixScroll = (style & SWT.VIRTUAL) != 0 || hooks (SWT.EraseItem) || hooks (SWT.PaintItem);
@@ -6088,7 +6088,7 @@ LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -6103,7 +6103,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
*/
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
if (isRTL != createdAsRTL) {
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
return new LRESULT (code);
}
break;
@@ -6139,17 +6139,17 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
if ((style & SWT.SINGLE) != 0) break;
if (OS.GetKeyState (OS.VK_SHIFT) < 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
if (hAnchor == 0) hAnchor = hItem;
ignoreSelect = ignoreDeselect = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
ignoreSelect = ignoreDeselect = false;
- int /*long*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
- int /*long*/ hDeselectItem = hItem;
+ long /*int*/ hDeselectItem = hItem;
RECT rect1 = new RECT ();
if (!OS.TreeView_GetItemRect (handle, hAnchor, rect1, false)) {
hAnchor = hItem;
@@ -6163,7 +6163,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
hDeselectItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, flags, hDeselectItem);
}
- int /*long*/ hSelectItem = hAnchor;
+ long /*int*/ hSelectItem = hAnchor;
OS.TreeView_GetItemRect (handle, hNewItem, rect1, false);
OS.TreeView_GetItemRect (handle, hSelectItem, rect2, false);
tvItem.state = OS.TVIS_SELECTED;
@@ -6185,7 +6185,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
}
}
if (OS.GetKeyState (OS.VK_CONTROL) < 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
@@ -6193,7 +6193,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
boolean oldSelected = (tvItem.state & OS.TVIS_SELECTED) != 0;
- int /*long*/ hNewItem = 0;
+ long /*int*/ hNewItem = 0;
switch ((int)/*64*/wParam) {
case OS.VK_UP:
hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUSVISIBLE, hItem);
@@ -6216,7 +6216,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
OS.GetClientRect (handle, clientRect);
hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
do {
- int /*long*/ hVisible = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNewItem);
+ long /*int*/ hVisible = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNewItem);
if (hVisible == 0) break;
if (!OS.TreeView_GetItemRect (handle, hVisible, rect, false)) break;
if (rect.bottom > clientRect.bottom) break;
@@ -6270,7 +6270,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
}
}
}
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
hAnchor = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
return new LRESULT (code);
}
@@ -6278,7 +6278,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When a tree item that has an image
* with alpha is expanded or collapsed, the area where
@@ -6308,7 +6308,7 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_KILLFOCUS (wParam, lParam);
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
TVHITTESTINFO lpht = new TVHITTESTINFO ();
lpht.x = OS.GET_X_LPARAM (lParam);
lpht.y = OS.GET_Y_LPARAM (lParam);
@@ -6343,7 +6343,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
if (!OS.IsWinCE) {
- int /*long*/ id = tvItem.hItem;
+ long /*int*/ id = tvItem.hItem;
if (OS.COMCTL32_MAJOR >= 6) {
id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, tvItem.hItem, 0);
}
@@ -6380,7 +6380,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* In a multi-select tree, if the user is collapsing a subtree that
* contains selected items, clear the selection from these items and
@@ -6402,7 +6402,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
boolean fixSelection = false, deselected = false;
- int /*long*/ hOldSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hOldSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (lpht.hItem != 0 && (style & SWT.MULTI) != 0) {
if (hOldSelection != 0) {
TVITEM tvItem = new TVITEM ();
@@ -6412,7 +6412,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if ((tvItem.state & OS.TVIS_EXPANDED) != 0) {
fixSelection = true;
tvItem.stateMask = OS.TVIS_SELECTED;
- int /*long*/ hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, lpht.hItem);
+ long /*int*/ hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, lpht.hItem);
while (hNext != 0) {
if (hNext == hAnchor) hAnchor = 0;
tvItem.hItem = hNext;
@@ -6420,7 +6420,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if ((tvItem.state & OS.TVIS_SELECTED) != 0) deselected = true;
tvItem.state = 0;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- int /*long*/ hItem = hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNext);
+ long /*int*/ hItem = hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNext);
while (hItem != 0 && hItem != lpht.hItem) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
}
@@ -6434,7 +6434,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
hSelect = lpht.hItem;
ignoreDeselect = ignoreSelect = lockSelection = true;
}
- int /*long*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
if (OS.GetFocus () != handle) OS.SetFocus (handle);
}
@@ -6442,7 +6442,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
hSelect = 0;
ignoreDeselect = ignoreSelect = lockSelection = false;
}
- int /*long*/ hNewSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hNewSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hOldSelection != hNewSelection) hAnchor = hNewSelection;
if (dragStarted) {
if (!display.captureChanged && !isDisposed ()) {
@@ -6463,7 +6463,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.TVS_FULLROWSELECT) == 0) {
if (OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0) == 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
RECT rect = new RECT ();
if (OS.TreeView_GetItemRect (handle, hItem, rect, false)) {
@@ -6510,7 +6510,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
if (!OS.IsWinCE) {
- int /*long*/ id = tvItem.hItem;
+ long /*int*/ id = tvItem.hItem;
if (OS.COMCTL32_MAJOR >= 6) {
id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, tvItem.hItem, 0);
}
@@ -6558,7 +6558,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
}
return LRESULT.ZERO;
}
- int /*long*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
if (OS.GetFocus () != handle) OS.SetFocus (handle);
}
@@ -6581,7 +6581,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
}
/* Get the selected state of the last selected item */
- int /*long*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if ((style & SWT.MULTI) != 0) {
tvItem.hItem = hOldItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
@@ -6634,11 +6634,11 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
hSelect = lpht.hItem;
dragStarted = gestureCompleted = false;
ignoreDeselect = ignoreSelect = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
if (OS.GetFocus () != handle) OS.SetFocus (handle);
}
- int /*long*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (fakeSelection) {
if (hOldItem == 0 || (hNewItem == hOldItem && lpht.hItem != hOldItem)) {
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_CARET, lpht.hItem);
@@ -6714,10 +6714,10 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if ((wParam & OS.MK_CONTROL) == 0) {
if (!hittestSelected || !dragStarted) {
tvItem.state = 0;
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
deselect (hItem, tvItem, hNewItem);
} else {
for (int i=0; i<items.length; i++) {
@@ -6740,7 +6740,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.TreeView_GetItemRect (handle, hNewItem, rect2, false)) {
int flags = rect1.top < rect2.top ? OS.TVGN_NEXTVISIBLE : OS.TVGN_PREVIOUSVISIBLE;
tvItem.state = OS.TVIS_SELECTED;
- int /*long*/ hItem = tvItem.hItem = hAnchor;
+ long /*int*/ hItem = tvItem.hItem = hAnchor;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
while (hItem != hNewItem) {
tvItem.hItem = hItem;
@@ -6786,7 +6786,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (code);
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
@@ -6835,19 +6835,19 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
return result;
}
-LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
if (ignoreResize) return null;
return super.WM_MOVE (wParam, lParam);
}
-LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. The receiver uses WM_RBUTTONDOWN
* to initiate a drag/drop operation depending on how the
@@ -6916,7 +6916,7 @@ LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
if (shrink && !ignoreShrink) {
/* Resize the item array to fit the last item */
int count = items.length - 1;
@@ -6941,7 +6941,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
}
if (doubleBuffer) {
GC gc = null;
- int /*long*/ paintDC = 0;
+ long /*int*/ paintDC = 0;
PAINTSTRUCT ps = new PAINTSTRUCT ();
boolean hooksPaint = hooks (SWT.Paint) || filters (SWT.Paint);
if (hooksPaint) {
@@ -6956,12 +6956,12 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int /*long*/ hDC = OS.CreateCompatibleDC (paintDC);
+ long /*int*/ hDC = OS.CreateCompatibleDC (paintDC);
POINT lpPoint1 = new POINT (), lpPoint2 = new POINT ();
OS.SetWindowOrgEx (hDC, ps.left, ps.top, lpPoint1);
OS.SetBrushOrgEx (hDC, ps.left, ps.top, lpPoint2);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
- int /*long*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
+ long /*int*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
drawBackground (hDC, rect);
@@ -6995,7 +6995,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_PAINT (wParam, lParam);
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
/*
@@ -7009,12 +7009,12 @@ LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
* is happening in WM_PRINTCLIENT, the redrawing is not visible.
*/
printClient = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
printClient = false;
return new LRESULT (code);
}
-LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
@@ -7036,7 +7036,7 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When a tree item that has an image
* with alpha is expanded or collapsed, the area where
@@ -7066,7 +7066,7 @@ LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SETFOCUS (wParam, lParam);
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
if (hwndHeader != 0) {
@@ -7091,7 +7091,7 @@ LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
@@ -7107,13 +7107,13 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
* Windows Vista running under the theme manager.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int /*long*/ code = OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ long /*int*/ code = OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
return code == 0 ? LRESULT.ZERO : new LRESULT (code);
}
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
/*
* Bug in Windows. When TVS_NOHSCROLL is set when the
@@ -7139,7 +7139,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SIZE (wParam, lParam);
}
-LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
/*
@@ -7155,7 +7155,7 @@ LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
boolean fixScroll = false;
if ((style & SWT.DOUBLE_BUFFERED) != 0) {
int code = OS.LOWORD (wParam);
@@ -7201,7 +7201,7 @@ LRESULT WM_TIMER (int wParam, int lParam) {
* Note: Just killing the timer could cause some internal clean up task related to the
* animation not to run.
*/
- int /*long*/ bits = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
+ long /*int*/ bits = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
if ((bits & OS.TVS_EX_FADEINOUTEXPANDOS) != 0) {
if (!OS.IsWindowVisible (handle)) {
if (lastTimerID == wParam) {
@@ -7223,7 +7223,7 @@ LRESULT WM_TIMER (int wParam, int lParam) {
return result;
};
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
if (findImageControl () != null) {
if (OS.COMCTL32_MAJOR < 6) {
return super.wmColorChild (wParam, lParam);
@@ -7240,7 +7240,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (hdr.hwndFrom == itemToolTipHandle) {
LRESULT result = wmNotifyToolTip (hdr, wParam, lParam);
if (result != null) return result;
@@ -7252,7 +7252,7 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotify (hdr, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.TVN_GETDISPINFOA:
case OS.TVN_GETDISPINFOW: {
@@ -7579,7 +7579,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
* The fix is to detect this case and run the TVN_ITEMEXPANDED
* code in this method.
*/
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, tvItem.hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, tvItem.hItem);
runExpanded = hFirstItem == 0;
}
if (!runExpanded) break;
@@ -7681,7 +7681,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. On NT, the automatically created
* header control is created as a UNICODE window, not an
@@ -7883,7 +7883,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsWinCE) return null;
switch (hdr.code) {
case OS.NM_CUSTOMDRAW: {
@@ -7917,7 +7917,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, int /*long*/ lParam) {
+LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long /*int*/ lParam) {
if (OS.IsWinCE) return null;
switch (nmcd.dwDrawStage) {
case OS.CDDS_PREPAINT: {
@@ -7948,10 +7948,10 @@ LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, int /*long*/ lParam) {
OS.POINTSTOPOINT (pt, pos);
OS.ScreenToClient (handle, pt);
if (findCell (pt.x, pt.y, item, index, cellRect, itemRect)) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ hFont = item [0].fontHandle (index [0]);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ hFont = item [0].fontHandle (index [0]);
if (hFont == -1) hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- int /*long*/ oldFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ oldFont = OS.SelectObject (hDC, hFont);
boolean drawForeground = true;
cellRect [0] = item [0].getBounds (index [0], true, true, false, false, false, hDC);
if (hooks (SWT.EraseItem)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
index f796cc2113..fe90b9fade 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
@@ -310,7 +310,7 @@ public int getWidth () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return 0;
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return 0;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
@@ -334,11 +334,11 @@ public void pack () {
int index = parent.indexOf (this);
if (index == -1) return;
int columnWidth = 0;
- int /*long*/ hwnd = parent.handle, hwndHeader = parent.hwndHeader;
+ long /*int*/ hwnd = parent.handle, hwndHeader = parent.hwndHeader;
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
- int /*long*/ hDC = OS.GetDC (hwnd);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (hwnd);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
@@ -354,7 +354,7 @@ public void pack () {
if (isDisposed () || parent.isDisposed ()) break;
itemRight = event.x + event.width;
} else {
- int /*long*/ hFont = item.fontHandle (index);
+ long /*int*/ hFont = item.fontHandle (index);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
RECT itemRect = item.getBounds (index, true, true, false, false, false, hDC);
if (hFont != -1) OS.SelectObject (hDC, hFont);
@@ -483,7 +483,7 @@ public void setAlignment (int alignment) {
if (index == -1 || index == 0) return;
style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT;
@@ -494,7 +494,7 @@ public void setAlignment (int alignment) {
if ((style & SWT.RIGHT) == SWT.RIGHT) hdItem.fmt |= OS.HDF_RIGHT;
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
if (index != 0) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
@@ -519,7 +519,7 @@ public void setImage (Image image) {
void setImage (Image image, boolean sort, boolean right) {
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT | OS.HDI_IMAGE | OS.HDI_BITMAP;
@@ -590,7 +590,7 @@ public void setResizable (boolean resizable) {
void setSortDirection (int direction) {
if (OS.COMCTL32_MAJOR >= 6) {
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader != 0) {
int index = parent.indexOf (this);
if (index == -1) return;
@@ -621,7 +621,7 @@ void setSortDirection (int direction) {
}
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
@@ -660,17 +660,17 @@ public void setText (String string) {
* with spaces.
*/
boolean replace = !OS.IsWinCE && OS.WIN32_VERSION <= OS.VERSION (4, 10);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (parent.getCodePage (), fixMnemonic (string, replace), true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_TEXT;
hdItem.pszText = pszText;
- int /*long*/ result = OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
+ long /*int*/ result = OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
if (result == 0) error (SWT.ERROR_CANNOT_SET_TEXT);
}
@@ -700,7 +700,7 @@ public void setText (String string) {
public void setToolTipText (String string) {
checkWidget();
toolTipText = string;
- int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip == 0) {
parent.createHeaderToolTips ();
parent.updateHeaderToolTips ();
@@ -722,7 +722,7 @@ public void setWidth (int width) {
if (width < 0) return;
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
@@ -731,7 +731,7 @@ public void setWidth (int width) {
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
parent.forceResize ();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
RECT rect = new RECT ();
OS.GetClientRect (hwnd, rect);
rect.left = headerRect.left;
@@ -740,9 +740,9 @@ public void setWidth (int width) {
}
void updateToolTip (int index) {
- int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip != 0) {
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
RECT rect = new RECT ();
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, rect) != 0) {
TOOLINFO lpti = new TOOLINFO ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
index b781d611d9..671802bfe2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
@@ -47,7 +47,7 @@ public class TreeItem extends Item {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
Tree parent;
String [] strings;
Image [] images;
@@ -197,7 +197,7 @@ public TreeItem (TreeItem parentItem, int style, int index) {
this (checkNull (parentItem).parent, style, parentItem.handle, findPrevious (parentItem, index), 0);
}
-TreeItem (Tree parent, int style, int /*long*/ hParent, int /*long*/ hInsertAfter, int /*long*/ hItem) {
+TreeItem (Tree parent, int style, long /*int*/ hParent, long /*int*/ hInsertAfter, long /*int*/ hItem) {
super (parent, style);
this.parent = parent;
parent.createItem (this, hParent, hInsertAfter, hItem);
@@ -208,25 +208,25 @@ static TreeItem checkNull (TreeItem item) {
return item;
}
-static int /*long*/ findPrevious (Tree parent, int index) {
+static long /*int*/ findPrevious (Tree parent, int index) {
if (parent == null) return 0;
if (index < 0) SWT.error (SWT.ERROR_INVALID_RANGE);
if (index == 0) return OS.TVI_FIRST;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- int /*long*/ hItem = parent.findItem (hFirstItem, index - 1);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = parent.findItem (hFirstItem, index - 1);
if (hItem == 0) SWT.error (SWT.ERROR_INVALID_RANGE);
return hItem;
}
-static int /*long*/ findPrevious (TreeItem parentItem, int index) {
+static long /*int*/ findPrevious (TreeItem parentItem, int index) {
if (parentItem == null) return 0;
if (index < 0) SWT.error (SWT.ERROR_INVALID_RANGE);
if (index == 0) return OS.TVI_FIRST;
Tree parent = parentItem.parent;
- int /*long*/ hwnd = parent.handle, hParent = parentItem.handle;
- int /*long*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
- int /*long*/ hItem = parent.findItem (hFirstItem, index - 1);
+ long /*int*/ hwnd = parent.handle, hParent = parentItem.handle;
+ long /*int*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
+ long /*int*/ hItem = parent.findItem (hFirstItem, index - 1);
if (hItem == 0) SWT.error (SWT.ERROR_INVALID_RANGE);
return hItem;
}
@@ -241,7 +241,7 @@ void clear () {
strings = null;
images = null;
if ((parent.style & SWT.CHECK) != 0) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -281,8 +281,8 @@ void clear () {
*/
public void clear (int index, boolean all) {
checkWidget ();
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
hItem = parent.findItem (hItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
@@ -316,8 +316,8 @@ public void clear (int index, boolean all) {
*/
public void clearAll (boolean all) {
checkWidget ();
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
@@ -332,7 +332,7 @@ void destroyWidget () {
releaseHandle ();
}
-int /*long*/ fontHandle (int index) {
+long /*int*/ fontHandle (int index) {
if (cellFont != null && cellFont [index] != null) return cellFont [index].handle;
if (font != null) return font.handle;
return -1;
@@ -426,9 +426,9 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText)
}
//TODO - take into account grid (add boolean arg) to damage less during redraw
-RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText, boolean fullImage, boolean clip, int /*long*/ hDC) {
+RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText, boolean fullImage, boolean clip, long /*int*/ hDC) {
if (!getText && !getImage) return new RECT ();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
@@ -440,7 +440,7 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText,
}
boolean firstColumn = index == 0;
int columnCount = 0;
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader != 0) {
columnCount = parent.columnCount;
firstColumn = index == OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
@@ -512,7 +512,7 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText,
RECT textRect = new RECT ();
TCHAR buffer = new TCHAR (parent.getCodePage (), string, false);
int flags = OS.DT_NOPREFIX | OS.DT_SINGLELINE | OS.DT_CALCRECT;
- int /*long*/ hNewDC = hDC, hFont = 0;
+ long /*int*/ hNewDC = hDC, hFont = 0;
if (hDC == 0) {
hNewDC = OS.GetDC (hwnd);
hFont = fontHandle (index);
@@ -563,12 +563,12 @@ public boolean getChecked () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
tvItem.hItem = handle;
- int /*long*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+ long /*int*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
return (result != 0) && (((tvItem.state >> 12) & 1) == 0);
}
@@ -586,7 +586,7 @@ public boolean getChecked () {
*/
public boolean getExpanded () {
checkWidget ();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int state = 0;
if (OS.IsWinCE) {
TVITEM tvItem = new TVITEM ();
@@ -707,12 +707,12 @@ public boolean getGrayed () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
tvItem.hItem = handle;
- int /*long*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+ long /*int*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
return (result != 0) && ((tvItem.state >> 12) > 2);
}
@@ -737,10 +737,10 @@ public TreeItem getItem (int index) {
checkWidget ();
if (index < 0) error (SWT.ERROR_INVALID_RANGE);
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hFirstItem == 0) error (SWT.ERROR_INVALID_RANGE);
- int /*long*/ hItem = parent.findItem (hFirstItem, index);
+ long /*int*/ hItem = parent.findItem (hFirstItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
return parent._getItem (hItem);
}
@@ -759,8 +759,8 @@ public TreeItem getItem (int index) {
public int getItemCount () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return 0;
return parent.getItemCount (hItem);
}
@@ -784,8 +784,8 @@ public int getItemCount () {
public TreeItem [] getItems () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return new TreeItem [0];
return parent.getItems (hItem);
}
@@ -872,8 +872,8 @@ public Tree getParent () {
*/
public TreeItem getParentItem () {
checkWidget ();
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, handle);
return hItem != 0 ? parent._getItem (hItem) : null;
}
@@ -961,14 +961,14 @@ public int indexOf (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
return hItem == 0 ? -1 : parent.findIndex (hItem, item.handle);
}
void redraw () {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
/*
* When there are no columns and the tree is not
@@ -992,7 +992,7 @@ void redraw () {
void redraw (int column, boolean drawText, boolean drawImage) {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
boolean fullImage = column == 0 && drawText && drawImage;
RECT rect = getBounds (column, drawText, drawImage, true, fullImage, true, 0);
@@ -1034,7 +1034,7 @@ void releaseWidget () {
*/
public void removeAll () {
checkWidget ();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
@@ -1142,7 +1142,7 @@ public void setBackground (int index, Color color) {
public void setChecked (boolean checked) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -1190,7 +1190,7 @@ public void setExpanded (boolean expanded) {
checkWidget ();
/* Do nothing when the item is a leaf or already expanded */
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle) == 0) {
return;
}
@@ -1229,9 +1229,9 @@ public void setExpanded (boolean expanded) {
RECT [] rects = null;
SCROLLINFO oldInfo = null;
int count = 0;
- int /*long*/ hBottomItem = 0;
+ long /*int*/ hBottomItem = 0;
boolean redraw = false, noScroll = true;
- int /*long*/ hTopItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hTopItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (noScroll && hTopItem != 0) {
oldInfo = new SCROLLINFO ();
oldInfo.cbSize = SCROLLINFO.sizeof;
@@ -1243,7 +1243,7 @@ public void setExpanded (boolean expanded) {
boolean noAnimate = true;
count = (int)/*64*/OS.SendMessage (hwnd, OS.TVM_GETVISIBLECOUNT, 0, 0);
rects = new RECT [count + 1];
- int /*long*/ hItem = hTopItem;
+ long /*int*/ hItem = hTopItem;
int index = 0;
while (hItem != 0 && (noAnimate || hItem != handle) && index < count) {
RECT rect = new RECT ();
@@ -1258,7 +1258,7 @@ public void setExpanded (boolean expanded) {
hBottomItem = hItem;
oldRect = new RECT ();
OS.GetClientRect (hwnd, oldRect);
- int /*long*/ topHandle = parent.topHandle ();
+ long /*int*/ topHandle = parent.topHandle ();
OS.UpdateWindow (topHandle);
OS.DefWindowProc (topHandle, OS.WM_SETREDRAW, 0, 0);
if (hwnd != topHandle) {
@@ -1285,7 +1285,7 @@ public void setExpanded (boolean expanded) {
* check whether the selection has changed and issue
* the event.
*/
- int /*long*/ hOldItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hOldItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
/* Expand or collapse the item */
parent.ignoreExpand = true;
@@ -1313,7 +1313,7 @@ public void setExpanded (boolean expanded) {
newInfo.fMask = OS.SIF_ALL;
if (OS.GetScrollInfo (hwnd, OS.SB_HORZ, newInfo)) {
if (oldInfo.nPos != newInfo.nPos) {
- int /*long*/ lParam = OS.MAKELPARAM (OS.SB_THUMBPOSITION, oldInfo.nPos);
+ long /*int*/ lParam = OS.MAKELPARAM (OS.SB_THUMBPOSITION, oldInfo.nPos);
OS.SendMessage (hwnd, OS.WM_HSCROLL, lParam, 0);
}
}
@@ -1324,7 +1324,7 @@ public void setExpanded (boolean expanded) {
RECT newRect = new RECT ();
OS.GetClientRect (hwnd, newRect);
if (OS.EqualRect (oldRect, newRect)) {
- int /*long*/ hItem = hTopItem;
+ long /*int*/ hItem = hTopItem;
int index = 0;
while (hItem != 0 && index < count) {
RECT rect = new RECT ();
@@ -1339,7 +1339,7 @@ public void setExpanded (boolean expanded) {
fixScroll = index == count && hItem == hBottomItem;
}
}
- int /*long*/ topHandle = parent.topHandle ();
+ long /*int*/ topHandle = parent.topHandle ();
OS.DefWindowProc (topHandle, OS.WM_SETREDRAW, 1, 0);
if (hwnd != topHandle) {
OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 1, 0);
@@ -1375,7 +1375,7 @@ public void setExpanded (boolean expanded) {
}
/* Check for a selection event */
- int /*long*/ hNewItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hNewItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hNewItem != hOldItem) {
Event event = new Event ();
if (hNewItem != 0) {
@@ -1423,7 +1423,7 @@ public void setFont (Font font){
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
@@ -1478,7 +1478,7 @@ public void setFont (int index, Font font) {
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
@@ -1580,7 +1580,7 @@ public void setForeground (int index, Color color){
public void setGrayed (boolean grayed) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -1689,7 +1689,7 @@ public void setImage (int index, Image image) {
if ((parent.style & SWT.VIRTUAL) == 0 &&!cached && !parent.painted) {
return;
}
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_IMAGE | OS.TVIF_SELECTEDIMAGE;
tvItem.hItem = handle;
@@ -1729,8 +1729,8 @@ public void setImage (Image image) {
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
parent.setItemCount (count, handle, hItem);
}
@@ -1796,7 +1796,7 @@ public void setText (int index, String string) {
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
index 1d163f08f9..723256bc8c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
@@ -213,7 +213,7 @@ public void addDisposeListener (DisposeListener listener) {
addListener (SWT.Dispose, typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
return 0;
}
@@ -385,7 +385,7 @@ void destroyWidget () {
releaseHandle ();
}
-int /*long*/ DeferWindowPos(int /*long*/ hWinPosInfo, int /*long*/ hWnd, int /*long*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags){
+long /*int*/ DeferWindowPos(long /*int*/ hWinPosInfo, long /*int*/ hWnd, long /*int*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags){
if (OS.IsWinCE) {
/*
* Feature in Windows. On Windows CE, DeferWindowPos always causes
@@ -446,7 +446,7 @@ public void dispose () {
release (true);
}
-boolean dragDetect (int /*long*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (long /*int*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
if (consume != null) consume [0] = false;
if (detect != null) detect [0] = true;
POINT pt = new POINT ();
@@ -472,7 +472,7 @@ boolean filters (int eventType) {
return display.filters (eventType);
}
-Widget findItem (int /*long*/ id) {
+Widget findItem (long /*int*/ id) {
return null;
}
@@ -741,7 +741,7 @@ boolean isValidThread () {
return getDisplay ().isValidThread ();
}
-void mapEvent (int /*long*/ hwnd, Event event) {
+void mapEvent (long /*int*/ hwnd, Event event) {
}
GC new_GC (GCData data) {
@@ -1094,23 +1094,23 @@ void sendSelectionEvent (int type, Event event, boolean send) {
sendEvent (type, event, send);
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam) {
Event event = new Event ();
if (!setKeyState (event, type, wParam, lParam)) return true;
return sendKeyEvent (type, msg, wParam, lParam, event);
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
sendEvent (type, event);
if (isDisposed ()) return false;
return event.doit;
}
-boolean sendMouseEvent (int type, int button, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+boolean sendMouseEvent (int type, int button, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
return sendMouseEvent (type, button, display.getClickCount (type, button, hwnd, lParam), 0, false, hwnd, msg, wParam, lParam);
}
-boolean sendMouseEvent (int type, int button, int count, int detail, boolean send, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+boolean sendMouseEvent (int type, int button, int count, int detail, boolean send, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (!hooks (type) && !filters (type)) return true;
Event event = new Event ();
event.button = button;
@@ -1129,7 +1129,7 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
return event.doit;
}
-boolean sendMouseWheelEvent (int type, int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+boolean sendMouseWheelEvent (int type, long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
int delta = OS.GET_WHEEL_DELTA_WPARAM (wParam);
int detail = 0;
if (type == SWT.MouseWheel) {
@@ -1316,7 +1316,7 @@ boolean setInputState (Event event, int type) {
return true;
}
-boolean setKeyState (Event event, int type, int /*long*/ wParam, int /*long*/ lParam) {
+boolean setKeyState (Event event, int type, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the user presses Ctrl+Backspace
@@ -1380,7 +1380,7 @@ boolean setKeyState (Event event, int type, int /*long*/ wParam, int /*long*/ lP
return setInputState (event, type);
}
-int setLocationMask (Event event, int type, int /*long*/ wParam, int /*long*/ lParam) {
+int setLocationMask (Event event, int type, long /*int*/ wParam, long /*int*/ lParam) {
int location = SWT.NONE;
if (display.lastVirtual) {
switch (display.lastKey) {
@@ -1430,7 +1430,7 @@ boolean setTabItemFocus () {
return false;
}
-boolean SetWindowPos (int /*long*/ hWnd, int /*long*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags) {
+boolean SetWindowPos (long /*int*/ hWnd, long /*int*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags) {
if (OS.IsWinCE) {
/*
* Feature in Windows. On Windows CE, SetWindowPos() always causes
@@ -1503,12 +1503,12 @@ void updateMenuLocation (Event event) {
/* Do nothing */
}
-LRESULT wmCaptureChanged (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCaptureChanged (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
display.captureChanged = true;
return null;
}
-LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Do not report a lead byte as a key pressed.
*/
@@ -1525,7 +1525,7 @@ LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmContextMenu (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmContextMenu (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (wParam != hwnd) return null;
/*
@@ -1574,7 +1574,7 @@ LRESULT wmContextMenu (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPar
return showMenu (x, y, detail) ? LRESULT.ZERO : null;
}
-LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmIMEChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
display.lastKey = 0;
display.lastAscii = (int)/*64*/wParam;
@@ -1588,7 +1588,7 @@ LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return LRESULT.ONE;
}
-LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/* Ignore repeating modifier keys by testing key down state */
switch ((int)/*64*/wParam) {
@@ -1827,7 +1827,7 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return null;
}
-LRESULT wmKeyUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
/* Check for hardware keys */
@@ -1929,9 +1929,9 @@ LRESULT wmKeyUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKillFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
display.scrollRemainder = display.scrollHRemainder = 0;
- int /*long*/ code = callWindowProc (hwnd, OS.WM_KILLFOCUS, wParam, lParam);
+ long /*int*/ code = callWindowProc (hwnd, OS.WM_KILLFOCUS, wParam, lParam);
sendFocusEvent (SWT.FocusOut);
// widget could be disposed at this point
@@ -1947,7 +1947,7 @@ LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return new LRESULT (code);
}
-LRESULT wmLButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmLButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -1976,7 +1976,7 @@ LRESULT wmLButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lP
return result;
}
-LRESULT wmLButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmLButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = null;
int x = OS.GET_X_LPARAM (lParam);
@@ -2064,7 +2064,7 @@ LRESULT wmLButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPar
return result;
}
-LRESULT wmLButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmLButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = null;
if (sendMouseEvent (SWT.MouseUp, 1, hwnd, OS.WM_LBUTTONUP, wParam, lParam)) {
@@ -2086,7 +2086,7 @@ LRESULT wmLButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return result;
}
-LRESULT wmMButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -2115,7 +2115,7 @@ LRESULT wmMButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lP
return result;
}
-LRESULT wmMButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
@@ -2130,7 +2130,7 @@ LRESULT wmMButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPar
return result;
}
-LRESULT wmMButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = null;
if (sendMouseEvent (SWT.MouseUp, 2, hwnd, OS.WM_MBUTTONUP, wParam, lParam)) {
@@ -2152,14 +2152,14 @@ LRESULT wmMButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return result;
}
-LRESULT wmMouseHover (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouseHover (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (!sendMouseEvent (SWT.MouseHover, 0, hwnd, OS.WM_MOUSEHOVER, wParam, lParam)) {
return LRESULT.ZERO;
}
return null;
}
-LRESULT wmMouseLeave (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouseLeave (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (!hooks (SWT.MouseExit) && !filters (SWT.MouseExit)) return null;
int pos = OS.GetMessagePos ();
POINT pt = new POINT ();
@@ -2172,7 +2172,7 @@ LRESULT wmMouseLeave (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
return null;
}
-LRESULT wmMouseMove (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouseMove (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
Display display = this.display;
int pos = OS.GetMessagePos ();
@@ -2224,19 +2224,19 @@ LRESULT wmMouseMove (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return result;
}
-LRESULT wmMouseWheel (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouseWheel (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return sendMouseWheelEvent(SWT.MouseWheel, hwnd, wParam, lParam) ? null : LRESULT.ZERO;
}
-LRESULT wmMouseHWheel (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouseHWheel (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return sendMouseWheelEvent(SWT.MouseHorizontalWheel, hwnd, wParam, lParam) ? null : LRESULT.ZERO;
}
-LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNCPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/* Exit early - don't draw the background */
if (!hooks (SWT.Paint) && !filters (SWT.Paint)) {
@@ -2244,7 +2244,7 @@ LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
}
/* Issue a paint event */
- int /*long*/ result = 0;
+ long /*int*/ result = 0;
if (OS.IsWinCE) {
RECT rect = new RECT ();
OS.GetUpdateRect (hwnd, rect, false);
@@ -2282,7 +2282,7 @@ LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
gc.dispose ();
}
} else {
- int /*long*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
OS.GetUpdateRgn (hwnd, rgn, false);
result = callWindowProc (hwnd, OS.WM_PAINT, wParam, lParam);
GCData data = new GCData ();
@@ -2295,7 +2295,7 @@ LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
if (width != 0 && height != 0) {
- int /*long*/ hDC = gc.handle;
+ long /*int*/ hDC = gc.handle;
OS.SelectClipRgn (hDC, rgn);
OS.SetMetaRgn (hDC);
Event event = new Event ();
@@ -2317,7 +2317,7 @@ LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (result);
}
-LRESULT wmPrint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmPrint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When WM_PRINT is used to print the contents
* of a control that has WS_EX_CLIENTEDGE, the old 3D border is
@@ -2328,7 +2328,7 @@ LRESULT wmPrint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
if ((bits & OS.WS_EX_CLIENTEDGE) != 0) {
- int /*long*/ code = callWindowProc (hwnd, OS.WM_PRINT, wParam, lParam);
+ long /*int*/ code = callWindowProc (hwnd, OS.WM_PRINT, wParam, lParam);
RECT rect = new RECT ();
OS.GetWindowRect (hwnd, rect);
rect.right -= rect.left;
@@ -2344,7 +2344,7 @@ LRESULT wmPrint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmRButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmRButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -2373,7 +2373,7 @@ LRESULT wmRButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lP
return result;
}
-LRESULT wmRButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmRButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
@@ -2388,7 +2388,7 @@ LRESULT wmRButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPar
return result;
}
-LRESULT wmRButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmRButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = null;
if (sendMouseEvent (SWT.MouseUp, 3, hwnd, OS.WM_RBUTTONUP, wParam, lParam)) {
@@ -2412,8 +2412,8 @@ LRESULT wmRButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return result;
}
-LRESULT wmSetFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ code = callWindowProc (hwnd, OS.WM_SETFOCUS, wParam, lParam);
+LRESULT wmSetFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ code = callWindowProc (hwnd, OS.WM_SETFOCUS, wParam, lParam);
sendFocusEvent (SWT.FocusIn);
// widget could be disposed at this point
@@ -2429,7 +2429,7 @@ LRESULT wmSetFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return new LRESULT (code);
}
-LRESULT wmSysChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmSysChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
display.lastAscii = (int)/*64*/wParam;
display.lastNull = wParam == 0;
@@ -2442,7 +2442,7 @@ LRESULT wmSysChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
/* Call the window proc to determine whether it is a system key or mnemonic */
boolean oldKeyHit = display.mnemonicKeyHit;
display.mnemonicKeyHit = true;
- int /*long*/ result = callWindowProc (hwnd, OS.WM_SYSCHAR, wParam, lParam);
+ long /*int*/ result = callWindowProc (hwnd, OS.WM_SYSCHAR, wParam, lParam);
boolean consumed = false;
if (!display.mnemonicKeyHit) {
consumed = !sendKeyEvent (SWT.KeyDown, OS.WM_SYSCHAR, wParam, lParam);
@@ -2453,7 +2453,7 @@ LRESULT wmSysChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return consumed ? LRESULT.ONE : new LRESULT (result);
}
-LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When WM_SYSKEYDOWN is sent,
* the user pressed ALT+<key> or F10 to get to the
@@ -2470,7 +2470,7 @@ LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
/* Ignore well known system keys */
switch ((int)/*64*/wParam) {
case OS.VK_F4: {
- int /*long*/ hwndShell = hwnd;
+ long /*int*/ hwndShell = hwnd;
while (OS.GetParent (hwndShell) != 0) {
if (OS.GetWindow (hwndShell, OS.GW_OWNER) != 0) break;
hwndShell = OS.GetParent (hwndShell);
@@ -2576,11 +2576,11 @@ LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
return null;
}
-LRESULT wmSysKeyUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmSysKeyUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return wmKeyUp (hwnd, wParam, lParam);
}
-LRESULT wmXButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmXButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -2610,7 +2610,7 @@ LRESULT wmXButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lP
return result;
}
-LRESULT wmXButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmXButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
@@ -2627,7 +2627,7 @@ LRESULT wmXButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPar
return result;
}
-LRESULT wmXButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmXButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = null;
int button = OS.HIWORD (wParam) == OS.XBUTTON1 ? 4 : 5;

Back to the top